OSDN Git Service

* gcc.c (validate_switches): Don't scan past closing '}'.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
2
3         * cp-tree.h (rid_to_yy): Delete.
4         (C_RID_YYCODE): Delete.
5         (finish_file): Delete redundant declaration.
6
7 2003-02-18  Jason Merrill  <jason@redhat.com>
8
9         PR c++/9623
10         * decl.c (reshape_init): Don't mess with initializer labels.
11
12 2003-02-18  Ben Elliston  <bje@redhat.com>
13
14         PR other/7350
15         * decl.c (duplicate_decls): Fix typo in comment.
16
17 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
18
19         PR debug/9717
20         * class.c (build_base_field): Mark fields for base classes with
21         DECL_IGNORED_P.
22
23 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
24
25         PR c++/9457
26         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
27         CONSTRUCTOR_ELTS only once.
28
29 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
30
31         PR c++/9459
32         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
33         (dump_type_suffix): Likewise.
34
35 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
36
37         * search.c: ANSIfy function declarations and definitions.
38         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
39         * call.c (build_method_call, resolve_scoped_fn_name,
40         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
41         calls.
42         * class.c (handle_using_decl): Likewise.
43         * decl.c (make_typename_type, make_unmound_class_template,
44         start_decl, compute_array_index_type): Likewise.
45         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
46         * init.c (expand_member_init, build_member_call): Likewise.
47         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
48         resolve_typename_type): Likewise.
49         * typeck.c (lookup_destructor, finish_class_member_access_exprm
50         build_prememfunc_access_expr): Likewise.
51
52 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
53
54         * decl2.c: Include "timevar.h".
55         (namespace_ancestor): Time name lookup.
56         (add_using_namespace): Likewise.
57         (lookup_using_namespace): Likewise.
58         (qualified_lookup_using_namespace): Likewise.
59         (decl_namespace): Likewise.
60         (lookup_arg_dependent): Likewise.
61         * lex.c (do_identifier): Likewise.
62         (do_scoped_id): Likewise.
63         * pt.c (lookup_template_class): Likewise.
64
65 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
66
67         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
68         
69 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
70
71         * decl.c: Include "timevar.h".
72         (poplevel): Time name lookup.
73         (find_binding): Likewise.
74         (push_namespace): Likewise.
75         (pop_nested_namespace): Likewise.
76         (store_bindings): Likewise.
77         (maybe_push_to_top_level): Likewise.
78         (pop_from_top_level): Likewise.
79         (push_local_name): Likewise.
80         (pushtag): Likewise.
81         (pushdecl): Likewise.
82         (pushdecl_with_scope): Likewise.
83         (pushdecl_namespace_level): Likewise.
84         (pushdecl_top_level): Likewise.
85         (pushdecl_class_level): Likewise.
86         (push_class_level_binding): Likewise.
87         (push_using_decl): Likewise.
88         (push_using_directive): Likewise.
89         (push_overloaded_decl): Likewise.
90         (lookup_label): Likewise.
91         (define_label): Likewise.
92         (lookup_tag): Likewise.
93         (lookup_tag_reverse): Likewise.
94         (lookup_namespace_name): Likewise.
95         (select_decl): Likewise.
96         (unqualified_namespace_lookup): Likewise.
97         (lookup_name_real): Likewise.
98         (lookup_name_current_level): Likewise.
99         (lookup_type_current_level): Likewise.
100         (maybe_inject_for_scope_var): Likewise.
101         (xref_tag): Likewise.
102
103         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
104         
105 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
106
107         * decl.c (build_enumerator):  Remove unneeded test.
108
109 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
110
111         * cp-tree.h (struct lang_type_header): Make all fields unsigned
112         char.
113
114 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
115
116         PR c++/7129
117         * call.c (z_candidate): Add args.
118         (convert_class_to_reference): Set it.
119         (implicit_conversion): Tidy.
120         (add_candidate): Add args parameter.
121         (add_function_candidate): Adjust call to add_candidate.
122         (add_conv_candidate): Likewise.
123         (build_builtin_candidate): Likewise.
124         (build_user_type_conversion_1): Eliminate wasteful tree_cons
125         usage.
126         (build_new_function_call): Likewise.
127         (build_object_call): Likewise.
128         (add_candidates): New function.
129         (build_new_op): Use it.
130         (covert_like_real): Adjust call to build_over_call.
131         (build_over_call): Remove args parameter.
132         * operators.def: Add <?= and >?=.
133
134 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
135
136         * typeck.c (build_indirect_ref): Don't check flag_volatile.
137
138 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
139
140         PR c++/8849
141         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
142
143 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
144
145         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
146         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
147         (BINFO_LANG_ELTS): New #define.
148         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
149
150 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
151
152         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
153
154 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
155
156         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
157         for class types.
158         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
159         rather than TYPE_LANG_FLAG_0.
160         (TYPE_BUILT_IN): Remove.
161         (TYPE_DEPENDENT_P): New macro.
162         (TYPE_DEPENDENT_P_VALID): Likewise.
163         (lang_type_class): Add fields_readonly.
164         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
165         * pt.c (dependent_type_p_r): New function, split out from ...
166         (dependent_type_p): ... here.  Memoize results.
167         * search.c (dependent_base_p): Use dependent_type_p, not
168         uses_template_parms.
169         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
170         for class types.
171
172 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
173
174         * call.c (build_field_call): Use build_new_op, not build_opfncall.
175         (prep_operand): New function.
176         (build_new_op): Use it.  Remove dead code.
177         * class.c (pushclass): Change "modify" parameter type from int to
178         bool.
179         (currently_open_class): Use same_type_p, not pointer equality.
180         (push_nested_class): Adjust calls to pushclass, remove modify
181         parameter.
182         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
183         (pushclass): Change prototype.
184         (push_nested_class): Likewise.
185         (grokoptypename): Remove.
186         (build_opfncall): Remove.
187         (value_dependent_expression_p): Declare.
188         (resolve_typename_type): Likewise.
189         (resolve_typename_type_in_current_instantiation): Likewise.
190         (enter_scope_of): Remove.
191         (tsubst): Remove.
192         (tsubst_expr): Likewise.
193         (tsubst_copy): Likewise.
194         (tsubst_copy_and_build): Likewise.
195         * decl.c (warn_about_implicit_typename_lookup): Remove.
196         (finish_case_label): Return error_mark_node for erroneous labels.
197         (start_decl): Adjust calls to push_nested_class.
198         (grokfndecl): Call push_scope/pop_scope around call to
199         duplicate_decls.
200         (grokdeclarator): Do not call tsubst.
201         (start_function): Adjust calls to push_nested_class.
202         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
203         (check_classfn): Use push_scope/pop_scope around type comparisions.
204         (grokoptypename): Remove.
205         (push_sscope): Adjust call to push_nested_class.
206         * error.c (dump_type): Show cv-qualification of typename types.
207         * init.c (build_member_call): Use build_new_op, not
208         build_opfncall.
209         * method.c (build_opfncall): Remove.
210         * parser.c (cp_parser): Add allow_non_constant_expression_p and
211         non_constant_expression_p.
212         (cp_parser_constant_expression): Adjust prototype.
213         (cp_parser_resolve_typename_type): Remove.
214         (cp_parser_non_constant_expression): New function.
215         (cp_parser_non_constant_id_expression): Likewise.
216         (cp_parser_new): Set allow_non_constant_expression_p and
217         non_constant_expression_p.
218         (cp_parser_primary_expression): Reject `this' and `va_arg' in
219         constant-expressions.  Note that dependent names aren't really
220         constant.
221         (cp_parser_postfix_expression): Reject conversions to non-integral
222         types in constant-expressions.  Neither are increments or
223         decrements.
224         (cp_parser_unary_expression): Reject increments and decrements in
225         constant-expressions.
226         (cp_parser_direct_new_declarator): Adjust call to
227         cp_parser_constant_expression.
228         (cp_parser_cast_expression): Reject conversions to non-integral
229         types in constant-expressions.
230         (cp_parser_assignment_expression): Rejects assignments in
231         constant-expressions.
232         (cp_parser_expression): Reject commas in constant-expressions.
233         (cp_parser_labeled_statement): Adjust call to
234         cp_parser_constant_expression.
235         (cp_parser_direct_declarator): Simplify array bounds, even in
236         templates, when they are non-dependent.  Use
237         resolve_typename_type, not cp_parser_resolve_typename_type.
238         (cp_parser_class_head): Use resolve_typename_type, not
239         cp_parser_resolve_typename_type.
240         (cp_parser_member_declaration): Adjust call to
241         cp_parser_constant_expression.
242         (cp_parser_constant_initializer): Likewise.
243         (cp_parser_constructor_declarator): Use resolve_typename_type, not
244         cp_parser_resolve_typename_type.
245         (cp_parser_late_parsing_default_args): Adjust call to
246         push_nested_class.
247         * pt.c (tsubst): Give it internal linkage.
248         (tsubst_expr): Likewise.
249         (tsubst_copy): Likewise.
250         (tsubst_copy_and_build): Likewise.
251         (push_access_scope_real): Likewise.
252         (tsubst_friend_class): Likewise.
253         (instantiate_class_template): Adjust call to pushclass.
254         (value_dependent_expression_p): Give it external linkage.
255         Robustify.
256         (resolve_typename_type): New function.
257         * semantics.c (finish_call_expr): Use build_new_op, not
258         build_opfncall.
259         (begin_constructor_declarator): Remove.
260         (begin_class_definition): Adjust call to pushclass.
261         (enter_scope_of): Remove.
262         * typeck.c (comptypes): Resolve typename types as appropriate.
263         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
264         (build_x_compound_expr): Likewise.
265         (build_modify_expr): Likewise.
266         (build_x_modify_expr): Likewise.
267         * typeck2.c (build_x_arrow): Likewise.
268         
269 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
270
271         * pt.c (last_pending_template) Declare GTY().
272
273 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
274
275         PR c++/8591
276         * parser.c (cp_parser_elaborated_type_specifier): Convert
277         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
278         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
279
280 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
281
282         PR c++/9437
283         * pt.c (unify): Don't unify '*T' with 'U C::*'.
284
285         PR c++/3902
286         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
287         inside a declarator.
288
289 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
290
291         * class.c (update_vtable_entry_for_fn): Add index parameter.
292         Generate vcall thunk for covariant overriding from a virtual
293         primary base.
294         (dfs_modify_vtables): Adjust.
295
296 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
297
298         PR c++/9403
299         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
300         template keyword.
301         (cp_parser_base_specifier): Look for and consume a
302         TEMPLATE keyword. Replace switch with array index.
303
304         PR c++/795
305         * semantics.c (finish_non_static_data_member): Remember the
306         field's type even in a template.
307
308         PR c++/9415
309         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
310         already scoped.
311         
312         PR c++/8545
313         * parser.c (cp_parser_cast_expression): Be more tentative.
314
315 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
316
317         * cp-tree.h (flagged_type_tree_s): Remove.
318         (check_for_new_type): Likewise.
319         * typeck2.c (check_for_new_type): Likewise.
320
321 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
322
323         * dump.c: ANSIfy function declarations and definitions.
324
325         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
326
327 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
328
329         PR c++/9354
330         * init.c (build_new): Set the type of the new-expression, even
331         when processing_templte_decl.
332
333         PR c++/9216
334         * parser.c (cp_parser_primary_expression): Improve error message
335         for templates used in an expression context.
336
337         PR c++/8696
338         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
339         parse when encountering "typedef".
340
341 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
342
343         * class.c, parser.c: ANSIfy function definitions and declarations.
344
345 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
346
347         PR c++/9328
348         * error.c (dump_decl): For an OVERLOAD, just print the name of the
349         function; it doesn't make sense to try to print its type.
350         * semantics.c (finish_typeof): Issue errors about invalid uses.
351
352         PR c++/9298
353         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
354         function.
355         (cp_parser_expression_statement): Use it.
356         (cp_parser_explicit_instantiation): Likewise.
357         * pt.c (do_decl_instantiation): Improve error handling logic.
358         
359 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
360
361         PR c++/9384
362         * parser.c (cp_parser_using_declaration): Issue error messages
363         about name resolution failures here.
364
365         PR c++/9388
366         * class.c (currently_open_derived_class): Use dependent_type_p.
367         * cp-tree.h (dependent_type_p): New function.
368         (dependent_template_arg_p): Likewise.
369         (dependent_template_p): Likewise.
370         (type_dependent_expression_p): Likewise.
371         * parser.c (cp_parser_dependent_type_p): Remove.
372         (cp_parser_value_dependent_type_p): Likewise.
373         (cp_parser_type_dependent_expression_p): Likewise.
374         (cp_parser_dependent_template_arg_p): Likewise.
375         (cp_parser_dependent_template_id_p): Likewise.
376         (cp_parser_dependent_template_p): Likewise.
377         (cp_parser_diagnose_invalid_type_name): Replace
378         cp_parser_dependent_type_p with dependent_type_p, etc.
379         (cp_parser_primary_expresion): Likewise.
380         (cp_parser_nested_name_specifier_opt): Likewise.
381         (cp_parser_postfix_expression): Likewise.
382         (cp_parser_unary_expression): Likewise.
383         (cp_parser_template_name): Likewise.
384         (cp_parser_class_name): Likewise.
385         (cp_parser_lookup_name): Likewise.
386         * pt.c (dependent_type_p): New function.
387         (value_dependent_expression_p): Likewise.
388         (type_dependent_expression_p): Likewise.
389         (dependent_template_arg_p): Likewise.
390         (dependent_template_id_p): Likewise.
391         (dependent_template_p): Likewise.
392         
393         PR c++/9285
394         PR c++/9294
395         * parser.c (cp_parser_simple_declaration): Return quickly when
396         encountering errors.
397
398 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
399
400         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
401
402 2003-01-17  Jason Merrill  <jason@redhat.com>
403
404         PR c++/9167, c++/9358
405         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
406
407 2003-01-17  Jason Merrill  <jason@redhat.com>
408
409         PR c++/9342
410         * call.c (build_conditional_expr): Always do lvalue-rvalue
411         conversion.
412
413 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
414
415         PR c++/9294
416         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
417         * cp-tree.h (BASELINK_BINFO): Adjust.
418         (BASELINK_FUNCTIONS): Likewise.
419         (BASELINK_ACCESS_BINFO): Likewise.
420         (tree_baselink): New structure.
421         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
422         (lang_tree_node): Add baselink.
423         * decl.c (cp_tree_node_structure): Add BASELINK case.
424         * search.c (build_baselink): Adjust.
425         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
426         test from TREE_LIST case.
427
428         PR c++/9272
429         * parser.c (cp_parser_constructor_declarator_p): Do not assume
430         that a constructor cannot be declared outside of its own class.
431         
432         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
433         be resolved, neither can the qualified name.
434
435         * rtti.c (get_pseudo_ti_desc): Fix thinko.
436
437 2003-01-16  Jason Merrill  <jason@redhat.com>
438
439         PR c++/8564
440         * init.c (build_vec_init): Re-add maxindex parm.
441         (perform_member_init, build_aggr_init): Pass it.
442         (build_new_1): Pass it. Use an incomplete array type for full_type.
443         * typeck.c (build_modify_expr): Pass it.
444         * cp-tree.h: Adjust.
445
446 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
447
448         * cp-tree.h (tsubst_copy_and_build): New declaration.
449         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
450         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
451         (tsubst_copy_and_build): New function.
452
453 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
454
455         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
456         (PARTIAL_INSTANTIATION_P): Remove.
457         (IMPLICIT_TYPENAME_P): Likewise.
458         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
459         (build_typename_type): Remove declaration.
460         (parmlist_is_exprlist): Likewise.
461         * decl.c (build_typename_type): Make it static, remove third
462         parameter.
463         (push_class_binding): Don't do implicit typename stuff.
464         (make_typename_type): Likewise.
465         (lookup_name_real): Likewise.
466         (grokdeclarator): Don't try to convert declarations into
467         initializations.  Don't do implicit typename stuff.
468         (parmlist_is_exprlist): Remove.
469         (xref_basetypes): Simplify.
470         * decl2.c (grokfield): Don't try to convert declarations into
471         initializations.
472         (build_anon_union_vars): Do this while processing templates, too.
473         (finish_anon_union): Likewise.
474         * error.c (dump_type): Remove implicit typename handling.
475         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
476         (cp_parser_primary_expression): Correct handling of names not
477         found by unqualified name lookup in templates.
478         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
479         of types when possible.
480         (cp_parser_simple_declaration): Complain intelligently about some
481         invalid declarations.
482         (cp_parser_member_declaration): Likewise.
483         (cp_parser_constructor_declarator_p): Don't check when we're in a
484         function scope.
485         * pt.c (instantiate_class_template): Remove
486         PARTIAL_INSTANTIATION_P gunk.
487         * search.c (lookup_field_r): Don't build implicit typenames.
488         (marked_pushdecls_p): Don't enter dependent base types.
489         (unmarked_pushdecls_p): Likewise.
490         * semantics.c (begin_class_definition): Remove implicit typename
491         stuff.
492
493 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
494
495         PR c++/9212
496         * parser.c (cp_parser_direct_declarator): If accepting either
497         abstract or named, the name must be an unqualified-id.
498
499 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
500
501         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
502
503 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
504
505         * decl2.c (check_classfn): Fix uninitialized warning.
506         (build_anon_union_vars): Likewise.
507         * pt.c (tsubst_copy): Likewise.
508
509 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
510
511         Further conform g++'s __vmi_class_type_info to the C++ ABI
512         specification.
513         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
514         the specification.
515         (class_hint_flags): Likewise.
516
517 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
518
519         * config-lang.in: Add semantics.c to gtfiles.
520         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
521         (saved_scope): Likewise.
522         (type_lookups): Remove.
523         (deferred_access): New structure.
524         (type_access_control): Remove.
525         (save_type_access_control): Likewise.
526         (reset_type_access_control): Likewise.
527         (decl_type_access_control): Likewise.
528         (push_deferring_access_checks): Declare.
529         (resume_deferring_access_checks): Likewise.
530         (stop_deferring_access_checks): Likewise.
531         (pop_deferring_access_checks): Likewise.
532         (get_deferred_access_checks): Likewise.
533         (pop_to_parent_deferring_access_checks): Likewise.
534         (perform_deferred_access_checks): Likewise.
535         (perform_or_defer_access_check): Likewise.
536         * decl.c (make_typename_type): Use perform_or_defer_access_check.
537         (make_unbound_class_template): Likewise.
538         (grokdeclarator): Don't call decl_type_access_control.
539         * parser.c (cp_parser_context): Remove deferred_access_checks
540         and deferring_access_checks_p fields.
541         (cp_parser_context_new): Adjust.
542         (cp_parser): Remove access_checks_lists.
543         (cp_parser_defer_access_check): Remove.
544         (cp_parser_start_deferring_access_checks): Remove.
545         (cp_parser_stop_deferring_access_checks): Remove.
546         (cp_parser_perform_deferred_access_checks): Remove.
547         (cp_parser_nested_name_specifier_opt): Use new deferred access
548         functions.
549         (cp_parser_simple_declaration): Likewise.
550         (cp_parser_template_id): Likewise.
551         (cp_parser_function_definition): Likewise.
552         (cp_parser_class_specifier): Likewise.
553         (cp_parser_lookup_name): Likewise.
554         (cp_parser_single_declaration): Likewise.
555         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
556         (cp_parser_parse_tentatively): Likewise.
557         (cp_parser_parse_definitely): Likewise.
558         (yyparse): Likewise.
559         (cp_parser_init_declarator): Remove access_checks parameter.
560         Use new deferred access functions.
561         (cp_parser_function_definition_from_specifiers_and_declarator):
562         Likewise.
563         (cp_parser_class_head): Remove deferring_access_checks_p and
564         saved_access_checks parameters.  Use new deferred access functions.
565         (cp_parser_member_specification_opt): Don't call
566         reset_type_access_control.
567         * search.c (type_access_control): Remove.
568         * semantics.c: Include "gt-cp-semantics.h".
569         (deferred_type_access_control): Remove.
570         (deferred_access_stack): New variable.
571         (deferred_access_free_list): Likewise.
572         (push_deferring_access_checks): New function.
573         (resume_deferring_access_checks): Likewise.
574         (stop_deferring_access_checks): Likewise.
575         (pop_deferring_access_checks): Likewise.
576         (get_deferred_access_checks): Likewise.
577         (pop_to_parent_deferring_access_checks): Likewise.
578         (perform_deferred_access_checks): New function, adapted from
579         cp_parser_perform_deferred_access_checks.
580         (perform_or_defer_access_check): New function, adapted from
581         cp_parser_defer_access_check.
582         (current_type_lookups): Remove.
583         (deferred_type_access_control): Likewise.
584         (decl_type_access_control): Likewise.
585         (save_type_access_control): Likewise.
586         (reset_type_access_control): Likewise.
587         (begin_function_definition): Adjust.
588         (begin_class_definiton): Likewise.
589
590 2003-01-13  Jason Merrill  <jason@redhat.com>
591
592         PR c++/8748
593         * class.c (build_base_path): Take the address before calling save_expr.
594
595         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
596         all the ambiguous conversions are bad.
597
598         * class.c (maybe_warn_about_overly_private_class): Don't stop
599         searching when we find a nonprivate method.
600
601         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
602
603 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
604
605         * cp-tree.h (get_arglist_len_in_bytes): Remove.
606
607         PR c++/9264
608         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
609         typeame types more robustly.
610
611 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
612
613         * parser.c:  Fix comment typos.
614
615 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
616
617         PR c++/9099
618         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
619         an object_type which is not a class type.
620
621 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
622
623         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
624         (cp_parser_late_parsing_default_args): Likewise.
625
626 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
627
628         * cfns.gperf: ANSIfy function declarations.
629         * cfns.h: Regenerate.
630         * cp-tree.h: ANSIfy function declarations.
631
632 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
633
634         * cp-tree.h (reparse_absdcl_as_expr): Remove.
635         (reparse_absdcl_as_casts): Likewise.
636         (reparse_decl_as_expr): Likewise.
637         (finish_decl_parsing): Likewise.
638         * decl2.c (reparse_absdcl_as_expr): Remove.
639         (reparse_absdcl_as_casts): Likewise.
640         (repase_decl_as_expr): Likewise.
641         (finish_decl_parsing): Likewise.
642
643         PR c++/9128
644         PR c++/9153
645         PR c++/9171
646         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
647         function.
648         (cp_parser_nested_name_specifier_opt): Correct the
649         check_dependency_p false.
650         (cp_parser_postfix_expression): Fix formatting.
651         (cp_parser_decl_specifier_seq): Avoid looking for constructor
652         declarators when possible.
653         (cp_parser_template_id): Avoid performing name-lookup when
654         possible.
655         (cp_parser_class_head): Do not count specializations when counting
656         levels of templates.
657         (cp_parser_constructor_declarator_p): Return immediately if
658         there's no chance that the tokens form a constructor declarator.
659         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
660         expression with reference type.
661         (get_tinfo_decl_dynamic): Do not return an expression with
662         reference type.
663         (build_typeid): Add comment.  Do not return an expression with
664         reference type.
665         * typeck.c (build_class_member_access_expr): Improve handling of
666         conditionals and comma-expressions as objects.
667
668 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
669
670         * cfns.gperf: ANSIfy function declarations.
671         * cfns.h: Regenerate.
672         * cp-tree.h: ANSIfy function declarations.
673         * parser.c: ANSIfy function declarations & definitions.
674
675         * decl.c (bad_specifiers): Fix parameter order error I introduced.
676
677 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
678
679         Merge from pch-branch:
680
681         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
682
683         Merge to tag pch-merge-20030102:
684         
685         * semantics.c (finish_translation_unit): Don't call finish_file.
686         * parser.c: Don't include ggc.h.
687         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
688         read first token here.  Don't allow PCH files after the first
689         token is read.
690         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
691         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
692         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
693         (cp_parser_late_parsing_for_member): Don't duplicate call to
694         cp_lexer_set_source_position_from_token.
695         (cp_parser_late_parsing_default_args): Likewise.
696         (yyparse): Call finish_file after clearing the_parser.
697
698         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
699
700         * Make-lang.in: Remove $(GGC_H) from all dependencies.
701         (CXX_TREE_H): Add $(GGC_H).
702         * class.c: Don't include ggc.h. 
703         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
704         (method_name_cmp): Likewise.
705         (resort_data): New variable.
706         (resort_field_decl_cmp): New.
707         (resort_method_name_cmp): New.
708         (resort_sorted_fields): New.
709         (resort_type_method_vec): New.
710         (finish_struct_methods): Delete cast.
711         (finish_struct_1): Delete cast.
712         * cp-tree.h: Include ggc.h.
713         (struct lang_type_class): Add reorder attribute to field `methods'.
714         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
715         (resort_sorted_fields): New prototype.
716         (resort_type_method_vec): New prototype.
717         * call.c: Don't include ggc.h.
718         * decl.c: Likewise.
719         * decl2.c: Likewise.
720         * init.c: Likewise.
721         * lex.c: Likewise.
722         * method.c: Likewise.
723         * optimize.c: Likewise.
724         * parse.y: Likewise.
725         * pt.c: Likewise.
726         * repo.c: Likewise.
727         * search.c: Likewise.
728         * semantics.c: Likewise.
729         * spew.c: Likewise.
730         * tree.c: Likewise.
731
732         * lang-specs.h: Remove comment.
733
734         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
735
736         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
737         (operator_name_info): Mark to be saved for PCH, specify size.
738         (assignment_operator_name_info): Likewise.
739
740         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
741
742         * decl.c (anon_cnt): Mark to be saved for PCH.
743
744         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
745
746         * lex.c  (init_reswords): Delete now-untrue comment.
747         Allocate ridpointers using GGC.
748
749         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
750
751         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
752
753         * g++spec.c (lang_specific_driver): Don't include standard
754         libraries in `added'.
755
756         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
757
758         * decl2.c (finish_file): Call c_common_write_pch.
759         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
760
761         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
762
763         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
764         files when using g++.
765         * lang-specs.h: Handle compiling C++ header files.
766
767 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
768
769         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
770
771 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
772
773         * pt.c (push_access_scope_real): Call push_to_top_level for
774         function in namespace scope.
775         (pop_access_scope): Call pop_from_top_level for function in
776         namespace scope.
777
778 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
779
780         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
781
782 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
783
784         * Make-lang.in (c++.install-common, c++.install-man,
785         c++.uninstall): Prepend $(DESTDIR) to destination paths in
786         all (un)installation commands.
787         (c++.install-common): Rewrite $(LN) commands to support
788         DESTDIR with "ln" as well as with "ln -s".
789
790 2003-01-08  Jason Merrill  <jason@redhat.com>
791
792         * parser.c (cp_parser_primary_expression): See through explicitly
793         scoped ALIAS_DECLs, too.
794
795 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
796
797         * decl.c: Remove some #if 0 code.
798
799         * decl.c: ANSIfy function declarations.
800
801 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
802
803         * parser.c (cp_parser_asm_definition): Correct handling of omitted
804         operands.
805
806 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
807
808         PR c++/9030
809         * decl.c (make_typename_type): Check access only when tf_error.
810         (make_unbound_class_template): Likewise.
811         * pt.c (saved_access_scope): New variable.
812         (push_access_scope_real): New function.
813         (push_access_scope): Likewise.
814         (pop_access_scope): Likewise.
815         (tsubst_default_argument): Use them.
816         (instantiate_template): Likewise.
817         (regenerate_decl_from_template): Likewise.
818         (instantiate_decl): Likewise.
819         (get_mostly_instantiated_function_type): Likewise.
820
821 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
822
823         * tree.c: Delete bogus #if 0 code.
824
825 2003-01-07  Andreas Schwab  <schwab@suse.de>
826
827         * class.c (layout_class_type): Don't use
828         PCC_BITFIELD_TYPE_MATTERS if not defined.
829
830 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
831
832         PR c++/9165
833         * decl2.c (build_cleanup): Mark the object as used.
834
835         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
836         (hash_local_specialization): New function.
837         (register_local_specialization): Revert 2003-01-05 change.
838         (instantiate_decl): Use hash_local_specialization when creating
839         the local_specializations table.
840         
841         * decl2.c (mark_used): Do not synthesize thunks.
842
843         * class.c (layout_class_type): Correct handling of unnamed
844         bitfields wider than their types.
845
846         PR c++/9189
847         * parser.c (cp_parser): Remove default_arg_types.  Update
848         documentation for unparsed_functions_queues.
849         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
850         parameter.
851         (cp_parser_new): Don't set parser->default_arg_types.
852         (cp_parser_function_definition): Adjust usage of
853         unparsed_funtions_queues.
854         (cp_parser_class_specifier): Don't mess with
855         parser->default_arg_types.  Handle default argument processing in
856         a separate phase from function body processing.
857         (cp_parser_template_declaration_after_export): Adjust usage of
858         unparsed_functions_queues.
859         (cp_parser_late_parsing_for_member): Do not handle default
860         arguments.
861
862 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
863
864         PR c++/9109
865         * parser.c (cp_parser_declarator_kind): New enum.
866         (cp_parser_declarator): Adjust.
867         (cp_parser_direct_declarator): Adjust. Allow for either named or
868         abstract declarator. Prefer abstract, if possible. Allow
869         parenthesized function name.
870         (cp_parser_condition): Adjust cp_parser_declarator call.
871         (cp_parser_explicit_instantiation): Likewise.
872         (cp_parser_init_declarator): Likewise.
873         (cp_parser_type_id): Likewise.
874         (cp_parser_function_definition): Likewise.
875         (cp_parser_member_declaration): Likewise.
876         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
877         the tentative parsing.
878         (cp_parser_exception_declaration): Likewise.
879
880 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
881
882         * parser.c (cp_parser_template_parameter): Adjust call to
883         cp_parser_parameter_declaration.
884         (cp_parser_parameter_declaration_list): Likewise.
885         (cp_parser_parameter_declaration): Replace
886         greater_than_is_operator_p with template_parm_p parameter.  Do not
887         cache tokens for template default arguments.
888
889         * pt.c (retrieve_local_specialization): Use htab_find, not
890         htab_find_with_hash.
891         (register_local_specialization): Use htab_find_slot, not
892         htab_find_slot_with_hash.
893         (instantiate_decl): Pass a hash function to htab_create.
894         
895 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
896
897         * parser.c (cp_parser_binary_expression,
898         cp_parser_multiplicative_expression,
899         cp_parser_additive_expression, cp_parser_shift_expression,
900         cp_parser_relational_expression, cp_parser_equality_expression,
901         cp_parser_and_expression, cp_parser_exclusive_or_expression,
902         cp_parser_inclusive_or_expression,
903         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
904         cp_parser_binary_expression): Const-ify.
905
906 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
907
908         * method.c (use_thunk): Disable access control while building the
909         body of the thunk.
910
911 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
912
913         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C 
914         front end.
915
916 2003-01-03  Matt Austern  <austern@apple.com>
917
918         * cp-tree.h (struct lang_type_class): add field for key method
919         (cp_global_trees): rename dynamic_classes to keyed_classes
920         (key_method): add definition
921         * class.c (finish_struct_1): compute class's key method, and add
922         the class to keyed_classes list if there is no key method.
923         * decl.c (finish_function): add class to keyed_classes list if we
924         see a definition of the class's key method.
925         * pt.c (instantiate_class_template): add template specialization
926         of a dynamic class to keyed_classes list.
927         * decl2.c (key_method): remove
928         (finish_file): iterate only through keyed_classes list when
929         deciding whether to emit vtables, remove class from its list after
930         we do the emission.
931         
932 2003-01-02  Jason Merrill  <jason@redhat.com>
933
934         * call.c (build_conditional_expr): Stabilize lvalues properly.
935         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
936         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
937         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
938
939         * call.c (convert_like_real): Call decl_constant_value for an
940         IDENTITY_CONV even if there are no more conversions.
941
942         * cvt.c (build_up_reference): Don't push unnamed temps.
943
944         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
945
946         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
947         for a backend struct.
948
949         * except.c (wrap_cleanups_r, build_throw): Make
950         MUST_NOT_THROW_EXPRs void.
951         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
952
953         * init.c (build_vec_delete_1): Pre-evaluate the base address.
954
955         * init.c (get_temp_regvar): Simplify logic.
956
957         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
958         our replacement is a decl.
959
960         * decl.c (cp_make_fname_decl): Push the decls inside the
961         outermost scope.
962
963 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
964
965         PR c++/45, c++/3784
966         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
967         the same too.
968
969 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
970
971         * parser.c (struct cp_parser): Add access_checks_lists field
972         (cp_parser_simple_declaration): Use.
973         (cp_parser_init_declarator): Likewise. 
974
975 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
976
977         * parser.c (cp_parser_declaration): Accept the __extension__
978         keyword before the declaration.
979
980         PR c++/2843
981         * parser.c (cp_parser_parameter_declaration): Allow attributes to
982         appear after the declarator.
983
984         * call.c (build_new_method_call): Fix typo in message format
985         string.
986
987 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
988
989         * parser.c (cp_lexer_next_token_is): Declare it inline.
990         (cp_lexer_set_source_position_from_token): Likewise.
991         (cp_lexer_debugging_p): Likewise.
992         (cp_parser_parsing_tentatively): Likewise.
993         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
994         to the cp_lexer_peek_token.
995
996         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
997         expression.
998
999 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
1000
1001         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
1002         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
1003         cp/repo.c: Fix copyright years.
1004
1005 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
1006
1007         * lex.c: Remove superfluous include of cpplib.h.
1008         (CONSTRAINT): Define without conditions.
1009         (init_cp_pragma): Use c_register_pragma.
1010
1011 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
1012
1013         * .cvsignore: Remove.
1014
1015 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
1016
1017         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
1018           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
1019           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
1020           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
1021           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
1022           copyright header.
1023         * lex.h: parse.y is dead, so don't mention it.  Also replace the
1024           copyright header with the default GNU copyright header.
1025
1026 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1027
1028         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
1029         (lookup_name_namespace_only): Likewise.
1030         (begin_only_namespace_names): Likewise.
1031         (end_only_namespace_names): Likewise.
1032         * decl.c (only_namespace_names): Remove.
1033         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
1034         (lookup_name_real): Do not check only_namespace_names.
1035         (lookup_name_namespace_only): Remove.
1036         (begin_only_namespace_names): Likewise.
1037         (end_only_namespace_names): Likewise.
1038         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
1039         nested-name-specifiers more gracefully.
1040         (cp_parser_class_or_namespace_name): Avoid looking up namespace
1041         names when they cannot possibly appear.
1042         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
1043         (cp_parser_elaborated_type_specifier): Likewise.
1044         (cp_parser_namespace_name): Only look for namespace names.
1045         (cp_parser_lookup_name): Add is_namespace parameter.
1046         (cp_parser_lookup_name_simple): Adjust call to
1047         cp_parser_lookup_name.
1048
1049         * parser.c (cp_parser_dependent_type_p): Fix thinko.
1050
1051 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
1052
1053         * .cvsignore: Update.
1054
1055 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
1056
1057         * class.c (modify_vtable_entry): Remove unused variable.
1058         (get_vcall_index): Always expect a non-thunk.
1059         (update_vtable_entry_for_fn): Combine covariant adjustments, when
1060         overriding a thunk. Pass get_vcall_index a non-thunk.
1061
1062         * decl2.c (finish_file): Mark undefined inlines as extern.
1063
1064 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1065
1066         * cp-tree.def (RETURN_INIT): Remove.
1067         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
1068         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
1069         (note_level_for_for): Remove.
1070         (note_level_for_try): Likewise.
1071         (note_level_for_catch): Likewise.
1072         (finish_named_return_value): Likewise.
1073         (do_pushlevel): Change prototype.
1074         (pending_lang_change): Remove.
1075         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
1076         sk_for.
1077         (note_level_for_for): Remove.
1078         (note_level_for_try): Likewise.
1079         (note_level_for_catch): Likewise.
1080         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
1081         * parser.c (cp_parser_context_free_list): Make it "deletable".
1082         (cp_parser_template_argument): Remove misleading comment.
1083         * pt.c (tsubst_expr): Remove RETURN_INIT code.
1084         * semantics.c (genrtl_named_return_value): Remove.
1085         (do_pushlevel): Take a scope kind as an argument.
1086         (begin_if_stmt): Adjust.
1087         (begin_while_stmt): Likewise.
1088         (begin_for_stmt): Likewise.
1089         (finish_for_init_stmt): Likewise.
1090         (begin_switch_stmt): Likewise.
1091         (begin_handler): Likewise.
1092         (begin_compound_stmt): Likewise.
1093         (finish_named_return_value): Remove.
1094         (cp_expand_stmt): Remove RETURN_INIT case.
1095         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
1096
1097 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1098
1099         PR c++/9112
1100         * parser.c (cp_parser_direct_declarator): Handle erroneous
1101         parenthesized declarators correctly.
1102
1103 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1104
1105         * cp-tree.h (pending_lang_change): Declare.
1106
1107 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
1108
1109         * parser.c (cp_parser_context_free_list): New variable.
1110         (cp_parser_context_new): Use it.
1111         (cp_parser_error): Check return code from
1112         cp_parser_simulate_error.
1113         (cp_parser_simulate_error): Return a value.
1114         (cp_parser_id_expression): Optimize common case.
1115         (cp_parser_class_name): Likewise.
1116         (cp_parser_class_specifier): Adjust call to
1117         cp_parser_late_parsing_default_args.
1118         (cp_parser_lookup_name): Optimize common case.
1119         (cp_parser_late_parsing_for_member): Adjust call to
1120         cp_parser_late_parsing_default_args.
1121         (cp_parser_late_parsing_default_args): Add scope parameter.
1122         (cp_parser_require): Avoid creating the error message unless it's
1123         needed.
1124         (cp_parser_parse_definitely): Place free'd contexts on the free
1125         list.
1126
1127         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
1128
1129 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
1130
1131         * parser.c (cp_parser_parameter_declaration_clause): Treat system
1132         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
1133
1134 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
1135
1136         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
1137         GCC, not GNU CC.
1138
1139 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
1140
1141         * parse.y: Remove.
1142         * spew.c: Likewise.
1143         * Make-lang.in (gt-cp-spew.h): Remove.
1144         * cp-tree.h (do_pending_lang_change): Remove.
1145         (do_identifier): Change prototype.
1146         (finish_id_expr): Remove.
1147         * decl.c (lookup_name_real): Remove yylex variable.
1148         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
1149         * lex.c (init_cpp_parse): Remove.
1150         (reduce_cmp): Likewise.
1151         (token_cmp): Likewise.
1152         (yychar): Likewise.
1153         (lastiddecl): Likewise.
1154         (token_count): Likewise.
1155         (reduce_count): Likewise.
1156         (yyhook): Likewise.
1157         (print_parse_statistics): Likewise.
1158         (do_pending_lang_change): Likewise.
1159         (do_identifier): Remove parsing parameter.
1160         * lex.h (lastiddecl): Remove.
1161         (looking_for_typename): Remove.
1162         (looking_for_template): Likewise.
1163         (pending_lang_change): Likewise.
1164         (yylex): Likewise.
1165         * semantics.c (finish_id_expr): Remove.
1166
1167         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
1168         thread" correctly.
1169
1170 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
1171
1172         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
1173         end, not the C front end.
1174
1175 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
1176
1177         * cp-tree.h (THUNK_TARGET): New macro.
1178         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
1179         (finish_thunk): Remove offset parms.
1180         * class.c (find_final_overrider): Look through thunks.
1181         (get_vcall_index): Use THUNK_TARGET.
1182         (update_vtable_entry_for_fn): Look through thunks. Set covariant
1183         fixed offset here. Adjust finish_thunk call.
1184         (build_vtbl_initializer): Adjust finish_thunk calls.
1185         * mangle.c (mangle_call_offset): Remove superfluous if.
1186         (mangle_thunk): Adjust.
1187         * method.c (make_thunk): Adjust.
1188         (finish_thunk): Adjust.
1189         (thunk_adjust): Remove assert.
1190         (use_thunk): Use THUNK_TARGET
1191         * dump1.c (cp_dump_tree): Adjust thunk dumping.
1192
1193         PR c++/9054
1194         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
1195         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
1196
1197 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1198
1199         Remove traditional C constructs 4/n.
1200         * decl2.c (grok_method_quals, warn_if_unknown_interface,
1201         grok_x_components, cp_build_parm_decl, build_artificial_parm,
1202         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
1203         delete_sanity, check_member_template, check_java_method,
1204         check_classfn, finish_static_data_member_decl, grokfield,
1205         grokbitfield, grokoptypename, grok_function_init,
1206         cplus_decl_attributes, constructor_name, defer_fn,
1207         build_anon_union_vars, finish_anon_union, coerce_new_type,
1208         coerce_delete_type, comdat_linkage, maybe_make_one_only,
1209         key_method, import_export_vtable, import_export_class,
1210         output_vtable_inherit, import_export_decl, import_export_tinfo,
1211         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
1212         set_guard, start_objects, finish_objects,
1213         start_static_storage_duration_function,
1214         finish_static_storage_duration_function, get_priority_info,
1215         start_static_initialization_or_destruction,
1216         finish_static_initialization_or_destruction,
1217         do_static_initialization, do_static_destruction,
1218         prune_vars_needing_no_initialization, write_out_vars,
1219         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
1220         add_using_namespace, merge_functions, ambiguous_decl,
1221         lookup_using_namespace, lookup_using_namespace,
1222         qualified_lookup_using_namespace, set_decl_namespace,
1223         decl_namespace, current_decl_namespace, push_decl_namespace,
1224         pop_decl_namespace, push_scope, pop_scope, add_function,
1225         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
1226         lookup_arg_dependent, do_namespace_alias,
1227         validate_nonmember_using_decl, do_nonmember_using_decl,
1228         do_toplevel_using_decl, do_local_using_decl,
1229         do_class_using_decl, do_using_directive, check_default_args,
1230         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
1231         * parser.c (cp_parser_class_head): Use booleanss.
1232         * decl.c (walk_globals, walk_vtables): Likewise.
1233         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
1234         walk_globals): Change return type from 'int' to 'bool'.
1235         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
1236         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
1237         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
1238         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
1239         qualifier_flags, tinfo_base_init, generic_initializer,
1240         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
1241         dfs_class_hint_unmark, class_hint_flags, class_initializer,
1242         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
1243         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
1244         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
1245         * repo.c (repo_compile_flags, repo_template_declared,
1246         repo_template_defined, repo_class_defined, repo_get_id,
1247         repo_template_used, repo_vtable_used, repo_inline_used,
1248         repo_tinfo_used, repo_template_instantiated, extract_string,
1249         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
1250         finish_repo): Likewise.
1251         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
1252         cxx_print_xnode): Likewise..
1253         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
1254         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
1255         * cxxfilt.c (demangle_it, print_demangler_list, usage,
1256         standard_symbol_characters, hp_symbol_characters, main, fatal):
1257         Likewise.
1258         (strip_underscore):  Change type from 'int' to 'bool'.
1259         (main): Use boolean constants.
1260
1261 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1262
1263         Remove traditional C constructs 3/n.
1264         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1265         build_up_reference, warn_ref_binding, convert_to_reference,
1266         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
1267         convert_to_void, convert, convert_force, build_type_conversion,
1268         build_expr_type_conversion, type_promotes_to,
1269         perform_qualification_conversions): Use C90 prototyping style.
1270         * decl2.c (grok_array_decl): Use boolean constant.
1271         (delete_sanity): Likewise.
1272         * typeck.c (build_unary_op): Likewise.
1273         * semantics.c (finish_switch_cond): Likewise.
1274         * parser.c (cp_parser_direct_new_declarator): Likewise.
1275         * init.c (build_new): Likewise.
1276
1277 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
1278
1279         * Make-lang.in (po-generated): Remove parse.c.
1280         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
1281         ($(srcdir)/cp/parse.h): Remove target.
1282         ($(srcdir)/cp/parse.c): Likewise.
1283         (gt-cp-parse.h): Likewise.
1284         (gt-cp-parser.h): New target.
1285         (c++.distclean): Do not remove parse.output.
1286         (c++.maintainer-clean): Do not remove parse.c or parse.h.
1287         (cp/spew.o): Remove target.
1288         (cp/lex.o): Adjust dependencies.
1289         (cp/pt.o): Likewise.
1290         (cp/parse.o): Likewise.
1291         (cp/TAGS): Do not mention parse.c.
1292         (cp/parser.o): New target.
1293         * NEWS: Mention the new parser.
1294         * call.c (build_scoped_method_call): Simplify.
1295         (build_method_call): Likewise.
1296         (build_new_function_call): Adjust calls to add_function_candidate
1297         and add_template_candidate.
1298         (build_new_op): Improve handling of erroroneous operands.
1299         (convert_default_arg): Remove circular argument processing.
1300         (name_as_c_string): New function.
1301         (build_new_method_call): Use it.
1302         (perform_implicit_conversion): Use error_operand_p.
1303         * class.c (finish_struct_anon): Use constructor_name_p.
1304         (check_field_decls): Likewise.
1305         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
1306         (resolve_address_of_overloaded_function): Likewise.
1307         (instantiate_type): Tweak pointer-to-member handling.
1308         (get_primary_binfo): Remove incorrect assertion.
1309         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
1310         * cp-tree.h (DEFARG_TOKENS): New macro.
1311         (default_arg): New structure.
1312         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
1313         (lang_tree_node): Add default_arg.
1314         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
1315         (type_info_ref_type): New macro.
1316         (saved_scope): Make processing_explicit_instantiation a boolean.
1317         (check_access): New field.
1318         (unparsed_text): Remove.
1319         (language_function): Remove unparsed_inlines.
1320         (error_operand_p): New macro.
1321         (lang_decl): Adjust pending_inline_info.
1322         (DEFARG_POINTER): Remove.
1323         (tag_types): Add typenames.
1324         (lookup_ualified_name): Declare.
1325         (lookup_name_real): Likewise.
1326         (shadow_tag): Adjust prototype.
1327         (get_scope_of_declarator): Declare it.
1328         (process_next_inline): Remove it.
1329         (check_for_missing_semicolon): Likewise.
1330         (maybe_get_template_decl_from_type_decl): Declare it.
1331         (finish_label_stmt): Adjust prototype.
1332         (finish_non_static_data_meber): Declare it.
1333         (finish_pseudo_destructor_call_expr): Rename to ...
1334         (finish_pseudo_destructor_expr): ... this.
1335         (finish_compound_literal): Declare it.
1336         (begin_inline_definitions): Remove it.
1337         (init_spew): Remove.
1338         (peekyylex): Likewise.
1339         (arbitrate_lookup): Likewise.
1340         (frob_opname): Likewise.
1341         (maybe_snarf_defarg): Likewise.
1342         (add_defarg_fn): Likewise.
1343         (do_pending_defargs): Likewise.
1344         (done_pending_defargs): Likewise.
1345         (unprocessed_defarg_fn): Likewise.
1346         (replace_defarg): Likewise.
1347         (end_input): Likewise.
1348         (get_overloaded_fn): Likewise.
1349         * cvt.c (convert_to_reference): Improve error handling.
1350         * decl.c (lookup_name_real): Do not declare it static.
1351         (maybe_push_to_top_level): Set check_access.
1352         (identifier_type_value): Adjust call to lookup_name_real.
1353         (lookup_qualified_name): New method.
1354         (lookup_name_real): Remove special-case parsing code.
1355         (lookup_name-nonclass): Adjust call to lookup_name_real.
1356         (lookup_name_namespace_only): Likewise.
1357         (lookup_name): Likewise.
1358         (check_tag_decl): Return the type declared.
1359         (shadow_tag): Likewise.
1360         (register_dtor_fn): Tweak check_access.
1361         (grokfndecl): Use constructor_name_p.
1362         (get_scope_of_declarator): New function.
1363         (grokdeclarator): Obscure tweaks for slightly different declarator
1364         representations.
1365         (start_method): Return error_mark_node to indicate failure.
1366         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
1367         * decl2.c (constructor_name_full): Simplify.
1368         (constructor_name): Use it.
1369         (build_expr_from_tree): Adjust for changes to do new parser.
1370         (push_scope): Improve robustness.
1371         (validate_nonmember_using_decl): Process declarations, not names.
1372         (do_class_using_decl): Likewise.
1373         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
1374         here.
1375         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
1376         * expr.c (cxx_expand_expr): Handle BASELINKs.
1377         * init.c (member_init_ok_or_else): Issue more errors.
1378         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
1379         * lex.c: Do not include parse.h.
1380         (yypring): Do not declare.
1381         (yylval): Likewise.
1382         (make_reference_declarator): Remove error-generating code.
1383         (rid_to_yy): Remove.
1384         (cxx_init): Do not call init_spew.
1385         (yypring): Remove.
1386         (check_for_missing_semicolon): Remove.
1387         * lex.h (got_scope): Remove.
1388         (got_object): Remove.
1389         * method.c (hack_identifier): Use finish_non_static_data_member.
1390         (implicitly_declare_fn): Adjust use of constructor_name.
1391         * parser.c: New file.
1392         * pt.c (parse.h): Do not include it.
1393         (maybe_get_template_decl_from_template): Do not declare it.
1394         (finish_member_template_decl): Tweak.
1395         (begin_explicit_instantiation): Adjust for
1396         processing_explicit_instantiation being boolean.
1397         (end_explicit_instantiation): Likewise.
1398         (maybe_process_partial_specialization): Tighten specialization
1399         test.
1400         (retrieve_local_specialization): Adjust ue of hash table.
1401         (eq_local_specializations): New function.
1402         (register_local_specialization): Likewise.
1403         (push_template_decl_real): Remove unnecessary test.
1404         (maybe_get_template_decl_from_type_decl): Don't make it static.
1405         (for_each_template_parm_r): Handle TYPEOF_TYPE.
1406         (tsubst_copy): Use retrieive_local_specialization to handle
1407         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
1408         Handle COMPONENT_REFs with pseudo-destructor-expressions.
1409         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
1410         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
1411         (unify): Tweak handling of CONST_DECLs.
1412         (regenerate_decl_from_template): Use push_nested_class.
1413         (template_for_substitution): New funciton.
1414         (instantiate_decl): Use it.  Register parameters as local
1415         specializations.
1416         * rtti.c (init_rtti_processing): Set type_info_ref_type.
1417         (build_typeid): Use it.
1418         (get_typeid): Likeise.
1419         * search.c (accessible_p): Use check_access, not
1420         flag_access_control.
1421         (adjust_result_of_qualified_name_lookup): Pay attention to the
1422         context_class.
1423         * semantics.c (finish_asm_stmt): Adjust error handling.
1424         (finish_label_stmt): Return the statement.
1425         (finish_non_static_data_member): New function.
1426         (finish_class_expr): Handle BASELINKs.
1427         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
1428         (finish_object_call_expr): Simplify handling during templates.
1429         (finish_pseudo_destructor_call_expr): Rename to ...
1430         (finish_pseudo_dtor_expr): ... this.
1431         (finish_compound_literal): New function.
1432         (begin_inline_definitions): Remove.
1433         (finish_sizeof): Remove special template handling.
1434         * spew.c: Do not include parse.h.
1435         * tree.c (get_overloaded_fn): Remove.
1436         * typeck.c (build_class_member_access_expr): Handle
1437         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
1438         (lookup_destructor): New function.
1439         (finish_class_member_access_expr): Use it.
1440         (convert_arguments): Simplify.
1441         (build_unary_op): Handle BASELINKs.
1442
1443 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
1444
1445         PR c++/4803
1446         * decl2.c (mark_used): Defer inline functions.
1447         (finish_file): Merge deferred_fns loops. Check all used
1448         inline functions have a definition.
1449         * method.c (make_thunk): Thunks are not inline.
1450
1451         PR c++/5116, c++/764
1452         * call.c (build_new_op): Make sure template class operands are
1453         instantiated.
1454
1455 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
1456
1457         PR C++/7964
1458         * cp-tree.h (resolve_scoped_fn_name): Prototype.
1459         * call.c (resolve_scoped_fn_name): New function. Deal with
1460         more template expansion. Broken out of ...
1461         * parse.y (parse_finish_call_expr): ... here. Call it.
1462         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
1463         resolve_scoped_fn_name and build_call_from_tree.
1464
1465         PR c++/9053
1466         * decl.c (duplicate_decls): Templates may be disambiguated by
1467         return type.
1468
1469         PR c++/8702
1470         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
1471         conversion operators on failure.
1472
1473 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1474
1475         Remove traditional C constructs 2/n.
1476         * call.c (tourney, build_field_call, equal_functions, joust,
1477         compare_ics, build_over_call, build_java_interface_fn_ref,
1478         convert_like_real, op_error, build_object_call, resolve_args,
1479         build_vfield_ref, check_dtor_name, build_scoped_method_call,
1480         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
1481         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
1482         standard_conversion, reference_related_p,
1483         reference_compatible_p, convert_class_to_reference,
1484         direct_reference_binding, reference_binding,
1485         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
1486         add_template_conv_candidate, any_viable, any_strictly_viable,
1487         build_this, splice_viable, print_z_candidates,
1488         build_user_type_conversion, build_new_function_call,
1489         conditional_conversion, build_conditional_expr, build_new_op,
1490         build_op_delete_call, enforce_access, call_builtin_trap,
1491         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
1492         convert_default_arg, type_passed_as, convert_for_arg_passing,
1493         in_charge_arg_for_name, is_properly_derived_from,
1494         maybe_handle_implicit_object, maybe_handle_ref_bind,
1495         source_type, add_warning, can_convert, can_convert_arg,
1496         perform_implicit_conversion, can_convert_arg_bad,
1497         initialize_reference, add_conv_candidate,
1498         add_template_candidate_real, add_template_candidate): Ansify.
1499
1500 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
1501
1502         PR c++/8572
1503         * cp-tree.h (grokoptypename): Add SCOPE parameter.
1504         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
1505         if in a template scope.
1506         * parse.y (unoperator): Return the scope.
1507         (operator_name): Adjust grokoptypename call.
1508
1509 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1510
1511         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
1512         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
1513         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
1514
1515 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
1516
1517         * ChangeLog: Fix a typo.
1518         * class.c: Fix comment typos.
1519         * cp-tree.h: Likewise.
1520
1521 2002-12-18  Jason Merrill  <jason@redhat.com>
1522
1523         Handle anonymous unions at the tree level.
1524         C++ ABI change: Mangle anonymous unions using the name of their
1525         first named field (by depth-first search).  Should not cause
1526         binary compatibility problems, though, as the compiler previously
1527         didn't emit anything for affected unions.
1528         * cp-tree.def (ALIAS_DECL): New tree code.
1529         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
1530         first field, not the largest.
1531         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
1532         push the decl, and write it out at namespace scope.
1533         * decl.c (lookup_name_real): See through an ALIAS_DECL.
1534         (pushdecl): Add namespace bindings for ALIAS_DECLs.
1535         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
1536         of a decl which doesn't have one.
1537         * typeck.c (build_class_member_access_expr): Don't recurse if
1538         we already have the type we want.
1539
1540 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1541
1542         PR c++/8099
1543         * friend.c (make_friend_class): Allow partial specialization
1544         when declaration is not a template friend.
1545
1546 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1547
1548         PR c++/3663
1549         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
1550         TREE_PROTECTED to created decl nodes.
1551
1552 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
1553
1554         * class.c (build_base_field): Do not set DECL_PACKED on the
1555         FIELD_DECL.
1556
1557 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1558
1559         * cp-tree.h (struct tree_srcloc): Use location_t.
1560         (SOURCE_LOCUS): New.
1561         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
1562
1563 2002-12-17  Jason Merrill  <jason@redhat.com>
1564
1565         * decl.c (finish_function): Also complain about no return in
1566         templates.
1567         * semantics.c (finish_return_stmt): Also call check_return_expr in
1568         templates.
1569         * typeck.c (check_return_expr): In a template, just remember that we
1570         saw a return.
1571
1572 2002-12-16  Jason Merrill  <jason@redhat.com>
1573
1574         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
1575         of the CALL_EXPR.
1576
1577         * semantics.c (do_pushlevel): Call pushlevel after adding the
1578         SCOPE_STMT.
1579         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
1580         * parse.y (function_body): Go back to using compstmt.
1581         * decl.c (pushdecl): Skip another level to get to the parms level.
1582
1583         * call.c (build_new_method_call): Use is_dummy_object to determine
1584         whether or not to evaluate the object parameter to a static member
1585         function.
1586
1587 2002-12-14  Jason Merrill  <jason@redhat.com>
1588
1589         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
1590         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
1591         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
1592         don't bother with an AGGR_INIT_EXPR.
1593         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
1594         just generate a new decl normally.  Take return slot parm.
1595         * cp-tree.h: Adjust prototype.
1596
1597 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1598
1599         PR C++/8031
1600         * cvt.c (convert_to_pointer_force): Don't try comparing against
1601         erronous type.
1602
1603 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
1604
1605         * cp-tree.h: Have the multiple-include guards around
1606         the entire file.
1607
1608 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
1609
1610         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
1611         for SPEW_DEBUG.
1612         (snarf_method): Same.
1613         (snarf_defarg): Same.
1614
1615 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
1616
1617         PR c++/8372
1618         * pt.c (tsubst_copy): Handle destructor names more correctly.
1619
1620 2002-12-10  Matt Austern   <austern@apple.com>
1621
1622         * cp-tree.h: get rid of needs_virtual_reinit bit.
1623
1624 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
1625
1626         * NEWS: Document removal of in-class initialization extension for
1627         static data members of non-arithmetic, non-enumeration type.
1628         * decl.c (check_static_variable_definition): Do not allow that
1629         extension.
1630         * decl2.c (grokfield): Do not call digest_init when processing
1631         templates.
1632
1633 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1634
1635         * error.c (dump_expr): Fix format specifier warning.
1636
1637 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
1638
1639         * class.c (finish_struct_1): Correct comment.
1640         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
1641
1642 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1643
1644         PR C++/8799
1645         * error.c (dump_expr): Don't ever try to dump a non-existent
1646         expression.
1647
1648 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
1649
1650         Implement covariant returns.
1651         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
1652         (struct lang_decl_flags): Add this_thunk_p flag.
1653         Rename vcall_offset to virtual_offset.
1654         (struct lang_decl): Rename delta to fixed_offset.
1655         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
1656         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
1657         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
1658         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
1659         (make_thunk): Add this_adjusting arg.
1660         (finish_thunk): Declare.
1661         (mangle_thunk): Add this_adjusting arg.
1662         * class.c (get_vcall_index): Use base function for lookup.
1663         (update_vtable_entry_for_fn): Generate covariant thunk.
1664         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
1665         (build_vtbl_initializer): Use base function for lookup.
1666         Finish covariant thunk here. Adjust thunk generation.
1667         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
1668         Adjust thunk dumping.
1669         * mangle.c (mangle_call_offset): New function.
1670         (mangle_thunk): Adjust for covariant thunks.
1671         * method.c (make_thunk): Adjust. Do not set name here.
1672         (finish_thunk): New function. Set name here.
1673         (use_thunk): Generate covariant thunks too.
1674         (thunk_adjust): New function.
1675         * search.c (covariant_return_p): Remove. Fold into ...
1676         (check_final_overrider): ... here. Simplify.
1677         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
1678
1679 2002-12-03  Jason Merrill  <jason@redhat.com>
1680
1681         PR c++/8674
1682         * call.c (build_over_call): Check specifically for TARGET_EXPR
1683         when eliding.
1684
1685         PR c++/8461, c++/8625
1686         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
1687         (cp_convert_parm_for_inlining): Remove.
1688         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
1689         Remove.
1690         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
1691         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
1692
1693         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
1694         an ambiguous conversion.
1695
1696 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
1697
1698         PR c++/8688
1699         * decl.c (reshape_init): Handle erroneous initializers.
1700
1701 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
1702
1703         PR c++/8720
1704         * spew.c (remove_last_token): Make sure that last_chunk is set
1705         correctly.
1706
1707         PR c++/8615
1708         * error.c (dump_expr): Handle character constants with
1709         TREE_OVERFLOW set.
1710
1711 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1712
1713         DR 180
1714         * decl.c (grokdeclarator): Require class-key for all friend class.
1715         Output the correct type and context in the error message.
1716
1717 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
1718
1719         PR c++/5919
1720         * pt.c (unify): Use variably_modified_type_p to test validity of
1721         template argument types.
1722
1723         PR c++/8727
1724         * cp-tree.h (lang_type_class): Add typeinfo_var.
1725         (CLASSTYPE_TYPEINFO_VAR): New macro.
1726         * rtti.c (get_tinfo_decl): Use it.
1727
1728         PR c++/8663
1729         * init.c (expand_member_init): Always get the main variant of a
1730         base class.
1731
1732 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
1733
1734         PR c++/8332
1735         PR c++/8493
1736         * decl.c (cxx_init_decl_processing): Use size_type_node, not
1737         c_size_type_node.
1738         * decl2.c (coerce_new_type): Likewise.
1739         * except.c (do_allocate_exception): Likewise.
1740
1741 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
1742
1743         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
1744         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
1745         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
1746         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
1747         typeck2.c: Include coretypes.h and tm.h.
1748         * Make-lang.in: Update dependencies.
1749
1750 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
1751
1752         PR c++/8227
1753         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
1754         (check_initializer): Validate the type of the initialized
1755         variable, even if the initializer is absent.
1756         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
1757
1758         PR c++/8214
1759         * typeck.c (convert_for_assignment): Do not use
1760         decl_constant_value on the operand.
1761
1762         PR c++/8511
1763         * pt.c (instantiate_decl): Handle template friends defined outside
1764         of the class correctly.
1765
1766 2002-11-29  Joe Buck <jbuck@synopsys.com>
1767
1768         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
1769         anonymous structs.
1770
1771 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
1772
1773         * class.c (walk_subobject_offsets): Recur on binfos as well as on
1774         types.
1775         (layout_nonempty_base_or_field): Pass it a binfo when processing a
1776         base class.
1777         (layout_empty_base): Likewise.
1778         (build_base_field): Likewise.
1779
1780 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
1781
1782         * class.c (build_base_field): Make sure we get the canonical base
1783         when descending through primary bases.
1784
1785 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
1786
1787         * decl.c (check_initializer): Don't error on initialisation of
1788         a scalar with a brace-enclosed expression.
1789
1790 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
1791
1792         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
1793         (template_parms_equal): Remove prototype.
1794         * typeck.c (buuld_indirect_ref): Reformat.
1795
1796 2002-11-25  Jason Merrill  <jason@redhat.com>
1797
1798         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
1799         and a DO_STMT.
1800
1801 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
1802
1803         * tree.c (cp_build_qualified_type_real): Correct handling of
1804         array types.
1805         * class.c (walk_subobject_offsets): Fix thinko.
1806         (build_base_field): Record offsets of empty bases in primary
1807         virtual bases.
1808         (layout_class_type): Record offsets of empty bases in fields.
1809
1810         * search.c (is_subobject_of_p_1): Fix thinko.
1811         (lookup_field_queue_p): Likewise.
1812
1813 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
1814
1815         * class.c (layout_class_type): Reuse tail padding when laying out
1816         virtual bases.
1817
1818 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
1819
1820         * rtti.c (qualifier_flags): Fix thinko.
1821
1822 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1823
1824         Remove traditional C constructs 1/n.
1825         * cp-tree.h (init_method, set_mangled_name_for_decl,
1826         build_opfncall, hack_identifier, make_thunk, use_thunk,
1827         synthesize_method, implicitly_declare_fn,
1828         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
1829         maybe_clone_body): Remove use of PARAMS.
1830
1831         * method.c (do_build_assign_ref, do_build_copy_constructor,
1832         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
1833         Likewise.
1834         (synthesize_method): Use 'bool' type and constants instead of
1835         'int'.
1836         (locate_copy): Likewise.
1837         (implicitly_declare_fn): Likewise.
1838
1839         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
1840         Remove old-style declaration.
1841         (maybe_clone_body): Use 'bool' type and constants.
1842
1843 2002-11-21  Glen Nakamura  <glen@imodulo.com>
1844
1845         PR c++/8342
1846         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
1847         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
1848         of the branches of a COND_EXPR.
1849
1850 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
1851
1852         * pt.c (for_each_template_parm): Free allocated memory.
1853         * search.c (is_subobject_of_p_1): New function.
1854         (is_subobject_of_p): Avoid walking virtual bases multiple times.
1855
1856 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
1857
1858         * g++spec.c (lang_specific_spec_functions): New.
1859
1860 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
1861
1862         * ChangeLog: Follow spelling conventions.
1863         * class.c: Likewise.
1864         * decl2.c: Likewise.
1865
1866 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
1867
1868         * search.c (dfs_push_decls): Do not try to reorder elements
1869         3..n of method_vec if method_vec has only two elements.
1870         Reverse order of two tests to avoid accessing unallocated
1871         memory.
1872
1873 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
1874
1875         * class.c (dfs_find_final_overrider): Adjust so that the most
1876         derived object is a binfo, rather than a class type.
1877         (find_final_overrider): Likewise.
1878         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
1879         (add_vcall_offset): Likewise.
1880
1881 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1882
1883         PR c++/8389
1884         * pt.c (instantiate_template): Push class scope for member
1885         functions.
1886         (get_mostly_instantiated_function_type): Likewise.  Don't call
1887         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
1888         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
1889         * mangle.c (write_encoding, write_unqualified_name): Adjust.
1890
1891 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
1892
1893         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
1894         vcall offfsets.  Split out ...
1895         (add_vcall_offset): ... new function.
1896
1897         PR c++/8338
1898         * pt.c (for_each_template_parm): Add htab parameter.
1899         (process_partial_specialization): Adjust call.
1900         (push_template_decl_real): Likewise.
1901         (pair_fn_data): Add visited.
1902         (for_each_template_parm_r): Avoid walking duplicates more than
1903         once.
1904         (uses_template_parms): Adjust call to for_each_template_parm.
1905
1906 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
1907
1908         * class.c (add_implicitly_declared_members): Put implicitly
1909         declared functions at the end of TYPE_METHODs when -fabi-version
1910         is at least 2.
1911
1912 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
1913
1914         * decl2.c (finish_file): Correct spelling.
1915
1916 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
1917
1918         * call.c (build_special_member_call): Do not try to lookup VTTs by
1919         name.
1920         * class.c (vtbl_init_data): Add generate_vcall_entries.
1921         (get_vtable_decl): Do not look up virtual tables by name.
1922         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
1923         (set_primary_base): Do not set CLASSTYPE_RTTI.
1924         (determine_primary_base): Likewise.
1925         (get_matching_virtual): Remove.
1926         (get_vcall_index): New function.
1927         (update_vtable_entry_for_fn): Do not try to use virtual thunks
1928         when they are not required.  Assign vcall indices at this point.
1929         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
1930         Do update dynamic_classes.
1931         (build_vtt): Do not add VTTs to the symbol table.
1932         (build_ctor_vtbl_group): Likewise.
1933         (build_vtbl_initializer): Simplify handling of vcall indices.
1934         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
1935         for the most derived class.
1936         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
1937         the vtable.
1938         * cp-tree.h (dynamic_classes): New macro.
1939         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
1940         (CLASSTYPE_RTTI): Remove.
1941         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
1942         (CLASSTYPE_VCALL_INDICES): New macro.
1943         (CLASSTYPE_VTABLES): Likewise.
1944         (BV_USE_VCALL_INDEX_P): Remove.
1945         (build_vtable_path): Remove.
1946         * decl2.c (finish_vtable_vardecl): Remove.
1947         (key_method): Remove #if 0'd code.
1948         (finish_vtable_vardecl): Rename to ...
1949         (maybe_emit_vtables): ... this.
1950         (finish_file): Use it.
1951         * search.c (look_for_overrides_here): Update comment.
1952
1953 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
1954
1955         PR c/7353 redux
1956         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
1957
1958 2002-10-30  Jason Merrill  <jason@redhat.com>
1959
1960         PR c++/8186
1961         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
1962         * call.c (convert_for_arg_passing): Set it.
1963         * except.c (stabilize_throw_expr): Recurse for such an arg.
1964
1965 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
1966
1967         * cp-tree.h (lang_decl_flags): Remove init_priority.
1968         (lang_decl): Add delta.
1969         (GLOBAL_INIT_PRIORITY): Remove.
1970         (THUNK_DELTA): Revise definition.
1971         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
1972         * dump.c (cp_dump_tree): Don't dump it.
1973
1974 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
1975
1976         PR c++/8160
1977         * typeck2.c (process_init_constructor): Call complete_array_type.
1978
1979         PR c++/8149
1980         * decl.c (make_typename_type): Issue errors about invalid results.
1981
1982 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1983
1984         Core issue 287, PR c++/7639
1985         * cp-tree.h (lang_type_class): Add decl_list field.
1986         (CLASSTYPE_DECL_LIST): New macro.
1987         (maybe_add_class_template_decl_list): Add declaration.
1988         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
1989         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
1990         (maybe_add_class_template_decl_list): New function.
1991         (add_implicitly_declared_members): Use it.
1992         * decl.c (maybe_process_template_type_declaration): Likewise.
1993         (pushtag): Likewise.
1994         * friend.c (add_friend): Likewise.
1995         (make_friend_class): Likewise.
1996         * semantics.c (finish_member_declaration): Likewise.
1997         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
1998         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
1999         to process members and friends in the order of declaration.
2000
2001 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
2002
2003         PR c++/8287
2004         * decl.c (finish_destructor_body): Create the label to jump to
2005         when returning from a destructor here.
2006         (finish_function_body): Rather than here.
2007
2008 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
2009
2010         PR c++/7266
2011         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
2012         SCOPE_REF is not null before dereferencing it.
2013
2014 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
2015
2016         * call.c (build_over_call): Use DECL_CONTEXT, not
2017         DECL_VIRTUAL_CONTEXT.
2018         * class.c (modify_vtable_entry): Don't mess with
2019         DECL_VIRTUAL_CONTEXT.
2020         (set_vindex): Remove.
2021         (set_primary_base): Remove vfuns_p parameter.
2022         (determine_primary_base): Likewise.
2023         (modify_all_vtables): Likewise.
2024         (layout_class_type): Likewise.  Adjust calls to other functions
2025         accordingly.
2026         (finish_struct_1): Adjust calls to modified functions.  Set
2027         DECL_VINDEX here.
2028         * cp-tree.h (lang_type_class): Remove vsize.
2029         (CLASSTYPE_VSIZE): Remove.
2030         (lang_decl): Remove thunks.
2031         (DECL_THUNKS): Adjust.
2032         (DECL_VIRTUAL_CONTEXT): Remove.
2033         (duplicate_decls): Don't copy it.
2034         * pt.c (build_template_decl): Don't set it.
2035         (tsubst_decl): Likewise.
2036         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
2037
2038         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
2039         (build_vtable_entry): Remove.
2040         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
2041         (lang_decl): Add thunks.
2042         (DECL_THUNKS): New macro.
2043         * decl.c (duplicate_decls): Copy it.
2044         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
2045         * semantics.c (emit_associated_thunks): Simplify.
2046
2047 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
2048
2049         PR c++/7228
2050         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
2051         lang_type structure exists before accessing field.
2052         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
2053         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
2054         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
2055         * class.c (check_field_decls): Use new macros.
2056         * typeck2.c (process_init_constructor): Remove redundant check for
2057         existence of lang_type structure.
2058
2059 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
2060
2061         * class.c (end_of_base): New method.
2062         (end_of_class): Use it.  Check indirect virtual bases.
2063
2064         * class.c (check_field_decls): Fix typo.
2065
2066 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
2067
2068         PR c++/8067
2069         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
2070         related variables.
2071
2072         PR c++/7679
2073         * spew.c (next_token): Do not return an endless stream of
2074         END_OF_SAVED_INPUT tokens.
2075         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
2076         the cached token stream.
2077         (snarf_defarg): Likewise.
2078
2079 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
2080
2081         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
2082         variably_modified_type_p.
2083         * cp-tree.h: Remove prototype of variably_modified_type_p.
2084         * tree.c (variably_modified_type_p): Remove; now implemented
2085         in language-independent code.
2086
2087 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
2088
2089         PR c++/6579
2090         * spew.c (snarf_parenthesized_expression): New function.
2091         (snarf_block): Use it.
2092
2093 2002-10-22  Richard Henderson  <rth@redhat.com>
2094
2095         * method.c (use_thunk): Always compute vcall_value; assert that
2096         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
2097         for vcall thunks as well.
2098
2099 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
2100
2101         * class.c (empty_base_at_nonzero_offset_p): New function.
2102         (layout_nonempty_base_or_field): Do not check for conflicts when
2103         laying out a virtual base using the GCC 3.2 ABI.
2104         (build_base_field): Correct checking for presence of empty classes
2105         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
2106
2107         * class.c (include_empty_classes): Use normalize_rli.
2108         (layout_class_type): Likewise.
2109
2110         * decl.c (reshape_init): Tweak handling of character arrays.
2111
2112         PR c++/8218
2113         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
2114         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
2115         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
2116         (check_field_decls): Likewise.
2117         (layout_class_type): Likewise.
2118         (finish_struct_1): Initialize it.
2119         (walk_subobject_offsets): Use it to prune searches.
2120
2121 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
2122
2123         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
2124         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
2125         TARGET_ASM_OUTPUT_MI_THUNK in comments.
2126
2127 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
2128
2129         * decl.c (start_decl): Point users of the old initialized-
2130         typedef extension at __typeof__.
2131
2132 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2133
2134         * Make-lang.in (method.o): Depend on TARGET_H.
2135         * method.c (target.h): Include it.
2136         (use_thunk): Use target hooks.  Use vcall thunks, if available.
2137
2138 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2139
2140         * class.c (base_derived_from): Make sure return value is a bool.
2141
2142 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2143
2144         * class.c (find_final_overrider_data_s): Remove overriding_fn and
2145         overriding_base.
2146         (dfs_base_derived_from): New function.
2147         (base_derived_from): Likewise.
2148         (dfs_find_final_overrider): Use base_derived_from.
2149         (find_final_overrider): Adjust.
2150
2151 2002-10-18  Jason Merrill  <jason@redhat.com>
2152
2153         PR c++/8080
2154         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
2155         with condition decls in a template.
2156
2157 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
2158
2159         * class.c (add_method): Compare template parms too.
2160
2161 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
2162
2163         PR c++/7584
2164         * class.c (handle_using_decl): Allow the declaration used to be
2165         from an ambiguous base.
2166
2167         * pt.c (convert_template_argument): Revert this change:
2168                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2169                 * pt.c (convert_template_argument): Do not fold non-type
2170                 template rguments when inside a template.
2171
2172         * init.c (expand_default_init): Handle brace-enclosed initializers
2173         correctly.
2174
2175 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2176
2177         * mangle.c (write_expression): Correct handling of enumeration
2178         constants.
2179         (write_template_arg): Likewise.
2180         * pt.c (convert_template_argument): Do not fold non-type template
2181         arguments when inside a template.
2182
2183         PR c++/7478
2184         * cvt.c (convert_to_reference): Allow references as the incoming
2185         type.
2186
2187 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2188
2189         PR c++/7524
2190         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
2191         build_qualified_type.
2192
2193 2002-10-15  Richard Henderson  <rth@redhat.com>
2194
2195         * error.c (dump_expr): Use real_to_decimal directly, and with
2196         the new arguments.
2197
2198 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
2199
2200         * decl.c (reshape_init): Fix typo.
2201
2202         * cp-tree.h (operator_name_info_t): Add arity.
2203         * lex.c (init_operators): Initialize it.
2204         * mangle.c (write_conversion_operator_name): New function.
2205         (write_unqualified_name): Use it.
2206         (write_template_args): Accept template arguments as a TREE_LIST.
2207         (write_expression): Adjust handling of qualified names to match
2208         specification.
2209
2210 2002-10-15  Jason Merrill  <jason@redhat.com>
2211
2212         * call.c (call_builtin_trap): New fn.
2213         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
2214         (build_call): Don't set current_function_returns_abnormally outside
2215         a function.
2216
2217 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
2218
2219         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
2220         clear CLASSTYPE_EMPTY_P.
2221         (build_base_field): Likewise.
2222         (build_base_fields): Likewise.
2223         (check_bases_and_members): Likewise.
2224         (create_vtbl_ptr): Likewise.
2225         (layout_class_type): Likewise.  Ensure that empty classes have
2226         size zero when used as base classes in the 3.2 ABI.
2227         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
2228         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
2229         parameter.
2230         (is_empty_class): Correct definition when using post-3.2 ABI.
2231         * cp-tree.h (lang_type_class): Add empty_p.
2232         (CLASSTYPE_EMPTY_P): New macro.
2233
2234 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2235
2236         * init.c (build_delete): Do not apply save_expr for arrays.
2237         (build_vec_delete): Likewise.
2238
2239 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
2240
2241         * decl.c (layout_var_decl): Call layout_decl even for variables
2242         whose type is an array with unspecified bounds.
2243
2244         PR c++/7176
2245         * lex.c (do_identifier): Add another option for the parsing
2246         parameter.
2247         * parse.y (do_id): Use it.
2248
2249 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2250
2251         PRs C++/6803, C++/7721 and C++/7803
2252         * decl.c (grokdeclarator): Gracefully handle template-name as
2253         decl-specifier.
2254
2255 2002-10-11  Jason Molenda  <jmolenda@apple.com>
2256
2257         * init.c (build_field_list): Provide uses_unions_p with a default
2258         value.
2259
2260 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
2261
2262         PR c++/5661
2263         * cp-tree.h (variably_modified_type_p): New function.
2264         (grokdeclarator) Tighten check for variably modified types as
2265         fields.
2266         * pt.c (convert_template_argument): Do not allow variably modified
2267         types as template arguments.
2268         * tree.c (variably_modified_type_p): New function.
2269
2270         * NEWS: Document removal of "new X = ..." extension.
2271         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
2272         brace-enclosed initializers.
2273         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
2274         (initialize_local_var): Remove declaration.
2275         (expand_static_init): Likewise.
2276         * decl.c (next_initializable_field): New function.
2277         (reshape_init): Likewise.
2278         (check_initializer): Use them.  Build dynamic initializer for
2279         aggregates here too.
2280         (initialize_local_var): Simplify, and incorporate cleanup
2281         insertion code as well.
2282         (destroy_local_var): Remove.
2283         (cp_finish_decl): Tidy.
2284         (expand_static_init): Fold checks for whether or not a variable
2285         needs initialization into this function.  Simplify.
2286         * decl2.c (do_static_initialization): Simplify.
2287         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
2288         be done for us automatically.
2289         (expand_default_init): Handle brace-enclosed initializers
2290         correctly.
2291         (expand_aggr_init_1): Remove RTL-generation code.
2292         (build_vec_init): Remove "new X = ..." support.
2293         * parse.y (new_initializer): Likewise.
2294         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
2295         brace-enclosed initializer.
2296         (create_pseudo_type_info): Likewise.
2297         * typeck2.c (store_init_value): Don't try to handle digest_init
2298         being called more than once.
2299         (digest_init): Tidy handling of brace-enclosed initializers.
2300
2301 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2302
2303         * decl.c (typename_hash): Use htab_hash_pointer.
2304
2305 2002-10-10  Jim Wilson  <wilson@redhat.com>
2306
2307         * decl.c (duplicate_decls): Don't call decl_attributes.
2308
2309 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
2310
2311         PR c/7353
2312         * decl.c (start_decl): Unconditionally issue error for
2313         'typedef foo = bar'.
2314         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
2315         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
2316
2317 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2318
2319         * decl2.c (prune_vtable_vardecl): Delete unused function.
2320
2321 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2322
2323         PR c++/7754
2324         * decl2.c (finish_anon_union): Do not expand anonymous unions when
2325         procesing template functions.
2326         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2327         type. Call layout_decl.
2328         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2329
2330 2002-10-07  Richard Henderson  <rth@redhat.com>
2331
2332         * decl2.c, pt.c: Revert c++/7754 fix.
2333
2334 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2335
2336         PR c++/7804
2337         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
2338
2339 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2340
2341         PR c++/7931
2342         * pt.c (for_each_template_parm_r): Handle BASELINKs.
2343
2344         PR c++/7754
2345         * decl2.c (finish_anon_union): Do not expand anonymous unions when
2346         procesing template functions.
2347         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2348         type. Call layout_decl.
2349         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2350
2351 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2352
2353         PR c++/8006
2354         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
2355         template parameters.
2356         (globals): Add entity and need_abi_warning.
2357         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
2358         CLASSTYPE_TEMPLATE_INFO.
2359         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
2360         TYPE_TI_TEMPLATE.
2361         (write_prefix): Handle typename types correctly.
2362         (write_template_prefix): Handle template template parameters
2363         correctly.
2364         (start_mangling): Add entity parameter.
2365         (finish_mangling): Warn about names whose mangling will change.
2366         (mangle_decl_string): Adjust.
2367         (mangle_type_string): Likewise.
2368         (mangle_special_for_type): Likewise.
2369         (mangle_ctor_vtbl_for_type): Likewise.
2370         (mangle_thunk): Likewise.
2371         (mangle_guard_variable): Likewise.
2372         (mangle_ref_init_variable): Likewise.
2373
2374 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
2375
2376         PR c++/7188.
2377         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
2378         * cp-tree.h (emit_base_init): Rename to ....
2379         (emit_mem_initializers): ... this.
2380         (expand_member_init): Change prototype.
2381         * init.c (perform_member_init): Compute explicit, rather than
2382         requiring it as a parameter.
2383         (sort_member_init): Rename to ...
2384         (sort_mem_initializers): ... this.  Process bases and data members
2385         together.
2386         (sort_base_init): Remove.
2387         (emit_base_init): Rename to ...
2388         (emit_mem_initializers): ... this.
2389         (expand_aggr_vbase_init_1): Remove.
2390         (construct_virtual_bases): Rename to ...
2391         (construct_virtual_base): ... this.
2392         (expand_member_init): Rework handling of base initializers.
2393         * method.c (do_build_copy_constructor): Use
2394         finish_mem_initializers.
2395         * parse.y (member_init): Adjust calls to expand_member_init.
2396         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
2397         (tsubst_initializer_list): Use expand_member_init.
2398         * semantics.c (finish_mem_intiailizers): Simplify.
2399
2400 2002-10-02  Matt Austern  <austern@apple.com>
2401         * decl.c (walk_vtables_r): Fixed typo that caused result to
2402         never get a nonzero value.
2403
2404 2002-10-02  Roger Sayle  <roger@eyesopen.com>
2405
2406         PR optimization/6627
2407         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
2408         from here, and move it to tree.h.
2409         * decl.c (cxx_init_decl_processing): If storing the vbit
2410         in function pointers, ensure that force_align_functions_log
2411         is atleast one.
2412
2413 2002-10-02  Matt Austern  <austern@apple.com>
2414
2415         * class.c (check_field_decls): Changed warning about const member
2416         variables so that it doesn't get issued for a class aggregate.
2417
2418 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
2419
2420         * decl.c (cp_finish_decl): Make sure array types are laid out,
2421         even if the array bounds are unknown.
2422
2423 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
2424
2425         * class.c (build_vtbl_initializer): Change build_c_cast
2426         to build1.
2427
2428 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
2429
2430         * decl.c (cp_finish_decl): Make sure array types are laid out,
2431         even if the array bounds are unknown.
2432
2433         * decl.c (cp_finish_decl): Correct check for dynamic
2434         initialization of thread-local storage.
2435
2436 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
2437
2438         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
2439         overloaded.
2440
2441 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
2442
2443         * class.c (build_vtbl_initializer): Add cast.
2444         (add_vcall_offset_vtbl_entries_1):
2445         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
2446
2447 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
2448
2449         * class.c (walk_subobject_offsets): Correct the calculation of
2450         offsets for virtual bases.  Correct the counting of array
2451         elements.
2452         (layout_nonempty_base_or_field): Simplify.  Correct the
2453         calculation of offsets to be propagated through the binfo
2454         hierarchy.
2455         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
2456         Add the FIELD_DECL to TYPE_FIELDS.
2457         (build_base_fields): Adjust accordingly.
2458         (layout_virtual_bases): Use build_base_field.
2459         (end_of_class): Return a tree, not an integer.
2460         (warn_about_ambiguous_direct_bases): Rename to ...
2461         (warn_about_ambiguous_bases): ... this.
2462         (include_empty_classes): New function.
2463         (layout_class_type): Create an alternative version of the type to
2464         be used when as a base class type.  Do not call
2465         finish_record_layout until we are done laying out the class.
2466         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
2467         as_base.
2468         (CLASSTYPE_SIZE): Reimplement.
2469         (CLASSTYPE_SIZE_UNIT): Likewise.
2470         (CLASSTYPE_ALIGN): Likweise.
2471         (CLASSTYPE_USER_ALIGN): Likewise.
2472         (CLASSTYPE_AS_BASE): New macro.
2473         (DECL_INITIALIZED_P): Likewise.
2474         (extract_init): Remove prototype.
2475         (build_forced_zero_init): Rename to ...
2476         (build_zero_init): ... this.
2477         (force_store_init_value): Remove.
2478         * decl.c (obscure_complex_init): Remove.
2479         (duplicate_decls): Copy DECL_INITIALIZED_P.
2480         (check_initializer): Do not leave junk in DECL_INITIAL.
2481         (cp_finish_decl): Handle zero-initialization of entities with
2482         static storage duration.
2483         * expr.c (extract_init): Remove.
2484         * init.c (build_forced_zero_init): Remove.
2485         (build_zero_init): New function.
2486         (build_default_init): Use it.
2487         (build_field_list): Skip FIELD_DECLs for base subobjects.
2488         (push_base_cleanups): Likewise.
2489         * method.c (do_build_assign_ref): Likewise.
2490         (synthesize_exception_spec): Likewise.
2491         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
2492         (regenerate_decl_from_template): To not set DECL_INITIAL for a
2493         static data member whose initialization took place in its class.
2494         (instantiate_decl): Do not pass an initializer to cp_finish_decl
2495         in that situation.
2496         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
2497         (dfs_unuse_fields): Likewise.
2498         * tree.c (pod_type_p): Handle error_mark_node.
2499         (zero_init_p): Likewise.
2500         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
2501         subobjects.
2502         * typeck2.c (store_init_value): Remove #if 0'd code.
2503         (force_store_init_value): Remove.
2504         (process_init_constructor): Use build_zero_init.
2505
2506 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
2507
2508         PR c++/7788
2509         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
2510
2511 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
2512
2513         * cp-tree.h: Fix comment typos.
2514         * decl.c: Likewise.
2515         * pt.c: Likewise.
2516
2517 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
2518
2519         * cp/class.c (contains_empty_class_p): New method.
2520         (walk_subobject_offsets): Correct computation of field offset.
2521         (layout_empty_base): Correct placement of emtpy base classes.
2522         (layout_class_type): Warn about ABI changes.
2523
2524 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
2525
2526         * cp/class.c (layout_virtual_bases): Do not round the size of the
2527         type to a multiple of the alignment before laying out virtual bases.
2528         (layout_class_type): Correct handling of bit-fields that are wider
2529         than their type inside unions.  Round the size of the type to a
2530         even number of bytes when computing the size without virtual
2531         bases.
2532         * cp/cp-tree.h (abi_version_at_least): New macro.
2533
2534 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
2535
2536         * ChangeLog: Follow spelling conventions.
2537         * ChangeLog.2: Likewise.
2538         * call.c: Likewise.
2539         * class.c: Likewise.
2540         * cp-tree.h: Likewise.
2541         * cvt.c: Likewise.
2542         * decl.c: Likewise.
2543         * decl2.c: Likewise.
2544         * except.c: Likewise.
2545         * friend.c: Likewise.
2546         * g++spec.c: Likewise.
2547         * init.c: Likewise.
2548         * lex.c: Likewise.
2549         * mangle.c: Likewise.
2550         * method.c: Likewise.
2551         * operators.def: Likewise.
2552         * optimize.c: Likewise.
2553         * pt.c: Likewise.
2554         * rtti.c: Likewise.
2555         * search.c: Likewise.
2556         * semantics.c: Likewise.
2557         * spew.c: Likewise.
2558         * tree.c: Likewise.
2559         * typeck.c: Likewise.
2560
2561 2002-09-18  Devang Patel  <dpatel@apple.com>
2562
2563         * cp/cp-tree.h: New prototype for walk_vtabls().
2564         * cp/decl.c (walk_vtables_r): New function.
2565         (struct cp_binding_level): Add new members, namespaces,
2566         names_size and vtables.
2567         (add_decl_to_level): Add decl in namespaces or vtables
2568         chain, if conditions match.
2569         (walk_vtables): New function.
2570         (walk_namespaces_r): Travers separate namespace chain
2571         for namespace decls.
2572         (wrapup_globals_for_namespace): Use names_size instead
2573         of list_length().
2574         * cp/decl2.c (finish_file): Use walk_vtables() instead of
2575         walk_globals() to walk vtable decls.
2576
2577 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
2578
2579         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
2580         ICE with invalid pointers & references.
2581
2582 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
2583
2584         * Make-lang.in: Remove all references to the demangler.
2585         * cxxfilt.c: Moved to binutils.
2586
2587 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2588
2589         PR c++/7718
2590         * pt.c (tsubst_decl): Remove assert.
2591
2592         Remove DR 295 implementation.
2593         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
2594         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
2595         about ignoring volatile qualifiers.
2596
2597         * search.c (lookup_member): Correct documentation.
2598
2599 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
2600
2601         * cp-tree.h (union lang_tree_node): Add chain_next option.
2602
2603 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2604
2605         * parse.y (parse_finish_call_expr): Check lookup_member result.
2606
2607         PR c++/7015
2608         * semantic.c (finish_asm_stmt): Fix operand/output_operands
2609         thinko.
2610         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
2611
2612 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
2613
2614         PR c++/7919
2615         * call.c (build_over_call): Convert this pointer for fns found by
2616         using decls.
2617
2618 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
2619
2620         * ChangeLog: Follow spelling conventions.
2621         * ChangeLog.1: Likewise.
2622
2623 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
2624
2625         PR c++/7768
2626         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
2627
2628 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
2629
2630         * error.c: Fix comment formatting.
2631         * except.c: Likewise.
2632         * expr.c: Likewise.
2633         * friend.c: Likewise.
2634         * g++spec.c: Likewise.
2635         * init.c: Likewise.
2636         * lex.c: Likewise.
2637         * mangle.c: Likewise.
2638         * method.c: Likewise.
2639         * optimize.c: Likewise.
2640         * pt.c: Likewise.
2641         * rtti.c: Likewise.
2642         * search.c: Likewise.
2643         * semantics.c: Likewise.
2644         * spew.c: Likewise.
2645         * tree.c: Likewise.
2646         * typeck.c: Likewise.
2647         * typeck2.c: Likewise.
2648
2649 2002-09-13  Matt Austern  <austern@apple.com>
2650
2651         PR C++/7828
2652         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
2653         * cp/call.c: Change call-by-const-reference mechanism to use
2654         non_cast_lvalue_p when deciding whether the create a temporary.
2655         We need a temporary when passing, e.g. (long) x by const ref.
2656
2657 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
2658
2659         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
2660
2661 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
2662
2663         * decl.c: Fix comment formatting.
2664         * decl2.c: Likewise.
2665
2666 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
2667
2668         * call.c: Fix comment formatting.
2669         * class.c: Likewise.
2670         * cp-lang.c: Likewise.
2671         * cp-tree.h: Likewise.
2672         * cvt.c: Likewise.
2673
2674 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
2675
2676         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
2677         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
2678         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
2679         minor adjustments (use version_string, eliminate yet another
2680         duplicate of xmalloc)
2681
2682 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2683
2684         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
2685
2686 2002-09-05  Jason Merrill  <jason@redhat.com>
2687
2688         * typeck2.c (add_exception_specifier): Only pedwarn for an
2689         incomplete type.
2690         (require_complete_eh_spec_types): New fn.
2691         (cxx_incomplete_type_diagnostic): Also support pedwarning.
2692         * typeck.c (complete_type_or_diagnostic): Likewise.
2693         * call.c (build_call): Call require_complete_eh_spec_types.
2694         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
2695         on an incomplete type.
2696
2697 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
2698
2699         * decl.c (start_cleanup_fn): Clear interface_only before
2700         start_function, restore it afterwards.
2701
2702 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
2703
2704         * cp-tree.h (finish_builtin_type): Remove.
2705         * decl2.c (finish_builtin_type): Move to common code.
2706         * decl.c (build_ptrmemfunc_type): Adjust.
2707         * rtti.c (create_pseudo_type_info): Adjust.
2708         (create_tinfo_types): Adjust.
2709
2710 2002-08-31  Jason Merrill  <jason@redhat.com>
2711
2712         * cp-lang.c (cp_expr_size): Allow initialization from a
2713         CONSTRUCTOR.
2714
2715 2002-08-30  Richard Henderson  <rth@redhat.com>
2716
2717         PR opt/7515
2718         * tree.c: Include target.h.
2719         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
2720         don't bind locally.
2721         * Makefile.in (tree.o): Update.
2722
2723 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
2724
2725         * class.c (layout_virtual_bases): Warn about bugs in G++ that
2726         result in incorrect object layouts.
2727         (layout_class_type): Likewise.
2728
2729 2002-08-24  Matt Austern  <austern@apple.com>
2730
2731         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
2732         are allowable.
2733         (real_lvalue_p): Update caller.
2734         (lvalue_p): Ditto.
2735         (non_cast_lvalue_or_else): New.
2736         * tree.h: Declare it.
2737         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
2738
2739 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
2740
2741         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
2742         and COND_EXPR specially; fix error message output.
2743
2744 2002-08-22  Jason Merrill  <jason@redhat.com>
2745
2746         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
2747         * semantics.c (nullify_returns_r): Likewise.
2748
2749 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2750
2751         Fix PR/7621
2752         * typeck.c (finish_class_member_access_expr): Diagnose cases where
2753         name lookup finds nothing.
2754
2755 2002-08-15  Jason Merrill  <jason@redhat.com>
2756
2757         * semantics.c (finish_then_clause): Remove redundant assignment.
2758         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
2759         extra binding level outside the if/switch statement.
2760         (finish_while_cond, finish_for_cond): Rewrite complex condition
2761         into the loop body.
2762
2763 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
2764
2765         * parse.y (sizeof, alignof, typeof): New non-terminals to
2766         increment skip_evaluation.  Replace terminals with them and
2767         decrement skip_evaluation at the end of rules using them.
2768         * decl2.c (mark_used): Don't assemble_external if
2769         skipping evaluation.
2770
2771 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
2772
2773         Fix PR/7504
2774         * parse.y (parse_finish_call_expr): Handle incomplete
2775         type used to name a scope.
2776
2777 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
2778
2779         PR c++/7598
2780         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
2781         regression caused by my 2002-08-08 patch.
2782
2783 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
2784
2785         * decl.c (pushdecl_class_level): Honor requests to bind names to
2786         OVERLOADs.
2787
2788 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2789
2790         * decl2.c (build_call_from_tree): Fix uninitialized variable.
2791         * parse.y (parse_finish_call_expr): Likewise.
2792         * repo.c (old_args, old_dir, old_main): Const-ify.
2793
2794 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
2795
2796         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
2797         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
2798         * optimize.c (maybe_clone_body): Likewise.
2799         * pt.c (tsubst_enum): Likewise.
2800         (lookup_template_class): Likewise.
2801         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
2802
2803 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
2804
2805         * lang-specs.h: Remove -ansi.
2806
2807 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
2808
2809         * tree.c (maybe_dummy_object): Replace // with /* */
2810
2811 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
2812
2813         * call.c (standard_conversion): Use build_ptrmem_type.
2814         * cp-tree.h (build_ptrmem_type): New function.
2815         (adjust_result_of_qualified_name_lookup): Likewise.
2816         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
2817         static data members.
2818         (build_ptrmem_type): New function.
2819         (grokdeclarator): Do not use build_offset_type when encountering a
2820         qualified name.
2821         * parse.y (parse_finish_call_expr): Use
2822         adjust_result_of_qualified_name_lookup.
2823         * search.c (adjust_result_of_qualified_name_lookup): New function.
2824         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
2825         accessing OFFSET_TYPEs directly.
2826
2827 2002-08-08  Mike Stump  <mrs@apple.com>
2828
2829         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
2830         (type_decays_to): Likewise.
2831         * class.c (find_final_overrider): Likewise.
2832         (maybe_note_name_used_in_class): Likewise.
2833         * decl.c (current_tmpl_spec_kind): Likewise.
2834         (add_binding): Likewise.
2835         (push_class_binding): Likewise.
2836         (duplicate_decls): Likewise.
2837         (layout_var_decl): Likewise.
2838         (grokfndecl): Likewise.
2839         (grokdeclarator): Likewise.
2840         (check_default_argument): Likewise.
2841         * decl2.c (handle_class_head): Likewise.
2842         * error.c (dump_template_decl): Likewise.
2843         * init.c (build_offset_ref): Likewise.
2844         * pt.c (check_specialization_scope): Likewise.
2845         (determine_specialization): Likewise.
2846         (check_explicit_specialization): Likewise.
2847         (maybe_check_template_type): Likewise.
2848         (process_partial_specialization): Likewise.
2849         (check_default_tmpl_args): Likewise.
2850         (push_template_decl_real): Likewise.
2851         (convert_template_argument): Likewise.
2852         (try_class_unification): Likewise.
2853         (get_bindings_real): Likewise.
2854         (do_decl_instantiation): Likewise.
2855         * semantics.c (begin_function_definition): Likewise.
2856         (finish_member_declaration): Likewise.
2857         (check_multiple_declarators): Likewise.
2858         * typeck.c (comp_array_types): Likewise.
2859         (comptypes): Likewise.
2860         (expr_sizeof): Likewise.
2861         (build_binary_op): Likewise.
2862         (dubious_conversion_warnings): Likewise.
2863         (check_return_expr): Likewise.
2864
2865 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
2866
2867         * typeck.c (build_class_member_access_expr): Do not return
2868         error_mark_node when no error has occurred.
2869
2870 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2871
2872         * typeck.c (build_component_addr): Remove.
2873         (build_unary_op): Just check it's not a bitfield, and then build
2874         an ADDR_EXPR.
2875
2876 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2877
2878         * class.c (convert_to_base): Correct check for error_mark_node.
2879         (create_vtable_ptr): Remove unused VFUNS_P parm.
2880
2881 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2882
2883         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
2884
2885 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
2886
2887         Rework build_component_ref.
2888         * call.c (build_vfield_ref): Do not go through build_component_ref.
2889         (build_field_call): Use build_class_member_access_expr.
2890         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
2891         (build_object_call): Likewise.
2892         * class.c (convert_to_base): New function.
2893         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
2894         (instantiate_type): Handle BASELINKs.
2895         * cp-tree.def (BASELINK): New tree code.
2896         * cp-tree.h (BASELINK_P): Reimplement.
2897         (SET_BASELINK_P): Remove.
2898         (BASELINK_BINFO): Reimplement.
2899         (BASELINK_FUNCTIONS): Likewise.
2900         (BASELINK_ACCESS_BINFO): Likewise.
2901         (BASELINK_OPTYPE): Likewise.
2902         (convert_to_base): New function.
2903         (name_p): Likewise.
2904         (build_object_ref): Remove.
2905         (build_component_ref_1): Likewise.
2906         (build_component_ref): Likewise.
2907         (build_x_component_ref): Likewise.
2908         (build_class_member_access_expr): New function.
2909         (finish_class_member_access_expr): Likewise.
2910         (build_ptrmemfunc_access_expr): Likewise.
2911         * decl.c (grokdeclarator): Handle BASELINKs.
2912         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
2913         finish_class_member_access_expr.
2914         (arg_assoc): Handle BASELINKs.
2915         (do_class_using_decl): Likewise.
2916         * error.c (dump_decl): Likewise.
2917         (dump_expr): Use build_ptrmemfunc_access_expr.
2918         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
2919         destructors.
2920         (build_throw): Use BASELINK_FUNCTIONS.
2921         * init.c (perform_member_init): Use
2922         build_class_member_access_expr.
2923         (build_offset_ref): Handle BASELINKs.  Use
2924         build_class_member_access_expr.
2925         * method.c (hack_identifier): Likewise.
2926         * parse.y (do_id): Use BASELINK, not TREE_LIST.
2927         (primary): Remove uses of build_object_ref.
2928         * pt.c (lookup_template_function): Handle BASELINKs.
2929         (resolve_overloaded_unification): Likewise.
2930         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
2931         (lookup_field): Use BASELINK, not TREE_LIST.
2932         (lookup_fnfiels): Likewise.
2933         (setup_class_bindings): Likewise.
2934         * semantics.c (finish_object_call_expr): Do not use
2935         build_method_call when we already know what function is being
2936         called.
2937         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
2938         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
2939         TREE_CHAIN.
2940         (name_p): New function.
2941         * typeck.c (build_object_ref): Remove.
2942         (build_component_ref_1): Likewise.
2943         (build_x_component_ref): Likewise.
2944         (build_class_member_access_expr): New function.
2945         (finish_class_member_access_expr): Likewise.
2946         (build_ptrmemfunc_access_expr): Likewise.
2947         (get_member_function_from_ptrfunc): Use
2948         build_ptrmemfunc_access_expr.
2949         (build_binary_op): Likewise.
2950         (build_unary_op): Likewise.
2951         (build_ptrmemfunc): Likewise.
2952         (pfn_from_ptrmemfunc): Likewise.
2953         * typeck2.c (build_m_component_ref): Adjust comment.
2954
2955 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
2956
2957         * Make-lang.in (CXX_C_OBJS): Update.
2958         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
2959         * cp-tree.h (cxx_decode_option): Remove.
2960         * decl2.c (compare_options, lang_f_options, unsupported_options,
2961         cxx_decode_option): Remove.
2962
2963 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
2964
2965         * typeck.c (build_x_unary_op): Handle pointer-to-member.
2966
2967 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
2968
2969         * class.c: Don't include obstack.h.
2970         (popclass):
2971         * decl2.c: Delete bogus comment.
2972         * error.c: Don't include obstack.h.
2973         * except.c: Likewise.
2974         (dump_type): Correct comment.
2975         * method.c: Don't include obstack.h.
2976         * tree.c: Likewise.
2977
2978 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
2979
2980         Fix PR/2213
2981         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
2982         expressions to pointer-to-data-member of pointer-to-member-functions.
2983
2984 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
2985
2986         * cvt.c (ocp_convert): Delete obsolete code.
2987         * parse.y (permanent_obstack): Delete declaration.
2988         * pt.c (permanent_obstack): Delete declaration.
2989         * repo.c (permanent_obstack): Delete declaration.
2990         (open_repo_file): Use xmalloc instead of permanent_obstack.
2991         (init_repo): Use xstrdup instead of permanent_obstack.
2992
2993 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
2994
2995         * cp-tree.h (VF_DERIVED_VALUE): Remove.
2996         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
2997
2998 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
2999
3000         PR 7470.
3001         C++ ABI change - vfunc ordering.
3002         * class.c (add_virtual_function): Remove.
3003         (dfs_modify_all_vtables): Take list of all declared
3004         virtuals. Assign all that are not in primary base.
3005         (check_for_override): Adjust comments.
3006         (create_vtable_ptr): Take single list of virtuals. Build chain
3007         of declared virtuals here.
3008         (layout_class_type): Take single list of virtuals. Adjust.
3009         (finish_struct_1): Keep virtuals on single list. Adjust.
3010
3011 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
3012
3013         * init.c (build_member_call): Use build_new_method_call, not
3014         build_method_call.
3015
3016 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
3017
3018         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
3019
3020 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
3021
3022         * call.c (build_method_call): Issue a more helpful error message
3023         about ambiguous method names.
3024
3025 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
3026
3027         * tree.c (build_shared_int_cst): Make cache file scope, and
3028         GTY it.
3029
3030 2002-08-02  Jason Merrill  <jason@redhat.com>
3031
3032         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
3033         (cp_expr_size): New fn.
3034         * call.c (build_over_call): Lose empty class hackery.
3035         (convert_arg_to_ellipsis): Promote non-POD warning to error.
3036         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
3037
3038         * semantics.c (expand_body): Do tree optimization in the function
3039         context, too.
3040
3041 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
3042
3043         * cp-tree.h: Move all warning and flag declarations to c-common.h.
3044         * decl.c: Move all warning and flag variables to c-common.c.
3045         * decl2.c: Move all warning and flag variables to c-common.c.
3046         * lex.c (flag_digraphs): Remove.
3047         (warn_traditional): Now in c-common.c.
3048
3049 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
3050
3051         * call.c (build_field_call): Do not look up the field by name.
3052         (build_method_call): Simplify.
3053         (struct z_candidate): Add access_path and conversion_path.  Remove
3054         basetype_path.
3055         (convert_class_to_reference): Adjust use of
3056         add_function_candidate.
3057         (add_candidate): Add conversion_path argument.
3058         (add_function_candidate): Use it.
3059         (add_conv_dndidate): Likewise.
3060         (build_builtin_candidate): Likewise.
3061         (add_template_candidate_real): Add conversion_path argument.
3062         (add_template_conv_candidate): Likewise.
3063         (add_template_candidate): Likewise.
3064         (build_user_type_conversion_1): Use it.
3065         (build_new_function_call): Remove name lookup code.  Adjust use of
3066         add_template_candidate and add_function_candidate.
3067         (build_new_op): Likewise.
3068         (convert_like_real): Use build_special_member_call.
3069         (build_over_call): Use cand->conversion_path.
3070         (build_special_member_call): New method.
3071         (build_new_method_call): Remove name lookup code.
3072         * cp-tree.def (OFFSET_REF): Update documentation.
3073         (TEMPLATE_ID_EXPR): Likewise.
3074         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
3075         (BASELINK_OPTYPE): Likewise.
3076         (build_new_method_call): Adjust prototype.
3077         (build_special_member_call): New method.
3078         (build_baselink): New method.
3079         (build_offset_ref_call_from_tree): Likewise.
3080         (build_call_from_tree): Likewise.
3081         (finish_qualified_call_expr): Remove.
3082         (finish_call_expr): Adjust prototype.
3083         (build_x_function_call): Remove.
3084         * cvt.c (ocp_convert): Use build_special_member_call.
3085         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
3086         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
3087         CALL_EXPR.
3088         (build_offset_ref_call_from_tree): New function.
3089         (build_call_from_tree): Likewise.
3090         * init.c (expand_cleanup): Use build_special_member_call.
3091         (expand_default_init): Likewise.
3092         (build_member_call): Use finish_call_expr.
3093         (build_new_1): Use build_special_member_call.
3094         (push_base_cleanups): Likewise.
3095         * method.c (do_build_assign_ref): Likewise.
3096         * parse.y (template_id): Do not pass a COMPONENT_REF to
3097         lookup_template_function.
3098         (primary): Use parse_finish_call_epxr, not finish_call_expr.
3099         (parse_finish_call_expr): New function.
3100         * pt.c (lookup_template_function): Add assertions.
3101         * search.c (lookup_base): Allow T to be a binfo.
3102         (build_baselink): New function.
3103         (lookup_member): Use it.
3104         * semantics.c (finish_call_expr): Do not do name lookup.
3105         (finish_object_call_expr): Remove #if 0'd code.
3106         (finish_qualified_call_expr): Remove.
3107         * typeck.c (build_x_function_call): Remove.
3108         (build_static_case): Use build_special_member_call.
3109         * typeck2.c (build_functional_cast): Likewise.
3110
3111 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
3112
3113         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
3114
3115 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
3116
3117         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
3118
3119 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
3120
3121         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
3122         documentation.
3123
3124 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
3125
3126         * cp-tree.h: Comment typo fix.
3127
3128 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
3129
3130         * spew.c (space_for_token): Allocate zeroed memory for a new token
3131         chunk.
3132
3133 2002-07-27  Roger Sayle  <roger@eyesopen.com>
3134
3135         * decl.c (builtin_function_1): No need to explicitly mark
3136         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
3137
3138 2002-07-27  Roger Sayle  <roger@eyesopen.com>
3139
3140         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
3141
3142 2002-07-26  Jason Merrill  <jason@redhat.com>
3143
3144         * call.c (build_over_call): Likewise.
3145         (cp_convert_parm_for_inlining): New fn.
3146         (convert_for_arg_passing): New fn.
3147         (convert_default_arg, build_over_call): Use it.
3148         (type_passed_as): New fn.
3149         * pt.c (tsubst_decl): Use it.
3150         * decl2.c (cp_build_parm_decl): New fn.
3151         (build_artificial_parm): Use it.
3152         (start_static_storage_duration_function): Likewise.
3153         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
3154         (grokparms): Don't mess with DECL_ARG_TYPE.
3155         * typeck.c (convert_arguments): Use convert_for_arg_passing.
3156         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
3157         Define.
3158         * cp-tree.h: Declare new fns.
3159
3160 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
3161
3162         * cp-tree.h (flag_operator_names): Remove.
3163         * decl2.c (flag_operator_names): Remove.
3164         (lang_f_options): Remove operator-names.
3165         * lex.c (D_OPNAME): Remove.
3166         (reswords): Remove operator names.
3167         (rid_to_yy): Remove operator names.
3168         (init_reswords): No need to handle D_OPNAME.
3169         * spew.c (read_process_identifier): There are no operator
3170         names.
3171
3172 2002-07-26  Jason Merrill  <jason@redhat.com>
3173
3174         * dump.c (cp_dump_tree): Call c_dump_tree.
3175         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
3176
3177 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
3178
3179         * error.c (print_whitespace): Remove.
3180         * g++spec.c (LIBUNWIND): Move.
3181         * mangle.c (mangled_position, write_signed_number): Remove.
3182
3183 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
3184
3185         * decl2.c (cxx_decode_option): Similarly.
3186
3187 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
3188
3189         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
3190         (cxx_sizeof_or_alignof_type): Take a third argument.
3191         (cxx_sizeof): Adjust definition.
3192         (cxx_alignof): Likewise.
3193         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
3194         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
3195         complaining.
3196         (c_sizeof_nowarn): Remove definition.
3197         (build_unary_op): Use cxx_sizeof_nowarn.
3198
3199 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
3200
3201         * tree.c (cp_build_qualified_type_real): When copying
3202         pointer-to-method types, unshare the record that holds
3203         the cached pointer-to-member-function type.
3204
3205 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
3206
3207         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
3208
3209 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
3210
3211         Fix PR/7363:
3212         * typeck.c (cxx_sizeof_or_alignof_type): New function.
3213         (c_sizeof): Remove definition.
3214         (expr_sizeof): Use cxx_sizeof.
3215         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
3216         * decl.c (finish_destructor_body): Use cxx_sizeof.
3217         * semantics.c (finish_alignof): Likewise.
3218         (finish_alignof): Use cxx_alignof.
3219         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
3220         (cxx_sizeof_or_alignof_type): Declare.
3221         (my_friendly_assert): Move to ../c-common.h.
3222
3223 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
3224
3225         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
3226
3227 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3228
3229         PR c++/7347, c++/7348
3230         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
3231         * decl.c (make_typename_type): Use it.
3232         (make_unbound_class_template): Likewise.
3233         (lookup_name_real): Don't call type_access_control if scope is
3234         template parameter dependent.
3235         * parse.y (template_arg): Call make_unbound_class_template with
3236         tf_parsing set.
3237         (nest_name_specifier): Call make_typename_type with tf_parsing set.
3238         (typename_sub0): Likewise.
3239         (typename_sub1): Likewise.
3240         (instantiate_decl): Push class scope.
3241         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
3242         for both static variable and member function template.
3243         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
3244         and arguments.
3245         * search.c (type_access_control): Do type access for TEMPLATE_DECL
3246         too.
3247
3248 2002-07-20  Roger Sayle  <roger@eyesopen.com>
3249
3250         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
3251         test by using positive_option.  Make whitespace consistent.
3252
3253 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
3254
3255         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
3256         members with 'locus'.  Adjust use throughout.
3257         (struct feed):  Likewise.
3258         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
3259         Adjust use.
3260         (snarf_defarg): Use error(), not error_with_file_and_line().
3261
3262 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
3263
3264         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
3265         cpp_options is included.
3266
3267 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3268
3269         PR c++/2862, c++/2863
3270         * pt.c (determine_specialization): Compare the length of
3271         TYPE_ARG_TYPES.  Tidy.
3272
3273 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3274
3275         PR c++/3797
3276         * decl.c (duplicate_decls): Don't propagate inlining parameters from
3277         olddecl to newdecl when newdecl is a specialization of the
3278         instantiation olddecl.
3279
3280 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3281
3282         PR c++/4802, c++/5387
3283         * decl.c (make_typename_type): Use enforce_access.
3284
3285 2002-07-17  Scott Snyder <snyder@fnal.gov>
3286
3287         PR c++/7320
3288         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
3289
3290 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
3291
3292         * class.c (add_method): Correct handling of conversion operators.
3293
3294 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
3295
3296         PR c++/7224
3297         * class.c (add_method): Simplify.
3298
3299 2002-07-11  Jason Merrill  <jason@redhat.com>
3300
3301         PR c++/7279
3302         * tree.c (cp_copy_res_decl_for_inlining): Also copy
3303         TREE_ADDRESSABLE.
3304
3305 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
3306
3307         * pt.c (template_parm_this_level_p, push_template_decl_real):
3308         Pass depth as int pointer.
3309
3310 2002-07-11  Tim Josling  <tej@melbpc.org.au>
3311
3312         Remove front end hard coding from gengtype.c.
3313
3314         * config-lang.in (gtfiles): Add files needed for this front end.
3315
3316 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
3317
3318         * cp-tree.h (unqualified_name_lookup_error): Declare it.
3319         (begin_function_definition): Adjust prototype.
3320         * lex.c (unqualified_name_lookup_error): New function, split out
3321         from ...
3322         (do_identifier): ... here.
3323         * parse.y (parse_begin_function_definition): New function.
3324         (fn.def1): Use it.
3325         * semantics.c (begin_function_definition): Accept decl-specifiers
3326         and attributes as separate parameters.
3327
3328 2002-07-10  Jason Merrill  <jason@redhat.com>
3329
3330         PR c++/6255
3331         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
3332         modifying the old one.
3333
3334 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
3335
3336         * cp-tree.h (constructor_name_p): Declare it.
3337         (check_template_template_default_arg): Likewise.
3338         * class.c (handle_using_decl): Use constructor_name_p.
3339         * decl.c (grokdeclarator): Likewise.
3340         * decl2.c (constructor_name_p): Define it.
3341         * init.c (build_member_call): Use constructor_name_p.
3342         * parse.y (template_parm): Use check_template_template_default_arg.
3343         * pt.c (check_explicit_specialization): Use constructor_name_p.
3344         * semantics.c (check_template_template_default_arg): New function.
3345
3346 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3347
3348         * pt.c (can_complete_type_without_circularity): Add static to
3349         function definition.
3350
3351 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
3352
3353         * cp-tree.h (have_extern_spec): Declare it
3354         * decl.c (have_extern_spec): Define it.
3355         (start_decl): Eliminate use of used_extern_spec.
3356         (start_function): Likewise.
3357         * parse.y (have_extern_spec): Remove declaration.
3358         (used_extern_spec): Likewise.
3359         (frob_specs): Eliminate use of used_extern_spec.
3360         (.hush_warning): Likewise.
3361
3362 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
3363
3364         * Make-lang.in (cp/parse.o): Depend on decl.h.
3365         * cp-tree.h (do_decl_instantiation): Change prototype.
3366         * parse.y: Include decl.h.
3367         (parse_decl_instantiation): New function.
3368         (explicit_instantiation): Use it.
3369         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
3370         and DECLSPECS.
3371
3372 2002-07-07  Roger Sayle  <roger@eyesopen.com>
3373
3374         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
3375         constructor and destructor tests when passed a TEMPLATE_DECL.
3376
3377 2002-07-05  Jason Merrill  <jason@redhat.com>
3378
3379         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
3380         pointers.
3381
3382         PR optimization/7145
3383         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
3384
3385 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
3386
3387         Repair damage on weak-impared targets caused by my previous patch.
3388         * cp-tree.h (import_export_tinfo): Add parameter.
3389         * decl2.c (import_export_tinfo): Add parameter, post adjust
3390         DECL_COMDAT.
3391         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
3392         import_export_tinfo.
3393
3394 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3395
3396         PR c++/6944
3397         * init.c (build_aggr_init): Remove qualifiers of init before calling
3398         build_vec_init.
3399         (build_vec_init): Flatten multi-dimensional array during cleanup.
3400         (build_vec_delete_1): Abort if the type of each element is array.
3401
3402 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
3403
3404         * pt.c (instantiate_class_template): Fix typo.
3405
3406 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3407
3408         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
3409         by CVS conflict in my last patch.
3410
3411 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3412
3413         PR c++/6716
3414         * pt.c (can_complete_type_without_circularity): New function.
3415         (instantiate_class_template): Use it.
3416         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
3417         message due to incomplete fields.
3418
3419 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
3420
3421         PR c++/7112
3422         * mangle.c (write_expression): Add mangling for sizeof when
3423         applied to a type.
3424         * operators.def: Remove stale comment.
3425
3426 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
3427
3428         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
3429         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
3430         (tinfo_decl_type): Replace with ...
3431         (type_info_ptr_type): ... this.
3432         (import_export_tinfo): Declare.
3433         (tinfo_decl_p): Rename to ...
3434         (unemitted_tinfo_decl_p): ... this.
3435         * decl2.c (import_export_decl): Break out tinfo handling into ...
3436         (import_export_tinfo): ... here. New function.
3437         (finish_file): Adjust.
3438         * rtti.c (TINFO_REAL_NAME): New macro.
3439         (init_rtti_processing): Create the tinfo types.
3440         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
3441         (get_tinfo_decl): Adjust.
3442         (get_tinfo_ptr): New function.
3443         (get_type_id): Use it.
3444         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
3445         (ptr_initializer): Use get_tinfo_ptr.
3446         (ptm_initializer): Likewise.
3447         (synthesize_tinfo_var): Break into ...
3448         (get_pseudo_ti_init): ... this. Just create the initializer.
3449         (get_pseudo_ti_desc): .. and this.
3450         (create_real_tinfo_var): Remove.
3451         (create_pseudo_type_info): Don't create the vtable decl here.
3452         (get_vmi_pseudo_type_info): Remove.
3453         (create_tinfo_types): Adjust.
3454         (tinfo_decl_p): Rename to ...
3455         (unemitted_tinfo_decl_p): ... here. Adjust.
3456         (emit_tinfo_decl): Adjust. Create the initializer.
3457
3458 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
3459
3460         PR c++/6695
3461         * pt.c (tsubst_friend_class): Substitute into the context of the
3462         friend before using it.
3463
3464 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
3465
3466         * cp-tree.h (xref_tag): Change prototype.
3467         (handle_class_head): Likewise.
3468         (build_x_component_ref): Likewise.
3469         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
3470         (xref_tag): Take attributes as a separate parameter.
3471         (xref_tag_from_type): Adjust call to xref_tag.
3472         * decl2.c (build_expr_from_tree): Adjust call to
3473         build_x_component_ref.
3474         (handle_class_head): Take attributes as a separate parameter.
3475         * parse.y (parse_xref_tag): New function.
3476         (parse_handle_class_head): Likewise.
3477         (primary): Use parse_xref_tag.
3478         (class_head_decl): Use parse_handle_class_head.
3479         (class_head_defn): Likewise.
3480         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
3481         (build_dynamic_cast_1): Likewise.
3482         (create_pseudo_type_info): Likewise.
3483         (emit_support_tinfos): Likewise.
3484         * typeck.c (build_object_ref): Adjust call to
3485         build_x_component_ref.
3486         (build_x_component_ref): Remove protect parameter.
3487
3488 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
3489
3490         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
3491         * class.c (handle_using_decl): Likewise.
3492         (instantiate_type): Likewise.
3493         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
3494         (xref_basetypes): Change prototype.
3495         (begin_mem_initializers): New function.
3496         (get_overloaded_fn): Likewise.
3497         * decl.c (xref_basetypes): Simplify.
3498         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
3499         * init.c (build_offset_ref): Likewise.
3500         * parse.y (base_init): Use begin_mem_initializers().
3501         (structsp): Adjust call to xref_basetypes.
3502         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
3503         (instantiate_class_template): Adjust call to xref_basetypes.
3504         * semantics.c (begin_mem_initializers): New function.
3505         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
3506         (really_overlaoded_fn): Likewise.
3507         (get_overloaded_fn): New function.'
3508         (get_first_fn): USe BASELINK_FUNCTIONS.
3509
3510 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
3511
3512         * cp-tree.h (SCALAR_TYPE_P): New macro.
3513         (check_for_out_of_scope_variable): New function.
3514         (at_class_scope_p): Likewise.
3515         (finish_fname): Likewise.
3516         * class.c (finish_struct): Use at_function_scope_p.
3517         * decl.c (check_for_out_of_scope_variable): New function, split
3518         out from do_identifier.
3519         (finish_enum): Use at_function_scope_p.
3520         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
3521         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
3522         (primary): Use at_function_scope_p.
3523         * search.c (at_class_scope_p): New function.
3524         * semantics.c (finish_fname): Likewise.
3525         (check_multiple_declarators): Use at_function_scope_p.
3526
3527 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
3528
3529         * parse.y (parse_scoped_id): New function.
3530         (primary): Use it.
3531         * cp-tree.h (do_scoped_id): Adjust declaration.
3532         * lex.c (do_scoped_id): Remove call to yylex.
3533         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
3534         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
3535         expanding it inline.
3536
3537 2002-06-23  Matt Thomas  <matt@3am-software.com>
3538
3539         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
3540         "#if VMS_TARGET".
3541
3542 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3543
3544         * mangle.c (integer_type_codes): Const-ify.
3545
3546 2002-06-20  Richard Henderson  <rth@redhat.com>
3547
3548         PR c++/6747
3549         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
3550         Call put_var_into_stack.
3551
3552 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3553
3554         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
3555         array size calculation.
3556
3557 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3558
3559         PR c++/6892
3560         * pt.c (tsubst_expr): Handle FILE_STMT.
3561
3562 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3563
3564         PR c++/6723
3565         * pt.c (lookup_template_class): Don't build complete argument of
3566         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
3567         argument.
3568
3569 2002-06-19  Akim Demaille  <akim@epita.fr>
3570
3571         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
3572         decl.h's TYPENAME.
3573         * spew.c, lex.c: Adjust.
3574         * parse.y (explicit_instantiation): Add empty action to override
3575         the default $$ = $1 where it introduces a type clash.
3576
3577 2002-06-14  Jason Merrill  <jason@redhat.com>
3578
3579         * semantics.c (begin_for_stmt): Push the 'for' scope before
3580         adding the FOR_STMT.
3581
3582         C++ ABI changes.
3583         * class.c (build_base_field): Set DECL_PACKED.
3584         (layout_class_type): Don't use tail padding of PODs.
3585         * mangle.c (write_unqualified_name): Fix template conversion op
3586         mangling.
3587
3588 2002-06-16  Richard Henderson  <rth@redhat.com>
3589
3590         PR opt/6793
3591         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
3592         after template instantiation.
3593
3594 2002-06-16  Richard Henderson  <rth@redhat.com>
3595
3596         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
3597
3598 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
3599
3600         * cp-tree.h (compiler_error): Remove declaration.
3601         * lex.c (compiler_error): Remove definition.
3602
3603 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
3604
3605         * g++spec.c (LIBUNWIND): New.
3606         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
3607
3608 2002-06-13  Jessica Han  <jessica@cup.hp.com>
3609
3610         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
3611         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
3612         (build_vbase_offset_vtbl_entries): Likewise.
3613         * rtti.c (build_headof): Likewise.
3614         (get_tinfo_decl_dynamic): Likewise.
3615         (create_pseudo_type_info): Likewise.
3616
3617 2002-06-12  Stan Shebs  <shebs@apple.com>
3618
3619         * mpw-config.in: Remove file, no longer used.
3620         * mpw-make.sed: Ditto.
3621
3622 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
3623
3624         * decl2.c: Update call to cpp_handle_option.
3625
3626 2002-06-07  H.J. Lu  (hjl@gnu.org)
3627
3628         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
3629
3630 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
3631
3632         * error.c (cp_error_at): Fix typo.
3633
3634 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
3635
3636         * error.c (cp_diagnostic_starter): Adjust call.
3637         (maybe_print_instantiation_context): Change prototype to take a
3638         'diagnostic_info *'.
3639         (print_instantiation_full_context): Likewise.
3640         (print_instantiation_partial_context): Likewise.
3641         (cp_diagnostic_starter): Likewise.
3642         (cp_diagnostic_finalizer): Likewise.
3643         (cp_print_error_function): Likewise.
3644         (cp_printer): Take a secondary parameter as a 'text_info *'.
3645         Remove output_state savings.  Adjust calls.
3646
3647 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
3648
3649         * pt.c (inline_parm_levels): Mark for GC.
3650
3651         * mangle.c (start_mangling): Allocate G.substitutions here...
3652         (init_mangle): ... rather than here.
3653         (finish_mangling): Clear the varray pointer when done with it.
3654         * spew.c (yylexstring): Don't use VARRAY_FREE.
3655         * search.c (bfs_walk): Don't use VARRAY_FREE.
3656         * decl2.c (pending_statics): Use gengtype to mark.
3657         (deferred_fns): Likewise.
3658         (ssdf_decls): Likewise.
3659         (init_decl2): Delete.
3660         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
3661         (cxx_init_decl_processing): Don't call init_decl2.
3662         (cxx_pop_function_context): Don't use VARRAY_FREE.
3663         * cp-tree.h (struct saved_scope): No need for special marking
3664         of varrays.
3665         (struct language_function): Likewise.
3666         (local_classes): Use gengtype to mark.
3667         (init_decl2): Delete prototype.
3668         * class.c (init_class_processing): Don't use
3669         ggc_add_tree_varray_root.
3670         (build_vtbl_initializer): Don't use VARRAY_FREE.
3671
3672         * decl.c (typename_compare): Don't use same_type_p.
3673
3674         * decl.c: Include hashtab.h instead of hash.h.
3675         (typename_hash): Update to use htab_h.
3676         (typename_compare): Likewise.
3677         (typename_htab): Use gengtype to mark.
3678         (build_typename_type): Update to use htab_h.
3679         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
3680
3681         * Make-lang.in (gt-cp-tree.h): New rule.
3682         (cp/tree.o): Depend on gt-cp-tree.h.
3683         * config-lang.in (gtfiles): Add cp/tree.c.
3684         * tree.c: Include gt-cp-tree.h.
3685         (list_hash_table): Use gengtype to mark.
3686         (init_tree): Use gengtype to mark trees.
3687
3688         * Make-lang.in (cp/decl.o): Add debug.h dependency.
3689         * call.c (struct z_candidate): Use gengtype.
3690         (USER_CONV_CAND): Use WRAPPER_ZC.
3691         (convert_class_to_reference): Use build_zc_wrapper.
3692         (build_type_conversion_1): Likewise.
3693         (build_over_call): Use WRAPPER_ZC.
3694         (add_warning): Use build_zc_wrapper.
3695         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
3696         * cp-tree.h (struct lang_identifier): Use gengtype.
3697         (struct template_parm_index_s): Likewise.
3698         (struct ptrmem_cst): Likewise.
3699         (struct tree_binding): Likewise.
3700         (struct tree_overload): Likewise.
3701         (struct tree_srcloc): Likewise.
3702         (struct tree_wrapper): Likewise.  Also modify to have a pointer
3703         to struct z_candidate rather than void.
3704         (enum cp_tree_node_structure_enum): New.
3705         (union lang_tree_node): New.
3706         (cxx_mark_tree): Delete prototype.
3707         (cp_tree_node_structure): New prototype.
3708         (build_ptr_wrapper): Delete prototype.
3709         (build_int_wrapper): Delete prototype.
3710         (build_zc_wrapper): New prototype.
3711         * decl.c: Include debug.h
3712         (cxx_mark_tree): Delete.
3713         (cp_tree_node_structure): New.
3714         * tree.c (build_ptr_wrapper): Delete.
3715         (build_int_wrapper): Delete.
3716         (build_zc_wrapper): New.
3717
3718         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
3719         Correct typo.  Patch from k_fukui@highway.ne.jp.
3720
3721         * semantics.c (current_stmt_tree): Update for change to
3722         struct language_function.
3723         (finish_mem_initializers): Likewise.
3724         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
3725         * cp-tree.h (struct language_function): Rename from
3726         cp_language_function.  Change all uses.
3727         (cp_function_chain): Don't need to cast.
3728
3729         * class.c (duplicate_tag_error): Reset discriminator.
3730         (check_bases_and_members): Update for data structure changes.
3731         * cp-tree.h (struct lang_id2): Use gengtype.
3732         (flagged_type_tree): Likewise.
3733         (SET_LANG_ID): Use GGC on struct lang_id2.
3734         (struct cp_language_function): Use gengtype.  Remove field
3735         'x_vcalls_possible_p'.
3736         (current_vcalls_possible_p): Delete.
3737         (struct lang_type_header): New.
3738         (struct lang_type_class): Rename from struct lang_type.  Include
3739         struct lang_type_header.
3740         (struct lang_type_ptrmem): New.
3741         (struct lang_type): New.
3742         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
3743         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
3744         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
3745         (struct lang_decl_flags): Use gengtype.  Add discriminators.
3746         (struct lang_decl): Use gengtype.  Add and use discriminators.
3747         Update the macros that reference moved fields.
3748         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
3749         (SET_DECL_THUNK_P): Set discriminator too.
3750         (clear_inline_text_obstack): Delete prototype.
3751         (finish_inline_definitions): Delete prototype.
3752         (mark_pending_inlines): Delete prototype.
3753         (lang_check_failed): New prototype.
3754         * decl.c (struct named_label_use_list): Use gengtype.
3755         (struct named_label_list): Likewise.
3756         (mark_binding_level): Delete.
3757         (mark_named_label_lists): Delete.
3758         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
3759         (cxx_init_decl_processing): Use generated marker routine.
3760         (begin_destructor_body): Delete dead set to
3761         current_vcalls_possible_p.
3762         (mark_lang_function): Delete.
3763         (mark_cp_function_context): Delete.
3764         (lang_mark_tree): Use generated marker routines.
3765         * decl2.c (start_objects): Set discriminator when setting
3766         GLOBAL_INIT_PRIORITY.
3767         * lex.c (retrofit_lang_decl): Set discriminators.
3768         (copy_lang_type): Update for changes to lang_type structure.
3769         (cp_make_lang_type): Set discriminator.
3770         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
3771         * search.c: Include ggc.h.
3772         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
3773         (finish_inline_definitions): Delete.
3774         * spew.c (struct token): Use gengtype.
3775         (struct token_chunk): New.
3776         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
3777         (struct feed): Use gengtype.
3778         (feed_obstack): Delete.
3779         (feed): Mark as GC root.
3780         (pending_inlines): Mark as GC root.
3781         (pending_inlines_tail): Likewise.
3782         (processing_these_inlines): Likewise.
3783         (token_obstack): Make static.
3784         (first_token): Likewise.
3785         (init_spew): Don't initialize deleted things; use gengtype for roots.
3786         (clear_inline_text_obstack): Delete.
3787         (feed_input): Use GC for struct feed.  Update for changes to
3788         struct unparsed_text.
3789         (mark_pending_inlines): Delete.
3790         (next_token): Rename from add_token.  Change all callers.  Update
3791         for changes to struct unparsed_text.
3792         (space_for_token): New.
3793         (remove_last_token): New.
3794         (alloc_unparsed_text): New.
3795         (snarf_block): Take an unparsed_text.  Update for changes to struct
3796         unparsed_text.
3797         (snarf_method): Update for changes to struct unparsed_text.
3798         (snarf_defarg): Update for changes to struct unparsed_text.
3799         * tree.c (lang_check_failed): New.
3800
3801         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
3802         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
3803         (cp/spew.o): Add dependency on gt-<filename>.h.
3804         (cp/decl2.o): Add dependency on gt-<filename>.h.
3805         (cp/call.o): Add dependency on gt-<filename>.h.
3806         (cp/pt.o): Add dependency on gt-<filename>.h.
3807         (cp/repo.o): Add dependency on gt-<filename>.h.
3808         (cp/parse.o): Add dependency on gt-<filename>.h.
3809         * call.c: Use gengtype for roots.
3810         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
3811         decl2.c parse.y pt.c repo.c spew.c.
3812         * cp-tree.h: Use gengtype for roots.
3813         (struct saved_scope): Use GGC, gengtype.
3814         (cp_parse_init): Delete prototype.
3815         (init_pt): Delete prototype.
3816         * decl.c: Use gengtype for roots.
3817         (mark_saved_scope): Delete.
3818         (cxx_init_decl_processing): Don't call deleted initilisation
3819         routines.
3820         (signed_size_zero_node): Delete, unused.
3821         * decl.h: Use gengtype for roots.
3822         * decl2.c: Use gengtype for roots.
3823         * lex.h: Use gengtype for roots.
3824         * parse.y: Use gengtype for roots.
3825         (cp_parse_init): Delete.
3826         * pt.c: Use gengtype for roots.
3827         (init_pt): Delete.
3828         * repo.c: Use gengtype for roots.
3829         * spew.c: Use gengtype for roots.
3830
3831         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
3832         (cp/decl.o): Add dependency on gtype-cp.h.
3833         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
3834         Include gtype-cp.h.  Allow for filename changes.
3835
3836         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
3837         (cp/decl.o): Add cp/gt-decl.h dependency.
3838         * config-lang.in (gtfiles): New.
3839         * tree.h: Rename struct binding_level to struct cp_binding_level.
3840         * decl.c: Rename struct binding_level to struct cp_binding_level.
3841         Include cp/gt-decl.h.
3842         (struct cp_binding_level): Use gengtype.
3843         (make_binding_level): Use GGC on struct cp_binding_level.
3844         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
3845         (cxx_init_decl_processing): Mark free_binding_level as
3846         deletable.
3847
3848         * decl.c (mark_cp_function_context): Update calling sequence.
3849
3850         * decl.c (start_function): Don't free 'struct
3851         cp_language_function'.
3852         (pop_cp_function_context): Likewise.
3853         (save_function_data): Allocate it using GC.
3854         * semantics.c (genrtl_start_function): Don't free 'struct
3855         cp_language_function'.
3856
3857 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
3858
3859         * lang-specs.h: Use cpp_debug_options.
3860
3861 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
3862
3863         * mangle.c, tree.c: Include real.h.
3864         * Make-lang.in: Update dependency lists.
3865
3866 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3867
3868         * lex.c: Don't include c-lex.h.
3869         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
3870
3871 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
3872
3873         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
3874
3875 2002-05-22  Richard Henderson  <rth@redhat.com>
3876
3877         * decl.c (obscure_complex_init): Check for VAR_DECL
3878         before using DECL_THREAD_LOCAL.
3879
3880 2002-05-22  Richard Henderson  <rth@redhat.com>
3881
3882         * decl.c (check_tag_decl): Handle RID_THREAD.
3883         (obscure_complex_init): Reject run-time init of tls.
3884         (grokvardecl, grokdeclarator): Handle RID_THREAD.
3885         * lex.c (reswords): Add __thread.
3886         (rid_to_yy): Map RID_THREAD to SCSPEC.
3887
3888 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
3889
3890         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
3891         * cp-tree.h (cxx_post_options): Kill.
3892         * cp-lex.c (cxx_post_options): Kill.
3893
3894 2002-05-21  Richard Henderson  <rth@redhat.com>
3895
3896         * lex.c (rid_to_yy): Add RID_THREAD.
3897
3898 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
3899
3900         * init.c (build_vec_init): Test for trivial copy-assignment when
3901         copy-assigning arrays.
3902
3903 2002-05-20  Andreas Jaeger  <aj@suse.de>
3904
3905         * init.c (build_default_init): Remove unused variable.
3906
3907 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
3908
3909         * call.c (any_strictly_viable): New.
3910         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
3911
3912 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3913
3914         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
3915
3916 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3917
3918         PR c++/186, DR 259
3919         * pt.c (do_decl_instantiation): Don't complain explicit
3920         instantiation after explicit specialization.
3921         (do_type_instantiation): Likewise.
3922
3923 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
3924
3925         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
3926         renamed from...
3927         (complete_type_or_else): ... this.  Redefined as macro.
3928         (cxx_incomplete_type_diagnostic): Declare.
3929         (cxx_incomplete_type_error): Define as macro.
3930         * init.c (build_delete): Warn about incomplete types other than
3931         void, and use the built-in operator delete for them.
3932         * typeck.c (complete_type_or_diagnostic): Renamed from
3933         complete_type_or_else.  Added warn_only argument, passed to...
3934         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
3935         warnings or errors depending on new warn_only argument.  Renamed
3936         from...
3937         (cxx_incomplete_type_error): ... this.  New implementation in
3938         terms of cxx_incomplete_type_diagnostic.
3939
3940 2002-05-18  Jason Merrill  <jason@redhat.com>
3941
3942         PR c++/6611
3943         * decl2.c (import_export_decl): If we clear
3944         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
3945
3946 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3947
3948         PR c++/6620
3949         * pt.c (verify_class_unification): Don't check if PARM is template
3950         parameter dependent.  Simplify.
3951         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
3952         parameter dependent expression.
3953
3954 2002-05-14  Jason Merrill  <jason@redhat.com>
3955
3956         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
3957         Do set DECL_COMDAT.
3958         (synthesize_tinfo_var): Take the public decl.
3959         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
3960         (emit_tinfo_decl): Adjust.  Call import_export_decl.
3961         * decl2.c (import_export_decl): Simplify tinfo decl handling.
3962
3963 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
3964
3965         * cp-tree.h (struct lang_type): Added non_zero_init.
3966         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
3967         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
3968         * class.c (check_field_decls): Test non_zero_init.
3969         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
3970         zero-to-NULL conversions.
3971         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
3972         type that needs zero-initialization without zeros.
3973         (check_initializer_decl): Compute zero-initializer for types
3974         that require a non-trivial one.
3975         * init.c (build_forced_zero_init): New function.
3976         (build_default_init): Use it.
3977         * tree.c (zero_init_p): New function.
3978         * typeck2.c (force_store_init_value): New function.
3979         (process_init_constructor): Create non-trivial zero-initializers
3980         for array members and class fields.
3981
3982 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
3983
3984         * lang-specs.h: Remove redundant -lang-c++.
3985
3986 2002-05-13  Jason Merrill  <jason@redhat.com>
3987
3988         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
3989         (fixed_type_or_null): See through reference vars.
3990         (build_base_path): Vtable contents are constant.
3991         * typeck.c (get_member_function_from_ptrfunc): Likewise.
3992
3993 2002-05-12  Jason Merrill  <jason@redhat.com>
3994
3995         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
3996         structs are safe.
3997
3998 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
3999
4000         * cp-tree.h (flag_ansi): Remove.
4001         * decl2.c (flag_ansi): Remove.
4002         (cxx_decode_option): Set flag_iso and flag_undef.
4003
4004 2002-05-09  Jason Merrill  <jason@redhat.com>
4005
4006         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
4007         Use subtraction rather than a bitmask to get the index.
4008         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
4009
4010         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
4011
4012 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
4013
4014         * Make-lang.in (decl2.o): Update.
4015         * cp-tree.h (warn_multichar): Remove.
4016         * decl2.c: Include c-common.h.
4017         (warn_multichar): Remove.
4018
4019 2002-05-03  Jason Merrill  <jason@redhat.com>
4020
4021         * tree.c (build_cplus_array_type): Only const and volatile get
4022         special handling.
4023
4024         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
4025
4026 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
4027
4028         ABI change, returning simple classes from functions.
4029         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
4030         TYPE_HAS_TRIVIAL_INIT_REF is false or
4031         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
4032
4033 2002-04-30  Jason Merrill  <jason@redhat.com>
4034
4035         PR debug/6436
4036         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
4037         anonymous class with a typedef if there are attributes.
4038
4039 2002-04-29  Paul Eggert  <eggert@twinsun.com>
4040
4041         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
4042
4043 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
4044
4045         PR c++/6477
4046         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
4047         non-NULL first.
4048
4049 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
4050
4051         PR c++/6492
4052         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
4053         enter that scope before name lookup.
4054
4055         PR c++/6486
4056         * method.c (do_build_copy_constructor): Avoid building
4057         cv-qualified reference types.
4058
4059 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
4060
4061         PR c++/5719
4062         * decl.c (grok_op_properties): Assignment ops don't have to return
4063         by value. operator% should.
4064
4065 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
4066
4067         PR c/6343
4068         * decl.c (duplicate_decls): Call merge_weak.
4069
4070 2002-04-26  Richard Henderson  <rth@redhat.com>
4071
4072         * parse.y (malloced_yyss, malloced_yyvs): New.
4073         (yyoverflow): Re-add.  Set them.
4074         (free_parser_stacks): New.
4075
4076 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
4077
4078         PR c++/6497
4079         * method.c (do_build_assign_ref): Pass a derivation to
4080         build_method_call when calling base class assignment operators.
4081
4082 2002-04-26  Richard Henderson  <rth@redhat.com>
4083
4084         * parse.y (yyoverflow): Revert.
4085
4086 2002-04-26  Richard Henderson  <rth@redhat.com>
4087
4088         PR c/3581
4089         * parse.y (string): Remove.  Update all uses to use STRING
4090         instead, and not call combine_strings.
4091         * rtti.c (tinfo_name): Use fix_string_type.
4092         * semantics.c (finish_asm_stmt): Don't call combine_strings.
4093         * spew.c (yylexstring): New.
4094         (read_token): Use it.
4095
4096 2002-04-25  Richard Henderson  <rth@redhat.com>
4097
4098         PR c/2161
4099         * parse.y (yyoverflow): New.
4100
4101 2002-04-25  Jason Merrill  <jason@redhat.com>
4102
4103         PR c++/5607
4104         * search.c (check_final_overrider): No longer static.
4105         * class.c (update_vtable_entry_for_fn): Call it.
4106         * cp-tree.h: Adjust.
4107
4108 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4109
4110         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
4111         * cp-tree.h (cxx_set_yydebug): Die.
4112         * lex.c (YYDEBUG): Get from c-lex.h.
4113         (cxx_set_yydebug): Remove.
4114         * parse.y: Include c-lex.h.
4115         (YYDEBUG): Get from c-lex.h.
4116
4117 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
4118
4119         PR c++/6438.
4120         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
4121         void.
4122
4123 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
4124
4125         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
4126         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
4127         Redefine.
4128         * cp-tree.h (cp_attribute_table): Rename.
4129         * decl.c (lang_attribute_table): Remove declaration.
4130         (cxx_init_decl_processing): Don't set it.
4131         * tree.c (cp_attribute_table): Rename.
4132
4133 2002-04-24  Jason Merrill  <jason@redhat.com>
4134
4135         PR c++/6331
4136         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
4137         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
4138         The pedwarn for array assignment is now unconditional.
4139         * tree.c (build_cplus_array_type_1): Still process simple array types
4140         normally in templates.
4141
4142         PR c++/6395
4143         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
4144         stuff for comdats.
4145
4146 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
4147
4148         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
4149         node with attributes.
4150
4151 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
4152
4153         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
4154         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
4155
4156 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
4157
4158         PR c++/6256:
4159         * pt.c (tsubst_friend_class): Handle templates with explicit
4160         nested names.
4161
4162         PR c++/6331:
4163         * typeck.c (merge_types): Remember the cv-qualification of pointer
4164         types when merging them.
4165
4166 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
4167
4168         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
4169         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
4170         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
4171         cxx_mark_function_context): New.
4172         * decl.c (push_cp_function_context, pop_cp_function_context,
4173         mark_cp_function_context): Rename for consistency.
4174         (cxx_init_decl_processing): Don't set old hooks.
4175
4176 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
4177
4178         * call.c (convert_type_from_ellipsis): Rename, update.
4179         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
4180         * cp-tree.h (convert_type_from_ellipsis): Rename.
4181         * decl.c (cxx_init_decl_processing): Don't set hook.
4182
4183 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
4184
4185         * call.c (build_new_method_call): Update.
4186         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
4187         * cp-tree.h (cxx_incomplete_type_error): New.
4188         * decl.c (grokdeclarator, grokparms): Update.
4189         * decl2.c (check_classfn): Update.
4190         * pt.c (tsubst): Update.
4191         * typeck.c (complete_type_or_else, expr_sizeof,
4192         decay_conversion): Update.
4193         * typeck2.c (incomplete_type_error): Rename.
4194         (add_exception_specifier): Update.
4195
4196 2002-04-18  Jason Merrill  <jason@redhat.com>
4197
4198         PR c++/5658
4199         * search.c (setup_class_bindings): A class template qualifies as a
4200         type binding.
4201
4202 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
4203
4204         PR c++/6316
4205         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
4206         before expanding.
4207
4208 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
4209
4210         * init.c (begin_init_stmts): Remove commented out code.
4211         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
4212         * semantics.c (begin_gobal_stmt_expr): Adjust call to
4213         expand_start_stmt_expr.
4214
4215 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
4216
4217         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
4218         dso_handle itself, to __cxa_atexit.
4219
4220 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4221
4222         * error.c (cxx_print_error_function): Adjust call to macros.
4223
4224 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
4225
4226         * class.c (layout_virtual_bases): Do all dsize computation on trees.
4227
4228 2002-04-14  Jason Merrill  <jason@redhat.com>
4229
4230         * typeck.c (get_member_function_from_ptrfunc): Don't do
4231         gratuitious division and multiplication on
4232         ptrmemfunc_vbit_in_delta targets.
4233
4234 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4235
4236         PR c++/5373.
4237         * semantics.c (finish_expr_stmt): Remember the type of the
4238         expression before any conversions are performed.
4239
4240 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4241
4242         PR c++/5189.
4243         * call.c (add_template_candidate_real): Do not treat member
4244         templates as copy constructors.
4245
4246 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4247
4248         * decl.c (duplicate_decls): Do not copy the RTL for a variable
4249         declaration if the old variable had an incomplete type and the new
4250         variable does not.
4251         (complete_vars): Do not call layout_decl for completed variables.
4252
4253 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
4254
4255         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
4256         with an explicit one.
4257         (follow_tag_typedef): New.
4258         (lookup_tag): Use it to extract the tag of an explicit typedef.
4259         (xref_tag): Likewise.
4260
4261 2002-04-11  Andrew Haley  <aph@redhat.com>
4262
4263         * typeck.c (type_after_usual_arithmetic_conversions):
4264         If two types have the same variant, return immediately.
4265         When two floating-point operands are the same precision:
4266           convert to float if one of the operands is float;
4267           if neither operand is one of the standard types, return the type
4268           of the first operand.
4269
4270 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
4271
4272         PR c++/5507
4273         * decl.c (make_typename_type): Remove implicit typenameness.
4274
4275 2002-04-09  Jason Merrill  <jason@redhat.com>
4276
4277         PR optimization/6189
4278         * semantics.c (genrtl_start_function): Don't free
4279         DECL_SAVED_FUNCTION_DATA for inline functions.
4280
4281         * init.c (build_member_call): For now, don't convert to
4282         intermediate base if it would cause an error.
4283
4284 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
4285
4286         * parse.y (namespace_qualifier, maybe_identifier,
4287         begin_explicit_instantiation, end_explicit_instantiation,
4288         apparent_template_type, .finish_template_type,
4289         do_id, maybe_init, defarg_again, component_decl_1):
4290         Add ending ';', in accordance with POSIX.
4291
4292 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
4293
4294         PR c++/5571
4295         * class.c (layout_class_type): Remember incomplete static
4296         variables.
4297         (finish_struct_1): Call complete_vars, not
4298         hack_incomplete_structures.
4299         * cp-tree.h (hack_incomplete_structures): Rename to ...
4300         (complete_vars): ... this.
4301         (struct saved_scope): Remove incomplete.
4302         (namespace_scope_incomplete): Remove.
4303         * decl.c (struct binding_level): Remove incomplete.
4304         (incomplete_vars): New variable.
4305         (mark_binding_level): Don't mark incomplete.
4306         (print_binding_level): Don't print it.
4307         (mark_saved_scope): Don't mark incomplete.
4308         (pushdecl): Use maybe_register_incopmlete_var.
4309         (cxx_init_decl_processing): Register incomplete_vars for GC.
4310         (start_decl_1): Clarify error message.
4311         (hack_incomplete_vars): Remove.
4312         (maybe_register_incomplete_var): New function.
4313         (complete_vars): Likewise.
4314
4315 2002-04-06  Jason Merrill  <jason@redhat.com>
4316
4317         PR c++/4934
4318         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
4319         set before checking it.
4320
4321         PR c++/525
4322         * init.c (build_member_call): Use build_scoped_ref.
4323         (resolve_offset_ref): Likewise.
4324         * call.c (build_scoped_method_call): Likewise.
4325         * tree.c (maybe_dummy_object): Kludge around current_class_type being
4326         wrong.
4327         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
4328         * cp-tree.h: Adjust.
4329
4330         * init.c (push_base_cleanups): Just use build_scoped_method_call.
4331
4332         PR c++/6179
4333         * method.c (implicitly_declare_fn): Pass unqualified type to
4334         synthesize_exception_spec.
4335
4336 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
4337
4338         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
4339         * cvt.c: Update comment.
4340         * init.c (expand_cleanup_for_base): Update.
4341         * semantics.c (finish_parenthesized_expr): Update.
4342         * typeck.c (cp_truthvalue_conversion): Update.
4343
4344 2002-04-04  Jason Merrill  <jason@redhat.com>
4345
4346         * semantics.c (finish_eh_cleanup): New fn.
4347         * cp-tree.h: Add prototype.
4348         * init.c (perform_member_init, expand_cleanup_for_base): Use
4349         finish_eh_cleanup.
4350         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
4351         * cp-tree.h: Remove references.
4352         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
4353         * dump.c (cp_dump_tree): Likewise.
4354         * pt.c (tsubst_expr): Likewise.
4355         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
4356         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
4357         * tree.c (cp_statement_code_p): Likewise.
4358
4359         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
4360
4361         PR c++/5636
4362         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
4363         cleanup for nrv.
4364
4365         PR c++/5104
4366         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
4367         specifiers.
4368         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
4369
4370 2002-04-03  Richard Henderson  <rth@redhat.com>
4371
4372         * cp-lang.c (cxx_warn_unused_global_decl): New.
4373         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
4374
4375 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
4376
4377         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
4378         * tree.c (init_tree): Don't set hook.
4379
4380 2002-04-03  Roger Sayle  <roger@eyesopen.com>
4381
4382         PR c++/5998:
4383         * decl.c (duplicate_decls): Don't mess with assembler names when
4384         redeclaring builtin functions as static.
4385
4386 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4387
4388         * call.c (build_addr_func): Update.
4389         * class.c (resolve_address_of_overloaded_function): Update.
4390         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
4391         * cp-tree.h (cxx_mark_addressable): New.
4392         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
4393         * decl2.c (build_cleanup): Update.
4394         * except.c (build_throw): Update.
4395         * init.c (resolve_offset_ref): Update.
4396         * pt.c (convert_nontype_argument): Update.
4397         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
4398         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
4399         unary_complex_lvalue): Update.
4400         (mark_addressable): Rename.
4401
4402 2002-04-01  Roger Sayle  <roger@eyesopen.com>
4403
4404         PR c++/5998:
4405         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
4406         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
4407         but follow the SET_DECL_RTL idiom used elsewhere in the function.
4408
4409 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4410
4411         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
4412         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
4413         * decl.c (grokdeclarator): Update.
4414         * mangle.c (write_integer_cst): Update.
4415         * typeck.c (build_binary_op): Update.
4416
4417 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
4418
4419         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
4420         * lex.c (cxx_init): Don't set hook.
4421
4422 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
4423
4424         * Make-lang.in (error.o): Update.
4425         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
4426         * cp-tree.h (struct diagnostic_context): Predeclare.
4427         (cxx_print_error_function): New.
4428         * error.c: Include langhooks-def.h.
4429         (lang_print_error_function): Rename.  Update.
4430         (init_error): Don't set hook.
4431
4432 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
4433
4434         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
4435         Redefine.
4436         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
4437         * decl.c (finish_enum): Similarly.
4438         * error.c (dump_type): Similarly.
4439         * lex.c (cxx_init): Similarly.
4440         * mangle.c (write_builtin_type): Similarly.
4441         * typeck.c (comptypes): Similarly.
4442
4443 2002-03-28  Roger Sayle  <roger@eyesopen.com>
4444
4445         PR c++/5998:
4446         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
4447         in the g++ front-end.
4448         (duplicate_decl): Allow redefinition of anticipated built-ins.
4449         Fix inlining problem by over-writing the old DECL_RTL.
4450         (lookup_namespace_name): Fail to find an identifier in the
4451         specified namespace if its still anticipated.
4452         (builtin_function_1): New function split out from builtin_function
4453         to create a builtin in the current namespace with given context.
4454         (builtin_function): Call builtin_function_1 to define the
4455         appropriate builtins in both the std and global namespaces.
4456         (select_decl): Don't test for anticipated decls here.
4457         (unqualified_namespace_lookup): Instead ignore them whilst
4458         searching through scopes and namespaces.
4459         * decl2.c (do_nonmember_using_decl): If a using declaration
4460         specifies an anticipated built-in function, mark it as no longer
4461         anticipated in that scope.
4462         (ambiguous_decl):  Avoid resolving to an anticipated decl.
4463         * lex.c (do_scoped_id): Fail to find an identifier in the global
4464         namespace if its still anticipated.
4465
4466 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
4467
4468         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
4469         * cp-tree.h (cp_make_lang_type): Rename.
4470         * lex.c (cp_make_lang_type): Rename.
4471         (make_aggr_type): Update.
4472         * tree.c (init_tree): Don't set make_lang_type_fn.
4473
4474 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
4475
4476         PR c++/6073
4477         * class.c (finish_struct_1): Update static field's DECL_MODE even
4478         if its type is a variant of t.
4479
4480 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
4481
4482         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
4483         * cp-tree.h (cxx_insert_default_attributes): New.
4484         * decl.c (insert_default_attributes): Rename.
4485
4486 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
4487
4488         PR c++/4884
4489         * call.c (build_op_delete_call): Allow for the fact the placement
4490         may be a COMPOUND_EXPR.
4491
4492 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
4493
4494         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
4495         * cp-tree.h (init_cplus_expand): Remove.
4496         (cxx_expand_expr): New.
4497         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
4498         fix prototype.
4499         (init_cplus_expand): Remove.
4500         * lex.c (cxx_init): Don't call init_cplus_expand.
4501
4502 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
4503
4504         PR c++/4884.
4505         * init.c (build_new_1): Allow for the fact the result of
4506         build_function_call may be a COMPOUND_EXPR.
4507
4508 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
4509
4510         PR c++/5682
4511         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
4512         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
4513         (dfs_skip_nonprimary_vbases_markedp): Remove.
4514         * search.c (get_shared_vbase_if_not_primary): Remove.
4515         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
4516         (dfs_skip_nonprimary_vbases_markedp): Remove.
4517         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
4518         (dfs_marked_real_bases_queue_p): Likewise.
4519
4520 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
4521
4522         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
4523         * cp-tree.h (cxx_mark_tree): New.
4524         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
4525
4526 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4527
4528         * cp-tree.h (cxx_maybe_build_cleanup): New.
4529         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
4530         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
4531         * tree.c (build_target_expr): Update.
4532         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
4533
4534 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
4535
4536         * decl2.c (cxx_decode_option): Handle -E.
4537         * lang-specs.h (default_compilers): Preprocess with cc1plus.
4538         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
4539
4540 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
4541
4542         PR c++/6037
4543         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
4544
4545 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4546
4547         * error.c (dump_type): Be careful about implicit typenames.
4548
4549 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4550
4551         PR C++/3656
4552         * semantics.c (finish_base_specifier): Handle erronous base
4553         classes.
4554
4555 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
4556
4557         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
4558         REAL_IS_NOT_DOUBLE.
4559
4560 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
4561
4562         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
4563         an index into the vtable_entry array regardless of
4564         TARGET_PTRMEMFUNC_VBIT_LOCATION.
4565
4566 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
4567
4568         * tree.c (cp_cannot_inline_tree_fn): Same.
4569
4570 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
4571
4572         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
4573         insert_block, getdecls, global_bindings_p): New.
4574
4575 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
4576
4577         PR c++/4361
4578         * mangle.c (struct globals) Add internal_mangling_p member.
4579         (write_template_param): Do internal mangling, if needed.
4580         (mangle_conv_op_name_for_type): Request internal mangling.
4581
4582 2002-03-20  Jason Merrill  <jason@redhat.com>
4583
4584         PR c++/2136
4585         * init.c (build_delete): Check access for a member op delete here.
4586         * decl2.c (delete_sanity): Not here.
4587
4588 2002-03-19  Jason Merrill  <jason@redhat.com>
4589
4590         PR c++/5118
4591         * class.c (get_vfield_name): Use the constructor_name.
4592
4593 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
4594
4595         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
4596         * cp-tree.h (lang_printable_name): Rename.
4597         * error.c (lang_decl_name): Use new hook.
4598         * lex.c (cxx_init): Remove old hook.
4599         * pt.c (tsubst_decl): Use new hook.
4600         * tree.c (lang_printable_name): Rename.
4601
4602 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
4603
4604         PR c++/3882
4605         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
4606         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
4607         only after recording the declaration.
4608
4609 2002-03-18  Jason Merrill  <jason@redhat.com>
4610
4611         PR c++/2039
4612         * init.c (resolve_offset_ref): Hand off to build_component_ref.
4613
4614         PR c++/4222, c++/5995
4615         * call.c (build_over_call): Fix empty class logic.
4616
4617         PR c++/3870
4618         * cp-tree.h (struct saved_scope): Add last_parms field.
4619         * decl.c (maybe_push_to_top_level): Save last_function_parms.
4620         (pop_from_top_level): Restore it.
4621
4622         PR c++/4377
4623         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
4624         NON_LVALUE_EXPRs.
4625
4626         PR c++/4003
4627         * pt.c (tsubst_friend_function): Use decl_namespace_context.
4628
4629         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
4630         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
4631         type with a nontrivial destructor.
4632
4633 2002-03-17  Jason Merrill  <jason@redhat.com>
4634
4635         PR c++/4460
4636         * class.c (build_base_path): Virtual base layout is fixed in
4637         in-charge [cd]tors.
4638
4639 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
4640
4641         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
4642         * parse.y (yyparse): Remove macro.
4643
4644 2002-03-17  Jason Merrill  <jason@redhat.com>
4645
4646         PR c++/5757
4647         * init.c (build_new_1): Pass the right pointer to op delete.
4648
4649 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
4650
4651         PR c++/4361
4652         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
4653         conversion operators go.
4654         (struct lang_decl_flags): Add template_conv_p and unused
4655         bitfields.
4656         (DECL_TEMPLATE_CONV_FN_P): New macro.
4657         * call.c (build_user_type_conversion_1): Don't check second type
4658         conversion of overload set first.
4659         * class.c (add_method): Make sure templated conversion operators
4660         all end up on slot 2.
4661         * lex.c (do_identifier): A conversion operator token might be
4662         satisfied by a templated conversion operator.
4663         * pt.c (check_explicit_specialization): Use
4664         CLASSTYPE_FIRST_CONVERSION_SLOT.
4665         (template_parm_this_level_p): New function.
4666         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
4667         * search.c (lookup_fnfields_1): Template conversions will be on
4668         the first slot.
4669         * typeck.c (build_component_ref): Preserve the type of an
4670         conversion operator name on the overload type.
4671         (build_x_function_call): Retrieve the conversion operator name.
4672
4673 2002-03-15  Richard Henderson  <rth@redhat.com>
4674
4675         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
4676
4677 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
4678
4679         * cp-tree.h (CLEANUP_DECL): Remove.
4680         (CLEANUP_EXPR): Likewise.
4681         * decl.c (destroy_local_var): Simplify.
4682         (maybe_build_cleanup): Tidy.
4683         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
4684         * semantics.c (cp_expand_stmt): Likewise.
4685         * cp/tree.c (cp_statement_code_p): Likewise.
4686
4687 2002-03-15  Jason Merrill  <jason@redhat.com>
4688
4689         PR c++/5857
4690         * decl.c (duplicate_decls): Use merge_types instead of common_type.
4691         * typeck.c (common_type): Just hand off to
4692         type_after_usual_arithmetic_conversions and
4693         composite_pointer_type.
4694         (merge_types): New fn.
4695         (commonparms): Use it instead of common_type.
4696         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
4697         (composite_pointer_type): Also handle attributes.
4698         * cp-tree.h: Declare merge_types.
4699
4700         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
4701         variables.
4702         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
4703
4704 2002-03-14  Richard Henderson  <rth@redhat.com>
4705
4706         * decl.c: Include c-pragma.h.
4707         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
4708         * Make-lang.in: Update dependencies.
4709
4710 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
4711
4712         PR c++/5908
4713         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
4714         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
4715
4716 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
4717
4718         * mangle.c (write_builtin_type): Handle 128-bit integers even if
4719         they are not a standard integer type.
4720
4721 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
4722
4723         * cp-tree.h (init_init_processing): Remove declaration.
4724         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
4725         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
4726
4727 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4728
4729         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
4730         Define.
4731         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
4732         tree_code_length.
4733         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
4734         cplus_tree_code_name): Delete.
4735         (cxx_init): Don't call add_c_tree_codes, instead set
4736         lang_unsafe_for_reeval.  Don't try to copy into the various
4737         tree_code arrays.
4738
4739 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
4740
4741         PR c++/5659
4742         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
4743         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
4744         definitions.
4745
4746 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
4747
4748         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
4749         DR209 is now not a defect.
4750         * cp-tree.h (skip_type_access_control): Remove.
4751         * decl.c (grokdeclarator): Do type access control for friend
4752         declarations.
4753         * semantics.c (decl_type_access_control): Don't reset
4754         current_type_lookups.
4755         (save_type_access_control): Always save the lookups.
4756         (skip_type_access_control): Remove.
4757         (finish_class_definition): Don't change type_lookups.
4758
4759 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
4760
4761         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
4762         It is incorrect.
4763         * typeck.c (build_static_cast): Compare non-qualified types
4764         with pointer to member conversions.
4765
4766 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
4767             Daniel Berlin  <dan@dberlin.org>
4768
4769         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
4770         (cxx_get_alias_set): Use it.
4771
4772 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4773
4774         * cp-tree.h (stabilize_expr): Prototype.
4775
4776 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4777
4778         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
4779         conditional return void.
4780
4781 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
4782
4783         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
4784         * cp-tree.h (cxx_unsave): New.
4785         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
4786         (init_tree): Update.
4787
4788 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4789
4790         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
4791         explicit sizeof/sizeof.
4792         * decl2.c (cxx_decode_option): Likewise.
4793         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
4794
4795 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4796
4797         PR c++/775
4798         * decl.c (lookup_tag): Only reject enum/class mismatch, not
4799         class/union mismatch.
4800         * parse.y (check_class_key): New function.
4801         (structsp): Call it.
4802
4803 2002-03-01  Michael Matz  <matz@suse.de>
4804
4805         * typeck.c (cp_pointer_int_sum): Complete inner type which is
4806         used later by size_in_bytes().
4807
4808 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
4809
4810         * cp-tree.h:  Require __GNUC__ to be #defined.
4811         (build_init):  Add missing prototype.
4812
4813 2002-03-01  Jason Merrill  <jason@redhat.com>
4814
4815         * except.c: Don't include decl.h or obstack.h.  Do include
4816         tree-inline.h.
4817         (build_throw): Destroy temporaries from the thrown
4818         expression before calling __cxa_throw.  Construct a thrown
4819         temporary directly into the exception object.
4820         (stabilize_throw_expr): New function.
4821         (wrap_cleanups_r): New function.
4822         * tree.c (stabilize_expr): New function.
4823         * init.c (build_init): New function.
4824         * Make-lang.in (cp/except.o): Adjust .h deps.
4825
4826 2002-02-28  Jason Merrill  <jason@redhat.com>
4827
4828         * search.c (lookup_base_r): Don't clear is_non_public just because
4829         we found a friendly scope.
4830
4831         * decl.c (finish_function): Only warn about missing return
4832         statement with -Wreturn-type.
4833
4834 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
4835
4836         * class.c (build_clone): Update.
4837         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
4838         * cp-tree.h (cxx_dup_lang_specific_decl): New.
4839         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
4840         (copy_decl): Update.
4841         * method.c (make_thunk): Update.
4842
4843 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
4844
4845         * decl2.c: Delete traditional-mode-related code copied from
4846         the C front end but not used, or used only to permit the
4847         compiler to link.
4848
4849 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
4850
4851         PR c++/4093
4852         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
4853         to void.
4854
4855 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
4856
4857         PR other/5746
4858         * semantics.c (finish_switch_cond): Don't call get_unwidened
4859         if error_mark_node.
4860
4861 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
4862
4863         PR c++/2645, DR 295
4864         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
4865         tf_keep_type_decl.
4866         (make_typename_type): Use tsubst_flags_t.
4867         * decl.c (make_typename_type): Adjust. Return non-artificial
4868         TYPE_DECLs, if required.
4869         (grokdeclarator): Simplify CVR qualification handling. Allow bad
4870         qualifiers on typedef types.
4871         * decl2.c (handle_class_head): Adjust make_typename_type call.
4872         * parse.y (nested_name_specifier): Likewise.
4873         (typename_sub0): Likewise.
4874         (typename_sub1): Likewise.
4875         * pt.c (convert_template_argument): Adjust make_typename_type
4876         return value.
4877         (tsubst): Adjust cp_build_qualified_type_real calls.
4878         (check_cv_quals_for_unify): Cope with allowing bad qualifications
4879         on template type parms.
4880         (instantiate_decl): Recheck substitutions to give warnings on bad
4881         qualifications.
4882         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
4883
4884 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
4885
4886         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
4887
4888         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
4889         unless DECL_ALWAYS_INLINE.
4890
4891 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
4892
4893         * typeck.c (cp_pointer_int_sum): Renamed from
4894         pointer_int_sum, call pointer_int_sum.
4895
4896 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
4897
4898         * decl.c (duplicate_decls): Return 0 if issued error about
4899         redeclaration.
4900
4901 2002-02-19  Jason Merrill  <jason@redhat.com>
4902
4903         ABI change: Mangle `void (A::*)() const' as
4904         M1AKFvvE, not MK1AFvvE.
4905         * mangle.c (write_function_type): Write cv-quals for member
4906         function type here.
4907         (write_pointer_to_member_type): Not here.
4908
4909 2002-02-18  Jason Merrill  <jason@redhat.com>
4910
4911         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
4912         (do_decl_instantiation): Likewise.
4913
4914 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4915
4916         PR c++/5685
4917         * decl.c (duplicate_decls): Make warning unconditional
4918         if duplicate default argument declarations are present.
4919
4920 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
4921
4922         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
4923         shortening.
4924
4925 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
4926
4927         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
4928         remove incorrect comment. Move #if 0'd code to common path. Use
4929         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
4930
4931 2002-02-13  Jason Merrill  <jason@redhat.com>
4932
4933         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
4934         (finish_function): Don't warn if current_function_returns_null.
4935
4936         * typeck2.c (digest_init): Do handle values of vector type.
4937
4938         * typeck2.c (digest_init, process_init_constructor): Treat vectors
4939         like arrays.
4940
4941 2002-02-11  Jason Merrill  <jason@redhat.com>
4942
4943         * parse.y (reserved_declspecs): Don't handle attributes.
4944         (reserved_typespecquals): Handle them here.
4945         * Make-lang.in (parse.c): Adjust expected conflicts.
4946
4947 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
4948
4949         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
4950         instead of compstmt.
4951         (compstmt_or_stmtexpr): Renamed from compstmt.
4952         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
4953
4954 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
4955
4956         Rename instantiate_type_flags to tsubst_flags_t & expand use.
4957         * cp-tree.h (instantiate_type_flags): Rename to ...
4958         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
4959         add tf_warning flag.
4960         (instantiate_type): Adjust prototype.
4961         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
4962         do_type_instantiation, cp_build_qualified_type_real): Likewise.
4963         cp_build_qualified_type: Adjust.
4964         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
4965         tf_*.
4966         * call.c (standard_conversion): Rename itf_* to tf_*.
4967         (reference_binding): Likewise.
4968         (convert_like_real): Likewise.
4969         * cvt.c (cp_convert_to_pointer): Likewise.
4970         (convert_to_reference): Likewise.
4971         * decl.c (lookup_namespace_name): Use tf_* flags.
4972         (make_typename_type): Likewise.
4973         (grokdeclarator): Likewise.
4974         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
4975         (coerce_template_template_parms, convert_template_argument,
4976         coerce_template_parms, maybe_get_template_decl_from_type_decl,
4977         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
4978         instantiate_class_template, tsubst_template_arg_vector,
4979         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
4980         tsubst_decl, tsubst_arg_types, tsubst_function_type,
4981         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
4982         instantiate_template, fn_type_unification,
4983         resolve_overloaded_unification, verify_class_unification,
4984         unify, get_bindings_real, do_type_instantiation,
4985         regenerate_decl_from_template, instantiate_decl,
4986         tsubst_initializer_list, tsubst_enum,
4987         get_mostly_instantiated_function_type,
4988         invalid_nontype_parm_type_p): Likewise.
4989         * tree.c (cp_build_qualified_type_real): Likewise.
4990         * typeck.c (build_binary_op): Rename itf_* to tf_*.
4991         (build_ptrmemfunc): Likewise.
4992         (convert_for_assignment): Likewise.
4993
4994 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
4995
4996         PR c++/109
4997         * decl.c (grokdeclarator): Allow friend declarations from
4998         dependent types.
4999         * decl2.c (handle_class_head): Don't push into template parm contexts.
5000         * pt.c (push_template_decl_real): Template parm contexts are never
5001         being defined.
5002
5003 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
5004
5005         * class.c: Include target.h.
5006         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
5007         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
5008         bit-field layout.
5009         * Make-lang.in: Adjust deps.
5010
5011 2002-02-05  Jason Merrill  <jason@redhat.com>
5012
5013         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
5014
5015 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
5016
5017         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
5018         (finish_switch_cond): Set SWITCH_TYPE.
5019
5020 2002-02-04  Richard Henderson  <rth@redhat.com>
5021
5022         * method.c (use_thunk): Always initialize the block tree.  Reindent.
5023         * semantics.c (expand_body): Emit thunks after function, not before.
5024
5025 2002-02-04  Jason Merrill  <jason@redhat.com>
5026
5027         * decl.c (start_function): Call cplus_decl_attributes immediately
5028         after grokdeclarator.
5029
5030         * decl.c (start_function): Combine DECL_RESULT handling code.
5031
5032 2002-02-03  Jason Merrill  <jason@redhat.com>
5033
5034         * xref.c: Remove.
5035         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
5036         (cp/xref.o): Remove dependencies.
5037         * class.c (finish_struct_1, check_methods): Don't call xref fns.
5038         (finish_struct_1): Likewise.
5039         * friend.c (make_friend_class): Likewise.
5040         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
5041         * spew.c (read_process_identifier): Likewise.
5042
5043 2002-02-01  Jason Merrill  <jason@redhat.com>
5044
5045         PR c++/4872
5046         * decl.c (finish_function): Warn about a non-void function with
5047         no return statement and no abnormal exit.
5048         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
5049         (current_function_returns_abnormally): New macro.
5050         * call.c (build_call): Set it.
5051
5052         * typeck.c (build_component_ref): Always complain about offsetof
5053         constructs on non-PODs.  Only make it an error for members of
5054         virtual bases.
5055
5056         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
5057         (dump_function_decl): Always dump parms.
5058
5059         * decl2.c (finish_static_data_member_decl): Complain about a local
5060         class with a static data member.
5061
5062         PR c++/4286
5063         * search.c (lookup_field_1): Don't xref a static data member
5064         just because we looked it up.
5065
5066 2002-01-31  Jason Merrill  <jason@redhat.com>
5067
5068         * Make-lang.in (parse.c): Handle .output file.
5069
5070         PR c++/3395
5071         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
5072         not TREE_TYPE.
5073         * semantics.c (finish_class_definition): Adjust.
5074
5075         Allow attributes in parms and casts.
5076         * parse.y (named_parm): Don't strip attrs.
5077         (declmods): Remove 'attributes' production.
5078         (nonempty_cv_qualifiers): Accept attributes.
5079         (ATTRIBUTE): Give precedence.
5080         * decl.c (groktypename): Handle attributes.
5081         (grokparms): Likewise.
5082
5083 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
5084
5085         * decl2.c (cxx_decode_option): Pass 0 as last argument to
5086         cpp_handle_option.
5087         * lang-specs.h: Use cpp_unique_options instead of cpp_options
5088         when used together with cc1_options.
5089
5090 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
5091
5092         PR c++/5132
5093         * typeck2.c (digest_init): Make sure non-array core type is
5094         instantiated.
5095         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
5096         constructor, rather than build a new one.
5097         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
5098         PURPOSE of constructor elts.
5099
5100 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
5101
5102         * Make-lang.in (parse.c): Adjust expected number of
5103         shift-reduce conflicts.
5104         (decl.o): Depend on diagnostic.h.
5105         * decl.c: Include diagnostic.h.
5106         (grokdeclarator): Check for null pointer.
5107         (finish_function): Don't abort when
5108         current_binding_level->parm_flag != 1, if errors have
5109         occurred; throw away the statement tree and extra binding
5110         levels, and continue.
5111         * lex.c (note_list_got_semicolon): Check for null pointer.
5112         * method.c (hack_identifier): Just return error_mark_node if
5113         value is error_mark_node.
5114         * parse.y (primary: TYPEID(type_id)): No need to use
5115         TYPE_MAIN_VARIANT here.
5116         (handler_seq): Accept an empty list of catch clauses and
5117         generate a fake handler block to avoid later crashes.
5118         (ansi_raise_identifier): Accept the error token too.
5119         * semantics.c (begin_class_definition,
5120         finish_class_definition): Check for error_mark_node.
5121
5122 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
5123
5124         * typeck2.c (friendly_abort): Delete definition.
5125         * cp-tree.h (friendly_abort): Don't prototype.
5126         (my_friendly_assert): Use fancy_abort.
5127
5128 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5129
5130         * cp-tree.h (my_friendly_abort): Remove.
5131
5132 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
5133
5134         * spew.c (pending_inlines, pending_inlines_tail,
5135         processing_these_inlines): Make static.
5136         (mark_pending_inlines): Remove static.
5137         (begin_parsing_inclass_inline): If in function, save pi
5138         for GC to cp_function_chain->unparsed_inlines instead.
5139         (process_next_inline): Likewise.
5140         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
5141         (mark_pending_inlines): Add prototype.
5142         * decl.c (spew_debug): Remove unused extern.
5143         (mark_lang_function): Call mark_pending_inlines.
5144
5145 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5146
5147         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
5148         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
5149         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
5150         Change my_fancy_abort() to abort().
5151
5152 2002-01-23  Jason Merrill  <jason@redhat.com>
5153
5154         PR c++/5453
5155         * class.c (fixed_type_or_null): Fix thinko.
5156
5157         PR c++/3331
5158         * init.c (resolve_offset_ref): Use build_indirect_ref.
5159
5160         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
5161
5162 2002-01-22  Jason Merrill  <jason@redhat.com>
5163
5164         * parse.y (function_body): Suppress the block for the outermost
5165         curly braces.
5166         * decl.c (pushdecl): Don't try to skip it.
5167         (begin_function_body): Keep the block we create, not the next one.
5168         * init.c (emit_base_init): Don't mess with keep_next_level.
5169
5170         * class.c (build_base_path): Tweak formatting.
5171
5172 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5173
5174         Fix regression introduced with patch for c++/775
5175         * parse.y (class_head_defn): Check for template specializations
5176         with a different class-key.
5177
5178 2002-01-17  Jason Merrill  <jason@redhat.com>
5179
5180         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
5181         (begin_function_body): Call them and keep_next_level.
5182         * init.c (emit_base_init): Call keep_next_level.
5183         * semantics.c (setup_vtbl_ptr): Lose.
5184         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
5185         (vtbls_set_up_p): Lose.
5186         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
5187         * method.c (do_build_copy_constructor): Likewise.
5188         (synthesize_method): Call finish_mem_initializers.
5189         * parse.y (nodecls): Likewise.
5190
5191         * error.c (dump_type_suffix): Print the exception specs before
5192         recursing.
5193         (dump_function_decl): Here, too.
5194
5195         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
5196
5197 2002-01-10  Ira Ruben   <ira@apple.com>
5198
5199         PR c++/907
5200         * decl.c (start_method): Handle attrlist.
5201
5202 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
5203
5204         * decl2.c (max_tinst_depth): Increase default limit to 500.
5205
5206 2002-01-10  Graham Stott  <grahams@redhat.com>
5207
5208         * spew.c (YYCHAR): Uppercase macro parameter and add
5209         parenthesis.
5210         (YYCODE): Likewise.
5211         (NAME): Uppercase macro parameter.
5212
5213 2002-01-09  Graham Stott  <grahams@redhat.com>
5214
5215         * decl.h (grokdeclarator): Wrap long line.
5216
5217         * semantics.c (FINISH_COND): Uppercase macro paramaters and
5218         add parenthesis.
5219
5220 2002-01-08  Graham Stott  <grahams@redhat.com>
5221
5222         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
5223         (PALLOC): Uppercase macro parameter and whitespace.
5224         (SALLOC): Uppercase macro parameter.
5225         (SFREE): Uppercase macros parameter, add parenthese and
5226         whitespace.
5227         (STREQL): Uppercase macro parameter and whitespace.
5228         (STRNEQ): Likewise.
5229         (STRLSS): Likewise.
5230         (STRLEQ): Likewise.
5231         (STRGTR): Likewise.
5232         (STRGEQ): Likewise.
5233
5234         * call.c (convert_like): Add parenthesis and wrap.
5235         (convert_like_with_context): Likewise.
5236         (ICS_RANK): Whitespace.
5237         (NEED_TEMPORARY_P): Remove parenthesis.
5238
5239         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
5240         whitespace.
5241         (VTT_MARKED_BINFO_P): Likewise.
5242
5243         * decl.c (BINDING_LEVEL): Add parenthesis.
5244         (DEF_OPERATOR): Likewise.
5245
5246         * mangle.c (MANGLE_TRACE): Add parenthesis.
5247         (MANGLE_TRACE_TREE): Likewise.
5248         (write_signed_number): Likewise.
5249         (write_unsigned_number): Likewise.
5250
5251         * pt.c (ccat): Uppercase macro parameter.
5252         (cat): Likewise
5253
5254         * search.c (SET_BINFO_ACCESS): Add parenthesis.
5255
5256 2002-01-07  Jason Merrill  <jason@redhat.com>
5257
5258         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
5259         to pedwarn.
5260
5261         PR c++/3536
5262         * method.c (make_thunk): If !flag_weak, give the thunk the
5263         function's linkage.
5264         (use_thunk): Here, too.
5265
5266 2002-01-07  Graham Stott  <grahams@redhat.com>
5267
5268         * error.c: Update copyright date.
5269         (print_scope_operator): Add parenthesis.
5270         (print_left_paren): Likewise.
5271         (print_right_paren): Likewise.
5272         (print_left_bracket): Likewise.
5273         (print_right_bracket): Likewise.
5274         (print_template_argument_list_start): Likewise.
5275         (print_template_argument_list_end): Likewise.
5276         (print_non_consecutive_character): Likewise.
5277         (print_tree_identifier): Likewise.
5278         (print_identifier): Likewise.
5279         (NEXT_CODE): Uppercase macro parameter.
5280         (ident_fndecl): Delete unused.
5281         (GLOBAL_THING): Likewise.
5282
5283 2002-01-06  Graham Stott  <grahams@redhat.com>
5284
5285         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
5286         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
5287         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
5288         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
5289         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
5290         (C_IS_RESERVED_WORD): Uppercase macro parameter.
5291         (C_RID_YYCODE) Likewise.
5292         (ptrmem_cst): Use rtx.
5293         (LOCAL_BINDING_P): Add whitespace.
5294         (INHERITED_VALUE_BINDING_P): Likewise.
5295         (BINDING_SCOPE): Wrap long line.
5296         (BINDING_HAS_LEVEL_P): Remove parenthesis.
5297         (BINDING_VALUE): Wrap long line.
5298         (BINDING_TYPE): Whitespace.
5299         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
5300         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
5301         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
5302         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
5303         (same_type_p): Uppercase macro parameters.
5304         (same_type_ignoring_top_level_qualifiers_p): Likewise.
5305         (OVL_FUNCTION): Wrap long line.
5306         (OVL_CHAIN): Whitespace.
5307         (OVL_CURRENT): Add parenthesis and whitespace.
5308         (OVL_NEXT): Whitespace.
5309         (OVL_USED): Likewise.
5310         (IDENTIFIER_TYPE_VALUE): Likewise.
5311         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
5312         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
5313         (LANG_ID_FIELD): Whitespace.
5314         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
5315         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
5316         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
5317         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
5318         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
5319         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
5320         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
5321         (IDENTIFIER_VIRTUAL_P): Likewise.
5322         (IDENTIFIER_OPNAME_P): Likewise.
5323         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
5324         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
5325         (C_SET_EXP_ORIGINAL_CODE): Likewise.
5326         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
5327         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
5328         (IS_AGGR_TYPE): Uppercase macro parameter.
5329         (CLASS_TYPE_P): Likewise.
5330         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
5331         (IS_AGGR_TYPE_2): Whitespace.
5332         (TAGGED_TYPE_P): Uppercase macro parameter.
5333         (TYPE_BUILT_IN): Whitespace.
5334         (TYPE_FOR_JAVA): Likewise.
5335         (FUNCTION_ARG_CHAIN): Remove parenthesis.
5336         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
5337         (FUNCTION_FIRST_USER_PARAM): Likewise.
5338         (PROMOTES_TO_AGGR_TYPE): Whitespace.
5339         (DERIVED_FROM_P): Add parenthesis and wrap.
5340         (UNIQUELY_DERIVED_FROM_P): Likewise.
5341         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
5342         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
5343         (CLASSTYPE_USE_TEMPLATE): Whitespace.
5344         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
5345         (TYPE_GETS_DELETE): Add parenthesis.
5346         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
5347         (TYPE_HAS_ASSIGN_REF): Likewise,
5348         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
5349         (TYPE_HAS_INIT_REF): Likewise.
5350         (TYPE_HAS_CONST_INIT_REF): Likewise.
5351         (TYPE_BEING_DEFINED): Likewise.
5352         (TYPE_LANG_SPECIFIC): Likewise.
5353         (CLASSTYPE_RTTI): Likewise.
5354         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
5355         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
5356         (TYPE_OVERLOADS_ARROW): Likewise.
5357         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
5358         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
5359         (CLASSTYPE_METHOD_VEC): Likewise.
5360         (CLASSTYPE_MARKED_N): Likewise.
5361         (CLASSTYPE_MARKED): Likewise.
5362         (CLASSTYPE_MARKED2): Likewise.
5363         (CLASSTYPE_MARKED3): Likewise.
5364         (CLASSTYPE_MARKED4): Likewise.
5365         (CLASSTYPE_MARKED5): Likewise.
5366         (CLASSTYPE_MARKED6): Likewise.
5367         (SET_CLASSTYPE_MARKED): Whitespace.
5368         (CLEAR_CLASSTYPE_MARKED): Likewise.
5369         (SET_CLASSTYPE_MARKED2): Likewise.
5370         (CLEAR_CLASSTYPE_MARKED2): Likewise.
5371         (SET_CLASSTYPE_MARKED3): Likewise.
5372         (CLEAR_CLASSTYPE_MARKED3): Likewise.
5373         (SET_CLASSTYPE_MARKED4): Likewise.
5374         (CLEAR_CLASSTYPE_MARKED4): Likewise.
5375         (SET_CLASSTYPE_MARKED5): Likewise.
5376         (CLEAR_CLASSTYPE_MARKED5): Likewise.
5377         (SET_CLASSTYPE_MARKED6): Likewise.
5378         (CLEAR_CLASSTYPE_MARKED6): Likewise.
5379         (CLASSTYPE_TAGS): Likewise.
5380         (CLASSTYPE_VSIZE): Likewise.
5381         (CLASSTYPE_VBASECLASSES): Likewise.
5382         (CANONICAL_BINFO): Add parenthesis.
5383         (CLASSTYPE_SIZE(NODE): Likewise.
5384         (CLASSTYPE_SIZE_UNIT): Likewise.
5385         (CLASSTYPE_ALIGN(NODE): Likewise.
5386         (CLASSTYPE_USER_ALIGN): Likewise.
5387         (TYPE_JAVA_INTERFACE): Likewise.
5388         (CLASSTYPE_PURE_VIRTUALS): Likewise.
5389         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
5390         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
5391         (CLASSTYPE_HAS_MUTABLE): Likewise.
5392         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
5393         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
5394         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
5395         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
5396         (CLASSTYPE_INTERFACE_ONLY): Likewise.
5397         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
5398         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5399         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
5400         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5401         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
5402         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
5403         (BINFO_UNSHARED_MARKED): Whitespace.
5404         (BINFO_MARKED): Whitespace and wrap.
5405         (SET_BINFO_MARKED): Likewise.
5406         (CLEAR_BINFO_MARKED): Likewise.
5407         (BINFO_VTABLE_PATH_MARKED): Likewise.
5408         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
5409         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
5410         (BINFO_SUBVTT_INDEX): Remove parenthesis.
5411         (BINFO_VPTR_INDEX): Likewise.
5412         (BINFO_PRIMARY_BASE_OF): Likewise,
5413         (CLASSTYPE_VFIELDS): Whitespace.
5414         (VF_DERIVED_VALUE): Wrap long line.
5415         (NAMESPACE_LEVEL): Whitespace.
5416         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
5417         (DEFARG_POINTER): Whitespace.
5418         (DECL_NEEDED_P): Remove parenthesis.
5419         (DECL_LANGUAGE): Whitespace.
5420         (SET_DECL_LANGUAGE): Add parenthesis.
5421         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
5422         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
5423         (DECL_IN_AGGR_P): Whitespace.
5424         (DECL_FRIEND_P): Likewise.
5425         (DECL_BEFRIENDING_CLASSES): Likewise.
5426         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
5427         (DECL_NONCONVERTING_P): Whitespace.
5428         (DECL_PURE_VIRTUAL_P): Likewise.
5429         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
5430         (DECL_PENDING_INLINE_INFO): Whitespace.
5431         (DECL_SORTED_FIELDS): Likewise.
5432         (DECL_DEFERRED_FN): Likewise.
5433         (DECL_TEMPLATE_INFO): Likewise.
5434         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
5435         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
5436         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
5437         (TMPL_ARGS_LEVEL): Likewise.
5438         (SET_TMPL_ARGS_LEVEL): Likewise.
5439         (INNERMOST_TEMPLATE_PARMS): Whitespace.
5440         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
5441         (INTEGRAL_CODE_P(CODE): Add parenthesis.
5442         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
5443         (TYPE_HAS_CONSTRUCTOR): Whitespace.
5444         (TREE_HAS_CONSTRUCTOR): Likewise.
5445         (TYPE_HAS_DESTRUCTOR): Likewise.
5446         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
5447         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
5448         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
5449         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
5450         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
5451         (TYPE_PTRMEMFUNC_P): Likewise.
5452         (TYPE_PTRMEMFUNC_FLAG): Likewise.
5453         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
5454         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
5455         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
5456         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5457         (DECL_ACCESS): Whitespace.
5458         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
5459         (DECL_GLOBAL_DTOR_P): Likewise.
5460         (GLOBAL_INIT_PRIORITY): Likewise.
5461         (DECL_TEMPLATE_PARMS): Likewise.
5462         (DECL_TEMPLATE_RESULT): Likewise.
5463         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
5464         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
5465         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
5466         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
5467         (PRIMARY_TEMPLATE_P): Add parenthesis.
5468         (DECL_USE_TEMPLATE): Whitespace.
5469         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
5470         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
5471         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
5472         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
5473         (CALL_DECLARATOR_PARMS): Remove parenthesis.
5474         (CALL_DECLARATOR_QUALS): Likewise.
5475         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
5476         (TEMP_NAME_P): Wrap.
5477         (VFIELD_NAME_P): Likewise.
5478         (B_SET): Uppercase macro parameters and add parenthesis.
5479         (B_CLR): Likewise.
5480         (B_TST): Likewise.
5481         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
5482         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
5483         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
5484         (same_or_base_type_p): Likewise.
5485         (cp_deprecated): Likewise.
5486
5487 2002-01-05  Richard Henderson  <rth@redhat.com>
5488
5489         * semantics.c (expand_body): Revert last change.
5490
5491 2002-01-04  Jason Merrill  <jason@redhat.com>
5492
5493         PR c++/4122
5494         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
5495         lost primary.
5496
5497         * class.c (build_vtbl_initializer): Check for a lost primary
5498         before calculating the vtable entry to throw away.
5499
5500 2002-01-02  Jason Merrill  <jason@redhat.com>
5501
5502         * semantics.c (expand_body): Call outlining_inline_function when
5503         emitting an inline function out of line.
5504
5505 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5506
5507         PR c++/5116, c++/764 reversion
5508         * call.c (build_new_op): Revert the instantiations. They are
5509         incorrect.
5510
5511 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5512
5513         PR c++/5089
5514         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
5515
5516 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5517
5518         PR c++/3716
5519         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
5520         (tsubst, case POINTER_TYPE): Handle pmfs here.
5521         (tsubst, case OFFSET_TYPE): Check it is not an offset to
5522         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
5523
5524 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5525
5526         PR c++/35
5527         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
5528         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
5529         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
5530         PARM_DECL.
5531         (tsubst_template_parms): Break up loop statements.
5532         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
5533         parm PARM_DECLs don't get promoted.
5534
5535 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5536
5537         PR c++/5123
5538         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
5539         (build_x_function_call): Cope with a COMPONENT_REF containing a
5540         TEMPLATE_ID_EXPR.
5541
5542 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5543
5544         PR c++/5213
5545         * pt.c (convert_template_argument): Be more careful determining
5546         when RECORD_TYPE templates are or are not templates.
5547
5548 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5549
5550         PR c++/775
5551         * cp-tree.h (handle_class_head): Adjust prototype.
5552         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
5553         parameters. Use for all class heads.
5554         * parse.y (named_class_head_sans_basetype, named_class_head,
5555         named_complex_class_head_sans_basetype,
5556         named_class_head_sans_basetype_defn,
5557         unnamed_class_head): Remove.
5558         (class_head, class_head_apparent_template): Recognize class heads
5559         (class_head_decl, class_head_defn): New reductions. Process class
5560         heads.
5561         (structsp): Adjust class definition and class declaration
5562         reductions.
5563         (maybe_base_class_list): Give diagnostic on empty list.
5564
5565 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5566
5567         PR c++/4379
5568         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
5569         single non-static member.
5570         (unary_complex_lvalue): If it cannot be a pointer to member, don't
5571         make it so. Check it is not pointer to reference.
5572
5573 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5574
5575         PR c++/5132
5576         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
5577         are processing a template decl.
5578
5579 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5580
5581         PR c++/5116, c++/764
5582         * call.c (build_new_op): Make sure template class operands are
5583         instantiated. Simplify arglist construction.
5584
5585 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
5586
5587         * call.c (build_user_type_conversion_1): Use my_friendly_assert
5588         rather than if ... abort.
5589         * cvt.c (convert_to_reference): Likewise.
5590         * semantics.c (setup_vtbl_ptr): Likewise.
5591         * pt.c (lookup_template_class): Comment typo.
5592
5593 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
5594
5595         PR c++/5125
5596         * pt.c (push_template_decl_real): Make sure DECL has
5597         DECL_LANG_SPECIFIC.
5598
5599 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
5600
5601         PR c++/335
5602         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
5603         for non-reference fields.
5604         * typeck.c (require_complete_type): Use resolve_offset_ref).
5605
5606 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
5607
5608         PR c++/196
5609         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
5610
5611 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
5612
5613         PR c++/160
5614         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
5615         up. Don't stabilize_references when initializing a reference.
5616
5617 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5618
5619         * decl2.c (lang_f_options): Const-ify.
5620
5621 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
5622
5623         * config-lang.in (diff_excludes): Remove.
5624
5625 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
5626
5627         PR c++/90
5628         * typeck.c (build_function_call_real): Use original function
5629         expression for errors.
5630
5631 2001-12-18  Jason Merrill  <jason@redhat.com>
5632
5633         PR c++/3242
5634         * class.c (add_method): Do compare 'this' quals when trying to match a
5635         used function.  Don't defer to another used function.
5636
5637 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
5638
5639         * pt.c (instantiate_clone): Remove, fold into ...
5640         (instantiate_template): ... here. Simplify by removing mutual
5641         recursion.
5642         * typeck2.c (build_m_component_ref): Don't cv qualify the function
5643         pointed to by a pointer to function.
5644         * class.c (delete_duplicate_fields_1): Typo.
5645
5646 2001-12-18  Jason Merrill  <jason@redhat.com>
5647
5648         C++ ABI change: destroy value arguments in caller.
5649         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
5650         create an extra binding level for the parameters.
5651         * decl.c (store_parm_decls): Don't do parameter cleanups.
5652
5653 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
5654
5655         * call.c (build_new_method_call): Use '%#V'.
5656         * error.c (cv_to_string): Use V parameter to determine padding.
5657
5658 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
5659
5660         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
5661         spellings in messages.
5662
5663 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
5664
5665         * cp-tree.h: Delete #defines for cp_error, cp_warning,
5666         cp_pedwarn, and cp_compiler_error.
5667         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
5668         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
5669         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
5670         typeck2.c: Change calls to the above macros to use their
5671         language-independent equivalents: error, warning, pedwarn, and
5672         internal_error respectively.
5673
5674 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
5675
5676         * decl2.c (finish_file): Remove back_end_hook.
5677
5678 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
5679
5680         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
5681         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
5682         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
5683
5684 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
5685
5686         * lang-options.h: Use American spelling in messages.
5687
5688 2001-12-13  Jason Merrill  <jason@redhat.com>
5689
5690         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
5691
5692         Use cleanups to run base and member destructors.
5693         * init.c (push_base_cleanups): New function, split out from...
5694         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
5695         * decl.c (finish_destructor_body): Move vbase destruction code to
5696         push_base_cleanups.
5697         (begin_function_body, finish_function_body): New fns.
5698         (finish_function): Move [cd]tor handling and call_poplevel to
5699         finish_function_body.
5700         (pushdecl): Skip the new level.
5701         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
5702         (setup_vtbl_ptr): Call push_base_cleanups.
5703         * method.c (synthesize_method): Call {begin,end}_function_body.
5704         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
5705         * cp-tree.h: Declare new fns.
5706         * parse.y (function_body, .begin_function_body): New nonterminals.
5707         (fndef, pending_inline, function_try_block): Use function_body.
5708         (ctor_initializer_opt, function_try_block): No longer has a value.
5709         (base_init): Remove .set_base_init token.
5710         (.set_base_init, compstmt_or_error): Remove.
5711         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
5712
5713         * optimize.c (maybe_clone_body): Fix parameter updating.
5714
5715 2001-12-12  Jason Merrill  <jason@redhat.com>
5716
5717         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
5718         * semantics.c (genrtl_start_function): Don't pass
5719         parms_have_cleanups or push an extra binding level.
5720         (genrtl_finish_function): Lose cleanup_label cruft.
5721
5722         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
5723         (ctor_label): Remove.
5724         * semantics.c (finish_return_stmt): Lose ctor_label support.
5725         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
5726         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
5727         dtor_label.
5728
5729         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
5730         check for [cd]tors.
5731         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
5732
5733         * decl.c (finish_function): Check VMS_TARGET, not VMS.
5734
5735         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
5736         (end_cleanup_fn): And poplevel.
5737
5738         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
5739         if we're in a template.
5740
5741 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
5742
5743         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
5744         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
5745         THIS_NAME_P): Delete.
5746         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
5747         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
5748         with internal naming scheme.
5749         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
5750
5751 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
5752
5753         * decl.c (grokdeclarator): Deprecated implicit typename use.
5754
5755 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
5756
5757         PR g++/51
5758         * parse.y (frob_specs): Indicate it is a language linkage which
5759         contained the extern.
5760         * decl.c (grokdeclarator): Allow extern language linkage with
5761         other specifiers.
5762
5763 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
5764
5765         PR g++/72
5766         * decl.c (add_binding): Don't reject duplicate typedefs involving
5767         template parameters.
5768
5769 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
5770
5771         * parse.y, semantics.c: Similarly.
5772
5773 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
5774
5775         PR g++/87
5776         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
5777         (copy_args_p): Rename to ...
5778         (copy_fn_p): ... here.
5779         (grok_special_member_properties): New function.
5780         (grok_op_properties): Lose VIRTUALP parameter.
5781         (copy_assignment_arg_p): Remove.
5782         * call.c (build_over_call): Use copy_fn_p.
5783         * decl.c (grokfndecl): Reformat. Adjust call to
5784         grok_op_properties.
5785         (copy_args_p): Rename to ...
5786         (copy_fn_p): ... here. Reject template functions. Check for pass
5787         by value.
5788         (grok_special_member_properties): Remember special functions.
5789         (grok_ctor_properties): Don't remember them here, just check.
5790         (grok_op_properties): Likewise.
5791         (start_method): Call grok_special_member_properties.
5792         * decl2.c (grokfield): Likewise.
5793         (copy_assignment_arg_p): Remove.
5794         (grok_function_init): Don't remember abstract assignment here.
5795         * pt.c (instantiate_class_template): Call
5796         grok_special_member_properties.
5797         (tsubst_decl): Adjust grok_op_properties call.
5798
5799 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
5800
5801         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
5802         RID_TYPES_COMPATIBLE_P.
5803
5804 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5805
5806         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
5807         call to build_aggr_init.
5808         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
5809
5810 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
5811
5812         * parse.y: Replace uses of the string non-terminal with STRING.
5813         Don't perform string concatentaion here.
5814         (string): Remove non-terminal.
5815         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
5816
5817 2001-12-05  Jason Merrill  <jason@redhat.com>
5818
5819         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
5820         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
5821         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
5822         * pt.c (push_tinst_level): No longer static.
5823         * cp-tree.h: Declare them.
5824
5825         * init.c (resolve_offset_ref): Don't check access for the base
5826         conversion to access a FIELD_DECL.
5827
5828         * cp-tree.h (TYPE_REFFN_P): New macro.
5829         * decl.c (bad_specifiers): Check it, too.
5830
5831         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
5832         on the __*_type_info type if we haven't seen a definition.
5833
5834 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
5835
5836         * decl.c: Include c-common.h.
5837         (shadow_warning): Move to c-common.c.
5838
5839 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5840
5841         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
5842
5843 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
5844
5845         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
5846
5847 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
5848
5849         PR g++/164
5850         * init.c (sort_base_init): Allow binfos to be directly specified.
5851         * method.c (do_build_copy_constructor): Explicitly convert to the
5852         base instance.
5853         (do_build_assign_ref): Likewise.
5854
5855 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
5856
5857         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
5858         declaration and initialization.
5859
5860 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
5861
5862         * typeck2.c: Remove leading capital from diagnostic messages, as
5863         per GNU coding standards.
5864
5865 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
5866
5867         PR c++/3394
5868         * decl.c (xref_basetypes): Handle attributes between
5869         'class' and name.
5870
5871 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
5872
5873         PR g++/3381
5874         * parse.y (named_complex_class_head_sans_basetype): Add new
5875         reduction.
5876         * Make-lang.in (parse.c): Adjust expected conflict count.
5877
5878 2001-12-03  Jason Merrill  <jason@redhat.com>
5879
5880         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
5881         immediate binfos for our virtual bases.
5882
5883 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
5884
5885         * call.c (build_java_interface_fn_ref): Similarly.
5886         * except.c (is_admissible_throw_operand): Similarly.
5887         * init.c (build_java_class_ref): Similarly.
5888         * xref.c (open_xref_file): Similarly.
5889
5890 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5891
5892         * class.c (finish_struct): Remove trailing periods from messages.
5893         * decl.c (check_tag_decl): Similarly.
5894         * lex.c (cxx_set_yydebug): Similarly.
5895         * typeck2.c (friendly_abort): Similarly.
5896
5897 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5898
5899         PR c++/3048
5900         * cp-tree.h (ovl_member): Remove.
5901         * decl2.c (merge_functions): Handle extern "C" functions
5902         specially.
5903         * tree.c (ovl_member): Remove.
5904
5905 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5906
5907         PR c++/4842
5908         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
5909         FUNCTION_DECL, as input.
5910         (mark_overriders): Remove.
5911         (warn_hidden): Rework for the new ABI.
5912
5913 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5914
5915         PR c++/3471
5916         * call.c (convert_like_real): Do not build additional temporaries
5917         for rvalues of class type.
5918
5919 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5920
5921         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
5922         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
5923         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
5924         (DERIVED_FROM_P): Likewise.
5925         (enum base_access): Renumber, add ba_quiet bit mask.
5926         (get_binfo): Remove.
5927         (get_base_distance): Remove.
5928         (binfo_value): Remove.
5929         (ACCESSIBLY_DERIVED_FROM_P): Remove.
5930         * call.c (standard_conversion): Use lookup_base.
5931         * class.c (strictly_overrides): Likewise.
5932         (layout_virtual_bases): Likewise.
5933         (warn_about_ambiguous_direct_bases): Likewise.
5934         (is_base_of_enclosing_class): Likewise.
5935         (add_vcall_offset_vtbl_entries_1): Likewise.
5936         * cvt.c (build_up_reference): Adjust comment.
5937         * init.c (build_member_call): Reformat.
5938         * search.c (get_binfo): Remove.
5939         (get_base_distance_recursive): Remove.
5940         (get_base_distance): Remove.
5941         (lookup_base_r): Tweak.
5942         (lookup_base): Add ba_quiet control. Complete the types here.
5943         (covariant_return_p): Use lookup_base.
5944         * tree.c (binfo_value): Remove.
5945         (maybe_dummy_object): Use lookup_base.
5946         * typeck.c (build_static_cast): Use lookup_base.
5947         (get_delta_difference): Likewise.
5948         * typeck2.c (binfo_or_else): Use lookup_base.
5949         (build_scoped_ref): Add back error_mark_check.
5950         (build_m_component_ref): Use lookup_base.
5951
5952 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
5953
5954         * Make-lang.in (c++.generated-manpages): New dummy target.
5955
5956 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5957
5958         * Make-lang.in (cp-lang.o): Depends on c-common.h.
5959         * cp-lang.c (c-common.h): Include.
5960         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
5961         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
5962         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
5963
5964 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5965
5966         * decl2.c (c_language): Move to c-common.c.
5967         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
5968         functions.
5969         (cxx_init): Update.
5970
5971 2001-11-26  Jason Merrill  <jason@redhat.com>
5972
5973         * call.c (joust): Remove COND_EXPR hack.
5974
5975 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
5976
5977         * search.c (lookup_base_r): Declare bk in variable declaration
5978         space.
5979
5980 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
5981
5982         PR g++/3145
5983         * class.c (build_vbase_pointer): Remove.
5984         (build_vbase_path): Remove.
5985         (build_base_path): New function.
5986         * cp-tree.h (base_access, base_kind): New enumerations.
5987         (build_base_path): Declare.
5988         (convert_pointer_to_real): Remove.
5989         (convert_pointer_to): Remove.
5990         (lookup_base): Declare.
5991         (convert_pointer_to_vbase): Remove.
5992         * call.c (build_scoped_method_call): Use lookup_base &
5993         build_base_path instead of convert_pointer_to_real,
5994         get_base_distance & get_binfo.
5995         (build_over_call): Likewise.
5996         * cvt.c (cp_convert_to_pointer): Likewise.
5997         (convert_to_pointer_force): Likewise.
5998         (build_up_reference): Likewise.
5999         (convert_pointer_to_real): Remove.
6000         (convert_pointer_to): Remove.
6001         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
6002         instead of convert_pointer_to_vbase & build_vbase_path.
6003         (emit_base_init): Use build_base_path instead of
6004         convert_pointer_to_real.
6005         (expand_virtual_init): Lose unrequired conversions.
6006         (resolve_offset_ref): Use lookup_base and build_base_path
6007         instead of convert_pointer_to.
6008         * rtti.c (build_dynamic_cast_1): Use lookup_base &
6009         build_base_path instead of get_base_distance & build_vbase_path.
6010         * search.c (get_vbase_1): Remove.
6011         (get_vbase): Remove.
6012         (convert_pointer_to_vbase): Remove.
6013         (lookup_base_r): New function.
6014         (lookup_base): New function.
6015         * typeck.c (require_complete_type): Use lookup_base &
6016         build_base_path instead of convert_pointer_to.
6017         (build_component_ref): Likewise.
6018         (build_x_function_call): Likewise.
6019         (get_member_function_from_ptrfunc): Likewise.
6020         (build_component_addr): Likewise.
6021         * typeck2.c (build_scoped_ref): Likewise.
6022
6023 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6024
6025         * cp-tree.h (CP_TYPE_QUALS): Removed.
6026         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
6027         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
6028         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
6029         * dump.c (cp_dump_tree): Use void* dump_info argument to match
6030         lang-hooks prototype.
6031         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
6032         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
6033         CP_TYPE_QUALS changed to cp_type_quals.
6034         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
6035         (CXX_C_OBJS): Remove c-dump.o.
6036
6037 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
6038
6039         PR c++/3637
6040         * pt.c (lookup_template_class): Ensure that all specializations
6041         are registered on the list corresponding to the most general
6042         template.
6043
6044 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
6045
6046         * call.c (non_reference): Add documentation.
6047         (convert_class_to_reference): Do not strip reference types
6048         from conversion operators.
6049         (maybe_handle_ref_bind): Simplify.
6050         (compare_ics): Correct handling of references.
6051
6052 2001-11-19  John Wilkinson <johnw@research.att.com>
6053
6054         * dump.c (dump_op): New function.
6055         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
6056         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
6057         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
6058
6059 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
6060
6061         PR4629
6062         * semantics.c (finish_sizeof): Make sure that expression created
6063         while processing a template do not have a type.
6064         (finish_alignof): Likewise.
6065         * typeck.c (c_sizeof): Likewise.
6066         (expr_sizeof): Likewise.
6067
6068 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
6069
6070         * lex.c (cxx_finish): Call c_common_finish.
6071         (finish_parse): Remove.
6072
6073 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6074
6075         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
6076         when displaying error message about missing array bounds.
6077
6078 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6079
6080         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
6081         CONST_CAST_EXPR.
6082         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
6083
6084 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
6085
6086         * cp-tree.h (print_class_statistics): Restore.
6087
6088 2001-11-15  Jason Merrill  <jason@redhat.com>
6089
6090         * method.c (use_thunk): Don't emit debugging information for thunks.
6091
6092         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
6093         * decl.c (make_typename_type): Handle getting a class template.
6094         * search.c (lookup_field_r): A class template is good enough for
6095         want_type.
6096
6097         * call.c (convert_like_real): Only use cp_convert for the bad part.
6098         (standard_conversion): Also allow bad int->enum.
6099         * typeck.c (ptr_reasonably_similar): Also allow functions to
6100         interconvert.  Pointers to same-size integers are reasonably
6101         similar.
6102
6103         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
6104         give it void type.
6105
6106 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
6107
6108         PR g++/3154
6109         * init.c (sort_base_init): Remove unreachable code.
6110         (expand_member_init): Adjust comment to reflect reality. Simplify
6111         and remove unreachable code.
6112
6113 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
6114
6115         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
6116         (cxx_init): Update prototype.
6117         * decl.c (init_decl_processing): Rename.  Move null node init
6118         to its creation time.
6119         * lex.c (cxx_init_options): Update.
6120         (cxx_init): Combine with old init_parse; also call
6121         cxx_init_decl_processing.
6122
6123 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
6124
6125         * decl.c (check_initializer): Try to complete the type of an
6126         array element before checking whether it's complete.  Don't
6127         complain about arrays with complete element types but an
6128         unknown size.
6129         (cp_finish_decl): Build the hierarchical constructor before
6130         calling maybe_deduce_size_from_array_init.
6131
6132 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
6133
6134         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
6135
6136 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
6137
6138         PR g++/4206
6139         * parse.y (already_scoped_stmt): Remove.
6140         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
6141
6142 2001-11-12  H.J. Lu <hjl@gnu.org>
6143
6144         * cvt.c (ocp_convert): Don't warn the address of a weak
6145         function is always `true'.
6146
6147 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6148
6149         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
6150         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
6151         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
6152         * cp-tree.h (print_class_statistics): Remove.
6153         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
6154         cxx_print_identifier, cxx_set_yydebug): New.
6155         * lex.c (set_yydebug): Rename c_set_yydebug.
6156         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
6157         lang_print_xnode): Rename.
6158         * tree.c (print_lang_statistics): Rename.
6159
6160 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6161
6162         * class.c (dump_array): Fix format specifier warning.
6163
6164 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6165
6166         * cp-lang.c (LANG_HOOKS_NAME): Override.
6167         (struct lang_hooks): Constify.
6168         * lex.c (cxx_init_options): Update.
6169         (lang_identify): Remove.
6170         * parse.y (language_string): Remove.
6171
6172 2001-11-08  Andreas Franck  <afranck@gmx.de>
6173
6174         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
6175         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
6176         suggested by autoconf.
6177         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
6178         (c++.install-common): Use the transformed target alias names.
6179
6180 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6181
6182         * Make-lang.in: Update.
6183         * cp-lang.c: Include langhooks-def.h.
6184
6185 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6186
6187         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
6188
6189 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6190
6191         * lex.c (copy_lang_type): Add static prototype.
6192
6193 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6194
6195         * pt.c (unify): Handle SCOPE_REF.
6196
6197 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
6198
6199         * tree.c (cp_copy_res_decl_for_inlining): Adjust
6200         DECL_ABSTRACT_ORIGIN for the return variable.
6201
6202 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
6203
6204         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
6205
6206 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
6207
6208         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
6209         semantics.c, spew.c: Fix spelling errors.
6210
6211 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6212
6213         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
6214
6215 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
6216
6217         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
6218         pop_everything.
6219
6220 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6221
6222         * cp-lang.c (cxx_get_alias_set): New function.
6223         Point LANG_HOOKS_GET_ALIAS_SET to it.
6224
6225 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6226
6227         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
6228         * cp-tree.h (make_unbound_class_template): Prototype new function.
6229         * decl.c (make_unbound_class_template): New function.
6230         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
6231         * error.c (dump_type): Likewise.
6232         * mangle.c (write_type): Likewise.
6233         * parse.y (template_parm): Likewise.
6234         (template_argument): Use make_unbound_class_template.
6235         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
6236         (tsubst): Likewise.
6237         (tsubst_copy): Likewise.
6238         (unify): Likewise.
6239         * tree.c (walk_tree): Likewise.
6240         * typeck.c (comptypes): Likewise.
6241
6242 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6243
6244         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
6245         extra calls into fewer ones.
6246
6247 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
6248
6249         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
6250         Warn when merging inline with attribute noinline.
6251         (start_decl, start_function): Warn if inline and attribute
6252         noinline appear in the same declaration.
6253
6254 2001-10-16  H.J. Lu <hjl@gnu.org>
6255
6256         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
6257         for tree checking disabled.
6258
6259 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
6260
6261         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
6262         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
6263
6264 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
6265
6266         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
6267         (unify): Only handle MINUS_EXPR specially if the above flag is set
6268         and the subtracted constant is 1.  Clear the flag on recursive calls.
6269         Set it when unifying the maximum value in an INTEGER_TYPE's range.
6270
6271 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
6272
6273         * decl.c (bad_specifiers): Don't allow exception specifications
6274         on any typedefs.
6275
6276 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
6277
6278         * cp/lex.c (init_cp_pragma): Similarly.
6279
6280 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6281
6282         * pt.c (lookup_template_class): Build complete template arguments
6283         for BOUND_TEMPLATE_TEMPLATE_PARM.
6284
6285 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6286
6287         * cp-tree.h (TYPE_BINFO): Update comment.
6288         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
6289         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
6290         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
6291         (copy_type): Prototype new function.
6292         * lex.c (copy_lang_decl): Gather tree node statistics.
6293         (copy_lang_type): New function.
6294         (copy_type): Likewise.
6295         (cp_make_lang_type): Create lang_type for
6296         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
6297         and BOUND_TEMPLATE_TEMPLATE_PARM.
6298         * pt.c (tsubst): Use copy_type instead of copy_node.
6299         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
6300
6301 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6302
6303         * pt.c (determine_specialization): Ignore functions without
6304         DECL_TEMPLATE_INFO.
6305
6306 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
6307
6308         PR g++/4476
6309         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
6310
6311 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
6312
6313         * typeck2.c (store_init_value): Don't re-digest a bracketed
6314         initializer.
6315
6316         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
6317         ANON_AGGR_TYPE_P.
6318
6319 2001-10-11  Richard Henderson  <rth@redhat.com>
6320
6321         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
6322         of an asm statement.
6323         (build_vtbl_ref_1): Split out from build_vtbl_ref.
6324         (build_vfn_ref): Use it to handle vtable descriptors before
6325         calling build_vtable_entry_ref.
6326         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
6327
6328 2001-10-10  Richard Henderson  <rth@redhat.com>
6329
6330         * parse.y (asm_operand): Allow named operands.
6331         * semantics.c (finish_asm_stmt): Tweek for changed location
6332         of the operand constraint.
6333
6334 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
6335
6336         * call.c (standard_conversion): Add bad conversion between
6337         integers and pointers.
6338         (convert_like_real): Don't use convert_for_initialization for bad
6339         conversions; complain here and use cp_convert.
6340         (build_over_call): Don't handle bad conversions specially.
6341         (perform_implicit_conversion): Allow bad conversions.
6342         (can_convert_arg_bad): New fn.
6343         * cp-tree.h: Declare it.
6344         * typeck.c (convert_for_assignment): Use it.
6345         (ptr_reasonably_similar): Any target type is similar to void.
6346
6347 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
6348
6349         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
6350         (cp/cp-lang.o): New rule.
6351         * cp-tree.h: Declare hooks.
6352         * tree.c: Make hooks non-static.
6353         (init_tree): Don't initialize hooks here.
6354         * lex.c: Likewise.  Move definition of lang_hooks to...
6355         * cp-lang.c: ... new file.
6356
6357 2001-10-08  Richard Henderson  <rth@redhat.com>
6358
6359         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
6360         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
6361
6362 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6363
6364         * class.c (build_vtable_entry_ref): Const-ify.
6365         * decl.c (predefined_identifier,
6366         initialize_predefined_identifiers): Likewise.
6367         * init.c (build_new_1): Likewise.
6368         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
6369         Likewise.
6370
6371 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
6372
6373         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
6374         (INSNS_PER_STMT): Likewise.
6375         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
6376         (copy_body, initialize_inlined_parameters): Likewise.
6377         (declare_return_variable, inlinable_function_p): Likewise.
6378         (expand_call_inline, expand_calls_inline): Likewise.
6379         (optimize_inline_calls, clone_body): Likewise.
6380         * tree.c (walk_tree): Moved to ../tree-inline.c.
6381         (walk_tree_without_duplicates): Likewise.
6382         (copy_tree_r, remap_save_expr): Likewise.
6383
6384 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
6385
6386         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
6387         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
6388         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
6389         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
6390         (flag_inline_trees): Moved declaration to ../tree-inline.h.
6391         (walk_tree): Moved declaration to ../tree-inline.h.
6392         (walk_tree_without_duplicates, copy_tree_r): Likewise.
6393         (remap_save_expr): Likewise.
6394         * decl.c: Include tree-inline.h.
6395         (lang_mark_tree): Don't mark inlined_fns.
6396         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
6397         * optimize.c: Include tree-inline.h.
6398         (optimize_inline_calls): Move declaration to ../tree.h, as
6399         non-static.
6400         (remap_decl): Use language-independent constructs and hooks.
6401         (remap_block, copy_body_r, declare_return_variable): Likewise.
6402         (inlinable_function_p): Likewise.  Don't test for
6403         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
6404         no longer language-specific.
6405         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
6406         call of dump_function to...
6407         (optimize_function): Here...
6408         (clone_body): New function, extracted from...
6409         (maybe_clone_body): ... here.  Build decl_map locally and pass
6410         it on to clone_body.
6411         * pt.c, semantics.c: Include tree-inline.h.
6412         * tree.c: Likewise.
6413         (cp_walk_subtrees): New language-specific hook for tree inlining.
6414         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
6415         cp_is_overload_p, cp_auto_var_in_fn_p,
6416         cp_copy_res_decl_for_inlining): Likewise.
6417         (walk_tree): Move language-specific constructs into...
6418         (cp_walk_subtrees): this new function.
6419         (copy_tree_r): Use language-independent constructs and hooks.
6420         (init_tree): Initialize tree inlining hooks.
6421         (remap_save_expr): Adjust prototype so that the declaration
6422         does not require the definition of splay_tree.
6423
6424 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6425
6426         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
6427         to build the declaration instead of the declaration itself.
6428
6429 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
6430
6431         * decl2.c (cxx_decode_option): Add 'else'.
6432
6433         * spew.c (end_input): No longer static.
6434         * cp-tree.h: Declare it.
6435         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
6436
6437 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
6438
6439         * call.c (build_over_call), typeck.c (build_function_call_real):
6440         Pass type attributes to check_function_format rather than name or
6441         assembler name.  Don't require there to be a name or assembler
6442         name to check formats.
6443
6444 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
6445
6446         * decl.c (init_decl_processing): Don't call
6447         init_function_format_info.  Initialize lang_attribute_table
6448         earlier.
6449         (builtin_function): Call decl_attributes.
6450         (insert_default_attributes): New.
6451
6452 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
6453
6454         * decl.c (grokdeclarator): Copy array typedef handling from C
6455         frontend.
6456
6457         * decl.c (grokdeclarator): Copy too-large array handling from C
6458         frontend.
6459
6460 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
6461
6462         * config-lang.in (target_libs): Added target-gperf, so that we
6463         don't try to build it if C++ is disabled.
6464
6465 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
6466
6467         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
6468         (cp/errfn.o): Delete rule.
6469         (cp/error.o): Depend on flags.h.
6470         * errfn.c: Delete file.
6471         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
6472         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
6473         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
6474         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
6475         internal_error respectively.  Make cp_deprecated into a macro.
6476         Don't define cp_printer typedef or declare cp_printers.
6477         * error.c: Include flags.h.
6478         Delete: struct tree_formatting_info, print_function_argument_list,
6479         print_declaration, print_expression, print_function_declaration,
6480         print_function_parameter, print_type_id, print_cv_qualifier_seq,
6481         print_type_specifier_seq, print_simple_type_specifier,
6482         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
6483         print_parameter_declaration_clause, print_exception_specification,
6484         print_nested_name_specifier, and definition of cp_printers.
6485         (locate_error): New function.
6486         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
6487         rewritten in terms of locate_error and diagnostic.c.
6488         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
6489         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
6490         (init_error): Adjust to match.
6491
6492 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6493
6494         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
6495
6496 2001-09-21  Richard Henderson  <rth@redhat.com>
6497
6498         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
6499         (build_vtbl_initializer): Likewise.
6500         (build_vfn_ref): New.
6501         * cp-tree.h: Declare it.
6502         * call.c (build_over_call): Use it.
6503         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
6504         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
6505
6506 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
6507
6508         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
6509
6510 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
6511
6512         Table-driven attributes.
6513         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
6514         * decl2.c (cplus_decl_attributes): Only take one attributes
6515         parameter.
6516         * cp-tree.c (cplus_decl_attributes): Update prototype.
6517         * class.c (finish_struct), decl.c (start_decl, start_function),
6518         decl2.c (grokfield), friend.c (do_friend), parse.y
6519         (parse_bitfield): Update calls to cplus_decl_attributes.
6520         * decl.c (grokdeclarator): Take a pointer to a single ordinary
6521         attribute list.
6522         * decl.h (grokdeclarator): Update prototype.
6523         * decl2.c (grokfield): Take a single ordinary attribute list.
6524         * friend.c (do_friend): Likewise.
6525         * decl.c (shadow_tag, groktypename, start_decl,
6526         start_handler_parms, grokdeclarator, grokparms, start_function,
6527         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
6528         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
6529         (process_template_parm, do_decl_instantiation): Pass single
6530         ordinary attribute lists around.
6531         * decl.c (grokdeclarator): Correct handling of nested attributes.
6532         Revert the patch
6533         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
6534                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
6535                 not the left.
6536         .
6537         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
6538         (cp_attribute_table): Declare.
6539         * decl.c (valid_lang_attribute): Don't define.
6540         (lang_attribute_table): Define.
6541         (init_decl_processing): Initialize lang_attribute_table instead of
6542         valid_lang_attribute.
6543         * tree.c (cp_valid_lang_attribute): Remove.
6544         (handle_java_interface_attribute, handle_com_interface_attribute,
6545         handle_init_priority_attribute): New functions.
6546         (cp_attribute_table): New array.
6547         * decl2.c (import_export_class): Don't use
6548         targetm.valid_type_attribute.
6549
6550 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6551
6552         * Make-lang.in (cp/error.o): Depend on real.h
6553         * error.c: #include "real.h"
6554
6555 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6556
6557         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
6558         xmalloc/strcpy/strcat.
6559
6560 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6561
6562         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
6563         Const-ification.
6564         * pt.c (tsubst_decl): Likewise.
6565
6566 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6567
6568         * decl2.c (lang_f_options): Const-ification.
6569         * lex.c (cplus_tree_code_name): Likewise.
6570         * spew.c (yyerror): Likewise.
6571
6572 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6573
6574         PR c++/3986
6575         * class.c (force_canonical_binfo_r): Check & move an indirect
6576         primary base first.
6577         (force_canonical_binfo): Check that it's not already
6578         canonical.
6579         (mark_primary_virtual_base): Remove BINFO parameter.
6580         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
6581
6582 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6583
6584         Remove TYPE_NONCOPIED_PARTS.
6585         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
6586         CLASSTYPE_PURE_VIRTUALS.
6587         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
6588         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
6589         (layout_class_type): Don't call fixup_inline_methods here ...
6590         (finish_struct_1): ... call it here.
6591
6592 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
6593
6594         * decl.c (duplicate_decls): Remove code deadling with
6595         DECL_SAVED_INSNS.
6596         * decl2.c (finish_file): Likewise.
6597         * pt.c (instantiate_decl): Likewise.
6598         * semantics.c (expand_body): Don't defer local functions if
6599         they wouldn't be deferred for some other reason.  Don't
6600         generate RTL for functions that will not be emitted.
6601         (genrtl_start_function): Remove code deadling with
6602         DECL_SAVED_INSNS.
6603         (genrtl_finish_function): Likewise.
6604
6605 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6606
6607         PR c++/4203
6608         * call.c (build_over_call): Do not optimize any empty base
6609         construction.
6610
6611 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6612
6613         * error.c (dump_template_decl): Output template parameters
6614         together with their specifiers.
6615         Output `class' prefix for template template parameter.
6616         (dump_decl): Fix formatting.
6617
6618 2001-08-30  Kurt Garloff  <garloff@suse.de>
6619
6620         * optimize.c (inlinable_function_p): Allow only smaller single
6621         functions. Halve inline limit after reaching recursive limit.
6622
6623 2001-08-30  Joern Rennecke <amylaar@redhat.com>
6624             Jason Merrill  <jason_merrill@redhat.com>
6625
6626         * class.c (build_vtable_entry_ref): Subtract in char*, not
6627         ptrdiff_t.
6628
6629 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
6630
6631         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
6632         (build_cplus_array_type): Use cp_build_qualified_type, not
6633         TYPE_MAIN_VARIANT, to get an unqualified version.
6634
6635         * decl2.c (grok_alignof): Lose.
6636         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
6637         * typeck.c (c_alignof): Lose.
6638         * semantics.c (finish_sizeof, finish_alignof): New.
6639         * parse.y: Use them.
6640         * cp-tree.h: Declare them.
6641
6642 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
6643
6644         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
6645         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
6646         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
6647
6648 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
6649
6650         * typeck2.c (add_exception_specifier): Only require complete type if
6651         not in processing template declaration.
6652
6653 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6654
6655         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
6656         GNU_xref_start_scope and GNU_xref_end_scope.
6657
6658         * tree.c (TYPE_HASH): Moved to ../tree.h.
6659
6660 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
6661
6662         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
6663         on COMPOUND_EXPRs.
6664
6665 2001-08-14  Richard Henderson  <rth@redhat.com>
6666
6667         * class.c, cp-tree.h (build_vfn_ref): Remove.
6668         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
6669
6670 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
6671
6672         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
6673         empty class assignment as having side-effects to avoid
6674         spurious warnings.
6675
6676 2001-08-13  Zack Weinberg  <zackw@panix.com>
6677
6678         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
6679         * except.c: Include libfuncs.h.
6680
6681 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6682
6683         * decl.c (grokdeclarator): Clarify diagnostic message.
6684
6685 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6686
6687         * decl2.c (do_nonmember_using_decl): Replace using directive
6688         with using declaration in the error message.
6689
6690 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6691
6692         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
6693         criterion to avoid rebuilding expression tree instead of
6694         processing_template_decl.
6695
6696 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
6697
6698         Support named return value optimization for inlines, too.
6699         * decl.c (finish_function): Nullify returns here.
6700         * semantics.c (genrtl_start_function): Not here.
6701         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
6702         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
6703         Also nullify the CLEANUP_STMT for the nrv.
6704         * cp-tree.h: Declare it.
6705         * optimize.c (declare_return_variable): Replace the nrv with the
6706         return variable.
6707         * typeck.c (check_return_expr): Be more flexible on alignment check.
6708         Ignore cv-quals when checking for a matching type.
6709
6710 2001-08-09  Richard Henderson  <rth@redhat.com>
6711
6712         * decl2.c (finish_objects): Use target hooks instead of
6713         assemble_constructor and assemble_destructor.
6714
6715 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6716
6717         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
6718
6719 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
6720
6721         PR c++/3820
6722         Stop using TYPE_NONCOPIED_PARTS.
6723         * call.c (build_over_call): Be careful when copy constructing
6724         or assigning to an empty class.
6725         * class.c (check_bases_and_members): It has a
6726         COMPLEX_ASSIGN_REF if it has a vptr.
6727         (layout_class_type): Don't add empty class padding to
6728         TYPE_NONCOPIED_PARTS.
6729         (finish_struct_1): Don't add the VFIELD either.
6730         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
6731         initialization.
6732
6733 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
6734
6735         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
6736
6737 2001-08-06  Richard Henderson  <rth@redhat.com>
6738
6739         * decl2.c (finish_objects): Pass a symbol_ref and priority to
6740         assemble_{constructor,destructor}.  Remove priority handling.
6741
6742 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6743
6744         Don't allow template-id in using-declaration.
6745         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
6746         (do_class_using_decl): Likewise.
6747
6748 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6749
6750         * cp/spew.c (read_token): No need to pop buffers.
6751
6752 2001-08-02  Stan Shebs  <shebs@apple.com>
6753
6754         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
6755         (fnaddr_from_vtable_entry): Remove decl.
6756         * method.c (use_thunk): Update comment.
6757
6758 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
6759
6760         * repo.c (get_base_filename): Change return value to const char
6761         pointer.
6762
6763 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
6764
6765         Kill -fhonor-std.
6766         * NEWS: Document.
6767         * cp-tree.h (flag_honor_std): Remove.
6768         (CPTI_FAKE_STD): Remove.
6769         (std_node): Remove comment about it being NULL.
6770         (fake_std_node): Remove.
6771         * decl.c (in_fake_std): Remove.
6772         (walk_namespaces_r): Remove fake_std_node check.
6773         (push_namespace): Remove in_fake_std code.
6774         (pop_namespace): Likewise.
6775         (lookup_name_real): Remove fake_std_node check.
6776         (init_decl_processing): Always create std_node. Always add
6777         std:: things there.
6778         (builtin_function): Always put non '_' fns in std.
6779         * decl2.c (flag_honor_std): Remove.
6780         (lang_f_options): Remove honor-std.
6781         (unsupported_options): Add honor-std.
6782         (set_decl_namespace): Remove fake_std_node check.
6783         (validate_nonmember_using_decl): Likewise.
6784         (do_using_directive): Likewise.
6785         (handle_class_head): Likewise.
6786         * dump.c (cp_dump_tree): Likewise.
6787         * except.c (init_exception_processing): Adjust.
6788         * init.c (build_member_call): Remove fake_std_node check.
6789         (build_offset_ref): Likewise.
6790         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
6791         * rtti.c (init_rtti_processing): Adjust.
6792
6793 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
6794
6795         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
6796         operand while calling cp_tree_equal.
6797
6798 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6799
6800         The 3.0 ABI no longer has vbase pointer fields.
6801         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
6802         FORMAT_VBASE_NAME): Remove.
6803         * method.c (do_build_copy_constructor): Adjust.
6804         (do_build_assign_ref): Adjust.
6805         * search.c (lookup_field_r): Adjust.
6806         * typeck.c (build_component_ref): Adjust.
6807
6808         The 3.0 ABI always has a vtable pointer at the start of every
6809         polymorphic class.
6810         * rtti.c (build_headof_sub): Remove.
6811         (build_headof): Adjust.
6812         (get_tinfo_decl_dynamic): No need to check flag_rtti
6813         here. Adjust.
6814         (create_real_tinfo_var): Explain why we need a hidden name.
6815
6816 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6817
6818         PR c++/3631
6819         * class.c (update_vtable_entry_for_fn): The fixed adjustment
6820         of a virtual thunk should be from declaring base.
6821
6822 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6823
6824         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
6825         the shared virtual base, so preserving inheritance graph order.
6826
6827 2001-07-30  Andreas Jaeger  <aj@suse.de>
6828
6829         * decl2.c: Remove unused var global_temp_name_counter.
6830
6831 2001-07-28  Richard Henderson  <rth@redhat.com>
6832
6833         * method.c (pending_inlines): Remove.
6834
6835 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
6836
6837         * class.c (mark_primary_virtual_base): Don't adjust base
6838         offsets here.
6839         (dfs_unshared_virtual_bases): Adjust them here.
6840         (mark_primary_bases): Explain why we adjust at the end.
6841
6842 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
6843
6844         * class.c (finish_struct_1): When copying the primary base's
6845         VFIELD, make sure we find it is at offset zero.
6846
6847 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6848
6849         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
6850         tsubst_expr for default template arguments.
6851
6852 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6853
6854         PR c++/3621
6855         * spew.c (yylex): Only copy the token's lineno, if it is
6856         nonzero.
6857
6858 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6859
6860         PR c++/3624
6861         * call.c (resolve_args): Simplify, call
6862         convert_from_reference.
6863         (build_new_op): Resolve and convert from reference ARG1
6864         earlier. Adjust ARG2 & ARG3 resolve and conversion.
6865
6866 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6867
6868         * decl.c (last_function_parm_tags): Remove.
6869         (current_function_parm_tags): Remove.
6870         (init_decl_processing): Adjust.
6871         (start_function): Adjust.
6872         (store_parm_decls): Adjust.
6873
6874         PR c++/3152
6875         * decl.c (grokdeclarator): Detect when a function typedef is
6876         declaring a function, and create last_function_parms correctly.
6877
6878 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
6879
6880         * call.c (joust): Only prefer a non-builtin candidate to a builtin
6881         one if they have the same signature.
6882
6883         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
6884         it rather than toplevel_bindings_p.  Give it a mangled name if static.
6885         (convert_to_reference): Adjust.
6886         * decl2.c (get_temp_name): Lose.
6887         * mangle.c (mangle_ref_init_variable): New fn.
6888         (mangle_guard_variable): Strip the ref-init header.
6889         * cp-tree.h: Adjust.
6890         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
6891         initializer.
6892         (grok_reference_init): Always use DECL_INITIAL.
6893
6894 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6895
6896         PR c++/3416
6897         * call.c (build_conditional_expr): Recheck args after
6898         conversions.
6899         * cp-tree.h (build_conditional_expr): Move to correct file.
6900         * typeck.c (decay_conversion): Diagnose any unknown types
6901         reaching here.
6902         (build_binary_op): Don't do initial decay or default
6903         conversions on overloaded functions.
6904         (build_static_cast): Don't do a decay conversion here.
6905
6906 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6907
6908         PR c++/3543
6909         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
6910         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
6911
6912 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6913
6914         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
6915         (create_vtbl_ptr): ... here.
6916
6917 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6918
6919         * class.c (build_vbase_offset_vbtl_entries): Look for
6920         non-primary base of which we are a sub vtable.
6921
6922 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
6923
6924         * semantics.c (finish_this_expr):  Remove unused code.
6925
6926 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
6927
6928         Simplify rtti, now we've only one ABI.
6929         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
6930         CPTI_TINFO_VAR_ID.
6931         (tinfo_decl_id, tinfo_var_id): Remove.
6932         (get_typeid_1): Remove.
6933         * rtti.c
6934         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
6935         (typeid_ok_p): New function.
6936         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
6937         (get_tinfo_decl): Remove old abi documentation.
6938         (tinfo_from_decl): Remove.
6939         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
6940         (get_typeid_1): Remove.
6941         (get_base_offset): Remove.
6942         (synthesize_tinfo_var): Absorb get_base_offset.
6943         (create_real_tinfo_var): Don't use tinfo_decl_id.
6944
6945 2001-07-23  Graham Stott  <grahams@redhat.com>
6946
6947         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
6948         variable has_two_argument_delete_p.
6949
6950 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
6951
6952         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
6953         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
6954         (CPTI_INDEX_IDENTIFIER): Remove.
6955         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
6956         (delta2_identifier): Remove.
6957         (index_identifier): Remove.
6958         (pfn_or_delta2_identifier): Remove.
6959         (flag_vtable_thunks): Remove.
6960         (VTABLE_DELTA2_NAME): Remove.
6961         (VTABLE_INDEX_NAME): Remove.
6962         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
6963         (vfunc_ptr_type_node): Adjust.
6964         (VTABLE_NAME_PREFIX): Adjust.
6965         (build_vfn_ref): Lose first parameter.
6966         (fixup_all_virtual_upcast_offsets): Remove.
6967         * decl.c (initialize_predefined_identifiers): Remove
6968         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
6969         (init_decl_processing): Remove no-vtable-thunk code.
6970         * decl2.c (flag_vtable_thunks): Remove.
6971         (mark_vtable_entries): Remove no-vtable-thunk code.
6972         * error.c (dump_decl): Remove no-vtable-thunk code.
6973         (dump_expr): Adjust ptr to member function code.
6974         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
6975         code.
6976         * rtti.c (build_headof): Remove no-vtable-thunk code.
6977         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
6978         * search.c (get_base_distance): Remove expand_upcast_fixups case.
6979         (virtual_context) Remove.
6980         (expand_upcast_fixups): Remove.
6981         (fixup_virtual_upcast_offsets): Remove.
6982         (fixup_all_virtual_upcast_offsets): Remove.
6983         * typeck.c (get_member_function_from_ptrfunc): Remove
6984         no-vtable-thunk code.
6985         * call.c (build_over_call): Adjust call to build_vfn_ref.
6986         * class.c (build_vfn_ref): Lose first parameter. Remove
6987         no-vtable-thunk code.
6988         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
6989         (build_vtable_entry): Remove no-vtable-thunk code.
6990
6991 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
6992
6993         Remove old-abi remnants. Remove comments about old abi
6994         behavior. Remove references to 'new-abi' in comments.
6995         * cp-tree.h: Adjust comments.
6996         (vbase_offsets_in_vtable_p): Delete.
6997         (vcall_offsets_in_vtable_p): Delete.
6998         (vptrs_present_everywhere_p): Delete.
6999         (all_overridden_vfuns_in_vtables_p): Delete.
7000         (merge_primary_and_secondary_vtables_p): Delete.
7001         (TYPE_CONTAINS_VPTR_P): Adjust.
7002         (VTT_NAME_PREFIX): Remove.
7003         (CTOR_VTBL_NAME_PREFIX): Remove.
7004         (init_vbase_pointers): Remove.
7005         * class.c: Adjust coments.
7006         (build_vbase_pointer_fields): Delete.
7007         (build_vbase_pointer): Remove old-abi code.
7008         (build_secondary_vtable): Likewise.
7009         (modify_all_vtables): Likewise.
7010         (create_vtable_ptr): Likewise.
7011         (layout_class_type): Likewise.
7012         (finish_struct_1): Likewise.
7013         (finish_vtbls): Likewise.
7014         (dfs_finish_vtbls): Delete.
7015         (build_vbase_offset_vtbl_entries): Remove old-abi code.
7016         * cvt.c: Adjust comments.
7017         * decl.c: Adjust comments.
7018         * decl2.c: Adjust comments.
7019         * init.c: Adjust comments.
7020         (construct_virtual_bases): Remove old-abi code.
7021         * lang-specs.h: Remove -fno-new-abi.
7022         * mangle.c: Adjust comments.
7023         * rtti.c: Adjust comments.
7024         (get_base_offset): Remove old-abi-code.
7025         * search.c: Adjust comments.
7026         (dfs_init_vbase_pointers): Remove.
7027         (dfs_vtable_path_unmark): Remove.
7028         (init_vbase_pointers): Remove.
7029         * semantics.c: Adjust comments.
7030         (emit_associated_thunks): Remove old-abi code.
7031         * typeck.c: Adjust comments.
7032
7033 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
7034
7035         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
7036         params.h.
7037
7038 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
7039
7040         * class.c (finish_struct_anon): Forbid nested classes.
7041
7042 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7043
7044         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
7045         * optimize.c: Include debug.h.
7046         (maybe_clone_body): Use debug hook.
7047         * semantics.c: Include debug.h.
7048         (expand_body): Use debug hook.
7049
7050 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7051
7052         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
7053
7054 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
7055
7056         * class.c (type_requires_array_cookie): New function.
7057         (check_methods): Don't try to figure out whether the type needs a
7058         cookie here.
7059         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
7060         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
7061         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
7062         * pt.c (instantiate_class_template): Don't set
7063         TYPE_VEC_DELETE_TAKES_SIZE.
7064         * NEWS: Document ABI changes from GCC 3.0.
7065
7066 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
7067             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7068
7069         * NEWS (Changes in GCC 3.0): Fix typo.
7070
7071 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
7072
7073         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
7074         which attributes are to be attached, and a flags argument.  Update
7075         call to decl_attributes.
7076         (grokfield): Update call to decl_attributes.
7077         * class.c (finish_struct): Update call to cplus_decl_attributes.
7078         * cp-tree.h (cplus_decl_attributes): Update prototype.
7079         * decl.c (start_decl, grokdeclarator, start_function): Update
7080         calls to decl_attributes and cplus_decl_attributes.
7081         * friend.c (do_friend): Update call to cplus_decl_attributes.
7082         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
7083
7084 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
7085
7086         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
7087         for `register' variables with an asm-specification.
7088
7089 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
7090
7091         * semantics.c (finish_asm_stmt): Mark the output operands
7092         to an asm addressable, if necessary.
7093
7094 2001-07-11  Ben Elliston  <bje@redhat.com>
7095
7096         * Revert this change -- there is a subtle bug.
7097
7098         PR c++/80
7099         * decl.c (finish_enum): New "attributes" argument; pass it to
7100         cplus_decl_attributes.  Use a narrower type if the enum is packed.
7101         * cp-tree.h (finish_enum): Adjust prototype.
7102         * parse.y (enum_head): New non-terminal.
7103         (structsp): Use it. Enums now may be preceded or followed by
7104         optional attributes -- pass their chained tree to finish_enum().
7105         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
7106
7107 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
7108
7109         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
7110         variables.
7111
7112 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
7113
7114         * semantics.c (cp_expand_stmt): Fix for null
7115         current_function_return_value.
7116
7117 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
7118
7119         * call.c (build_op_delete_call): Initialize fn.
7120         (convert_like_real): Delete conditional.
7121         (joust): Initialize *w and *l.
7122         * class.c: Add prototype for binfo_ctor_vtable.
7123         (get_primary_binfo): Initialize result.
7124         * init.c (build_java_class_ref): Initialize name.
7125
7126 2001-07-09  Erik Rozendaal  <dlr@acm.org>
7127
7128         * typeck.c (unary_complex_lvalue): Do not duplicate the
7129         argument to modify, pre-, or post-increment when used as an
7130         lvalue and when the argument has side-effects.
7131
7132 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7133
7134         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7135         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
7136         cplus_decl_attributes even if attrs is NULL.
7137         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7138
7139 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7140
7141         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
7142         calls to decl_attributes.
7143
7144 2001-07-06  Ira Ruben   <ira@apple.com>
7145
7146         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
7147         be DECL_TEMPLATE_RESULT.
7148
7149 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7150
7151         * cp-tree.h (copy_template_template_parm): Rename to ...
7152         (bind_template_template_parm): ... here.
7153         * tree.c (copy_template_template_parm): Rename to ...
7154         (bind_template_template_parm): ... here.  Remove the case when
7155         NEWARGS is NULL_TREE.
7156         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
7157         BOUND_TEMPLATE_TEMPLATE_PARM.
7158         * pt.c (lookup_template_class): Adjust.
7159
7160 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
7161
7162         * cvt.c (convert_lvalue): New fn.
7163         * cp-tree.h: Declare it.
7164         * method.c (do_build_assign_ref): Use it.
7165         (do_build_copy_constructor): Convert parm to base types
7166         before calling base constructors.
7167
7168         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
7169         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
7170         optimize.
7171         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
7172
7173 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
7174
7175         * optimize.c (optimize_inline_calls): New function, broken out
7176         of ...
7177         (optimize_function): ... here. Call it. Don't inline if it is
7178         a thunk.
7179         (dump_function): Print name of dump flag causing this dump.
7180         * semantics.c (expand_body): Move thunk inline check to
7181         optimize_function.
7182
7183 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7184
7185         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
7186         (comptypes): Use target.comp_type_attributes.
7187
7188 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
7189
7190         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
7191
7192 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7193
7194         * error.c (lang_print_error_function): Add a `diagnostic_context *'
7195         parameter. Tweak.
7196
7197 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7198
7199         * decl2.c (import_export_class): Update.
7200
7201 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7202
7203         * error.c (init_error): Adjust settings.
7204
7205 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7206
7207         * error.c (init_error): Adjust settings.
7208
7209 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
7210
7211         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
7212         return pointers to data members by reference rather than by value.
7213
7214 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
7215
7216         Implement the Named Return Value optimization.
7217         * cp-tree.h (struct cp_language_function): Add x_return_value.
7218         (current_function_return_value): Now a macro.
7219         * decl.c: Don't define it.
7220         (define_label, finish_case_label): Don't clear it.
7221         (init_decl_processing): Don't register it with GC.
7222         * semantics.c (genrtl_finish_function): Don't check it for
7223         no_return_label.  Copy the RTL from the return value to
7224         current_function_return_value and walk, calling...
7225         (nullify_returns_r): ...this new fn.
7226         * typeck.c (check_return_expr): Set current_function_return_value.
7227
7228 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
7229
7230         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
7231         sharing a ctor vtable with.  Merge code for cases 1 and 2.
7232         (binfo_ctor_vtable): New fn.
7233         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
7234
7235 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
7236
7237         * class.c (dfs_find_final_overrider): Fix logic.
7238
7239         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
7240         virtual thunk instead of non-virtual.
7241         (get_matching_virtual): Uncomment.
7242
7243         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
7244         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
7245         PARM, not ARG.
7246
7247 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
7248
7249         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
7250         we've not emerged from the hierarchy of RTTI_BINFO on reaching
7251         a non-virtual base.
7252
7253 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
7254
7255         * NEWS: Update release number.
7256
7257 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
7258
7259         PR c++/3130, c++/3131, c++/3132
7260         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
7261         * class.c (force_canonical_binfo_r): Move
7262         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
7263         virtual bases unless they're primary and what they're primary
7264         too has been moved.
7265         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
7266         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
7267         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
7268         derived binfo.
7269         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
7270         (layout_nonempty_base_or_field): Add most derived type
7271         parameter. Adjust.
7272         (layout_empty_base): Likewise.
7273         (build_base_field): Likewise.
7274         (build_base_fields): Likewise.
7275         (propagate_binfo_offsets): Add most derived type
7276         parameter. Skip non canonical virtual bases too.
7277         (dfs_set_offset_for_unshared_vbases): Don't skip primary
7278         bases. Do skip canonical bases.
7279         (layout_virtual_bases): Adjust.
7280         (layout_class_type): Adjust.
7281         (dfs_get_primary_binfo): Build list of virtual primary base
7282         candidates.
7283         (get_primary_binfo): Check that the shared virtual primary
7284         base candidate was found first.
7285         (accumulate_vtbl_inits): Don't do anything for non-vptr
7286         containing binfos. For case 1 primary virtual bases, keep
7287         checking that we've not emerged from the hierarchy of RTTI_BINFO.
7288
7289 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
7290
7291         PR c++/3089
7292         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
7293         hierarchy looking for primary bases for a ctor
7294         vtable. Recursively call oneself, if we meet our primary via
7295         this route and haven't met it yet via inheritance graph order.
7296
7297 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
7298
7299         * lang-options.h: Emit documentation for -fno-honor-std, not
7300         -fhonor-std.
7301
7302 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
7303
7304         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
7305         Don't clobber delta.
7306         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
7307
7308 2001-06-10  Mark Mitchell <mark@codesourcery.com>
7309             Gabriel Dos Reis  <gdr@codesourcery.com>
7310
7311         * Make-lang.in (cp/call.o): Depend on diagnostic.h
7312         (cp/typeck.o): Depend on diagnostic.h
7313         (cp/typeck2.o): Depend on diagnostic.h
7314         (cp/repo.o): Depend on dignostic.h
7315         * typeck.c: #include diagnostic.h
7316         (convert_for_initialization): Remove extern declaration for
7317         warningcount and errorcount.
7318
7319         * call.c: #include diagnostic.h
7320         (convert_like_real): Remove extern declaration for warnincount and
7321         errorcount.
7322
7323         * repo.c: #include diagnostic.h
7324         * typeck2.c: #include diagnostic.h
7325
7326 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7327
7328         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
7329         in previous change.
7330
7331 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7332
7333         PR c++/2929
7334         * friend.c (do_friend): Use push_decl_namespace for classes at
7335         namespace scope.
7336
7337 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7338             Jason Merrill <jason_merrill@redhat.com>
7339
7340         PR c++/3061
7341         * class.c (build_secondary_vtable): Use assert, rather than an error
7342         message.
7343         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
7344         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
7345         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
7346         Don't set BINFO_VTABLE for a primary virtual base.
7347
7348 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
7349
7350         * decl.c (duplicate_decls): Update source position information
7351         when a template function is defined.
7352
7353 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
7354
7355         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
7356
7357 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
7358
7359         PR c++/2914
7360         * decl.c (pushtag): Don't push into a complete type's scope.
7361
7362 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
7363
7364         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
7365         (struct lang_decl_flags): Lose generate_with_vtable_p.
7366         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
7367         * class.c (copy_virtuals): Adjust.
7368         * decl2.c (mark_vtable_entries): Adjust.
7369         * method.c (make_thunk, build_vtable_entry): Adjust.
7370         * class.c (update_vtable_entry_for_fn): Only look as far as the
7371         first defining class.
7372         (build_vtbl_initializer): Put nothing in the slot for a function only
7373         defined in a lost primary virtual base.
7374         (add_vcall_offset_vtbl_entries_1): Use the same code for
7375         the lost primary case and the normal case.
7376         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
7377         (get_vfield_offset, get_derived_offset): Lose.
7378         (dfs_find_final_overrider): Use look_for_overrides_here.
7379         (get_matching_virtual): New fn.
7380         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
7381         not BV_VCALL_INDEX.
7382         * search.c (look_for_overrides_here): Split out from...
7383         (look_for_overrides_r): Here.
7384
7385         * class.c (find_final_overrider): Return error_mark_node on error.
7386
7387         * decl2.c (key_method): #if 0 accidental change.
7388
7389 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7390
7391         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
7392         (build_over_call): Likewise.
7393         * decl.c (grokparms): Likewise.
7394         * pt.c (tsubst_decl): Likewise.
7395         * typeck.c (convert_arguments): Likewise.
7396
7397 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
7398
7399         * semantics.c (begin_class_definition): Robustify.
7400
7401         * pt.c (instantiate_decl): Tell the repository code about the
7402         clones, not the cloned functions.
7403         * repo.c (repo_template_used): Explicitly instantiate the cloned
7404         function, not the clones.
7405
7406 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7407
7408         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
7409         ICS_BAD_FLAG on created conversion.
7410         (compare_ics): Break out rank.
7411
7412 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7413
7414         * decl.c (xref_tag): Remove extraneous %s on dependent name
7415         lookup warning.
7416
7417 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7418
7419         * class.c (layout_vtable_decl): Fix off by one error on
7420         build_index_type.
7421         (build_vtt): Likewise.
7422         (build_ctor_vtbl_group): Likewise.
7423
7424 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7425
7426         * class.c (maybe_indent_hierarchy): New function.
7427         (dump_class_hierarchy_r): Add flags. Dump extra binfo
7428         information, if enabled. Use maybe_indent_hierarchy. Adjust
7429         output format.
7430         (dump_class_hierarchy): Adjust prototype. Adjust output format.
7431         (dump_array, dump_vtable, dump_vtt): New functions.
7432         (finish_struct_1): Adjust hierarchy dumping.
7433         (initialize_vtable): Call dump_vtable.
7434         (build_vtt): Call dump_vtt.
7435         (build_ctor_vtbl_group): Call dump_vtable.
7436         * decl2.c (flag_dump_class_layout): Remove.
7437         (cxx_decode_option): Remove dump translation unit
7438         and dump class hierarchy check. Call dump_switch_p.
7439         (finish_file): Adjust dumping.
7440         (dump.c): Only dump base classes if not TDF_SLIM.
7441         Only dump namespace members if not TDF_SLIM.
7442         * optimize.c (dump_function): New function.
7443         (optimize_function): Call dump_function.
7444         * semantics.c (expand_body): Use dump_enabled_p.
7445
7446 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
7447
7448         PR g++/2936
7449         Part missed from first commit
7450         * decl2.c (finish_anon_union): Copy context.
7451
7452 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
7453
7454         PR g++/2936
7455         * optimize.c (remap_decl): Remap anonymous aggregate members too.
7456
7457 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
7458
7459         PR g++/2823
7460         * semantics.c (expand_body): Don't optimize thunks.
7461
7462 2001-05-25  Sam TH  <sam@uchicago.edu>
7463
7464         * cp-tree.h lex.h: Fix header include guards.
7465
7466 2001-05-25  Mark Mitchell <mark@codesourcery.com>
7467
7468         * decl.c (init_decl_processing): Tweak.
7469
7470 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
7471
7472         * decl.c (duplicate_decls): Tidy.
7473         (init_decl_processing): Always set flag_no_builtin.
7474
7475 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
7476
7477         PR c++/2184
7478         * decl2.c (do_local_using_decl): Push the decls, even in a
7479         template.
7480
7481 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
7482
7483         * optimize.c (initialize_inlined_parameters): Don't set
7484         TREE_READONLY for a VAR_DECL taking the place of an inlined
7485         PARM_DECL.
7486
7487 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
7488
7489         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
7490         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
7491         attribute.
7492
7493 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
7494
7495         * parse.y: Refer to compound literals as such, not as
7496         constructor-expressions.
7497
7498 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
7499
7500         * call.c (build_op_delete_call): Ignore exception-specifications
7501         when looking for matching delete operators.
7502         * init.c (build_new_1): Compute whether or not the allocation
7503         function used is a placement allocation function or not, and
7504         communicate this information to build_op_delete_call.
7505
7506 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
7507
7508         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
7509         (build_vtbl_ref): Adjust.
7510         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
7511         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
7512         Re-add vtable-gc.
7513         (unsupported_options): Correspondingly.
7514
7515         * decl2.c (maybe_make_one_only): Check flag_weak, not
7516         supports_one_only().
7517
7518         * cp-tree.def (START_CATCH_STMT): Lose.
7519         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
7520         * tree.c (cp_statement_code_p): Don't case it.
7521         * semantics.c (cp_expand_stmt): Likewise.
7522         * cp-tree.h (START_CATCH_TYPE): Lose.
7523         (HANDLER_TYPE): New.
7524         * except.c (expand_start_catch_block): Don't start any blocks.
7525         Return the type.
7526         (expand_end_catch_block): Don't end any blocks.
7527         * parse.y (handler): Don't pass anything from finish_handler_parms
7528         to finish_handler.
7529         * pt.c (tsubst_expr): Likewise.
7530         * semantics.c (begin_handler): Call note_level_for_catch here.
7531         (finish_handler_parms): Don't return anything.
7532         (genrtl_catch_block, begin_catch_block): Lose.
7533         (genrtl_handler): Call expand_start_catch here.
7534
7535 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
7536
7537         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
7538         (get_vtable_decl, build_vtt): Not here.
7539
7540 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
7541
7542         PR c++/2781
7543         * optimize.c (update_cloned_parm): Copy addressability and other
7544         flags.
7545
7546 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7547
7548         * pt.c (determine_specialization): Ignore artificial functions.
7549
7550 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7551
7552         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
7553         (C_RID_CODE): Remove.
7554         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
7555         (init_parse): Don't do it here.
7556
7557 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
7558
7559         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
7560         function declaration to avoid stripping the symbol's attributes.
7561
7562 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
7563
7564         * decl.c (pushdecl): Adjust error string.
7565         (xref_tag): Adjust friend class injection warning. Remove the
7566         inherited name from the class shadowed scope.
7567
7568 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
7569
7570         * except.c (cp_protect_cleanup_actions): New function.
7571         (init_exception_processing): Don't set protect_cleanup_actions
7572         here.  Do set lang_protect_cleanup_actions.
7573
7574 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
7575
7576         * spew.c (read_token): Call yyerror on all unexpected tokens.
7577
7578 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
7579
7580         * init.c (member_init_ok_or_else): Take a tree rather than
7581         string for name.
7582         (expand_member_init): Adjust.
7583
7584 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
7585
7586         * decl.c (duplicate_decls): Suppress warning about duplicate
7587         decls if the first decl is a friend.
7588
7589 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
7590
7591         * except.c (choose_personality_routine): Export.  Add
7592         explanatory comment.  Take an enum languages, not a boolean.
7593         (initialize_handler_parm): Adjust to match.
7594         * cp-tree.h: Prototype choose_personality_routine.
7595         * lex.c (handle_pragma_java_exceptions): New function.
7596         (init_cp_pragma): Register #pragma GCC java_exceptions.
7597
7598 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7599
7600         * method.c (build_mangled_C99_name): Remove unused prototype.
7601
7602 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
7603
7604         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
7605         * typeck.c (get_member_function_from_ptrfunc,
7606         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
7607         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
7608
7609         Reverted Geoff Keating's 2001-05-03's patch.
7610
7611 2001-05-11  Ira Ruben   <ira@apple.com>
7612
7613         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
7614
7615 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
7616
7617         * cp-tree.h (finish_label_expr, lookup_label): Delete.
7618         * parse.y: Update for '&&'; don't issue warning here.
7619         * semantics.c (finish_label_expr): Delete.
7620
7621 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
7622
7623         * splay-tree.h (splay_tree_max): New function.
7624         (splay_tree_min): Likewise.
7625
7626 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
7627
7628         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
7629         (pfn_vflag_identifier): Define.
7630         Update comment about layout of pointer functions.
7631         (build_ptrmemfunc1): Update prototype.
7632         (expand_ptrmemfunc_cst): Update prototype.
7633         * decl.c (initialize_predefined_identifiers): Initialize
7634         pfn_vflag_identifier.
7635         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
7636         an extra field to the type.
7637         * expr.c (cplus_expand_constant): Pass 'flag' between
7638         expand_ptrmemfunc_cst and build_ptrmemfunc1.
7639         * typeck.c (get_member_function_from_ptrfunc): When
7640         FUNCTION_BOUNDARY < 16, look at additional field to determine
7641         if a pointer-to-member is a real pointer or a vtable offset.
7642         (build_ptrmemfunc1): Add new parameter to contain extra field.
7643         (build_ptrmemfunc): Pass the extra field around.
7644         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
7645         (pfn_from_ptrmemfunc): Ignore the extra field.
7646
7647 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
7648
7649         * cp-tree.h (flag_inline_trees): Update documentation.
7650         * decl.c (init_decl_processing): Adjust handling of
7651         flag_inline_functions and flag_inline_trees to support -O3.
7652         (grokfndecl): Set DECL_INLINE on all functions if that's what
7653         the user requested.
7654         (save_function_data): Clear DECL_INLINE in
7655         current_function_cannot_inline is non-NULL.
7656         * decl2.c (flag_inline_trees): Update documentation.
7657
7658 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
7659
7660         * dump.c (cp_dump_tree, USING_STMT case): New case.
7661         * tree.c (cp_statement_code_p): Add USING_STMT.
7662         * decl2.c (do_using_directive): Add the using directive statement.
7663
7664         * tree.c (walk_tree): Reformat an if block.
7665
7666 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
7667
7668         * decl.c (compute_array_index_type): Don't try to do anything with
7669         the indices when processing a template.
7670
7671 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7672
7673         * call.c: NULL_PTR -> NULL.
7674         * class.c: Likewise.
7675         * cvt.c: Likewise.
7676         * decl.c: Likewise.
7677         * decl2.c: Likewise.
7678         * except.c: Likewise.
7679         * init.c: Likewise.
7680         * rtti.c: Likewise.
7681         * search.c: Likewise.
7682         * tree.c: Likewise.
7683         * typeck.c: Likewise.
7684         * typeck2.c: Likewise.
7685
7686 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
7687
7688         * decl2.c (do_using_directive): Revert previous patch.
7689
7690 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7691
7692         * cp-tree.def (USING_STMT): New statement node.
7693         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
7694         * decl2.c (do_using_directive): Add USING_STMT to statement
7695         tree. Don't emit errors when processing template decl.
7696         * pt.c (tsubst_expr, USING_STMT case): New case.
7697         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
7698
7699 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7700
7701         * call.c (build_new_op): Convert args from reference here.
7702         (build_conditional_expr): Don't convert here.
7703
7704 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7705
7706         * spew.c (last_token_id): New static variable.
7707         (read_token): Set it here.
7708         (yyerror): Use it here.
7709
7710 2001-04-30  Richard Henderson  <rth@redhat.com>
7711
7712         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
7713         * decl.c: Likewise.
7714
7715 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
7716
7717         * gxxint.texi: Remove.
7718         * Make-lang.in: Remove all traces of gxxint.texi.
7719
7720 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
7721
7722         * decl2.c (start_static_initialization_or_destruction): Correct
7723         logic to handle the -fno-use-cxa-atexit case.
7724
7725 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
7726
7727         * optimize.c (update_cloned_parm): New function.
7728         (maybe_clone_body): Use it.  Update the `this' parameter too.
7729
7730 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7731
7732         * decl2.c (unsupported_options): Add new-abi.
7733         * lang-options.h: Remove no longer supported options.
7734
7735 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
7736
7737         * except.c (can_convert_eh): Don't check template parms,
7738         typename types etc.
7739
7740 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
7741
7742         * optimize.c (maybe_clone_body): Copy parameter names and locations.
7743
7744 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
7745
7746         * cp-tree.h (adjust_clone_args): Prototype new function.
7747         * class.c (adjust_clone_args): New function.
7748         * decl.c (start_function): Call it for in charge ctors.
7749
7750 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
7751
7752         * method.c (use_thunk): Make sure that thunks really are emitted
7753         when requested.
7754
7755 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
7756
7757         * mangle.c (write_chars): New macro.
7758         (hwint_to_ascii): New function
7759         (write_number): Use it.
7760         (write_integer_cst): Deal with really big numbers.
7761
7762 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
7763
7764         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
7765         the clone.
7766
7767 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
7768
7769         * decl.c (grokdeclarator): Set context of namespace scope
7770         TYPE_DECLS.
7771
7772 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
7773
7774         * cp/optimize.c: Include hashtab.h.
7775         (struct inline_data): Add tree_pruner.
7776         (expand_call_inline, expand_calls_inline): Use it when calling
7777         walk_tree.
7778         (optimize_function): Initialize and free tree_pruner.
7779
7780 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
7781
7782         Lazy __FUNCTION__ generation.
7783         * cp-tree.def (FUNCTION_NAME): Remove.
7784         * cp-tree.h (function_name_declared_p): Remove.
7785         (cp_fname_init): Prototype.
7786         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
7787         don't call declare_function_name. Call start_fname_decls.
7788         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
7789         clobber the line number.
7790         (cp_fname_init): New function.
7791         (start_function): Call start_fname_decls.
7792         (finish_function): Call finish_fname_decls.
7793         * lex.c (reswords): Add slots for __FUNCTION__ et al.
7794         (rid_to_yy): Add mappings for __FUNCTION__ et al.
7795         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
7796         * parse.y (VAR_FUNC_NAME): New token.
7797         (primary): Add VAR_FUNC_NAME.
7798         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
7799         generation.
7800         (tsubst, FUNCTION_NAME case): Remove.
7801         (tsubst_copy, FUNCTION_NAME case): Remove.
7802         (tsubst_expr, DECL_STMT case): Be careful with a
7803         DECL_PRETTY_FUNCTION_P.
7804         (instantiate_decl): Remove function_name_declared_p.
7805         * semantics.c (begin_compound_statement): Don't call
7806         declare_function_name here.
7807         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
7808         (finish_translation_unit): Call finish_fname_decls.
7809         (expand_body): Remove function_name_declared_p.
7810         * typeck2.c (digest_init): Allow any ERROR_MARK.
7811
7812 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
7813
7814         * pt.c (tsubst_decl): Use VOID_TYPE_P.
7815         * semantics.c: Fix some typos.
7816
7817 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
7818
7819         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
7820
7821 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7822
7823         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
7824
7825 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
7826
7827         * except.c (build_throw): Wrap the initialization of the exception
7828         object in a MUST_NOT_THROW_EXPR.
7829         (do_free_exception): #if 0.
7830
7831 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
7832
7833         * cp-tree.h (finish_enum): Change prototype.
7834         * decl.c (finish_enum): Reorganize.
7835         * parse.y (structsp): Adjust calls to finish_enum.
7836
7837 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7838
7839         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
7840         't' case.
7841
7842 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7843
7844         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
7845         (layout_empty_base): Return at end flag.
7846         (build_base_field): Likewise.
7847         (build_base_fields): Likewise.
7848         (layout_virtual_bases): Don't add 1 to eoc value.
7849         (end_of_class): Use full size for empty bases.
7850         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
7851         empty bases. Don't add 1 to eoc value. Only add trailing padding
7852         if we're an empty class with no empty bases.
7853         (dump_class_hierarchy): Dump size and alignment.
7854
7855 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
7856
7857         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
7858         ICS_BAD_FLAG.
7859
7860 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
7861
7862         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
7863         is found, look first if name does not match the structure name.
7864
7865 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
7866
7867         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
7868         set.
7869         (SET_DECL_LANGUAGE): New macro.
7870         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
7871         (pushdecl): Likewise.
7872         (build_library_fn_1): Likewise.
7873         (build_cp_library_fn): Likewise.
7874         (grokfndecl): Likewise.
7875         (grokvardecl): Mark `extern "C"' variables as having C linkage.
7876         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
7877         * lex.c (retrofit_lang_decl): Likewise.
7878         * mangle.c (mangle_decl_string): Don't mangle the names of
7879         variables declared with C language linkage.
7880         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
7881
7882 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7883
7884         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
7885         flag_access_control from uninitialized storage.
7886
7887 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
7888
7889         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
7890         * mangle.c (write_pointer_to_member_type): Fix mangling of
7891         pointers to cv-qualified member function types.
7892
7893         * init.c (build_delete): Create a SAVE_EXPR for the address if
7894         we're going to use it more than once.
7895
7896 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
7897
7898         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
7899         (expand_ptremfunc_cst): Change prototype.
7900         (delta2_from_ptrmemfunc): Remove.
7901         * expr.c (cplus_expand_constant): Adjust call to
7902         expand_ptrmemfunc_cst.
7903         * typeck.c (build_ptrmemfunc1): Simplify.
7904         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
7905         results in a constant.
7906         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
7907         (delta2_from_ptrmemfunc): Remove.
7908         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
7909
7910 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
7911
7912         * cp-tree.h (decl_namespace_list): New macro.
7913         (struct saved_scope): Add decl_ns_list.
7914         * decl.c (mark_saved_scope): Mark it.
7915         * decl2.c: Lose static decl_namespace_list.
7916         (init_decl2): Don't save it.
7917
7918 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7919
7920         * cp-tree.h (warn_return_type, yylex): Delete redundant
7921         declarations.
7922
7923         * decl.c (current_class_depth, global_namespace): Likewise.
7924
7925         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
7926
7927         * repo.c (flag_use_repository): Likewise.
7928
7929 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7930
7931         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
7932         set_block, pushdecl, getdecls, gettags, init_decl_processing,
7933         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
7934         lvalue_or_else, print_lang_statistics, comp_target_types,
7935         unsigned_type, signed_type, signed_or_unsigned_type,
7936         build_function_call, mark_addressable, incomplete_type_error):
7937         Delete redundant declarations.
7938
7939 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
7940
7941         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
7942         (TYPE_ANONYMOUS_P): New macro.
7943         (TAGGED_TYPE_P): New macro.
7944         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
7945         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
7946         * tree.c (no_linkage_helper): Likewise.
7947         * semantics.c (begin_class_definition): Likewise.
7948         * pt.c (convert_template_argument): Likewise.
7949         * lex.c (check_for_missing_semicolon): Likewise.
7950
7951 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
7952
7953         * class.c (dfs_unshared_virtual_bases): New function.
7954         (mark_primary_bases): Call it.
7955         (check_bases): Ignore virtual bases when determining
7956         nearly-emptiness.
7957
7958 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
7959
7960         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
7961
7962 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
7963
7964         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
7965         cloned function to the clone.
7966
7967 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7968
7969         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
7970
7971         * semantics.c: Include expr.h.
7972
7973 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
7974
7975         * method.c (implicitly_declare_fn): Commonize code for copy ctor
7976         and assignment op. Set TREE_USED for parameter.
7977
7978 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
7979
7980         * class.c (find_final_overrider_data): Add `candidates'.
7981         (dfs_find_final_overrider): Don't issue error messages
7982         prematurely.
7983         (find_final_overrider): Issue error messages here.
7984         (build_base_field): Don't warn about amgibuous direct bases here.
7985         (warn_about_ambiguous_direct_bases): New function.
7986         (layout_class_type): Use it.
7987
7988 2001-04-10  Richard Henderson  <rth@redhat.com>
7989
7990         * typeck.c (build_array_ref): Push the array reference inside
7991         COMPOUND_EXPR and COND_EXPR.
7992
7993 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
7994
7995         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
7996         * decl.c (duplicate_decls): Adjust accordingly.
7997         (maybe_commonize_var): Likewise.
7998         (grokfndecl): Likewise.
7999         (start_function): Likewise.
8000         (start_method): Likewise.
8001         * decl2.c (key_method): Likewise.
8002         (import_export_decl): Likewise.
8003         * method.c (implicitly_declare_fn): Likewise.
8004         * optimize.c (maybe_clone_body): Likewise.
8005
8006 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
8007
8008         * lang-specs.h: Add __DEPRECATED.
8009
8010 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
8011
8012         * search.c (get_dynamic_cast_base_type): When building a new
8013         constant, set its type to ssizetype.
8014
8015 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
8016
8017         * optimize.c (expand_call_inline): Only add newly inlined statements
8018         into inlined_stmts.
8019
8020 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
8021
8022         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
8023         (OPERATOR_FORMAT): Likewise.
8024         (OPERATOR_TYPENAME_FORMAT): Likewise.
8025         * operators.def: Remove old name-mangling information.
8026         * decl.c (grok_op_properties): Adjust accordingly.
8027         * lex.c (init_operators): Likewise.
8028         * rtti.c (get_tinfo_decl): Issue error messages about types that
8029         have variable size.
8030
8031 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
8032
8033         * decl2.c (import_export_decl): Don't call import_export_class
8034         when processing an inline member function.
8035         * semantics.c (expand_body): Call import_export_decl before
8036         emitting inline functions.
8037
8038 2001-03-28  Richard Henderson  <rth@redhat.com>
8039
8040         IA-64 ABI Exception Handling:
8041         * cp-tree.def (EH_SPEC_BLOCK): New.
8042         (MUST_NOT_THROW_EXPR): New.
8043         * cp-tree.h: Update changed function declarations.
8044         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
8045         (CPTI_CALL_UNEXPECTED): New.
8046         (struct cp_language_function): Rename x_eh_spec_try_block
8047         to x_eh_spec_block.
8048         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
8049         * decl.c (current_binding_level): If no current function
8050         bindings, revert to scope_chain.
8051         (initialize_predefined_identifiers): Remove __cp_push_exception.
8052         (store_parm_decls): Use begin_eh_spec_block.
8053         (finish_function): Use finish_eh_spec_block.
8054         (mark_lang_function): Update for name changes.
8055         * decl2.c (finish_file): No mark_all_runtime_matches.
8056         * dump.c (cp_dump_tree): Handle new tree codes.
8057         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
8058         * except.c (catch_language_init, catch_language): Remove.
8059         (init_exception_processing): Don't set language code.
8060         Initialize call_unexpected_node, protect_cleanup_actions,
8061         eh_personality_libfunc, lang_eh_runtime_type.
8062         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
8063         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
8064         (prepare_eh_type): Split out type canonicalizations ...
8065         (build_eh_type_type): ... from here.
8066         (build_eh_type_type_ref): Remove.
8067         (mark_all_runtime_matches): Remove.
8068         (build_exc_ptr): New.
8069         (do_begin_catch, do_end_catch): New.
8070         (do_pop_exception): Remove.
8071         (build_terminate_handler): Remove.
8072         (choose_personality_routine): Split out language choice from ...
8073         (initialize_handler_parm): ... here.
8074         Use MUST_NOT_THROW_EXPR.
8075         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
8076         exception object handling.
8077         (expand_start_eh_spec, expand_end_eh_spec): Remove.
8078         (expand_exception_blocks, alloc_eh_object): Remove.
8079         (begin_eh_spec_block, finish_eh_spec_block): New.
8080         (do_allocate_exception, do_free_exception): New.
8081         (expand_throw): Merge into ...
8082         (build_throw): ... here.  Update for abi.
8083         * expr.c (cplus_expand_expr): No expand_internal_throw.
8084         Handle MUST_NOT_THROW_EXPR.
8085         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
8086         * semantics.c (*) Update for except.h name changes.
8087         (genrtl_try_block): No protect_with_terminate.
8088         (genrtl_eh_spec_block): New.
8089         (genrtl_handler): Don't emit the goto here.
8090         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
8091         (genrtl_finish_function): Don't expand_exception_blocks.
8092         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
8093
8094 2001-03-28  Richard Henderson  <rth@redhat.com>
8095
8096         * decl.c (struct named_label_list): Rename eh_region to
8097         in_try_scope, add in_catch_scope.
8098         (struct binding_level): Rename eh_region to is_try_scope,
8099         add is_catch_scope.
8100         (note_level_for_try): Rename from note_level_for_eh.
8101         (note_level_for_catch): New.
8102         (poplevel): Copy both is_try_scope and is_catch_scope to
8103         the named_label_list struct.
8104         (check_previous_goto_1): Don't check for catch block via
8105         DECL_ARTIFICIAL; use in_try_scope instead.
8106         (check_goto): Likewise.
8107         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
8108         * except.c (expand_start_catch_block): Call note_level_for_catch.
8109         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
8110
8111 2001-03-27  Richard Henderson  <rth@redhat.com>
8112
8113         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
8114         exceptions_via_longjmp.
8115
8116 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
8117
8118         * pt.c (check_default_tmpl_args):  Make error messages clearer.
8119
8120 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
8121
8122         * error.c:  Also undefine 'A' macro used for cp_printers definition.
8123
8124 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8125
8126         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
8127
8128 2001-03-26  Mike Yang <yang@research.att.com>
8129             Mark Mitchell  <mark@codesourcery.com>
8130
8131         * dump.c (dump_access): New function.
8132         (cp_dump_tree): Use it.  Dump basetype information for class
8133         types.
8134
8135 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
8136
8137         * Makefile.in (optimize.o): Depend on params.h.
8138         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
8139         (init_decl_processing): Set flag_no_inline when doing
8140         inlining-on-trees.
8141         * optimize.c: Include params.h.
8142         (struct inline_data): Improve documentation of FNS.  Add
8143         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
8144         (INSNS_PER_STMT): New macro.
8145         (remap_block): Use CLONING_P.
8146         (inlinable_function_p): Don't inline big functions.
8147         (expand_call_inline): Keep track of how much inlining we've done.
8148         (optimize_function): Set FIRST_INLINED_FN.
8149         (maybe_clone_body): Set CLONING_P.
8150         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
8151         tree nodes.
8152         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
8153         rest_of_compilation.  Clear DECL_RTL for local variables
8154         afterwards.
8155         (clear_decl_rtl): New function.
8156
8157 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
8158
8159         Implement DR 209
8160         * cp-tree.h (skip_type_access_control,
8161         reset_type_access_control): Prototype.
8162         * decl.c (grokdeclarator): Access of friends is not checked.
8163         * parse.y (component_decl_list): Reset type access control.
8164         * semantics.c (decl_type_access_control): Clear
8165         current_type_lookups.
8166         (save_type_access_control): Don't save if not deferring.
8167         (skip_type_access_control, reset_type_access_control): New
8168         functions.
8169         (begin_class_definition): Do type access control for basetypes.
8170         Start deferred access control.
8171         (finish_class_definition): Resume immediate access control if
8172         this is a local class.
8173
8174 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8175
8176         * class.c (add_method): Use memcpy/memmove, not bcopy.
8177
8178         * decl.c (duplicate_decls): Likewise.
8179
8180 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
8181
8182         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
8183         not `_'.
8184
8185 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
8186
8187         * decl.c (local_names): Define.
8188         (push_local_name): New.
8189         (grok_reference_init): Return init if initializing static reference
8190         variable with non-constant instead of emitting it.
8191         Move expand_static_init call to cp_finish_decl.
8192         (layout_var_decl): Call push_local_name.
8193         (maybe_commonize_var): Allow inlining functions even if they have
8194         static local variables, use comdat_linkage for them if flag_weak.
8195         (check_initializer): Call obscure_complex_init if
8196         grok_reference_init returned nonzero.
8197         (save_function_data): Clear x_local_names.
8198         (pop_cp_function_context): Free x_local_names.
8199         (mark_inlined_fns): Remove.
8200         (mark_lang_function): Mark x_local_names.
8201         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
8202         Mark inlined_fns as tree, remove call to mark_inlined_fns.
8203         * class.c (alter_access): Ensure DECL_ACCESS is never set if
8204         DECL_DISCRIMINATOR_P.
8205         * cp-tree.h (cp_language_function): Add x_local_names.
8206         (lang_decl_flags): Add discriminator into u2.
8207         (lang_decl_inlined_fns): Remove.
8208         (lang_decl): inlined_fns is now a TREE_VEC.
8209         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
8210         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
8211         TREE_VEC, not a custom structure.
8212         (optimize_function): Likewise.
8213         * mangle.c (discriminator_for_local_entity): Discriminate among
8214         VAR_DECL local entities.
8215         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
8216         is not valid.
8217
8218 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
8219
8220         Add support for Java interface method calls.
8221         * cp-tree.h (struct lang_type): Add java_interface flag.
8222         (TYPE_JAVA_INTERFACE): New macro.
8223         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
8224         by setting TYPE_JAVA_INTERFACE.
8225         * call.c (java_iface_lookup_fn): New static.
8226         (build_over_call): If calling a method declared in a
8227         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
8228         expression which resolves the function address.
8229         (build_java_interface_fn_ref): New function.
8230
8231 2001-03-22  Richard Henderson  <rth@redhat.com>
8232
8233         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
8234         * except.c: Don't include it.
8235
8236 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
8237             based on an idea from Joe Buck <jbuck@synopsys.com>
8238
8239         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
8240         New nonterminals.
8241         (data_def, component_decl): Add reductions to bad_decl.
8242
8243 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
8244
8245         * method.c (do_build_assign_ref): Don't use build_modify_expr for
8246         anonymous aggregates, since they don't have assignment operator
8247         method.
8248         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
8249         assignment operators for anonymous structure fields.
8250
8251 2001-03-21  Jason Merrill  <jason@redhat.com>
8252
8253         * pt.c (instantiate_decl): Abort if we see a member constant
8254         instantiation that doesn't already have its initializer.
8255         Downgrade explicit instantiation without definition to pedwarn.
8256
8257         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
8258         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
8259         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
8260
8261         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
8262         (pending_vtables): Remove.
8263         * decl2.c (pending_vtables): Remove.
8264         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
8265         CLASSTYPE_VTABLE_NEEDS_WRITING.
8266         (import_export_class): Likewise.
8267         (init_decl2): Don't mark pending_vtables.
8268         * lex.c (handle_pragma_vtable): Just sorry.
8269         * pt.c (instantiate_class_template): Don't mess with
8270         CLASSTYPE_VTABLE_NEEDS_WRITING.
8271         (mark_class_instantiated): Likewise.
8272         * ptree.c (print_lang_type): Don't print it.
8273         * semantics.c (begin_class_definition): Don't set it.
8274
8275         * pt.c (template_tail): Replace with last_pending_template.
8276         (maybe_templates, maybe_template_tail): Remove.
8277         (add_pending_template): Adjust.
8278         (instantiate_pending_templates): Adjust.
8279
8280         * cp-tree.h (struct saved_scope): Remove lang_stack field.
8281         (current_lang_stack): Remove.
8282         * decl.c (maybe_push_to_top_level): Don't initialize it.
8283         (duplicate_decls): Use current_lang_depth.
8284         (xref_basetypes): Likewise.
8285         * class.c (current_lang_depth): New fn.
8286         (push_lang_context): Use more varray functionality.
8287         (pop_lang_context): Likewise.
8288
8289         * error.c (GLOBAL_THING): Always use '__'.
8290
8291 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
8292
8293         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
8294
8295         * mangle.c (mangle_decl_string): Mangle the names of overloaded
8296         operators, even when they have `extern "C"' linkage.
8297
8298 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
8299
8300         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
8301         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8302         where it's not necessary.
8303         (add_method): Remove optimization involving comparison of
8304         DECL_ASSEMBLER_NAME.
8305         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
8306         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8307         where it's not necessary.
8308         (check_methods): Likewise.
8309         (build_clone): Likewise.
8310         (built_vtt): Likewise.
8311         * cp-tree.h (DECL_NEEDED_P): Likewise.
8312         * decl.c (pushtag): Likewise.
8313         (duplicate_decls): Likewise.
8314         (pushdecl): Likewise.
8315         (builtin_function): Likewise.
8316         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
8317         (build_cp_library_fn): Likewise.
8318         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
8319         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8320         where it's not necessary.
8321         (make_rtl_for_nonlocal_decl): Likewise.
8322         (cp_finish_decl): Likewise.
8323         (grokfndecl): Likewise.
8324         (grokvardecl): Likewise.
8325         (grokdeclarator): Likewise.
8326         (start_function): Likewise.
8327         (cp_missing_return_ok_p): Likewise.
8328         * decl2.c (grokclassfn): Likewise.
8329         (check_classfn): Likewise.
8330         (finish_static_data_member_decl): Likewise.
8331         (grokfield): Likewise.
8332         * error.c (GLOBAL_IORD_P): Remove.
8333         (dump_global_iord): Improve output.
8334         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
8335         * except.c (nothrow_libfn_p): Summarily reject any function not in
8336         namespace-scope.
8337         * init.c (build_java_class_ref): Don't explicitly set
8338         DECL_ASSEMBLER_NAME after calling mangle_decl.
8339         * mangle.c (mangle_decl_string): Handle extern "C" functions.
8340         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
8341         * method.c (set_mangled_name_for_decl): Don't explicitly set
8342         DECL_ASSEMBLER_NAME after calling mangle_decl.
8343         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
8344         IDENTIFIER_GLOBAL_VALUE for the thunk.
8345         * pt.c (set_mangled_name_for_template_decl): Remove.
8346         (check_explicit_specialization): Don't use it.
8347         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
8348         (tsubst_friend_function): Likewise.
8349         (tsubst_decl): Likewise.
8350         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
8351         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
8352         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8353         where it's not necessary.
8354         (tinfo_base_init): Likewise.
8355         (create_real_tinfo_var): Likewise.
8356         * search.c (looup_field_1): Likewise.
8357         * semantics.c (finish_named_return_value): Likewise.
8358         * tree.c (init_tree): Set lang_set_decl_assembler_name.
8359
8360 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
8361
8362         Correct semantics restrictions checking in throw-expression.
8363         * except.c (is_admissible_throw_operand): New function.
8364         (build_throw): Use it.
8365
8366 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
8367
8368         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
8369         and its ilk.
8370
8371 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
8372
8373         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8374         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
8375         * decl.c (duplicate_decls): Likewise.
8376         (builtin_function): Likewise.
8377         (build_library_fn): Likewise.
8378         (build_cp_library_fn): Likewise.
8379         (check_initializer): Likewise.
8380         (cp_finish_decl): Likewise.
8381         * decl2.c (grokfield): Likewise.
8382         (grok_function_init): Remove #if 0'd code.
8383         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8384         * friend.c (do_friend): Likewise.
8385         * init.c (get_temp_regvar): Likewise.
8386         * method.c (make_thunk): Likewise.
8387         * pt.c (tsubst_friend_function): Likewise.
8388         (tsubst_decl): Likewise.
8389         (regenerate_decl_from_template): Likewise.
8390         * semantics.c (genrtl_named_return_value): Likewise.
8391         (expand_body): Likewise.
8392         (genrtl_finish_function): Likewise.
8393         * tree.c (cp_tree_equal): Likewise.
8394
8395 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
8396
8397         * call.c (convert_like_real): Add extra semantics to INNER
8398         parameter. Don't convert to temporary if a user conversion
8399         gives us an lvalue that we're about to bind to a reference.
8400         Set INNER to indicate pending reference binding on recursive
8401         calls.
8402
8403 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
8404
8405         * cp/lex.c: Delete duplicate pending_lang_change.
8406
8407 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
8408
8409         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
8410         Similarly.
8411         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
8412         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
8413
8414 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
8415
8416         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
8417
8418 2001-03-08  Stan Shebs  <shebs@apple.com>
8419
8420         * cp-tree.h (set_identifier_local_value): Remove unused decl.
8421
8422 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
8423
8424         * spew.c: Remove references to CPP_OSTRING.
8425
8426 2001-03-06  Andrew Haley  <aph@redhat.com>
8427
8428         * typeck.c (convert_arguments): Check that we have an fndecl.
8429
8430 2001-03-05  Andrew Haley  <aph@redhat.com>
8431
8432         * typeck.c (convert_arguments): Don't do ellipsis conversion for
8433         __built_in_constant_p.
8434
8435 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8436
8437         * typeck.c (build_static_cast): Allow enum to enum conversions
8438         as per DR 128.
8439
8440 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8441
8442         * class.c (check_field_decls): Pointers to member do not a
8443         non-pod struct make, as per DR 148.
8444
8445 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8446
8447         * call.c (joust): cp_pedwarn when using gnu extension concerning
8448         worst conversion sequences.
8449
8450 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
8451
8452         * decl.c: Replace all uses of 'boolean' with 'bool'.
8453
8454 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
8455
8456         * lang-specs.h: Add zero initializer for cpp_spec field to
8457         all array elements that need one.  Don't put an #ifdef inside
8458         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
8459         use it.
8460
8461 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
8462
8463         Implement using decls inside template functions.
8464         * decl2.c (validate_nonmember_using_decl): Don't special case
8465         fake_std_node in the global namespace. Don't reject early when
8466         processing a template.
8467         (do_local_using_decl): Add to statement tree. Don't do further
8468         processing when building a template.
8469         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
8470
8471 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
8472
8473         * decl2.c (do_nonmember_using_decl): Don't complain if we find
8474         same function. Do complain about ambiguating extern "C"
8475         declarations.
8476
8477 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
8478
8479         Remove floating point and complex type template constant parms.
8480         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
8481         COMPLEX_TYPE extensions.
8482         (invalid_nontype_parm_type_p): Likewise.
8483
8484 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
8485
8486         * except.c (call_eh_info): Revert "match_function"'s type.
8487
8488 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
8489
8490         Fix ctor vtable vcall offsets.
8491         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
8492         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
8493         (get_matching_base): Remove.
8494         (get_original_base): New function.
8495         (build_vtbl_initializer): Initialize vid.rtti_binfo.
8496         Use a virtual thunk for a ctor vtable with an index
8497         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
8498         primary base within a constructor vtable. Only set
8499         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
8500         when primary base has been lost.
8501         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
8502
8503 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
8504
8505         * call.c (joust): Ensure more_specialized()'s argument length
8506         parameter has correct value for constructors.
8507
8508 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
8509
8510         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
8511
8512         * decl.c (mark_inlined_fns): Prototype.
8513
8514 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
8515
8516         * spew.c (yylex): Correct handling of friends.
8517
8518 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
8519
8520         * mangle.c (write_encoding): Pass write_function_type the
8521         FUNCTION_DECL for the function being encoded.
8522         (write_function_type): Pass it along to write_bare_function_type.
8523         (write_bare_function_type): Pass it along to write_method_parms.
8524         (write_method_parms): Don't mangle the compiler-generated
8525         parameters to a constructor or destructor.
8526
8527 2001-02-22  Andreas Jaeger  <aj@suse.de>
8528
8529         * optimize.c: Include toplev.h for
8530         note_deferral_of_defined_inline_function prototype.
8531
8532 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
8533
8534         * cp-tree.h (struct lang_decl_inlined_fns): New.
8535         (struct lang_decls): Add inlined_fns.
8536         (DECL_INLINED_FNS): New macro.
8537         * optimize.c (struct inline_data): Add inlined_fns.
8538         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
8539         (inlinable_function_p): Likewise, fix typo in comment,
8540         function is not inlinable if it already inlined function currently
8541         being optimized.
8542         (expand_call_inline): Add fn to inlined_fns if necessary.
8543         (optimize_function): Initialize inlined_fns.
8544         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
8545         * decl.c (mark_inlined_fns): New function.
8546         (lang_mark_tree): Call it.
8547
8548 2001-02-21  Jason Merrill  <jason@redhat.com>
8549
8550         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
8551         (DECL_UNINLINABLE): Move to middle-end.
8552
8553         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
8554         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
8555         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
8556         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
8557         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
8558
8559         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
8560         second parm of op=.
8561
8562 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
8563
8564         * decl2.c (set_decl_namespace): Allow explicit instantiations in
8565         any namespace.
8566
8567 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8568
8569         * optimize.c (expand_call_inline): Don't walk subtrees of type
8570         nodes.
8571
8572 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
8573
8574         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
8575         for a destructor.
8576
8577 2001-02-18  Jason Merrill  <jason@redhat.com>
8578
8579         Do put the VTT parameter in DECL_ARGUMENTS.
8580         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
8581         (current_vtt_parm): New macro.
8582         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
8583         (DECL_HAS_VTT_PARM_P): New macro.
8584         (DECL_VTT_PARM): Remove.
8585         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
8586         * decl.c (duplicate_decls): Only copy the operator code if
8587         appropriate.
8588         (start_function): Set current_vtt_parm.
8589         (lang_mark_tree): Don't mark vtt_parm.
8590         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
8591         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
8592         * class.c (build_clone): Maybe remove the VTT parm.
8593         * optimize.c (maybe_clone_body): Set up the VTT parm.
8594         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
8595         * call.c (build_over_call): Just allow the VTT arg.
8596         * method.c (make_thunk): Don't set DECL_VTT_PARM.
8597         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
8598         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
8599         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
8600         * error.c (dump_function_decl): Likewise.
8601         * call.c (build_user_type_conversion_1, convert_like_real): Abort
8602         if we try to call a constructor with in-charge or VTT parms.
8603         * method.c (skip_artificial_parms_for): New fn.
8604         * call.c (add_function_candidate, build_over_call): Call it.
8605         * call.c (build_new_method_call): Use current_vtt_parm.
8606         * init.c (expand_virtual_init): Likewise.
8607         * class.c (same_signature_p): No longer static.
8608         * cp-tree.h: Declare it.
8609         * search.c (look_for_overrides_r): Use it.
8610
8611 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
8612
8613         * cp-tree.h (new_abi_rtti_p): Remove.
8614         (name_mangling_version): Likewise.
8615         (flag_do_squangling): Likewise.
8616         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
8617         * decl.c (grokfndecl): Likewise.
8618         * decl2.c (name_mangling_version): Remove.
8619         (flag_do_squangling): Likewise.
8620         (lang_f_options): Remove `squangle'.
8621         (unsupported_options): Add `squangle'.
8622         (cxx_decode_option): Issue a warning about uses of
8623         -fname-mangling-version.
8624         (finish_file): Remove old ABI support.
8625         * pt.c (check_explicit_specialization): Likewise.
8626         (tsubst_decl): Likewise.
8627         * rtti.c (init_rtti_processing): Likewise.
8628         (build_headof): Likewise.
8629         (get_tinfo_decl_dynamic): Likewise.
8630         (tinfo_from_decl): Likewise.
8631         (build_dynamic_cast_1): Likewise.
8632         (synthesize_tinfo_var): Likewise.
8633         * init.c (build_new): Allow enumeration types for the array-bounds
8634         in a direct-new-declarator.
8635
8636         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
8637
8638         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
8639         TREE_PROTECTED from the template being specialized.
8640
8641 2001-02-17  Jason Merrill  <jason@redhat.com>
8642
8643         * decl2.c (build_artificial_parm): Set TREE_READONLY.
8644
8645         * decl.c (bad_specifiers): Allow throw specs on things with
8646         pointer-to-function or -member-function type.
8647         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
8648         a pmf.
8649
8650 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
8651
8652         * call.c (check_dtor_name): Handle template names correctly.
8653
8654 2001-02-16  Jason Merrill  <jason@redhat.com>
8655
8656         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
8657         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
8658         * optimize.c (maybe_clone_body): Don't substitute it.
8659         * call.c (build_new_method_call): Check in_chrg instead.
8660         * init.c (expand_virtual_init): Likewise.
8661
8662 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
8663
8664         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
8665         class-type introduces at least a type-name.
8666
8667 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
8668
8669         * call.c (convert_like_real): Create a temporary for non-lvalue.
8670
8671 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
8672
8673         * cp-tree.h: Fix typos in comments.
8674
8675 2001-02-16  Jason Merrill  <jason@redhat.com>
8676
8677         * optimize.c (remap_block): If we're compiling a clone, pass the
8678         new block to insert_block.
8679
8680 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
8681
8682         * semantics.c (finish_asm_stmt): Robustify.
8683
8684 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
8685
8686         * pt.c (push_template_decl_real): Don't remangle the name of a
8687         class template.
8688
8689 2001-02-15  Jim Meyering  <meyering@lucent.com>
8690
8691         * Make-lang.in (c++.install-common): Depend on installdirs.
8692         (c++.install-info): Likewise.
8693         (c++.install-man): Likewise.
8694
8695 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
8696
8697         * typeck2.c (build_m_component_ref): Robustify.
8698
8699 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
8700
8701         * friend.c (do_friend): Don't take the nested [template] class
8702         into account when deciding whether to warn about the friend
8703         function not referring to a template function.
8704
8705 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
8706
8707         * typeck.c (build_unary_op): Clarify error message.
8708
8709 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
8710
8711         * parse.y (component_constructor_declarator): allow optional
8712         parentheses around constructor class name.
8713
8714 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8715
8716         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
8717         section.
8718         * init.c (emit_base_init): Remove incorrect comment about
8719         virtual bases.
8720         * method.c (make_thunk): Fix comment alignment.
8721
8722 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8723
8724         Kill remnants of this is variable.
8725         * cp-tree.h (flag_this_is_variable): Remove.
8726         * decl2.c (flag_this_is_variable): Remove.
8727         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
8728         (build_vbase_path): The path is non-static, even in a cdtor.
8729         (resolves_to_fixed_type_p): Add additional return value.
8730         * search.c (init_vbase_pointers): Adjust.
8731         * tree.c (lvalue_p_1): Adjust.
8732         * typeck.c (mark_addressable): Adjust.
8733
8734 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8735
8736         * pt.c (unify): Don't check cv quals of array types.
8737
8738 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8739
8740         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
8741         check whether we already have the type.
8742
8743 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
8744
8745         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
8746         * call.c (build_op_delete_call): Simplify to remove duplicate
8747         code.
8748         * class.c (clone_function_decl): Don't build the deleting variant
8749         of a non-virtual destructor.
8750         * decl.c (finish_destructor_body): Don't call delete if this is a
8751         non-virtual destructor.
8752         * init.c (build_delete): Explicitly call `operator delete' when
8753         deleting an object with a non-virtual destructor.
8754
8755 2001-02-13  Jason Merrill  <jason@redhat.com>
8756
8757         * lang-specs.h: Add more __EXCEPTIONS.
8758
8759 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
8760
8761         * typeck2.c (process_init_constructor): Check
8762         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
8763
8764 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
8765
8766         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
8767         Remove spurious information in comment. Allow further
8768         adjustments of REFERENCE_TYPE args.
8769
8770 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
8771
8772         * errfn.c (cp_deprecated): Tweak diagnostic text.
8773         * parse.y (new_initializer): Deprecate initializer lists
8774         extension.
8775
8776 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
8777
8778         Remove old ABI support.
8779
8780 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
8781
8782         * decl2.c (flag_vtable_thunks): Always set it to 1.
8783         (flag_new_abi): Likewise.
8784         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
8785
8786         * Makefile.in (g++spec.o): Fix typo.
8787
8788 2001-02-09  Jason Merrill  <jason@redhat.com>
8789
8790         * lang-specs.h: Restore definition of __EXCEPTIONS.
8791
8792 2001-02-08  Jason Merrill  <jason@redhat.com>
8793
8794         * search.c (shared_member_p): New function.
8795         (lookup_field_r): Use it.
8796         * cp-tree.h (SHARED_MEMBER_P): Remove.
8797
8798         * method.c (process_overload_item): Handle template-dependent array
8799         bounds.
8800         * pt.c (type_unification_real): If we end up with undeduced nontype
8801         parms, try again.
8802
8803         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
8804         types.
8805
8806         * typeck2.c (friendly_abort): Don't say anything if we have
8807         earlier errors or sorries.
8808
8809         * decl.c (check_tag_decl): Notice attempts to redefine bool and
8810         wchar_t.  Ignore if in_system_header.
8811
8812         * decl.c (maybe_push_cleanup_level): New fn...
8813         (start_decl_1): ...split out from here.
8814         * cvt.c (build_up_reference): Use it.
8815         * cp-tree.h: Declare it.
8816
8817 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
8818
8819         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
8820         spec.
8821
8822 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
8823
8824         * pt.c (lookup_template_class): Make sure it's a primary
8825         template or template_template_parm when called from the parser.
8826         (instantiate_template_class): Add assertion.
8827
8828 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
8829
8830         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
8831         from error_mark_node.
8832
8833 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
8834
8835         Fix specification and implementation bugs in V3 ABI
8836         construction vtables.
8837         * cp-tree.h (flag_dump_class_layout): New flag.
8838         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
8839         (BINFO_LOST_PRIMARY_P): New flag.
8840         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
8841         (BINFO_PRIMARY_MARKED_P): Rename to ...
8842         (BINFO_PRIMARY_P): ... here.
8843         (binfo_via_virtual): New prototype.
8844         * decl2.c (flag_dump_class_layout): New flag.
8845         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
8846         use `=' as a file name separator.
8847         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
8848         bases.
8849         (build_vtbl_address): If this is a virtual primary base, then
8850         get the vtbl of what it is ultimately primary for.
8851         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
8852         for BINFO_PRIMARY_P.
8853         (dfs_skip_nonprimary_vbases_markedp): Likewise.
8854         (get_shared_vbase_if_not_primary): Likewise.
8855         (dfs_get_pure_virtuals): Likewise.
8856         (expand_upcast_fixups): Likewise.
8857         (fixup_virtual_upcast_offsets): Likewise.
8858         (dfs_find_vbase_instance): Likewise.
8859         (find_vbase_instance): Likewise.
8860         (binfo_from_vbase): Adjust comment to reflect reality.
8861         (binfo_via_virtual): New function.
8862         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
8863         for binfo walking during VTT construction.
8864         (dfs_mark_primary_bases): Remove.
8865         (force_canonical_binfo_r): New function.
8866         (force_canonical_binfo): New function.
8867         (mark_primary_virtual_base): New function.
8868         (mark_primary_bases): Walk in inheritance graph order, use
8869         mark_primary_virtual_base.
8870         (determine_primary_base): Use some more intermediate variables.
8871         (dfs_find_final_overrider): Don't check for overriding along a
8872         virtual path.
8873         (dfs_modify_vtables): Walk into primary virtual bases too.
8874         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
8875         (build_base_fields): Likewise.
8876         (dfs_set_offset_for_unshared_vbases): Likewise.
8877         (layout_virtual_bases): Likewise.
8878         (end_of_class): Likewise.
8879         (finish_struct_1): Call dump_class_hierarchy, if requested.
8880         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
8881         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
8882         (dump_class_hierarchy): Add file parameter. Append to file, if
8883         required.
8884         (finish_vtbls): Adjust accumulate_vtbl_inits call.
8885         Use canonical base for virtual bases.
8886         (build_vtt): Add more comments. Adjust build_vtt_inits call.
8887         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
8888         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
8889         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
8890         virtual VTTs.
8891         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
8892         from DATA.  We want virtual primary bases and all bases via virtual.
8893         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
8894         virtual base when not a construction vtable.
8895         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
8896         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
8897         Use canonical bases when processing virtual bases.
8898         (accumulate_vtbl_inits): We're interested in any base via a
8899         virtual path.
8900         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
8901         within a construction vtable, determine what is being overridden.
8902         (build_vtbl_initializer): Add more comments
8903         (add_vcall_offset_vtbl_entries_1): Adjust comment.
8904         (build_rtti_vtbl_entries): Check if the base has lost its
8905         primary.
8906
8907 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
8908
8909         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
8910
8911 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8912
8913         * decl.c (pushdecl): Call abort instead of fatal.
8914         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
8915         * init.c (build_new_1): Likewise.
8916         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
8917         * decl.c (build_typename_type): hash_table_init now returns void.
8918         decl.c (init_decl_processing): Make an error non-fatal.
8919
8920 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
8921
8922         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
8923         Document.
8924         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
8925         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
8926         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8927         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
8928         * decl.c (maybe_commonize_var): Use the new name-mangling where
8929         appropriate.
8930         * decl2.c (comdat_linkage): Enhance comments.  Make all
8931         compiler-generated things static, if COMDAT is not available.
8932         (get_tinfo_decl): Do not make typeinfo objects that belong in the
8933         library COMDAT.
8934         (tinfo_base_init): Use the correct mangled name for typeinfo
8935         strings, and push them into the global scope.
8936         (typeinfo_in_lib_p): New function.
8937         (synthesize_tinfo_var): Use it.
8938         (create_real_tinfo_var): Likewise.
8939
8940 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
8941
8942         * decl.c (push_class_binding): Use context_for_name_lookup instead
8943         of CP_DECL_CONTEXT.
8944         * search.c (context_for_name_lookup): Remove static.  Check for NULL
8945         context in the loop.
8946         * cp-tree.h (context_for_name_lookup): Add prototype.
8947
8948 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
8949
8950         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
8951         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
8952         Remove.
8953         * call.c (convert_class_to_reference, build_user_type_conversion_1,
8954         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
8955
8956 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
8957
8958         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
8959         of macros used when compiling g++spec.c.
8960         * g++spec.c (lang_specific_driver): Link with the shared
8961         libgcc by default.
8962
8963 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8964
8965         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
8966         make_reference_declarator, make_call_declarator), method.c
8967         (implicitly_declare_fn), parse.y (namespace_using_decl,
8968         notype_unqualified_id, expr_or_declarator, new_type_id,
8969         after_type_declarator, direct_after_type_declarator,
8970         notype_declarator, complex_notype_declarator,
8971         complex_direct_notype_declarator, qualified_id,
8972         notype_qualified_id, overqualified_id, direct_new_declarator,
8973         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
8974         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
8975         instead of build_parse_node.
8976
8977 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8978
8979         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
8980         (minus_one_node): Moved to top level gcc directory.  Renamed
8981         to integer_minus_one_node.
8982
8983         * init.c (init_init_processing): Don't set minus_one_node.
8984         (build_vec_init): Use integer_minus_one_node.
8985
8986         * rtti.c (get_tinfo_decl_dynamic): Likewise.
8987
8988 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
8989
8990         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
8991         identical and they would be replaced with constant, remove
8992         MODIFY_EXPR from the tree.
8993
8994 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8995
8996         * Make-lang.in: Remove all dependencies on defaults.h.
8997         * call.c: Don't include defaults.h.
8998         * decl.c: Likewise.
8999         * decl2.c: Likewise.
9000         * except.c: Likewise.
9001         * pt.c: Likewise.
9002         * rtti.c: Likewise.
9003         * tree.c: Likewise.
9004         * typeck.c: Likewise.
9005
9006 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
9007
9008         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
9009         operators even in "C" linkage.
9010         * method.c (set_mangled_name_for_decl): Likewise.
9011         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
9012         overloaded operators in "C" linkage.
9013
9014 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
9015
9016         * pt.c (tsubst_decl): Remove IN_DECL parameter.
9017         (tsubst_arg_types): Check parameter is not void.
9018         (tsubst): Adjust tsubst_decl call.
9019
9020 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
9021
9022         * call.c (add_builtin_candidate): Quote std properly, from
9023         previous change.
9024
9025 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9026
9027         * pt.c (check_explicit_specialization): Clone constructors and
9028         destructors.
9029
9030 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
9031
9032         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
9033         indicates anything special about template depth. Make sure we
9034         only count the user visible template classes.
9035
9036 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
9037
9038         * call.c (build_conv): Typo in comment.
9039         (add_builtin_candidate): Add more explanation.
9040         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
9041         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
9042         when we have enumeral types.
9043         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
9044         candidates for relops and eqops.
9045         (joust): Simplify control flow. Allow a non-template user
9046         function to hide a builtin.
9047
9048 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
9049
9050         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
9051         (more_specialized): Add deduction parameter.
9052         * call.c (joust): Adjust more_specialized call.
9053         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
9054         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
9055         (get_bindings_order): Remove.
9056         (get_bindings_real): Add DEDUCE parameter.
9057         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
9058         REFERENCE_TYPE jig for DEDUCE_ORDER.
9059         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
9060         maybe_adjust_types_for_deduction.
9061         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
9062         directly.
9063         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
9064         (check_cv_quals_for_unify): Use new unify qualifier flags.
9065         (unify): Clear new unify qualifier flags.
9066         (get_bindings_real): Add DEDUCE parameter.
9067         (get_bindings): Adjust call to get_bindings_real.
9068         (get_bindings_overload): Likewise.
9069         (most_specialized_instantiation): Adjust call to
9070         more_specialized.
9071
9072 2001-01-19  Jason Merrill  <jason@redhat.com>
9073
9074         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
9075
9076         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
9077         -fnew-abi.
9078
9079 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
9080
9081         * decl2.c (arg_assoc_class): Fix double iteration logic.
9082
9083 2001-01-19  Jason Merrill  <jason@redhat.com>
9084
9085         * init.c (build_delete): Always call convert_force to strip cv-quals.
9086
9087         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
9088         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
9089         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
9090
9091 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9092
9093         * search.c (get_vbase_1): Count only virtual bases.
9094
9095 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9096
9097         * class.c (duplicate_tag_error): Robustify flag clearing.
9098
9099 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9100
9101         * cp-tree.h (lookup_template_class): Add complain parm.
9102         * decl.c (lookup_namespace_name): Adjust call to
9103         lookup_template_class.
9104         (make_typename_type): Likewise.
9105         * semantics.c (finish_template_type): Likewise.
9106         * pt.c (lookup_template_class): Add complain parm. Adjust.
9107         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
9108         (tsubst): Likewise.
9109
9110 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9111
9112         * pt.c (copy_default_args_to_explicit_spec): Preserve
9113         object's CV quals. Reorganize.
9114
9115 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9116
9117         * typeck.c (build_modify_expr): Say `initialization' for
9118         INIT_EXPRs.
9119         * init.c (build_default_init): Convert to enumeral type, if
9120         needed.
9121
9122 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
9123
9124         * parse.y (nomods_initdcl0): Properly set things up for
9125         initdcl0_innards.
9126
9127 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9128
9129         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
9130         (type_unification_real): Set it.
9131         (unify): Use it.
9132
9133 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9134
9135         * decl.c (finish_destructor_body): Convert to vbase pointer here.
9136
9137 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9138
9139         * semantics.c (begin_class_definition): Check we're not inside a
9140         template parm list.
9141
9142 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9143
9144         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
9145         BASELINK_P.
9146
9147 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9148
9149         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
9150         * call.c (build_over_call): Add comment.
9151
9152 2001-01-16 Daniel Berlin <dberlin@redhat.com>
9153
9154         * cvt.c (ocp_convert): Handle vector type conversion
9155         * typeck2.c (digest_init): Handle vector type initializations
9156
9157 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
9158
9159         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
9160           was given.
9161
9162 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
9163
9164         * pt.c (check_nontype_parm): Rename to ...
9165         (invalid_nontype_parm_type_p): ... here.
9166         (process_template_parm): Adjust.
9167         (convert_template_argument): Adjust.
9168
9169 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
9170
9171         * pt.c (check_nontype_parm): New function.
9172         (process_template_parm): Use it.
9173         (convert_template_argument): Use it.
9174         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
9175         member.
9176
9177 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
9178
9179         * tree.c: Add defaults.h
9180         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
9181         * Make-lang.in (cp/tree.o): Add defaults.h.
9182
9183 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9184
9185         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
9186
9187 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9188
9189         * g++.1: Change to be ".so man1/gcc.1".
9190
9191 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9192
9193         * Make-lang.in (c++.info, c++.install-info): Build and install g++
9194         internals info.
9195         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
9196         ($(srcdir)/cp/g++int.info): New target.
9197         * gxxint.texi: Add info directory entry.  Use @@ in email address.
9198         * .cvsignore: Update.
9199
9200 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
9201
9202         * typeck.c (build_c_cast): Do template processing earlier.
9203         Always pedwarn on array casts.
9204
9205 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
9206
9207         * friend.c (make_friend_class): Make sure a templated class is
9208         actually a template.
9209
9210 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9211
9212         * decl2.c (get_guard): Set linkage from guarded decl.
9213
9214 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9215
9216         * call.c (convert_default_arg): Check for unprocessed
9217         DEFAULT_ARG.
9218         * cp-tree.h (replace_defarg): Move to spew.c.
9219         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
9220         spew.c, which is where they really are.
9221         (done_pending_defargs): Declare.
9222         (unprocessed_defarg_fn): Declare.
9223         * decl.c (replace_defarg): Move to spew.c
9224         * parse.y (structsp): Call done_pending_defargs.
9225         * spew.c (defarg_fns): Rearrange list structure.
9226         (defarg_fnsdone): New static variable.
9227         (defarg_depfns): New static variable.
9228         (init_spew): Adjust.
9229         (add_defarg_fn): Store the type in TREE_TYPE.
9230         (do_pending_defargs): Detect and deal with ordering constraints
9231         and circularity.
9232         (done_pending_defargs): New function.
9233         (unprocessed_defarg_fn): New function.
9234         (replace_defarg): Moved from decl.c. Robustify. Don't save
9235         if circularity detected.
9236
9237 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9238
9239         * pt.c (unify): Check array has a domain, before checking
9240         whether it is variable sized.
9241
9242 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9243
9244         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
9245         parameters with pointers to arrays of unknown bound.
9246
9247 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9248
9249         * parse.y (template_parm_header, template_spec_header): New
9250         reductions. Split out from ...
9251         (template_header): ... here. Use them.
9252         (template_template_parm): Use template_parm_header.
9253         * semantics.c (finish_template_template_parm): Add assert.
9254
9255 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
9256
9257         * mangle.c (write_builtin_type): Fix thinko.
9258
9259         * pt.c (copy_default_args_to_explicit_spec_1): New function.
9260         (copy_default_args_to_explicit_spec): Likewise.
9261         (check_explicit_specialization): Use it.
9262
9263         * class.c (finish_struct_1):  Remove last argument in call to
9264         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
9265         * decl.c (builtin_function): Likewise.
9266         (build_cp_library_fn): Likewise.
9267         (check_initializer): Likewise.
9268         (make_rtl_for_nonlocal_decl): Likewise.
9269         (cp_finish_decl): Likewise.
9270         (start_function): Likewise.
9271         * decl2.c (finish_anon_union): Likewise.
9272         * friend.c (do_friend): Likewise.
9273         * init.c (build_java_class_ref): Likewise.
9274         * method.c (make_thunk): Likewise.
9275         * pt.c (tsubst_friend_function): Likewise.
9276         * semantics.c (expand_body): Likewise.
9277
9278 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
9279
9280         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
9281         looking at DECL_CLONED_FUNCTION for non-functions.
9282
9283 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
9284
9285         * error.c (dump_template_parameter): Use parm to determine how
9286         to print default value.
9287
9288 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
9289
9290         * class.c (duplicate_tag_error): Clear more flags.
9291
9292 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
9293
9294         * call.c (build_new_method_call): Use binfo_for_vbase.
9295
9296 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
9297
9298         * cp-tree.h (flag_cond_mismatch): Don't declare.
9299         * decl2.c (flag_cond_mismatch): Don't define.
9300         (lang_f_options): Remove cond-mismatch.
9301         (unsupported_options): Add cond-mismatch.
9302
9303 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
9304
9305         * class.c (handle_using_decl): Reject using of constructor name
9306         of sourcing class. Allow injecting of a method with same name as
9307         nested class. Fixup error messages.
9308
9309 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
9310
9311         * decl2.c (lang_decode_option): Handle -Wformat=2.
9312
9313 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9314
9315         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
9316         initialized_in_class.
9317         (DECL_DEFINED_IN_CLASS_P): Rename to ...
9318         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
9319         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
9320         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
9321         * pt.c (check_default_tmpl_args): Adjust for
9322         DECL_INITIALIZED_IN_CLASS_P.
9323         (instantiate_class_template): Likewise.
9324         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
9325
9326         * class.c (finish_struct): Constify saved_filename.
9327
9328 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9329
9330         * class.c (duplicate_tag_error): Adjust diagnostic.
9331         (finish_struct): Locally set location to start of struct.
9332         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
9333
9334 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9335
9336         * decl.c (struct binding_level): Adjust class_shadowed comments
9337         to reflect reality.
9338         (push_class_level_binding): Adjust comments to reflect reality.
9339         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
9340         Don't set TREE_VALUE on the class_shadowed list.
9341
9342 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9343
9344         * decl2.c (acceptable_java_type): Allow references too.
9345         * init.c (build_java_class_ref): When using the new ABI, search
9346         `class$' and have it mangled with `mangle_decl.'
9347         * mangle.c (write_java_integer_type_codes): New function.
9348         (write_builtin_type): Detect and mangle Java integer and real
9349         types.
9350
9351 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
9352
9353         * decl2.c (grokfield): Don't accept `asm' specifiers for
9354         non-static data members.
9355
9356 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9357
9358         * expr.c (cplus_expand_expr): Don't reset `target'.
9359
9360 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
9361
9362         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
9363
9364 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
9365
9366         * parse.y (template_datadef): Check for error_mark_node.
9367
9368 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
9369
9370         * cp-tree.def (DEFAULT_ARG): Make `x' class.
9371
9372 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
9373
9374         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
9375         (record_builtin_type): Make non-static.
9376         (flag_short_double): Don't declare.
9377         (init_decl_processing): Remove the creation of many tree nodes now
9378         in c_common_nodes_and_builtins.
9379         (build_void_list_node): New function.
9380         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
9381         * cp-tree.h (flag_short_wchar): Don't declare.
9382
9383 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
9384
9385         * call.c (build_conv): Don't use build1 for USER_CONV.
9386         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
9387
9388 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
9389
9390         * lex.c (lang_init): Call c_common_lang_init.
9391
9392 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
9393
9394         * search.c (lookup_fnfields_here): Remove.
9395         (look_for_overrides_r): Use lookup_fnfields_1.
9396         Ignore functions from using declarations.
9397
9398 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
9399
9400         Implement exceptions specifiers for implicit member functions.
9401         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
9402         * method.c (synthesize_exception_spec): New function.
9403         (locate_dtor, locate_ctor, locate_copy): New functions.
9404         (implicitly_declare_fn): Generate the exception spec too.
9405         * search.c (check_final_overrider): Check artificial functions
9406         too.
9407         * typeck2.c (merge_exception_specifiers): New function.
9408
9409 2001-01-03  Jason Merrill  <jason@redhat.com>
9410
9411         * init.c (build_default_init): New fn.
9412         (perform_member_init): Split out from here.
9413         (build_new_1): Use it.  Simplify initialization logic.
9414         (build_vec_init): Take an array, rather than a pointer and maxindex.
9415         Speed up simple initializations.  Don't clean up if we're assigning.
9416         * cp-tree.h: Adjust.
9417         * decl2.c (do_static_initialization): Remove TREE_VEC case.
9418         * parse.y (new_initializer): Return void_zero_node for ().
9419         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
9420         * typeck2.c (digest_init): Only complain about user-written
9421         CONSTRUCTORs.
9422
9423 2000-12-22  Mike Stump  <mrs@wrs.com>
9424
9425         * decl2.c: (max_tinst_depth): Increase to 50.
9426
9427 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
9428
9429         * class.c (invalidate_class_lookup_cache): Zero the
9430         previous_class_values.
9431         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
9432         TREE_INT_CST_HIGH.
9433         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
9434         * decl.c (free_bindings): New variable.
9435         (push_binding): Don't create a new binding if we have one on the
9436         free list.
9437         (pop_binding): Put old bindings on the free list.
9438         (init_decl_processing): Use size_int, not build_int_2.
9439         Register free_bindings as a GC root.
9440         (cp_make_fname_decl): Use size_int, not build_int_2.
9441         (push_inline_template_parms_recursive): Likewise.
9442         (end_template_parm_list): Likewise.
9443         (for_each_template_parm): Do not use walk_tree_without_duplicates.
9444         (tsubst_template_parms): Use size_int, not build_int_2.
9445         (tsubst): Likewise.
9446         * rtti.c (get_vmi_pseudo_type_info): Likewise.
9447
9448 2001-01-02  Richard Henderson  <rth@redhat.com>
9449
9450         * parse.y (asm): Set ASM_INPUT_P.
9451
9452 2001-01-02  Jason Merrill  <jason@redhat.com>
9453
9454         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
9455         for v3 ABI.
9456
9457         * typeck.c (cp_truthvalue_conversion): New fn.
9458         * cvt.c (ocp_convert): Use it.
9459
9460         * cp-tree.h: Lose c-common.c decls.
9461
9462         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
9463         * cvt.c (convert_to_void): Use type_unknown_p.
9464
9465         * typeck.c (strip_all_pointer_quals): Also strip quals from
9466         pointer-to-member types.
9467
9468         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
9469         parse.y as C.
9470
9471         * call.c (build_new_method_call): Do evaluate the object parameter
9472         when accessing a static member.
9473         * typeck.c (build_component_ref): Likewise.
9474
9475 2001-01-02  Andreas Jaeger  <aj@suse.de>
9476
9477         * decl.c (cp_missing_noreturn_ok_p): New.
9478         (init_decl_processing): Set lang_missing_noreturn_ok_p.
9479
9480 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
9481
9482         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
9483
9484 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
9485
9486         * class.c (pushclass): Remove #if 0'd code.
9487         * cp-tree.h (overload_template_name): Remove.
9488         * decl.c (store_bindings): Simplify.
9489         (pop_from_top_level): Likewise.
9490         * pt.c (overload_template_name): Remove.
9491         (instantiate_decl): Don't call push_to_top_level if it's not
9492         needed.
9493
9494 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
9495
9496         * pt.c (register_local_specialization): Don't return a value.
9497         (lookup_template_class): Use move-to-front heuristic when looking
9498         up template instantiations.
9499         (instantiate_decl): Only push_to_top_level when we're actually
9500         going to instantiate the template.
9501
9502 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
9503
9504         * search.c (binfo_for_vtable): Return least derived class, not
9505         most.  Handle secondary vtables.
9506
9507 2000-12-22  Jason Merrill  <jason@redhat.com>
9508
9509         * pt.c (more_specialized): Don't optimize len==0.
9510         (fn_type_unification): If we're adding the return type, increase len.
9511
9512         * typeck.c (build_binary_op): Fix pmf comparison logic.
9513
9514         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
9515         DECL_STATIC_FUNCTION_P.
9516
9517         * semantics.c (genrtl_finish_function): Don't try to jump to
9518         return_label unless it exists.
9519
9520         In partial ordering for a call, ignore parms for which we don't have
9521         a real argument.
9522         * call.c (joust): Pass len to more_specialized.
9523         (add_template_candidate_real): Strip 'this', pass len.
9524         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
9525         (get_bindings_order): New fn.  Pass len down.
9526         (get_bindings_real): Strip 'this', pass len.
9527         (fn_type_unification): Likewise.
9528         (type_unification_real): Succeed after checking 'len' args.
9529         (most_specialized_instantiation): Lose explicit_args parm.
9530         * class.c (resolve_address_of_overloaded_function): Strip 'this',
9531         pass len.
9532
9533 2000-12-21  Jason Merrill  <jason@redhat.com>
9534
9535         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
9536         DECL_TEMPLATE_RESULT.
9537
9538         * search.c (lookup_field_r): Call lookup_fnfields_1, not
9539         lookup_fnfields_here.
9540
9541         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
9542
9543         * call.c (build_object_call): Also allow conversions that return
9544         reference to pointer to function.
9545         (add_conv_candidate): Handle totype being ref to ptr to fn.
9546         (build_field_call): Also allow members of type reference to function.
9547         Lose support for calling pointer to METHOD_TYPE fields.
9548
9549         * error.c (dump_expr): Handle *_CAST_EXPR.
9550
9551         * typeck2.c (build_scoped_ref): Always convert to the naming class.
9552
9553         * tree.c (break_out_cleanups): Lose.
9554         * cp-tree.h: Remove prototype.
9555         * typeck.c (build_component_ref): Don't break_out_cleanups.
9556         (build_compound_expr): Likewise.
9557         * semantics.c (finish_expr_stmt): Likewise.
9558
9559 2000-12-20  Richard Henderson  <rth@redhat.com>
9560
9561         * cp-tree.h: Update declarations.
9562         * decl.c (finish_case_label): Return the new stmt node.
9563         * semantics.c (finish_goto_stmt): Likewise.
9564         (finish_expr_stmt, finish_return_stmt): Likewise.
9565         (finish_break_stmt, finish_continue_stmt): Likewise.
9566         (finish_asm_stmt): Likewise.
9567         * parse.y (already_scoped_stmt): Set STMT_LINENO.
9568         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
9569         (simple_if, simple_stmt): Return the new stmt node.
9570         (save_lineno): New.
9571
9572 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
9573
9574         * cp-tree.h: Don't declare warn_long_long.
9575
9576 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9577
9578         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
9579         IS_AGGR_TYPE.
9580
9581 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9582
9583         * pt.c (unify): Handle when both ARG and PARM are
9584         BOUND_TEMPLATE_TEMPLATE_PARM.
9585
9586 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9587
9588         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
9589         DECL_TEMPLATE_PARM_P.
9590
9591 2000-12-15  Jason Merrill  <jason@redhat.com>
9592
9593         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
9594
9595         * init.c (build_new_1): Don't strip quals from type.
9596
9597         * decl.c (pushdecl): Don't check for linkage on a non-decl.
9598
9599         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
9600
9601         * call.c (build_new_function_call): Lose space before paren in
9602         error message.
9603         (build_new_method_call): Likewise.
9604
9605         * typeck2.c (build_m_component_ref): Propagate quals from datum.
9606
9607 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9608
9609         * pt.c (check_explicit_specialization): Propagate default
9610         function arguments to explicit specializations.
9611
9612 2000-12-13  DJ Delorie  <dj@redhat.com>
9613
9614         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
9615         and <? operators.
9616
9617 2000-12-08  Jason Merrill  <jason@redhat.com>
9618
9619         * error.c (dump_function_name): Don't let the user see __comp_ctor.
9620
9621         Clean up copy-initialization in overloading code.
9622         * call.c (build_user_type_conversion_1): Die if we are asked to
9623         convert to the same or a base type.
9624         (implicit_conversion): Avoid doing so.  Lose reference binding code.
9625         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
9626         direct-initialization.  Also do direct-init part of copy-init.
9627         (build_user_type_conversion): Don't provide context to convert_like.
9628         * cvt.c (ocp_convert): build_user_type_conversion will now provide
9629         the constructor call for copy-init.
9630
9631         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
9632         instantiation of a member template.
9633         (do_decl_instantiation): Not here.
9634
9635 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
9636
9637         * class.c (check_field_decls): Don't special case anonymous
9638         fields in error messages.
9639         (note_name_declared_in_class): Use %D on diagnostic.
9640
9641         * tree.c (pod_type_p): Use strip_array_types.
9642         (cp_valid_lang_attribute): Likewise.
9643         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
9644         multiple evaluations.
9645         (cp_has_mutable_p): Use strip_array_types.
9646
9647 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
9648
9649         * cp-tree.h (sufficient_parms_p): Declare new function.
9650         * call.c (sufficient_parms_p): New function, broken out of ...
9651         (add_function_candidate): ... here. Use it.
9652         (add_conv_candidate): Use it.
9653         * decl.c (grok_ctor_properties): Use it.
9654
9655 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
9656
9657         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
9658
9659 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
9660
9661         * decl2.c (lang_decode_option): Handle -Wformat-security.
9662
9663 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9664
9665         * pt.c (verify_class_unification): New function.
9666         (get_class_bindings): Use it.
9667         (try_class_unification): Tidy.
9668         (unify): Handle when argument of a template-id is not
9669         template parameter dependent.
9670         (template_args_equal): Handle when TREE_CODE's do not match.
9671
9672 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
9673
9674         * lang-specs.h (c++): When invoking the stand-alone preprocessor
9675         for -save-temps, pass all relevant -Defines to it, and then don't
9676         pass them to cc1plus.
9677
9678 2000-12-05  Will Cohen  <wcohen@redhat.com>
9679
9680         * decl.c (finish_case_label): Cleared
9681         more_cleanups_ok in surrounding function scopes.
9682         (define_label): Likewise.
9683
9684 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
9685
9686         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
9687         (get_matching_virtual): Remove.
9688         (look_for_overrides): Declare new function.
9689         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
9690         DECL_VINDEX here.
9691         * class.c (check_for_override): Move base class iteration code
9692         to look_for_overrides.
9693         * search.c (next_baselink): Remove.
9694         (get_virtuals_named_this): Remove.
9695         (get_virtual_destructor): Remove.
9696         (tree_has_any_destructors_p): Remove.
9697         (struct gvnt_info): Remove.
9698         (check_final_overrider): Remove `virtual' from error messages.
9699         (get_matching_virtuals): Remove. Move functionality to ...
9700         (look_for_overrides): ... here, and ...
9701         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
9702         to be overriding.
9703
9704 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
9705
9706         * typeck.c (get_delta_difference): If via a virtual base,
9707         return zero.
9708         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
9709         adjustment.
9710
9711 2000-12-04  Richard Henderson  <rth@redhat.com>
9712
9713         * error.c (dump_tree): Use output_add_string not OB_PUTS.
9714
9715 2000-12-04  Jason Merrill  <jason@redhat.com>
9716
9717         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
9718         (write_builtin_type): Pass intSI_type_node and the like through
9719         type_for_mode.
9720         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
9721         Pass intSI_type_node and the like through type_for_mode.
9722         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
9723         * pt.c (tsubst, unify): Likewise.
9724         * tree.c (walk_tree): Likewise.
9725         * error.c (dump_type): Likewise.
9726         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
9727
9728         * Make-lang.in: Tweak top comment for emacs.
9729         (cp/TAGS): Restore.
9730
9731         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
9732
9733         * class.c (clone_function_decl): Robustify.
9734
9735 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
9736
9737         * decl.c (store_bindings): Only search in the non modified
9738         old_bindings for duplicates.
9739
9740 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
9741
9742         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
9743         TYPE_POLYMORPHIC_P.
9744
9745         * typeck.c (build_static_cast): Remove unused variable.
9746
9747 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9748
9749         * pt.c: Fix typo in comment.
9750
9751 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
9752
9753         * decl2.c (warn_format): Remove definition.
9754         (lang_decode_option): Handle -Wformat-nonliteral,
9755         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
9756
9757 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
9758
9759         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
9760         (init_decl_processing): Don't create string_type_node,
9761         const_string_type_node, wint_type_node, intmax_type_node,
9762         uintmax_type_node, default_function_type, ptrdiff_type_node and
9763         unsigned_ptrdiff_type_node.  Adjust position of call to
9764         c_common_nodes_and_builtins.
9765         (identifier_global_value): New function.
9766
9767 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
9768
9769         * call.c (standard_conversion): Reject pointer to member
9770         conversions from ambiguous, inaccessible or virtual bases.
9771         * typeck.c (build_static_cast): Don't check pointers to members
9772         specially.
9773
9774 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
9775
9776         * method.c (do_build_copy_constructor): Preserve cv
9777         qualifications when accessing source object members.
9778         (do_build_assign_ref): Likewise. Remove separate diagnostics for
9779         unnamed fields.
9780
9781 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
9782
9783         * method.c (do_build_assign_ref): Construct appropriately
9784         CV-qualified base reference. Don't allow const casts in base
9785         conversion.
9786
9787 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
9788
9789         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
9790         incomplete return type.
9791
9792 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9793
9794         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
9795         * semantics.c (finish_base_specifier): Accept a _TYPE not a
9796         _DECL.
9797
9798 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9799
9800         * spew.c (yyerror): Cope if yylval.ttype is NULL.
9801
9802 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9803
9804         * decl.c (grokdeclarator): Diagnose undefined template contexts.
9805
9806 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9807
9808         * decl.c (grokdeclarator): Do type access control on friend
9809         class.
9810
9811 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
9812
9813         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
9814         bison parser ickiness.
9815         * pt.c (tsubst_friend_function): Enter namespace scope when
9816         tsubsting the function name.
9817         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
9818
9819 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
9820
9821         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
9822         * cvt.c (cp_convert_to_pointer): Add force parameter.
9823         Allow conversions via virtual base if forced.
9824         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
9825         (ocp_convert): Likewise.
9826         * search.c (binfo_from_vbase): Return the virtual base's binfo.
9827         * typeck.c (get_delta_difference): Adjust handling of virtual
9828         bases.
9829
9830 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
9831
9832         * tree.c (struct list_hash): Remove.
9833         (list_hash_table): Make it be an htab.
9834         (struct list_proxy): New type.
9835         (list_hash_eq): New function.
9836         (list_hash_pieces): Renamed from ...
9837         (list_hash): ... this.
9838         (list_hash_lookup): Remove.
9839         (list_hash_add): Remove.
9840         (hash_tree_cons): Use the generic hashtable.
9841         (mark_list_hash): Remove.
9842         (init_tree): Create the hashtable.
9843
9844 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
9845
9846         * method.c (build_mangled_C9x_name): Rename to
9847         build_mangled_C99_name.  Change C9X references in comments to
9848         refer to C99.
9849
9850 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
9851
9852         * parse.y (unary_expr): Move VA_ARG from here ...
9853         (primary): ... to here.
9854
9855 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
9856
9857         * semantics.c (finish_id_expr): If type is error_mark, return
9858         error_mark.
9859
9860 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
9861
9862         * pt.c (lookup_template_class): Simplify loop exit constructs.
9863         Cope when there is no partial instantiation of a template
9864         template member.
9865
9866 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
9867
9868         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
9869
9870 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
9871
9872         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
9873         prefix.
9874
9875         * pt.c (do_decl_instantiate): Explicitly clone constructors and
9876         destructors that haven't already been cloned.
9877
9878 2000-11-20  Richard Henderson  <rth@redhat.com>
9879
9880         * parse.y (yyparse_1): Rename the parser entry point.
9881
9882 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
9883
9884         * mangle.c (write_name): Use <unscoped-name> for names directly in
9885         function scope.
9886         (write_unscoped_name): Accept names directly in function scope.
9887
9888 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
9889
9890         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
9891         * parse.y (extdef): Add EXPORT reduction.
9892         * spew.c (yylex): Don't skip export here.
9893
9894 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
9895
9896         * decl.c (init_decl_processing): Correct name of pure virtual
9897         function under the new ABI.
9898         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
9899         (throw_bad_typeid): Likewise for bad typeid function.
9900
9901 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
9902
9903         * decl.c (grokparms): Don't even function types of `void' type,
9904         either.
9905         * mangle.c (write_type): Don't crash when confronted with the
9906         error_mark_node.
9907
9908         * decl.c (grokparms): Don't create parameters of `void' type.
9909
9910 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
9911
9912         * lex.c (mark_impl_file_chain): Delete.
9913         (init_parse): Remove call to ggc_add_string_root.  No need to
9914         ggc_strdup a string constant.  Do not add impl_file_chain to GC
9915         roots.
9916         (handle_pragma_implementation): No need to ggc_strdup main_filename.
9917
9918 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9919
9920         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
9921
9922 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9923
9924         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
9925         * decl.c (grokdeclarator): Don't reject void parms here.
9926         (require_complete_types_for_parms): Simplify, use
9927         complete_type_or_else.
9928         (grokparms): Remove bitrot. Remove funcdef parm.
9929         Deal with ellipsis parm lists here.
9930         * semantics.c (finish_parmlist): Don't append void_list_node
9931         here. Set PARMLIST_ELLIPSIS_P.
9932
9933 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9934
9935         * typeck2.c (incomplete_type_error): Reorganize to avoid
9936         excessive diagnostics.
9937
9938 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
9939
9940         * lex.c (struct impl_files, internal_filename): Constify a char *.
9941
9942 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
9943
9944         * mangle.c (write_special_name_constructor): Don't generate
9945         assembler junk when confronted with an old-style constructor.
9946         (write_special_name_destructor): Likewise.
9947         (mangle_decl_string): Do it here instead.
9948
9949 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
9950
9951         * call.c (op_error): Make error messages clearer.
9952
9953 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
9954
9955         * decl.c (wrapup_globals_for_namespace): Don't mark things
9956         TREE_ASM_WRITTEN when they're not.
9957
9958 2000-11-15  Jason Merrill  <jason@redhat.com>
9959
9960         * typeck2.c (friendly_abort): Uncount the error before handing
9961         off to fancy_abort.
9962
9963 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
9964
9965         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
9966
9967 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
9968
9969         * class.c (build_vtbl_initializer): Fix typo in comment.
9970         * typeck.c (expr_sizeof): Don't crash on errors.
9971
9972 2000-11-14  Jim Wilson  <wilson@redhat.com>
9973
9974         * lang-specs.h: Add %2 after %(cc1_options).
9975
9976 2000-11-14  Richard Henderson  <rth@redhat.com>
9977
9978         * typeck.c (c_sizeof): Be strict about casting result value
9979         back to c_size_type_node.
9980         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
9981
9982 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9983
9984         * typeck.c (build_unary_op): Use boolean_increment from
9985         c-common.c, moving the relevant code there.
9986
9987 2000-11-11  Jason Merrill  <jason@redhat.com>
9988
9989         * typeck.c (mark_addressable): Don't call put_var_into_stack.
9990
9991         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
9992         in inlines.
9993
9994 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9995
9996         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
9997         * lex.c (copy_lang_decl): Likewise.
9998
9999 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
10000
10001         * dump.c (cp_dump_tree): Don't dump function bodies here.
10002
10003         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
10004         (dump.o): Update dependency list.
10005         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
10006         (flag_dump_translation_unit): Likewise.
10007         (CP_TYPE_QUALS): Adjust definition.
10008         (DECL_C_BIT_FIELD): Remove.
10009         (SET_DECL_C_BIT_FIELD): Likewise.
10010         (CLEAR_DECL_C_BIT_FIELD): Likewise.
10011         (add_maybe_template): Likewise.
10012         (strip_array_types): Likewise.
10013         (dump_node_to_file): Likewise.
10014         (cp_dump_tree): New function.
10015         * decl.c (init_decl_processing): Set lang_dump_tree.
10016         * decl2.c (flag_dump_translation_unit): Remove.
10017         * dump.c: Move most of it to ../c-dump.c.
10018         (cp_dump_tree): New function.
10019         * pt.c (add_maybe_template): Remove.
10020         * typeck.c (strip_array_types): Likewise.
10021
10022 2000-11-07  Eric Christopher  <echristo@redhat.com>
10023
10024         * decl.c (init_decl_processing): Change definition of
10025         __wchar_t to wchar_t.  Remove artificial declaration of
10026         wchar_t.
10027         * lex.c: Change instances of __wchar_t to wchar_t.
10028
10029 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
10030
10031         * lex.c (do_identifier): Don't lookup_name for operators.
10032         * parse.y (operator): Save looking_for_typename.
10033         (unoperator): Restore it.
10034         * spew.c (frob_opname): Use nth_token for lookahead.
10035
10036 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
10037
10038         * decl.c (grok_op_properties): Always use coerce_new_type and
10039         coerce_delete_type.
10040         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
10041         exception specification. Tidy up.
10042         (coerce_delete_type): Preserve exception specification. Tidy up.
10043
10044 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10045
10046         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
10047         (push_binding_level), error.c (cp_tree_printer), pt.c
10048         (process_partial_specialization, tsubst_template_arg_vector),
10049         search.c (lookup_member): Use memset () instead of bzero ().
10050
10051 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
10052
10053         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
10054
10055 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
10056
10057         * Make-lang.in (c++.distdir): Remove.
10058
10059 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
10060
10061         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
10062         declarations from different namespaces to be combined.
10063
10064 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
10065
10066         * decl.c: Include tm_p.h.
10067
10068 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
10069
10070         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
10071
10072 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10073
10074         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
10075         (build_overload_value), repo.c (open_repo_file), xref.c
10076         (open_xref_file): Use strchr () and strrchr () instead of index ()
10077         and rindex ().
10078
10079 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
10080
10081         * call.c (build_over_call): Call fold on the CALL_EXPR.
10082
10083 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
10084
10085         * error.c (dump_template_decl): Separate template hearders with
10086         space not comma.
10087
10088 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
10089
10090         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
10091         TS_* flags with corresponding TFF_*.  Adjust prototypes of
10092         functions (which used to take a tree_string_flags) to take an int.
10093
10094         * cp-tree.h (enum tree_string_flags): Remove
10095         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
10096         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
10097         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
10098         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
10099         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
10100         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
10101         (type_as_string, decl_as_string, expr_as_string,
10102         context_as_string): Adjust prototype.
10103
10104         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
10105         instead of TS_PLAIN.
10106
10107         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
10108         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
10109         plain `0'.
10110
10111 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
10112
10113         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
10114         (linkage_kind): New enumeration.
10115         (decl_linkage): New function.
10116         * decl2.c (comdat_linkage): Extend comment.
10117         * error.c (dump_function_decl): Print the arguments used to
10118         instantiate a template, even when not printing the type of the
10119         function.
10120         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
10121         not TREE_PUBLIC, to test for external linkage.
10122         * tree.c (decl_linkage): New function.
10123
10124 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
10125
10126         * pt.c (instantiate_decl): Always instantiate static data members
10127         initialized in-class.
10128
10129 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
10130
10131         * Make-lang.in: Move all build rules here from Makefile.in,
10132         adapt to new context.  Wrap all rules that change the current
10133         directory in parentheses.  Expunge all references to $(P).
10134         When one command depends on another and they're run all at
10135         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
10136         all object-file generation rules.  Delete obsolete variables.
10137
10138         * Makefile.in: Delete.
10139         * config-lang.in: Delete outputs= line.
10140
10141 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10142
10143         * error.c (dump_function_decl): Print no space between
10144         `ptr-operator' the `type-specifier' of the return type.
10145         (dump_type_prefix): Make sure we put space at the appropriate
10146         place.
10147
10148 2000-10-23  Jason Merrill  <jason@redhat.com>
10149
10150         * call.c (equal_functions): Also call decls_match for extern "C" fns.
10151
10152 2000-10-22  Jason Merrill  <jason@redhat.com>
10153
10154         * call.c (build_conditional_expr): Use ocp_convert to force
10155         rvalue conversion.
10156
10157 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
10158
10159         * call.c (standard_conversion): Use RVALUE_CONVs for all
10160         expressions that satisfy lvalue_p, not just those that satisfy
10161         real_lvalue_p.
10162
10163         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
10164
10165         * typeck.c (c_sizeof): Return an expression of `size_t' type,
10166         not one with TYPE_IS_SIZETYPE set.
10167         (dubious_conversion_warnings): Remove special-case code.
10168
10169 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
10170
10171         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
10172         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
10173         (dump_type_prefix): Print vector-of-int as 'int vector'.
10174         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
10175         * tree.c (walk_tree): Handle VECTOR_TYPE.
10176
10177         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
10178
10179 2000-10-21  Jason Merrill  <jason@redhat.com>
10180
10181         * parse.y (operator): Set got_object from got_scope.
10182         Set looking_for_typename.
10183         * decl.c (lookup_name_real): Clear val after setting from_obj.
10184         Reorganize diagnostic.
10185
10186 2000-10-20  Jason Merrill  <jason@redhat.com>
10187
10188         * tree.c (walk_tree): Don't walk into default args.
10189
10190         * error.c (dump_expr): Use host_integerp.
10191
10192 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
10193
10194         * typeck2.c (abstract_virtuals_error): Use "because" instead of
10195         "since" in error message.
10196
10197 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10198
10199         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
10200
10201 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
10202
10203         * decl.c (revert_static_member_fn): Fixed typo.
10204
10205 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
10206
10207         * class.c (subobject_offset_fn): New type.
10208         (dfs_record_base_offsets): Remove.
10209         (record_base_offsets): Likewise.
10210         (dfs_search_base_offsets): Likewise.
10211         (record_subobject_offset): New function.
10212         (check_subobject_offset): Likewise.
10213         (walk_subobject_offsets): Likewise.
10214         (record_subobject_offsets): Likewise.
10215         (layout_conflict_p): Reimplement.
10216         (layout_nonempty_base_or_field): Correct handling of type
10217         conflicts during layout.
10218         (layout_empty_base): Likewise.
10219         (build_base_field): Adjust to handle new representation of empty
10220         base offset table.
10221         (build_base_fields): Likewise.
10222         (layout_virtual_bases): Likewise.
10223         (splay_tree_compare_integer_csts): New function.
10224         (layout_class_type): Use a splay_tree, rather than a varray, to
10225         represent the offsets of empty bases.
10226
10227         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
10228         * decl.c (select_decl): Don't return declarations that are
10229         DECL_ANTICIPATED.
10230
10231 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
10232
10233         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
10234         (fake_std_node): New macro.
10235         * decl.c (in_std): Rename to ...
10236         (in_fake_std): ... this.
10237         (flag_no_builtin): Remove.
10238         (flag_no_nonansi_builtin): Likewise.
10239         (walk_namespaces_r): Use fake_std_node.
10240         (push_namespace): Use std_identifier.
10241         (pop_namespace): Use in_fake_std.
10242         (lookup_name_real): Use fake_std_node.
10243         (init_decl_processing): When -fhonor-std, create the `std'
10244         namespace.  Don't create a dummy fake_std_node in that case.
10245         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
10246         (builtin_function): Put builtins whose names don't begin
10247         with `_' in the std namespace.
10248         * decl2.c (flag_no_builtin): Remove.
10249         (flag_no_nonansi_builtin): Likewise.
10250         (set_decl_namespace): Use fake_std_node.
10251         (validate_nonmember_using_decl): Likewise.
10252         (do_using_directive): Likewise.
10253         (handle_class_head): Likewise.
10254         * dump.c (dequeue_and_dump): Likewise.
10255         * except.c (init_exception_processing): Use std_identifier.
10256         * init.c (build_member_call): Use fake_std_node.
10257         * rtti.c (init_rtti_processing): Use std_identifier.
10258
10259 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
10260
10261         * cp-tree.h (back_end_hook): Remove declaration.
10262         * decl2.c (back_end_hook): Remove definition.
10263
10264         * dump.c (dequeue_and_dump): Dump TREE_USED.
10265
10266 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
10267
10268         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
10269
10270 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
10271
10272         * decl.c (WINT_TYPE): Define.
10273         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
10274         c_size_type_node, signed_size_type_node and wint_type_node.
10275
10276 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
10277
10278         * decl2.c (warn_missing_format_attribute): New variable.
10279         (lang_decode_option): Decode -Wmissing-format-attribute.
10280
10281 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
10282
10283         * typeck.c (qualify_type): Remove.
10284         (composite_pointer_type): Fix handling of conversions to `cv void*'.
10285
10286 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10287
10288         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
10289
10290 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10291
10292         * Makefile.in (parse.c, parse.h): Create atomically.
10293
10294 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
10295
10296         * class.c (current_obstack): Remove.
10297         * decl.c (ggc_p): Remove.
10298         (start_decl): Don't use decl_tree_cons.
10299         (grokdeclarator): Don't use build_decl_list.
10300         (start_function): Don't use decl_tree_cons.
10301         (finish_function): Don't mess with obstacks.
10302         * decl2.c (grok_x_components): Don't use build_decl_list.
10303         * lex.c (make_call_declarator): Don't call decl_tree_cons.
10304         (implicitly_declare_fn): Don't call build_decl_list.
10305         * parse.y (frob_specs): Don't call build_decl_list or
10306         decl_tree_cons.
10307         (expr_or_declarator_intern): Don't call decl_tree_cons.
10308         (primary): Don't call build_decl_list.
10309         (fcast_or_absdcl): Likewise.
10310         (typed_declspecs): Don't call decl_tree_cons.
10311         (reserved_declspecs): Don't call build_decl_list.
10312         (declmods): Likewise.
10313         (reserved_typespecquals): Likewise.
10314         (aggr): Likewise.
10315         (new_type_id): Likewise.
10316         (cv_qualifiers): Likewise.
10317         (after_type_declarator_intern): Likewise.
10318         (notype_declarator_intern): Likewise.
10319         (absdcl_intern): Likewise.
10320         (named_parm): Likewise.
10321         * pt.c (most_specialized_class): Likewise.
10322         * repo.c (temporary_obstack): Make it a structure, not a pointer.
10323         (init_repo): Initialize it.
10324         * search.c (current_obstack): Remove.
10325         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
10326
10327 2000-10-09  Richard Henderson  <rth@cygnus.com>
10328
10329         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
10330         (c++ language support bits for libgcc): Remove.
10331         (c++.clean): Remove cplib2.txt cleanup.
10332         * config-lang.in (headers, lib2funcs): Remove.
10333
10334         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
10335         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
10336         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
10337         * inc/new.h, inc/typeinfo: Remove files.
10338
10339 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10340
10341         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
10342         defined.
10343         (init_decl_processing): Initialize intmax_type_node and
10344         uintmax_type_node.
10345
10346 2000-10-06  Richard Henderson  <rth@cygnus.com>
10347
10348         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
10349         (original_result_rtx): Remove.
10350         * decl.c (save_function_data): Don't clear x_result_rtx.
10351         (mark_lang_function): Don't mark it either.
10352         * expr.c (fixup_result_decl): Remove.
10353         * semantics.c (genrtl_named_return_value): Frob the return decl
10354         before calling emit_local_var.
10355         (genrtl_finish_function): Don't call fixup_result_decl.
10356         Always emit the jump to return_label.
10357
10358 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
10359
10360         * pt.c (lookup_template_class): Set current access for enum.
10361         (tsubst_enum): Set file & line for enum decl.
10362
10363         * spew.c (yylex): Remove unused variable.
10364
10365 2000-10-05  Richard Henderson  <rth@cygnus.com>
10366
10367         * semantics.c (genrtl_finish_function): Don't init or check
10368         can_reach_end; remove noreturn and return value checks.
10369
10370 2000-10-05  Tom Tromey  <tromey@cygnus.com>
10371
10372         * init.c (build_java_class_ref): Use `build_static_name' with a
10373         suffix, not a prefix, to build the class object's name.
10374
10375 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10376
10377         * cp-tree.h (access_kind): Fix comment typo.
10378         * decl2.c (grokfield): Fix diagnostic typo.
10379         * semantics.c (finish_template_type): Fix comment typo.
10380         (finish_qualified_object_call_expr): Likewise.
10381
10382 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10383
10384         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
10385         tsubsting fails.
10386
10387 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10388
10389         * spew.c (frob_id): New static function.
10390         (frob_opname): Use it.
10391         (yylex): Use it.
10392
10393 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
10394
10395         * decl.c (lang_mark_false_label_stack): Remove.
10396         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
10397
10398 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
10399
10400         * gxxint.texi: Use @email for formatting email addresses.
10401
10402 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
10403
10404         * error.c: Remove direct obstack manipulation.  Replace with
10405         output_buffer-based formatting.  Adjust calls to removed macros.
10406         (obstack_chunk_alloc, obstack_chunk_free): Remove.
10407         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
10408         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
10409
10410 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
10411
10412         * ir.texi: Move to ../c-tree.texi.
10413
10414 2000-09-20  Jason Merrill  <jason@redhat.com>
10415
10416         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
10417
10418 2000-09-21  Andreas Jaeger  <aj@suse.de>
10419
10420         * errfn.c: Move declaration of cp_printer and cp_printers to ...
10421         * cp-tree.h: ... here.
10422
10423         * error.c: Remove declaration of cp_printer.
10424
10425 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
10426
10427         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
10428
10429 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
10430
10431         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
10432         users.
10433
10434 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
10435
10436         * decl.c (start_function): Robustify.
10437
10438 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10439
10440         * cp-tree.h (check_function_format): Accept a `status' parameter.
10441
10442         * call.c, typeck.c: Updates calls to `check_function_format'.
10443
10444 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
10445
10446         * decl2.c (handle_class_head): Always push some scope even
10447         in the error case.
10448
10449 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
10450
10451         * cp-tree.h (struct cp_language_function): Remove
10452         x_scope_stmt_stack and name_declared.
10453         (current_scope_stmt_stack): Remove.
10454         (function_name_declared_p): New macro.
10455         (struct lang_decl_flags): Use c_lang_decl as a base class.
10456         (context): Remove.
10457         (struct lang_decl): Replace saved_tree with context.
10458         (DECL_FRIEND_CONTEXT): Adjust accordingly.
10459         (SET_DECL_FRIEND_CONTEXT): Likewise.
10460         (DECL_VIRTUAL_CONTEXT): Likewise.
10461         (DECL_SAVED_TREE): Remove.
10462         (C_DECLARED_LABEL_FLAG): Likewise.
10463         (cplus_expand_expr_stmt): Don't declare.
10464         (add_decl_stmt): Likewise.
10465         (add_scope_stmt): Likewise.
10466         * decl.c (mark_stmt_tree): Remove.
10467         (case_compare): Likewise.
10468         (finish_case_label): Use c_add_case_label.
10469         (init_decl_processing): Set more language-specific hooks.
10470         (build_enumerator): Fix typo in comment.
10471         (cplus_expand_expr_stmt): Remove.
10472         (mark_lang_function): Use mark_c_language_function.
10473         (lang_mark_tree): Use c_mark_lang_decl.
10474         * decl2.c: Change order of inclusion.
10475         * except.c: Likewise.
10476         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
10477         back on c_expand_expr.
10478         * friend.c: Include expr.h.
10479         * init.c: Change order of inclusion.
10480         * Makefile.in: Update dependencies.
10481         * lex.h (free_lang_decl_chain): Remove.
10482         * optimize.c (maybe_clone_body): Use function_name_declared_p.
10483         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
10484         it doesn't exist.
10485         (instantiate_decl): Use function_name_declared_p.
10486         * semantics.c (lang_expand_expr_stmt): Remove.
10487         (set_current_function_name_declared): Likewise.
10488         (current_function_name_declared): Likewise.
10489         (begin_compound_stmt): Use function_name_declared_p.
10490         (add_decl_stmt): Remove.
10491         (setup_vtbl_ptr): Use function_name_declared_p.
10492         (add_scope_stmt): Remove.
10493         (current_scope_stmt_stack): New function.
10494         (cp_expand_stmt): Don't handle SCOPE_STMTs.
10495         (expand_body): Use function_name_declared_p.
10496         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
10497         * typeck.c: Change order of includes.
10498         (convert_sequence): Remove.
10499
10500 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
10501
10502         * lex.c (reswords): Add _Complex.
10503
10504 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10505
10506         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
10507
10508 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
10509
10510         * init.c (begin_init_stmts): Don't use // comments.
10511
10512 2000-09-12  Jason Merrill  <jason@redhat.com>
10513
10514         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
10515         all non-extern arrays.
10516
10517         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
10518         typenames, too.  Downgrade complaint to pedwarn.
10519         (xref_tag): Warn about surprising behavior of 'friend struct T'.
10520         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
10521         'class This::Inherited'.
10522
10523 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
10524
10525         * decl.c (finish_case_label): Given the LABEL_DECL a
10526         DECL_CONTEXT.
10527
10528 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
10529
10530         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
10531         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
10532         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
10533         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
10534         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
10535         New macros.
10536         (sorry_for_unsupported_tree, print_scope_operator,
10537         print_left_paren, print_right_paren, print_left_bracket,
10538         print_right_bracket, print_whitespace): Likewise.
10539         (aggr_variety): Rename to class_key_or_enum.
10540         (print_type): Rename to print_type_id.
10541         (print_type_specifier_seq, print_simple_type_specifier,
10542         print_elaborated_type_specifier,
10543         print_rest_of_abstract_declarator,
10544         print_parameter_declaration_clause, print_exception_specification,
10545         print_nested_name_specifier, print_template_id,
10546         typedef_original_name,  print_template_argument_list_start,
10547         print_template_argument_list_end): New functions.
10548
10549 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
10550
10551         * ir.texi: Add more documentation.
10552
10553 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
10554
10555         * cp-tree.h (struct saved_scope): Remove x_function_parms.
10556         (current_function_parms): Don't define.
10557         (struct cp_language_function): Remove parms_stored.
10558         (current_function_just_assigned_this): Don't define.
10559         (current_function_parms_stored): Likewise.
10560         (static_ctors): Declare.
10561         (static_dtors): Likewise.
10562         (SF_EXPAND): Don't define.
10563         (expand_start_early_try_stmts): Remove declaration.
10564         (store_parm_decls): Likewise.
10565         * decl.c (static_ctors): Don't declare.
10566         (static_dtors): Likewise.
10567         (struct binding_level): Remove this_block.
10568         (poplevel): Remove dead code.
10569         (set_block): Likewise.
10570         (mark_binding_level): Don't mark this_block.
10571         (mark_saved_scope): Don't mark x_function_parms.
10572         (init_decl_processing): Don't add current_function_parms as a GC
10573         root.
10574         (check_function_type): Change prototype.
10575         (start_function): Remove RTL-generation code.
10576         (expand_start_early_try_stmts): Remove.
10577         (store_parm_decls): Give it internal linkage.  Remove
10578         RTL-generation code.
10579         (finish_function): Remove RTL-generation code.
10580         * decl2.c (static_ctors): Fix formatting.
10581         (static_dtors): Likewise.
10582         * method.c (use_thunk): Don't call store_parm_decls.
10583         (synthesize_method): Likewise.
10584         * optimize.c (maybe_clone_body): Likewise.
10585         * parse.y (fn.def2): Likewise.
10586         (.set_base_init): Likewise.
10587         (nodecls): Likewise.
10588         * pt.c (instantiate_decl): Likewise.
10589         * rtti.c (synthesize_tinfo_fn): Likewise.
10590         * semantics.c (genrtl_try_block): Simplify.
10591         (expand_body): Use genrtl_start_function and
10592         genrtl_finish_function.
10593         (genrtl_start_function): New function.
10594         (genrtl_finish_function): Likewise.
10595
10596 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
10597
10598         * error.c (cp_tree_printer, case 'P'): Append break.
10599
10600 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
10601
10602         * cp-tree.h (frob_opname): Declare.
10603         * parse.y (saved_scopes): New static variable.
10604         (cp_parse_init): Adjust.
10605         (do_id): If lastiddecl is NULL, do do_identifier.
10606         (operator): Save scope information.
10607         (unoperator): New reduction. Restore scope information.
10608         (operator_name): Append unoperator. Call frob_opname.
10609         * spew.c (frob_opname): Define.
10610
10611 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
10612
10613         * decl.c, rtti.c: Include defaults.h if not already included.
10614         Don't define the *_TYPE_SIZE macros.
10615
10616 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
10617
10618         * cp-tree.h (push_switch): Change prototype.
10619         (check_cp_case_value): Remove declaration.
10620         (decl_constant_value): Likewise.
10621         * decl.c (struct cp_switch): Add switch_stmt and cases.
10622         (case_compare): New function.
10623         (push_switch): Set switch_stmt.  Initialize cases.
10624         (pop_switch): Clean up cases.
10625         (define_case_label): Rename to ...
10626         (finish_case_label): ... this.  Do semantic analysis for case
10627         labels here.
10628         (start_function): Correct comment.
10629         * decl2.c (check_cp_case_value): Remove.
10630         * expr.c (do_case): Remove.
10631         * pt.c (tsubst_expr): Adjust call to finish_case_label.
10632         * semantics.c (genrtl_do_poplevel): Remove declaration.
10633         (RECHAIN_STMTS): Remove.
10634         (finish_break_stmt): Use build_break_stmt.
10635         (finish_continue_stmt): Use build_continue_stmt.
10636         (finish_switch_cond): Adjust condition here, rater than in
10637         c_expand_start_case.
10638         (finish_case_label): Remove.
10639         * typeck.c (c_expand_return): Remove.
10640         (c_expand_start_case): Likewise.
10641
10642 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
10643
10644         * ir.texi: Document type nodes.
10645
10646 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
10647
10648         * cp-tree.h (init_cp_semantics): Declare.
10649         (genrtl_try_block): Don't declare.
10650         (genrtl_handler): Likewise.
10651         (genrtl_catch_block): Likewise.
10652         (genrtl_ctor_stmt): Likewise.
10653         (genrtl_subobject): Likewise.
10654         (genrtl_do_poplevel): Likewise.
10655         (genrtl_named_return_value): Likewise.
10656         * lex.c (init_parse): Call init_cp_semantics.
10657         * semantics.c (genrtl_try_block): Give it internal linkage.
10658         (genrtl_handler): Likewise.
10659         (genrtl_catch_block): Likewise.
10660         (genrtl_ctor_stmt): Likewise.
10661         (genrtl_subobject): Likewise.
10662         (genrtl_do_poplevel): Likewise.
10663         (genrtl_named_return_value): Likewise.
10664         (lang_expand_stmt): Rename to ...
10665         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
10666         (init_cp_semantics): Define.
10667
10668         * decl.c (initialize_local_var): Remove RTL-generating code.
10669         * semantics.c (genrtl_try_block): Fix formatting.
10670
10671         Move statement-tree facilities from C++ to C front-end.
10672         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
10673         (void_zero_node): Remove.
10674         (stmt_tree): Likewise.
10675         (scope_chain): Adjust.
10676         (language_function): Rename to cp_language_function.
10677         (cp_function_chain): Adjust.
10678         (current_stmt_tree): Remove.
10679         (last_tree): Likewise.
10680         (last_expr_type): Likewise.
10681         (struct lang_decl): Adjust.
10682         (STMT_IS_FULL_EXPR_P): Remove.
10683         (add_tree): Remove.
10684         (begin_stmt_tree): Likewise.
10685         (finish_stmt_tree): Likewise.
10686         (walk_tree_fn): Likewise.
10687         (walk_stmt_tree): Likewise.
10688         * class.c (finish_struct): Replace use of add_tree with add_stmt.
10689         * decl.c (mark_stmt_tree): Adjust type.
10690         (init_decl_processing): Don't build void_zero_node.
10691         (initialize_local_var): Adjust usage of current_stmt_tree.
10692         (finish_enum): Use add_stmt, not add_tree.
10693         (save_function_data): Adjust use of language_function.
10694         (finish_constructor_body): Use add_stmt, not add_tree.
10695         (finish_destructor_body): Likewise.
10696         (push_cp_function_context): Adjust use of language_function.
10697         (pop_cp_function_context): Likewise.
10698         (mark_lang_function): Likewise.
10699         (mark_cp_function_context): Likewise.
10700         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
10701         (build_vec_init): Likewise.
10702         * semantics.c (SET_LAST_STMT): Remove.
10703         (RECHAIN_STMTS): Don't use it.
10704         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
10705         (current_stmt_tree): Define.
10706         (add_tree): Remove.
10707         (finish_goto_stmt): Use add_stmt, not add_tree.
10708         (finish_expr_stmt): Likewise.
10709         (begin_if_stmt): Likewise.
10710         (finish_then_clause): Likewise.
10711         (begin_while_stmt): Likewise.
10712         (begin_do_stmt): Likewise.
10713         (finish_return_stmt): Likewise.
10714         (begin_for_stmt): Likewise.
10715         (finish_break_stmt): Likewise.
10716         (finish_continue_stmt): Likewise.
10717         (begin_switch_stmt): Likewise.
10718         (finish_case_label): Likewise.
10719         (begin_try_block): Likewise.
10720         (begin_function_try_block): Likewise.
10721         (begin_handler): Likewise.
10722         (begin_catch_block): Likewise.
10723         (begin_compound_stmt): Likewise.
10724         (begin_asm_stmt): Likewise.
10725         (finish_asm_stmt): Likewise.
10726         (finish_label_stmt): Likewise.
10727         (add_decl_stmt): Likewise.
10728         (finish_subobject): Likewise.
10729         (finish_decl_cleanup): Likewise.
10730         (finish_named_return_value): Likewise.
10731         (setup_vtbl_ptr): Likewise.
10732         (add_scope_stmt): Likewise.
10733         (finish_stmt_expr): Likewise.
10734         (prune_unused_decls): Remove.
10735         (begin_stmt_tree): Likewise.
10736         (finish_stmt_tree): Likewise.
10737         (prep_stmt): Adjust use of current_stmt_tree.
10738         (lang_expand_stmt): Likewise.
10739         * tree.c (statement_code_p): Remove.
10740         (cp_statement_code_p): New function.
10741         (walk_stmt_tree): Remove.
10742         (init_tree): Set lang_statement_code_p.
10743
10744 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
10745
10746         Integrated preprocessor.
10747
10748         * Make-lang.in, Makefile.in: Remove all references to input.c,
10749         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
10750         * gxx.gperf, hash.h, input.c: Delete.
10751         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
10752         initialized properly.
10753
10754         * class.c (fixup_pending_inline): Take a tree, not a
10755         struct pending_inline *.  All callers changed.
10756         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
10757         RID_PROTECTED entries in ridpointers[] array here.
10758         * decl.c (duplicate_decls): Do not refer to struct
10759         pending_inline.
10760         (record_builtin_type, init_decl_processing): Use RID_MAX not
10761         CP_RID_MAX.
10762         (grokdeclarator): Use C_IS_RESERVED_WORD.
10763         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
10764         cpplib.
10765         (grok_x_components): Do not inspect pending_inlines chain.
10766
10767         * cp-tree.h (struct lang_identifier): Add rid_code entry.
10768         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
10769         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
10770         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
10771         TIME_IDENTIFIER_FILEINFO): Kill.
10772         Update prototypes.
10773         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
10774         single 32-bit word.
10775         * parse.y: Call do_pending_inlines unconditionally.
10776         reinit_parse_for_method is now snarf_method.  fn.defpen is no
10777         longer necessary.  Remove unnecessary <itype> annotation on
10778         SCOPE.  Do not refer to end_of_file or struct pending_inline.
10779         * semantics.c (begin_inline_definitions): Call
10780         do_pending_inlines unconditionally.
10781
10782         * lex.c: Remove all code now shared with C front end.
10783         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
10784         into the get_identifier table.  Rewrite pragma handling to
10785         work with the registry.  Move code to save tokens for later
10786         processing to spew.c.
10787
10788         * spew.c: Rewrite everything in terms of token streams instead
10789         of text.  Move routines here from lex.c / input.c as
10790         appropriate.  GC-mark trees hanging off the pending inlines
10791         chain.
10792
10793 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
10794
10795         * NEWS: Mention that the named return value extension has been
10796         deprecated.
10797         * cp-tree.h (original_result_rtx): Define.
10798         (TREE_REFERENCE_EXPR): Remove.
10799         (DECL_VPARENT): Likewise.
10800         (pushdecl_nonclass_level): Likewise.
10801         (store_return_init): Likewise.
10802         (reinit_lang_specific): Likewise.
10803         (genrtl_named_return_value): Change prototype.
10804         * decl.c (original_result_rtx): Remove.
10805         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
10806         Do not generate RTL for local variables here.
10807         (store_return_init): Remove.
10808         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
10809         store_return_init.
10810         (finish_named_return_value): Adjust accordingly.  Warn that this
10811         extension is deprecated.
10812         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
10813
10814 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10815
10816         * pt.c (type_unification_real): Replace switch with if.
10817         (unify): Tsubst non-type parms before comparing.
10818
10819 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10820
10821         * error.c (dump_typename): New function, broken out of ...
10822         (dump_type): ... here. Use it.
10823         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
10824
10825 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10826
10827         * init.c (build_offset_ref): Deal with namespace scoped
10828         TEMPLATE_ID_EXPRs.
10829
10830 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10831
10832         * class.c (resolve_address_of_overloaded_function): Add
10833         explanation message.
10834         * decl.c (define_case_label): Reformat explanation.
10835         * decl2.c (finish_static_data_member_decl): Likewise.
10836         (grokfield): Likewise.
10837         * friend.c (do_friend): Likewise.
10838
10839 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
10840
10841         * tree.c (walk_tree): Expose tail recursion.
10842         (walk_stmt_tree): New function.
10843         * cp-tree.h: Prototype walk_stmt_tree.
10844         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
10845         the BLOCKs directly.  If a BLOCK has no variables after
10846         pruning, discard it.
10847         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
10848         restore the line number.
10849
10850 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
10851
10852         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
10853         (pt.o): Remove dependency on HTAB_H.
10854         * cp-tree.h: Include hashtab.h.
10855         (walk_tree): Change prototype.
10856         (walk_tree_without_duplicates): New function.
10857         * decl.c (check_default_argument): Use it.
10858         * optimize.c (remap_decl): Adjust calls to walk_tree.
10859         (copy_body): Likewise.
10860         (expand_calls_inline): Likewise.
10861         (calls_setjmp_p): Use walk_tree_without_duplicates.
10862         * pt.c: Don't include hashtab.h.
10863         (for_each_template_parm): Use walk_tree_without_duplicates.
10864         * semantics.c (finish-stmt_tree): Likewise.
10865         (expand_body): Likewise.
10866         * tree.c (walk_tree): Add additional parameter.
10867         (walk_tree_without_duplicates): New function.
10868         (count_trees): Use it.
10869         (verify_stmt_tree): Adjust call to walk_tree.
10870         (find_tree): Use walk_tree_without_duplicates.
10871         (no_linkage_check): Likewise.
10872         (break_out_target_exprs): Adjust call to walk_tree.
10873         (cp_unsave): Likewise.
10874
10875 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10876
10877         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
10878         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
10879         * cp-tree.h (TYPE_BINFO): Adjust comment.
10880         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
10881         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
10882         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
10883         (TYPE_TEMPLATE_INFO): Likewise.
10884         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
10885         * class.c (push_nested_class): Likewise.
10886         * decl.c (lookup_name_real): Likewise.
10887         (grokdeclarator): Likewise.
10888         (grok_op_properties): Likewise.
10889         (xref_tag): Likewise.
10890         (xref_basetypes): Likewise.
10891         * decl2.c (constructor_name_full): Likewise.
10892         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
10893         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
10894         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
10895         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10896         (dump_type_suffix): Likewise.
10897         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
10898         instead.
10899         (get_aggr_from_typedef): Likewise.
10900         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
10901         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10902         (write_template_parm): Likewise.
10903         (write_template_template_parm): Check tree code instead of
10904         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10905         * method.c (build_overload_nested_name): Add
10906         BOUND_TEMPLATE_TEMPLATE_PARM.
10907         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
10908         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10909         * pt.c (convert_template_argument): Check tree code instead of
10910         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10911         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
10912         (for_each_template_parm): Adjust comment.
10913         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
10914         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10915         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
10916         template_args_equal to compare template template parameter cases.
10917         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10918         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
10919         instead.
10920         * tree.c (copy_template_template_parm): Decide whether to create
10921         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
10922         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10923         (copy_tree_r): Likewise.
10924         * typeck.c (comptypes): Likewise.  Check tree code instead of
10925         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10926
10927 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
10928
10929         * decl.c (finish_function): Move the code for handling functions
10930         marked with the constructor and destructor attributes inside the
10931         expand_p block.
10932
10933 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10934
10935         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
10936
10937 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10938
10939         * pt.c (lookup_template_class): Remove abort.
10940         * tree.c (get_type_decl): Allow error_mark_node.
10941
10942 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10943
10944         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
10945         TEMPLATE_ID_EXPRs.
10946
10947 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
10948
10949         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
10950         new ABI mangling.
10951
10952 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
10953
10954         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
10955         union tag mismatch error reporting.
10956
10957 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
10958
10959         * call.c (build_scoped_method_call): Check it is not a namespace.
10960
10961 2000-08-30  Jason Merrill  <jason@redhat.com>
10962
10963         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
10964
10965         * tree.c (bot_manip): Check TREE_CONSTANT rather than
10966         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
10967         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
10968
10969         * decl.c (start_function): Always call make_function_rtl.
10970
10971 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
10972
10973         * semantics.c (prune_unused_decls): New function.
10974         (finish_stmt_tree): Call it via walk_tree.
10975
10976 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
10977
10978         * class.c (build_secondary_vtable): Constify a char *.
10979         * decl.c (init_decl_processing): Initialize function_id_node,
10980         pretty_function_id_node, and func_id_node.
10981         * input.c (struct input_source): Constify 'str'.
10982         (feed_input): Constify first argument.
10983         * mangle.c (write_identifier): Constify argument.
10984         * pt.c (mangle_class_name_for_template): Constify argument.
10985
10986 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
10987
10988         * typeck.c (mark_addressable): Remove code that pokes around in
10989         RTL.
10990
10991 2000-08-28  Jason Merrill  <jason@redhat.com>
10992
10993         * lex.c (file_name_nondirectory): Move to toplev.c.
10994
10995         * cp-tree.h (LOCAL_CLASS_P): New macro.
10996         * class.c (finish_struct_1): Use it.
10997
10998 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
10999
11000         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
11001         (write_encoding): Pass another argument to write_name.
11002         (write_name): Add ignore_local_scope parameter.  Fix handling of
11003         local names.
11004         (write_nested_name): Use write_unqualified_name.
11005         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
11006         (write_template_prefix): Use write_unqualified_name.
11007         (write_component): Remove.
11008         (write_local_name): Add parameter.  Use direct local entity to
11009         discriminator calculation.
11010         (write_class_enum_type): Pass another argument to write_name.
11011         (write_template_template_arg): Likewise.
11012         (make_guard_variable): Likewise.
11013
11014 2000-08-27  Jason Merrill  <jason@redhat.com>
11015
11016         * decl.c (pushdecl): Matching decls for local externs are found in
11017         the current level.  Propagate linkage information from previous
11018         declarations.
11019
11020 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11021
11022         * ir.texi (Expressions): Fix typo.
11023
11024 2000-08-25  Greg McGary  <greg@mcgary.org>
11025
11026         * tree.c (init_tree): Use ARRAY_SIZE.
11027
11028 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11029
11030         * error.c (cp_tree_printer): Rework.
11031
11032 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
11033
11034         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
11035         dyn-string.o.
11036         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
11037         (cp-demangle.o): Remove target.
11038         (dyn-string.o): Likewise.
11039
11040         * decl.c (grokfndecl): Require that `main' return an `int'.
11041         * mangle.c (write_encoding): Don't mangle return types for
11042         conversion functions.
11043
11044 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11045
11046         * error.c (tree_formatting_info): New data type.
11047         (tree_being_formatted): New macro.
11048         (tree_formatting_flags): Likewise.
11049         (put_whitespace): Likewise.
11050         (print_tree_identifier): Likewise.
11051         (print_identifier): Likewise.
11052         (cp_tree_printer, print_function_argument_list, print_declaration,
11053         print_expression, print_function_declaration,
11054         print_function_parameter, print_type, print_cv_qualifier): New
11055         functions.
11056         (init_error): Initialize lang_printer.
11057
11058 2000-08-24  Jason Merrill  <jason@redhat.com>
11059
11060         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
11061         adjustment necessary.
11062
11063 2000-08-24  Greg McGary  <greg@mcgary.org>
11064
11065         * cp-tree.h (MAIN_NAME_P): Remove macro.
11066
11067 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
11068
11069         * error.c (print_instantiation_context): Don't forget to flush the
11070         buffer.
11071
11072 2000-08-23  Jason Merrill  <jason@redhat.com>
11073
11074         * typeck.c (build_ptrmemfunc): Save the input pmf.
11075
11076         * method.c (process_modifiers): Use same_type_p.
11077
11078 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
11079
11080         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
11081         * mangle.c (write_function_type): Change prototype.
11082         (write_encoding): Don't mangle return types for
11083         constructors or destructors.
11084         (write_type): Adjust call to write_function_type.
11085         * pt.c (instantiate_template): Instantiate alternate entry points
11086         when instantiating the main function.
11087
11088 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
11089
11090         * error.c (cp_print_error_function): Don't use embedded '\n' in
11091         output_printf.
11092
11093 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
11094
11095         * decl.c (init_decl_processing): Remove bogus initialization.
11096         * error.c (lang_print_error_function): Restore here.
11097         (init_error): Initialize print_error_function.
11098
11099 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
11100
11101         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
11102
11103 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
11104
11105         * Makefile.in (error.o): Depends on diagnostic.h
11106
11107         * cp-tree.h (problematic_instantiation_changed,
11108         record_last_problematic_instantiation, current_instantiation,
11109         print_instantiation_context): Declare.
11110         (maybe_print_template_context): Remove.
11111
11112         * decl.c (init_decl_processing): Set print_error_function to NULL.
11113         (lang_print_error_function): Remove, since we're using a new
11114         machinery.
11115
11116         * error.c: #include diagnostic.h
11117         (function_category): New function.
11118         (cp_diagnostic_starter): Likewise.
11119         (cp_diagnostic_finalizer): Likewise.
11120         (cp_print_error_function): Likewise.
11121         (maybe_print_instantiation_context): Likewise.
11122         (print_instantiation_full_context): Likewise.
11123         (print_instantiation_partial_context): Likewise.
11124         (print_instantiation_context): Define.
11125         (init_error): Initialize diagnostic pager and finalizer.
11126
11127         * pt.c (problematic_instantiation_changed): Define.
11128         (record_last_problematic_instantiation): Likewise.
11129         (current_instantiation): Likewise.
11130         (maybe_print_template_context): Remove.
11131         (print_template_context): Likewise.
11132         (current_tinst_level): Make static to reflect Brendan Kehoe's
11133         change of 1995-04-13.
11134         (push_tinst_level): Call print_instantiation_context.
11135
11136 2000-08-21  Nix  <nix@esperi.demon.co.uk>
11137
11138         * lang-specs.h: Do not process -o or run the assembler if
11139         -fsyntax-only.
11140
11141 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
11142
11143         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
11144         variables.
11145         * decl2.c (lang_decode_option): Disable gettext attributes for
11146         -ansi.
11147
11148 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
11149
11150         * lex.c (lang_init_options): Default diagnostic message maximum
11151         length to 80, when line-wrapping.
11152
11153 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
11154
11155         * class.c (build_vtbl_initializer): Clear the entire
11156         vtbl_init_data.  Start keeping track of the functions for which we
11157         have created vcall offsets here.
11158         (dfs_build_vcall_offset_vtbl_entries): Remove.
11159         (build_vcall_offset_vtbl_entries): Reimplement.
11160         (add_vcall_offset_vtbl_entries_r): New function.
11161         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
11162         computing when vcall offsets are necessary.
11163
11164 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11165
11166         * decl.c (member_function_or_else): Use cp_error ... %T.
11167         (grokdeclarator): Likewise.
11168         (start_method): Likewise.
11169         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
11170
11171 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11172
11173         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
11174         TYPE_DECLs.
11175
11176 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11177
11178         * cp-tree.h (PTRMEM_OK_P): New macro.
11179         (itf_ptrmem_ok): New enumeration value.
11180         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
11181         argument. Diagnose implicit pointer to member.
11182         (instantiate_type): Don't diagnose implicit pointer to member
11183         here. Pass itf_ptrmem_ok if ok. Adjust calls to
11184         resolve_address_of_overloaded_function.
11185         * init.c (build_offset_ref): Set PTRMEM_OK_P.
11186         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
11187         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
11188         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
11189         (build_unary_op): Deal with single non-static member in
11190         microsoft-land.
11191
11192 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11193
11194         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
11195
11196 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11197
11198         * cp-tree.h (enum_name_string): Remove prototype.
11199         (report_case_error): Remove prototype.
11200         * cp/typeck2.c (enum_name_string): Remove.
11201         (report_case_error): Remove.
11202         * error.c (dump_expr): Deal with enum values directly.
11203         Correctly negate integer constant.
11204
11205 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11206
11207         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
11208         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
11209         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
11210         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
11211         (__cxa_vec_new): Use __cxa_vec_new2.
11212         (__cxa_vec_delete): Use __cxa_vec_delete2.
11213
11214 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11215
11216         * vec.cc (__cxa_vec_new): Set "C" linkage.
11217         (__cxa_vec_ctor): Likewise.
11218         (__cxa_vec_cctor): Likewise.
11219         (__cxa_vec_dtor): Likewise.
11220         (__cxa_vec_delete): Likewise.
11221         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
11222         (__cxa_vec_ctor): Likewise.
11223         (__cxa_vec_cctor): Likewise.
11224         (__cxa_vec_dtor): Likewise.
11225         (__cxa_vec_delete): Likewise.
11226
11227 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11228
11229         * class.c (instantiate_type): Reinstate local variable
11230         deleted in previous change.
11231
11232         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
11233         itf_no_attributes.
11234
11235 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11236
11237         * cp-tree.h (instantiate_type_flags): New enumeration.
11238         (instantiate_type): Change parameter.
11239         * class.c (instantiate_type): Adjust prototype. Adjust.
11240         * call.c (standard_conversion): Adjust instantiate_type call.
11241         (reference_binding): Likewise.
11242         (build_op_delete_call): Likewise.
11243         (convert_like_real): Likewise.
11244         * cvt.c (cp_convert_to_pointer): Likewise.
11245         (convert_to_reference): Likewise.
11246         * pt.c (convert_nontype_argument): Likewise.
11247         * typeck.c (build_binary_op): Likewise.
11248         (build_ptrmemfunc): Likewise.
11249         (convert_for_assignment): Likewise.
11250
11251 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11252
11253         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
11254         (current_aggr): Define.
11255         * decl.c (grokdeclarator): Make sure a friend class is an
11256         elaborated type specifier.
11257         * parse.y (current_aggr): Remove static definition.
11258         (cp_parse_init): Adjust.
11259         (structsp): Clear and restore current_aggr.
11260         (component_decl_list): Clear current_aggr.
11261
11262         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
11263         aggregate tag on the typename's context.
11264
11265         * pt.c (tsubst_friend_class): Return error_mark_node, if
11266         parms becomes NULL.
11267         (instantiate_class_template): Ignore error_mark_node friend types.
11268
11269 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
11270
11271         * cvt.c (warn_ref_binding): New static function, broken out of ...
11272         (convert_to_reference): ... here. Use it.
11273
11274 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11275
11276         * parse.y (template_arg): Add rule for template qualified with
11277         global scope.
11278
11279 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11280
11281         * decl2.c (add_function): Reorganize.
11282         (arg_assoc): Do not consider function template decls.
11283
11284 2000-08-11  Jason Merrill  <jason@redhat.com>
11285
11286         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
11287         looking inside.
11288
11289 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11290
11291         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
11292         (lookup_nested_tag): Likewise.
11293
11294         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
11295         can be produced.
11296
11297 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11298
11299         * parse.y (named_complex_class_head_sans_basetype): Remove
11300         always true if.
11301
11302 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11303
11304         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
11305         explicit TEMPLATE_ID_EXPR args.
11306         (build_expr_from_tree, case CALL_EXPR): Likewise.
11307
11308 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11309
11310         * decl.c (check_tag_decl): Diagnose typename's which don't
11311         declare anything.
11312
11313 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
11314
11315         * init.c (build_aggr_init): Reject bogus array initializers
11316         early.
11317
11318 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
11319
11320         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
11321         runtime.
11322         * cp/tinfo.cc (__dynamic_cast): Likewise.
11323         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
11324
11325 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
11326
11327         * cvt.c (convert_to_pointer_force): Fix error message when
11328         attempting to cast from ambiguous base.
11329
11330 2000-08-08  Jason Merrill  <jason@redhat.com>
11331
11332         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
11333         (tsubst_template_arg_vector): Likewise.
11334
11335         * decl2.c (build_anon_union_vars): Choose the largest field; don't
11336         assume that one will be as large as the union.
11337
11338 2000-08-07  Kazu Hirata  <kazu@hxi.com>
11339
11340         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
11341         * decl.c (pop_labels): Likewise.
11342
11343 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
11344
11345         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
11346         specifications.
11347         (__pointer_to_member_type_info): Likewise.
11348         (__base_class_info): Likewise.
11349         (__class_type_info): Likewise.
11350         (__si_class_type_info): Likewise.
11351         (__vmi_class_type_info): Likewise.
11352         * tinfo.cc (__si_class_type_info::__do_find_public_src):
11353         Changed member names to match specifications.
11354         (__vmi_class_type_info::__do_find_public_src): Likewise.
11355         (__si_class_type_info::__do_dyncast): Likewise.
11356         (__vmi_class_type_info::__do_dyncast): Likewise.
11357         (__si_class_type_info::__do_upcast): Likewise.
11358         (__vmi_class_type_info::__do_upcast): Likewise.
11359         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
11360         (__pbase_type_info::__pointer_catch): Likewise.
11361         (__pointer_type_info::__pointer_catch): Likewise.
11362         (__pointer_to_member_type_info::__pointer_catch): Likewise.
11363
11364 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
11365
11366         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
11367         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
11368         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
11369
11370 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
11371
11372         * cp-tree.h (add_method): Change prototype.
11373         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
11374         Don't double the size of the method vector in the error case.
11375         (handle_using_decl): Adjust call to add_method.
11376         (add_implicitly_declared_members): Likewise.
11377         (clone_function_decl): Likewise.
11378         * decl2.c (check_classfn): Likewise.
11379         * semantics.c (finish_member_declaration): Likewise.
11380
11381 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
11382
11383         * decl.c (flag_isoc94): New variable.
11384
11385 2000-08-02  Jason Merrill  <jason@redhat.com>
11386
11387         * pt.c (do_type_instantiation): Add complain parm; don't complain
11388         if called recursively.
11389         * cp-tree.h, parse.y: Adjust.
11390
11391 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
11392
11393         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
11394         -Wno-strict-prototypes.
11395
11396         * g++spec.c: Adjust type of second argument to
11397         lang_specific_driver, and update code as necessary.
11398
11399         * cp-tree.h: Don't prototype min_precision here.
11400         (my_friendly_assert): Cast expression to void.
11401         * semantics.c (do_poplevel): Initialize scope_stmts.
11402
11403 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
11404
11405         * cp-tree.h (DECL_NEEDED_P): Tweak.
11406
11407 2000-07-28  Jason Merrill  <jason@redhat.com>
11408
11409         * lang-specs.h: Use %i in rule for .ii files.
11410
11411 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
11412
11413         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
11414
11415 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
11416
11417         Allow indirect primary bases.
11418         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
11419         primary_base.
11420         (CLASSTYPE_VFIELD_PARENT): Remove.
11421         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
11422         (BINFO_PRIMARY_BINFO): Remove.
11423         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
11424         (BINFO_VBASE_PRIMARY_P): Likewise.
11425         (BINFO_PRIMARY_BASE_OF): New macro.
11426         (BINFO_INDIRECT_PRIMARY_P): Likewise.
11427         (get_primary_binfo): New function.
11428         * decl.c (lang_mark_tree): Make lang_type::primary_base.
11429         * class.c (vcall_offset_data_s): Rename to ...
11430         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
11431         and add ctor_vtbl_p.
11432         (get_derived_offset): Use get_primary_binfo.
11433         (dfs_mark_primary_bases): Adjust handling of virtual primary
11434         bases.
11435         (mark_primary_bases): Likewise.
11436         (set_primary_base): Take a binfo, not an integer, as a
11437         representation of the primary base.
11438         (indirect_primary_base_p): Remove.
11439         (determine_primary_base): Adjust for indirect primary bases.
11440         (dfs_find_final_overrider): Fix typo in coment.
11441         (update_vtable_entry_for_fn): Use get_primary_binfo.
11442         (layout_nonempty_base_or_field): Tweak.
11443         (build_base_fields): Adjust for new primary base semantics.
11444         (dfs_propagate_binfo_offsets): Remove.
11445         (propagate_binfo_offsets): Rewrite.
11446         (dfs_set_offset_for_shared_vbases): Remove.
11447         (layout_virtual_bases): Don't use it.
11448         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
11449         ABI.
11450         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
11451         CLASSTYPE_VFIELD_PARENT.
11452         (dfs_get_primary_binfo): New function.
11453         (get_primary_binfo): Likewise.
11454         (dump_class_hierarchy_r): Tweak printing of primary bases.
11455         (build_vtbl_initializer): Fix typo in comments.  Use
11456         vtbl_init_data.
11457         (build_vcall_and_vbase_vtbl_entries): Likewise.
11458         (build_vbaes_offset_vtbl_entries): Likewise.
11459         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
11460         BV_VCALL_INDEX to handle indirect primary bases.
11461         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
11462         (build_rtti_vtbl_entries): Likewise.
11463         * search.c (get_shared_vbase_if_not_primary): Tweak.
11464         (find_vbase_instance): Likewise.
11465         (binfo_for_vtable): Simplify.
11466         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
11467         (make_binfo): Make it have 11 entries.
11468
11469 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
11470
11471         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
11472         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
11473         ascertaining primaryness.
11474         (G): Remove template_args.
11475         (decl_is_template_id): New function.
11476         (write_encoding): Use decl_is_template_id.
11477         (write_name): Likewise.  Handle type_decls.  Get main variant of
11478         type decls.
11479         (write_nested_name): Likewise.
11480         (write_prefix): Likewise.
11481         (write_template_prefix): Likewise.
11482         (write_special_name_constructor): Remove defunct production from
11483         comment.
11484         (write_bare_function_type): Remove comment about absent parameter.
11485         (write_template_template_arg): Add missing grammar production to
11486         comment.
11487
11488 2000-07-27  Jason Merrill  <jason@redhat.com>
11489
11490         * decl.c (duplicate_decls): If common_type produces a non-typedef
11491         type for a typedef, just use the old type.
11492
11493 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
11494
11495         * cp-tree.h (function_depth): Declare.
11496         (verify_stmt_tree): Likewise.
11497         (find_tree): Likewise.
11498         * decl.c (function_depth): Give it external linkage.
11499         * optimize.c (optimize_function): Increment and decrement it.
11500         * tree.c (verify_stmt_tree_r): New function.
11501         (verify_stmt_tree): Likewise.
11502         (find_tree_r): Likewise.
11503         (find_tree): Likewise.
11504
11505 2000-07-27  Jason Merrill  <jason@redhat.com>
11506
11507         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
11508         TYPE_PTRMEMFUNC_P.
11509         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
11510
11511 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
11512
11513         * decl.c (start_cleanup_fn): Mark the function as `inline'.
11514         * decl2.c (get_guard): Call cp_finish_decl, not
11515         rest_of_decl_compilation, for local guards.
11516         * lex.c (do_identifier): Remove unused variable.
11517
11518 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
11519
11520         * parse.y:  Add missing ';'.
11521
11522 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
11523
11524         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
11525         of `extern "C++"'.
11526
11527 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11528
11529         Kill strict_prototype. Backwards compatibility only for
11530         non NO_IMPLICIT_EXTERN_C systems.
11531         * cp-tree.h (flag_strict_prototype): Remove.
11532         (strict_prototype): Remove.
11533         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
11534         * decl.c (maybe_push_to_top_level): Adjust.
11535         (pop_from_top_level): Adjust.
11536         (decls_match): Only allow sloppy parm matching for ancient
11537         system headers.
11538         (init_decl_processing): Adjust.
11539         (grokdeclarator): Adjust.
11540         * decl2.c (flag_strict_prototype): Remove.
11541         (strict_prototype): Remove.
11542         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
11543         (lang_f_options): Remove "strict-prototype".
11544         (unsupported-options): Add "strict-prototype".
11545         * lex.c (do_identifier): Adjust.
11546         (do_scoped_id): Adjust.
11547         * parse.y (empty_parms): Adjust.
11548         * class.c (push_lang_context): Adjust.
11549         (pop_lang_context): Adjust.
11550         * typeck.c (comp_target_parms): Adjust.
11551
11552 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11553
11554         * decl.c (poplevel): Deal with anonymous variables at for scope.
11555         (maybe_inject_for_scope_var): Likewise.
11556
11557 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
11558
11559         * decl.c: Remove all signal handling code, now done in toplev.c.
11560
11561 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
11562
11563         * decl.c (make_rtl_for_nonlocal_decl): Rework.
11564
11565         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
11566         correctly.
11567
11568 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
11569
11570         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
11571         Define my_friendly_assert and my_friendly_abort as macros
11572         which may call friendly_abort.  Prototype friendly abort, not
11573         my_friendly_abort or my_friendly_assert.
11574         * decl.c (signal_catch): Report the signal caught in the error
11575         message.  Call fatal directly.
11576         * typeck2.c (ack, my_friendly_assert): Delete.
11577         (my_friendly_abort): Rename to friendly_abort.  Expect file,
11578         line, and function parameters.  Report the abort code, then
11579         call fancy_abort.  Do not mask an abort if errors have
11580         already occurred.
11581
11582 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
11583
11584         * typeck.c (comp_target_parms): Remove obsolete parameter.
11585         (comp_target_types): Adjust.
11586
11587 2000-07-17  Jason Merrill  <jason@redhat.com>
11588
11589         * typeck.c (mark_addressable): Never set TREE_USED.
11590         * call.c (build_call): Don't abort on calls to library functions
11591         that have been declared normally.
11592
11593         * typeck.c (build_binary_op): Fix grammar in warning.
11594
11595         * exception.cc (__eh_free): Fix prototype.
11596
11597         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
11598
11599         * decl.c (pushdecl): Handle seeing an OVERLOAD in
11600         IDENTIFIER_NAMESPACE_VALUE.
11601
11602 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
11603
11604         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
11605         * method.c (use_thunk): Correct handling of vcall offsets.
11606
11607 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
11608
11609         * .cvsignore: parse.h and parse.c have no cp- prefix.
11610
11611 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
11612
11613         * .cvsignore: New file.
11614
11615 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
11616
11617         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
11618
11619 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
11620
11621         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
11622         * parse.c: Remove.
11623         * parse.h: Likewise.
11624
11625 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
11626
11627         * class.c (layout_class_type): Add pointers to virtual bases after
11628         base classes under the old ABI.
11629
11630 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
11631
11632         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
11633         (finish_continue_stmt): Likewise.
11634         (begin_for_stmt): Remove call to note_level_for_for.
11635         (finish_goto_stmt): Change call from build_min_nt
11636         to build_stmt.
11637         (finish_expr_stmt): Likewise.
11638         (begin_if_stmt): Likewise.
11639         (begin_while_stmt): Likewise.
11640         (finish_while_stmt): Likewise.
11641         (finish_return_stmt): Likewise.
11642         (begin_for_stmt): Likewise.
11643         (finish_for_stmt): Likewise.
11644         (finish_break_stmt): Likewise.
11645         (begin_switch_stmt): Likewise.
11646         (finish_case_label): Likewise.
11647         (genrtl_try_block): Likewise.
11648         (begin_try_block): Likewise.
11649         (begin_handler): Likewise.
11650         (begin_compound_stmt): Likewise.
11651         (finish_asm_stmt): Likewise.
11652         (finish_label_stmt): Likewise.
11653         (add_decl_stmt): Likewise.
11654         (finish_subobject): Likewise.
11655         (finish_decl_cleanup): Likewise.
11656         (finish_named_return_value): Likewise.
11657         (setup_vtbl_ptr): Likewise.
11658         (add_scope_stmt): Likewise.
11659         * decl.c (finish_constructor_body): Likewise.
11660         (finish_destructor_body): Likewise.
11661         * optimize.c (copy_body_r): Likewise.
11662         (initialize_inlined_parameters): Likewise.
11663         (declare_return_variable): Likewise.
11664         (expand_call_inline): Likewise.
11665
11666 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
11667
11668         * semantics.c (expand_body): Sync interface information
11669         at the end of function body expansion.
11670
11671 2000-07-09  Jason Merrill  <jason@redhat.com>
11672
11673         * init.c (build_new_1): Bail early if the call to new fails.
11674
11675         * decl.c (compute_array_index_type): Check specifically for
11676         an INTEGER_CST, not just TREE_CONSTANT.
11677
11678         * decl.c (duplicate_decls): Don't call duplicate_decls on
11679         the DECL_TEMPLATE_RESULT.
11680         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
11681         codes.
11682
11683         * error.c (dump_template_bindings): Don't crash if we had an
11684         invalid argument list.
11685
11686         * typeck.c (c_expand_start_case): Do narrowing here.
11687         * semantics.c (finish_switch_cond): Not here.
11688
11689 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
11690
11691         * parse.y (asm_clobbers): Do string concatenation.
11692
11693 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
11694
11695         * decl.c (pushtag): Don't put local classes in template functions
11696         on the local_classes list.
11697
11698 2000-07-04  Scott Snyder  <snyder@fnal.gov>
11699
11700         * decl2.c (get_guard): Add missing return for old ABI local
11701         variable case.
11702
11703 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
11704
11705         * cp-tree.h (char_type_p): New function.
11706         * decl.c (init_decl_processing): Don't initialize
11707         signed_wchar_type_node or unsigned_wchar_type_node.
11708         (complete_array_type): Handle brace-enclosed string-constants.
11709         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
11710         * tree.c (char_type_p): New function.
11711         * typeck2.c (digest_init): Use char_type_p.
11712
11713 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
11714
11715         * pt.c (tsubst): Don't layout type, if it's error_mark.
11716
11717 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
11718
11719         * pt.c (instantiate_pending_templates): Reset template level.
11720
11721 2000-07-05  Jason Merrill  <jason@redhat.com>
11722
11723         * call.c (joust): Don't complain about `operator char *()' beating
11724         `operator const char *() const'.
11725
11726 2000-07-04  scott snyder  <snyder@fnal.gov>
11727             Jason Merrill  <jason@redhat.com>
11728
11729         * repo.c (repo_get_id): Handle the case where a class with virtual
11730         bases has a null TYPE_BINFO_VTABLE.
11731
11732 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
11733             Jason Merrill  <jason@redhat.com>
11734
11735         * parse.y (member_init): Just pass in the type.
11736         * init.c (expand_member_init): Handle getting a type.
11737
11738 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11739             Jason Merrill  <jason@redhat.com>
11740
11741         * decl.c (finish_function): Warn if a function has no return
11742         statement.
11743         Suggested by Andrew Koenig.
11744         * typeck.c (check_return_expr): Do set current_function_returns_value
11745         if we got an error_mark_node.
11746
11747 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
11748
11749         * decl2.c (push_decl_namespace): Push the original namespace.
11750
11751 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
11752
11753         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
11754         * semantics.c (begin_class_definition): Clear it.
11755
11756 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
11757
11758         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
11759         (genrtl_expr_stmt): Likewise.
11760         (genrtl_decl_stmt): Likewise.
11761         (genrtl_if_stmt): Likewise.
11762         (genrtl_while_stmt): Likewise.
11763         (genrtl_do_stmt): Likewise.
11764         (genrtl_return_stmt): Likewise.
11765         (genrtl_for_stmt): Likewise.
11766         (genrtl_break_stmt): Likewise.
11767         (genrtl_continue_stmt): Likewise.
11768         (genrtl_scope_stmt): Likewise.
11769         (genrtl_switch_stmt): Likewise.
11770         (genrtl_case_label): Likewise.
11771         (genrtl_begin_compound_stmt): Likewise.
11772         (genrtl_finish_compound_stmt): Likewise.
11773         (genrtl_compound_stmt): Likewise.
11774         (genrtl_asm_stmt): Likewise.
11775
11776         * init.c (begin_init_stmts): Remove call to
11777         genrtl_begin_compound_stmt.
11778         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
11779
11780         * semantics.c (lang_expand_stmt): Changed call to
11781         genrtl_compound_stmt to ignore return value.
11782
11783 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
11784
11785         * mangle.c (canonicalize_for_substitution): Return the canonical
11786         variant of a type.
11787
11788         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
11789         TYPE_DECL.
11790         * typeck.c (commonparms): Remove obstack manipulations.
11791
11792 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
11793
11794         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
11795
11796         * Makefile.in (OBJS): Added ../c-semantics.o.
11797         (OBJDEPS): Likewise.
11798
11799         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
11800         ../c-common.h.
11801         (struct stmt_tree): Added comment.
11802         (current_function_name_declared): Removed.
11803         (stmts_are_full_exprs_p): Likewise.
11804         (genrtl_do_pushlevel): Likewise.
11805         (genrtl_clear_out_block): Likewise.
11806         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
11807         (DECL_ANON_UNION_ELEMS): Likewise.
11808         (emit_local_var): Likewise.
11809         (make_rtl_for_local_static): Likewise.
11810         (do_case): Likewise.
11811         (expand_stmt): Likewise.
11812         (genrtl_decl_cleanup): Likewise.
11813         (c_expand_asm_operands): Likewise.
11814         (c_expand_return): Likewise.
11815         (c_expand_start_case): Likewise.
11816
11817         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
11818         (emit_local_var): Likewise.
11819         (initialize_local_var): Change reference to
11820         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
11821         Change reference to stmts_are_full_exprs_p to
11822         current_stmt_tree->stmts_are_full_exprs_p.
11823         (push_cp_function_context): Likewise.
11824
11825         * expect.c (expand_throw): Change reference to
11826         stmts_are_full_exprs_p.
11827
11828         * init.c (build_aggr_init): Change reference to
11829         stmts_are_full_exprs_p.
11830         (build_vec_init): Likewise.
11831
11832         * optimize.c (maybe_clone_body): Change reference to
11833         current_function_name_declared to
11834         cp_function_chain->name_declared.
11835
11836         * pt.c (instantiate_decl): Change reference to
11837         current_function_name_declared to
11838         cp_function_chain->name_declared.
11839
11840         * semantics.c (expand_cond): Moved declaration to c-common.h.
11841         (genrtl_do_pushlevel): Moved to c-semantics.c.
11842         (genrtl_clear_out_block): Likewise.
11843         (genrtl_goto_stmt): Likewise.
11844         (genrtl_expr_stmt): Likewise.
11845         (genrtl_decl_stmt): Likewise.
11846         (gerntl_if_stmt): Likewise.
11847         (genrtl_while_stmt): Likewise.
11848         (genrtl_do_stmt): Likewise.
11849         (genrtl_return_stmt): Likewise.
11850         (genrtl_for_stmt): Likewise.
11851         (genrtl_break_stmt): Likewise.
11852         (genrtl_continue_stmt): Likewise.
11853         (genrtl_scope_stmt): Likewise.
11854         (genrtl_switch_stmt): Likewise.
11855         (genrtl_case_label): Likewise.
11856         (genrtl_begin_compound_stmt): Likewise.
11857         (genrtl_finish_compound_stmt): Likewise.
11858         (genrtl_compound_stmt): Likewise.
11859         (genrtl_asm_stmt): Likewise.
11860         (genrtl_decl_cleanup): Likewise.
11861         (expand_cond): Likewise.
11862         (expand_stmt): Renamed to ...
11863         (lang_expand_stmt): ... this.
11864         (lang_expand_expr_stmt): Initialize.
11865         (set_current_function_name_declared): Likewise.
11866         (stmts_are_full_exprs_p): Likewise.
11867         (current_function_name_declared): Likewise.
11868         (anon_aggr_type_p): Likewise.
11869         (do_poplevel): Change reference to
11870         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
11871         Change reference to stmts_are_full_exprs_p to
11872         current_stmt_tree->stmts_are_full_exprs_p.
11873         (add_tree): Likewise.
11874         (finish_expr_stmt): Likewise.
11875         (prep_stmt): Likewise.
11876         (lang_expand_stmt): Likewise.
11877         (begin_compound_stmt): Change reference to
11878         current_function_name_declared to
11879         cp_function_chain->name_declared and call to
11880         current_function_name_declared().
11881         (setup_vtbl_ptr): Likewise.
11882         (genrtl_do_poplevel): Removed.
11883
11884 2000-06-30  Jason Merrill  <jason@redhat.com>
11885
11886         * init.c (init_init_processing): Go back to aligning like
11887         double_type_node for old ABI.
11888         (get_cookie_size): Make cookie larger if we get a type that needs
11889         more alignment.
11890         (build_vec_delete): Call it.
11891
11892         * typeck.c (qualify_type_recursive): New fn.
11893         (composite_pointer_type): Use it.
11894         (build_binary_op): Use composite_pointer_type.
11895
11896 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
11897             Jason Merrill  <jason@redhat.com>
11898
11899         * typeck.c (check_return_expr): Don't complain about returning
11900         NULL from operator new if -fcheck-new.
11901         * cp-tree.h: Declare flag_check_new here.
11902         * init.c: Not here.
11903
11904 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
11905
11906         * mangle.c (find_substitution): Use same_type_p.
11907         (write_encoding): Don't check for substitutions.
11908
11909 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
11910
11911         * parse.y (expr_no_comma_rangle): New non-terminal.
11912         (template_parm): Use it for default parameter case.
11913         (template_arg): Use it.
11914         (expr_no_commas): Remove commented out undefined extensions.
11915         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
11916         * parse.h, parse.c: Rebuilt.
11917
11918 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
11919
11920         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
11921         (finish_asm_stmt): Do it here, instead.
11922
11923         * cp-tree.h (ridpointers): Don't declare.
11924         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
11925         (record_builtin_java_type): Likewise.
11926         (init_decl_processing): Likewise.
11927         * lex.c: Move inclusion of lex.h.
11928         (ridpointers): Don't define.
11929         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
11930         RID_MAX.
11931         * lex.h (enum rid): Rename to ...
11932         (enum cp_rid): ... this.
11933         (ridpointers): Don't declare.
11934         * parse.y: Move inclusion of lex.h.
11935         * parse.c: Regenerated.
11936         * spew.c: Move inclusion of lex.h.
11937
11938         * cp-tree.h (struct language_function): Remove temp_name_counter.
11939         (temp_name_counter): Remove.
11940         (get_temp_name): Change prototype.
11941         (get_guard): New function.
11942         (get_guard_cond): Likewise.
11943         (set_guard): Likewise.
11944         * cvt.c (build_up_reference): Adjust call to get_temp_name.
11945         * decl.c (expand_static_init): Use get_guard and friends to
11946         implement guard variables.
11947         * decl2.c (get_temp_name): Assume that the variables created are
11948         always static.
11949         (get_sentry): Rename to ...
11950         (get_guard): ... this.  Implement new ABI guard variables.
11951         (get_guard_bits): New function.
11952         (get_guard_cond): Likewise.
11953         (set_guard): Likewise.
11954         (start_static_initialization_or_destruction): Use them.
11955         (do_static_initialization): Replace sentry with guard throughout.
11956         (do_static_destruction): Likewise.
11957         * init.c (create_temporary_var): Add comment.
11958
11959 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
11960
11961         * mangle.c (find_substitution): Use same_type_p.
11962         (write_encoding): Don't check for substitutions.
11963
11964 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
11965
11966         * parse.y (expr_no_comma_rangle): New non-terminal.
11967         (template_parm): Use it for default parameter case.
11968         (template_arg): Use it.
11969         (expr_no_commas): Remove commented out undefined extensions.
11970         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
11971         * parse.h, parse.c: Rebuilt.
11972
11973 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
11974
11975         * cp-tree.h (flag_const_strings): Remove.
11976         (warn_parentheses): Likewise.
11977         (warn_format): Likewise.
11978         (common_type): Likewise.
11979         (default_conversion): Likewise.
11980         (build_binary_op): Likewise.
11981         (cp_build_binary_op): New macro.
11982         * call.c (build_new_op): Use cp_build_binary_op instead of
11983         build_binary_op.
11984         * class.c (build_vtable_entry_ref): Likewise.
11985         * decl.c (expand_static_init): Likewise.
11986         (compute_array_index_type): Likewise.
11987         (build_enumerator): Likewise.
11988         * decl2.c (delete_sanity): Likewise.
11989         (start_static_initialization_or_destruction): Likewise.
11990         * error.c (dump_type_suffix): Likewise.
11991         * init.c (resolve_offset_ref): Likewise.
11992         (build_new): Likewise.
11993         (build_new_1): Likewise.
11994         (build_vec_delete_1): Likewise.
11995         (build_vec_init): Likewise.
11996         (build_delete): Likewise.
11997         * rtti.c (synthesize_tinfo_fn): Likewise.
11998         (synthesize_tinfo_var): Likewise.
11999         * search.c (expand_upcast_fixups): Likewise.
12000         (fixup_all_virtual_upcast_offsets): Likewise.
12001         * typeck.c (build_array_ref): Likewise.
12002         (get_member_function_from_ptrfunc): Likewise.
12003         (build_binary_op): Add parameter.
12004         (pointer_int_sum): Use cp_build_binary_op.
12005         (pointer_diff): Likewise.
12006         (build_modify_expr): Likewise.
12007         (get_delta_difference): Likewise.
12008         (build_ptrmemfunc): Likewise.
12009
12010 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
12011
12012         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
12013         * decl.c (create_implicit_typedef): Adjust.
12014         * decl2.c (build_artificial_parm): Adjust.
12015         * method.c (implicitly_declare_fn): Adjust.
12016         * pt.c (push_inline_template_parms_recursive): Adjust.
12017         (process_template_parm): Adjust.
12018         (overloaded_template_name): Adjust.
12019         * semantics.c (finish_template_template_parm): Adjust.
12020
12021 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
12022
12023         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
12024         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
12025         where to emit thunks.
12026         (build_vtt): Adjust call to build_vtt_inits.
12027         (build_vtt_inits): Add parameter to indicate whether or not
12028         sub-VTTs for virtual bases should be included.  Adjust handling of
12029         construction vtables.
12030         (get_matching_base): New function.
12031         (dfs_build_vtt_inits): Rename to ...
12032         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
12033         construction vtables.
12034         (dfs_fixup_binfo_vtbls): Likewise.
12035         (build_ctor_vtbl_groups): Build construction vtables for virtual
12036         bases, too.
12037         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
12038         to build construction vtbls.
12039         (dfs_accumulate_vtbl_inits): Adjust handling of
12040         construction vtables.
12041
12042         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
12043         types correctly.
12044
12045 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
12046
12047         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
12048
12049 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
12050
12051         * search.c (hides): Remove.
12052         (is_subobject_of_p): Add most_derived parameter. Use
12053         CANONICAL_BINFO.
12054         (lookup_field_queue_p): Adjust.
12055         (lookup_field_r): Adjust.
12056
12057 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
12058
12059         * decl2.c (handle_class_head): Bash typedefs to the type's main
12060         decl.
12061
12062 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
12063
12064         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
12065         (begin_global_stmt_expr): ... this.
12066         (genrtl_finish_stmt_expr): Rename to ...
12067         (finish_global_stmt_expr): ... this.
12068         * init.c (begin_init_stmts): Adjust calls.
12069         (finish_init_stmts): Likewise.
12070         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
12071         (begin_global_stmt_expr): ... this.
12072         (genrtl_finish_stmt_expr): Rename to ...
12073         (finish_global_stmt_expr): ... this.
12074
12075 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12076
12077         * search.c (lookup_member): Fix typo in comment.
12078
12079 2000-06-24  Jason Merrill  <jason@redhat.com>
12080
12081         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
12082         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
12083
12084 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12085
12086         * parse.y (complex_direct_notype_declarator): Support global_scope.
12087         * Makefile.in: Adjust conflict count.
12088
12089 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12090
12091         * parse.y (template_arg): Convert TEMPLATE_DECL
12092         that is a template template parameter to
12093         TEMPLATE_TEMPLATE_PARM here.
12094
12095         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12096         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
12097         (copy_template_template_parm): Adjust prototype.
12098         * decl.c (grokdeclarator): Remove dead code.
12099         * pt.c (process_template_parm): Tidy.
12100         (lookup_template_class): Construct nodes in
12101         copy_template_template_parm.
12102         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
12103         lookup_template_class.  Use TYPE_TI_TEMPLATE.
12104         * tree.c (copy_template_template_parm): Add NEWARGS
12105         parameter.
12106         (mapcar): Adjust call to copy_template_template_parm.
12107         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
12108         * method.c (build_template_template_parm_names): Change error
12109         code to avoid compilation warning.
12110
12111         * gxxint.texi: Document template template parameter
12112         name mangling.
12113
12114 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
12115
12116         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
12117         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
12118         (cp-demangle.o): New rule.
12119         (dyn-string.o): Likewise.
12120         * inc/cxxabi.h (__cxa_demangle): New declaration.
12121
12122 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
12123
12124         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
12125         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
12126         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
12127         a tree, not an int.
12128         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
12129         (make_thunk): Change prototype.
12130         (emit_thunk): Rename to use_thunk.
12131         (mangle_thunk): Change prototype.
12132         * class.c (get_derived_offset): Simplify.
12133         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
12134         BV_GENERATE_THUNK_WITH_VTABLE_P.
12135         (build_primary_vtable): Simplify.
12136         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
12137         (dfs_find_base): Remove.
12138         (update_vtable_entry_for_fn): Correct bug in finding the base
12139         where a virtual function was first declared.  Figure out whether
12140         or not to emit a vcall-thunk with the vtables in which it appears.
12141         Correct logic for deciding whether to use an ordinary thunk, or a
12142         vcall thunk.
12143         (finish_struct_1): Remove unnecssary code.
12144         (build_vtbl_initializer): Use ssize_int for the running counter of
12145         negative indices.
12146         (build_vtbl_initializer): Only use vcall thunks where necessary.
12147         Mark thunks as needing to be emitted with their vtables, or not.
12148         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
12149         indices.  Use size_binop.
12150         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
12151         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
12152         size_binop.
12153         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
12154         (build_vtable_entry): Mark thunks as needing to be emitted with
12155         their vtables, or not.
12156         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
12157         * decl2.c (mark_vtable_entries): Use use_thunk instead of
12158         emit_thunk.
12159         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
12160         information.
12161         * error.c (dump_expr): Use BV_FN.
12162         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
12163         not an int.
12164         * method.c (make_thunk): Likewise.
12165         (emit_thunk): Rename to use_thunk.  Allow callers to decide
12166         whether or not to actually emit the thunk.  Adjust for changes in
12167         representation of vcall offsets.
12168         * search.c (dfs_get_pure_virtuals): Use BV_FN.
12169         * semantics.c (emit_associated_thunks): New function.
12170         (expand_body): Use it.
12171         * ir.texi: Adjust decriptions of thunks.
12172
12173 2000-06-22  Jason Merrill  <jason@redhat.com>
12174
12175         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
12176         (tsubst_friend_function): Copy it here.
12177
12178         * decl.c (grok_op_properties): Fix typo.
12179
12180         * decl2.c (delete_sanity): Clarify warning, avoid failure on
12181         deleting void*.
12182
12183         * pt.c (check_explicit_specialization): Clarify error.
12184
12185         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
12186         an old OVERLOAD when we're declaring a non-function.
12187         (pushdecl, destroy_local_var): Check for error_mark_node.
12188         (warn_extern_redeclared_static): Also bail early if
12189         we're a CONST_DECL.
12190         (push_overloaded_decl): Ignore an old error_mark_node.
12191
12192 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
12193
12194         * call.c (build_x_va_arg): Check if in a template decl.
12195         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
12196
12197 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12198
12199         * class.c (push_lang_context): TYPE_NAME gets you to the Java
12200         types DECLs.
12201         * decl.c (check_goto): Computed gotos assumed OK.
12202
12203 2000-06-20  Jason Merrill  <jason@redhat.com>
12204
12205         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
12206         for which we don't need to look for instantiations.
12207
12208 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
12209
12210         * parse.y (program): Always call finish_translation_unit.
12211         * parse.c, parse.h: Rebuilt.
12212
12213 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
12214
12215         * method.c: Don't include hard-reg-set.h.
12216
12217 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
12218
12219         * rtti.c (get_base_offset): Cope when vbase field is in a base.
12220
12221 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
12222
12223         * call.c (build_conditional_expr): Use VOID_TYPE_P.
12224         * cvt.c (cp_convert_to_pointer): Likewise.
12225         (convert_to_void): Likewise.
12226         * error.c (dump_expr): Likewise.
12227         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
12228         * init.c (build_delete): Likewise.
12229         * method.c (emit_thunk): Likewise.
12230         * optmize.c (declare_return_variable): Likewise.
12231         * rtti.c (get_tinfo_decl_dynamic): Likewise.
12232         (get_typeid): Likewise.
12233         (build_dynamic_cast_1): Likewise.
12234         * typeck.c (composite_pointer_type): Likewise.
12235         (common_type): Likewise.
12236         (build_indirect_ref): Likewise.
12237         (build_binary_op): Likewise.
12238         (build_x_compound_expr): Likewise.
12239         (check_return_expr): Likewise.
12240         * typeck2.c (add_exception_specifier): Likewise.
12241
12242         * mangle.c (write_method_parms): Use direct comparison for end
12243         of parmlist.
12244
12245 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
12246
12247         * cp-tree.h (genrtl_try_block): Declare function.
12248         (genrtl_handler): Likewise.
12249         (genrtl_catch_block): Likewise.
12250         (genrtl_ctor_stmt): Likewise.
12251         (genrtl_subobject): Likewise.
12252         (genrtl_decl_cleanup): Likewise.
12253         (genrtl_do_poplevel): Likewise.
12254         (genrtl_do_pushlevel): Likewise.
12255         (genrtl_clear_out_block): Likewise.
12256         (genrtl_goto_stmt): Likewise.
12257         (genrtl_expr_stmt): Likewise.
12258         (genrtl_decl_stmt): Likewise.
12259         (genrtl_if_stmt): Likewise.
12260         (genrtl_while_stmt): Likewise.
12261         (genrtl_do_stmt): Likewise.
12262         (genrtl_return_stmt): Likewise.
12263         (genrtl_for_stmt): Likewise.
12264         (genrtl_break_stmt): Likewise.
12265         (genrtl_continue_stmt): Likewise.
12266         (genrtl_scope_stmt): Likewise.
12267         (genrtl_switch_stmt): Likewise.
12268         (genrtl_case_label): Likewise.
12269         (genrtl_begin_compound_stmt): Likewise.
12270         (genrtl_finish_compound_stmt): Likewise.
12271         (genrtl_compound_stmt): Likewise.
12272         (genrtl_asm_stmt): Likewise.
12273         (genrtl_named_return_value): Likewise.
12274         (genrtl_begin_stmt_expr): Likewise.
12275         (genrtl_finish_stmt_expr): Likewise.
12276         (finish_for_stmt): Removed first argument.
12277         (finish_switch_stmt): Likewise.
12278
12279         * semantics.c (genrtl_try_block): Define function.
12280         (genrtl_handler): Likewise.
12281         (genrtl_catch_block): Likewise.
12282         (genrtl_ctor_stmt): Likewise.
12283         (genrtl_subobject): Likewise.
12284         (genrtl_decl_cleanup): Likewise.
12285         (genrtl_do_poplevel): Likewise.
12286         (genrtl_do_pushlevel): Likewise.
12287         (genrtl_clear_out_block): Likewise.
12288         (genrtl_goto_stmt): Likewise.
12289         (genrtl_expr_stmt): Likewise.
12290         (genrtl_decl_stmt): Likewise.
12291         (genrtl_if_stmt): Likewise.
12292         (genrtl_while_stmt): Likewise.
12293         (genrtl_do_stmt): Likewise.
12294         (genrtl_return_stmt): Likewise.
12295         (genrtl_for_stmt): Likewise.
12296         (genrtl_break_stmt): Likewise.
12297         (genrtl_continue_stmt): Likewise.
12298         (genrtl_scope_stmt): Likewise.
12299         (genrtl_switch_stmt): Likewise.
12300         (genrtl_case_label): Likewise.
12301         (genrtl_begin_compound_stmt): Likewise.
12302         (genrtl_finish_compound_stmt): Likewise.
12303         (genrtl_compound_stmt): Likewise.
12304         (genrtl_asm_stmt): Likewise.
12305         (genrtl_named_return_value): Likewise.
12306         (genrtl_begin_stmt_expr): Likewise.
12307         (genrtl_finish_stmt_expr): Likewise.
12308         (finish_for_stmt): Removed first argument and generate rtl
12309         specific code.
12310         (finish_switch_stmt): Likewise.
12311         (do_poplevel): Removed generate rtl specific code.
12312         (do_pushlevel): Likewise.
12313         (add_tree): Likewise.
12314         (finish_goto_stmt): Likewise.
12315         (finish_expr_stmt): Likewise.
12316         (begin_if_stmt): Likewise.
12317         (finish_if_stmt_cond): Likewise.
12318         (finish_then_clause): Likewise.
12319         (begin_else_clause): Likewise.
12320         (finish_else_clause): Likewise.
12321         (finish_if_stmt): Likewise.
12322         (clear_out_block): Likewise.
12323         (begin_while_stmt): Likewise.
12324         (finish_while_stmt_cond): Likewise.
12325         (finish_while_stmt): Likewise.
12326         (begin_do_stmt): Likewise.
12327         (finish_do_body): Likewise.
12328         (finish_do_stmt): Likewise.
12329         (finish_return_stmt): Likewise.
12330         (begin_for_stmt): Likewise.
12331         (finish_for_init_stmt): Likewise.
12332         (finish_for_cond): Likewise.
12333         (finish_for_expr): Likewise.
12334         (finish_break_stmt): Likewise.
12335         (finish_continue_stmt): Likewise.
12336         (begin_switch_stmt): Likewise.
12337         (finish_switch_cond): Likewise.
12338         (finish_case_label): Likewise.
12339         (begin_try_block): Likewise.
12340         (begin_function_try_block): Likewise.
12341         (finish_try_block): Likewise.
12342         (finish_cleanup_try_block): Likewise.
12343         (finish_cleanup): Likewise.
12344         (finish_function_try_block): Likewise.
12345         (finish_handler_sequence): Likewise.
12346         (finish_function_handler_sequence): Likewise.
12347         (begin_handler): Likewise.
12348         (finish_handler_parms): Likewise.
12349         (begin_catch_block): Likewise.
12350         (finish_handler): Likewise.
12351         (begin_compound_stmt): Likewise.
12352         (finish_compound_stmt): Likewise.
12353         (finish_asm_stmt): Likewise.
12354         (finish_label_stmt): Likewise.
12355         (finish_label_decl): Likewise.
12356         (finish_subobject): Likewise.
12357         (finish_decl_cleanup): Likewise.
12358         (finish_named_return_value): Likewise.
12359         (begin_stmt_expr): Likewise.
12360         (finish_stmt_expr): Likewise.
12361
12362         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
12363         to call genrtl_expr_stmt when appropriate.
12364
12365         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
12366         begin_compound_expr to call genrtl_begin_stmt_expr and
12367         genrtl_begin_compound_expr when appropriate.
12368         (finish_init_stmts): Changed calls to finish_compound_expr and
12369         finish_stmt_expr to call genrtl_finish_compound_expr and
12370         genrtl_finish_stmt_expr when appropriate.
12371         (expand_default_init): Changed call to finish_expr_stmt to call
12372         genrtl_expr_stmt when appropriate.
12373         (build_vec_init): Likewise.
12374
12375         * parse.y (simple_stmt): Removed first argument from call to
12376         finish_for_stmt. Removed first argument from call to
12377         finish_switch_stmt.
12378
12379         * parse.c: Regenerated.
12380
12381         * pt.c (tsubst_expr): Removed first argument from call to
12382         finish_for_stmt. Removed first argument from call to
12383         finish_switch_stmt.
12384
12385 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
12386
12387         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
12388         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
12389
12390         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
12391         (cplus_tree_code_length[]): Likewise.
12392         (cplus_tree_code_name[]): Likewise.
12393         (init_parse): Added call to add_c_tree_codes. Changed
12394         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
12395
12396 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
12397
12398         * cp-tree.h (finish_mem_initializers): Declare.
12399         (count_trees): Likewise.
12400         * parse.y (base_init): Use finish_mem_initializers.
12401         * semantics.c (finish_mem_initializers): New function.
12402
12403         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
12404         the number of trees.
12405         (n_trees): Remove.
12406         (count_trees): Don't use it.
12407
12408 2000-06-15  Jason Merrill  <jason@redhat.com>
12409
12410         * tree.c (count_trees): New debugging function.
12411
12412         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
12413         * init.c (build_member_call): Pull out the name of a DECL.
12414
12415         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
12416         * semantics.c (expand_body): Push to TV_INTEGRATION here.
12417         * optimize.c (optimize_function): Not here.
12418         * pt.c (instantiate_decl): Push to TV_PARSE.
12419
12420 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
12421
12422         * cp-tree.h (struct language_function): Remove x_base_init_list
12423         and x_member_init_list.
12424         (current_base_init_list): Remove.
12425         (current_member_init_list): Likewise.
12426         (setup_vtbl_ptr): Change prototype.
12427         (emit_base_init): Likewise.
12428         (expand_member_init): Likewise.
12429         (reinit_parse_for_function): Remove.
12430         * decl.c (save_function_data): Don't clear x_base_init_list and
12431         x_member_init_list.
12432         (mark_language_function): Don't mark them.
12433         * init.c (perform_member_init): Tweak comment.
12434         (sort_member_init): Take the list of initializers as an argument.
12435         (sort_base_init): Likewise.
12436         (emit_base_init): Likewise.
12437         (expand_member_init): Return the initializer.  Don't use global
12438         variables.
12439         * lex.c (reinit_parse_for_function): Remove.
12440         * method.c (build_template_parm_names): Correct substitution.
12441         (do_build_copy_constructor): Don't use current_member_init_list
12442         and current_base_init_list.
12443         (synthesize_method): Likewise.
12444         * parse.y (base_init): Split mem-initializers into
12445         base-initializers and field-initializers.
12446         (member_init_list): Build up the list here.
12447         (member_init): Return the initializer.
12448         (fn.depfn): Don't use reinit_parse_for_function.
12449         * parse.c: Regenerated.
12450         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
12451         ERROR_MARK.
12452         (tsubst_expr): Don't use current_member_init_list
12453         and current_base_init_list.
12454         (tsubst_expr_values): Rename to ...
12455         (tsubst_initializer_list): ... this.  Use convert_from_reference.
12456         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
12457         and current_base_init_list.
12458         (begin_function_definition): Don't call reinit_parse_for_function.
12459
12460         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
12461
12462         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
12463         correctly.
12464
12465         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
12466
12467 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
12468
12469         * cp-tree.h (IF_COND): Move to c-common.h.
12470         (THEN_CLAUSE): Likewise.
12471         (ELSE_CLAUSE): Likewise.
12472         (WHILE_COND): Likewise.
12473         (WHILE_BODY): Likewise.
12474         (DO_COND): Likewise.
12475         (DO_BODY): Likewise.
12476         (RETURN_EXPR): Likewise.
12477         (EXPR_STMT_EXPR): Likewise.
12478         (FOR_INIT_STMT): Likewise.
12479         (FOR_COND): Likewise.
12480         (FOR_EXPR): Likewise.
12481         (FOR_BODY): Likewise.
12482         (SWITCH_COND): Likewise.
12483         (SWITCH_BODY): Likewise.
12484         (CASE_LOW): Likewise.
12485         (CASE_HIGH): Likewise.
12486         (GOTO_DESTINATION): Likewise.
12487         (COMPOUND_BODY): Likewise.
12488         (ASM_CV_QUAL): Likewise.
12489         (ASM_STRING): Likewise.
12490         (ASM_OUTPUTS): Likewise.
12491         (ASM_INPUTS): Likewise.
12492         (ASM_CLOBBERS): Likewise.
12493         (DECL_STMT_DECL): Likewise.
12494         (STMT_EXPR_STMT): Likewise.
12495         (LABEL_STMT_LABEL): Likewise.
12496         (SCOPE_BEGIN_P): Likewise.
12497         (SCOPE_END_P): Likewise.
12498         (SCOPE_STMT_BLOCK): Likewise.
12499         (SCOPE_NULLIFIED_P): Likewise.
12500         (SCOPE_NO_CLEANUPS_P): Likewise.
12501         (SCOPE_PARTIAL_P): Likewise.
12502         (ASM_VOLATILE_P): Likewise.
12503         (STMT_LINENO): Likewise.
12504         (STMT_LINENO_FOR_FN_P): Likewise.
12505
12506         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
12507         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
12508         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
12509         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
12510         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
12511
12512         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
12513
12514         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
12515         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
12516
12517         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
12518         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
12519         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
12520
12521 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
12522
12523         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
12524         * class.c (dfs_find_final_overrider): Set it appropriately.
12525         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
12526         avoid unneeded secondary vptrs.
12527
12528 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
12529
12530         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
12531         (check_bitfield_decl, check_field_decl): Likewise.
12532         (build_vtbl_or_vbase_field, build_base_field): Likewise.
12533         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
12534         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
12535         (xfer_tag, finish_enum): Likewise.
12536         * decl2.c (finish_builtin_type): Likewise.
12537         * init.c (init_init_processing): Likewise.
12538         * pt.c (instantiate_class_template): Likewise.
12539         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
12540         * cp-tree.h (struct lang_type): Add user_align member.
12541         (CLASSTYPE_USER_ALIGN): Define.
12542
12543 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
12544
12545         * Make-lang.in (c++.install-common): Install g++-cross in
12546         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
12547         $(target_alias)-g++ and $(target_alias)-c++.
12548
12549 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
12550
12551         * class.c (vcall_offset_data_s): Add last_init and fns.
12552         (overrides): Rename to same_signature_p.
12553         (dfs_find_final_overrider): Adjust accordingly.
12554         (mark_overriders): Likewise.
12555         (warn_hidden): Likewise.
12556         (build_vtbl_initializer): Reorganize machinery for building things
12557         at negative offsets.
12558         (build_vcall_and_vbase_vtbl_entries): Likewise.
12559         (build_vbase_offset_vtbl_entries): Likewise.
12560         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
12561         offset entries.  Do not create two entries for functions with the
12562         same signature.
12563         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
12564         (build_rtti_vtbl_entries): Reorganize machinery for building things
12565         at negative offsets.
12566
12567         * optimize.c (expand_call_inline): Don't recurse into the code
12568         used to initialize the parameters more than once.
12569
12570 2000-06-11  Mark Mitchell <mark@codesourcery.com>
12571
12572         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
12573         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
12574         (find_substitution): Only use the `Sa' substitution for
12575         std::allocator, not instantiations of it.
12576         (write_template_prefix): Move comment.  Only use a TREE_LIST to
12577         represent substitutions for a member template.
12578         (write_array_type): Mangle array dimensions correctly.
12579         * optimize.c (maybe_clone_body): Copy more information from the
12580         cloned function.
12581         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
12582         on the regenerated declaration.
12583
12584 2000-06-11  Chip Salzenberg  <chip@valinux.com>
12585             Mark Mitchell <mark@codesourcery.com>
12586
12587         * class.c (build_vtable): Clarify comment.
12588         (build_ctor_vtbl_group): Pass the most derived type to
12589         build_vtable.
12590
12591 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12592
12593         * decl2.c (compare_options): Don't needlessly cast away const-ness.
12594
12595 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
12596
12597         * decl.c (add_binding): Handle duplicate declarations of external
12598         variables.
12599
12600 2000-06-09  Chip Salzenberg  <chip@valinux.com>
12601             Mark Mitchell <mark@codesourcery.com>
12602
12603         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
12604         argument.
12605         (write_signed_number): New macro.
12606         (write_unsigned_number): Likewise.
12607         (write_source_name): Use them.
12608         (write_number): Handle signed and unsigned values.
12609         (write_integer_cst): Use tree_int_cst_sgn, and use
12610         write_unsigned_number or write_signed_number as appropriate.
12611         (write_discriminator): Use write_unsigned_number or
12612         write_signed_number as appropriate.
12613         (write_template_arg_literal): Likewise.
12614         (write_array_type): Use tree_low_cst.
12615         (write_template_parm):  Use write_unsigned_number or
12616         write_signed_number as appropriate.
12617         (write_substitution): Adjust call to write_number.
12618         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
12619         (write_expression): Handle non-type template arguments of
12620         reference type correctly.
12621         (mangle_thunk): Use write_signed_number.
12622
12623 2000-06-09  Chip Salzenberg  <chip@valinux.com>
12624
12625         * mangle.c (find_substition): Don't mangle objects with typename
12626         substitutions (e.g. "cin" as "Si").
12627
12628 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
12629
12630         * call.c (add_candidate): Use ggc_alloc_cleared.
12631         * decl.c (lookup_label): Likewise.
12632         * lex.c (retrofit_lang_decl): Likewise.
12633
12634 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
12635
12636         * semantics.c (expand_body): Push to TV_EXPAND.
12637         * optimize.c (optimize_function): Push to TV_INTEGRATION.
12638         * decl.c (start_function): Always call announce_function.
12639
12640         * tinfo2.cc: Just declare abort.
12641
12642 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
12643
12644         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
12645         whenever @ is a symbolic name.
12646
12647 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
12648
12649         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
12650
12651 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
12652
12653         * decl.c (pushdecl): Look up functions by DECL_NAME, not
12654         DECL_ASSEMBLER_NAME.
12655
12656 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
12657
12658         * decl2.c (c_language): Define.
12659
12660 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
12661
12662         * lex.c (lang_init_options): Tweak.
12663
12664         * decl2.c: Remove #inclusion of diagnostic.h
12665         (lang_decode_option): Move diagnostic formatting options to
12666         toplevel.
12667
12668         * lang-options.h: Remove documentation for diagnostic options.
12669
12670         * Makefile.in (lex.o): Depends upon diagnostic.h
12671
12672 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
12673
12674         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
12675         the same DECL_RESULT, it's not a redefinition.
12676         * pt.c (tsubst_decl): Remove code to handle illegal
12677         specializations.
12678
12679 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
12680
12681         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
12682
12683 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
12684
12685         * search.c (maybe_suppress_debug_info): Don't check
12686         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
12687
12688         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
12689         here if extern_p.
12690
12691         Remember instantiation context in deferred instantiations.
12692         * cp-tree.h (struct tinst_level): Remove.
12693         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
12694         * pt.c (current_tinst_level): Now a tree.
12695         (print_template_context, push_tinst_level, pop_tinst_level,
12696         tinst_for_decl): Adjust.
12697         (reopen_tinst_level): New fn.
12698         (init_pt): Register current_tinst_level as a root.
12699         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
12700         of the pending templates list.
12701         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
12702         * lex.c (extract_interface_info): Adjust.
12703         * decl2.c (warn_if_unknown_interface): Adjust.
12704
12705 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
12706
12707         * class.c (indirect_primary_base_p): New function.
12708         (determine_primary_base): Use it.
12709
12710 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12711
12712         Update new-abi dynamic cast algorithm.
12713         * tinfo.cc (__class_type_info::__dyncast_result): Add
12714         whole_details. Adjust constructor.
12715         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
12716         Avoid unnecessary searching.
12717         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
12718
12719 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12720
12721         * decl.c (init_decl_processing): Don't call record_component_aliases.
12722         * tree.c (build_cplus_array_type_1): Likewise.
12723
12724 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
12725
12726         * ir.texi: Correct typo.
12727         * mangle.c (write_expression): Handle non-type template arguments
12728         with reference type.
12729         * method.c (build_overload_value): Likewise.
12730         * pt.c (convert_nontype_argument): Explicitly represent conversion
12731         to a reference with an ADDR_EXPR.
12732         (unify): Always unify arguments in left-to-right order.
12733
12734 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
12735             Mark Mitchell  <mark@codesourcery.com>
12736
12737         * Make-lang.in (CXX_SRCS): Add mangle.c.
12738         * Makefile.in (CXX_OBJS): Add mangle.o.
12739         (mangle.o): New rule.
12740
12741         * class.c (local_classes): New variable.
12742         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
12743         (get_vtt_name): Use mangle_vtt_name for new ABI.
12744         (init_class_processing): Initialize local_classes.
12745         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
12746         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
12747         (std_identifier): New macro.
12748         (DECL_VOLATILE_MEMFUNC_P): New macro.
12749         (DECL_NAMESPACE_STD_P): Likewise.
12750         (local_classes): Declare.
12751         (get_mostly_instantiated_function_type): Declare.
12752         (init_mangle): Declare.
12753         (mangle_decl): Likewise.
12754         (mangle_type_string): Likewise.
12755         (mangle_type): Likewise.
12756         (mangle_typeinfo_for_type): Likewise.
12757         (mangle_typeinfo_string_for_type): Likewise.
12758         (mangle_vtbl_for_type): Likewise.
12759         (mangle_vtt_for_type): Likewise.
12760         (mangle_ctor_vtbl_for_type): Likewise.
12761         (mangle_thunk): Likewise.
12762         (mangle_conv_op_name_for_type): Likewise.
12763         (mangle_guard_variable): Likewise.
12764         * decl.c (pushtag): Keep track of local classes.
12765         (initialize_predefined_identifiers): Initialize std_identifier.
12766         (init_decl_processing): Use std_identifier.
12767         (start_decl): Don't treat instantiations as specializations.
12768         (grokdeclarator): Likewise.
12769         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
12770         name for fully-instantiated templates.
12771         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
12772         destructors with the new ABI.
12773         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
12774         (grokfield): Use mangle_type for new ABI.
12775         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
12776         (get_sentry): Use mangle_guard_variable for new ABI.
12777         (start_static_initialization_or_destruction): Likewise.
12778         * expr.c (extract_aggr_init): Remove.
12779         (extract_scalar_init): Likewise.
12780         (extract_init): Remove #if 0'd code.
12781         * mangle.c: New function.
12782         * method.c (build_mangled_name): Assert not flag_new_abi.
12783         (build_static_name): Likewise.
12784         (build_decl_overload_real): Likewise.
12785         (build_typename_overload): Likewise.
12786         (build_overload_with_type): Likewise.
12787         (build_overload_name): Likewise.
12788         (get_ctor_vtbl_name): Likewise.
12789         (start_squangling): Likewise.
12790         (get_id_2): Likewise.
12791         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
12792         (init_method): Call init_mangle for new ABI.
12793         (make_thunk): Call mangle_thunk for new ABI.
12794         * operators.def: Correct new ABI manglings for the `%' operator.
12795         Add `::' operator.
12796         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
12797         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
12798         (lookup_template_class): Call mangle_decl for new ABI.
12799         (get_mostly_instantiated_function_type): New function.
12800         (set_mangled_name_for_template_decl): Use it.
12801         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
12802         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
12803         conversion op names.
12804         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
12805         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
12806         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
12807         mangle_typeinfo_string_for_type.
12808
12809 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
12810
12811         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
12812         (INNERMOST_TEMPLATE_ARGS): New macro.
12813         (innermost_args): Remove.
12814         (get_innermost_template_args): New function.
12815         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
12816         * error.c (dump_function_decl): Be caution when using
12817         most_general_template.
12818         * method.c (build_template_parm_names):  Use
12819         INNERMOST_TEMPLATE_ARGS.
12820         * pt.c (add_to_template_args): Tidy comment
12821         (get_innermost_template_args): New function.
12822         (check_explicit_specialization): Clear DECL_INITIAL for a new
12823         specialization.
12824         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
12825         Tidy.
12826         (push_template_decl): Always register specializations of the most
12827         general template.
12828         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
12829         (coerce_template_parms): Likewise.
12830         (lookup_template_class): Likewise.
12831         (innermost_args): Remove.
12832         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
12833         (tsubst_decl): Handle tricky specializations.  Use
12834         get_innermost_template_args.
12835         (instantiate_template): Simplify handling of partial
12836         instantiations.
12837         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
12838         (most_general_template): Reimplement, in a more straightforward
12839         manner.
12840         (regenerate_decl_from_template): Tweak formatting.  Use
12841         TMPL_ARGS_DEPTH for clarity.
12842         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
12843
12844         * dump.c (dequeue_and_dump): Dump information about thunks.
12845
12846 2000-06-01  Richard Henderson  <rth@cygnus.com>
12847
12848         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
12849
12850 2000-06-01  Richard Henderson  <rth@cygnus.com>
12851
12852         * decl2.c (unsupported_options): Fix typo, make const.
12853         (lang_decode_option): Fix bsearch argument order.
12854
12855 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
12856
12857         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
12858         on FIELD_DECLs.
12859
12860 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12861
12862         * cp-tree.h (c_get_alias_set): Deleted.
12863         * Makefile.in (decl.o): Include ../expr.h.
12864         * decl.c (expr.h): Include.
12865         (init_decl_processing): Call record_component_aliases for arrays.
12866         (grokdeclarator): Likewise.
12867         Set TREE_ADDRESSABLE for fields that aren't bitfields.
12868         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
12869
12870 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
12871
12872         Remove guiding declaration support.
12873         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
12874         (flag_guiding_decls): Remove.
12875         * call.c (build_user_type_conversion_1): Remove support for
12876         guiding decls.
12877         (build_new_function_call): Likewise.
12878         (build_new_op): Likewise.
12879         (build_new_method_call): Likewise.
12880         * decl.c (start_function): Likewise.
12881         * friend.c (is_friend): Likewise.
12882         (do_friend): Likewise.
12883         * decl2.c ((flag_dump_translation_unit): Make it const.
12884         (flag_guiding_decls): Remove.
12885         (unsupported_options): New variable
12886         (compare_options): New function.
12887         (lang_decode_option): Use them.
12888
12889         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
12890
12891         * method.c (mangle_expression): Adjust test for legal expression
12892         operators.
12893
12894         * pt.c (instantiate_decl): Save and restore the local
12895         specializations list.
12896
12897 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
12898
12899         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
12900
12901 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
12902
12903         * call.c (add_template_candidate_real): Handle member template
12904         constructors for classes with virtual bases.
12905         (build_user_type_conversion_1): Use in_charge_arg_for_name.
12906         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
12907
12908         * ir.texi: Update thunk documentation.
12909
12910         * call.c (joust): Fix handling of overloaded builtin operators.
12911
12912 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
12913
12914         * cp-tree.h (DECL_ANTICIPATED): New macro.
12915         Document new use of DECL_LANG_FLAG_7.
12916         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
12917         in the user namespace.
12918         * lex.c (do_identifier): If the identifier's declaration has
12919         DECL_ANTICIPATED on, it has not yet been declared.  But do not
12920         replace it with an ordinary implicit declaration.
12921
12922         * tinfo2.cc: Include stdlib.h.
12923
12924 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
12925
12926         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
12927         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
12928         CLASSTYPE_ALIGN.
12929
12930 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
12931
12932         * decl2.c (lang_decode_option): Use skip_leading_substring instead
12933         of plain strncmp.
12934
12935 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
12936
12937         * operators.def (<?): Duplicated, should have been...
12938         (>?): this.  Fixed.
12939
12940 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
12941             Mark Mitchell  <mark@codesourcery.com>
12942
12943         * cp-tree.h (ansi_opname): Make it a macro.
12944         (ansi_assopname): Likewise.
12945         (struct lang_decl_flags): Add assignment_operator_p.
12946         (struct lang_decl): Add operator_code.
12947         (DECL_VTT_PARM): Adjust.
12948         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
12949         overloaded operator.
12950         (SET_OVERLOADED_OPERATOR_CODE): New macro.
12951         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
12952         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
12953         (opname_tab): Remove.
12954         (assignop_tab): Likewise.
12955         (operator_name_info_t): New type.
12956         (operator_name_info): New variable.
12957         (assignment_operator_name_info): Likewise.
12958         (build_cp_library_fn): Remove declaration.
12959         (push_cp_library_fn): Likewise.
12960         (operator_name_string): Likewise.
12961         (build_decl_overload): Likewise.
12962         * call.c (print_z_candidates): Simplify.
12963         (build_object_call): Adjust usage of ansi_opname.  Use
12964         DECL_OVERLOADED_OPERATOR_P.
12965         (op_error): Adjust operator name lookup.
12966         (build_conditional_expr): Adjust usage of ansi_opname.
12967         (build_new_op): Likewise.
12968         (build_op_delete_call): Likewise.
12969         (build_over_call): Likewise.
12970         (joust): Use DECL_OVERLOADED_OPERATOR_P.
12971         * decl.c (duplicate_decls): Copy operator_code.
12972         (init_decl_processing): Adjust parameters to push_cp_library_fn.
12973         (builtin_function): Adjust parameters to build_library_fn_1.
12974         (build_library_fn_1): Accept an overloaded operator code.
12975         (build_library_fn): Pass ERROR_MARK.
12976         (build_cp_library_fn): Accept an overloaded operator code.
12977         (push_cp_library_fn): Likewise.
12978         (grokfndecl): Tweak.
12979         (grokdeclarator): Simplify code to compute names of overloaded
12980         operators.  Adjust use of ansi_opname.
12981         (ambi_op_p): Work on tree_codes, not identifiers.
12982         (unary_op_p): Likewise.
12983         (grok_op_properties): Likewise.
12984         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
12985         (lang_mark_tree): Don't try to mark the operator_code.
12986         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
12987         * error.c (dump_decl): Remove special handling for operator
12988         names.
12989         (dump_function_name): Likewise.
12990         (dump_expr): Adjust name lookup of operators.
12991         (op_to_string): Simplify.
12992         (assop_to_string): Likewise.
12993         * init.c (build_new_1): Adjust use of ansi_opname.
12994         * lex.c (opname_tab): Remove.
12995         (assignop_tab): Likewise.
12996         (ansi_opname): Likewise.
12997         (ansi_assopname): Likewise.
12998         (operator_name_string): Likewise.
12999         (reinit_lang_specific): Likewise.
13000         (operator_name_info): New variable.
13001         (assignment_operator_name_info): Likewise.
13002         (init_operators): New function.
13003         (init_parse): Use it.
13004         (do_identifier): Adjust use of ansi_opname.
13005         * method.c (mangle_expression): Don't use ansi_opname for
13006         mangling.
13007         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
13008         (build_decl_overload): Remove.
13009         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
13010         (do_build_assign_ref): Adjust use of ansi_opname.
13011         (synthesize_method): Likewise.
13012         (implicitly_declare_fn): Likewise.
13013         * operators.def: New file.
13014         * parse.y (operator): Adjust use of ansi_opname.
13015         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
13016         (set_mangled_name_for_template_decl): Don't play games with
13017         current_namespace.
13018         (special_function_p): Adjust use of ansi_opname.
13019         * typeck.c (check_return_expr): Likewise.
13020         * Make-lang.in (cc1plus): Depend on operators.def.
13021         * Makefile.in (lex.o): Likewise.
13022         (decl.o): Likewise.
13023
13024 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
13025
13026         * Make-lang.in (cplib2.ready): Eradicate.
13027
13028 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13029
13030         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
13031         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
13032         (built_min, cp_tree_equal): Likewise.
13033
13034 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
13035
13036         * class.c (layout_nonempty_base_or_field): Replace
13037         `record_layout_info' with `record_layout_info_s'.
13038
13039 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
13040
13041         Fix goto checking.
13042         * cp-tree.h (struct language_function): x_named_labels is now
13043         a struct named_label_list*.
13044         * decl.c (struct named_label_use_list): Renamed from...
13045         (struct named_label_list): ...this.  New struct.
13046         (push_binding_level): Don't set eh_region.
13047         (note_level_for_eh): New fn.
13048         (pop_label): Take label and old value directly.
13049         (pop_labels): Adjust for new named_labels format.
13050         (lookup_label): Likewise.
13051         (poplevel): Note characteristics of a binding level containing a
13052         named label.  Mess with named label lists earlier.
13053         (mark_named_label_lists): New fn.
13054         (mark_lang_function): Call it.
13055         (use_label): New fn, split out from...
13056         (make_label_decl): ...here.  Don't call it.
13057         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
13058         check_previous_gotos): New fns, split out from...
13059         (define_label): ...here.
13060         (check_switch_goto): New fn.
13061         (define_case_label): Call it.
13062         (check_goto): New fn.
13063         * semantics.c (finish_goto_stmt): Call it and use_label.
13064         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
13065         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
13066
13067 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
13068
13069         * class.c (build_vtable_entry_ref): Correct usage of
13070         get_vtbl_decl_for_binfo.
13071
13072         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
13073         * method.c (implicitly_declare_fn): Not here.
13074
13075 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
13076
13077         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
13078         (CPTI_PTMD_DESC_TYPE): ... here.
13079         (ptmd_desc_type_node): Rename to ...
13080         (ptm_desc_type_node): ... here.
13081         * decl.c: Likewise.
13082         * rtti.c (ptmd_initializer): Rename to ...
13083         (ptm_initializer): ... here.
13084         (sythesize_tinfo_var): Adjust. Deal with pointer to member
13085         function.
13086         (create_tinfo_types): Adjust.
13087
13088 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
13089
13090         Finish implementation of VTTs.
13091         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
13092         CPTI_VTT_PARM_IDENTIFIER.
13093         (vtt_parm_identifier): New macro.
13094         (vtt_parm_type): Likewise.
13095         (BINFO_SUBVTT_INDEX): Likewise.
13096         (BINFO_VPTR_INDEX): Likewise.
13097         (struct lang_decl): Add vtt_parm.
13098         (DECL_VTT_PARM): New macro.
13099         (DECL_USE_VTT_PARM): Likewise.
13100         (DECL_NEEDS_VTT_PARM_P): Likewise.
13101         (get_vtt_name): Declare.
13102         (build_artificial_parm): Likewise.
13103         (fixup_all_virtual_upcast_offsets): Likewise.
13104         (expand_indirect_vtbls_init): Remove.
13105         * call.c (build_new_method_call): Pass the vtt to subobject
13106         constructors and destructors.
13107         * class.c (get_vtt_name): Give it external linkage.
13108         (build_clone): Handle the magic VTT parameters for clones.
13109         (clone_function_decl): Fix typo in comment.
13110         (build_vtt): Keep track of the indices in the VTTs where various
13111         entities are stored.
13112         (build_vtt_inits): Likewise.
13113         (dfs_build_vtt_inits): Likewise.
13114         (build_ctor_vtbl_group): Tweak type of construction vtables.
13115         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
13116         primary bases, when building construction vtables.
13117         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
13118         (initialize_predefined_identifiers): Add vtt_parm_identifier.
13119         (init_decl_processing): Initialize vtt_parm_type.
13120         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
13121         (lang_mark_tree): Make vtt_parm.
13122         * decl2.c (build_artificial_parm): New function.
13123         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
13124         (grokclassfn): Use build_artificial_parm.
13125         * init.c (initialize_vtbl_ptrs): Call
13126         fixup_all_virtual_upcast_offsets directly.
13127         (perform_member_init): Use the complete subobject destructor for
13128         member cleanups.
13129         (build_vtbl_address): New function.
13130         (expand_virtual_init): Handle VTTs.
13131         * optimize (maybe_clone_body): Likewise.
13132         * search.c (fixup_all_virtual_upcast_offsets): Give it external
13133         linkage.
13134         (expand_indirect_vtbls_init): Remove.
13135         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
13136         * tree.c (make_binfo): Make them bigger.
13137
13138 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
13139
13140         * inc/cxxabi.h (__pbase_type_info): Define, based on
13141         __pointer_type_info.
13142         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
13143         (__pointer_to_member_type_info): Likewise.
13144         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
13145         (__pointer_to_member_type_info::__is_pointer_p): Remove.
13146         (__pointer_type_info::__do_catch): Rename to ...
13147         (__pbase_type_info::__do_catch): ... here. Adjust.
13148         (__pbase_type_info::__pointer_catch): Implement.
13149         (__pointer_type_info::__pointer_catch): Adjust.
13150         (__pointer_to_member_type_info::__pointer_catch): Adjust.
13151
13152 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
13153
13154         * tinfo.h (__user_type_info::contained_virtual_p): New
13155         predicate.
13156         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
13157         shaped hierarchy.
13158         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
13159         diamond shaped hierarchy. Add early out for mixed diamond and
13160         duplicate shaped hierarchy.
13161
13162 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
13163
13164         * cp-tree.h (build_delete): Change prototype.
13165         (build_vec_delete): Likewise.
13166         * call.c (build_scoped_method_call): Use special_function_kind
13167         values to indicate the kind of destruction to be done.
13168         (build_method_call): Likewise.
13169         * decl.c (finish_destructor_body): Likewise.
13170         (maybe_build_cleanup_1): Likewise.  Rename to ...
13171         (maybe_build_cleanup): ... this.
13172         * decl2.c (delete_sanity): Use special_function_kind
13173         values to indicate the kind of destruction to be done.
13174         (build_cleanup): Likewise.
13175         * init.c (perform_member_init): Likewise.
13176         (build_vec_delete_1): Likewise.
13177         (build_dtor_call): Simplify.
13178         (build_delete): Use special_function_kind
13179         values to indicate the kind of destruction to be done.
13180         (build_vbase_delete): Likewise.
13181         (build_vec_delete): Likewise.
13182
13183         * init.c (sort_member_init): Fix typo in error message generation
13184         code.
13185
13186 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
13187
13188         * semantics.c (begin_class_definition): make the packed
13189         attribute be sensitive to the "-fpack-struct" command line flag
13190
13191 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
13192
13193         Update new-abi upcast algorithm.
13194         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
13195         prototype and meaning of return value.
13196         (__si_class_type_info::__do_upcast): Likewise.
13197         (__vmi_class_type_info::__do_upcast): Likewise.
13198         * tinfo.cc (__class_type_info::__upcast_result): Replace
13199         whole2dst with part2dst. Adjust ctor.
13200         (__class_type_info::__do_upcast): Adjust call of worker function.
13201         (__class_type_info::__do_upcast): Adjust.
13202         (__si_class_type_info::__do_upcast): Adjust. Use parent's
13203         __do_upcast.
13204         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
13205         virtual base in diamond hierarchy bug.
13206
13207 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
13208
13209         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
13210         and bitfield to tinfo_fn_p.
13211         (DECL_TINFO_FN_P): Adjust.
13212         (SET_DECL_TINFO_FN_P): Likewise.
13213         (DECL_MUTABLE_P): Likewise.
13214         (DECL_C_BIT_FIELD): Likewise.
13215         (SET_DECL_C_BIT_FIELD): Likewise.
13216         (CLEAR_DECL_C_BIT_FIELD): Likewise.
13217         (DECL_UNINLINABLE): Likewise.
13218         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
13219         (handle_using_decl): Remove assertion.
13220         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
13221         to build FIELD_DECLs.
13222         (build_base_field): Likewise.
13223         (layout_class_type): Likewise.
13224         * decl.c (init_decl_processing): Likewise.
13225         (build_ptrmemfunc_type): Likewise.
13226         (grokdeclarator): Likewise.
13227         * decl2.c (grok_x_components): Likewise.
13228         * except.c (call_eh_info): Likewise.
13229         * init.c (init_init_processing): Likewise.
13230         * rtti.c (expand_class_desc): Likewise.
13231         (create_pseudo_type_info): Likewise.
13232         (get_vmi_pseudo_type_info): Likewise.
13233         (create_tinfo_types): Likewise.
13234         * ptree.c (print_lang_decl): Adjust.
13235         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
13236         before checking DECL_MUTABLE_P.
13237
13238         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
13239         parameters for template functions.
13240         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
13241         destructors as well as constructors.
13242
13243 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
13244
13245         * class.c (build_ctor_vtbl_group): Set inits.
13246         * optimize.c (maybe_clone_body): Set DECL_INLINE and
13247         DECL_THIS_INLINE appropriately for clones.
13248
13249         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
13250         (DECL_CONV_FN_P): Simplify.
13251         (DECL_OPERATOR): Remove.
13252         (language_to_string): Declare.
13253         * decl.c (duplicate_decls): Fix typo in comment.
13254         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
13255         (grok_op_properties): Use DECL_CONV_FN_P instead of
13256         IDENTIFIER_TYPENAME_P.
13257         * dump.c (dequeue_and_dump): Dump the language linkage of
13258         declarations.
13259         * error.c (language_to_string): Give it external linkage.
13260         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
13261         (implicitly_declare_fn): Set DECL_LANGUAGE.
13262         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
13263         IDENTIFIER_TYPENAME_P.
13264         (tsubst_decl): Likewise.
13265         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
13266         * semantics.c (finish_member_declaration): Don't mark members of
13267         classes declared in an extern "C" region as extern "C".
13268
13269 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13270
13271         * decl2.c (qualified_lookup_using_namespace): Look through
13272         namespace aliases.
13273
13274         * decl.c (push_using_decl): Return the old decl on namespace level.
13275
13276 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
13277
13278         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
13279         (VTT_NAME_PREFIX): New macro.
13280         (CTOR_VTBL_NAME_PREFIX): Likewise.
13281         (get_ctor_vtbl_name): New function.
13282         * class.c (get_vtable_name): Simplify.
13283         (get_vtt_name): New function.
13284         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
13285         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
13286         when a virtual base becomes primary.
13287         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
13288         VTTs.
13289         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
13290         additional parameters.
13291         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
13292         (initialize_array): New function.
13293         (build_vtt): Likewise.
13294         (build_vtt_inits): Likewise.
13295         (dfs_build_vtt_inits): Likewise.
13296         (dfs_fixup_binfo_vtbls): Likewise.
13297         (build_ctor_vtbl_group): Likewise.
13298         (initialize_vtable): Use initialize_array.
13299         (accumulate_vtbl_inits): Reimplement to handle construction
13300         vtables.
13301         (dfs_accumulate_vtbl_inits): Likewise.
13302         (bulid_vtbl_initializer): Adjust parameter name.
13303         * method.c (build_typename_overload): Remove #if 0'd code.
13304         (get_ctor_vtbl_name): New function.
13305         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
13306         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
13307
13308         * cp-tree.h (struct lang_type): Remove search_slot.
13309         (CLASSTYPE_SEARCH_SLOT): Remove.
13310         (emit_base_init): Change prototype.
13311         (initialize_vtbl_ptrs): Likewise.
13312         (expand_indirect_vtbls_init): Likewise.
13313         (clear_search_slots): Remove.
13314         * decl.c (lang_mark_tree): Don't mark search_slot.
13315         * init.c (initialize_vtbl_ptrs): Simplify.
13316         (emit_base_init): Likewise.
13317         * search.c (struct vbase_info): Document decl_ptr.
13318         (convert_pointer_to_single_level): Remove.
13319         (dfs_find_vbases): Remove.
13320         (dfs_init_base_pointers): Simplify.
13321         (dfs_clear_vbase_slots): Remove.
13322         (dfs_vtable_path_unmark): New function.
13323         (init_vbase_pointers): Simplify.
13324         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
13325         (expand_indirect_vtbls_init): Simplify.  Don't call
13326         mark_all_temps_used.
13327         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
13328         initialize_vtbl_ptrs.
13329
13330 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
13331
13332         * except.c: Add static prototypes.
13333
13334 2000-05-20  H.J. Lu  <hjl@gnu.org>
13335
13336         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
13337
13338 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
13339
13340         Don't create a separate copy of virtual bases for the
13341         CLASSTYPE_VBASECLASSES list.
13342         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
13343         (BINFO_FOR_VBASE): Remove.
13344         (CANONICAL_BINFO): Adjust.
13345         (binfo_for_vbase): New function.
13346         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
13347         instead of BINFO_FOR_VBASE.
13348         (build_vbase_pointer): Likewise.
13349         (build_secondary_vtable): Likewise.
13350         (dfs_mark_primary_bases): Likewise.
13351         (mark_primary_bases): Likewise.
13352         (layout_nonempty_base_or_field): Likewise.
13353         (dfs_set_offset_for_shared_vbases): Likewise.
13354         (dfs_set_offset_for_unshared_vbases): Likewise.
13355         (layout_virtual_bases): Likewise.  Adjust for changes to the
13356         CLASSTYPE_VBASECLASSES list.
13357         (dump_class_hierarchy_r): Use binfo_for_vbase
13358         instead of BINFO_FOR_VBASE.
13359         (dump_class_hierarchy): Likewise.
13360         (finish_vtbls): Likewise.
13361         (build_vtbl_initializer): Adjust for changes to the
13362         CLASSTYPE_VBASECLASSES list.
13363         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
13364         * decl.c (finish_destructor_body): Adjust for changes to the
13365         CLASSTYPE_VBASECLASSES list.
13366         * init.c (sort_base_init): Use binfo_for_vbase.
13367         (construct_virtual_bases): Adjust for changes to the
13368         CLASSTYPE_VBASECLASSES list.
13369         (expand_member_init): Use binfo_for_vbase.
13370         (build_vbase_delete):  Adjust for changes to the
13371         CLASSTYPE_VBASECLASSES list.
13372         * method.c (do_build_copy_constructor): Likewise.
13373         * rtti.c (get_base_offset): Use binfo_for_vbase.
13374         (expand_class_desc): Remove #if 0'd code.
13375         * search.c (struct vbase_info): Remove vbase_types.
13376         (get_base_distance):  Use binfo_for_vbase.
13377         (lookup_field_queue_p): Use CANONICAL_BINFO.
13378         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
13379         (get_pure_virtuals): Adjust for changes to the
13380         CLASSTYPE_VBASECLASSES list.
13381         (dfs_find_vbases): Use binfo_for_vbase.
13382         (dfs_init_vbase_pointers): Likewise.
13383         (init_vbase_pointers): Don't initialize vi.vbase_types.
13384         (virtual_context): Use binfo_for_vbase.
13385         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
13386         CLASSTYPE_VBASECLASSES list.
13387         (expand_indirect_vtbls_init): Simplify.
13388         (dfs_get_vbase_types): Don't replicate virtual bases.
13389         (find_vbase_instance): Use binfo_for_vbase.
13390         (binfo_for_vbase): New function.
13391         * typeck.c (get_delta_difference): Use binfo_for_vbase.
13392
13393 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
13394
13395         * decl2.c (finish_anon_union): Generalize error messages to handle
13396         anonymous structures.
13397         * init.c (perform_member_init): Remove `name' parameter.
13398         (build_field_list): New function.
13399         (sort_member_init): Handle anonymous union initialization order
13400         correctly.  Check for multiple initializations of the same union.
13401         (emit_base_init): Don't look up fields by name here.
13402         (expand_member_init): Record the result of name lookup for future
13403         reference.
13404         * typeck.c (build_component_ref): Fix formatting.
13405
13406 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
13407
13408         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
13409         * typeck.c (build_x_compound_expr): Replace warn_unused with
13410         warn_unused_value.
13411
13412         * decl2.c (lang_decode_option): Update -Wall unused flags by
13413         calling set_Wunused.
13414
13415 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
13416
13417         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
13418         * init.c (dfs_vtable_path_unmark): Remove.
13419         * search.c (marked_new_vtable_p): Likewise.
13420         (unmarked_new_vtable_p): Likewise.
13421         (dfs_search_slot_nonempty_p): Likewise.
13422         (dfs_mark): Likewise.
13423         (dfs_vtable_path_unmark): Likewise.
13424         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
13425         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
13426         (dfs_init_vbase_pointers): Remove special-case new ABI code.
13427         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
13428         (init_vbase_pointers): Simplify.
13429         (expand_indirect_vtbls_init): Likewise.
13430
13431         * class.c (copy_virtuals): New function.
13432         (build_primary_table): Use it.
13433         (build_secondary_vtable): Likewise.
13434         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
13435         indicate that no vcall offset is required.
13436         (add_virtual_function): Likewise.
13437         (modify_all_vtables): Likewise.
13438         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
13439         (dfs_accumulate_vtbl_inits): Likewise.
13440         (build_vtbl_initializer): Make changes to handle construction
13441         vtables.
13442         (dfs_build_vcall_offset_vtbl_entries): Likewise.
13443         (build_rtti_vtbl_entries): Likewise.
13444         (build_vtable_entries): Handle a NULL vcall_index.
13445
13446 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
13447
13448         * decl2.c (lang_decode_option): Fix thinko.
13449
13450 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
13451
13452         * except.c (check_handlers): New fn.
13453         * cp-tree.h: Declare it.
13454         * semantics.c (finish_handler_sequence): Call it.
13455         (finish_function_handler_sequence): Likewise.
13456         (finish_handler_parms): Set TREE_TYPE on the handler.
13457         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
13458         * search.c (get_base_distance_recursive): If protect>1, ignore
13459         special access.
13460         (get_base_distance): Don't reduce watch_access.
13461
13462 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
13463
13464         * lex.c: #include diagnostic.h.
13465         (lang_init_options): Set default prefixing rules.
13466
13467         * lang-options.h: Add -fdiagnostics-show-location=.
13468
13469         * decl2.c: #include diagnostic.h.
13470         (lang_decode_option): Handle -fdiagnostics-show-location=.
13471
13472 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
13473
13474         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
13475         * vec.cc: Revert my 2000-05-07 change.
13476
13477 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
13478
13479         * class.c (check_field_decls): Complain about non-static data
13480         members with same name as class in class with constructor.
13481
13482 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
13483
13484         * decl.c (grokdeclarator): Allow non-static data members with
13485         same name as class.
13486
13487 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
13488
13489         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
13490         and pending_inline.filename.  Update prototypes.
13491         * decl.c (define_label): Constify filename parameter.
13492         * decl2.c (warn_if_unknown_interface): Constify local char *.
13493         * input.c Constify input_source.filename. Don't declare
13494         input_filename or lineno.  Constify filename parameter to feed_input.
13495         * lex.c (init_parse): Constify parameter and return value.
13496         (cp_pragma_interface, cp_pragma_implementation): Constify
13497         filename argument.
13498         (reinit_parse_for_method, reinit_parse_for_block,
13499         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
13500         Constify local char *.
13501         * pt.c: Don't declare lineno or input_filename.
13502         (print_template_context, tsubst_friend_function, tsubst_decl,
13503         tsubst, instantiate_decl): Constify local char *.
13504         * semantics.c (expand_body): Constify local char *.
13505         * tree.c (build_srcloc): Constify filename parameter.
13506         * typeck.c (c_expand_asm_operands): Constify filename
13507         parameter.
13508
13509 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
13510
13511         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
13512         offsetof expansion.
13513
13514 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
13515
13516         * inc/cxxabi.h:  Fix typos in comment.
13517         (__base_class_info::__offset): Use a static_cast.
13518
13519 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
13520
13521         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
13522         of std::size_t and std::ptrdiff_t respectively.
13523         * tinfo.cc: Likewise.
13524         * vec.cc: Likewise.
13525
13526 2000-05-06  Richard Henderson  <rth@cygnus.com>
13527
13528         * typeck.c (build_c_cast): Don't warn integer->pointer size
13529         mismatch for constants.
13530
13531 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
13532
13533         * rtti.c (ptmd_initializer): Set non-public, if class is
13534         incomplete.
13535
13536         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
13537         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13538         __cxa_vec_delete): Likewise.
13539         * tinfo.cc (__dynamic_cast): Likewise.
13540         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13541         __cxa_vec_delete): Likewise.
13542
13543 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
13544
13545         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
13546         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
13547         (lang_decl_flags): Add vcall_offset.
13548         (THUNK_VCALL_OFFSET): Use it.
13549         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
13550         * method.c (make_thunk): Create the lang_decl here, not in
13551         emit_thunk.
13552         (emit_thunk): Make generic thunks into ordinary functions once
13553         they have been fed to expand_body.
13554         * semantics.c (expand_body): Set current_function_is_thunk here.
13555
13556 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13557
13558         * class.c (update_vtable_entry_for_fn): Prototype.
13559
13560         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
13561         and `tmpl'.
13562
13563         * search.c (dfs_build_inheritance_graph_order): Prototype.
13564
13565 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
13566
13567         * cp-tree.h (special_function_kind): Add various kinds of
13568         destructors.
13569         (special_function_p): New function.
13570         * class.c (overrides): Don't let one kind of destructor override
13571         another.
13572         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
13573         whether or not to instantiate a template.
13574         * tree.c (special_function_p): Define.
13575
13576 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
13577
13578         * cp-tree.def (THUNK_DECL): Remove.
13579         * cp-tree.h (DECL_THUNK_P): New macro.
13580         (DECL_NON_THUNK_FUNCTION_P): Likewise.
13581         (DECL_EXTERN_C_FUNCTION_P): Likewise.
13582         (SET_DECL_THUNK_P): Likewise.
13583         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
13584         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
13585         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
13586         * decl.c (decls_match): Use DECL_EXTERN_C_P.
13587         (duplicate_decls): Likewise.
13588         (pushdecl): Likewise.  Adjust thunk handling.
13589         (grokfndecl): Use DECL_EXTERN_C_P.
13590         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
13591         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
13592         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
13593         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
13594         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
13595         DECL_NO_STATIC_CHAIN.
13596         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
13597         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
13598         * search.c (covariant_return_p): Remove THUNK_DECL handling.
13599         * ir.texi: Update.
13600
13601 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
13602
13603         * tree.c (walk_tree): Set lineno.
13604
13605 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
13606
13607         * exception.cc: Update license notice.
13608         * new.cc: Likewise.
13609         * new1.cc: Likewise.
13610         * new2.cc: Likewise.
13611         * tinfo.cc: Likewise.
13612         * tinfo2.cc: Likewise.
13613         * vec.cc: Likewise.
13614         * inc/cxxabi.h: Likewise.
13615         * inc/exception: Likewise.
13616         * inc/new: Likewise.
13617         * inc/new.h: Likewise.
13618         * inc/typeinfo: Likewise.
13619
13620 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
13621
13622         * tree.c (build_target_expr_with_type): If we already have a
13623         TARGET_EXPR, just return it.
13624
13625         * optimize.c (initialize_inlined_parameters): Don't generate an
13626         EXPR_STMT if we can just use DECL_INITIAL.
13627         * decl.c (emit_local_var): Only make the initialization a
13628         full-expression if stmts_are_full_exprs_p.
13629
13630 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
13631
13632         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
13633         macro.
13634         * call.c (standard_conversion): Use it.
13635         (direct_reference_binding): Likewise.
13636         (build_over_call): Likewise.
13637         (is_properly_derived_from): Likewise.
13638         (compare_ics): Likewise.
13639         * class.c (resolves_to_fixed_type_p): Likewise.
13640         * optimize.c (declare_return_variable): Likewise.
13641         * pt.c (is_specialization_of): Likewise.
13642         (unify): Likewise.
13643         * typeck.c (comp_target_parms): Likeiwse.
13644         (build_static_cast): Likewise.
13645         (build_reinterpret_cast): Likewise.
13646         (build_const_cast): Likewise.
13647         (comp_ptr_ttypes_real): Likewise.
13648         (comp_ptr_ttypes_const): Likewise.
13649         * typeck2.c (process_init_constructor): Likewise.
13650
13651 2000-04-30  Scott Snyder <snyder@fnal.gov>
13652
13653         * decl.c (finish_destructor_body): Use the base destructor when
13654         destroying virtual bases.
13655
13656 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
13657
13658         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
13659         STMT_EXPRs.
13660         * optimize.c (struct inline_data): Add target_exprs field.
13661         (declare_return_variable): When a function returns an aggregate,
13662         use the variable declared in the TARGET_EXPR as the remapped
13663         DECL_RESULT.
13664         (expand_call_inline): Update the pending target_exprs stack.
13665         (optimize_function): Initialize the stack.
13666
13667         * decl2.c (finish_file): Fix typo in comment.
13668
13669         * method.c (emit_thunk): Don't try to return a `void' value.
13670
13671         * optimize.c (initialize_inlined_parameters): If the parameter is
13672         addressable, we need to make a new VAR_DECL, even if the
13673         initializer is constant.
13674
13675 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
13676
13677         * decl.c (grok_op_properties): Add an extra check of argtypes.
13678
13679 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
13680
13681         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
13682         variables.
13683         (initialize_inlined_parameters): Try to avoid creating new
13684         VAR_DECLs.
13685
13686 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
13687
13688         * lex.c (my_get_run_time): Remove.
13689         (init_filename_times): Use get_run_time instead of my_get_run_time.
13690         (check_newline): Likewise.
13691         (dump_time_statistics): Likewise.
13692         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
13693         of computing elapsed time explicitly.
13694
13695 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
13696
13697         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
13698         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
13699         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
13700         before calling decl_constant_value.
13701         * class.c (check_bitfield_decl): Likewise.
13702         * cvt.c (ocp_convert): Likewise.
13703         (convert): Likewise.
13704         * decl.c (compute_array_index_type): Likewise.
13705         (build_enumerator): Likewise.
13706         * decl2.c (check_cp_case_value): Likewise.
13707         * pt.c (convert_nontype_argument): Likewise.
13708         (tsubst): Likewise.
13709         * typeck.c (decay_conversion): Likewise.
13710         (build_compound_expr): Likewise.
13711         (build_reinterpret_cast): Likewise.
13712         (build_c_cast): Likewise.
13713         (convert_for_assignment): Likewise.
13714
13715 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
13716
13717         * decl.c (finish_function): Don't play games with DECL_INLINE.
13718
13719 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
13720
13721         * ir.texi: Correct typo.
13722
13723 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13724
13725         * decl.c (grokdeclarator): Reject VLAs as members.
13726
13727 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
13728
13729         * call.c (standard_conversion): Accept conversion between
13730         COMPLEX_TYPEs.
13731
13732         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
13733
13734 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
13735
13736         * decl2.c (finish_file): Remove double setup for accounting
13737         compile time.
13738
13739 2000-04-24  Robert Lipe <robertlipe@usa.net>
13740
13741         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
13742
13743 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
13744
13745         * new.cc (set_new_handler): Needs to be in std::.
13746
13747 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
13748
13749         * cp-tree.h (lang_decl): Remove pretty_function_p.
13750         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
13751         language-specific node.
13752         * decl.c (cp_make_fname_decl): Use build_decl, not
13753         build_lang_decl, to build the variables.
13754         (grokvardecl): Don't call build_lang_decl for local variables in
13755         templates.
13756         (grokdeclarator): Don't call build_lang_decl for local type
13757         declarations in templates.
13758         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
13759         zero'd memory, rather than calling memset.
13760         * pt.c: Include hashtab.h.
13761         (local_specializations): New variable.
13762         (retrieve_local_specialization): Use it.
13763         (register_local_specialization): Likewise.
13764         (tsubst_decl): Don't assume local variables have
13765         DECL_LANG_SPECIFIC.
13766         (instantiate_decl): Set up local_specializations.
13767         * Makefile.in (HTAB_H): New variable.
13768
13769 2000-04-23  Richard Henderson  <rth@cygnus.com>
13770
13771         * typeck.c (c_expand_asm_operands): Restore the original
13772         contents of the output list.
13773
13774 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
13775
13776         * ir.texi:  Document complex number representation.
13777
13778 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13779
13780         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
13781         (target_incomplete_p): New function.
13782         (tinfo_base_init): Create comdat NTBS name variable.
13783         (ptr_initializer): Add non_public parameter. Calculate it.
13784         (ptmd_initializer): Likewise.
13785         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
13786         (create_real_tinfo_var): Add non_public parameter. Use it.
13787         Push proxy into global namespace.
13788         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
13789         New enumeration.
13790         * inc/typeinfo (type_info::before, type_info::operator==):
13791         Compare __name addresses.
13792
13793         * tinfo2.cc: Remove new-abi builtins comment.
13794
13795 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
13796
13797         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
13798
13799         * call.c (joust): Exit early if we get the same function, too.
13800
13801         * decl2.c (key_method): Return NULL_TREE for template classes.
13802         (import_export_class): Don't need to check for template classes.
13803
13804 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
13805
13806         * lex.c: Remove references to cccp.c.
13807
13808 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
13809
13810         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
13811         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
13812         (DECL_DESTRUCTOR_P): Use destructor_attr.
13813         (DECL_CONST_MEMFUNC_P): Reimplement.
13814         (DECL_VOLATILE_MEMFUNC_P): Remove.
13815         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
13816         (overrides): Use DECL_DESTRUCTOR_P.
13817         (check_for_override): Likewise.
13818         * decl.c (start_function): Likewise.
13819         * decl2.c (grokfclassfn): Likewise.
13820         (check_classfn): Likewise.
13821         (grok_function_init): Likewise.
13822
13823 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
13824
13825         * decl2.c (grokfield): Issue error on illegal data member
13826         declaration.
13827
13828 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
13829
13830         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
13831
13832 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
13833
13834         * class.c (build_vtable_entry): Don't build thunks for type-info
13835         functions.
13836
13837 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
13838
13839         * decl.c (decls_match): Allow a redeclaration of a builtin to
13840         specify args while the builtin did not.
13841
13842 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
13843
13844         * cp-tree.def (THUNK_DECL): Add to documentation.
13845         * cp-tree.h (flag_huge_objects): Declare.
13846         * class.c (modify_vtable_entry): Tidy.
13847         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
13848         Calculate delta appropriately for the new ABI.
13849         (dfs_modify_vtables): Use it.
13850         (modify_all_vtables): Fix thinko in code to add overriding copies
13851         of functions to primary vtables.
13852         (build_clone): Fix typo in comment.
13853         (clone_function_decl): Correct order of destructors in vtable.
13854         (build_vbase_offset_vtbl_entries): Adjust comment.
13855         (dfs_vcall_offset_queue_p): Remove.
13856         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
13857         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
13858         (build_vtable_entry): Correct check for pure virtual functions.
13859         Don't declare flag_huge_objects.
13860         * decl.c (flag_huge_objects): Remove declaration.
13861         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
13862         Use int_size_in_bytes.
13863         (emit_thunk): Handle vcall offset thunks.
13864
13865 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13866
13867         * decl2.c (parse_time, varconst_time): Delete declarations.
13868         (finish_file): Delete LINENO declaration.
13869         START_TIME and THIS_TIME now long.
13870
13871 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
13872
13873         * class.c (build_base_field): Reformat comment.
13874
13875         * inc/cxxabi.h (stddef.h): Comment inclusion.
13876         (__base_class_info::__offset): Comment shift.
13877
13878 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
13879
13880         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
13881         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
13882         (cp_push_exception_identifier): New macro.
13883         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
13884         (DECL_BASE_DESTRUCTOR_P): Likewise.
13885         (DECL_DELETING_DESTRUCTOR_P): Likewise.
13886         (get_vtbl_decl_for_binfo): Fix formatting.
13887         (in_charge_arg_for_name): New macro.
13888         (maybe_build_cleanup_and_delete): Remove declaration.
13889         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
13890         (in_charge_arg_for_name): New function.
13891         (build_new_method_call): Use it.  Handle cloned destructors.
13892         (build_clone): Don't make the base constructor virtual.
13893         Automatically defer generated functions.
13894         (clone_function_decl): Handle destructors, too.
13895         (clone_constructors_and_destructors): Likewise.
13896         (create_vtable_ptr): Don't create a vtable entry for a cloned
13897         function.
13898         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
13899         (initialize_predefined_identifiers): Update appropriately.
13900         (finish_destructor_body): Simplify.
13901         (maybe_build_cleanup_and_delete): Remove.
13902         * except.c (expand_throw): Handle new-ABI destructors.
13903         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
13904         (build_dtor_call): New function.
13905         (build_delete): Use it.  Simplify.
13906         * optimize.c (maybe_clone_body): Handle destructors.
13907         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
13908
13909         * exception.cc (cleanup_fn): New typedef.
13910         (CALL_CLEANUP): New macro.
13911         (cp_eh_info): Use them.
13912         (__cp_push_exception): Likewise.
13913         (__cp_pop_exception): Likewise.
13914
13915 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
13916
13917         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
13918         (complete_dtor_identifier): New macro.
13919         (CLASSTYPE_FIRST_CONVERSION): Remove.
13920         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
13921         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
13922         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
13923         (CLASSTYPE_CONSTRUCTORS): Likewise.
13924         (CLASSTYPE_DESTRUCTORS): Likewise.
13925         (lang_decl): Add cloned_function.
13926         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
13927         (DECL_BASE_CONSTRUCTOR_P): Likewise.
13928         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
13929         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
13930         (DECL_CLONED_FUNCTION_P): Likewise.
13931         (DECL_CLONED_FUNCTION): Likewise.
13932         (clone_function_decl): Declare.
13933         (maybe_clone_body): Likewise.
13934         * call.c (build_user_type_conversion_1): Call complete object
13935         constructors in the new ABI.
13936         (build_new_method_call): Don't add in-charge parameters under the
13937         new ABI.
13938         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
13939         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
13940         CLASSTYPE_DESTRUCTOR_SLOT.
13941         (build_clone): New function.
13942         (clone_function_decl): Likewise.
13943         (clone_constructors_and_destructors): Likewise.
13944         (check_bases_and_members): Use it.
13945         * decl.c (iniitialize_predefined_identifiers): Initialize
13946         complete_dtor_identifier.
13947         (finish_function): Don't add extra code to a clone.
13948         (lang_mark_tree): Mark cloned_function.
13949         * decl2.c (mark_used): Don't bother trying to instantiate things
13950         we synthesized.
13951         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
13952         * method.c (set_mangled_name_for_decl): Don't treat clones as
13953         constructors.
13954         (synthesize_method): Sythesize cloned functions, not the clones.
13955         * optimize.c (inline_data): Update comment on ret_label.
13956         (remap_block): Don't assume DECL_INITIAL exists.
13957         (copy_body_r): Allow ret_label to be NULL.
13958         (maybe_clone_body): Define.
13959         * pt.c (tsubst_decl): Handle clones.
13960         (instantiate_clone): New function.
13961         (instantiate_template): Use it.
13962         (set_mangled_name_for_template_decl): Don't treat clones as
13963         constructors.
13964         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
13965         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
13966         * semantics.c (expand_body): Clone function bodies as necessary.
13967
13968         * optimize.c (remap_decl): Avoid sharing structure for arrays
13969         whose size is only known at run-time.
13970         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
13971
13972         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
13973         to has_in_charge_parm_p.
13974         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
13975         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
13976         (DECL_COPY_CONSTRUCTOR_P): New macro.
13977         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
13978         (build_user_type_conversion_1): Likewise.
13979         (convert_like_real): Likewise.
13980         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
13981         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
13982         (copy_args_p): Likewise.
13983         (grok_ctor_properties): Likewise.
13984         (start_function): Likewise.
13985         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
13986         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
13987         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
13988         * method.c (do_build_copy_constructor): Use
13989         DECL_HAS_IN_CHARGE_PARM_P.
13990         (synthesize_method): Likewise.
13991         * pt.c (instantiate_template): Remove goto.
13992         * tree.c (build_cplus_method_type): Remove mention of obstacks in
13993         comment.
13994
13995         * cp-tre.h (finish_function): Change prototype.
13996         * decl.c (end_cleanup_fn): Adjust caller.
13997         (finish_function): Take only one parameter.
13998         * decl2.c (finish_objects): Adjust caller.
13999         (finish_static_storage_duration_function): Likewise.
14000         * method.c (emit_thunk): Likewise.
14001         * parse.y: Likewise.
14002         * parse.c: Regenerated.
14003         * pt.c (instantiate_decl): Likewise.
14004         * rtti.c (synthesize_tinfo_fn): Likewise.
14005         * semantics.c (expand_body): Likewise.
14006
14007         * cp-tree.h (copy_decl): New function.
14008         * class.c (finish_struct_1): Use it.
14009         * lex.c (copy_decl): Define it.
14010         * pt.c (tsubst_decl): Likewise.
14011         * tree.c (copy_template_template_parm): Likewise.
14012
14013         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
14014         has_nonpublic_assign_ref.
14015         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
14016         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
14017         * class.c (finish_struct_methods): Don't set
14018         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
14019         (interface_only): Don't declare.
14020         (interface_unknown): Likewise.
14021
14022 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14023
14024         * tree.h (HAVE_TEMPLATES): Remove definition.
14025         * lang-options.h (-fthis-is-variable): Remove documentation.
14026
14027 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
14028
14029         * class.c (instantiate_type): Handle object-relative template-id.
14030
14031         * semantics.c (finish_expr_stmt): Call convert_to_void here.
14032         * decl.c (cplus_expand_expr_stmt): Not here.
14033
14034         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
14035         Initialize exprtype earlier.
14036
14037         * parse.y (fn.def1): Check for defining types in return types.
14038
14039         * decl.c (check_tag_decl): Notice extra fundamental types.
14040         Diagnose empty decls in classes, too.
14041
14042         * decl.c (grokdeclarator): Don't override an anonymous name if no
14043         declarator was given.
14044
14045         * cvt.c (convert_to_void): Call resolve_offset_ref.
14046
14047         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
14048
14049         * decl2.c (decl_namespace): Handle getting a type.
14050
14051         * typeck.c (build_c_cast): Re-enable warning for cast between
14052         pointer and integer of different size.
14053
14054 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
14055
14056         * inc/cxxabi.h (__pointer_type_info): Add restrict and
14057         incomplete flags.
14058         (__pointer_type_info::__pointer_catch): New virtual function.
14059         (__pointer_to_member_type_info): Derive from
14060         __pointer_type_info. Adjust.
14061         (__pointer_to_member_type_info::__do_catch): Remove.
14062         (__pointer_to_member_type_info::__is_pointer_p): Declare.
14063         (__pointer_to_member_type_info::__pointer_catch): Declare.
14064         * rtti.c (qualifier_flags): Add restrict flag.
14065         (ptmd_initializer): Reorder members.
14066         (create_tinfo_types): Expand comments. Reorder
14067         ptmd_desc_type_node members.
14068         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
14069         Implement.
14070         (__pointer_type_info::__do_catch): Move specific code into
14071         __pointer_catch. Call it.
14072         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
14073         specific catch checking. Fix void conversion check.
14074         (__pointer_to_member_type_info::__do_catch): Remove.
14075         (__pointer_to_member_type_info::__pointer_catch): Implement.
14076
14077 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14078
14079         * lex.c (init_parse): Remove traces of classof and headof.
14080         * decl2.c (flag_operator_names): Default to 1.
14081         (lang_decode_option): Do not set it for -ansi.
14082
14083 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
14084
14085         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
14086         (DECL_MAIN_VARIANT): Remove.
14087         * decl.c (duplicate_decls): Don't set it.
14088         (start_function): Likewise.
14089         (lang_mark_tree): Don't mark it.
14090         * decl2.c (defer_fn): Don't use it.
14091         * lex.c (retrofit_lang_decl): Don't set it.
14092         * pt.c (tsubst_decl): Likewise.
14093         * ptree.c (print_lang_decl): Don't print it.
14094         * typeck.c (mark_addressable): Don't use it.
14095
14096 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
14097
14098         * vec.cc: Include <new> and <exception>.
14099         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
14100         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
14101         terminate.
14102         (__cxa_vec_delete): Catch dtor exceptions.
14103
14104 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
14105
14106         Prepend __ to implementation defined names.
14107         * inc/typeinfo (type_info): Rename _name to __name.
14108         (type_info::type_info): Rename parameter.
14109         (type_info::operator==, type_info::operator!=,
14110         type_info::before): Likewise.
14111         (type_info::is_pointer_p, type_info::is_function_p,
14112         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
14113         parameters.
14114         * inc/cxxabi.h
14115         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
14116         (__pointer_type_info::__pointer_type_info): Likewise.
14117         (__pointer_type_info::is_pointer_p,
14118         __pointer_type_info::do_catch): Prepend __. Rename parameters.
14119         (__array_type_info::__array_type_info): Rename parameters.
14120         (__function_type_info::__function_type_info): Likewise.
14121         (__function_type_info::is_function_p): Prepend __.
14122         (__enum_type_info::__enum_type_info): Rename parameters.
14123         (__pointer_to_member_type_info::__pointer_to_member_type_info):
14124         Likewise.
14125         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
14126         parameters.
14127         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
14128         (__class_type_info::__class_type_info): Rename parameters.
14129         (__class_type_info::sub_kind): Prepend __. Adjust member names.
14130         (__class_type_info::upcast_result,
14131         __class_type_info::dyncast_result): Prepend __. Move definition
14132         into tinfo.cc.
14133         (__class_type_info::do_upcast, __class_type_info::do_catch,
14134         __class_type_info::find_public_src,
14135         __class_type_info::do_dyncast,
14136         __class_type_info::do_find_public_src): Prepend __. Rename
14137         parameters.
14138         (__si_class_type_info::__si_class_type_info): Rename parameters.
14139         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
14140         __si_class_type_info::do_find_public_src): Prepent __. Rename
14141         parameters.
14142         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
14143         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
14144         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
14145         parameters.
14146         (__dynamic_cast): Rename parameters.
14147         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
14148         type_info::do_catch, type_info::do_upcast): Prepend __.
14149         (contained_p, public_p, virtual_p, contained_public_p,
14150         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
14151         (__class_type_info::do_catch,
14152         __class_type_info::do_upcast): Prepend __. Adjust.
14153         (__class_type_info::__upcast_result,
14154         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
14155         Adjust.
14156         (__class_type_info::find_public_src): Prepend __. Adjust.
14157         (__class_type_info::do_find_public_src,
14158         __si_class_type_info::do_find_public_src,
14159         __vmi_class_type_info::do_find_public_src): Likewise.
14160         (__class_type_info::do_dyncast,
14161         __si_class_type_info::do_dyncast,
14162         __vmi_class_type_info::do_dyncast): Likewise.
14163         (__class_type_info::do_upcast,
14164         __si_class_type_info::do_upcast,
14165         __vmi_class_type_info::do_upcast): Likewise.
14166         (__dynamic_cast): Adjust.
14167         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
14168         (__function_type_info::is_function_p): Likewise.
14169         (__pointer_type_info::do_catch): Likewise. Adjust.
14170         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
14171         (__throw_type_match_rtti_2): Adjust.
14172         (__is_pointer): Adjust.
14173
14174 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
14175
14176         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
14177         (complete_ctor_identifier): New macro.
14178         (special_function_kind): Add sfk_copy_constructor and
14179         sfk_assignment_operator.
14180         (LOOKUP_HAS_IN_CHARGE): Remove.
14181         (cons_up_default_function): Rename to ...
14182         (implicitly_declare_fn): ... this.
14183         * call.c (build_new_method_call): Add in-charge parameters for
14184         constructors here.
14185         * class.c (add_implicitly_declared_members): Change parameter name
14186         from cant_have_assignment to cant_have_const_assignment.
14187         Replace calls to cons_up_default_function to implicitly_declare_fn.
14188         * cvt.c (ocp_convert): Use complete_ctor_identifier.
14189         * decl.c (initialize_predefined_identifiers): Initialize it.
14190         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
14191         complex expression.
14192         * init.c (expand_default_init): Don't calculate the in-charge
14193         parameter here.
14194         (build_new_1): Likewise.
14195         * lex.c (cons_up_default_function): Move to method.c.
14196         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
14197         (implicitly_declare_fn): New function.
14198         * typeck.c (build_static_cast): Use complete_ctor_identifier.
14199         (build_modify_expr): Likewise.
14200         * typeck2.c (build_functional_cast): Likewise.
14201
14202         Under the new ABI, constructors don't return `this'.
14203         * cp-tree.h (warn_reorder): Declare.
14204         (special_function_kind): New enum.
14205         (global_base_init_list): Remove declaration.
14206         (emit_base_init): Don't return a value.
14207         (check_base_init): Don't declare.
14208         (is_aggr_typedef): Likewise.
14209         * decl.c (check_special_function_return_type): New function.
14210         (return_types): Remove.
14211         (grokdeclarator): Use check_special_function_return_type.
14212         (start_function): Don't initialize ctor_label under the new ABI.
14213         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
14214         * init.c (begin_init_stmts): Move to top of file.
14215         (finish_init_stmts): Likewise.
14216         (warn_reorder): Don't declare.
14217         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
14218         value.
14219         (check_base_init): Remove.
14220         (is_aggr_typedef): Likewise.
14221         (build_new_1): Don't use the return value of a constructor.
14222         * semantics.c (setup_vtbl_ptr): Don't use the return value
14223         of emit_base_init.
14224         * typeck.c (check_return_expr): Don't magically convert return
14225         statements into `return this' in constructors under the new ABI.
14226
14227         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
14228         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
14229         (base_ctor_identifier): New macro.
14230         (base_dtor_identifier): Likewise.
14231         (deleting_dtor_identifier): Likewise.
14232         * decl.c: Don't include obstack.h.
14233         (obstack_chunk_alloc): Don't define.
14234         (obstack_chunk_free): Likewise.
14235         (struct predefined_identifier): New type.
14236         (initialize_predefined_identifiers): New function.
14237         (init_decl_processing): Use it.
14238         (debug_temp_inits): Remove.
14239         (start_method): Don't call preserve_data.
14240         (hack_incomplete_structures): Update comment.
14241         * init.c (init_init_processing): Don't initialize
14242         nelts_identifier.
14243         (build_offset_rf): Remove dead code.
14244         (build_delete): Use CLASSTYPE_N_BASECLASSES.
14245         * search.c (init_search_processing): Don't initialize
14246         vptr_identifier.
14247
14248 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14249
14250         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
14251         some sign_compare warnings.
14252
14253 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
14254
14255         Rename abi::__vmi_class_type_info members.
14256         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
14257         base_list, detail_masks members to vmi_flags, vmi_base_count,
14258         vmi_bases and vmi_flags_masks respectively.
14259         (__vmi_class_type_info::vmi_flags_masks): Rename
14260         details_unknown_mask to flags_unknown_mask.
14261         * tinfo.cc (__class_type_info::do_upcast): Adjust.
14262         (__vmi_class_type_info::do_find_public_src): Adjust.
14263         (__vmi_class_type_info::do_dyncast): Adjust.
14264         (__vmi_class_type_info::do_upcast): Adjust.
14265
14266 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
14267
14268         * tinfo.cc (convert_to_base): New function.
14269         (get_vbase_offset): Remove. Move into convert_to_base.
14270         (__vmi_class_type_info::do_find_public_src): Adjust.
14271         (__vmi_class_type_info::do_dyncast): Adjust.
14272         (__vmi_class_type_info::do_upcast): Adjust.
14273
14274 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
14275
14276         * tinfo.cc (operator=): Use __builtin_strcmp.
14277         * tinfo2.cc (before): Likewise.
14278
14279 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
14280
14281         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
14282         (DECL_SAVED_INLINE): Rename to ...
14283         (DECL_DEFERRED_FN): ... this.
14284         (in_function_p): Remove declaration.
14285         (mark_inline_for_output): Rename to ...
14286         (defer_fn): ... this.
14287         * decl.c (finish_function): Adjust call to mark_inline_for_output.
14288         (in_function_p): Remove definition.
14289         * decl2.c (saved_inlines): Rename to ...
14290         (deferred_fns): ... this.
14291         (saved_inlines_used): Rename to ...
14292         (deferred_fns_used): ... this.
14293         (mark_inline_for_output): Rename to ...
14294         (defer_fn): ... this.
14295         (finish_file): Adjust accordingly.
14296         (init_decl2): Likewise.
14297         * lex.c (cons_up_default_function): Likewise.
14298         * pt.c (mark_decl_instantiated): Likewise.
14299         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
14300         circumstances.
14301         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
14302         * semantics.c (expand_body): Defer more functions.
14303
14304 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
14305
14306         * vec.cc: New file.
14307         * Make-lang.in (CXX_LIB2FUNCS): Add it.
14308         (vec.o): Build it.
14309         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14310         __cxa_vec_delete): Declare.
14311
14312 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
14313
14314         * rtti.c (dfs_class_hint_mark): New static function.
14315         (dfs_class_hint_unmark): New static function.
14316         (class_hint_flags): Use them.
14317
14318 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
14319
14320         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
14321
14322 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
14323
14324         * cp-tree.h (instantiate_decl): Change prototype.
14325         * decl2.c (mark_used): Adjust call.
14326         * optimize.c (inlinable_function_p): Adjust handling of templates.
14327         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
14328         (do_type_instantiation): Likewise.
14329         (instantiate_decl): Defer more templates.
14330         (instantiate_pending_templates): Adjust logic to handle inline
14331         friend functions.
14332
14333         * Makefile.in (GGC_H): New variable.  Use it throughout in place
14334         of ggc.h.
14335
14336         * call.c: Don't include obstack.h.  Include ggc.h.
14337         (obstack_chunk_alloc): Don't define.
14338         (obstack_chunk_free): Likewise.
14339         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
14340         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
14341         (pop_switch): Free it.
14342
14343         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
14344
14345         * dump.c (dequeue_and_dump): Don't try to print the bit_position
14346         if we don't have a DECL_FIELD_OFFSET.
14347
14348 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
14349
14350         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
14351         special_function_p.
14352
14353 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14354
14355         * cfns.gperf (hash, libc_name_p): Prototype.
14356
14357         * rtti.c (build_dynamic_cast_1): Constification.
14358
14359         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
14360
14361         * semantics.c (deferred_type_access_control): Prototype.
14362
14363 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
14364
14365         Correct many new ABI issues regarding vbase and vcall offset
14366         layout.
14367         * cp-tree.h (BINFO_VTABLE): Document.
14368         (struct lang_type): Tweak formatting.
14369         (BINFO_PRIMARY_BINFO): Add to documentation.
14370         (CLASSTYPE_VSIZE): Fix typo in comment.
14371         (CLASSTYPE_VBASECLASSES): Update documentation.
14372         (BINFO_VBASE_MARKED): Remove.
14373         (SET_BINFO_VBASE_MARKED): Likewise.
14374         (CLEAR_BINFO_VBASE_MARKED): Likewise.
14375         (BINFO_FIELDS_MARKED): Remove.
14376         (SET_BINFO_FIELDS_MARKED): Likewise.
14377         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
14378         (enum access_kind): New enumeration.
14379         (num_extra_vtbl_entries): Remove declaration.
14380         (size_extra_vtbl_entries): Likewise.
14381         (get_vtbl_decl_for_binfo): New function.
14382         (dfs_vbase_unmark): Remove declaration.
14383         (mark_primary_bases): Likewise.
14384         * class.c (SAME_FN): Remove.
14385         (struct vcall_offset_data_s): Move definition.
14386         (build_vbase_pointer): Use `build', not `build_binary_op', to
14387         access the vbase pointer under the new ABI.
14388         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
14389         (build_primary_vtable): Likewise.
14390         (dfs_mark_primary_bases): Move here from search.c.
14391         (mark_primary_bases): Likewise.
14392         (determine_primary_bases): Under the new ABI, don't make a base
14393         class a primary base just because we don't yet have any virtual
14394         functions.
14395         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
14396         (num_vfun_entries): Remove.
14397         (dfs_count_virtuals): Likewise.
14398         (num_extra_vtbl_entries): Likewise.
14399         (size_extra_vtbl_entries): Likewise.
14400         (layout_virtual_bases): Iterate in inheritance graph order under
14401         the new ABI.
14402         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
14403         indicate that a vfield is present.
14404         (init_class_processing): Initialize access_public_node, etc., from
14405         ak_public, etc.
14406         (get_vtbl_decl_for_binfo): New function.
14407         (dump_class_hierarchy_r): Likewise.
14408         (dump_class_hierarchy): Use it.
14409         (finish_vtbls): Build the vtbls in inheritance graph order.
14410         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14411         (initialize_vtable): Use get_vtbl_decl_for_binfo.
14412         (accumulate_vtbl_inits): Add comments explaining why a pre-order
14413         walk is required.
14414         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
14415         where the vptr points, even for primary vtables.
14416         (build_vtbl_initializer): Adjust handling of vbase and vcall
14417         offsets.
14418         (build_vcall_and_vbase_vtable_entries): New function.
14419         (dfs_build_vbase_offset_vtbl_entries): Remove.
14420         (build_vbase_offset_vtbl_entries): Reimplement.
14421         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
14422         were already handled in a primary base class vtable.
14423         (build_vcall_offset_vtbl_entries): Adjust.
14424         (build_rtti_vtbl_entries): Adjust.
14425         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
14426         * init.c (expand_virtual_init): Simplify.
14427         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
14428         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
14429         * search.c (BINFO_ACCESS): New macro.
14430         (SET_BINFO_ACCESS): Likewise.
14431         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
14432         (access_in_type): Likewise.
14433         (dfs_accessible_p): Likewise.
14434         (protected_accessible_p): Likewise.
14435         (lookup_fnfields_1): Adjust documentation.
14436         (dfs_mark_primary_bases): Move to class.c
14437         (mark_primary_bases): Likewise.
14438         (dfs_vbase_unmark): Remove.
14439         (virtual_context): Use BINFO_FOR_VBASE.
14440         (dfs_get_vbase_types): Simplify.
14441         (dfs_build_inheritance_graph_order): New function.
14442         (get_vbase_types): Use it.
14443         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
14444
14445         * tinfo.cc (get_vbase_offset): New function.
14446         (__vmi_class_type_info::do_find_public_src): Use it.
14447         (__vmi_class_type_info::do_dyncast): Likewise.
14448         (__vmi_class_type_info::do_upcast): Likewise.
14449
14450 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
14451
14452         * lang-specs.h: Pass -fno-show-column to the preprocessor.
14453
14454 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
14455
14456         * rtti.c (class_hint_flags): Rename flags.
14457         (class_initializer): Remove flags.
14458         (synthesize_tinfo_var): Combine offset and flags. Add flags
14459         for __vmi_class_type_info.
14460         (create_tinfo_types): Remove flags from __class_type_info and
14461         __si_class_type_info. Merge flags and offset from
14462         base_class_type_info.
14463         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
14464         (__base_class_info::is_virtual_p): Adjust.
14465         (__base_class_info::is_public_p): Adjust.
14466         (__base_class_info::offset): New accessor.
14467         (__class_type_info::details): Remove member.
14468         (__class_type_info::__class_type_info): Lose details.
14469         (__class_type_info::detail_masks): Remove.
14470         (__si_class_type_info::__si_class_type_info): Lose details.
14471         (__vmi_class_type_info::details): New member.
14472         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
14473         (__vmi_class_type_info::detail_masks): New member.
14474         * tinfo.cc (__class_type_info::do_upcast): Initialize result
14475         with unknown_details_mask.
14476         (__vmi_class_type_info::do_find_public_src): Adjust
14477         (__vmi_class_type_info::do_dyncast): Adjust.
14478         (__vmi_class_type_info::do_upcast): Set result details, if
14479         needed. Adjust.
14480         (__dynamic_cast): Temporarily #if out optimization.
14481
14482 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
14483
14484         * rtti.c (get_tinfo_decl): Mark used.
14485         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
14486         mark as dealt with, if we output it.
14487
14488 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
14489
14490         * class.c: Reorganize to put virtual function table initialization
14491         machinery at the end of the file.
14492
14493 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
14494
14495         * class.c (finish_struct): Use bitsize_zero_node.
14496         * pt.c (instantiate_class_template): Likewise.
14497
14498 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
14499
14500         Put RTTI entries at negative offsets in new ABI.
14501         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
14502         vbase offset at index -3, not -1.
14503         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
14504         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
14505         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
14506         (build_rtti_vtbl_entries): New function.
14507         (set_rtti_entry): Remove.
14508         (build_primary_vtable): Don't use it.
14509         (build_secondary_vtable): Likewise.
14510         (start_vtable): Remove.
14511         (first_vfun_index): New function.
14512         (set_vindex): Likewise.
14513         (add_virtual_function): Don't call start_vtable.  Do call
14514         set_vindex.
14515         (set_primary_base): Rename parameter.
14516         (determine_primary_base): Likewise.
14517         (num_vfun_entries): Don't use skip_rtti_stuff.
14518         (num_extra_vtbl_entries): Include RTTI information.
14519         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
14520         (skip_rtti_stuff): Remove.
14521         (dfs_modify_vtables): Don't use it.
14522         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
14523         (layout_nonempty_base_or_field): Update size handling.
14524         (create_vtable_ptr): Tweak.
14525         (layout_class_type): Adjust parameter names.
14526         (finish_struct_1): Simplify.
14527         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
14528         (skip_rtti_stuff): Remove.
14529         (first_vfun_index): New function.
14530         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
14531         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
14532         (marked_vtable_pathp): Declare.
14533         (unmarked_vtable_pathp): Likewise.
14534         * error.c (dump_expr): Use first_vfun_index to calculate vtable
14535         offsets.
14536         * rtti.c (build_headof): Look for RTTI at negative offsets.
14537         (get_tinfo_decl_dynamic): Likewise.
14538         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
14539         here.
14540         (create_pseudo_type_info): Do it here instead.  Adjust so that
14541         vptr points at first virtual function.
14542         * search.c (marked_vtable_pathp): Make it global.
14543         (unmarked_vtable_pathp): Likewise.
14544         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
14545         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
14546         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
14547         (get_pure_virtuals): Likewise.
14548         (expand_upcast_fixups): Likewise.
14549         * tree.c (debug_binfo): Likewise.
14550         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
14551         negative offset.
14552
14553 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14554
14555         * class.c (check_field_decl): Fix typo.
14556         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
14557         (check_methods): Likewise.
14558         (check_field_decls): Likewise.
14559         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
14560         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
14561         Use DECL_RESULT_FLD, not DECL_RESULT.
14562         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
14563         * lex.c (identifier_type): Likewise.
14564         * pt.c (determine_specialization, lookup_template_class): Likewise.
14565         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
14566         (resolve_overloaded_unification, more_specialized): Likewise.
14567         * semantics.c (finish_member_declaration): Likewise.
14568         * typeck.c (build_x_function_call): Likewise.
14569
14570 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
14571
14572         * class.c (layout_empty_base): Handle empty bases with non-byte
14573         alignment.
14574         (build_base_field): Likewise.
14575         (layout_virtual_bases): Likewise.
14576
14577         * class.c (finish_struct_1): Fix typo in this change:
14578
14579         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14580
14581 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
14582
14583         * decl.c (grokdeclarator): Count partial specializations when
14584         keeping track of how many template classes have been seen.
14585
14586         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
14587
14588 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14589
14590         * class.c (build_vbase_pointer_fields): layout_field now place_field.
14591         (get_vfield_offset): Use byte_position.
14592         (set_rtti_entry): Set OFFSET to ssizetype zero.
14593         (get_binfo_offset_as_int): Deleted.
14594         (dfs_record_base_offsets): Use tree_low_cst.
14595         (dfs_search_base_offsets): Likewise.
14596         (layout_nonempty_base_or_field): Reflect changes in RLI format
14597         and call byte_position.
14598         (layout_empty_base): Convert offset to ssizetype.
14599         (build_base_field): use rli_size_unit_so_far.
14600         (dfs_propagate_binfo_offsets): Do computation in proper type.
14601         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
14602         (layout_class_type): Reflect changes in RLI names and fields.
14603         (finish_struct_1): Set DECL_FIELD_OFFSET.
14604         * dump.c (dequeue_and_dump): Call bit_position.
14605         * expr.c (cplus_expand_constant): Use byte_position.
14606         * rtti.c (expand_class_desc): Use bitsize_one_node.
14607         * typeck.c (build_component_addr): Use byte_position and don't
14608         special case for zero offset.
14609
14610 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
14611
14612         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
14613
14614         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
14615         tinfo object.
14616         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
14617         vtable.
14618
14619 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14620
14621         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
14622         DECL_P macros.
14623         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
14624         make_typename_type, check_initializer, cp_finish_decl,
14625         xref_tag): Likewise.
14626         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
14627         decl_namespace, arg_assoc_template_arg, arg_assoc,
14628         validate_nonmember_using_decl, do_class_using_decl): Likewise.
14629         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
14630         args_to_string): Likewise.
14631         * friend.c (is_friend): Likewise.
14632         * lex.c (note_got_semicolon, note_list_got_semicolon,
14633         is_global): Likewise.
14634         * method.c (build_overload_nested_name, build_overload_value,
14635         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
14636         * parse.y (typename_sub, typename_sub1): Likewise.
14637         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
14638         process_partial_specialization, convert_template_argument,
14639         template_args_equal, add_pending_template, lookup_template_class,
14640         for_each_template_parm_r, maybe_fold_nontype_arg,
14641         tsubst, instantiate_template, type_unification_real, unify,
14642         instantiate_pending_templates, set_mangled_name_for_template_decl):
14643         Likewise.
14644         * repo.c (repo_get_id, repo_template_used): Likewise.
14645         * search.c (lookup_field_1): Likewise.
14646         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
14647         * xref.c (classname): Likewise.
14648
14649 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
14650
14651         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
14652         (CANONICAL_BINFO): New macro.
14653         (BINFO_NEW_VTABLE_MARKED): Use it.
14654         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
14655         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
14656         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
14657         not TREE_TYPE.
14658         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14659         (build_secondary_vtable): Likewise.
14660         (dfs_finish_vtbls): Likewise.
14661         (dfs_accumulate_vtbl_inits): Likewise.
14662         (accumulate_vtbl_inits): New function.
14663         (finish_vtbls): Make sure that virtual bases come after
14664         non-virtual bases in the vtable group.
14665         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
14666         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14667         * search.c (struct vbase_info): Move definition.
14668         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14669         (unmarked_new_vtable_p): Likewise.
14670         (dfs_mark_vtable_path): Remove.
14671         (dfs_mark_new_vtable): Remove.
14672         (dfs_unmark_new_vtable): Likewise.
14673         (dfs_clear_search_slot): Likewise.
14674         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
14675         (dfs_clear_vbase_slots): Likewise.
14676         (init_vbase_pointers): LIkewise.
14677
14678 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
14679
14680         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
14681         SIZETYPE to a non-SIZETYPE.
14682
14683 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
14684
14685         * class.c (layout_virtual_bases): Adjust names in conditionally
14686         compiled code.
14687
14688         * class.c (record_base_offsets): New function.
14689         (layout_conflict_p): Likewise.
14690         (layout_nonempty_base_or_field): Use it.
14691         (layout_empty_base): New function.
14692         (build_base_field): Use it.
14693         (build_base_fields): Update comment.
14694         (layout_virtual_bases): Fold in a little code form
14695         layout_basetypes.  Use layout_empty_base.
14696         (layout_basetypes): Remove.
14697         (end_of_class): New function.
14698         (layout_class_type): Use it.  Adjust.
14699
14700         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
14701         (fntype_p): Remove.
14702         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
14703         comment.
14704         (dfs_skip_nonprimary_vbases_markedp): Likewise.
14705         * typeck.c (fntype_p): Remove.
14706
14707         * cp-tree.h (TI_SPEC_INFO): Remove.
14708         (CLASSTYPE_TI_SPEC_INFO): Likewise.
14709         * pt.c (process_partial_specialization): Likewise.
14710
14711         * class.c (build_base_field): Fix thinko in computation of binfo
14712         offsets.
14713
14714         * tree.c (mark_local_for_remap_p): Mark variables declared in
14715         TARGET_EXPRs as well.
14716
14717 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
14718
14719         * typeck.c (require_complete_type, complete_type,
14720         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
14721         build_array_ref, convert_arguments, pointer_diff,
14722         build_x_unary_op, build_unary_op, build_c_cast,
14723         build_modify_expr): Use COMPLETE_TYPE_P etc.
14724         * call.c (is_complete, convert_like_real,
14725         build_new_method_call): Likewise.
14726         * class.c (build_vbase_pointer_fields, check_bases,
14727         build_base_field, finish_struct_1, pushclass): Likewise.
14728         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
14729         * decl.c (maybe_process_template_type_declaration, pushtag,
14730         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
14731         layout_var_decl, check_initializer, cp_finish_decl,
14732         grokdeclarator, require_complete_types_for_parms,
14733         grok_op_properties, xref_tag, xref_basetypes,
14734         check_function_type): Likewise.
14735         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
14736         * friend.c (do_friend): Likewise.
14737         * init.c (build_offset_ref): Likewise.
14738         * parse.y (structsp): Likewise.
14739         * pt.c (maybe_process_partial_specialization,
14740         tsubst_friend_function, instantiate_class_template, tsubst,
14741         do_type_instantiation, instantiate_pending_templates): Likewise.
14742         * repo.c (repo_get_id): Likewise.
14743         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
14744         synthesize_tinfo_var, emit_support_tinfos): Likewise.
14745         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
14746         * semantics.c (begin_class_definition): Likewise.
14747         * tree.c (build_cplus_method_type): Likewise.
14748         * typeck2.c (digest_init, build_functional_cast,
14749         add_exception_specifier): Likewise.
14750         * parse.h, parse.c: Regenerated.
14751
14752 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
14753
14754         * inc/cxxabi.h: New header file. Define new-abi entry points.
14755         (__pointer_type_info::target): Rename member to ...
14756         (__pointer_type_info::type): ... here.
14757         (__base_class_info::type): Rename member to ...
14758         (__base_class_info::base): ... here.
14759         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
14760         * cp-tree.h (CPTI_ABI): New global tree enumeration.
14761         (abi_node): New global tree node.
14762         * decl.c (abi_node): Document.
14763         (init_decl_processing): Initialize abi_node.
14764         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
14765         (get_vmi_pseudo_type_info): Likewise.
14766         (create_tinfo_types): Likewise.
14767         (emit_support_tinfos): Likewise.
14768         * tinfo.h (cxxabi.h): Include for new-abi.
14769         Move rtti class definitions to new header file.
14770         * tinfo.cc (abi): Use the namespace.
14771         (std): Move new abi rtti classes from here ...
14772         (__cxxabiv1): ... to here.
14773         * tinfo2.cc (cxxabi.h): Include for new-abi.
14774         Move rtti class definitions to new header file.
14775         (std): Move new abi rtti classes from here ...
14776         (__cxxabiv1): ... to here.
14777         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
14778         namespace.
14779
14780 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
14781             Jason Merrill  <jason@casey.cygnus.com>
14782
14783         * method.c (build_overload_int): Use host_integerp.
14784
14785 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14786
14787         * init.c (build_offset_ref): Handle the case of a templated member
14788         function.
14789
14790 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14791
14792         * except.c (expand_exception_blocks): Clear catch_clauses_last.
14793
14794 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
14795
14796         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
14797         * class.c (check_bitfield_decl): Turn illegal bitfields into
14798         non-bitfields.
14799         (dfs_propagate_binfo_offsets): Adjust for new size_binop
14800         semantics.
14801         (dfs_offset_for_unshared_vbases): Likewise.
14802         * cvt.c (cp_convert_to_pointer): Convert NULL to a
14803         pointer-to-member correctly under the new ABI.
14804         * expr.c (cplus_expand_constant): Don't use cp_convert when
14805         turning an offset into a pointer-to-member.
14806         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
14807         when dereferencing them under the new ABI.
14808         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
14809         of pointers-to-members under the new ABI.
14810
14811         * class.c (check_bitfield_decl): Remove restriction on really long
14812         bitfields.
14813         (layout_class_type): Implement new ABI handling of bitfields
14814         longer than their types.
14815
14816 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14817
14818         * parse.y (extdefs): Call ggc_collect.
14819         * parse.c: Regenerated.
14820
14821 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
14822
14823         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
14824         (note_name_declared_in_class): Use OVL_CURRENT to get at a
14825         potential overload.
14826
14827 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14828
14829         * class.c (build_vbase_path): Use integer_zerop.
14830         (build_vtable_entry): Use tree_low_cst.
14831         (get_vfield_offset): Use bit_position.
14832         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
14833         Use tree_low_cst.
14834         (check_bitfield_decl): Set DECL_SIZE using convert.
14835         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
14836         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
14837         Use tree_low_cst.
14838         (finish_struct_1): Use bit_position.
14839         (dump_class_hierarchy): Use tree_low_cst.
14840         * cp-tree.h (min_precision): Add declaration.
14841         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
14842         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
14843         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
14844         * expr.c (cplus_expand_constant): Use bit_position.
14845         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
14846         * rtti.c (get_base_offset): Use bit_position.
14847         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
14848         host_integerp, and tree_low_cst.
14849         (pointer_int_sum): Use integer_zerop.
14850         (build_component_addr): Use bit_position.
14851
14852 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
14853
14854         * typeck.c (require_complete_type): Don't assume size_zero_node.
14855         (complete_type_or_else): Likewise.
14856
14857 2000-03-16  Steven Grady <grady@digitaldeck.com>
14858             Jason Merrill  <jason@casey.cygnus.com>
14859
14860         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
14861
14862 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
14863
14864         * decl2.c (grokfield): Bail out if type is error_mark_node.
14865
14866 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14867
14868         * tinfo2.cc (__ptr_to_member_data): Rename to ...
14869         (__pointer_to_member_data): ... here. Adjust.
14870         * rtti.c (create_tinfo_types): Adjust.
14871
14872 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14873
14874         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
14875         * decl.c (ref_desc_type_node): Undocument.
14876         * rtti.c (ptr_ref_initializer): Rename to ...
14877         (ptr_initializer): ... here. Adjust comments.
14878         (ptmd_initializer): Fix comment thinko.
14879         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
14880         (create_tinfo_types): Remove ref_desc_type_node init.
14881         * tinfo2.cc (__reference_type_info): Remove.
14882
14883 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14884
14885         * decl.c (cp_finish_decl): Remove obsolete comment.
14886
14887         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
14888
14889 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
14890
14891         * cp-tree.h: Tweak documentation.
14892         * class.c (build_vbase_pointer_fields): Layout the fields, too.
14893         (avoid_overlap): Remove.
14894         (get_binfo_offset_as_int): New function.
14895         (dfs_serach_base_offsets): Likewise.
14896         (layout_nonempty_base_or_field): Likewise.
14897         (build_base_field): Layout fields here.  Avoid placing two objects
14898         of the same type at the same address, under the new ABI.
14899         (build_base_fields): Adjust accordingly.
14900         (create_vtable_ptr): Return the new field, but don't attach it to
14901         TYPE_FIELDS.
14902         (remove_base_field): Remove.
14903         (remove_base_fields): Remove.
14904         (layout_basetypes): Adjust accordingly.
14905         (layout_class_type): Call layout_field for each field, rather than
14906         just making a wholesale call to layout_type.
14907
14908 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
14909
14910         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
14911
14912 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
14913
14914         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
14915
14916         * except.c (dtor_nothrow): New fn.
14917         (do_pop_exception): Use it.  Take type parm.
14918         (push_eh_cleanup): Take type parm.
14919         (expand_start_catch_block): Pass it.
14920         (build_eh_type_type_ref): Accept null type.
14921
14922 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
14923
14924         * cp-tree.h (revert_static_member_fn): Change prototype.
14925         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
14926         (grok_op_properties): Likewise.
14927         (start_function): Likewise.
14928         (revert_static_member_fn): Simplify.
14929         * pt.c (check_explicit_specialization): Adjust call to
14930         revert_static_member_fn.
14931
14932 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
14933
14934         * cp-tree.h (scope_kind): New type.
14935         (tmpl_spec_kind): Likewise.
14936         (declare_pseudo_global_level): Remove.
14937         (pseudo_global_level_p): Rename to template_parm_scope_p.
14938         (pushlevel): Remove declaration.
14939         (begin_scope): New function.
14940         (finish_scope): Likewise.
14941         (current_tmpl_spec_kind): Likewise.
14942         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
14943         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
14944         Add template_spec_p.
14945         (toplevel_bindings_p): Adjust.
14946         (declare_pseudo_global_level): Remove.
14947         (pseudo_global_level_p): Rename to template_parm_scope_p.
14948         (current_tmpl_spec_kind): New function.
14949         (begin_scope): Likewise.
14950         (finish_scope): Likewise.
14951         (maybe_push_to_top_level): Adjust.
14952         (maybe_process_template_type_declaration): Likewise.
14953         (pushtag): Likewise.
14954         (pushdecl_nonclass_level): Likewise.
14955         (lookup_tag): Likewise.
14956         (grokfndecl): Handle member template specializations.  Share
14957         constructor and non-constructor code.
14958         * decl2.c (check_classfn): Handle member template specializations.
14959         * pt.c (begin_template_parm_list): Use begin_scope.
14960         (begin_specialization): Likewise.
14961         (end_specialization): Likewise.
14962         (check_explicit_specialization): Use current_tmpl_spec_kind.
14963         Handle member template specializations.
14964         (end_template_decl): Use finish_scope.  Remove call to
14965         get_pending_sizes.
14966         (push_template_decl_real): Remove bogus error message.
14967         (tsubst_decl): Fix typo in code contained in comment.
14968         (instantiate_template): Handle member template specializations.
14969         (most_general_template): Likewise.
14970
14971 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
14972
14973         * lex.c (whitespace_cr): Compress consecutive calls to warning().
14974         (do_identifier): Ditto for error().
14975
14976         * pt.c (convert_nontype_argument): Ditto for cp_error().
14977         (convert_template_argument): Ditto for cp_pedwarn().
14978
14979 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
14980
14981         * exception.cc (__check_null_eh_spec): New fn.
14982         * except.c (expand_end_eh_spec): Call it if the spec is throw().
14983
14984 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
14985
14986         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
14987         * except.c (expand_end_eh_spec): Add the return type.
14988         * rtti.c (throw_bad_cast): Add the parmtypes.
14989         (throw_bad_typeid): Likewise.
14990
14991         * semantics.c (expand_stmt): Only leave out rtl for unused
14992         artificials, and set DECL_IGNORED_P on them as well.
14993         * decl.c (wrapup_globals_for_namespace): Likewise.
14994
14995 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
14996
14997         * decl.c (maybe_commonize_var): Skip all artificial decls.
14998         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
14999
15000 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
15001
15002         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
15003         * cp-tree.h: Declare flag_enforce_eh_specs.
15004         * decl.c (store_parm_decls, finish_function): Check it.
15005
15006         C library functions don't throw.
15007         * Makefile.in (cfns.h): New target.
15008         (except.o): Depend on it.
15009         * Make-lang.in (cc1plus): Depend on cfns.gperf.
15010         * cfns.gperf: New file.
15011         * cfns.h: Generated.
15012         * except.c: Include it.
15013         (nothrow_libfn_p): New fn.
15014         * decl.c (grokfndecl): Use it.
15015         * cp-tree.h: Declare it.
15016
15017         * decl.c (push_overloaded_decl_1, auto_function,
15018         define_function): Lose.
15019         (build_library_fn_1): New static fn.
15020         (builtin_function): Use it.
15021         (get_atexit_node): Use build_library_fn_ptr.
15022         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
15023         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
15024         push_void_library_fn, push_throw_library_fn): New fns.
15025         * cp-tree.h: Declare them.
15026         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
15027         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
15028         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
15029         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
15030         * rtti.c (build_runtime_decl): Lose.
15031         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
15032         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
15033         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
15034
15035         * call.c (build_call): Remove result_type parm.
15036         Call mark_used on unused artificial fns.
15037         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
15038
15039 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
15040
15041         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
15042         appropriate.
15043         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
15044         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
15045         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
15046         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
15047         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
15048         expand_generic_desc): Likewise.
15049
15050 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15051
15052         * exception.cc (__cp_pop_exception): Cleanup the original object.
15053
15054 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15055
15056         * decl.c (grok_op_properties): Merge conversion to void warning
15057         with other silly op warnings.
15058
15059 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
15060
15061         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
15062         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
15063
15064 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15065
15066         * decl.c (cp_make_fname_decl): New function.
15067         (wrapup_globals_for_namespace): Don't emit unused static vars.
15068         (init_decl_processing): Remove comment about use of
15069         array_domain_type. Set make_fname_decl.
15070         (cp_finish_decl): Remove __FUNCTION__ nadgering.
15071         * semantics.c (begin_compound_stmt): Remove
15072         current_function_name_declared flagging.
15073         (expand_stmt): Don't emit unused local statics.
15074         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
15075         specially.
15076
15077 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15078
15079         * typeck.c (convert_for_assignment): Don't look at array
15080         initializer.
15081         * call.c (convert_like_real): Likewise.
15082
15083 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
15084
15085         Add initial support for '\uNNNN' specifier.
15086         * lex.c (read_ucs): New fn.
15087         (readescape, skip_white_space): Call it.
15088         (is_extended_char, is_extended_char_1): New fns.
15089         (utf8_extend_token): New fn, #if 0'd out.
15090         (real_yylex): Treat extended chars like letters.
15091
15092         * search.c (note_debug_info_needed): Walk the bases even if we
15093         weren't deferring the type itself.
15094
15095 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15096
15097         * decl2.c (finish_objects): Constify a char*.
15098
15099         * method.c (emit_thunk): Likewise.
15100
15101 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
15102
15103         * typeck.c (dubious_conversion_warnings): Look through
15104         REFERENCE_TYPE.
15105
15106 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15107
15108         * class.c (dfs_modify_vtables): I is now unsigned.
15109         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
15110         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
15111         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
15112         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
15113         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
15114         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
15115         Call integer_all_onesp.
15116         * typeck2.c (process_init_constructor): Use compare_tree_int.
15117
15118         * lang-specs.h (as): Don't call if -syntax-only.
15119
15120 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
15121
15122         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
15123         RTL_EXPR_HAS_NO_SCOPE after all.
15124
15125 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
15126
15127         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
15128         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
15129         RTL_EXPR_HAS_NO_SCOPE.
15130
15131         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
15132         later.
15133
15134         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
15135
15136 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
15137
15138         * call.c (convert_like): Macrofy.
15139         (convert_like_with_context): New macro.
15140         (convert_like_real): Renamed from convert_like.  Add calling
15141         context parameters, for diagnostics. Add recursive flag.  Call
15142         dubious_conversion_warnings for outer conversion.
15143         (build_user_type_conversion): Use convert_like_with_context.
15144         (build_over_call): Likewise. Don't warn about dubious
15145         conversions here. Adjust convert_default_arg calls.
15146         (convert_default_arg): Add context parameters for diagnostics.
15147         Pass through to convert_like_with_context.
15148         * cp-tree.h (convert_default_arg): Add context parameters.
15149         (dubious_conversion_warnings): Prototype new function.
15150         * typeck.c (convert_arguments): Adjust convert_default_arg call.
15151         (dubious_conversion_warnings): New function, broken
15152         out of convert_for_assignment.
15153         (convert_for_assignment): Adjust.
15154
15155 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
15156
15157         * decl2.c (key_method): Break out from...
15158         (import_export_vtable, import_export_class): ...here.
15159
15160         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
15161         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
15162
15163         * search.c (note_debug_info_needed, dfs_debug_mark,
15164         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
15165         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
15166
15167 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
15168
15169         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
15170         typos.
15171
15172 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
15173
15174         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
15175         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
15176         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
15177         (lang_type): Split gets_new into has_new and has_array_new.
15178         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15179         (TYPE_GETS_NEW): Split into ...
15180         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
15181         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
15182         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
15183         (build_op_new_call): Don't declare.
15184         (build_new_1): Likewise.
15185         * call.c (build_op_new_call): Remove.
15186         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
15187         instead of TYPE_NEEDS_DESTRUCTOR.
15188         (finish_struct_bits): Likewise.
15189         (add_implicitly_declared_members): Likewise.
15190         (check_field_decl): Likewise.
15191         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
15192         correctly under the new ABI.
15193         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
15194         instead of TYPE_NEEDS_DESTRUCTOR.
15195         (initialize_local_var): Likewise.
15196         (destroy_local_var): Likewise.
15197         (cp_finish_decl): Likewise.
15198         (register_dtor_fn): Likewise.
15199         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
15200         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
15201         TYPE_VEC_DELETE_TAKES_SIZE here.
15202         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
15203         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
15204         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15205         (finish_destructor_body): Likewise.
15206         (maybe_build_cleanup_1): Likewise.
15207         * decl2.c (do_static_destruction): Likewise.
15208         * init.c (build_new_1): Make it static.
15209         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15210         (expand_cleanup_for_base): Likewise.
15211         (get_cookie_size): New function.
15212         (build_new_1): Handle array-new cookies correctly under the new
15213         ABI.
15214         (build_vec_delete_1): Likewise.
15215         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15216         (build_delete): Likewise.
15217         (build_vec_delete): Handle array-new cookies correctly under the new
15218         ABI.
15219         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15220         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
15221         TYPE_HAS_ARRAY_NEW_OPERATOR.
15222         * ptree.c (print_lang_type): Check them.
15223         * search.c (context_for_name_lookup): Fix typo in comment.
15224         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15225         * tree.c (break_out_cleanups): Likewise.
15226         (build_cplus_array_test_1): Likewise.
15227         (cp_build_qualified_type_real): Likewise.
15228         * typeck.c (complete_type): Likewise.
15229
15230         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
15231         the command-line, not the end.
15232
15233 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
15234
15235         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
15236
15237 2000-03-02  Tom Tromey  <tromey@cygnus.com>
15238
15239         * cp-tree.h (build_java_class_ref): Declare.
15240         * init.c (build_java_class_ref): No longer static.
15241         * except.c (expand_throw): Generate a Java-style `throw' if the
15242         thrown object is a "Java" object.
15243         (initialize_handler_parm): Generate a Java-style lookup of
15244         exception info if the caught object is a "Java" object.
15245         (catch_language, catch_language_init): New globals.
15246         (decl_is_java_type): New function.
15247         (expand_start_catch_block): Don't call push_eh_info() or
15248         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
15249         class reference to build_catch_block.
15250
15251 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15252
15253         * typeck.c (comptypes): Treat sizetype like its language equivalent.
15254
15255 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
15256
15257         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
15258         to merge reference/pointer code and fix incorrect warnings.
15259
15260 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
15261
15262         * search.c (protected_accessible_p): Use context_for_name_lookup.
15263
15264         * init.c (construct_virtual_bases): Fix thinko.
15265         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
15266
15267 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15268
15269         * decl.c (current_function_decl): Move to toplev.c.
15270
15271 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
15272
15273         * pt.c (fn_type_unification): Unify return type, whenever
15274         provided.
15275         (get_bindings_real): Only pass return type when necessary.
15276         Remove explicit return type check.
15277         * class.c (resolve_address_of_overloaded_function): Pass desired
15278         return type to fn_type_unification.
15279
15280 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15281
15282         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
15283         DECL_FIELD_SIZE.
15284         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
15285         DECL_FIELD_SIZE.
15286         * rtti.c (expand_class_desc): Likewise.
15287         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
15288         (THUNK_VCALL_OFFSET): Likewise.
15289         (THUNK_DELTA): Reflect changes in ../tree.h.
15290
15291 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
15292
15293         * search.c (protected_accessible_p): Also allow the access if
15294         the member is public in DERIVED.  Lose TYPE parm.
15295         (friend_accessible_p): Lose TYPE parm.
15296         (accessible_p): Adjust.
15297
15298 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15299
15300         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
15301         on things that are not sizes; ssize_binop deleted.
15302         Call size_diffop when appropriate.
15303         (dfs_build_vcall_offset_vtbl_entries): Likewise.
15304         (build_primary_vtable, build_secondary_vtable): Likewise.
15305         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
15306         Variable I is HOST_WIDE_INT.
15307         (get_vfield_offset): Pass proper types to size_binop.
15308         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
15309         (finish_struct_1): Likewise.
15310         (skip_rtti_stuff): Arg N is now pointer to signed.
15311         (layout_class_type): Use size_zero_node.
15312         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
15313         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
15314         * decl.c (complete_arry_type): Pass proper types to size_binop.
15315         (xref_basetypes): BINFO_OFFSET is sizetype.
15316         * error.c (dump_expr): Don't use size_binop non-sizes.
15317         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
15318         * init.c (construct_virtual_bases): Fix type error.
15319         (build_vec_delete_1): Pass proper type to size_binop and don't
15320         fold result.
15321         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
15322         * rtti.c (get_base_offset): Pass proper type to size_binop.
15323         * search.c (dfs_find_vbases): Fix type error.
15324         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
15325         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
15326         * tree.c (debug_binfo): Variable N is signed.
15327         Use HOST_WIDE_INT_PRINT_DEC.
15328         * typeck.c (comptypes): sizetype is same as equivalent integer type.
15329         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
15330         size_one_node and size_zero_node.
15331         (c_alignof): Use size_one_node.
15332         (build_component_addr): Pass proper types to size_binop.
15333         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
15334
15335 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
15336
15337         Implement class scope using-declarations for functions.
15338         * class.c (handle_using_decl): Call add_method for used functions.
15339         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
15340         (add_method): Used functions are hidden by local functions.
15341         (check_bases_and_members): Handle using-decls before finalizing
15342         CLASSTYPE_METHOD_VEC.
15343         * call.c (add_function_candidate): Add ctype parm; if nonzero,
15344         override the type of 'this' accordingly.
15345         (add_template_candidate, add_template_candidate_real): Add ctype parm.
15346         (convert_class_to_reference, build_user_type_conversion_1,
15347         build_new_function_call, build_object_call, build_new_op,
15348         build_new_method_call): Pass ctype parm.
15349
15350         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
15351         the baselink.
15352         * call.c (convert_class_to_reference, build_user_type_conversion_1,
15353         build_new_function_call, build_object_call, build_new_op,
15354         build_new_method_call, build_op_delete_call): Don't get basetype_path
15355         from a baselink.
15356         * typeck.c (build_component_ref): Likewise.
15357         * init.c (build_offset_ref): Likewise.
15358         (resolve_offset_ref): Don't call enforce_access.
15359         Call build_scoped_ref.
15360         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
15361         would cause an error or if -pedantic.
15362         * class.c (alter_access): Lose binfo parm.
15363
15364 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
15365
15366         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
15367         types.
15368
15369 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
15370
15371         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
15372         pseudo_type_info creation into the std namespace
15373
15374 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
15375
15376         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
15377         (import_export_class): Remove declaration.
15378         * decl2.c (import_export_class): Make it static.
15379         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
15380         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
15381         EXPR_WITH_FILE_LOCATION.
15382         * lex.c (check_newline): Tweak filename/lineno setting.
15383         * semantics.c (begin_while_stmt): Fix typo in comment.
15384
15385 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15386
15387         * lang-options.h (-fmessage-length=): Add missing option.
15388
15389         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
15390
15391 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
15392
15393         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
15394
15395 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
15396
15397         * optimize.c (expand_call_inline): Emit the return label before
15398         evaluating the return value.
15399
15400 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
15401
15402         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
15403         than duplicating functionality here.
15404         * optimize.c: Include input.h.
15405         (expand_call_inline): Use push_srcloc and pop_srcloc.
15406         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
15407         * parse.c: Regenerated.
15408         * Makefile.in (lex.o): Depend on input.h.
15409         (optimize.o): Likewise.
15410
15411 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
15412
15413         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
15414         function type, rather than ICE.
15415
15416 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
15417
15418         * decl.c (grokdeclarator): Call decl_type_access_control.
15419         * parse.y (parse_end_decl): Don't call decl_type_access_control if
15420         decl is null.
15421
15422 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
15423
15424         * decl.c (decls_match): Remove obsolete static member nadgering.
15425
15426 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15427
15428         * decl.c (grokdeclarator): Change ANSI to ISO.
15429         * lex.c (consume_string, readescape, do_identifier): Likewise.
15430         (parse_float, real_yylex): Likewise.
15431         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
15432         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
15433         new_type_id, maybe_label_decls, simple_stmt,
15434         for.init.statement): Likewise.
15435         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
15436         * semantics.c (finish_named_return_value): Likewise.
15437         * parse.c: Regenerate.
15438
15439 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
15440
15441         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
15442         (CPTI_CLASS_STAR_TYPE): Remove.
15443         (vtable_index_type): Likewise.
15444         (class_star_type_node): Remove.
15445         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
15446         (build_binary_op_nodefault): Remove.
15447         * call.c (build_new_op): Use build_binary_op instead of
15448         build_binary_op_nodefault.
15449         * decl.c (init_decl_processing): Remove class_star_type_node
15450         initialization.  Make delta_type_node ptrdiff_type_node under the
15451         new ABI.  Initialize vtable_index_type.
15452         (build_ptrmemfunc_type): Build different structures for the new
15453         ABI.
15454         (build_enumerator): Use build_binary_op instead of
15455         build_binary_op_nodefault.
15456         * method.c (build_overload_value): Mangle pointers-to-members
15457         appropriately under the new ABI.
15458         * typeck.c (build_array_ref): Use build_binary_op instead of
15459         build_binary_op_nodefault.
15460         (get_member_function_from_ptrfunc): Adjust for the new ABI.
15461         (build_binary_op_nodefault): Rename to ...
15462         (build_binary_op): ... this.  Remove old version.  Adjust for
15463         pointer-to-member comparisons under the new ABI.
15464         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
15465         (build_ptrmemfunc): Adjust for the new ABI.
15466         (expand_ptrmemfunc_cst): Likewise.
15467         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
15468         (pfn_from_ptrmemfunc): Adjust for the new ABI.
15469
15470 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
15471
15472         * call.c (build_object_call): Compress consecutive calls to
15473         cp_error.
15474         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
15475         (build_op_delete_call): Adjust message formatting.
15476
15477         * class.c (check_bases): Compress consecutive calls to
15478         cp_pedwarn.
15479         (finish_struct_anon): Say 'ISO C++'.
15480
15481         * decl.c (start_decl): Same here.
15482         (grok_reference_init): Likewise.
15483         (grokfndecl): Correct message formatting.
15484         (grokfndecl): Improve diagnostic.
15485         (check_static_variable_definition): Likewise. Say 'ISO C++'
15486         (compute_array_index_type): Say 'ISO C++'
15487         (create_array_type_for_decl): Compress consecutive calls to
15488         cp_error.
15489         (grokdeclarator): Say 'ISO C++'
15490         (grok_op_properties): Likewise.
15491
15492         * decl2.c (delete_sanity): Clairify diagnostic.
15493         (check_member_template): Same here.
15494         (grok_function_init): Use consistent terminology.
15495
15496         * expr.c (do_case): Say 'ISO C++'
15497
15498         * friend.c (do_friend): Compress consecutive calls to warning.
15499
15500 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
15501
15502         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
15503         * class.c (build_secondary_vtable): Reorganize.  Don't create a
15504         new vtable under the new ABI.
15505         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
15506         computing the size.
15507         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
15508         the initializing elements.
15509         (initialize_vtable): New function.
15510         (dfs_finish_vtbls): Use it.
15511         (dfs_accumulate_vtbl_inits): New function.
15512         (finish_vtbls): Merge primary and secondary vtables under the new
15513         ABI.
15514         (finish_struct_1): Remove redundant call to layout_vtable_decl.
15515         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
15516         aren't VAR_DECLs.
15517
15518         * class.c (build_vtable): New function, split out from ...
15519         (get_vtable_decl): ... here, and ...
15520         (build_secondary_vtable): ... here.
15521
15522         * pt.c (tsubst_decl): Fix formatting.
15523
15524 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15525
15526         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
15527         (avoid_overlap, build_base_field): Likewise.
15528         (build_base_field, build_base_fields, is_empty_class):
15529         Test DECL_SIZE with integer_zero.
15530         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
15531         * cp-tree.h (struct lang_type): New field size_unit.
15532         (CLASSTYPE_SIZE_UNIT): New macro.
15533         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
15534         (cp_finish_decl): Delete -Wlarger-than processing.
15535         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
15536         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
15537         * tree.c (make_binfo): binfo vector is one entry longer.
15538         (walk_tree): Walk DECL_SIZE_UNIT.
15539
15540 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
15541
15542         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
15543         comment.
15544         (build_vtable_entry): Don't assume all vtable entries are
15545         functions.
15546         (build_vtbl_initializer): Adjust accordingly.
15547         (get_vtable_decl): Fix formatting.
15548
15549 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
15550
15551         * semantics.c (deferred_type_access_control): Walk the entire
15552         type_lookups list.
15553         (save_type_access_control): Rename from
15554         initial_deferred_type_access_control.  Just remember the value.
15555         (decl_type_access_control): New fn.
15556         (begin_function_definition): Use deferred_type_access_control, after
15557         we've started the function.  Set type_lookups to error_mark_node.
15558         * parse.y (frob_specs, fn.def1): Adjust.
15559         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
15560         (parse_end_decl, parse_bitfield0, parse_method): New fns.
15561         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
15562         (after_type_component_declarator0): Likewise.
15563         (after_type_component_declarator): Likewise.
15564         (notype_component_declarator): Likewise.
15565         * cp-tree.h: Adjust.
15566
15567         * decl.c (redeclaration_error_message): Allow redeclaration of
15568         namespace-scope decls.
15569
15570 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15571
15572         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
15573
15574 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
15575
15576         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
15577         * decl2.c (grokclassfn): Likewise.
15578
15579         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
15580
15581         * decl2.c (lang_decode_option): Don't set default message length
15582         here.
15583         * lex.c (lang_init_options): Set it here.
15584
15585 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
15586
15587         Make DECL_CONTEXT mean the class in which a member function was
15588         declared, even for a virtual function.
15589         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
15590         (DECL_FRIEND_CONTEXT): New macro.
15591         (DECL_REAL_CONTEXT): Remove.
15592         (SET_DECL_FRIEND_CONTEXT): Likewise.
15593         (DECL_VIRTUAL_CONTEXT): Adjust.
15594         (DECL_CLASS_SCOPE_P): Use TYPE_P.
15595         (add_friends): Remove.
15596         (hack_decl_function_context): Likewise.
15597         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
15598         CP_DECL_CONTEXT.
15599         (build_over_call): Fix indentation.  Use DECL_CONTEXT
15600         instead of DECL_CLASS_CONTEXT.
15601         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
15602         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
15603         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15604         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
15605         (build_base_field): Likewise.
15606         (finish_struct_1): Likewise.
15607         (build_self_reference): Likewise.
15608         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
15609         DECL_REAL_CONTEXT.
15610         (pushtag): Use decl_function_context, not
15611         hack_decl_function_context.
15612         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15613         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
15614         (pushdecl): Remove bogus code.
15615         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
15616         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15617         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15618         Use decl_function_context, nothack_decl_function_context.
15619         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
15620         (grokdeclarator): Likewise.  Use decl_function_context, not
15621         hack_decl_function_context.
15622         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
15623         (start_function): Use DECL_FRIEND_CONTEXT, not
15624         DECL_CLASS_CONTEXT.  Use decl_function_context, not
15625         hack_decl_function_context.
15626         (finish_function): Use decl_function_context, not
15627         hack_decl_function_context.
15628         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
15629         DECL_CLASS_CONTEXT.
15630         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
15631         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
15632         (grokfield): Likewise.
15633         (finish_builtin_type): Likewise.
15634         (finish_vtable_vardec): Use decl_function_context, not
15635         hack_decl_function_context.
15636         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15637         (start_static_initialization_or_destruction): Likewise.
15638         (finish_static_initialization_or_destruction): Likewise.
15639         (mark_used): Adjust logic for deciding when to synthesize methods.
15640         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
15641         DECL_REAL_CONTEXT.
15642         * error.c (dump_function_decl): Use DECL_CONTEXT, not
15643         DECL_CLASS_CONTEXT.
15644         * friend.c (is_friend): Likewise.
15645         (add_friends): Remove.
15646         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
15647         * lex.c (begin_definition_of_inclass_inline): Use
15648         decl_function_context, not hack_decl_function_context.
15649         (process_next_inline): Likewise.
15650         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15651         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
15652         DECL_CLASSS_CONTEXT.
15653         (hack_identifier): Likewise.
15654         (synthesize_method):  Use decl_function_context, not
15655         hack_decl_function_context.
15656         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
15657         DECL_REAL_CONTEXT.
15658         (is_member_template): Use decl_function_context, not
15659         hack_decl_function_context.  Use DECL_CONTEXT, not
15660         DECL_CLASS_CONTEXT.
15661         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
15662         DECL_CLASS_CONTEXT.
15663         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
15664         DECL_REAL_CONTEXT.
15665         (push_template_decl_real): Likewise.
15666         (instantiate_class_template): Don't call add_friends.
15667         (tsubst_default_argument): Use DECL_CONTEXT, not
15668         DECL_REAL_CONTEXT.
15669         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
15670         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15671         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
15672         DECL_CLASS_CONTEXT.
15673         * repo.c (repo_inline_used): Likewise.
15674         * search.c (current_scope): Adjust for new _CONTEXT macros.
15675         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
15676         DECL_REAL_CONTEXT.
15677         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15678         (lookup_fnfields_here):Likewise.
15679         (check_final_overrider): Likewise.
15680         (init_vbase_pointers): Likewise.
15681         (virtual_context): Likewise.
15682         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
15683         (expand_body): Use decl_function_context, not
15684         hack_decl_function_context.
15685         * tree.c (hack_decl_function_context): Remove.
15686         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
15687         DECL_CLASS_CONTEXT.
15688         * typeck2.c (error_not_base_type): Likewise.
15689
15690 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
15691
15692         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
15693
15694 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15695
15696         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
15697
15698 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
15699
15700         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
15701
15702 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
15703
15704         * decl2.c (lang_decode_option): Enable automatic line wrapping.
15705
15706 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
15707
15708         * parse.y (frob_specs): Split out...
15709         (parse_decl): From here.
15710         (fn.def2): Call initial_deferred_type_access_control.
15711         (after_type_component_declarator0): Call frob_specs.
15712         (notype_component_declarator0): Likewise.
15713         * search.c (friend_accessible_p): Nested classes are friends of their
15714         enclosing classes.
15715
15716 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
15717
15718         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
15719         used to create an implicit temporary.
15720
15721         * class.c (dfs_modify_vtables): Tweak calculation of functions to
15722         override.
15723
15724 2000-02-08  Nathan Sidwell  <nathan@acm.org>
15725
15726         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
15727         strip array element qualifiers too.
15728
15729 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
15730
15731         * decl.c (store_parm_decls): Don't build cleanups for parameters
15732         while processing_template_decl.
15733
15734 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
15735
15736         * cp-tree.h (struct saved_scope): Add incomplete field.
15737         (namespace_scope_incomplete): New macro.
15738         * decl.c (pushdecl): Use it.
15739         (hack_incomplete_structures): Use it.  See through artificial
15740         binding levels.
15741         (mark_saved_scope): Mark it.
15742
15743         Implement access control for nested types.
15744         * search.c (type_access_control): New fn.
15745         (accessible_p): Now we do perform access control for types.
15746         * semantics.c (deferred_type_access_control): New fn.
15747         (initial_deferred_type_access_control): New fn.
15748         (begin_function_definition): Call it.  Add lookups parm.
15749         * decl.c (struct binding_level): Add this_class field.
15750         (pushlevel_class): Set it.
15751         (mark_binding_level): Mark it.
15752         (lookup_name_real): Use it.  Call type_access_control.
15753         (mark_saved_scope): Mark lookups field.
15754         * cp-tree.h (flagged_type_tree): Add lookups field.
15755         (struct saved_scope): Add lookups field.
15756         (type_lookups): New macro.
15757         * parse.y (declmods): Now <ftype>.
15758         (parse_decl): Add lookups parm.  Call
15759         initial_deferred_type_access_control.
15760         (lang_extdef): Clear type_lookups.
15761         (typed_declspecs, declmods, typespec): Set lookups field.
15762         (initdcl): Call deferred_type_access_control.
15763         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
15764         component_decl_1, named_parm): Adjust.
15765         * friend.c (is_friend): Nested classes are friends of their
15766         enclosing classes.
15767
15768         * class.c (currently_open_derived_class): New fn.
15769         * method.c (hack_identifier): Use it.
15770
15771         * lex.c (do_identifier): Remove obsolete code.
15772
15773         * parse.y (typed_typespecs): Propagate new_type_flag properly.
15774
15775 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
15776
15777         * tinfo.h: Remove apostrophes from C++ comment (xgettext
15778         thinks this file is plain C).
15779
15780 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15781
15782         * Makefile.in (call.o): Depend on $(EXPR_H).
15783
15784         * call.c: Include "expr.h".
15785
15786         * class.c (dump_class_hierarchy): Add prototype.
15787
15788         * search.c (dfs_get_pure_virtuals): Likewise.
15789
15790 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
15791
15792         * parse.y (simple_stmt): Allow :: token in asm parameter list.
15793         * parse.c: Rebuilt.
15794
15795 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
15796
15797         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
15798         Store it in DECL_FCONTEXT.
15799         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
15800
15801 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
15802
15803         * tinfo.h (old abi): #include "tconfig.h".
15804         * tinfo.cc (convert_to_base): Move into old abi section.
15805
15806 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
15807
15808         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
15809         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
15810         (BINFO_PRIMARY_BINFO): New macro.
15811         (BF_DELTA): Rename to ...
15812         (BV_DELTA): ... this.
15813         (BF_VCALL_INDEX): Rename to ...
15814         (BV_VCALL_INDEX): ... this.
15815         (BF_FN): Rename to ...
15816         (BV_FN): ... this.
15817         * class.c (build_vbase_path): Adjust for changes to reverse_path.
15818         (set_rtti_entry): Rename BF_ macros to BV_ variants.
15819         (modify_vtable_entry): Simplify.
15820         (add_virtual_function): Rename BF_ macros to BV_ variants.
15821         (build_vtable_initializer): Likewise.
15822         (get_class_offset_1): Remove.
15823         (dfs_get_class_offset): Likewise.
15824         (get_class_offset): Likewise.
15825         (dfs_find_final_overrider): New function.
15826         (find_final_overrider): Likewise.
15827         (modify_one_vtable): Remove.
15828         (dfs_find_base): New function.
15829         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
15830         find_final_overrider.
15831         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
15832         virtuals.
15833         (dfs_fixup_vtable_deltas): Remove.
15834         (override_one_vtable): Remove.
15835         (merge_overrides): Likewise.
15836         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
15837         unreal chilren of virtual bases.
15838         (finish_struct_1): Don't use merge_overrides.  Don't use
15839         dfs_fixup_vtable_deltas.
15840         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
15841         BINFOs.
15842
15843 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
15844             Jason Merrill  <jason@yorick.cygnus.com>
15845
15846         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
15847
15848 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
15849
15850         * exception.cc (__throw_bad_typeid): Add missing std::.
15851
15852 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15853
15854         * cp-tree.h (make_thunk): PROTO -> PARAMS.
15855
15856 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
15857
15858         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
15859
15860         Runtime support for new-abi rtti.
15861         * inc/typeinfo (type_info::operator!=): Define in class.
15862         (type_info::before, type_info::name, type_info::operator==,
15863         type_info::operator!=): Define new ABI implementations.
15864         (type_info::is_pointer_p, type_info::is_function_p): Declare
15865         new virtual functions.
15866         (type_info::do_catch, type_info::do_upcast): Likewise.
15867
15868         * tinfo.h (__base_class_info): Define new class.
15869         (__class_type_info): Likewise.
15870         (__si_class_type_info): Likewise.
15871         (__vmi_class_type_info): Likewise.
15872         (__dynamic_cast): Prototype.
15873
15874         * tinfo.cc: Conditionalize old and new rtti mechanisms.
15875         (type_info::is_pointer_p): Define new function.
15876         (type_info::is_function_p): Likewise.
15877         (type_info::do_catch): Likewise.
15878         (type_info::do_upcast): Likewise.
15879         (vtable_prefix): New structure for vtable access.
15880         (adjust_pointer): Define new template function.
15881         (contained_p, public_p, virtual_p, contained_public_p,
15882         contained_nonpublic_p, contained_nonvirtual_p): Define new
15883         functions.
15884         (nonvirtual_base_type): New local variable.
15885         (__class_type_info::~__class_type_info): Define.
15886         (__si_class_type_info::~__si_class_type_info): Likewise.
15887         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
15888         (__class_type_info::do_catch): Define new function.
15889         (__class_type_info::do_upcast): Likewise.
15890         (__class_type_info::find_public_src): Likewise.
15891         (__class_type_info::do_find_public_src): Likewise.
15892         (__si_class_type_info::do_find_public_src): Likewise.
15893         (__vmi_class_type_info::do_find_public_src): Likewise.
15894         (__class_type_info::do_dyncast): Likewise.
15895         (__si_class_type_info::do_dyncast): Likewise.
15896         (__vmi_class_type_info::do_dyncast): Likewise.
15897         (__class_type_info::do_upcast): Likewise.
15898         (__si_class_type_info::do_upcast): Likewise.
15899         (__vmi_class_type_info::do_upcast): Likewise.
15900         (__dynamic_cast): Likewise.
15901
15902         * tinfo2.cc (__fundamental_type_info): Define new class.
15903         (__pointer_type_info): Likewise.
15904         (__reference_type_info): Likewise.
15905         (__array_type_info): Likewise.
15906         (__function_type_info): Likewise.
15907         (__enum_type_info): Likewise.
15908         (__ptr_to_member_type_info): Likewise.
15909         (__fundamental_type_info::~__fundamental_type_info): Define.
15910         (__pointer_type_info::~__pointer_type_info): Likewise.
15911         (__reference_type_info::~__reference_type_info): Likewise.
15912         (__array_type_info::~__array_type_info): Likewise.
15913         (__function_type_info::~__function_type_info): Likewise.
15914         (__enum_type_info::~__enum_type_info): Likewise.
15915         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
15916         (__pointer_type_info::do_catch): Define new function.
15917         (__ptr_to_member_type_info::do_catch): Define new function.
15918
15919         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
15920         (__is_pointer): Likewise.
15921
15922         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
15923
15924 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
15925
15926         * cp/class.c (build_vtable): Rename to build_primary_vtable.
15927         (prepare_fresh_vtable): Rename to build_secondary_vtable.
15928         (make_new_vtable): New function.
15929         (modify_vtable_entry): Handle generation of new vtables correctly.
15930         (modify_one_vtable): Remove unused parameter.
15931         (dfs_fixup_vtable_deltas): Likewise.
15932         (override_one_vtable): Use build_secondary_vtable.
15933         (finish_struct_1): Use build_primary_vtable and
15934         build_secondary_vtable.
15935
15936 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
15937
15938         * cp/decl.c: Adjust variable names, comments, help strings.
15939
15940 2000-01-29  Nathan Sidwell  <nathan@acm.org>
15941
15942         * new2.cc (operator delete[]): Use operator delete, don't assume
15943         implementation.
15944
15945 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
15946
15947         * class.c (build_vtbl_initializer): Add argument to
15948         build_vtable_entry call.
15949
15950 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
15951
15952         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
15953         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
15954         (BF_DELTA): New macro.
15955         (BF_VCALL_INDEX): Likewise.
15956         (BF_FN): Likewise.
15957         (THUNK_VCALL_OFFSET): Likewise.
15958         (make_thunk): Change prototype.
15959         * class.c (build_vtable_entry): Integrate
15960         build_vtable_entry_for_fn.  Handle vcall indices.
15961         (build_vtable_entry_for_fn): Remove.
15962         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
15963         BF_VCALL_INDEX, BF_FN.
15964         (modify_vtable_entry): Integrate common code from
15965         modify_one_vtable and dfs_fixup_vtable_deltas.
15966         (add_virtual_function): Set BF_VCALL_INDEX.
15967         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
15968         and BF_FN.
15969         (modify_one_vtable): Simplify.
15970         (dfs_fixup_vtable_deltas): Likewise.
15971         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
15972         * method.c (make_thunk): Handle vcall indices.
15973
15974 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
15975
15976         Compiler side new abi rtti (not enabled).
15977         * cp-tree.h (new_abi_rtti_p): New macro.
15978         (emit_support_tinfos): Prototype new function.
15979         (tinfo_decl_p): Likewise.
15980         (emit_tinfo_decl): Likwise.
15981         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
15982         macros.
15983         (doing_runtime): New local static.
15984         (init_rtti_processing): Add new-abi initializer.
15985         (get_tinfo_decl): Add new-abi logic.
15986         (tinfo_from_decl): Likewise.
15987         (build_dynamic_cast_1): Likewise.
15988         (qualifier_flags): New static function.
15989         (tinfo_base_init): Likewise.
15990         (generic_initializer): Likewise.
15991         (ptr_ref_initializer): Likewise.
15992         (ptmd_initializer): Likewise.
15993         (class_hint_flags): Likewise.
15994         (class_initializer): Likewise.
15995         (synthesize_tinfo_var): Likewise.
15996         (create_real_tinfo_var): Likewise.
15997         (create_pseudo_type_info): Likewise.
15998         (get_vmi_pseudo_type_info): Likewise.
15999         (create_tinfo_types): Likewise.
16000         (emit_support_tinfos): New global function.
16001         (tinfo_decl_p): New global predicate.
16002         (emit_tinfo_decl): New global function.
16003         * class.c (set_rtti_entry): Generalize for old and new rtti.
16004         (build_vtbl_initializer): Likewise.
16005         * decl2.c (finish_file): Likewise.
16006
16007 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
16008
16009         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
16010         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
16011
16012 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
16013
16014         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
16015         for scopes.
16016
16017 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
16018
16019         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
16020
16021 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
16022
16023         * optimize.c (calls_setjmp_r): Supply new argument
16024         to special_function_p.
16025
16026 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16027
16028         * call.c: PROTO -> PARAMS.
16029         * class.c: Likewise.
16030         * cp-tree.h: Likewise.
16031         * cvt.c: Likewise.
16032         * decl.c: Likewise.
16033         * decl.h: Likewise.
16034         * decl2.c: Likewise.
16035         * dump.c: Likewise.
16036         * errfn.c: Likewise.
16037         * error.c: Likewise.
16038         * except.c: Likewise.
16039         * expr.c: Likewise.
16040         * init.c: Likewise.
16041         * input.c: Likewise.
16042         * lex.c: Likewise.
16043         * lex.h: Likewise.
16044         * method.c: Likewise.
16045         * optimize.c: Likewise.
16046         * parse.y: Likewise.
16047         * pt.c: Likewise.
16048         * repo.c: Likewise.
16049         * rtti.c: Likewise.
16050         * search.c: Likewise.
16051         * semantics.c: Likewise.
16052         * spew.c: Likewise.
16053         * tree.c: Likewise.
16054         * typeck.c: Likewise.
16055         * typeck2.c: Likewise.
16056         * xref.c: Likewise.
16057
16058 2000-01-25  Richard Henderson  <rth@cygnus.com>
16059
16060         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
16061
16062 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
16063
16064         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
16065         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
16066         (struct vcall_offset_data_s): New type.
16067         (dfs_vcall_offset_queue_p): New function.
16068         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16069         (build_vcall_offset_vtbl_entries): Likewise.
16070         (layout_vtable_decl): Likewise.
16071         (num_vfun_entries): Likewise.
16072         (num_extra_vtbl_entries): Add the entries for vcall offsets.
16073         (build_vtbl_initializer): Likewise.
16074         (dfs_finish_vtabls): Use layout_vtable_decl.
16075         (modify_one_vtables): Always duplicate vtables under the new ABI.
16076         (finish_struct_1): Use layout_vtable_decl.
16077
16078 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16079
16080         * decl.c (member_function_or_else): Change third arg from a format
16081         specifier to an `enum overload_flags'.  Callers changed.
16082
16083 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16084
16085         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
16086         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
16087         build_const_cast, get_delta_difference, check_return_expr): Avoid
16088         ANSI string concatenation usage.
16089
16090 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
16091
16092         * class.c (layout_class_type): Put the fields required to make a
16093         class non-empty at the end, not the beginning, of the TYPE_FIELDs
16094         list.
16095
16096 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
16097
16098         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
16099         template.
16100
16101         * decl2.c (mark_used): Do instantiate inlines that have been
16102         explicitly instantiated.
16103
16104 2000-01-24  Richard Henderson  <rth@cygnus.com>
16105
16106         * call.c (build_over_call): Use expand_tree_builtin.
16107         * typeck.c (build_function_call_real): Likewise.
16108         (build_binary_op_nodefault): Handle unordered compares.
16109
16110 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16111
16112         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
16113         cp_tree_index values.
16114         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
16115         New global node #defines for them.
16116         * rtti.c (call_void_fn): Replace with ...
16117         (build_runtime_decl): ... new static function.
16118         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
16119         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
16120         (build_dynamic_cast_1): Always produce correctly typed result.
16121         Explicitly produce type_info addresses. Use dynamic_cast_node.
16122         * exception.cc (__throw_bad_cast): Return `void *'.
16123         (__throw_bad_typeid): Return `const type_info &'.
16124
16125 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16126
16127         * cp-tree.h (get_vtable_decl): Prototype new function.
16128         * class.c (get_vtable_decl): New function. Broken out from ...
16129         (build_vtable): ... here. Use it.
16130         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
16131         by get_vtable_decl.
16132
16133 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16134
16135         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
16136         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
16137         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
16138         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
16139         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
16140         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
16141         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
16142         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
16143         (CPTI_TINFO_VAR_ID): New enumeration.
16144         (__tp_desc_type_node, __access_mode_type_node,
16145         __bltn_desc_type_node, __user_desc_type_node,
16146         __class_desc_type_node, __ptr_desc_type_node,
16147         __attr_desc_type_node, __func_desc_type_node,
16148         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
16149         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
16150         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
16151         enum_desc_type_node, class_desc_type_node,
16152         si_class_desc_type_node, vmi_class_desc_type_node,
16153         ptmd_desc_type_node, base_desc_type_node): New #defines.
16154         (tinfo_fn_id, tinfo_fn_type): Rename to ...
16155         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
16156         (tinfo_var_id): New enumeration.
16157         (DECL_TINFO_FN_P): Augment comment.
16158         * decl.c (cp_global_trees): Adjust documentation.
16159         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
16160         tinfo_decl_type and tinfo_var_id.
16161         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
16162         (build_typeid): Remove unused variable.
16163         (get_tinfo_var): Use tinfo_var_id.
16164         (tinfo_name): New static function.
16165         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
16166         (tinfo_from_decl): Likewise.
16167         (get_base_offset): New static function, broken out of
16168         expand_class_desc.
16169         (expand_si_desc): Use tinfo_name.
16170         (expand_class_desc): Likewise. Lose local static variable.
16171         Use base_desc_type_node. Use get_base_offset.
16172         (expand_ptr_desc): Use tinfo_name.
16173         (expand_attr_desc): Likewise.
16174         (expand_generic_desc): Likewise.
16175
16176         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
16177         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
16178
16179 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
16180
16181         * cp-tree.h (__eprintf): Remove declaration.
16182         * tree.c (__eprintf): Remove definition.
16183
16184 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
16185             Mark Mitchell  <mark@codesourcery.com>
16186
16187         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
16188         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
16189
16190 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
16191
16192         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
16193
16194 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
16195
16196         * cp-tree.h (register_dtor_fn): New function.
16197         * decl.c (destroy_local_static): Rename to ...
16198         (register_dtor_fn): ... this.  Give it external linkage.
16199         (expand_static_init): Use it.
16200         * decl2.c (do_static_initialization): Likewise, if using
16201         __cxa_atexit.
16202         (do_static_destruction): Check that __cxa_atexit is not in use.
16203         (finish_file): Don't call do_static_destruction if using
16204         __cxa_atexit.
16205
16206         * typeck.c (convert_arguments): Restore two-message error
16207         reporting.
16208
16209 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
16210
16211         Remap dynamic cast hint values to be consistent across ABIs.
16212         * search.c (dynamic_cast_base_recurse): Remap generated value.
16213         (get_dynamic_cast_base_type): Adjust documentation.
16214         * tinfo.h (__user_type_info::dyncast): Likewise.
16215         (__user_type_info::find_public_subobj): Remap BOFF meaning.
16216         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
16217         (__class_type_info::do_dyncast): Likewise.
16218         (__class_type_info::do_find_public_subobj): Likewise.
16219         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
16220
16221 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
16222
16223         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
16224
16225         * typeck2.c (incomplete_type_error): Restore previous
16226         cp_error and cp_error_at call sequence.
16227
16228 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
16229
16230         * class.c (dump_class_hierarchy): Make format agree with argument;
16231         cast pointer to unsigned long and print with %lx.
16232
16233 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
16234
16235         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
16236
16237         * typeck.c (composite_pointer_type, common_type,
16238         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
16239         build_function_call_real, convert_arguments,
16240         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
16241         build_unary_op, mark_addressable, build_compound_expr,
16242         build_static_cast, build_reinterpret_cast, build_const_cast,
16243         build_c_cast, build_modify_expr, get_delta_difference,
16244         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
16245         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
16246         into a single one.
16247         * typeck2.c (readonly_error, abstract_virtuals_error,
16248         process_init_constructor, check_for_new_type): Likewise.
16249
16250 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
16251
16252         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
16253         VAR_DECLs.
16254
16255 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
16256
16257         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
16258         (build_x_typeid): Likewise.
16259         (get_tinfo_fn): Likewise.
16260         (get_tinfo_fn_unused): Rename to ...
16261         (get_tinfo_decl): ... here.
16262         * rtti.c (build_headof): Replace logic error with assertion.
16263         (get_tinfo_fn_dynamic): Rename to ...
16264         (get_tinfo_decl_dynamic): ... here. Make static. Use
16265         complete_type_or_else.
16266         (build_x_typeid): Move into ...
16267         (build_typeid): ... here. Adjust call to
16268         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
16269         throw_bad_typeid expression.
16270         (get_tinfo_fn_unused): Rename to ...
16271         (get_tinfo_decl): ... here. Adjust comment.
16272         (get_tinfo_fn): Delete.
16273         (tinfo_from_decl): New static function.
16274         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
16275         (get_typeid): Use complete_type_or_else.
16276         (build_dynamic_cast_1): Adjust calls to
16277         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
16278         * parse.y (primary): Adjust call to build_typeid.
16279         * except.c (build_eh_type_type_ref): Adjust call to
16280         get_tinfo_decl. Mark as used.
16281         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
16282         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
16283         * parse.c: Regenerated.
16284
16285 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
16286
16287         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
16288         calling convention.
16289         (resolves_to_fixed_type_p): Document calling convention.
16290         * rtti.c (build_x_typeid): Initialize NONNULL.
16291
16292         * cp-tree.h (build_shared_int_cst): New function.
16293         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
16294         * class.c (modify_vtable_entry): Likewise.
16295         (add_virtual_function): Split out code to generated shared
16296         INTEGER_CSTs to build_share_int_cst.
16297         (modify_all_vtables): Handle all the overridden functions here.
16298         Add overridden functions from non-primary virtual bases to the
16299         primary vtable.
16300         (finish_struct_1): Adjust call to modify_all_vtables.  Add
16301         overridden functions from non-primary bases to the vtable.
16302         * tree.c (build_shared_int_cst): New function.
16303
16304         * cp-tree.h (scratchalloc): Remove.
16305         (build_scratch_list): Likewise.
16306         * call.c (convert_class_to_reference): Replace build_scratch_list
16307         and build_expr_list with build_tree_list.
16308         (add_candidate): Replace scratchalloc with expralloc.  Note memory
16309         leak.
16310         (build_user_type_conversion_1):  Replace build_scratch_list
16311         and build_expr_list with build_tree_list.
16312         (build_new_op): Likewise.
16313         (build_op_delete_call): Likewise.
16314         (convert_like): Likewise.
16315         * cvt.c (ocp_convert): Likewise.
16316         * decl.c (start_decl): Likewise.
16317         (start_function): Likewise.
16318         (finish_destructor_body): Likewise.
16319         (maybe_build_cleanup_1): Likewise.
16320         * decl2.c (reparse_decl_as_expr): Likewise.
16321         * init.c (perform_member_init): Likewise.
16322         (expand_cleanup_for_base): Likewise.
16323         (build_builtin_delete_call): Likewise.
16324         (build_new_1): Likewise.
16325         (build_delete): Likewise.
16326         * method.c (do_build_assign_ref): Likewise.
16327         * parse.y (already_scoped_stmt): Likewise.
16328         (nontrivial_exprlist): Likewise.
16329         (net_initializer): Likewise.
16330         (initlist): Likewise.
16331         * parse.c: Regenerated.
16332         * rtti.c (build_x_typeid): Likewise.
16333         (build_dynamic_cast_1): Likewise.
16334         * typeck.c (build_x_compound_expr): Likewise.
16335         (build_static_cast): Likewise.
16336         (build_modify_expr): Likewise.
16337
16338         * cp-tree.h (DECL_VINDEX): Add documentation.
16339         * class.c (build_vtable_entry): Likewise.
16340         (start_vtable): Add comment.
16341         (add_virtual_function): Replace pending_hard_virtuals with
16342         overridden_virtuals and pending_virtuals with new_virtuals.
16343         Replace redundant assignments with assertions.
16344         (check_for_override): Add comment.
16345         (check_bases_and_members): Replace pending_hard_virtuals with
16346         overridden_virtuals and pending_virtuals with new_virtuals.
16347         (create_vtbl_ptr): Likewise.
16348         (layout_class_type): Likewise.
16349         (finish_struct_1): Likewise.  Add comments.
16350
16351 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
16352
16353         * class.c (finish_struct_1): Replace redundant code with
16354         assertions.
16355
16356         * cp-tree.h (flag_new_abi): Move.
16357         (flag_use_cxa_atexit): Likewise.
16358         (flag_honor_std): Likewise.
16359         (flag_rtti): Likewise.
16360         (vbase_offsets_in_vtable_p): Define.
16361         (vptrs_present_everywhere_p): Likewise.
16362         (TYPE_CONTAINS_VPTR_P): Likewise.
16363         (dfs_walk_real): Declare.
16364         * class.c (build_vbase_pointer_fields): Check
16365         vbase_offsets_in_vtable_p.
16366         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
16367         BINFO_VPTR_FIELD.
16368         (build_vbase_offset_vtbl_entries): Simplify.
16369         (build_vbase_offset_vtbl_entries): Adjust.
16370         (build_vbase_pointer): Add ability to look up vbase offsets in
16371         vtable.
16372         (start_vtable): New function.
16373         (add_virtual_function): Use it.
16374         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
16375         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
16376         (build_vtbl_initializer): Take the type of the complete object as
16377         input.  Use it to correctly calculate vbase offsets.
16378         (dfs_finish_vtbls): Pass the complete type to
16379         build_vtbl_initializer.
16380         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
16381         (create_vtable_ptr): Create a vtable even if there are no
16382         new virtual functions, under the new ABI.
16383         (finish_struct_1): Likewise.
16384         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
16385         * decl.c (exapnd_static_init): Remove call to
16386         preserve_initializer.
16387         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
16388         vtables.
16389         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
16390         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
16391         (construct_virtual_bases): Don't initialize virtual base pointers
16392         under the new ABI.
16393         (build_aggr_init): Clean up comment.
16394         (expand_aggr_init_1): Likewise.
16395         * rtti.c (expand_class_desc): Store the virtual function table
16396         index where the vbase offset lives in the offset field.
16397         * search.c (dfs_walk_real): Make it global.
16398         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
16399         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
16400
16401         * tinfo.h (USItype): Make it signed under the new ABI.
16402         * tinfo.cc (convert_to_base): New function.  Encapsulate base
16403         conversion logic here.
16404         (__class_type_info::do_upcast): Use it.
16405         (__class_type_info::do_dyncast): Likewise.
16406         (__class_type_info::do_find_public_subobj): Likewise.
16407
16408         * init.c (construct_virtual_bases): Don't look up the addresses of
16409         virtual bases at run-time.
16410
16411         * class.c (build_vbase_pointer): Relocate.
16412         (build_vbase_pointer_fields): Likewise.
16413         (dfs_build_vbase_offset_vtbl_entries): Likewise.
16414         (build_vbase_offset_vtbl_entries): Likewise.
16415
16416         * decl.c (init_decl_processing): Complain if -fnew-abi
16417         -fno-vtable-thunks is used.
16418
16419         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
16420         flag_new_abi.
16421
16422 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
16423
16424         * cp-tree.h (num_extra_vtbl_entries): New function.
16425         (size_extra_vtbl_entries): Likewise.
16426         (dfs_vtable_path_unmark): Likewise.
16427         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
16428         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
16429         * class.c (num_extra_vtbl_entries): New function.
16430         (size_extra_vtbl_entries): Likewise.
16431         (dfs_build_vbase_offset_vtbl_entries): New function.
16432         (build_vbase_offset_vtbl_entries): Likewise.
16433         (build_vtbl_initializer): Use it.
16434         (finish_struct_1): Adjust vtable sizes (using
16435         num_extra_vtbl_entries).
16436         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
16437         THUNK_DECL is non-NULL before expanding it.
16438         * init.c (expand_virtual_init): Adjust the vtable pointer by
16439         size_extra_vtbl_entries before storing it.
16440         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
16441         Handle TREE_LIST parameters here, not in the dfs_* functions.
16442         (dfs_unmarked_real_bases_queue_p): Adjust.
16443         (dfs_marked_real_bases_queue_p): Likewise.
16444         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
16445         (dfs_vtable_path_marked_real_bases_queue_p): New function.
16446         (dfs_vtable_path_unmark): Likewise.
16447
16448 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
16449
16450         * optimize.c (copy_body_r): Clear the operand three of a
16451         TARGET_EXPR when copying it.
16452
16453 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16454
16455         * method.c (build_decl_overload_real): Check whether we are in ::
16456         before returning __builtin_new/delete.
16457
16458 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
16459
16460         * pt.c (tsubst_friend_function): Improve comment.
16461         (instantiate_decl): Avoid crashing when a "nested" function is
16462         instantiated from the top level.
16463
16464         * dump.c (dqeueue_and_dump): Dump
16465         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
16466
16467 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16468
16469         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
16470
16471 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
16472
16473         * g++spec.c (lang_specific_driver): Add -fnew-abi if
16474         ENABLE_NEW_GXX_ABI defined.
16475         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
16476         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
16477         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
16478
16479 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
16480
16481         * decl.c (start_cleanup_fn): Call pushdecl.
16482
16483         * call.c (convert_class_to_reference): Fix typos.
16484         (build_conditional_expr): Handle errors gracefully.
16485         * class.c (push_nested_class): Likewise.
16486         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
16487         (DECL_THIS_EXTERN): Use it.
16488         (DECL_THIS_STATIC): Likewise.
16489         * cvt.c (convert_to_void): Handle errors gracefully.
16490         (build_expr_type_conversion): Likewise.
16491         * decl.c (maybe_push_decl): Likewise.
16492         (start_decl_1): Likewise.
16493         (require_complete_types_for_parms): Likewise.
16494         * parse.y (structsp): Likewise.
16495         (base_class): Likewise.
16496         * parse.c: Regenerated.
16497         * pt.c (finish_member_template_decl): Likewise.
16498         * typeck.c (decay_conversion): Likewise.
16499
16500         * cp-tree.h (dfs_skip_vbases): New function.
16501         (find_vbase_instance): Likewise.
16502         * class.c (determine_primary_base): Allow a nearly empty base to
16503         serve as a primary base class under the new ABI.
16504         (get_class_offset_1): Rename to ...
16505         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
16506         messages here.
16507         (get_class_offset): Use it.  Issue error messages here.
16508         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
16509         find the right copies of virtual bases.
16510         (fixup_vtable_deltas1): Rename to ...
16511         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
16512         bases as primary bases.
16513         (fixup_vtable_deltas): Remove.
16514         (override_one_vtable): Handle virtual bases as primary bases.
16515         (merge_overrides): Likewise.
16516         (finish_struct_1): Likewise.
16517         (dump_class_hierarchy): Dump primary-ness of bases as well.
16518         * search.c (mark_primary_bases): Use a pre-order traversal to
16519         handle primary virtual bases.
16520         (dfs_skip_vbases): New fiunction.
16521         (expand_upcast_fixups): Adjust to handle primary virtual bases.
16522         (fixup_virtual_upcast_offsets): Likewise.
16523         (fixup_all_virtual_upcast_offsets): Likewise.
16524         (dfs_find_vbase_instances): New function.
16525         (find_vbase_instance): Likewise.
16526
16527 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
16528
16529         * lex.c (DIR_SEPARATOR): Delete macro.
16530
16531 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
16532
16533        * decl2.c (lang_decode_option): Handle automatic line wrapping
16534        option.
16535
16536 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
16537
16538         * friend.c (do_friend): Don't resolve scopes when processing
16539         template declarations, even if the qualifying scope doesn't
16540         involve template parameters.
16541
16542 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
16543
16544         * class.c (dfs_modify_vtables_queue_p): Remove.
16545         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
16546         and dfs_marked_real_bases_queue_p instead of
16547         dfs_modify_vtables_queue_p.
16548
16549         * class.c (build_vbase_path): Simplify.
16550         (dfs_propagate_binfo_offsets): New function.
16551         (propagate_binfo_offsets): Use it.
16552         (remove_base_field): Simplify.
16553         (dfs_set_offset_for_vbases): Remove.
16554         (dfs_set_offset_for_shared_vbases): New function.
16555         (dfs_set_offset_for_unshared_vbases): Likewise.
16556         (layout_virtual_bases): Use them.
16557         (layout_basetypes): Don't call propagate_binfo_offsets.
16558         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
16559         for the vbases.
16560
16561         * class.c (build_base_field): New function, split out from ...
16562         (build_base_fields): ... here.  Use it.  Allocate primary bases
16563         first, under the new ABI.
16564         (get_vtable_entry): Remove.
16565         (remove_base_field): New function, split out from ...
16566         (remove_base_fields): ... here.  Adjust since primary bases come
16567         first under the new ABI.
16568
16569         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
16570         (initialize_vtbl_ptrs): New function.
16571         (expand_indirect_vtbls_init): Change prototype.
16572         (convert_pointer_to_vbase): Declare.
16573         * init.c (expand_direct_vtbls_init): Remove.
16574         (dfs_initialize_vtbl_ptrs): New function.
16575         (initialize_vtbl_ptrs): Likewise.
16576         (emit_base_init): Use initialize_vtbl_ptrs.
16577         * search.c (convert_pointer_to_vbase): Make it global.
16578         (expand_indirect_vtbls_init): Remove vtable initialization code.
16579         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
16580
16581         * class.c (dfs_finish_vtbls): New function.
16582         (finish_vtbls): Use it.
16583         (dump_class_hierarchy): New function.
16584
16585         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
16586         (BINFO_VBASE_PRIMARY_P): New macro.
16587         (BINFO_VIRTUALS): Add to documentation.
16588         (SET_BINFO_PRIMARY_MARKED_P): Remove.
16589         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16590         (dfs_mark_primary_bases_queue_p): Likewise.
16591         (dfs_unmarked_real_bases_queue_p): New function.
16592         (dfs_marked_real_bases_queue_p): Likewise.
16593         * search.c (dfs_mark_primary_bases): Adjust.
16594         (mark_primary_bases): Likewise.
16595         (get_shared_vbase_if_not_primary): New function.
16596         (dfs_unmarked_real_bases_queue_p): Likewise.
16597         (dfs_marked_real_bases_queue_p): Likewise.
16598         (dfs_get_pure_virtuals): Simplify.
16599         (get_pure_virtuals): Likewise.
16600
16601 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16602
16603         * lex.c: Include tm_p.h.
16604
16605 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
16606
16607         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
16608
16609 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
16610
16611         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
16612         * pt.c (instantiate_decl): Defer comdat templates that might not be
16613         needed.
16614
16615         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
16616         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
16617         (finish_file): Likewise.
16618
16619         * decl2.c (import_export_class): Undo 12/14 change.
16620
16621         * error.c (dump_decl): operator new, not operatornew.
16622
16623         * class.c (field_decl_cmp): A nontype is "greater" than a type.
16624         * search.c (lookup_field_1): Look for the last field with the
16625         desired name.
16626
16627 2000-01-05  Nathan Sidwell  <nathan@acm.org>
16628
16629         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
16630         FUNCTION_DECL.
16631
16632 2000-01-05  Nathan Sidwell  <nathan@acm.org>
16633
16634         * typeck.c (build_static_cast): Don't strip target qualifiers
16635         when casting from a class.
16636
16637 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16638
16639         * class.c (warn_hidden): Initialize variable `fndecl'.
16640
16641 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
16642
16643         * decl.c (flag_isoc9x): New variable to be able to use code in
16644         c-common.c.  For now always zero.
16645
16646 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
16647
16648         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
16649         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
16650         or unshare_base_binfos for virtual bases here.
16651         * search.c (dfs_get_vbase_types): Do it here.
16652         (get_vbase_types): Adjust.
16653
16654 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
16655
16656         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
16657         (BINFO_PRIMARY_MARKED_P): Use flag 5.
16658         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
16659         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16660         (unmark_primary_bases): Remove declaration.
16661         (unmarkedp): Declare.
16662         (dfs_vbase_unmark): Likewise.
16663         * class.c (determine_primary_base): Return immediately if there
16664         are no base classes.  Call mark_primary_bases here.
16665         (modify_all_direct_vtables): Remove.
16666         (modify_all_indirect_vtables): Remove.
16667         (dfs_modify_vtables_queue_p): New function.
16668         (dfs_modify_vtables): New function.
16669         (modify_all_vtables): Use them.
16670         (build_base_fields): Build FIELD_DECLs for primary virtual base
16671         classes.
16672         (create_vtable_ptr): Don't call determine_primary_base here.
16673         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
16674         (dfs_set_offset_for_vbases): ... this.
16675         (layout_virtual_bases): Use it.
16676         (layout_class_type): Call determine_primary_base here.
16677         * search.c (unmarkedp): Make it global.
16678         (shared_marked_p): Simplify.
16679         (shared_unmarked_p): Likewise.
16680         (dfs_primary_bases_queue_p): Remove.
16681         (dfs_unmark_primary_bases): Likewise.
16682         (unmark_primary_bases): Likewise.
16683         (mark_primary_bases): Simplify.
16684         (get_pure_virtuals): Don't call mark_primary_bases here.
16685         (dfs_vbase_unmark): New function.
16686         (get_vbase_types): Simplify.
16687
16688         * class.c (struct base_info): Remove.
16689         (determine_primary_base): Take has_virtual_p rather than a
16690         base_info as input.  Don't calculate max_has_virtual.
16691         (finish_struct_bits): Remove max_has_virtual argument.
16692         (create_vtable_ptr): Remove max_has_virtual_p argument.
16693         (layout_virtual_bases): Remove max argument.
16694         (layout_basetypes): Likewise.
16695         (layout_class_type): Remove max_has_virtual_p argument.
16696         (finish_struct_1): Remove max_has_virtual.
16697
16698         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
16699         (layout_basetypes): Remove.
16700         * class.c (propagate_binfo_offsets): Moved here from tree.c.
16701         Update to handle primary virtual bases.
16702         (remove_base_fields): New function, split out from
16703         layout_basetypes.
16704         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
16705         (layout_virtual_bases): New function, split out from
16706         layout_basetypes.  Update to handle primary virtual bases.
16707         (layout_basetypes): Moved here from tree.c.  Use
16708         remove_base_fields and layout_virtual_bases.
16709         * search.c (dfs_mark_primary_bases_queue_p): New function.
16710         (mark_primary_bases): Use it.
16711         * tree.c (CEIL): Remove.
16712         (propagate_binfo_offsets): Remove.
16713         (layout_basetypes): Remove.
16714
16715 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
16716
16717         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
16718         (BINFO_PRIMARY_MARKED_P): New macro.
16719         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
16720         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16721         (mark_primary_bases): New function.
16722         (unmark_primary_bases): Likewise.
16723         * search.c (get_abstract_virtuals_1): Remove.
16724         (dfs_mark_primary_bases): New function.
16725         (mark_primary_bases): Likewise.
16726         (dfs_unmark_primary_bases): Likewise.
16727         (unmark_primary_bases): Likewise.
16728         (dfs_get_pure_virtuals): Likewise.
16729
16730 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
16731
16732         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
16733         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
16734         (modify_one_vtable): Adjust.
16735         (fixup_vtable_deltas1): Likewise.
16736         (override_one_vtable): Likewise.
16737         * search.c (get_abstract_virtuals_1): Likewise.
16738         (get_pure_virtuals): Likewise.
16739         (expand_upcast_fixups): Likewise.
16740         * tree.c (debug_binfo): Likewise.
16741
16742         * class.c (build_vtable): Don't return a value.  Don't rebuild
16743         vtables for bases that have already been handled.
16744         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
16745         already been handled.
16746         (modify_one_vtable): Adjust accordingly.
16747         (fixup_vtable_deltas1): Likewise.
16748         (finish_struct_1): Likewise.
16749
16750 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16751
16752         * call.c (build_new_method_call): Also check destructors.