OSDN Git Service

PR c++/9729
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
2
3         PR c++/9729
4         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
5         when the G++ 3.2 ABI prevents correct compilation.
6
7 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
8
9         Change base class access representation. Share virtual base
10         binfos.
11         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
12         call.
13         * cp/class.c (build_base_path): Likewise.
14         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
15         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
16         (make_new_vtable): Adjust.
17         (force_canonical_binfo_r): Delete.
18         (force_canonical_binfo): Delete.
19         (mark_primary_virtual_base): Delete.
20         (dfs_unshared_virtual_bases): Delete.
21         (mark_primary_bases): Adjust.
22         (maybe_warn_about_overly_private_class): Adjust.
23         (dfs_base_derived_from): Delete.
24         (base_derived_from): Follow the inheritance chain.
25         (struct find_final_overrider_data): Add vpath member.
26         (dfs_find_final_overrider): Adjust.
27         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
28         (find_final_overrider): Adjust.
29         (update_vtable_entry_for_fn): Adjust.
30         (modify_all_vtables): Adjust.
31         (walk_subobject_offsets): Adjust.
32         (layout_nonempty_base_or_field): Adjust.
33         (layout_empty_base): Remove last parameter. Adjust.
34         (build_base_field): Adjust.
35         (build_base_fields): Adjust.
36         (propagate_binfo_offsets): Remove last parameter. Adjust.
37         (dfs_set_offset_for_unshared_vbases): Delete.
38         (layout_virtual_bases): Adjust.
39         (finish_struct_1): Adjust.
40         (init_class_processing): Don't init access nodes.
41         (dfs_get_primary_binfo): Delete.
42         (get_primary_binfo): Adjust.
43         (dump_class_hierarchy_r): Remove most derived arg, add IGO
44         parameter. Adjust.
45         (dump_class_hierarchy): Adjust.
46         (finish_vtbls): Adjust.
47         (get_original_base): Delete.
48         (build_vtt_inits): Adjust.
49         (dfs_build_secondary_vptr_vtt_inits): Adjust.
50         (dfs_ctor_vtable_bases_queue_p): Adjust.
51         (build_ctor_vtbl_group): Adjust.
52         (dfs_accumulate_vtbl_inits): Adjust.
53         (build_vtbl_initializer): Adjust.
54         (build_vbase_offset_vtbl_entries): Adjust.
55         (add_vcall_offset_vtbl_entries_1): Adjust.
56         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
57         (access_*_node): Remove.
58         (CANONICAL_BINFO): Delete.
59         (BINFO_UNSHARED_MARKED): Remove.
60         (BINFO_MARKED): Set LANG_FLAG_0 directly.
61         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
62         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
63         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
64         Delete.
65         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
66         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
67         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
68         Delete.
69         (BINFO_DEPENDENT_BASE_P): New.
70         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
71         index.
72         (markedp, unmarkedp): Adjust.
73         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
74         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
75         find_vbase_instance, binfo_for_vbase): Delete.
76         (copied_binfo, original_binfo): Declare.
77         (finish_base_specifier): Add virtual_p arg.
78         (unshare_base_binfos): Delete.
79         (copy_base_binfos): Declare.
80         (reverse_path): Delete.
81         * cp/decl.c (xref_basetypes): Access and virtuality passed
82         differently. Don't copy direct base binfos here. Call
83         copy_base_binfos.
84         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
85         (initialize_vtbl_ptrs): Adjust.
86         (expand_member_init): Adjust.
87         * cp/parser.c (cp_parser_base_specifier): Adjust.
88         * cp/pt.c (instantiate_class_template): Adjust.
89         (get_template_base_recursive): Adjust.
90         * cp/rtti.c (get_pseudo_ti_init): Adjust.
91         (get_pseudo_ti_desc): Adjust.
92         * cp/tree.c (unshare_base_binfos): Rename to ...
93         (copy_base_binfos): ... here, reimplement.
94         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
95         (reverse_path): Remove.
96         * cp/typeck.c (get_delta_difference): Adjust error messages.
97         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
98         * cp/search.c (lookup_base_r): Adjust.
99         (dynamic_cast_base_recurse): Adjust.
100         (canonical_binfo): Remove.
101         (dfs_canonical_queue): Remove.
102         (dfs_assert_unmarked_p): Remove.
103         (assert_canonical_unmarked): Remove.
104         (shared_marked_p, shared_unmarked_p): Remove.
105         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
106         (dfs_access_in_type): Adjust.
107         (access_in_type): Adjust.
108         (dfs_accessible_queue_p): Adjust.
109         (dfs_accessible_p): Adjust.
110         (is_subobject_of_p_1, is_subobject_of_p): Remove.
111         (struct lookup_field_info): Remove from_dep_base_p field.
112         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
113         (lookup_field_r): Remove dependent base code.
114         (lookup_member): Likewise.
115         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
116         (dfs_unmarked_real_bases_queue_p): Remove.
117         (dfs_marked_real_bases_queue_p): Remove.
118         (dfs_skip_vbases): Remove.
119         (dfs_get_pure_virtuals): Adjust.
120         (markedp, unmarkedp): Adjust.
121         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
122         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
123         (dfs_unmark): Adjust.
124         (dfs_get_vbase_types):Remove.
125         (dfs_build_inheritance_graph_order): Remove.
126         (get_vbase_types): Remove
127         (dfs_find_vbase_instance): Remove.
128         (find_vbase_instance): Remove.
129         (dfs_debug_unmarkedp): Adjust.
130         (dependent_base_p): Remove.
131         (dfs_push_type_decls): Adjust.
132         (dfs_push_decls): Adjust.
133         (dfs_no_overlap_yet): Adjust.
134         (copied_binfo): New function.
135         (original_binfo): New function.
136         (binfo_for_vbase): Remove.
137
138 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
139
140         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
141         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
142         vectors, for speed.
143
144 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
145
146         PR c++/9704
147         * class.c (layout_class_type): In the 3.2 ABI, take into account
148         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
149
150 2003-02-18  Matt Austern <austern@apple.com>
151         
152         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
153         nothing for C++.
154         * cp/decl.c (wrapup_globals_for_namespace): Remove special
155         handling of global namespace.
156         
157 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
158
159         * cp-tree.h (rid_to_yy): Delete.
160         (C_RID_YYCODE): Delete.
161         (finish_file): Delete redundant declaration.
162
163 2003-02-18  Jason Merrill  <jason@redhat.com>
164
165         PR c++/9623
166         * decl.c (reshape_init): Don't mess with initializer labels.
167
168 2003-02-18  Ben Elliston  <bje@redhat.com>
169
170         PR other/7350
171         * decl.c (duplicate_decls): Fix typo in comment.
172
173 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
174
175         PR debug/9717
176         * class.c (build_base_field): Mark fields for base classes with
177         DECL_IGNORED_P.
178
179 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
180
181         PR c++/9457
182         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
183         CONSTRUCTOR_ELTS only once.
184
185 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
186
187         PR c++/9459
188         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
189         (dump_type_suffix): Likewise.
190
191 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
192
193         * search.c: ANSIfy function declarations and definitions.
194         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
195         * call.c (build_method_call, resolve_scoped_fn_name,
196         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
197         calls.
198         * class.c (handle_using_decl): Likewise.
199         * decl.c (make_typename_type, make_unmound_class_template,
200         start_decl, compute_array_index_type): Likewise.
201         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
202         * init.c (expand_member_init, build_member_call): Likewise.
203         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
204         resolve_typename_type): Likewise.
205         * typeck.c (lookup_destructor, finish_class_member_access_exprm
206         build_prememfunc_access_expr): Likewise.
207
208 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
209
210         * decl2.c: Include "timevar.h".
211         (namespace_ancestor): Time name lookup.
212         (add_using_namespace): Likewise.
213         (lookup_using_namespace): Likewise.
214         (qualified_lookup_using_namespace): Likewise.
215         (decl_namespace): Likewise.
216         (lookup_arg_dependent): Likewise.
217         * lex.c (do_identifier): Likewise.
218         (do_scoped_id): Likewise.
219         * pt.c (lookup_template_class): Likewise.
220
221 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
222
223         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
224         
225 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
226
227         * decl.c: Include "timevar.h".
228         (poplevel): Time name lookup.
229         (find_binding): Likewise.
230         (push_namespace): Likewise.
231         (pop_nested_namespace): Likewise.
232         (store_bindings): Likewise.
233         (maybe_push_to_top_level): Likewise.
234         (pop_from_top_level): Likewise.
235         (push_local_name): Likewise.
236         (pushtag): Likewise.
237         (pushdecl): Likewise.
238         (pushdecl_with_scope): Likewise.
239         (pushdecl_namespace_level): Likewise.
240         (pushdecl_top_level): Likewise.
241         (pushdecl_class_level): Likewise.
242         (push_class_level_binding): Likewise.
243         (push_using_decl): Likewise.
244         (push_using_directive): Likewise.
245         (push_overloaded_decl): Likewise.
246         (lookup_label): Likewise.
247         (define_label): Likewise.
248         (lookup_tag): Likewise.
249         (lookup_tag_reverse): Likewise.
250         (lookup_namespace_name): Likewise.
251         (select_decl): Likewise.
252         (unqualified_namespace_lookup): Likewise.
253         (lookup_name_real): Likewise.
254         (lookup_name_current_level): Likewise.
255         (lookup_type_current_level): Likewise.
256         (maybe_inject_for_scope_var): Likewise.
257         (xref_tag): Likewise.
258
259         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
260         
261 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
262
263         * decl.c (build_enumerator):  Remove unneeded test.
264
265 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
266
267         * cp-tree.h (struct lang_type_header): Make all fields unsigned
268         char.
269
270 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
271
272         PR c++/7129
273         * call.c (z_candidate): Add args.
274         (convert_class_to_reference): Set it.
275         (implicit_conversion): Tidy.
276         (add_candidate): Add args parameter.
277         (add_function_candidate): Adjust call to add_candidate.
278         (add_conv_candidate): Likewise.
279         (build_builtin_candidate): Likewise.
280         (build_user_type_conversion_1): Eliminate wasteful tree_cons
281         usage.
282         (build_new_function_call): Likewise.
283         (build_object_call): Likewise.
284         (add_candidates): New function.
285         (build_new_op): Use it.
286         (covert_like_real): Adjust call to build_over_call.
287         (build_over_call): Remove args parameter.
288         * operators.def: Add <?= and >?=.
289
290 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
291
292         * typeck.c (build_indirect_ref): Don't check flag_volatile.
293
294 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
295
296         PR c++/8849
297         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
298
299 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
300
301         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
302         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
303         (BINFO_LANG_ELTS): New #define.
304         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
305
306 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
307
308         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
309
310 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
311
312         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
313         for class types.
314         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
315         rather than TYPE_LANG_FLAG_0.
316         (TYPE_BUILT_IN): Remove.
317         (TYPE_DEPENDENT_P): New macro.
318         (TYPE_DEPENDENT_P_VALID): Likewise.
319         (lang_type_class): Add fields_readonly.
320         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
321         * pt.c (dependent_type_p_r): New function, split out from ...
322         (dependent_type_p): ... here.  Memoize results.
323         * search.c (dependent_base_p): Use dependent_type_p, not
324         uses_template_parms.
325         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
326         for class types.
327
328 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
329
330         * call.c (build_field_call): Use build_new_op, not build_opfncall.
331         (prep_operand): New function.
332         (build_new_op): Use it.  Remove dead code.
333         * class.c (pushclass): Change "modify" parameter type from int to
334         bool.
335         (currently_open_class): Use same_type_p, not pointer equality.
336         (push_nested_class): Adjust calls to pushclass, remove modify
337         parameter.
338         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
339         (pushclass): Change prototype.
340         (push_nested_class): Likewise.
341         (grokoptypename): Remove.
342         (build_opfncall): Remove.
343         (value_dependent_expression_p): Declare.
344         (resolve_typename_type): Likewise.
345         (resolve_typename_type_in_current_instantiation): Likewise.
346         (enter_scope_of): Remove.
347         (tsubst): Remove.
348         (tsubst_expr): Likewise.
349         (tsubst_copy): Likewise.
350         (tsubst_copy_and_build): Likewise.
351         * decl.c (warn_about_implicit_typename_lookup): Remove.
352         (finish_case_label): Return error_mark_node for erroneous labels.
353         (start_decl): Adjust calls to push_nested_class.
354         (grokfndecl): Call push_scope/pop_scope around call to
355         duplicate_decls.
356         (grokdeclarator): Do not call tsubst.
357         (start_function): Adjust calls to push_nested_class.
358         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
359         (check_classfn): Use push_scope/pop_scope around type comparisions.
360         (grokoptypename): Remove.
361         (push_sscope): Adjust call to push_nested_class.
362         * error.c (dump_type): Show cv-qualification of typename types.
363         * init.c (build_member_call): Use build_new_op, not
364         build_opfncall.
365         * method.c (build_opfncall): Remove.
366         * parser.c (cp_parser): Add allow_non_constant_expression_p and
367         non_constant_expression_p.
368         (cp_parser_constant_expression): Adjust prototype.
369         (cp_parser_resolve_typename_type): Remove.
370         (cp_parser_non_constant_expression): New function.
371         (cp_parser_non_constant_id_expression): Likewise.
372         (cp_parser_new): Set allow_non_constant_expression_p and
373         non_constant_expression_p.
374         (cp_parser_primary_expression): Reject `this' and `va_arg' in
375         constant-expressions.  Note that dependent names aren't really
376         constant.
377         (cp_parser_postfix_expression): Reject conversions to non-integral
378         types in constant-expressions.  Neither are increments or
379         decrements.
380         (cp_parser_unary_expression): Reject increments and decrements in
381         constant-expressions.
382         (cp_parser_direct_new_declarator): Adjust call to
383         cp_parser_constant_expression.
384         (cp_parser_cast_expression): Reject conversions to non-integral
385         types in constant-expressions.
386         (cp_parser_assignment_expression): Rejects assignments in
387         constant-expressions.
388         (cp_parser_expression): Reject commas in constant-expressions.
389         (cp_parser_labeled_statement): Adjust call to
390         cp_parser_constant_expression.
391         (cp_parser_direct_declarator): Simplify array bounds, even in
392         templates, when they are non-dependent.  Use
393         resolve_typename_type, not cp_parser_resolve_typename_type.
394         (cp_parser_class_head): Use resolve_typename_type, not
395         cp_parser_resolve_typename_type.
396         (cp_parser_member_declaration): Adjust call to
397         cp_parser_constant_expression.
398         (cp_parser_constant_initializer): Likewise.
399         (cp_parser_constructor_declarator): Use resolve_typename_type, not
400         cp_parser_resolve_typename_type.
401         (cp_parser_late_parsing_default_args): Adjust call to
402         push_nested_class.
403         * pt.c (tsubst): Give it internal linkage.
404         (tsubst_expr): Likewise.
405         (tsubst_copy): Likewise.
406         (tsubst_copy_and_build): Likewise.
407         (push_access_scope_real): Likewise.
408         (tsubst_friend_class): Likewise.
409         (instantiate_class_template): Adjust call to pushclass.
410         (value_dependent_expression_p): Give it external linkage.
411         Robustify.
412         (resolve_typename_type): New function.
413         * semantics.c (finish_call_expr): Use build_new_op, not
414         build_opfncall.
415         (begin_constructor_declarator): Remove.
416         (begin_class_definition): Adjust call to pushclass.
417         (enter_scope_of): Remove.
418         * typeck.c (comptypes): Resolve typename types as appropriate.
419         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
420         (build_x_compound_expr): Likewise.
421         (build_modify_expr): Likewise.
422         (build_x_modify_expr): Likewise.
423         * typeck2.c (build_x_arrow): Likewise.
424         
425 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
426
427         * pt.c (last_pending_template) Declare GTY().
428
429 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
430
431         PR c++/8591
432         * parser.c (cp_parser_elaborated_type_specifier): Convert
433         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
434         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
435
436 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
437
438         PR c++/9437
439         * pt.c (unify): Don't unify '*T' with 'U C::*'.
440
441         PR c++/3902
442         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
443         inside a declarator.
444
445 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
446
447         * class.c (update_vtable_entry_for_fn): Add index parameter.
448         Generate vcall thunk for covariant overriding from a virtual
449         primary base.
450         (dfs_modify_vtables): Adjust.
451
452 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
453
454         PR c++/9403
455         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
456         template keyword.
457         (cp_parser_base_specifier): Look for and consume a
458         TEMPLATE keyword. Replace switch with array index.
459
460         PR c++/795
461         * semantics.c (finish_non_static_data_member): Remember the
462         field's type even in a template.
463
464         PR c++/9415
465         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
466         already scoped.
467         
468         PR c++/8545
469         * parser.c (cp_parser_cast_expression): Be more tentative.
470
471 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
472
473         * cp-tree.h (flagged_type_tree_s): Remove.
474         (check_for_new_type): Likewise.
475         * typeck2.c (check_for_new_type): Likewise.
476
477 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
478
479         * dump.c: ANSIfy function declarations and definitions.
480
481         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
482
483 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
484
485         PR c++/9354
486         * init.c (build_new): Set the type of the new-expression, even
487         when processing_templte_decl.
488
489         PR c++/9216
490         * parser.c (cp_parser_primary_expression): Improve error message
491         for templates used in an expression context.
492
493         PR c++/8696
494         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
495         parse when encountering "typedef".
496
497 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
498
499         * class.c, parser.c: ANSIfy function definitions and declarations.
500
501 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
502
503         PR c++/9328
504         * error.c (dump_decl): For an OVERLOAD, just print the name of the
505         function; it doesn't make sense to try to print its type.
506         * semantics.c (finish_typeof): Issue errors about invalid uses.
507
508         PR c++/9298
509         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
510         function.
511         (cp_parser_expression_statement): Use it.
512         (cp_parser_explicit_instantiation): Likewise.
513         * pt.c (do_decl_instantiation): Improve error handling logic.
514         
515 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
516
517         PR c++/9384
518         * parser.c (cp_parser_using_declaration): Issue error messages
519         about name resolution failures here.
520
521         PR c++/9388
522         * class.c (currently_open_derived_class): Use dependent_type_p.
523         * cp-tree.h (dependent_type_p): New function.
524         (dependent_template_arg_p): Likewise.
525         (dependent_template_p): Likewise.
526         (type_dependent_expression_p): Likewise.
527         * parser.c (cp_parser_dependent_type_p): Remove.
528         (cp_parser_value_dependent_type_p): Likewise.
529         (cp_parser_type_dependent_expression_p): Likewise.
530         (cp_parser_dependent_template_arg_p): Likewise.
531         (cp_parser_dependent_template_id_p): Likewise.
532         (cp_parser_dependent_template_p): Likewise.
533         (cp_parser_diagnose_invalid_type_name): Replace
534         cp_parser_dependent_type_p with dependent_type_p, etc.
535         (cp_parser_primary_expresion): Likewise.
536         (cp_parser_nested_name_specifier_opt): Likewise.
537         (cp_parser_postfix_expression): Likewise.
538         (cp_parser_unary_expression): Likewise.
539         (cp_parser_template_name): Likewise.
540         (cp_parser_class_name): Likewise.
541         (cp_parser_lookup_name): Likewise.
542         * pt.c (dependent_type_p): New function.
543         (value_dependent_expression_p): Likewise.
544         (type_dependent_expression_p): Likewise.
545         (dependent_template_arg_p): Likewise.
546         (dependent_template_id_p): Likewise.
547         (dependent_template_p): Likewise.
548         
549         PR c++/9285
550         PR c++/9294
551         * parser.c (cp_parser_simple_declaration): Return quickly when
552         encountering errors.
553
554 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
555
556         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
557
558 2003-01-17  Jason Merrill  <jason@redhat.com>
559
560         PR c++/9167, c++/9358
561         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
562
563 2003-01-17  Jason Merrill  <jason@redhat.com>
564
565         PR c++/9342
566         * call.c (build_conditional_expr): Always do lvalue-rvalue
567         conversion.
568
569 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
570
571         PR c++/9294
572         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
573         * cp-tree.h (BASELINK_BINFO): Adjust.
574         (BASELINK_FUNCTIONS): Likewise.
575         (BASELINK_ACCESS_BINFO): Likewise.
576         (tree_baselink): New structure.
577         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
578         (lang_tree_node): Add baselink.
579         * decl.c (cp_tree_node_structure): Add BASELINK case.
580         * search.c (build_baselink): Adjust.
581         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
582         test from TREE_LIST case.
583
584         PR c++/9272
585         * parser.c (cp_parser_constructor_declarator_p): Do not assume
586         that a constructor cannot be declared outside of its own class.
587         
588         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
589         be resolved, neither can the qualified name.
590
591         * rtti.c (get_pseudo_ti_desc): Fix thinko.
592
593 2003-01-16  Jason Merrill  <jason@redhat.com>
594
595         PR c++/8564
596         * init.c (build_vec_init): Re-add maxindex parm.
597         (perform_member_init, build_aggr_init): Pass it.
598         (build_new_1): Pass it. Use an incomplete array type for full_type.
599         * typeck.c (build_modify_expr): Pass it.
600         * cp-tree.h: Adjust.
601
602 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
603
604         * cp-tree.h (tsubst_copy_and_build): New declaration.
605         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
606         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
607         (tsubst_copy_and_build): New function.
608
609 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
610
611         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
612         (PARTIAL_INSTANTIATION_P): Remove.
613         (IMPLICIT_TYPENAME_P): Likewise.
614         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
615         (build_typename_type): Remove declaration.
616         (parmlist_is_exprlist): Likewise.
617         * decl.c (build_typename_type): Make it static, remove third
618         parameter.
619         (push_class_binding): Don't do implicit typename stuff.
620         (make_typename_type): Likewise.
621         (lookup_name_real): Likewise.
622         (grokdeclarator): Don't try to convert declarations into
623         initializations.  Don't do implicit typename stuff.
624         (parmlist_is_exprlist): Remove.
625         (xref_basetypes): Simplify.
626         * decl2.c (grokfield): Don't try to convert declarations into
627         initializations.
628         (build_anon_union_vars): Do this while processing templates, too.
629         (finish_anon_union): Likewise.
630         * error.c (dump_type): Remove implicit typename handling.
631         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
632         (cp_parser_primary_expression): Correct handling of names not
633         found by unqualified name lookup in templates.
634         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
635         of types when possible.
636         (cp_parser_simple_declaration): Complain intelligently about some
637         invalid declarations.
638         (cp_parser_member_declaration): Likewise.
639         (cp_parser_constructor_declarator_p): Don't check when we're in a
640         function scope.
641         * pt.c (instantiate_class_template): Remove
642         PARTIAL_INSTANTIATION_P gunk.
643         * search.c (lookup_field_r): Don't build implicit typenames.
644         (marked_pushdecls_p): Don't enter dependent base types.
645         (unmarked_pushdecls_p): Likewise.
646         * semantics.c (begin_class_definition): Remove implicit typename
647         stuff.
648
649 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
650
651         PR c++/9212
652         * parser.c (cp_parser_direct_declarator): If accepting either
653         abstract or named, the name must be an unqualified-id.
654
655 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
656
657         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
658
659 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
660
661         * decl2.c (check_classfn): Fix uninitialized warning.
662         (build_anon_union_vars): Likewise.
663         * pt.c (tsubst_copy): Likewise.
664
665 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
666
667         Further conform g++'s __vmi_class_type_info to the C++ ABI
668         specification.
669         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
670         the specification.
671         (class_hint_flags): Likewise.
672
673 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
674
675         * config-lang.in: Add semantics.c to gtfiles.
676         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
677         (saved_scope): Likewise.
678         (type_lookups): Remove.
679         (deferred_access): New structure.
680         (type_access_control): Remove.
681         (save_type_access_control): Likewise.
682         (reset_type_access_control): Likewise.
683         (decl_type_access_control): Likewise.
684         (push_deferring_access_checks): Declare.
685         (resume_deferring_access_checks): Likewise.
686         (stop_deferring_access_checks): Likewise.
687         (pop_deferring_access_checks): Likewise.
688         (get_deferred_access_checks): Likewise.
689         (pop_to_parent_deferring_access_checks): Likewise.
690         (perform_deferred_access_checks): Likewise.
691         (perform_or_defer_access_check): Likewise.
692         * decl.c (make_typename_type): Use perform_or_defer_access_check.
693         (make_unbound_class_template): Likewise.
694         (grokdeclarator): Don't call decl_type_access_control.
695         * parser.c (cp_parser_context): Remove deferred_access_checks
696         and deferring_access_checks_p fields.
697         (cp_parser_context_new): Adjust.
698         (cp_parser): Remove access_checks_lists.
699         (cp_parser_defer_access_check): Remove.
700         (cp_parser_start_deferring_access_checks): Remove.
701         (cp_parser_stop_deferring_access_checks): Remove.
702         (cp_parser_perform_deferred_access_checks): Remove.
703         (cp_parser_nested_name_specifier_opt): Use new deferred access
704         functions.
705         (cp_parser_simple_declaration): Likewise.
706         (cp_parser_template_id): Likewise.
707         (cp_parser_function_definition): Likewise.
708         (cp_parser_class_specifier): Likewise.
709         (cp_parser_lookup_name): Likewise.
710         (cp_parser_single_declaration): Likewise.
711         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
712         (cp_parser_parse_tentatively): Likewise.
713         (cp_parser_parse_definitely): Likewise.
714         (yyparse): Likewise.
715         (cp_parser_init_declarator): Remove access_checks parameter.
716         Use new deferred access functions.
717         (cp_parser_function_definition_from_specifiers_and_declarator):
718         Likewise.
719         (cp_parser_class_head): Remove deferring_access_checks_p and
720         saved_access_checks parameters.  Use new deferred access functions.
721         (cp_parser_member_specification_opt): Don't call
722         reset_type_access_control.
723         * search.c (type_access_control): Remove.
724         * semantics.c: Include "gt-cp-semantics.h".
725         (deferred_type_access_control): Remove.
726         (deferred_access_stack): New variable.
727         (deferred_access_free_list): Likewise.
728         (push_deferring_access_checks): New function.
729         (resume_deferring_access_checks): Likewise.
730         (stop_deferring_access_checks): Likewise.
731         (pop_deferring_access_checks): Likewise.
732         (get_deferred_access_checks): Likewise.
733         (pop_to_parent_deferring_access_checks): Likewise.
734         (perform_deferred_access_checks): New function, adapted from
735         cp_parser_perform_deferred_access_checks.
736         (perform_or_defer_access_check): New function, adapted from
737         cp_parser_defer_access_check.
738         (current_type_lookups): Remove.
739         (deferred_type_access_control): Likewise.
740         (decl_type_access_control): Likewise.
741         (save_type_access_control): Likewise.
742         (reset_type_access_control): Likewise.
743         (begin_function_definition): Adjust.
744         (begin_class_definiton): Likewise.
745
746 2003-01-13  Jason Merrill  <jason@redhat.com>
747
748         PR c++/8748
749         * class.c (build_base_path): Take the address before calling save_expr.
750
751         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
752         all the ambiguous conversions are bad.
753
754         * class.c (maybe_warn_about_overly_private_class): Don't stop
755         searching when we find a nonprivate method.
756
757         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
758
759 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
760
761         * cp-tree.h (get_arglist_len_in_bytes): Remove.
762
763         PR c++/9264
764         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
765         typeame types more robustly.
766
767 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
768
769         * parser.c:  Fix comment typos.
770
771 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
772
773         PR c++/9099
774         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
775         an object_type which is not a class type.
776
777 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
778
779         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
780         (cp_parser_late_parsing_default_args): Likewise.
781
782 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
783
784         * cfns.gperf: ANSIfy function declarations.
785         * cfns.h: Regenerate.
786         * cp-tree.h: ANSIfy function declarations.
787
788 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
789
790         * cp-tree.h (reparse_absdcl_as_expr): Remove.
791         (reparse_absdcl_as_casts): Likewise.
792         (reparse_decl_as_expr): Likewise.
793         (finish_decl_parsing): Likewise.
794         * decl2.c (reparse_absdcl_as_expr): Remove.
795         (reparse_absdcl_as_casts): Likewise.
796         (repase_decl_as_expr): Likewise.
797         (finish_decl_parsing): Likewise.
798
799         PR c++/9128
800         PR c++/9153
801         PR c++/9171
802         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
803         function.
804         (cp_parser_nested_name_specifier_opt): Correct the
805         check_dependency_p false.
806         (cp_parser_postfix_expression): Fix formatting.
807         (cp_parser_decl_specifier_seq): Avoid looking for constructor
808         declarators when possible.
809         (cp_parser_template_id): Avoid performing name-lookup when
810         possible.
811         (cp_parser_class_head): Do not count specializations when counting
812         levels of templates.
813         (cp_parser_constructor_declarator_p): Return immediately if
814         there's no chance that the tokens form a constructor declarator.
815         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
816         expression with reference type.
817         (get_tinfo_decl_dynamic): Do not return an expression with
818         reference type.
819         (build_typeid): Add comment.  Do not return an expression with
820         reference type.
821         * typeck.c (build_class_member_access_expr): Improve handling of
822         conditionals and comma-expressions as objects.
823
824 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
825
826         * cfns.gperf: ANSIfy function declarations.
827         * cfns.h: Regenerate.
828         * cp-tree.h: ANSIfy function declarations.
829         * parser.c: ANSIfy function declarations & definitions.
830
831         * decl.c (bad_specifiers): Fix parameter order error I introduced.
832
833 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
834
835         Merge from pch-branch:
836
837         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
838
839         Merge to tag pch-merge-20030102:
840         
841         * semantics.c (finish_translation_unit): Don't call finish_file.
842         * parser.c: Don't include ggc.h.
843         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
844         read first token here.  Don't allow PCH files after the first
845         token is read.
846         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
847         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
848         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
849         (cp_parser_late_parsing_for_member): Don't duplicate call to
850         cp_lexer_set_source_position_from_token.
851         (cp_parser_late_parsing_default_args): Likewise.
852         (yyparse): Call finish_file after clearing the_parser.
853
854         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
855
856         * Make-lang.in: Remove $(GGC_H) from all dependencies.
857         (CXX_TREE_H): Add $(GGC_H).
858         * class.c: Don't include ggc.h. 
859         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
860         (method_name_cmp): Likewise.
861         (resort_data): New variable.
862         (resort_field_decl_cmp): New.
863         (resort_method_name_cmp): New.
864         (resort_sorted_fields): New.
865         (resort_type_method_vec): New.
866         (finish_struct_methods): Delete cast.
867         (finish_struct_1): Delete cast.
868         * cp-tree.h: Include ggc.h.
869         (struct lang_type_class): Add reorder attribute to field `methods'.
870         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
871         (resort_sorted_fields): New prototype.
872         (resort_type_method_vec): New prototype.
873         * call.c: Don't include ggc.h.
874         * decl.c: Likewise.
875         * decl2.c: Likewise.
876         * init.c: Likewise.
877         * lex.c: Likewise.
878         * method.c: Likewise.
879         * optimize.c: Likewise.
880         * parse.y: Likewise.
881         * pt.c: Likewise.
882         * repo.c: Likewise.
883         * search.c: Likewise.
884         * semantics.c: Likewise.
885         * spew.c: Likewise.
886         * tree.c: Likewise.
887
888         * lang-specs.h: Remove comment.
889
890         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
891
892         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
893         (operator_name_info): Mark to be saved for PCH, specify size.
894         (assignment_operator_name_info): Likewise.
895
896         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
897
898         * decl.c (anon_cnt): Mark to be saved for PCH.
899
900         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
901
902         * lex.c  (init_reswords): Delete now-untrue comment.
903         Allocate ridpointers using GGC.
904
905         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
906
907         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
908
909         * g++spec.c (lang_specific_driver): Don't include standard
910         libraries in `added'.
911
912         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
913
914         * decl2.c (finish_file): Call c_common_write_pch.
915         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
916
917         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
918
919         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
920         files when using g++.
921         * lang-specs.h: Handle compiling C++ header files.
922
923 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
924
925         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
926
927 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
928
929         * pt.c (push_access_scope_real): Call push_to_top_level for
930         function in namespace scope.
931         (pop_access_scope): Call pop_from_top_level for function in
932         namespace scope.
933
934 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
935
936         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
937
938 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
939
940         * Make-lang.in (c++.install-common, c++.install-man,
941         c++.uninstall): Prepend $(DESTDIR) to destination paths in
942         all (un)installation commands.
943         (c++.install-common): Rewrite $(LN) commands to support
944         DESTDIR with "ln" as well as with "ln -s".
945
946 2003-01-08  Jason Merrill  <jason@redhat.com>
947
948         * parser.c (cp_parser_primary_expression): See through explicitly
949         scoped ALIAS_DECLs, too.
950
951 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
952
953         * decl.c: Remove some #if 0 code.
954
955         * decl.c: ANSIfy function declarations.
956
957 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
958
959         * parser.c (cp_parser_asm_definition): Correct handling of omitted
960         operands.
961
962 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
963
964         PR c++/9030
965         * decl.c (make_typename_type): Check access only when tf_error.
966         (make_unbound_class_template): Likewise.
967         * pt.c (saved_access_scope): New variable.
968         (push_access_scope_real): New function.
969         (push_access_scope): Likewise.
970         (pop_access_scope): Likewise.
971         (tsubst_default_argument): Use them.
972         (instantiate_template): Likewise.
973         (regenerate_decl_from_template): Likewise.
974         (instantiate_decl): Likewise.
975         (get_mostly_instantiated_function_type): Likewise.
976
977 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
978
979         * tree.c: Delete bogus #if 0 code.
980
981 2003-01-07  Andreas Schwab  <schwab@suse.de>
982
983         * class.c (layout_class_type): Don't use
984         PCC_BITFIELD_TYPE_MATTERS if not defined.
985
986 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
987
988         PR c++/9165
989         * decl2.c (build_cleanup): Mark the object as used.
990
991         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
992         (hash_local_specialization): New function.
993         (register_local_specialization): Revert 2003-01-05 change.
994         (instantiate_decl): Use hash_local_specialization when creating
995         the local_specializations table.
996         
997         * decl2.c (mark_used): Do not synthesize thunks.
998
999         * class.c (layout_class_type): Correct handling of unnamed
1000         bitfields wider than their types.
1001
1002         PR c++/9189
1003         * parser.c (cp_parser): Remove default_arg_types.  Update
1004         documentation for unparsed_functions_queues.
1005         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
1006         parameter.
1007         (cp_parser_new): Don't set parser->default_arg_types.
1008         (cp_parser_function_definition): Adjust usage of
1009         unparsed_funtions_queues.
1010         (cp_parser_class_specifier): Don't mess with
1011         parser->default_arg_types.  Handle default argument processing in
1012         a separate phase from function body processing.
1013         (cp_parser_template_declaration_after_export): Adjust usage of
1014         unparsed_functions_queues.
1015         (cp_parser_late_parsing_for_member): Do not handle default
1016         arguments.
1017
1018 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
1019
1020         PR c++/9109
1021         * parser.c (cp_parser_declarator_kind): New enum.
1022         (cp_parser_declarator): Adjust.
1023         (cp_parser_direct_declarator): Adjust. Allow for either named or
1024         abstract declarator. Prefer abstract, if possible. Allow
1025         parenthesized function name.
1026         (cp_parser_condition): Adjust cp_parser_declarator call.
1027         (cp_parser_explicit_instantiation): Likewise.
1028         (cp_parser_init_declarator): Likewise.
1029         (cp_parser_type_id): Likewise.
1030         (cp_parser_function_definition): Likewise.
1031         (cp_parser_member_declaration): Likewise.
1032         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
1033         the tentative parsing.
1034         (cp_parser_exception_declaration): Likewise.
1035
1036 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
1037
1038         * parser.c (cp_parser_template_parameter): Adjust call to
1039         cp_parser_parameter_declaration.
1040         (cp_parser_parameter_declaration_list): Likewise.
1041         (cp_parser_parameter_declaration): Replace
1042         greater_than_is_operator_p with template_parm_p parameter.  Do not
1043         cache tokens for template default arguments.
1044
1045         * pt.c (retrieve_local_specialization): Use htab_find, not
1046         htab_find_with_hash.
1047         (register_local_specialization): Use htab_find_slot, not
1048         htab_find_slot_with_hash.
1049         (instantiate_decl): Pass a hash function to htab_create.
1050         
1051 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1052
1053         * parser.c (cp_parser_binary_expression,
1054         cp_parser_multiplicative_expression,
1055         cp_parser_additive_expression, cp_parser_shift_expression,
1056         cp_parser_relational_expression, cp_parser_equality_expression,
1057         cp_parser_and_expression, cp_parser_exclusive_or_expression,
1058         cp_parser_inclusive_or_expression,
1059         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
1060         cp_parser_binary_expression): Const-ify.
1061
1062 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
1063
1064         * method.c (use_thunk): Disable access control while building the
1065         body of the thunk.
1066
1067 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
1068
1069         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C 
1070         front end.
1071
1072 2003-01-03  Matt Austern  <austern@apple.com>
1073
1074         * cp-tree.h (struct lang_type_class): add field for key method
1075         (cp_global_trees): rename dynamic_classes to keyed_classes
1076         (key_method): add definition
1077         * class.c (finish_struct_1): compute class's key method, and add
1078         the class to keyed_classes list if there is no key method.
1079         * decl.c (finish_function): add class to keyed_classes list if we
1080         see a definition of the class's key method.
1081         * pt.c (instantiate_class_template): add template specialization
1082         of a dynamic class to keyed_classes list.
1083         * decl2.c (key_method): remove
1084         (finish_file): iterate only through keyed_classes list when
1085         deciding whether to emit vtables, remove class from its list after
1086         we do the emission.
1087         
1088 2003-01-02  Jason Merrill  <jason@redhat.com>
1089
1090         * call.c (build_conditional_expr): Stabilize lvalues properly.
1091         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
1092         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
1093         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
1094
1095         * call.c (convert_like_real): Call decl_constant_value for an
1096         IDENTITY_CONV even if there are no more conversions.
1097
1098         * cvt.c (build_up_reference): Don't push unnamed temps.
1099
1100         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
1101
1102         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
1103         for a backend struct.
1104
1105         * except.c (wrap_cleanups_r, build_throw): Make
1106         MUST_NOT_THROW_EXPRs void.
1107         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
1108
1109         * init.c (build_vec_delete_1): Pre-evaluate the base address.
1110
1111         * init.c (get_temp_regvar): Simplify logic.
1112
1113         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
1114         our replacement is a decl.
1115
1116         * decl.c (cp_make_fname_decl): Push the decls inside the
1117         outermost scope.
1118
1119 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
1120
1121         PR c++/45, c++/3784
1122         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
1123         the same too.
1124
1125 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
1126
1127         * parser.c (struct cp_parser): Add access_checks_lists field
1128         (cp_parser_simple_declaration): Use.
1129         (cp_parser_init_declarator): Likewise. 
1130
1131 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
1132
1133         * parser.c (cp_parser_declaration): Accept the __extension__
1134         keyword before the declaration.
1135
1136         PR c++/2843
1137         * parser.c (cp_parser_parameter_declaration): Allow attributes to
1138         appear after the declarator.
1139
1140         * call.c (build_new_method_call): Fix typo in message format
1141         string.
1142
1143 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
1144
1145         * parser.c (cp_lexer_next_token_is): Declare it inline.
1146         (cp_lexer_set_source_position_from_token): Likewise.
1147         (cp_lexer_debugging_p): Likewise.
1148         (cp_parser_parsing_tentatively): Likewise.
1149         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
1150         to the cp_lexer_peek_token.
1151
1152         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
1153         expression.
1154
1155 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
1156
1157         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
1158         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
1159         cp/repo.c: Fix copyright years.
1160
1161 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
1162
1163         * lex.c: Remove superfluous include of cpplib.h.
1164         (CONSTRAINT): Define without conditions.
1165         (init_cp_pragma): Use c_register_pragma.
1166
1167 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
1168
1169         * .cvsignore: Remove.
1170
1171 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
1172
1173         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
1174           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
1175           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
1176           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
1177           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
1178           copyright header.
1179         * lex.h: parse.y is dead, so don't mention it.  Also replace the
1180           copyright header with the default GNU copyright header.
1181
1182 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1183
1184         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
1185         (lookup_name_namespace_only): Likewise.
1186         (begin_only_namespace_names): Likewise.
1187         (end_only_namespace_names): Likewise.
1188         * decl.c (only_namespace_names): Remove.
1189         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
1190         (lookup_name_real): Do not check only_namespace_names.
1191         (lookup_name_namespace_only): Remove.
1192         (begin_only_namespace_names): Likewise.
1193         (end_only_namespace_names): Likewise.
1194         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
1195         nested-name-specifiers more gracefully.
1196         (cp_parser_class_or_namespace_name): Avoid looking up namespace
1197         names when they cannot possibly appear.
1198         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
1199         (cp_parser_elaborated_type_specifier): Likewise.
1200         (cp_parser_namespace_name): Only look for namespace names.
1201         (cp_parser_lookup_name): Add is_namespace parameter.
1202         (cp_parser_lookup_name_simple): Adjust call to
1203         cp_parser_lookup_name.
1204
1205         * parser.c (cp_parser_dependent_type_p): Fix thinko.
1206
1207 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
1208
1209         * .cvsignore: Update.
1210
1211 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
1212
1213         * class.c (modify_vtable_entry): Remove unused variable.
1214         (get_vcall_index): Always expect a non-thunk.
1215         (update_vtable_entry_for_fn): Combine covariant adjustments, when
1216         overriding a thunk. Pass get_vcall_index a non-thunk.
1217
1218         * decl2.c (finish_file): Mark undefined inlines as extern.
1219
1220 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1221
1222         * cp-tree.def (RETURN_INIT): Remove.
1223         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
1224         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
1225         (note_level_for_for): Remove.
1226         (note_level_for_try): Likewise.
1227         (note_level_for_catch): Likewise.
1228         (finish_named_return_value): Likewise.
1229         (do_pushlevel): Change prototype.
1230         (pending_lang_change): Remove.
1231         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
1232         sk_for.
1233         (note_level_for_for): Remove.
1234         (note_level_for_try): Likewise.
1235         (note_level_for_catch): Likewise.
1236         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
1237         * parser.c (cp_parser_context_free_list): Make it "deletable".
1238         (cp_parser_template_argument): Remove misleading comment.
1239         * pt.c (tsubst_expr): Remove RETURN_INIT code.
1240         * semantics.c (genrtl_named_return_value): Remove.
1241         (do_pushlevel): Take a scope kind as an argument.
1242         (begin_if_stmt): Adjust.
1243         (begin_while_stmt): Likewise.
1244         (begin_for_stmt): Likewise.
1245         (finish_for_init_stmt): Likewise.
1246         (begin_switch_stmt): Likewise.
1247         (begin_handler): Likewise.
1248         (begin_compound_stmt): Likewise.
1249         (finish_named_return_value): Remove.
1250         (cp_expand_stmt): Remove RETURN_INIT case.
1251         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
1252
1253 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1254
1255         PR c++/9112
1256         * parser.c (cp_parser_direct_declarator): Handle erroneous
1257         parenthesized declarators correctly.
1258
1259 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1260
1261         * cp-tree.h (pending_lang_change): Declare.
1262
1263 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
1264
1265         * parser.c (cp_parser_context_free_list): New variable.
1266         (cp_parser_context_new): Use it.
1267         (cp_parser_error): Check return code from
1268         cp_parser_simulate_error.
1269         (cp_parser_simulate_error): Return a value.
1270         (cp_parser_id_expression): Optimize common case.
1271         (cp_parser_class_name): Likewise.
1272         (cp_parser_class_specifier): Adjust call to
1273         cp_parser_late_parsing_default_args.
1274         (cp_parser_lookup_name): Optimize common case.
1275         (cp_parser_late_parsing_for_member): Adjust call to
1276         cp_parser_late_parsing_default_args.
1277         (cp_parser_late_parsing_default_args): Add scope parameter.
1278         (cp_parser_require): Avoid creating the error message unless it's
1279         needed.
1280         (cp_parser_parse_definitely): Place free'd contexts on the free
1281         list.
1282
1283         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
1284
1285 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
1286
1287         * parser.c (cp_parser_parameter_declaration_clause): Treat system
1288         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
1289
1290 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
1291
1292         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
1293         GCC, not GNU CC.
1294
1295 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
1296
1297         * parse.y: Remove.
1298         * spew.c: Likewise.
1299         * Make-lang.in (gt-cp-spew.h): Remove.
1300         * cp-tree.h (do_pending_lang_change): Remove.
1301         (do_identifier): Change prototype.
1302         (finish_id_expr): Remove.
1303         * decl.c (lookup_name_real): Remove yylex variable.
1304         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
1305         * lex.c (init_cpp_parse): Remove.
1306         (reduce_cmp): Likewise.
1307         (token_cmp): Likewise.
1308         (yychar): Likewise.
1309         (lastiddecl): Likewise.
1310         (token_count): Likewise.
1311         (reduce_count): Likewise.
1312         (yyhook): Likewise.
1313         (print_parse_statistics): Likewise.
1314         (do_pending_lang_change): Likewise.
1315         (do_identifier): Remove parsing parameter.
1316         * lex.h (lastiddecl): Remove.
1317         (looking_for_typename): Remove.
1318         (looking_for_template): Likewise.
1319         (pending_lang_change): Likewise.
1320         (yylex): Likewise.
1321         * semantics.c (finish_id_expr): Remove.
1322
1323         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
1324         thread" correctly.
1325
1326 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
1327
1328         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
1329         end, not the C front end.
1330
1331 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
1332
1333         * cp-tree.h (THUNK_TARGET): New macro.
1334         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
1335         (finish_thunk): Remove offset parms.
1336         * class.c (find_final_overrider): Look through thunks.
1337         (get_vcall_index): Use THUNK_TARGET.
1338         (update_vtable_entry_for_fn): Look through thunks. Set covariant
1339         fixed offset here. Adjust finish_thunk call.
1340         (build_vtbl_initializer): Adjust finish_thunk calls.
1341         * mangle.c (mangle_call_offset): Remove superfluous if.
1342         (mangle_thunk): Adjust.
1343         * method.c (make_thunk): Adjust.
1344         (finish_thunk): Adjust.
1345         (thunk_adjust): Remove assert.
1346         (use_thunk): Use THUNK_TARGET
1347         * dump1.c (cp_dump_tree): Adjust thunk dumping.
1348
1349         PR c++/9054
1350         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
1351         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
1352
1353 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1354
1355         Remove traditional C constructs 4/n.
1356         * decl2.c (grok_method_quals, warn_if_unknown_interface,
1357         grok_x_components, cp_build_parm_decl, build_artificial_parm,
1358         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
1359         delete_sanity, check_member_template, check_java_method,
1360         check_classfn, finish_static_data_member_decl, grokfield,
1361         grokbitfield, grokoptypename, grok_function_init,
1362         cplus_decl_attributes, constructor_name, defer_fn,
1363         build_anon_union_vars, finish_anon_union, coerce_new_type,
1364         coerce_delete_type, comdat_linkage, maybe_make_one_only,
1365         key_method, import_export_vtable, import_export_class,
1366         output_vtable_inherit, import_export_decl, import_export_tinfo,
1367         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
1368         set_guard, start_objects, finish_objects,
1369         start_static_storage_duration_function,
1370         finish_static_storage_duration_function, get_priority_info,
1371         start_static_initialization_or_destruction,
1372         finish_static_initialization_or_destruction,
1373         do_static_initialization, do_static_destruction,
1374         prune_vars_needing_no_initialization, write_out_vars,
1375         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
1376         add_using_namespace, merge_functions, ambiguous_decl,
1377         lookup_using_namespace, lookup_using_namespace,
1378         qualified_lookup_using_namespace, set_decl_namespace,
1379         decl_namespace, current_decl_namespace, push_decl_namespace,
1380         pop_decl_namespace, push_scope, pop_scope, add_function,
1381         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
1382         lookup_arg_dependent, do_namespace_alias,
1383         validate_nonmember_using_decl, do_nonmember_using_decl,
1384         do_toplevel_using_decl, do_local_using_decl,
1385         do_class_using_decl, do_using_directive, check_default_args,
1386         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
1387         * parser.c (cp_parser_class_head): Use booleanss.
1388         * decl.c (walk_globals, walk_vtables): Likewise.
1389         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
1390         walk_globals): Change return type from 'int' to 'bool'.
1391         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
1392         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
1393         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
1394         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
1395         qualifier_flags, tinfo_base_init, generic_initializer,
1396         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
1397         dfs_class_hint_unmark, class_hint_flags, class_initializer,
1398         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
1399         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
1400         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
1401         * repo.c (repo_compile_flags, repo_template_declared,
1402         repo_template_defined, repo_class_defined, repo_get_id,
1403         repo_template_used, repo_vtable_used, repo_inline_used,
1404         repo_tinfo_used, repo_template_instantiated, extract_string,
1405         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
1406         finish_repo): Likewise.
1407         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
1408         cxx_print_xnode): Likewise..
1409         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
1410         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
1411         * cxxfilt.c (demangle_it, print_demangler_list, usage,
1412         standard_symbol_characters, hp_symbol_characters, main, fatal):
1413         Likewise.
1414         (strip_underscore):  Change type from 'int' to 'bool'.
1415         (main): Use boolean constants.
1416
1417 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1418
1419         Remove traditional C constructs 3/n.
1420         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1421         build_up_reference, warn_ref_binding, convert_to_reference,
1422         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
1423         convert_to_void, convert, convert_force, build_type_conversion,
1424         build_expr_type_conversion, type_promotes_to,
1425         perform_qualification_conversions): Use C90 prototyping style.
1426         * decl2.c (grok_array_decl): Use boolean constant.
1427         (delete_sanity): Likewise.
1428         * typeck.c (build_unary_op): Likewise.
1429         * semantics.c (finish_switch_cond): Likewise.
1430         * parser.c (cp_parser_direct_new_declarator): Likewise.
1431         * init.c (build_new): Likewise.
1432
1433 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
1434
1435         * Make-lang.in (po-generated): Remove parse.c.
1436         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
1437         ($(srcdir)/cp/parse.h): Remove target.
1438         ($(srcdir)/cp/parse.c): Likewise.
1439         (gt-cp-parse.h): Likewise.
1440         (gt-cp-parser.h): New target.
1441         (c++.distclean): Do not remove parse.output.
1442         (c++.maintainer-clean): Do not remove parse.c or parse.h.
1443         (cp/spew.o): Remove target.
1444         (cp/lex.o): Adjust dependencies.
1445         (cp/pt.o): Likewise.
1446         (cp/parse.o): Likewise.
1447         (cp/TAGS): Do not mention parse.c.
1448         (cp/parser.o): New target.
1449         * NEWS: Mention the new parser.
1450         * call.c (build_scoped_method_call): Simplify.
1451         (build_method_call): Likewise.
1452         (build_new_function_call): Adjust calls to add_function_candidate
1453         and add_template_candidate.
1454         (build_new_op): Improve handling of erroroneous operands.
1455         (convert_default_arg): Remove circular argument processing.
1456         (name_as_c_string): New function.
1457         (build_new_method_call): Use it.
1458         (perform_implicit_conversion): Use error_operand_p.
1459         * class.c (finish_struct_anon): Use constructor_name_p.
1460         (check_field_decls): Likewise.
1461         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
1462         (resolve_address_of_overloaded_function): Likewise.
1463         (instantiate_type): Tweak pointer-to-member handling.
1464         (get_primary_binfo): Remove incorrect assertion.
1465         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
1466         * cp-tree.h (DEFARG_TOKENS): New macro.
1467         (default_arg): New structure.
1468         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
1469         (lang_tree_node): Add default_arg.
1470         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
1471         (type_info_ref_type): New macro.
1472         (saved_scope): Make processing_explicit_instantiation a boolean.
1473         (check_access): New field.
1474         (unparsed_text): Remove.
1475         (language_function): Remove unparsed_inlines.
1476         (error_operand_p): New macro.
1477         (lang_decl): Adjust pending_inline_info.
1478         (DEFARG_POINTER): Remove.
1479         (tag_types): Add typenames.
1480         (lookup_ualified_name): Declare.
1481         (lookup_name_real): Likewise.
1482         (shadow_tag): Adjust prototype.
1483         (get_scope_of_declarator): Declare it.
1484         (process_next_inline): Remove it.
1485         (check_for_missing_semicolon): Likewise.
1486         (maybe_get_template_decl_from_type_decl): Declare it.
1487         (finish_label_stmt): Adjust prototype.
1488         (finish_non_static_data_meber): Declare it.
1489         (finish_pseudo_destructor_call_expr): Rename to ...
1490         (finish_pseudo_destructor_expr): ... this.
1491         (finish_compound_literal): Declare it.
1492         (begin_inline_definitions): Remove it.
1493         (init_spew): Remove.
1494         (peekyylex): Likewise.
1495         (arbitrate_lookup): Likewise.
1496         (frob_opname): Likewise.
1497         (maybe_snarf_defarg): Likewise.
1498         (add_defarg_fn): Likewise.
1499         (do_pending_defargs): Likewise.
1500         (done_pending_defargs): Likewise.
1501         (unprocessed_defarg_fn): Likewise.
1502         (replace_defarg): Likewise.
1503         (end_input): Likewise.
1504         (get_overloaded_fn): Likewise.
1505         * cvt.c (convert_to_reference): Improve error handling.
1506         * decl.c (lookup_name_real): Do not declare it static.
1507         (maybe_push_to_top_level): Set check_access.
1508         (identifier_type_value): Adjust call to lookup_name_real.
1509         (lookup_qualified_name): New method.
1510         (lookup_name_real): Remove special-case parsing code.
1511         (lookup_name-nonclass): Adjust call to lookup_name_real.
1512         (lookup_name_namespace_only): Likewise.
1513         (lookup_name): Likewise.
1514         (check_tag_decl): Return the type declared.
1515         (shadow_tag): Likewise.
1516         (register_dtor_fn): Tweak check_access.
1517         (grokfndecl): Use constructor_name_p.
1518         (get_scope_of_declarator): New function.
1519         (grokdeclarator): Obscure tweaks for slightly different declarator
1520         representations.
1521         (start_method): Return error_mark_node to indicate failure.
1522         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
1523         * decl2.c (constructor_name_full): Simplify.
1524         (constructor_name): Use it.
1525         (build_expr_from_tree): Adjust for changes to do new parser.
1526         (push_scope): Improve robustness.
1527         (validate_nonmember_using_decl): Process declarations, not names.
1528         (do_class_using_decl): Likewise.
1529         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
1530         here.
1531         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
1532         * expr.c (cxx_expand_expr): Handle BASELINKs.
1533         * init.c (member_init_ok_or_else): Issue more errors.
1534         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
1535         * lex.c: Do not include parse.h.
1536         (yypring): Do not declare.
1537         (yylval): Likewise.
1538         (make_reference_declarator): Remove error-generating code.
1539         (rid_to_yy): Remove.
1540         (cxx_init): Do not call init_spew.
1541         (yypring): Remove.
1542         (check_for_missing_semicolon): Remove.
1543         * lex.h (got_scope): Remove.
1544         (got_object): Remove.
1545         * method.c (hack_identifier): Use finish_non_static_data_member.
1546         (implicitly_declare_fn): Adjust use of constructor_name.
1547         * parser.c: New file.
1548         * pt.c (parse.h): Do not include it.
1549         (maybe_get_template_decl_from_template): Do not declare it.
1550         (finish_member_template_decl): Tweak.
1551         (begin_explicit_instantiation): Adjust for
1552         processing_explicit_instantiation being boolean.
1553         (end_explicit_instantiation): Likewise.
1554         (maybe_process_partial_specialization): Tighten specialization
1555         test.
1556         (retrieve_local_specialization): Adjust ue of hash table.
1557         (eq_local_specializations): New function.
1558         (register_local_specialization): Likewise.
1559         (push_template_decl_real): Remove unnecessary test.
1560         (maybe_get_template_decl_from_type_decl): Don't make it static.
1561         (for_each_template_parm_r): Handle TYPEOF_TYPE.
1562         (tsubst_copy): Use retrieive_local_specialization to handle
1563         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
1564         Handle COMPONENT_REFs with pseudo-destructor-expressions.
1565         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
1566         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
1567         (unify): Tweak handling of CONST_DECLs.
1568         (regenerate_decl_from_template): Use push_nested_class.
1569         (template_for_substitution): New funciton.
1570         (instantiate_decl): Use it.  Register parameters as local
1571         specializations.
1572         * rtti.c (init_rtti_processing): Set type_info_ref_type.
1573         (build_typeid): Use it.
1574         (get_typeid): Likeise.
1575         * search.c (accessible_p): Use check_access, not
1576         flag_access_control.
1577         (adjust_result_of_qualified_name_lookup): Pay attention to the
1578         context_class.
1579         * semantics.c (finish_asm_stmt): Adjust error handling.
1580         (finish_label_stmt): Return the statement.
1581         (finish_non_static_data_member): New function.
1582         (finish_class_expr): Handle BASELINKs.
1583         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
1584         (finish_object_call_expr): Simplify handling during templates.
1585         (finish_pseudo_destructor_call_expr): Rename to ...
1586         (finish_pseudo_dtor_expr): ... this.
1587         (finish_compound_literal): New function.
1588         (begin_inline_definitions): Remove.
1589         (finish_sizeof): Remove special template handling.
1590         * spew.c: Do not include parse.h.
1591         * tree.c (get_overloaded_fn): Remove.
1592         * typeck.c (build_class_member_access_expr): Handle
1593         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
1594         (lookup_destructor): New function.
1595         (finish_class_member_access_expr): Use it.
1596         (convert_arguments): Simplify.
1597         (build_unary_op): Handle BASELINKs.
1598
1599 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
1600
1601         PR c++/4803
1602         * decl2.c (mark_used): Defer inline functions.
1603         (finish_file): Merge deferred_fns loops. Check all used
1604         inline functions have a definition.
1605         * method.c (make_thunk): Thunks are not inline.
1606
1607         PR c++/5116, c++/764
1608         * call.c (build_new_op): Make sure template class operands are
1609         instantiated.
1610
1611 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
1612
1613         PR C++/7964
1614         * cp-tree.h (resolve_scoped_fn_name): Prototype.
1615         * call.c (resolve_scoped_fn_name): New function. Deal with
1616         more template expansion. Broken out of ...
1617         * parse.y (parse_finish_call_expr): ... here. Call it.
1618         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
1619         resolve_scoped_fn_name and build_call_from_tree.
1620
1621         PR c++/9053
1622         * decl.c (duplicate_decls): Templates may be disambiguated by
1623         return type.
1624
1625         PR c++/8702
1626         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
1627         conversion operators on failure.
1628
1629 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1630
1631         Remove traditional C constructs 2/n.
1632         * call.c (tourney, build_field_call, equal_functions, joust,
1633         compare_ics, build_over_call, build_java_interface_fn_ref,
1634         convert_like_real, op_error, build_object_call, resolve_args,
1635         build_vfield_ref, check_dtor_name, build_scoped_method_call,
1636         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
1637         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
1638         standard_conversion, reference_related_p,
1639         reference_compatible_p, convert_class_to_reference,
1640         direct_reference_binding, reference_binding,
1641         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
1642         add_template_conv_candidate, any_viable, any_strictly_viable,
1643         build_this, splice_viable, print_z_candidates,
1644         build_user_type_conversion, build_new_function_call,
1645         conditional_conversion, build_conditional_expr, build_new_op,
1646         build_op_delete_call, enforce_access, call_builtin_trap,
1647         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
1648         convert_default_arg, type_passed_as, convert_for_arg_passing,
1649         in_charge_arg_for_name, is_properly_derived_from,
1650         maybe_handle_implicit_object, maybe_handle_ref_bind,
1651         source_type, add_warning, can_convert, can_convert_arg,
1652         perform_implicit_conversion, can_convert_arg_bad,
1653         initialize_reference, add_conv_candidate,
1654         add_template_candidate_real, add_template_candidate): Ansify.
1655
1656 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
1657
1658         PR c++/8572
1659         * cp-tree.h (grokoptypename): Add SCOPE parameter.
1660         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
1661         if in a template scope.
1662         * parse.y (unoperator): Return the scope.
1663         (operator_name): Adjust grokoptypename call.
1664
1665 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1666
1667         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
1668         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
1669         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
1670
1671 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
1672
1673         * ChangeLog: Fix a typo.
1674         * class.c: Fix comment typos.
1675         * cp-tree.h: Likewise.
1676
1677 2002-12-18  Jason Merrill  <jason@redhat.com>
1678
1679         Handle anonymous unions at the tree level.
1680         C++ ABI change: Mangle anonymous unions using the name of their
1681         first named field (by depth-first search).  Should not cause
1682         binary compatibility problems, though, as the compiler previously
1683         didn't emit anything for affected unions.
1684         * cp-tree.def (ALIAS_DECL): New tree code.
1685         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
1686         first field, not the largest.
1687         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
1688         push the decl, and write it out at namespace scope.
1689         * decl.c (lookup_name_real): See through an ALIAS_DECL.
1690         (pushdecl): Add namespace bindings for ALIAS_DECLs.
1691         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
1692         of a decl which doesn't have one.
1693         * typeck.c (build_class_member_access_expr): Don't recurse if
1694         we already have the type we want.
1695
1696 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1697
1698         PR c++/8099
1699         * friend.c (make_friend_class): Allow partial specialization
1700         when declaration is not a template friend.
1701
1702 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1703
1704         PR c++/3663
1705         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
1706         TREE_PROTECTED to created decl nodes.
1707
1708 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
1709
1710         * class.c (build_base_field): Do not set DECL_PACKED on the
1711         FIELD_DECL.
1712
1713 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1714
1715         * cp-tree.h (struct tree_srcloc): Use location_t.
1716         (SOURCE_LOCUS): New.
1717         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
1718
1719 2002-12-17  Jason Merrill  <jason@redhat.com>
1720
1721         * decl.c (finish_function): Also complain about no return in
1722         templates.
1723         * semantics.c (finish_return_stmt): Also call check_return_expr in
1724         templates.
1725         * typeck.c (check_return_expr): In a template, just remember that we
1726         saw a return.
1727
1728 2002-12-16  Jason Merrill  <jason@redhat.com>
1729
1730         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
1731         of the CALL_EXPR.
1732
1733         * semantics.c (do_pushlevel): Call pushlevel after adding the
1734         SCOPE_STMT.
1735         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
1736         * parse.y (function_body): Go back to using compstmt.
1737         * decl.c (pushdecl): Skip another level to get to the parms level.
1738
1739         * call.c (build_new_method_call): Use is_dummy_object to determine
1740         whether or not to evaluate the object parameter to a static member
1741         function.
1742
1743 2002-12-14  Jason Merrill  <jason@redhat.com>
1744
1745         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
1746         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
1747         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
1748         don't bother with an AGGR_INIT_EXPR.
1749         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
1750         just generate a new decl normally.  Take return slot parm.
1751         * cp-tree.h: Adjust prototype.
1752
1753 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1754
1755         PR C++/8031
1756         * cvt.c (convert_to_pointer_force): Don't try comparing against
1757         erronous type.
1758
1759 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
1760
1761         * cp-tree.h: Have the multiple-include guards around
1762         the entire file.
1763
1764 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
1765
1766         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
1767         for SPEW_DEBUG.
1768         (snarf_method): Same.
1769         (snarf_defarg): Same.
1770
1771 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
1772
1773         PR c++/8372
1774         * pt.c (tsubst_copy): Handle destructor names more correctly.
1775
1776 2002-12-10  Matt Austern   <austern@apple.com>
1777
1778         * cp-tree.h: get rid of needs_virtual_reinit bit.
1779
1780 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
1781
1782         * NEWS: Document removal of in-class initialization extension for
1783         static data members of non-arithmetic, non-enumeration type.
1784         * decl.c (check_static_variable_definition): Do not allow that
1785         extension.
1786         * decl2.c (grokfield): Do not call digest_init when processing
1787         templates.
1788
1789 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1790
1791         * error.c (dump_expr): Fix format specifier warning.
1792
1793 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
1794
1795         * class.c (finish_struct_1): Correct comment.
1796         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
1797
1798 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1799
1800         PR C++/8799
1801         * error.c (dump_expr): Don't ever try to dump a non-existent
1802         expression.
1803
1804 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
1805
1806         Implement covariant returns.
1807         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
1808         (struct lang_decl_flags): Add this_thunk_p flag.
1809         Rename vcall_offset to virtual_offset.
1810         (struct lang_decl): Rename delta to fixed_offset.
1811         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
1812         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
1813         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
1814         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
1815         (make_thunk): Add this_adjusting arg.
1816         (finish_thunk): Declare.
1817         (mangle_thunk): Add this_adjusting arg.
1818         * class.c (get_vcall_index): Use base function for lookup.
1819         (update_vtable_entry_for_fn): Generate covariant thunk.
1820         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
1821         (build_vtbl_initializer): Use base function for lookup.
1822         Finish covariant thunk here. Adjust thunk generation.
1823         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
1824         Adjust thunk dumping.
1825         * mangle.c (mangle_call_offset): New function.
1826         (mangle_thunk): Adjust for covariant thunks.
1827         * method.c (make_thunk): Adjust. Do not set name here.
1828         (finish_thunk): New function. Set name here.
1829         (use_thunk): Generate covariant thunks too.
1830         (thunk_adjust): New function.
1831         * search.c (covariant_return_p): Remove. Fold into ...
1832         (check_final_overrider): ... here. Simplify.
1833         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
1834
1835 2002-12-03  Jason Merrill  <jason@redhat.com>
1836
1837         PR c++/8674
1838         * call.c (build_over_call): Check specifically for TARGET_EXPR
1839         when eliding.
1840
1841         PR c++/8461, c++/8625
1842         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
1843         (cp_convert_parm_for_inlining): Remove.
1844         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
1845         Remove.
1846         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
1847         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
1848
1849         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
1850         an ambiguous conversion.
1851
1852 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
1853
1854         PR c++/8688
1855         * decl.c (reshape_init): Handle erroneous initializers.
1856
1857 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
1858
1859         PR c++/8720
1860         * spew.c (remove_last_token): Make sure that last_chunk is set
1861         correctly.
1862
1863         PR c++/8615
1864         * error.c (dump_expr): Handle character constants with
1865         TREE_OVERFLOW set.
1866
1867 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1868
1869         DR 180
1870         * decl.c (grokdeclarator): Require class-key for all friend class.
1871         Output the correct type and context in the error message.
1872
1873 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
1874
1875         PR c++/5919
1876         * pt.c (unify): Use variably_modified_type_p to test validity of
1877         template argument types.
1878
1879         PR c++/8727
1880         * cp-tree.h (lang_type_class): Add typeinfo_var.
1881         (CLASSTYPE_TYPEINFO_VAR): New macro.
1882         * rtti.c (get_tinfo_decl): Use it.
1883
1884         PR c++/8663
1885         * init.c (expand_member_init): Always get the main variant of a
1886         base class.
1887
1888 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
1889
1890         PR c++/8332
1891         PR c++/8493
1892         * decl.c (cxx_init_decl_processing): Use size_type_node, not
1893         c_size_type_node.
1894         * decl2.c (coerce_new_type): Likewise.
1895         * except.c (do_allocate_exception): Likewise.
1896
1897 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
1898
1899         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
1900         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
1901         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
1902         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
1903         typeck2.c: Include coretypes.h and tm.h.
1904         * Make-lang.in: Update dependencies.
1905
1906 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
1907
1908         PR c++/8227
1909         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
1910         (check_initializer): Validate the type of the initialized
1911         variable, even if the initializer is absent.
1912         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
1913
1914         PR c++/8214
1915         * typeck.c (convert_for_assignment): Do not use
1916         decl_constant_value on the operand.
1917
1918         PR c++/8511
1919         * pt.c (instantiate_decl): Handle template friends defined outside
1920         of the class correctly.
1921
1922 2002-11-29  Joe Buck <jbuck@synopsys.com>
1923
1924         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
1925         anonymous structs.
1926
1927 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
1928
1929         * class.c (walk_subobject_offsets): Recur on binfos as well as on
1930         types.
1931         (layout_nonempty_base_or_field): Pass it a binfo when processing a
1932         base class.
1933         (layout_empty_base): Likewise.
1934         (build_base_field): Likewise.
1935
1936 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
1937
1938         * class.c (build_base_field): Make sure we get the canonical base
1939         when descending through primary bases.
1940
1941 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
1942
1943         * decl.c (check_initializer): Don't error on initialisation of
1944         a scalar with a brace-enclosed expression.
1945
1946 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
1947
1948         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
1949         (template_parms_equal): Remove prototype.
1950         * typeck.c (buuld_indirect_ref): Reformat.
1951
1952 2002-11-25  Jason Merrill  <jason@redhat.com>
1953
1954         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
1955         and a DO_STMT.
1956
1957 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
1958
1959         * tree.c (cp_build_qualified_type_real): Correct handling of
1960         array types.
1961         * class.c (walk_subobject_offsets): Fix thinko.
1962         (build_base_field): Record offsets of empty bases in primary
1963         virtual bases.
1964         (layout_class_type): Record offsets of empty bases in fields.
1965
1966         * search.c (is_subobject_of_p_1): Fix thinko.
1967         (lookup_field_queue_p): Likewise.
1968
1969 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
1970
1971         * class.c (layout_class_type): Reuse tail padding when laying out
1972         virtual bases.
1973
1974 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
1975
1976         * rtti.c (qualifier_flags): Fix thinko.
1977
1978 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1979
1980         Remove traditional C constructs 1/n.
1981         * cp-tree.h (init_method, set_mangled_name_for_decl,
1982         build_opfncall, hack_identifier, make_thunk, use_thunk,
1983         synthesize_method, implicitly_declare_fn,
1984         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
1985         maybe_clone_body): Remove use of PARAMS.
1986
1987         * method.c (do_build_assign_ref, do_build_copy_constructor,
1988         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
1989         Likewise.
1990         (synthesize_method): Use 'bool' type and constants instead of
1991         'int'.
1992         (locate_copy): Likewise.
1993         (implicitly_declare_fn): Likewise.
1994
1995         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
1996         Remove old-style declaration.
1997         (maybe_clone_body): Use 'bool' type and constants.
1998
1999 2002-11-21  Glen Nakamura  <glen@imodulo.com>
2000
2001         PR c++/8342
2002         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
2003         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
2004         of the branches of a COND_EXPR.
2005
2006 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
2007
2008         * pt.c (for_each_template_parm): Free allocated memory.
2009         * search.c (is_subobject_of_p_1): New function.
2010         (is_subobject_of_p): Avoid walking virtual bases multiple times.
2011
2012 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
2013
2014         * g++spec.c (lang_specific_spec_functions): New.
2015
2016 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
2017
2018         * ChangeLog: Follow spelling conventions.
2019         * class.c: Likewise.
2020         * decl2.c: Likewise.
2021
2022 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
2023
2024         * search.c (dfs_push_decls): Do not try to reorder elements
2025         3..n of method_vec if method_vec has only two elements.
2026         Reverse order of two tests to avoid accessing unallocated
2027         memory.
2028
2029 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
2030
2031         * class.c (dfs_find_final_overrider): Adjust so that the most
2032         derived object is a binfo, rather than a class type.
2033         (find_final_overrider): Likewise.
2034         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
2035         (add_vcall_offset): Likewise.
2036
2037 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2038
2039         PR c++/8389
2040         * pt.c (instantiate_template): Push class scope for member
2041         functions.
2042         (get_mostly_instantiated_function_type): Likewise.  Don't call
2043         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
2044         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
2045         * mangle.c (write_encoding, write_unqualified_name): Adjust.
2046
2047 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
2048
2049         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
2050         vcall offfsets.  Split out ...
2051         (add_vcall_offset): ... new function.
2052
2053         PR c++/8338
2054         * pt.c (for_each_template_parm): Add htab parameter.
2055         (process_partial_specialization): Adjust call.
2056         (push_template_decl_real): Likewise.
2057         (pair_fn_data): Add visited.
2058         (for_each_template_parm_r): Avoid walking duplicates more than
2059         once.
2060         (uses_template_parms): Adjust call to for_each_template_parm.
2061
2062 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
2063
2064         * class.c (add_implicitly_declared_members): Put implicitly
2065         declared functions at the end of TYPE_METHODs when -fabi-version
2066         is at least 2.
2067
2068 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
2069
2070         * decl2.c (finish_file): Correct spelling.
2071
2072 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
2073
2074         * call.c (build_special_member_call): Do not try to lookup VTTs by
2075         name.
2076         * class.c (vtbl_init_data): Add generate_vcall_entries.
2077         (get_vtable_decl): Do not look up virtual tables by name.
2078         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
2079         (set_primary_base): Do not set CLASSTYPE_RTTI.
2080         (determine_primary_base): Likewise.
2081         (get_matching_virtual): Remove.
2082         (get_vcall_index): New function.
2083         (update_vtable_entry_for_fn): Do not try to use virtual thunks
2084         when they are not required.  Assign vcall indices at this point.
2085         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
2086         Do update dynamic_classes.
2087         (build_vtt): Do not add VTTs to the symbol table.
2088         (build_ctor_vtbl_group): Likewise.
2089         (build_vtbl_initializer): Simplify handling of vcall indices.
2090         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
2091         for the most derived class.
2092         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
2093         the vtable.
2094         * cp-tree.h (dynamic_classes): New macro.
2095         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
2096         (CLASSTYPE_RTTI): Remove.
2097         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
2098         (CLASSTYPE_VCALL_INDICES): New macro.
2099         (CLASSTYPE_VTABLES): Likewise.
2100         (BV_USE_VCALL_INDEX_P): Remove.
2101         (build_vtable_path): Remove.
2102         * decl2.c (finish_vtable_vardecl): Remove.
2103         (key_method): Remove #if 0'd code.
2104         (finish_vtable_vardecl): Rename to ...
2105         (maybe_emit_vtables): ... this.
2106         (finish_file): Use it.
2107         * search.c (look_for_overrides_here): Update comment.
2108
2109 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
2110
2111         PR c/7353 redux
2112         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
2113
2114 2002-10-30  Jason Merrill  <jason@redhat.com>
2115
2116         PR c++/8186
2117         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
2118         * call.c (convert_for_arg_passing): Set it.
2119         * except.c (stabilize_throw_expr): Recurse for such an arg.
2120
2121 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
2122
2123         * cp-tree.h (lang_decl_flags): Remove init_priority.
2124         (lang_decl): Add delta.
2125         (GLOBAL_INIT_PRIORITY): Remove.
2126         (THUNK_DELTA): Revise definition.
2127         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
2128         * dump.c (cp_dump_tree): Don't dump it.
2129
2130 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
2131
2132         PR c++/8160
2133         * typeck2.c (process_init_constructor): Call complete_array_type.
2134
2135         PR c++/8149
2136         * decl.c (make_typename_type): Issue errors about invalid results.
2137
2138 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2139
2140         Core issue 287, PR c++/7639
2141         * cp-tree.h (lang_type_class): Add decl_list field.
2142         (CLASSTYPE_DECL_LIST): New macro.
2143         (maybe_add_class_template_decl_list): Add declaration.
2144         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
2145         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
2146         (maybe_add_class_template_decl_list): New function.
2147         (add_implicitly_declared_members): Use it.
2148         * decl.c (maybe_process_template_type_declaration): Likewise.
2149         (pushtag): Likewise.
2150         * friend.c (add_friend): Likewise.
2151         (make_friend_class): Likewise.
2152         * semantics.c (finish_member_declaration): Likewise.
2153         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
2154         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
2155         to process members and friends in the order of declaration.
2156
2157 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
2158
2159         PR c++/8287
2160         * decl.c (finish_destructor_body): Create the label to jump to
2161         when returning from a destructor here.
2162         (finish_function_body): Rather than here.
2163
2164 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
2165
2166         PR c++/7266
2167         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
2168         SCOPE_REF is not null before dereferencing it.
2169
2170 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
2171
2172         * call.c (build_over_call): Use DECL_CONTEXT, not
2173         DECL_VIRTUAL_CONTEXT.
2174         * class.c (modify_vtable_entry): Don't mess with
2175         DECL_VIRTUAL_CONTEXT.
2176         (set_vindex): Remove.
2177         (set_primary_base): Remove vfuns_p parameter.
2178         (determine_primary_base): Likewise.
2179         (modify_all_vtables): Likewise.
2180         (layout_class_type): Likewise.  Adjust calls to other functions
2181         accordingly.
2182         (finish_struct_1): Adjust calls to modified functions.  Set
2183         DECL_VINDEX here.
2184         * cp-tree.h (lang_type_class): Remove vsize.
2185         (CLASSTYPE_VSIZE): Remove.
2186         (lang_decl): Remove thunks.
2187         (DECL_THUNKS): Adjust.
2188         (DECL_VIRTUAL_CONTEXT): Remove.
2189         (duplicate_decls): Don't copy it.
2190         * pt.c (build_template_decl): Don't set it.
2191         (tsubst_decl): Likewise.
2192         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
2193
2194         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
2195         (build_vtable_entry): Remove.
2196         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
2197         (lang_decl): Add thunks.
2198         (DECL_THUNKS): New macro.
2199         * decl.c (duplicate_decls): Copy it.
2200         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
2201         * semantics.c (emit_associated_thunks): Simplify.
2202
2203 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
2204
2205         PR c++/7228
2206         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
2207         lang_type structure exists before accessing field.
2208         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
2209         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
2210         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
2211         * class.c (check_field_decls): Use new macros.
2212         * typeck2.c (process_init_constructor): Remove redundant check for
2213         existence of lang_type structure.
2214
2215 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
2216
2217         * class.c (end_of_base): New method.
2218         (end_of_class): Use it.  Check indirect virtual bases.
2219
2220         * class.c (check_field_decls): Fix typo.
2221
2222 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
2223
2224         PR c++/8067
2225         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
2226         related variables.
2227
2228         PR c++/7679
2229         * spew.c (next_token): Do not return an endless stream of
2230         END_OF_SAVED_INPUT tokens.
2231         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
2232         the cached token stream.
2233         (snarf_defarg): Likewise.
2234
2235 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
2236
2237         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
2238         variably_modified_type_p.
2239         * cp-tree.h: Remove prototype of variably_modified_type_p.
2240         * tree.c (variably_modified_type_p): Remove; now implemented
2241         in language-independent code.
2242
2243 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
2244
2245         PR c++/6579
2246         * spew.c (snarf_parenthesized_expression): New function.
2247         (snarf_block): Use it.
2248
2249 2002-10-22  Richard Henderson  <rth@redhat.com>
2250
2251         * method.c (use_thunk): Always compute vcall_value; assert that
2252         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
2253         for vcall thunks as well.
2254
2255 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
2256
2257         * class.c (empty_base_at_nonzero_offset_p): New function.
2258         (layout_nonempty_base_or_field): Do not check for conflicts when
2259         laying out a virtual base using the GCC 3.2 ABI.
2260         (build_base_field): Correct checking for presence of empty classes
2261         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
2262
2263         * class.c (include_empty_classes): Use normalize_rli.
2264         (layout_class_type): Likewise.
2265
2266         * decl.c (reshape_init): Tweak handling of character arrays.
2267
2268         PR c++/8218
2269         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
2270         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
2271         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
2272         (check_field_decls): Likewise.
2273         (layout_class_type): Likewise.
2274         (finish_struct_1): Initialize it.
2275         (walk_subobject_offsets): Use it to prune searches.
2276
2277 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
2278
2279         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
2280         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
2281         TARGET_ASM_OUTPUT_MI_THUNK in comments.
2282
2283 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
2284
2285         * decl.c (start_decl): Point users of the old initialized-
2286         typedef extension at __typeof__.
2287
2288 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2289
2290         * Make-lang.in (method.o): Depend on TARGET_H.
2291         * method.c (target.h): Include it.
2292         (use_thunk): Use target hooks.  Use vcall thunks, if available.
2293
2294 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2295
2296         * class.c (base_derived_from): Make sure return value is a bool.
2297
2298 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2299
2300         * class.c (find_final_overrider_data_s): Remove overriding_fn and
2301         overriding_base.
2302         (dfs_base_derived_from): New function.
2303         (base_derived_from): Likewise.
2304         (dfs_find_final_overrider): Use base_derived_from.
2305         (find_final_overrider): Adjust.
2306
2307 2002-10-18  Jason Merrill  <jason@redhat.com>
2308
2309         PR c++/8080
2310         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
2311         with condition decls in a template.
2312
2313 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
2314
2315         * class.c (add_method): Compare template parms too.
2316
2317 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
2318
2319         PR c++/7584
2320         * class.c (handle_using_decl): Allow the declaration used to be
2321         from an ambiguous base.
2322
2323         * pt.c (convert_template_argument): Revert this change:
2324                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2325                 * pt.c (convert_template_argument): Do not fold non-type
2326                 template rguments when inside a template.
2327
2328         * init.c (expand_default_init): Handle brace-enclosed initializers
2329         correctly.
2330
2331 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2332
2333         * mangle.c (write_expression): Correct handling of enumeration
2334         constants.
2335         (write_template_arg): Likewise.
2336         * pt.c (convert_template_argument): Do not fold non-type template
2337         arguments when inside a template.
2338
2339         PR c++/7478
2340         * cvt.c (convert_to_reference): Allow references as the incoming
2341         type.
2342
2343 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2344
2345         PR c++/7524
2346         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
2347         build_qualified_type.
2348
2349 2002-10-15  Richard Henderson  <rth@redhat.com>
2350
2351         * error.c (dump_expr): Use real_to_decimal directly, and with
2352         the new arguments.
2353
2354 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
2355
2356         * decl.c (reshape_init): Fix typo.
2357
2358         * cp-tree.h (operator_name_info_t): Add arity.
2359         * lex.c (init_operators): Initialize it.
2360         * mangle.c (write_conversion_operator_name): New function.
2361         (write_unqualified_name): Use it.
2362         (write_template_args): Accept template arguments as a TREE_LIST.
2363         (write_expression): Adjust handling of qualified names to match
2364         specification.
2365
2366 2002-10-15  Jason Merrill  <jason@redhat.com>
2367
2368         * call.c (call_builtin_trap): New fn.
2369         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
2370         (build_call): Don't set current_function_returns_abnormally outside
2371         a function.
2372
2373 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
2374
2375         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
2376         clear CLASSTYPE_EMPTY_P.
2377         (build_base_field): Likewise.
2378         (build_base_fields): Likewise.
2379         (check_bases_and_members): Likewise.
2380         (create_vtbl_ptr): Likewise.
2381         (layout_class_type): Likewise.  Ensure that empty classes have
2382         size zero when used as base classes in the 3.2 ABI.
2383         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
2384         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
2385         parameter.
2386         (is_empty_class): Correct definition when using post-3.2 ABI.
2387         * cp-tree.h (lang_type_class): Add empty_p.
2388         (CLASSTYPE_EMPTY_P): New macro.
2389
2390 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2391
2392         * init.c (build_delete): Do not apply save_expr for arrays.
2393         (build_vec_delete): Likewise.
2394
2395 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
2396
2397         * decl.c (layout_var_decl): Call layout_decl even for variables
2398         whose type is an array with unspecified bounds.
2399
2400         PR c++/7176
2401         * lex.c (do_identifier): Add another option for the parsing
2402         parameter.
2403         * parse.y (do_id): Use it.
2404
2405 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2406
2407         PRs C++/6803, C++/7721 and C++/7803
2408         * decl.c (grokdeclarator): Gracefully handle template-name as
2409         decl-specifier.
2410
2411 2002-10-11  Jason Molenda  <jmolenda@apple.com>
2412
2413         * init.c (build_field_list): Provide uses_unions_p with a default
2414         value.
2415
2416 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
2417
2418         PR c++/5661
2419         * cp-tree.h (variably_modified_type_p): New function.
2420         (grokdeclarator) Tighten check for variably modified types as
2421         fields.
2422         * pt.c (convert_template_argument): Do not allow variably modified
2423         types as template arguments.
2424         * tree.c (variably_modified_type_p): New function.
2425
2426         * NEWS: Document removal of "new X = ..." extension.
2427         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
2428         brace-enclosed initializers.
2429         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
2430         (initialize_local_var): Remove declaration.
2431         (expand_static_init): Likewise.
2432         * decl.c (next_initializable_field): New function.
2433         (reshape_init): Likewise.
2434         (check_initializer): Use them.  Build dynamic initializer for
2435         aggregates here too.
2436         (initialize_local_var): Simplify, and incorporate cleanup
2437         insertion code as well.
2438         (destroy_local_var): Remove.
2439         (cp_finish_decl): Tidy.
2440         (expand_static_init): Fold checks for whether or not a variable
2441         needs initialization into this function.  Simplify.
2442         * decl2.c (do_static_initialization): Simplify.
2443         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
2444         be done for us automatically.
2445         (expand_default_init): Handle brace-enclosed initializers
2446         correctly.
2447         (expand_aggr_init_1): Remove RTL-generation code.
2448         (build_vec_init): Remove "new X = ..." support.
2449         * parse.y (new_initializer): Likewise.
2450         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
2451         brace-enclosed initializer.
2452         (create_pseudo_type_info): Likewise.
2453         * typeck2.c (store_init_value): Don't try to handle digest_init
2454         being called more than once.
2455         (digest_init): Tidy handling of brace-enclosed initializers.
2456
2457 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2458
2459         * decl.c (typename_hash): Use htab_hash_pointer.
2460
2461 2002-10-10  Jim Wilson  <wilson@redhat.com>
2462
2463         * decl.c (duplicate_decls): Don't call decl_attributes.
2464
2465 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
2466
2467         PR c/7353
2468         * decl.c (start_decl): Unconditionally issue error for
2469         'typedef foo = bar'.
2470         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
2471         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
2472
2473 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2474
2475         * decl2.c (prune_vtable_vardecl): Delete unused function.
2476
2477 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2478
2479         PR c++/7754
2480         * decl2.c (finish_anon_union): Do not expand anonymous unions when
2481         procesing template functions.
2482         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2483         type. Call layout_decl.
2484         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2485
2486 2002-10-07  Richard Henderson  <rth@redhat.com>
2487
2488         * decl2.c, pt.c: Revert c++/7754 fix.
2489
2490 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2491
2492         PR c++/7804
2493         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
2494
2495 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2496
2497         PR c++/7931
2498         * pt.c (for_each_template_parm_r): Handle BASELINKs.
2499
2500         PR c++/7754
2501         * decl2.c (finish_anon_union): Do not expand anonymous unions when
2502         procesing template functions.
2503         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2504         type. Call layout_decl.
2505         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2506
2507 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2508
2509         PR c++/8006
2510         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
2511         template parameters.
2512         (globals): Add entity and need_abi_warning.
2513         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
2514         CLASSTYPE_TEMPLATE_INFO.
2515         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
2516         TYPE_TI_TEMPLATE.
2517         (write_prefix): Handle typename types correctly.
2518         (write_template_prefix): Handle template template parameters
2519         correctly.
2520         (start_mangling): Add entity parameter.
2521         (finish_mangling): Warn about names whose mangling will change.
2522         (mangle_decl_string): Adjust.
2523         (mangle_type_string): Likewise.
2524         (mangle_special_for_type): Likewise.
2525         (mangle_ctor_vtbl_for_type): Likewise.
2526         (mangle_thunk): Likewise.
2527         (mangle_guard_variable): Likewise.
2528         (mangle_ref_init_variable): Likewise.
2529
2530 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
2531
2532         PR c++/7188.
2533         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
2534         * cp-tree.h (emit_base_init): Rename to ....
2535         (emit_mem_initializers): ... this.
2536         (expand_member_init): Change prototype.
2537         * init.c (perform_member_init): Compute explicit, rather than
2538         requiring it as a parameter.
2539         (sort_member_init): Rename to ...
2540         (sort_mem_initializers): ... this.  Process bases and data members
2541         together.
2542         (sort_base_init): Remove.
2543         (emit_base_init): Rename to ...
2544         (emit_mem_initializers): ... this.
2545         (expand_aggr_vbase_init_1): Remove.
2546         (construct_virtual_bases): Rename to ...
2547         (construct_virtual_base): ... this.
2548         (expand_member_init): Rework handling of base initializers.
2549         * method.c (do_build_copy_constructor): Use
2550         finish_mem_initializers.
2551         * parse.y (member_init): Adjust calls to expand_member_init.
2552         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
2553         (tsubst_initializer_list): Use expand_member_init.
2554         * semantics.c (finish_mem_intiailizers): Simplify.
2555
2556 2002-10-02  Matt Austern  <austern@apple.com>
2557         * decl.c (walk_vtables_r): Fixed typo that caused result to
2558         never get a nonzero value.
2559
2560 2002-10-02  Roger Sayle  <roger@eyesopen.com>
2561
2562         PR optimization/6627
2563         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
2564         from here, and move it to tree.h.
2565         * decl.c (cxx_init_decl_processing): If storing the vbit
2566         in function pointers, ensure that force_align_functions_log
2567         is atleast one.
2568
2569 2002-10-02  Matt Austern  <austern@apple.com>
2570
2571         * class.c (check_field_decls): Changed warning about const member
2572         variables so that it doesn't get issued for a class aggregate.
2573
2574 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
2575
2576         * decl.c (cp_finish_decl): Make sure array types are laid out,
2577         even if the array bounds are unknown.
2578
2579 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
2580
2581         * class.c (build_vtbl_initializer): Change build_c_cast
2582         to build1.
2583
2584 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
2585
2586         * decl.c (cp_finish_decl): Make sure array types are laid out,
2587         even if the array bounds are unknown.
2588
2589         * decl.c (cp_finish_decl): Correct check for dynamic
2590         initialization of thread-local storage.
2591
2592 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
2593
2594         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
2595         overloaded.
2596
2597 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
2598
2599         * class.c (build_vtbl_initializer): Add cast.
2600         (add_vcall_offset_vtbl_entries_1):
2601         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
2602
2603 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
2604
2605         * class.c (walk_subobject_offsets): Correct the calculation of
2606         offsets for virtual bases.  Correct the counting of array
2607         elements.
2608         (layout_nonempty_base_or_field): Simplify.  Correct the
2609         calculation of offsets to be propagated through the binfo
2610         hierarchy.
2611         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
2612         Add the FIELD_DECL to TYPE_FIELDS.
2613         (build_base_fields): Adjust accordingly.
2614         (layout_virtual_bases): Use build_base_field.
2615         (end_of_class): Return a tree, not an integer.
2616         (warn_about_ambiguous_direct_bases): Rename to ...
2617         (warn_about_ambiguous_bases): ... this.
2618         (include_empty_classes): New function.
2619         (layout_class_type): Create an alternative version of the type to
2620         be used when as a base class type.  Do not call
2621         finish_record_layout until we are done laying out the class.
2622         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
2623         as_base.
2624         (CLASSTYPE_SIZE): Reimplement.
2625         (CLASSTYPE_SIZE_UNIT): Likewise.
2626         (CLASSTYPE_ALIGN): Likweise.
2627         (CLASSTYPE_USER_ALIGN): Likewise.
2628         (CLASSTYPE_AS_BASE): New macro.
2629         (DECL_INITIALIZED_P): Likewise.
2630         (extract_init): Remove prototype.
2631         (build_forced_zero_init): Rename to ...
2632         (build_zero_init): ... this.
2633         (force_store_init_value): Remove.
2634         * decl.c (obscure_complex_init): Remove.
2635         (duplicate_decls): Copy DECL_INITIALIZED_P.
2636         (check_initializer): Do not leave junk in DECL_INITIAL.
2637         (cp_finish_decl): Handle zero-initialization of entities with
2638         static storage duration.
2639         * expr.c (extract_init): Remove.
2640         * init.c (build_forced_zero_init): Remove.
2641         (build_zero_init): New function.
2642         (build_default_init): Use it.
2643         (build_field_list): Skip FIELD_DECLs for base subobjects.
2644         (push_base_cleanups): Likewise.
2645         * method.c (do_build_assign_ref): Likewise.
2646         (synthesize_exception_spec): Likewise.
2647         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
2648         (regenerate_decl_from_template): To not set DECL_INITIAL for a
2649         static data member whose initialization took place in its class.
2650         (instantiate_decl): Do not pass an initializer to cp_finish_decl
2651         in that situation.
2652         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
2653         (dfs_unuse_fields): Likewise.
2654         * tree.c (pod_type_p): Handle error_mark_node.
2655         (zero_init_p): Likewise.
2656         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
2657         subobjects.
2658         * typeck2.c (store_init_value): Remove #if 0'd code.
2659         (force_store_init_value): Remove.
2660         (process_init_constructor): Use build_zero_init.
2661
2662 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
2663
2664         PR c++/7788
2665         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
2666
2667 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
2668
2669         * cp-tree.h: Fix comment typos.
2670         * decl.c: Likewise.
2671         * pt.c: Likewise.
2672
2673 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
2674
2675         * cp/class.c (contains_empty_class_p): New method.
2676         (walk_subobject_offsets): Correct computation of field offset.
2677         (layout_empty_base): Correct placement of emtpy base classes.
2678         (layout_class_type): Warn about ABI changes.
2679
2680 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
2681
2682         * cp/class.c (layout_virtual_bases): Do not round the size of the
2683         type to a multiple of the alignment before laying out virtual bases.
2684         (layout_class_type): Correct handling of bit-fields that are wider
2685         than their type inside unions.  Round the size of the type to a
2686         even number of bytes when computing the size without virtual
2687         bases.
2688         * cp/cp-tree.h (abi_version_at_least): New macro.
2689
2690 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
2691
2692         * ChangeLog: Follow spelling conventions.
2693         * ChangeLog.2: Likewise.
2694         * call.c: Likewise.
2695         * class.c: Likewise.
2696         * cp-tree.h: Likewise.
2697         * cvt.c: Likewise.
2698         * decl.c: Likewise.
2699         * decl2.c: Likewise.
2700         * except.c: Likewise.
2701         * friend.c: Likewise.
2702         * g++spec.c: Likewise.
2703         * init.c: Likewise.
2704         * lex.c: Likewise.
2705         * mangle.c: Likewise.
2706         * method.c: Likewise.
2707         * operators.def: Likewise.
2708         * optimize.c: Likewise.
2709         * pt.c: Likewise.
2710         * rtti.c: Likewise.
2711         * search.c: Likewise.
2712         * semantics.c: Likewise.
2713         * spew.c: Likewise.
2714         * tree.c: Likewise.
2715         * typeck.c: Likewise.
2716
2717 2002-09-18  Devang Patel  <dpatel@apple.com>
2718
2719         * cp/cp-tree.h: New prototype for walk_vtabls().
2720         * cp/decl.c (walk_vtables_r): New function.
2721         (struct cp_binding_level): Add new members, namespaces,
2722         names_size and vtables.
2723         (add_decl_to_level): Add decl in namespaces or vtables
2724         chain, if conditions match.
2725         (walk_vtables): New function.
2726         (walk_namespaces_r): Travers separate namespace chain
2727         for namespace decls.
2728         (wrapup_globals_for_namespace): Use names_size instead
2729         of list_length().
2730         * cp/decl2.c (finish_file): Use walk_vtables() instead of
2731         walk_globals() to walk vtable decls.
2732
2733 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
2734
2735         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
2736         ICE with invalid pointers & references.
2737
2738 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
2739
2740         * Make-lang.in: Remove all references to the demangler.
2741         * cxxfilt.c: Moved to binutils.
2742
2743 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2744
2745         PR c++/7718
2746         * pt.c (tsubst_decl): Remove assert.
2747
2748         Remove DR 295 implementation.
2749         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
2750         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
2751         about ignoring volatile qualifiers.
2752
2753         * search.c (lookup_member): Correct documentation.
2754
2755 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
2756
2757         * cp-tree.h (union lang_tree_node): Add chain_next option.
2758
2759 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2760
2761         * parse.y (parse_finish_call_expr): Check lookup_member result.
2762
2763         PR c++/7015
2764         * semantic.c (finish_asm_stmt): Fix operand/output_operands
2765         thinko.
2766         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
2767
2768 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
2769
2770         PR c++/7919
2771         * call.c (build_over_call): Convert this pointer for fns found by
2772         using decls.
2773
2774 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
2775
2776         * ChangeLog: Follow spelling conventions.
2777         * ChangeLog.1: Likewise.
2778
2779 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
2780
2781         PR c++/7768
2782         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
2783
2784 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
2785
2786         * error.c: Fix comment formatting.
2787         * except.c: Likewise.
2788         * expr.c: Likewise.
2789         * friend.c: Likewise.
2790         * g++spec.c: Likewise.
2791         * init.c: Likewise.
2792         * lex.c: Likewise.
2793         * mangle.c: Likewise.
2794         * method.c: Likewise.
2795         * optimize.c: Likewise.
2796         * pt.c: Likewise.
2797         * rtti.c: Likewise.
2798         * search.c: Likewise.
2799         * semantics.c: Likewise.
2800         * spew.c: Likewise.
2801         * tree.c: Likewise.
2802         * typeck.c: Likewise.
2803         * typeck2.c: Likewise.
2804
2805 2002-09-13  Matt Austern  <austern@apple.com>
2806
2807         PR C++/7828
2808         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
2809         * cp/call.c: Change call-by-const-reference mechanism to use
2810         non_cast_lvalue_p when deciding whether the create a temporary.
2811         We need a temporary when passing, e.g. (long) x by const ref.
2812
2813 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
2814
2815         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
2816
2817 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
2818
2819         * decl.c: Fix comment formatting.
2820         * decl2.c: Likewise.
2821
2822 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
2823
2824         * call.c: Fix comment formatting.
2825         * class.c: Likewise.
2826         * cp-lang.c: Likewise.
2827         * cp-tree.h: Likewise.
2828         * cvt.c: Likewise.
2829
2830 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
2831
2832         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
2833         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
2834         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
2835         minor adjustments (use version_string, eliminate yet another
2836         duplicate of xmalloc)
2837
2838 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2839
2840         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
2841
2842 2002-09-05  Jason Merrill  <jason@redhat.com>
2843
2844         * typeck2.c (add_exception_specifier): Only pedwarn for an
2845         incomplete type.
2846         (require_complete_eh_spec_types): New fn.
2847         (cxx_incomplete_type_diagnostic): Also support pedwarning.
2848         * typeck.c (complete_type_or_diagnostic): Likewise.
2849         * call.c (build_call): Call require_complete_eh_spec_types.
2850         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
2851         on an incomplete type.
2852
2853 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
2854
2855         * decl.c (start_cleanup_fn): Clear interface_only before
2856         start_function, restore it afterwards.
2857
2858 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
2859
2860         * cp-tree.h (finish_builtin_type): Remove.
2861         * decl2.c (finish_builtin_type): Move to common code.
2862         * decl.c (build_ptrmemfunc_type): Adjust.
2863         * rtti.c (create_pseudo_type_info): Adjust.
2864         (create_tinfo_types): Adjust.
2865
2866 2002-08-31  Jason Merrill  <jason@redhat.com>
2867
2868         * cp-lang.c (cp_expr_size): Allow initialization from a
2869         CONSTRUCTOR.
2870
2871 2002-08-30  Richard Henderson  <rth@redhat.com>
2872
2873         PR opt/7515
2874         * tree.c: Include target.h.
2875         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
2876         don't bind locally.
2877         * Makefile.in (tree.o): Update.
2878
2879 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
2880
2881         * class.c (layout_virtual_bases): Warn about bugs in G++ that
2882         result in incorrect object layouts.
2883         (layout_class_type): Likewise.
2884
2885 2002-08-24  Matt Austern  <austern@apple.com>
2886
2887         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
2888         are allowable.
2889         (real_lvalue_p): Update caller.
2890         (lvalue_p): Ditto.
2891         (non_cast_lvalue_or_else): New.
2892         * tree.h: Declare it.
2893         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
2894
2895 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
2896
2897         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
2898         and COND_EXPR specially; fix error message output.
2899
2900 2002-08-22  Jason Merrill  <jason@redhat.com>
2901
2902         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
2903         * semantics.c (nullify_returns_r): Likewise.
2904
2905 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2906
2907         Fix PR/7621
2908         * typeck.c (finish_class_member_access_expr): Diagnose cases where
2909         name lookup finds nothing.
2910
2911 2002-08-15  Jason Merrill  <jason@redhat.com>
2912
2913         * semantics.c (finish_then_clause): Remove redundant assignment.
2914         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
2915         extra binding level outside the if/switch statement.
2916         (finish_while_cond, finish_for_cond): Rewrite complex condition
2917         into the loop body.
2918
2919 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
2920
2921         * parse.y (sizeof, alignof, typeof): New non-terminals to
2922         increment skip_evaluation.  Replace terminals with them and
2923         decrement skip_evaluation at the end of rules using them.
2924         * decl2.c (mark_used): Don't assemble_external if
2925         skipping evaluation.
2926
2927 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
2928
2929         Fix PR/7504
2930         * parse.y (parse_finish_call_expr): Handle incomplete
2931         type used to name a scope.
2932
2933 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
2934
2935         PR c++/7598
2936         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
2937         regression caused by my 2002-08-08 patch.
2938
2939 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
2940
2941         * decl.c (pushdecl_class_level): Honor requests to bind names to
2942         OVERLOADs.
2943
2944 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2945
2946         * decl2.c (build_call_from_tree): Fix uninitialized variable.
2947         * parse.y (parse_finish_call_expr): Likewise.
2948         * repo.c (old_args, old_dir, old_main): Const-ify.
2949
2950 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
2951
2952         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
2953         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
2954         * optimize.c (maybe_clone_body): Likewise.
2955         * pt.c (tsubst_enum): Likewise.
2956         (lookup_template_class): Likewise.
2957         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
2958
2959 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
2960
2961         * lang-specs.h: Remove -ansi.
2962
2963 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
2964
2965         * tree.c (maybe_dummy_object): Replace // with /* */
2966
2967 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
2968
2969         * call.c (standard_conversion): Use build_ptrmem_type.
2970         * cp-tree.h (build_ptrmem_type): New function.
2971         (adjust_result_of_qualified_name_lookup): Likewise.
2972         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
2973         static data members.
2974         (build_ptrmem_type): New function.
2975         (grokdeclarator): Do not use build_offset_type when encountering a
2976         qualified name.
2977         * parse.y (parse_finish_call_expr): Use
2978         adjust_result_of_qualified_name_lookup.
2979         * search.c (adjust_result_of_qualified_name_lookup): New function.
2980         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
2981         accessing OFFSET_TYPEs directly.
2982
2983 2002-08-08  Mike Stump  <mrs@apple.com>
2984
2985         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
2986         (type_decays_to): Likewise.
2987         * class.c (find_final_overrider): Likewise.
2988         (maybe_note_name_used_in_class): Likewise.
2989         * decl.c (current_tmpl_spec_kind): Likewise.
2990         (add_binding): Likewise.
2991         (push_class_binding): Likewise.
2992         (duplicate_decls): Likewise.
2993         (layout_var_decl): Likewise.
2994         (grokfndecl): Likewise.
2995         (grokdeclarator): Likewise.
2996         (check_default_argument): Likewise.
2997         * decl2.c (handle_class_head): Likewise.
2998         * error.c (dump_template_decl): Likewise.
2999         * init.c (build_offset_ref): Likewise.
3000         * pt.c (check_specialization_scope): Likewise.
3001         (determine_specialization): Likewise.
3002         (check_explicit_specialization): Likewise.
3003         (maybe_check_template_type): Likewise.
3004         (process_partial_specialization): Likewise.
3005         (check_default_tmpl_args): Likewise.
3006         (push_template_decl_real): Likewise.
3007         (convert_template_argument): Likewise.
3008         (try_class_unification): Likewise.
3009         (get_bindings_real): Likewise.
3010         (do_decl_instantiation): Likewise.
3011         * semantics.c (begin_function_definition): Likewise.
3012         (finish_member_declaration): Likewise.
3013         (check_multiple_declarators): Likewise.
3014         * typeck.c (comp_array_types): Likewise.
3015         (comptypes): Likewise.
3016         (expr_sizeof): Likewise.
3017         (build_binary_op): Likewise.
3018         (dubious_conversion_warnings): Likewise.
3019         (check_return_expr): Likewise.
3020
3021 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
3022
3023         * typeck.c (build_class_member_access_expr): Do not return
3024         error_mark_node when no error has occurred.
3025
3026 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3027
3028         * typeck.c (build_component_addr): Remove.
3029         (build_unary_op): Just check it's not a bitfield, and then build
3030         an ADDR_EXPR.
3031
3032 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3033
3034         * class.c (convert_to_base): Correct check for error_mark_node.
3035         (create_vtable_ptr): Remove unused VFUNS_P parm.
3036
3037 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3038
3039         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
3040
3041 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
3042
3043         Rework build_component_ref.
3044         * call.c (build_vfield_ref): Do not go through build_component_ref.
3045         (build_field_call): Use build_class_member_access_expr.
3046         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
3047         (build_object_call): Likewise.
3048         * class.c (convert_to_base): New function.
3049         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
3050         (instantiate_type): Handle BASELINKs.
3051         * cp-tree.def (BASELINK): New tree code.
3052         * cp-tree.h (BASELINK_P): Reimplement.
3053         (SET_BASELINK_P): Remove.
3054         (BASELINK_BINFO): Reimplement.
3055         (BASELINK_FUNCTIONS): Likewise.
3056         (BASELINK_ACCESS_BINFO): Likewise.
3057         (BASELINK_OPTYPE): Likewise.
3058         (convert_to_base): New function.
3059         (name_p): Likewise.
3060         (build_object_ref): Remove.
3061         (build_component_ref_1): Likewise.
3062         (build_component_ref): Likewise.
3063         (build_x_component_ref): Likewise.
3064         (build_class_member_access_expr): New function.
3065         (finish_class_member_access_expr): Likewise.
3066         (build_ptrmemfunc_access_expr): Likewise.
3067         * decl.c (grokdeclarator): Handle BASELINKs.
3068         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
3069         finish_class_member_access_expr.
3070         (arg_assoc): Handle BASELINKs.
3071         (do_class_using_decl): Likewise.
3072         * error.c (dump_decl): Likewise.
3073         (dump_expr): Use build_ptrmemfunc_access_expr.
3074         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
3075         destructors.
3076         (build_throw): Use BASELINK_FUNCTIONS.
3077         * init.c (perform_member_init): Use
3078         build_class_member_access_expr.
3079         (build_offset_ref): Handle BASELINKs.  Use
3080         build_class_member_access_expr.
3081         * method.c (hack_identifier): Likewise.
3082         * parse.y (do_id): Use BASELINK, not TREE_LIST.
3083         (primary): Remove uses of build_object_ref.
3084         * pt.c (lookup_template_function): Handle BASELINKs.
3085         (resolve_overloaded_unification): Likewise.
3086         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
3087         (lookup_field): Use BASELINK, not TREE_LIST.
3088         (lookup_fnfiels): Likewise.
3089         (setup_class_bindings): Likewise.
3090         * semantics.c (finish_object_call_expr): Do not use
3091         build_method_call when we already know what function is being
3092         called.
3093         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
3094         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
3095         TREE_CHAIN.
3096         (name_p): New function.
3097         * typeck.c (build_object_ref): Remove.
3098         (build_component_ref_1): Likewise.
3099         (build_x_component_ref): Likewise.
3100         (build_class_member_access_expr): New function.
3101         (finish_class_member_access_expr): Likewise.
3102         (build_ptrmemfunc_access_expr): Likewise.
3103         (get_member_function_from_ptrfunc): Use
3104         build_ptrmemfunc_access_expr.
3105         (build_binary_op): Likewise.
3106         (build_unary_op): Likewise.
3107         (build_ptrmemfunc): Likewise.
3108         (pfn_from_ptrmemfunc): Likewise.
3109         * typeck2.c (build_m_component_ref): Adjust comment.
3110
3111 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
3112
3113         * Make-lang.in (CXX_C_OBJS): Update.
3114         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
3115         * cp-tree.h (cxx_decode_option): Remove.
3116         * decl2.c (compare_options, lang_f_options, unsupported_options,
3117         cxx_decode_option): Remove.
3118
3119 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
3120
3121         * typeck.c (build_x_unary_op): Handle pointer-to-member.
3122
3123 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
3124
3125         * class.c: Don't include obstack.h.
3126         (popclass):
3127         * decl2.c: Delete bogus comment.
3128         * error.c: Don't include obstack.h.
3129         * except.c: Likewise.
3130         (dump_type): Correct comment.
3131         * method.c: Don't include obstack.h.
3132         * tree.c: Likewise.
3133
3134 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
3135
3136         Fix PR/2213
3137         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
3138         expressions to pointer-to-data-member of pointer-to-member-functions.
3139
3140 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
3141
3142         * cvt.c (ocp_convert): Delete obsolete code.
3143         * parse.y (permanent_obstack): Delete declaration.
3144         * pt.c (permanent_obstack): Delete declaration.
3145         * repo.c (permanent_obstack): Delete declaration.
3146         (open_repo_file): Use xmalloc instead of permanent_obstack.
3147         (init_repo): Use xstrdup instead of permanent_obstack.
3148
3149 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
3150
3151         * cp-tree.h (VF_DERIVED_VALUE): Remove.
3152         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
3153
3154 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
3155
3156         PR 7470.
3157         C++ ABI change - vfunc ordering.
3158         * class.c (add_virtual_function): Remove.
3159         (dfs_modify_all_vtables): Take list of all declared
3160         virtuals. Assign all that are not in primary base.
3161         (check_for_override): Adjust comments.
3162         (create_vtable_ptr): Take single list of virtuals. Build chain
3163         of declared virtuals here.
3164         (layout_class_type): Take single list of virtuals. Adjust.
3165         (finish_struct_1): Keep virtuals on single list. Adjust.
3166
3167 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
3168
3169         * init.c (build_member_call): Use build_new_method_call, not
3170         build_method_call.
3171
3172 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
3173
3174         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
3175
3176 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
3177
3178         * call.c (build_method_call): Issue a more helpful error message
3179         about ambiguous method names.
3180
3181 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
3182
3183         * tree.c (build_shared_int_cst): Make cache file scope, and
3184         GTY it.
3185
3186 2002-08-02  Jason Merrill  <jason@redhat.com>
3187
3188         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
3189         (cp_expr_size): New fn.
3190         * call.c (build_over_call): Lose empty class hackery.
3191         (convert_arg_to_ellipsis): Promote non-POD warning to error.
3192         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
3193
3194         * semantics.c (expand_body): Do tree optimization in the function
3195         context, too.
3196
3197 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
3198
3199         * cp-tree.h: Move all warning and flag declarations to c-common.h.
3200         * decl.c: Move all warning and flag variables to c-common.c.
3201         * decl2.c: Move all warning and flag variables to c-common.c.
3202         * lex.c (flag_digraphs): Remove.
3203         (warn_traditional): Now in c-common.c.
3204
3205 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
3206
3207         * call.c (build_field_call): Do not look up the field by name.
3208         (build_method_call): Simplify.
3209         (struct z_candidate): Add access_path and conversion_path.  Remove
3210         basetype_path.
3211         (convert_class_to_reference): Adjust use of
3212         add_function_candidate.
3213         (add_candidate): Add conversion_path argument.
3214         (add_function_candidate): Use it.
3215         (add_conv_dndidate): Likewise.
3216         (build_builtin_candidate): Likewise.
3217         (add_template_candidate_real): Add conversion_path argument.
3218         (add_template_conv_candidate): Likewise.
3219         (add_template_candidate): Likewise.
3220         (build_user_type_conversion_1): Use it.
3221         (build_new_function_call): Remove name lookup code.  Adjust use of
3222         add_template_candidate and add_function_candidate.
3223         (build_new_op): Likewise.
3224         (convert_like_real): Use build_special_member_call.
3225         (build_over_call): Use cand->conversion_path.
3226         (build_special_member_call): New method.
3227         (build_new_method_call): Remove name lookup code.
3228         * cp-tree.def (OFFSET_REF): Update documentation.
3229         (TEMPLATE_ID_EXPR): Likewise.
3230         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
3231         (BASELINK_OPTYPE): Likewise.
3232         (build_new_method_call): Adjust prototype.
3233         (build_special_member_call): New method.
3234         (build_baselink): New method.
3235         (build_offset_ref_call_from_tree): Likewise.
3236         (build_call_from_tree): Likewise.
3237         (finish_qualified_call_expr): Remove.
3238         (finish_call_expr): Adjust prototype.
3239         (build_x_function_call): Remove.
3240         * cvt.c (ocp_convert): Use build_special_member_call.
3241         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
3242         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
3243         CALL_EXPR.
3244         (build_offset_ref_call_from_tree): New function.
3245         (build_call_from_tree): Likewise.
3246         * init.c (expand_cleanup): Use build_special_member_call.
3247         (expand_default_init): Likewise.
3248         (build_member_call): Use finish_call_expr.
3249         (build_new_1): Use build_special_member_call.
3250         (push_base_cleanups): Likewise.
3251         * method.c (do_build_assign_ref): Likewise.
3252         * parse.y (template_id): Do not pass a COMPONENT_REF to
3253         lookup_template_function.
3254         (primary): Use parse_finish_call_epxr, not finish_call_expr.
3255         (parse_finish_call_expr): New function.
3256         * pt.c (lookup_template_function): Add assertions.
3257         * search.c (lookup_base): Allow T to be a binfo.
3258         (build_baselink): New function.
3259         (lookup_member): Use it.
3260         * semantics.c (finish_call_expr): Do not do name lookup.
3261         (finish_object_call_expr): Remove #if 0'd code.
3262         (finish_qualified_call_expr): Remove.
3263         * typeck.c (build_x_function_call): Remove.
3264         (build_static_case): Use build_special_member_call.
3265         * typeck2.c (build_functional_cast): Likewise.
3266
3267 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
3268
3269         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
3270
3271 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
3272
3273         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
3274
3275 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
3276
3277         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
3278         documentation.
3279
3280 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
3281
3282         * cp-tree.h: Comment typo fix.
3283
3284 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
3285
3286         * spew.c (space_for_token): Allocate zeroed memory for a new token
3287         chunk.
3288
3289 2002-07-27  Roger Sayle  <roger@eyesopen.com>
3290
3291         * decl.c (builtin_function_1): No need to explicitly mark
3292         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
3293
3294 2002-07-27  Roger Sayle  <roger@eyesopen.com>
3295
3296         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
3297
3298 2002-07-26  Jason Merrill  <jason@redhat.com>
3299
3300         * call.c (build_over_call): Likewise.
3301         (cp_convert_parm_for_inlining): New fn.
3302         (convert_for_arg_passing): New fn.
3303         (convert_default_arg, build_over_call): Use it.
3304         (type_passed_as): New fn.
3305         * pt.c (tsubst_decl): Use it.
3306         * decl2.c (cp_build_parm_decl): New fn.
3307         (build_artificial_parm): Use it.
3308         (start_static_storage_duration_function): Likewise.
3309         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
3310         (grokparms): Don't mess with DECL_ARG_TYPE.
3311         * typeck.c (convert_arguments): Use convert_for_arg_passing.
3312         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
3313         Define.
3314         * cp-tree.h: Declare new fns.
3315
3316 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
3317
3318         * cp-tree.h (flag_operator_names): Remove.
3319         * decl2.c (flag_operator_names): Remove.
3320         (lang_f_options): Remove operator-names.
3321         * lex.c (D_OPNAME): Remove.
3322         (reswords): Remove operator names.
3323         (rid_to_yy): Remove operator names.
3324         (init_reswords): No need to handle D_OPNAME.
3325         * spew.c (read_process_identifier): There are no operator
3326         names.
3327
3328 2002-07-26  Jason Merrill  <jason@redhat.com>
3329
3330         * dump.c (cp_dump_tree): Call c_dump_tree.
3331         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
3332
3333 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
3334
3335         * error.c (print_whitespace): Remove.
3336         * g++spec.c (LIBUNWIND): Move.
3337         * mangle.c (mangled_position, write_signed_number): Remove.
3338
3339 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
3340
3341         * decl2.c (cxx_decode_option): Similarly.
3342
3343 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
3344
3345         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
3346         (cxx_sizeof_or_alignof_type): Take a third argument.
3347         (cxx_sizeof): Adjust definition.
3348         (cxx_alignof): Likewise.
3349         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
3350         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
3351         complaining.
3352         (c_sizeof_nowarn): Remove definition.
3353         (build_unary_op): Use cxx_sizeof_nowarn.
3354
3355 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
3356
3357         * tree.c (cp_build_qualified_type_real): When copying
3358         pointer-to-method types, unshare the record that holds
3359         the cached pointer-to-member-function type.
3360
3361 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
3362
3363         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
3364
3365 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
3366
3367         Fix PR/7363:
3368         * typeck.c (cxx_sizeof_or_alignof_type): New function.
3369         (c_sizeof): Remove definition.
3370         (expr_sizeof): Use cxx_sizeof.
3371         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
3372         * decl.c (finish_destructor_body): Use cxx_sizeof.
3373         * semantics.c (finish_alignof): Likewise.
3374         (finish_alignof): Use cxx_alignof.
3375         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
3376         (cxx_sizeof_or_alignof_type): Declare.
3377         (my_friendly_assert): Move to ../c-common.h.
3378
3379 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
3380
3381         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
3382
3383 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3384
3385         PR c++/7347, c++/7348
3386         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
3387         * decl.c (make_typename_type): Use it.
3388         (make_unbound_class_template): Likewise.
3389         (lookup_name_real): Don't call type_access_control if scope is
3390         template parameter dependent.
3391         * parse.y (template_arg): Call make_unbound_class_template with
3392         tf_parsing set.
3393         (nest_name_specifier): Call make_typename_type with tf_parsing set.
3394         (typename_sub0): Likewise.
3395         (typename_sub1): Likewise.
3396         (instantiate_decl): Push class scope.
3397         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
3398         for both static variable and member function template.
3399         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
3400         and arguments.
3401         * search.c (type_access_control): Do type access for TEMPLATE_DECL
3402         too.
3403
3404 2002-07-20  Roger Sayle  <roger@eyesopen.com>
3405
3406         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
3407         test by using positive_option.  Make whitespace consistent.
3408
3409 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
3410
3411         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
3412         members with 'locus'.  Adjust use throughout.
3413         (struct feed):  Likewise.
3414         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
3415         Adjust use.
3416         (snarf_defarg): Use error(), not error_with_file_and_line().
3417
3418 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
3419
3420         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
3421         cpp_options is included.
3422
3423 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3424
3425         PR c++/2862, c++/2863
3426         * pt.c (determine_specialization): Compare the length of
3427         TYPE_ARG_TYPES.  Tidy.
3428
3429 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3430
3431         PR c++/3797
3432         * decl.c (duplicate_decls): Don't propagate inlining parameters from
3433         olddecl to newdecl when newdecl is a specialization of the
3434         instantiation olddecl.
3435
3436 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3437
3438         PR c++/4802, c++/5387
3439         * decl.c (make_typename_type): Use enforce_access.
3440
3441 2002-07-17  Scott Snyder <snyder@fnal.gov>
3442
3443         PR c++/7320
3444         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
3445
3446 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
3447
3448         * class.c (add_method): Correct handling of conversion operators.
3449
3450 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
3451
3452         PR c++/7224
3453         * class.c (add_method): Simplify.
3454
3455 2002-07-11  Jason Merrill  <jason@redhat.com>
3456
3457         PR c++/7279
3458         * tree.c (cp_copy_res_decl_for_inlining): Also copy
3459         TREE_ADDRESSABLE.
3460
3461 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
3462
3463         * pt.c (template_parm_this_level_p, push_template_decl_real):
3464         Pass depth as int pointer.
3465
3466 2002-07-11  Tim Josling  <tej@melbpc.org.au>
3467
3468         Remove front end hard coding from gengtype.c.
3469
3470         * config-lang.in (gtfiles): Add files needed for this front end.
3471
3472 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
3473
3474         * cp-tree.h (unqualified_name_lookup_error): Declare it.
3475         (begin_function_definition): Adjust prototype.
3476         * lex.c (unqualified_name_lookup_error): New function, split out
3477         from ...
3478         (do_identifier): ... here.
3479         * parse.y (parse_begin_function_definition): New function.
3480         (fn.def1): Use it.
3481         * semantics.c (begin_function_definition): Accept decl-specifiers
3482         and attributes as separate parameters.
3483
3484 2002-07-10  Jason Merrill  <jason@redhat.com>
3485
3486         PR c++/6255
3487         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
3488         modifying the old one.
3489
3490 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
3491
3492         * cp-tree.h (constructor_name_p): Declare it.
3493         (check_template_template_default_arg): Likewise.
3494         * class.c (handle_using_decl): Use constructor_name_p.
3495         * decl.c (grokdeclarator): Likewise.
3496         * decl2.c (constructor_name_p): Define it.
3497         * init.c (build_member_call): Use constructor_name_p.
3498         * parse.y (template_parm): Use check_template_template_default_arg.
3499         * pt.c (check_explicit_specialization): Use constructor_name_p.
3500         * semantics.c (check_template_template_default_arg): New function.
3501
3502 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3503
3504         * pt.c (can_complete_type_without_circularity): Add static to
3505         function definition.
3506
3507 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
3508
3509         * cp-tree.h (have_extern_spec): Declare it
3510         * decl.c (have_extern_spec): Define it.
3511         (start_decl): Eliminate use of used_extern_spec.
3512         (start_function): Likewise.
3513         * parse.y (have_extern_spec): Remove declaration.
3514         (used_extern_spec): Likewise.
3515         (frob_specs): Eliminate use of used_extern_spec.
3516         (.hush_warning): Likewise.
3517
3518 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
3519
3520         * Make-lang.in (cp/parse.o): Depend on decl.h.
3521         * cp-tree.h (do_decl_instantiation): Change prototype.
3522         * parse.y: Include decl.h.
3523         (parse_decl_instantiation): New function.
3524         (explicit_instantiation): Use it.
3525         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
3526         and DECLSPECS.
3527
3528 2002-07-07  Roger Sayle  <roger@eyesopen.com>
3529
3530         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
3531         constructor and destructor tests when passed a TEMPLATE_DECL.
3532
3533 2002-07-05  Jason Merrill  <jason@redhat.com>
3534
3535         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
3536         pointers.
3537
3538         PR optimization/7145
3539         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
3540
3541 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
3542
3543         Repair damage on weak-impared targets caused by my previous patch.
3544         * cp-tree.h (import_export_tinfo): Add parameter.
3545         * decl2.c (import_export_tinfo): Add parameter, post adjust
3546         DECL_COMDAT.
3547         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
3548         import_export_tinfo.
3549
3550 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3551
3552         PR c++/6944
3553         * init.c (build_aggr_init): Remove qualifiers of init before calling
3554         build_vec_init.
3555         (build_vec_init): Flatten multi-dimensional array during cleanup.
3556         (build_vec_delete_1): Abort if the type of each element is array.
3557
3558 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
3559
3560         * pt.c (instantiate_class_template): Fix typo.
3561
3562 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3563
3564         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
3565         by CVS conflict in my last patch.
3566
3567 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3568
3569         PR c++/6716
3570         * pt.c (can_complete_type_without_circularity): New function.
3571         (instantiate_class_template): Use it.
3572         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
3573         message due to incomplete fields.
3574
3575 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
3576
3577         PR c++/7112
3578         * mangle.c (write_expression): Add mangling for sizeof when
3579         applied to a type.
3580         * operators.def: Remove stale comment.
3581
3582 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
3583
3584         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
3585         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
3586         (tinfo_decl_type): Replace with ...
3587         (type_info_ptr_type): ... this.
3588         (import_export_tinfo): Declare.
3589         (tinfo_decl_p): Rename to ...
3590         (unemitted_tinfo_decl_p): ... this.
3591         * decl2.c (import_export_decl): Break out tinfo handling into ...
3592         (import_export_tinfo): ... here. New function.
3593         (finish_file): Adjust.
3594         * rtti.c (TINFO_REAL_NAME): New macro.
3595         (init_rtti_processing): Create the tinfo types.
3596         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
3597         (get_tinfo_decl): Adjust.
3598         (get_tinfo_ptr): New function.
3599         (get_type_id): Use it.
3600         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
3601         (ptr_initializer): Use get_tinfo_ptr.
3602         (ptm_initializer): Likewise.
3603         (synthesize_tinfo_var): Break into ...
3604         (get_pseudo_ti_init): ... this. Just create the initializer.
3605         (get_pseudo_ti_desc): .. and this.
3606         (create_real_tinfo_var): Remove.
3607         (create_pseudo_type_info): Don't create the vtable decl here.
3608         (get_vmi_pseudo_type_info): Remove.
3609         (create_tinfo_types): Adjust.
3610         (tinfo_decl_p): Rename to ...
3611         (unemitted_tinfo_decl_p): ... here. Adjust.
3612         (emit_tinfo_decl): Adjust. Create the initializer.
3613
3614 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
3615
3616         PR c++/6695
3617         * pt.c (tsubst_friend_class): Substitute into the context of the
3618         friend before using it.
3619
3620 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
3621
3622         * cp-tree.h (xref_tag): Change prototype.
3623         (handle_class_head): Likewise.
3624         (build_x_component_ref): Likewise.
3625         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
3626         (xref_tag): Take attributes as a separate parameter.
3627         (xref_tag_from_type): Adjust call to xref_tag.
3628         * decl2.c (build_expr_from_tree): Adjust call to
3629         build_x_component_ref.
3630         (handle_class_head): Take attributes as a separate parameter.
3631         * parse.y (parse_xref_tag): New function.
3632         (parse_handle_class_head): Likewise.
3633         (primary): Use parse_xref_tag.
3634         (class_head_decl): Use parse_handle_class_head.
3635         (class_head_defn): Likewise.
3636         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
3637         (build_dynamic_cast_1): Likewise.
3638         (create_pseudo_type_info): Likewise.
3639         (emit_support_tinfos): Likewise.
3640         * typeck.c (build_object_ref): Adjust call to
3641         build_x_component_ref.
3642         (build_x_component_ref): Remove protect parameter.
3643
3644 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
3645
3646         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
3647         * class.c (handle_using_decl): Likewise.
3648         (instantiate_type): Likewise.
3649         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
3650         (xref_basetypes): Change prototype.
3651         (begin_mem_initializers): New function.
3652         (get_overloaded_fn): Likewise.
3653         * decl.c (xref_basetypes): Simplify.
3654         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
3655         * init.c (build_offset_ref): Likewise.
3656         * parse.y (base_init): Use begin_mem_initializers().
3657         (structsp): Adjust call to xref_basetypes.
3658         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
3659         (instantiate_class_template): Adjust call to xref_basetypes.
3660         * semantics.c (begin_mem_initializers): New function.
3661         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
3662         (really_overlaoded_fn): Likewise.
3663         (get_overloaded_fn): New function.'
3664         (get_first_fn): USe BASELINK_FUNCTIONS.
3665
3666 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
3667
3668         * cp-tree.h (SCALAR_TYPE_P): New macro.
3669         (check_for_out_of_scope_variable): New function.
3670         (at_class_scope_p): Likewise.
3671         (finish_fname): Likewise.
3672         * class.c (finish_struct): Use at_function_scope_p.
3673         * decl.c (check_for_out_of_scope_variable): New function, split
3674         out from do_identifier.
3675         (finish_enum): Use at_function_scope_p.
3676         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
3677         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
3678         (primary): Use at_function_scope_p.
3679         * search.c (at_class_scope_p): New function.
3680         * semantics.c (finish_fname): Likewise.
3681         (check_multiple_declarators): Use at_function_scope_p.
3682
3683 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
3684
3685         * parse.y (parse_scoped_id): New function.
3686         (primary): Use it.
3687         * cp-tree.h (do_scoped_id): Adjust declaration.
3688         * lex.c (do_scoped_id): Remove call to yylex.
3689         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
3690         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
3691         expanding it inline.
3692
3693 2002-06-23  Matt Thomas  <matt@3am-software.com>
3694
3695         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
3696         "#if VMS_TARGET".
3697
3698 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3699
3700         * mangle.c (integer_type_codes): Const-ify.
3701
3702 2002-06-20  Richard Henderson  <rth@redhat.com>
3703
3704         PR c++/6747
3705         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
3706         Call put_var_into_stack.
3707
3708 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3709
3710         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
3711         array size calculation.
3712
3713 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3714
3715         PR c++/6892
3716         * pt.c (tsubst_expr): Handle FILE_STMT.
3717
3718 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3719
3720         PR c++/6723
3721         * pt.c (lookup_template_class): Don't build complete argument of
3722         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
3723         argument.
3724
3725 2002-06-19  Akim Demaille  <akim@epita.fr>
3726
3727         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
3728         decl.h's TYPENAME.
3729         * spew.c, lex.c: Adjust.
3730         * parse.y (explicit_instantiation): Add empty action to override
3731         the default $$ = $1 where it introduces a type clash.
3732
3733 2002-06-14  Jason Merrill  <jason@redhat.com>
3734
3735         * semantics.c (begin_for_stmt): Push the 'for' scope before
3736         adding the FOR_STMT.
3737
3738         C++ ABI changes.
3739         * class.c (build_base_field): Set DECL_PACKED.
3740         (layout_class_type): Don't use tail padding of PODs.
3741         * mangle.c (write_unqualified_name): Fix template conversion op
3742         mangling.
3743
3744 2002-06-16  Richard Henderson  <rth@redhat.com>
3745
3746         PR opt/6793
3747         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
3748         after template instantiation.
3749
3750 2002-06-16  Richard Henderson  <rth@redhat.com>
3751
3752         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
3753
3754 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
3755
3756         * cp-tree.h (compiler_error): Remove declaration.
3757         * lex.c (compiler_error): Remove definition.
3758
3759 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
3760
3761         * g++spec.c (LIBUNWIND): New.
3762         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
3763
3764 2002-06-13  Jessica Han  <jessica@cup.hp.com>
3765
3766         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
3767         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
3768         (build_vbase_offset_vtbl_entries): Likewise.
3769         * rtti.c (build_headof): Likewise.
3770         (get_tinfo_decl_dynamic): Likewise.
3771         (create_pseudo_type_info): Likewise.
3772
3773 2002-06-12  Stan Shebs  <shebs@apple.com>
3774
3775         * mpw-config.in: Remove file, no longer used.
3776         * mpw-make.sed: Ditto.
3777
3778 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
3779
3780         * decl2.c: Update call to cpp_handle_option.
3781
3782 2002-06-07  H.J. Lu  (hjl@gnu.org)
3783
3784         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
3785
3786 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
3787
3788         * error.c (cp_error_at): Fix typo.
3789
3790 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
3791
3792         * error.c (cp_diagnostic_starter): Adjust call.
3793         (maybe_print_instantiation_context): Change prototype to take a
3794         'diagnostic_info *'.
3795         (print_instantiation_full_context): Likewise.
3796         (print_instantiation_partial_context): Likewise.
3797         (cp_diagnostic_starter): Likewise.
3798         (cp_diagnostic_finalizer): Likewise.
3799         (cp_print_error_function): Likewise.
3800         (cp_printer): Take a secondary parameter as a 'text_info *'.
3801         Remove output_state savings.  Adjust calls.
3802
3803 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
3804
3805         * pt.c (inline_parm_levels): Mark for GC.
3806
3807         * mangle.c (start_mangling): Allocate G.substitutions here...
3808         (init_mangle): ... rather than here.
3809         (finish_mangling): Clear the varray pointer when done with it.
3810         * spew.c (yylexstring): Don't use VARRAY_FREE.
3811         * search.c (bfs_walk): Don't use VARRAY_FREE.
3812         * decl2.c (pending_statics): Use gengtype to mark.
3813         (deferred_fns): Likewise.
3814         (ssdf_decls): Likewise.
3815         (init_decl2): Delete.
3816         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
3817         (cxx_init_decl_processing): Don't call init_decl2.
3818         (cxx_pop_function_context): Don't use VARRAY_FREE.
3819         * cp-tree.h (struct saved_scope): No need for special marking
3820         of varrays.
3821         (struct language_function): Likewise.
3822         (local_classes): Use gengtype to mark.
3823         (init_decl2): Delete prototype.
3824         * class.c (init_class_processing): Don't use
3825         ggc_add_tree_varray_root.
3826         (build_vtbl_initializer): Don't use VARRAY_FREE.
3827
3828         * decl.c (typename_compare): Don't use same_type_p.
3829
3830         * decl.c: Include hashtab.h instead of hash.h.
3831         (typename_hash): Update to use htab_h.
3832         (typename_compare): Likewise.
3833         (typename_htab): Use gengtype to mark.
3834         (build_typename_type): Update to use htab_h.
3835         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
3836
3837         * Make-lang.in (gt-cp-tree.h): New rule.
3838         (cp/tree.o): Depend on gt-cp-tree.h.
3839         * config-lang.in (gtfiles): Add cp/tree.c.
3840         * tree.c: Include gt-cp-tree.h.
3841         (list_hash_table): Use gengtype to mark.
3842         (init_tree): Use gengtype to mark trees.
3843
3844         * Make-lang.in (cp/decl.o): Add debug.h dependency.
3845         * call.c (struct z_candidate): Use gengtype.
3846         (USER_CONV_CAND): Use WRAPPER_ZC.
3847         (convert_class_to_reference): Use build_zc_wrapper.
3848         (build_type_conversion_1): Likewise.
3849         (build_over_call): Use WRAPPER_ZC.
3850         (add_warning): Use build_zc_wrapper.
3851         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
3852         * cp-tree.h (struct lang_identifier): Use gengtype.
3853         (struct template_parm_index_s): Likewise.
3854         (struct ptrmem_cst): Likewise.
3855         (struct tree_binding): Likewise.
3856         (struct tree_overload): Likewise.
3857         (struct tree_srcloc): Likewise.
3858         (struct tree_wrapper): Likewise.  Also modify to have a pointer
3859         to struct z_candidate rather than void.
3860         (enum cp_tree_node_structure_enum): New.
3861         (union lang_tree_node): New.
3862         (cxx_mark_tree): Delete prototype.
3863         (cp_tree_node_structure): New prototype.
3864         (build_ptr_wrapper): Delete prototype.
3865         (build_int_wrapper): Delete prototype.
3866         (build_zc_wrapper): New prototype.
3867         * decl.c: Include debug.h
3868         (cxx_mark_tree): Delete.
3869         (cp_tree_node_structure): New.
3870         * tree.c (build_ptr_wrapper): Delete.
3871         (build_int_wrapper): Delete.
3872         (build_zc_wrapper): New.
3873
3874         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
3875         Correct typo.  Patch from k_fukui@highway.ne.jp.
3876
3877         * semantics.c (current_stmt_tree): Update for change to
3878         struct language_function.
3879         (finish_mem_initializers): Likewise.
3880         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
3881         * cp-tree.h (struct language_function): Rename from
3882         cp_language_function.  Change all uses.
3883         (cp_function_chain): Don't need to cast.
3884
3885         * class.c (duplicate_tag_error): Reset discriminator.
3886         (check_bases_and_members): Update for data structure changes.
3887         * cp-tree.h (struct lang_id2): Use gengtype.
3888         (flagged_type_tree): Likewise.
3889         (SET_LANG_ID): Use GGC on struct lang_id2.
3890         (struct cp_language_function): Use gengtype.  Remove field
3891         'x_vcalls_possible_p'.
3892         (current_vcalls_possible_p): Delete.
3893         (struct lang_type_header): New.
3894         (struct lang_type_class): Rename from struct lang_type.  Include
3895         struct lang_type_header.
3896         (struct lang_type_ptrmem): New.
3897         (struct lang_type): New.
3898         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
3899         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
3900         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
3901         (struct lang_decl_flags): Use gengtype.  Add discriminators.
3902         (struct lang_decl): Use gengtype.  Add and use discriminators.
3903         Update the macros that reference moved fields.
3904         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
3905         (SET_DECL_THUNK_P): Set discriminator too.
3906         (clear_inline_text_obstack): Delete prototype.
3907         (finish_inline_definitions): Delete prototype.
3908         (mark_pending_inlines): Delete prototype.
3909         (lang_check_failed): New prototype.
3910         * decl.c (struct named_label_use_list): Use gengtype.
3911         (struct named_label_list): Likewise.
3912         (mark_binding_level): Delete.
3913         (mark_named_label_lists): Delete.
3914         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
3915         (cxx_init_decl_processing): Use generated marker routine.
3916         (begin_destructor_body): Delete dead set to
3917         current_vcalls_possible_p.
3918         (mark_lang_function): Delete.
3919         (mark_cp_function_context): Delete.
3920         (lang_mark_tree): Use generated marker routines.
3921         * decl2.c (start_objects): Set discriminator when setting
3922         GLOBAL_INIT_PRIORITY.
3923         * lex.c (retrofit_lang_decl): Set discriminators.
3924         (copy_lang_type): Update for changes to lang_type structure.
3925         (cp_make_lang_type): Set discriminator.
3926         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
3927         * search.c: Include ggc.h.
3928         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
3929         (finish_inline_definitions): Delete.
3930         * spew.c (struct token): Use gengtype.
3931         (struct token_chunk): New.
3932         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
3933         (struct feed): Use gengtype.
3934         (feed_obstack): Delete.
3935         (feed): Mark as GC root.
3936         (pending_inlines): Mark as GC root.
3937         (pending_inlines_tail): Likewise.
3938         (processing_these_inlines): Likewise.
3939         (token_obstack): Make static.
3940         (first_token): Likewise.
3941         (init_spew): Don't initialize deleted things; use gengtype for roots.
3942         (clear_inline_text_obstack): Delete.
3943         (feed_input): Use GC for struct feed.  Update for changes to
3944         struct unparsed_text.
3945         (mark_pending_inlines): Delete.
3946         (next_token): Rename from add_token.  Change all callers.  Update
3947         for changes to struct unparsed_text.
3948         (space_for_token): New.
3949         (remove_last_token): New.
3950         (alloc_unparsed_text): New.
3951         (snarf_block): Take an unparsed_text.  Update for changes to struct
3952         unparsed_text.
3953         (snarf_method): Update for changes to struct unparsed_text.
3954         (snarf_defarg): Update for changes to struct unparsed_text.
3955         * tree.c (lang_check_failed): New.
3956
3957         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
3958         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
3959         (cp/spew.o): Add dependency on gt-<filename>.h.
3960         (cp/decl2.o): Add dependency on gt-<filename>.h.
3961         (cp/call.o): Add dependency on gt-<filename>.h.
3962         (cp/pt.o): Add dependency on gt-<filename>.h.
3963         (cp/repo.o): Add dependency on gt-<filename>.h.
3964         (cp/parse.o): Add dependency on gt-<filename>.h.
3965         * call.c: Use gengtype for roots.
3966         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
3967         decl2.c parse.y pt.c repo.c spew.c.
3968         * cp-tree.h: Use gengtype for roots.
3969         (struct saved_scope): Use GGC, gengtype.
3970         (cp_parse_init): Delete prototype.
3971         (init_pt): Delete prototype.
3972         * decl.c: Use gengtype for roots.
3973         (mark_saved_scope): Delete.
3974         (cxx_init_decl_processing): Don't call deleted initilisation
3975         routines.
3976         (signed_size_zero_node): Delete, unused.
3977         * decl.h: Use gengtype for roots.
3978         * decl2.c: Use gengtype for roots.
3979         * lex.h: Use gengtype for roots.
3980         * parse.y: Use gengtype for roots.
3981         (cp_parse_init): Delete.
3982         * pt.c: Use gengtype for roots.
3983         (init_pt): Delete.
3984         * repo.c: Use gengtype for roots.
3985         * spew.c: Use gengtype for roots.
3986
3987         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
3988         (cp/decl.o): Add dependency on gtype-cp.h.
3989         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
3990         Include gtype-cp.h.  Allow for filename changes.
3991
3992         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
3993         (cp/decl.o): Add cp/gt-decl.h dependency.
3994         * config-lang.in (gtfiles): New.
3995         * tree.h: Rename struct binding_level to struct cp_binding_level.
3996         * decl.c: Rename struct binding_level to struct cp_binding_level.
3997         Include cp/gt-decl.h.
3998         (struct cp_binding_level): Use gengtype.
3999         (make_binding_level): Use GGC on struct cp_binding_level.
4000         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
4001         (cxx_init_decl_processing): Mark free_binding_level as
4002         deletable.
4003
4004         * decl.c (mark_cp_function_context): Update calling sequence.
4005
4006         * decl.c (start_function): Don't free 'struct
4007         cp_language_function'.
4008         (pop_cp_function_context): Likewise.
4009         (save_function_data): Allocate it using GC.
4010         * semantics.c (genrtl_start_function): Don't free 'struct
4011         cp_language_function'.
4012
4013 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
4014
4015         * lang-specs.h: Use cpp_debug_options.
4016
4017 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
4018
4019         * mangle.c, tree.c: Include real.h.
4020         * Make-lang.in: Update dependency lists.
4021
4022 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4023
4024         * lex.c: Don't include c-lex.h.
4025         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
4026
4027 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
4028
4029         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
4030
4031 2002-05-22  Richard Henderson  <rth@redhat.com>
4032
4033         * decl.c (obscure_complex_init): Check for VAR_DECL
4034         before using DECL_THREAD_LOCAL.
4035
4036 2002-05-22  Richard Henderson  <rth@redhat.com>
4037
4038         * decl.c (check_tag_decl): Handle RID_THREAD.
4039         (obscure_complex_init): Reject run-time init of tls.
4040         (grokvardecl, grokdeclarator): Handle RID_THREAD.
4041         * lex.c (reswords): Add __thread.
4042         (rid_to_yy): Map RID_THREAD to SCSPEC.
4043
4044 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
4045
4046         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
4047         * cp-tree.h (cxx_post_options): Kill.
4048         * cp-lex.c (cxx_post_options): Kill.
4049
4050 2002-05-21  Richard Henderson  <rth@redhat.com>
4051
4052         * lex.c (rid_to_yy): Add RID_THREAD.
4053
4054 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
4055
4056         * init.c (build_vec_init): Test for trivial copy-assignment when
4057         copy-assigning arrays.
4058
4059 2002-05-20  Andreas Jaeger  <aj@suse.de>
4060
4061         * init.c (build_default_init): Remove unused variable.
4062
4063 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
4064
4065         * call.c (any_strictly_viable): New.
4066         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
4067
4068 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4069
4070         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
4071
4072 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4073
4074         PR c++/186, DR 259
4075         * pt.c (do_decl_instantiation): Don't complain explicit
4076         instantiation after explicit specialization.
4077         (do_type_instantiation): Likewise.
4078
4079 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
4080
4081         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
4082         renamed from...
4083         (complete_type_or_else): ... this.  Redefined as macro.
4084         (cxx_incomplete_type_diagnostic): Declare.
4085         (cxx_incomplete_type_error): Define as macro.
4086         * init.c (build_delete): Warn about incomplete types other than
4087         void, and use the built-in operator delete for them.
4088         * typeck.c (complete_type_or_diagnostic): Renamed from
4089         complete_type_or_else.  Added warn_only argument, passed to...
4090         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
4091         warnings or errors depending on new warn_only argument.  Renamed
4092         from...
4093         (cxx_incomplete_type_error): ... this.  New implementation in
4094         terms of cxx_incomplete_type_diagnostic.
4095
4096 2002-05-18  Jason Merrill  <jason@redhat.com>
4097
4098         PR c++/6611
4099         * decl2.c (import_export_decl): If we clear
4100         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
4101
4102 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4103
4104         PR c++/6620
4105         * pt.c (verify_class_unification): Don't check if PARM is template
4106         parameter dependent.  Simplify.
4107         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
4108         parameter dependent expression.
4109
4110 2002-05-14  Jason Merrill  <jason@redhat.com>
4111
4112         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
4113         Do set DECL_COMDAT.
4114         (synthesize_tinfo_var): Take the public decl.
4115         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
4116         (emit_tinfo_decl): Adjust.  Call import_export_decl.
4117         * decl2.c (import_export_decl): Simplify tinfo decl handling.
4118
4119 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
4120
4121         * cp-tree.h (struct lang_type): Added non_zero_init.
4122         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
4123         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
4124         * class.c (check_field_decls): Test non_zero_init.
4125         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
4126         zero-to-NULL conversions.
4127         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
4128         type that needs zero-initialization without zeros.
4129         (check_initializer_decl): Compute zero-initializer for types
4130         that require a non-trivial one.
4131         * init.c (build_forced_zero_init): New function.
4132         (build_default_init): Use it.
4133         * tree.c (zero_init_p): New function.
4134         * typeck2.c (force_store_init_value): New function.
4135         (process_init_constructor): Create non-trivial zero-initializers
4136         for array members and class fields.
4137
4138 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
4139
4140         * lang-specs.h: Remove redundant -lang-c++.
4141
4142 2002-05-13  Jason Merrill  <jason@redhat.com>
4143
4144         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
4145         (fixed_type_or_null): See through reference vars.
4146         (build_base_path): Vtable contents are constant.
4147         * typeck.c (get_member_function_from_ptrfunc): Likewise.
4148
4149 2002-05-12  Jason Merrill  <jason@redhat.com>
4150
4151         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
4152         structs are safe.
4153
4154 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4155
4156         * cp-tree.h (flag_ansi): Remove.
4157         * decl2.c (flag_ansi): Remove.
4158         (cxx_decode_option): Set flag_iso and flag_undef.
4159
4160 2002-05-09  Jason Merrill  <jason@redhat.com>
4161
4162         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
4163         Use subtraction rather than a bitmask to get the index.
4164         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
4165
4166         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
4167
4168 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
4169
4170         * Make-lang.in (decl2.o): Update.
4171         * cp-tree.h (warn_multichar): Remove.
4172         * decl2.c: Include c-common.h.
4173         (warn_multichar): Remove.
4174
4175 2002-05-03  Jason Merrill  <jason@redhat.com>
4176
4177         * tree.c (build_cplus_array_type): Only const and volatile get
4178         special handling.
4179
4180         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
4181
4182 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
4183
4184         ABI change, returning simple classes from functions.
4185         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
4186         TYPE_HAS_TRIVIAL_INIT_REF is false or
4187         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
4188
4189 2002-04-30  Jason Merrill  <jason@redhat.com>
4190
4191         PR debug/6436
4192         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
4193         anonymous class with a typedef if there are attributes.
4194
4195 2002-04-29  Paul Eggert  <eggert@twinsun.com>
4196
4197         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
4198
4199 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
4200
4201         PR c++/6477
4202         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
4203         non-NULL first.
4204
4205 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
4206
4207         PR c++/6492
4208         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
4209         enter that scope before name lookup.
4210
4211         PR c++/6486
4212         * method.c (do_build_copy_constructor): Avoid building
4213         cv-qualified reference types.
4214
4215 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
4216
4217         PR c++/5719
4218         * decl.c (grok_op_properties): Assignment ops don't have to return
4219         by value. operator% should.
4220
4221 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
4222
4223         PR c/6343
4224         * decl.c (duplicate_decls): Call merge_weak.
4225
4226 2002-04-26  Richard Henderson  <rth@redhat.com>
4227
4228         * parse.y (malloced_yyss, malloced_yyvs): New.
4229         (yyoverflow): Re-add.  Set them.
4230         (free_parser_stacks): New.
4231
4232 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
4233
4234         PR c++/6497
4235         * method.c (do_build_assign_ref): Pass a derivation to
4236         build_method_call when calling base class assignment operators.
4237
4238 2002-04-26  Richard Henderson  <rth@redhat.com>
4239
4240         * parse.y (yyoverflow): Revert.
4241
4242 2002-04-26  Richard Henderson  <rth@redhat.com>
4243
4244         PR c/3581
4245         * parse.y (string): Remove.  Update all uses to use STRING
4246         instead, and not call combine_strings.
4247         * rtti.c (tinfo_name): Use fix_string_type.
4248         * semantics.c (finish_asm_stmt): Don't call combine_strings.
4249         * spew.c (yylexstring): New.
4250         (read_token): Use it.
4251
4252 2002-04-25  Richard Henderson  <rth@redhat.com>
4253
4254         PR c/2161
4255         * parse.y (yyoverflow): New.
4256
4257 2002-04-25  Jason Merrill  <jason@redhat.com>
4258
4259         PR c++/5607
4260         * search.c (check_final_overrider): No longer static.
4261         * class.c (update_vtable_entry_for_fn): Call it.
4262         * cp-tree.h: Adjust.
4263
4264 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4265
4266         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
4267         * cp-tree.h (cxx_set_yydebug): Die.
4268         * lex.c (YYDEBUG): Get from c-lex.h.
4269         (cxx_set_yydebug): Remove.
4270         * parse.y: Include c-lex.h.
4271         (YYDEBUG): Get from c-lex.h.
4272
4273 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
4274
4275         PR c++/6438.
4276         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
4277         void.
4278
4279 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
4280
4281         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
4282         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
4283         Redefine.
4284         * cp-tree.h (cp_attribute_table): Rename.
4285         * decl.c (lang_attribute_table): Remove declaration.
4286         (cxx_init_decl_processing): Don't set it.
4287         * tree.c (cp_attribute_table): Rename.
4288
4289 2002-04-24  Jason Merrill  <jason@redhat.com>
4290
4291         PR c++/6331
4292         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
4293         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
4294         The pedwarn for array assignment is now unconditional.
4295         * tree.c (build_cplus_array_type_1): Still process simple array types
4296         normally in templates.
4297
4298         PR c++/6395
4299         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
4300         stuff for comdats.
4301
4302 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
4303
4304         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
4305         node with attributes.
4306
4307 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
4308
4309         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
4310         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
4311
4312 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
4313
4314         PR c++/6256:
4315         * pt.c (tsubst_friend_class): Handle templates with explicit
4316         nested names.
4317
4318         PR c++/6331:
4319         * typeck.c (merge_types): Remember the cv-qualification of pointer
4320         types when merging them.
4321
4322 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
4323
4324         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
4325         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
4326         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
4327         cxx_mark_function_context): New.
4328         * decl.c (push_cp_function_context, pop_cp_function_context,
4329         mark_cp_function_context): Rename for consistency.
4330         (cxx_init_decl_processing): Don't set old hooks.
4331
4332 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
4333
4334         * call.c (convert_type_from_ellipsis): Rename, update.
4335         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
4336         * cp-tree.h (convert_type_from_ellipsis): Rename.
4337         * decl.c (cxx_init_decl_processing): Don't set hook.
4338
4339 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
4340
4341         * call.c (build_new_method_call): Update.
4342         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
4343         * cp-tree.h (cxx_incomplete_type_error): New.
4344         * decl.c (grokdeclarator, grokparms): Update.
4345         * decl2.c (check_classfn): Update.
4346         * pt.c (tsubst): Update.
4347         * typeck.c (complete_type_or_else, expr_sizeof,
4348         decay_conversion): Update.
4349         * typeck2.c (incomplete_type_error): Rename.
4350         (add_exception_specifier): Update.
4351
4352 2002-04-18  Jason Merrill  <jason@redhat.com>
4353
4354         PR c++/5658
4355         * search.c (setup_class_bindings): A class template qualifies as a
4356         type binding.
4357
4358 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
4359
4360         PR c++/6316
4361         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
4362         before expanding.
4363
4364 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
4365
4366         * init.c (begin_init_stmts): Remove commented out code.
4367         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
4368         * semantics.c (begin_gobal_stmt_expr): Adjust call to
4369         expand_start_stmt_expr.
4370
4371 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
4372
4373         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
4374         dso_handle itself, to __cxa_atexit.
4375
4376 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4377
4378         * error.c (cxx_print_error_function): Adjust call to macros.
4379
4380 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
4381
4382         * class.c (layout_virtual_bases): Do all dsize computation on trees.
4383
4384 2002-04-14  Jason Merrill  <jason@redhat.com>
4385
4386         * typeck.c (get_member_function_from_ptrfunc): Don't do
4387         gratuitious division and multiplication on
4388         ptrmemfunc_vbit_in_delta targets.
4389
4390 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4391
4392         PR c++/5373.
4393         * semantics.c (finish_expr_stmt): Remember the type of the
4394         expression before any conversions are performed.
4395
4396 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4397
4398         PR c++/5189.
4399         * call.c (add_template_candidate_real): Do not treat member
4400         templates as copy constructors.
4401
4402 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4403
4404         * decl.c (duplicate_decls): Do not copy the RTL for a variable
4405         declaration if the old variable had an incomplete type and the new
4406         variable does not.
4407         (complete_vars): Do not call layout_decl for completed variables.
4408
4409 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
4410
4411         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
4412         with an explicit one.
4413         (follow_tag_typedef): New.
4414         (lookup_tag): Use it to extract the tag of an explicit typedef.
4415         (xref_tag): Likewise.
4416
4417 2002-04-11  Andrew Haley  <aph@redhat.com>
4418
4419         * typeck.c (type_after_usual_arithmetic_conversions):
4420         If two types have the same variant, return immediately.
4421         When two floating-point operands are the same precision:
4422           convert to float if one of the operands is float;
4423           if neither operand is one of the standard types, return the type
4424           of the first operand.
4425
4426 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
4427
4428         PR c++/5507
4429         * decl.c (make_typename_type): Remove implicit typenameness.
4430
4431 2002-04-09  Jason Merrill  <jason@redhat.com>
4432
4433         PR optimization/6189
4434         * semantics.c (genrtl_start_function): Don't free
4435         DECL_SAVED_FUNCTION_DATA for inline functions.
4436
4437         * init.c (build_member_call): For now, don't convert to
4438         intermediate base if it would cause an error.
4439
4440 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
4441
4442         * parse.y (namespace_qualifier, maybe_identifier,
4443         begin_explicit_instantiation, end_explicit_instantiation,
4444         apparent_template_type, .finish_template_type,
4445         do_id, maybe_init, defarg_again, component_decl_1):
4446         Add ending ';', in accordance with POSIX.
4447
4448 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
4449
4450         PR c++/5571
4451         * class.c (layout_class_type): Remember incomplete static
4452         variables.
4453         (finish_struct_1): Call complete_vars, not
4454         hack_incomplete_structures.
4455         * cp-tree.h (hack_incomplete_structures): Rename to ...
4456         (complete_vars): ... this.
4457         (struct saved_scope): Remove incomplete.
4458         (namespace_scope_incomplete): Remove.
4459         * decl.c (struct binding_level): Remove incomplete.
4460         (incomplete_vars): New variable.
4461         (mark_binding_level): Don't mark incomplete.
4462         (print_binding_level): Don't print it.
4463         (mark_saved_scope): Don't mark incomplete.
4464         (pushdecl): Use maybe_register_incopmlete_var.
4465         (cxx_init_decl_processing): Register incomplete_vars for GC.
4466         (start_decl_1): Clarify error message.
4467         (hack_incomplete_vars): Remove.
4468         (maybe_register_incomplete_var): New function.
4469         (complete_vars): Likewise.
4470
4471 2002-04-06  Jason Merrill  <jason@redhat.com>
4472
4473         PR c++/4934
4474         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
4475         set before checking it.
4476
4477         PR c++/525
4478         * init.c (build_member_call): Use build_scoped_ref.
4479         (resolve_offset_ref): Likewise.
4480         * call.c (build_scoped_method_call): Likewise.
4481         * tree.c (maybe_dummy_object): Kludge around current_class_type being
4482         wrong.
4483         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
4484         * cp-tree.h: Adjust.
4485
4486         * init.c (push_base_cleanups): Just use build_scoped_method_call.
4487
4488         PR c++/6179
4489         * method.c (implicitly_declare_fn): Pass unqualified type to
4490         synthesize_exception_spec.
4491
4492 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
4493
4494         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
4495         * cvt.c: Update comment.
4496         * init.c (expand_cleanup_for_base): Update.
4497         * semantics.c (finish_parenthesized_expr): Update.
4498         * typeck.c (cp_truthvalue_conversion): Update.
4499
4500 2002-04-04  Jason Merrill  <jason@redhat.com>
4501
4502         * semantics.c (finish_eh_cleanup): New fn.
4503         * cp-tree.h: Add prototype.
4504         * init.c (perform_member_init, expand_cleanup_for_base): Use
4505         finish_eh_cleanup.
4506         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
4507         * cp-tree.h: Remove references.
4508         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
4509         * dump.c (cp_dump_tree): Likewise.
4510         * pt.c (tsubst_expr): Likewise.
4511         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
4512         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
4513         * tree.c (cp_statement_code_p): Likewise.
4514
4515         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
4516
4517         PR c++/5636
4518         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
4519         cleanup for nrv.
4520
4521         PR c++/5104
4522         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
4523         specifiers.
4524         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
4525
4526 2002-04-03  Richard Henderson  <rth@redhat.com>
4527
4528         * cp-lang.c (cxx_warn_unused_global_decl): New.
4529         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
4530
4531 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
4532
4533         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
4534         * tree.c (init_tree): Don't set hook.
4535
4536 2002-04-03  Roger Sayle  <roger@eyesopen.com>
4537
4538         PR c++/5998:
4539         * decl.c (duplicate_decls): Don't mess with assembler names when
4540         redeclaring builtin functions as static.
4541
4542 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4543
4544         * call.c (build_addr_func): Update.
4545         * class.c (resolve_address_of_overloaded_function): Update.
4546         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
4547         * cp-tree.h (cxx_mark_addressable): New.
4548         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
4549         * decl2.c (build_cleanup): Update.
4550         * except.c (build_throw): Update.
4551         * init.c (resolve_offset_ref): Update.
4552         * pt.c (convert_nontype_argument): Update.
4553         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
4554         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
4555         unary_complex_lvalue): Update.
4556         (mark_addressable): Rename.
4557
4558 2002-04-01  Roger Sayle  <roger@eyesopen.com>
4559
4560         PR c++/5998:
4561         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
4562         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
4563         but follow the SET_DECL_RTL idiom used elsewhere in the function.
4564
4565 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4566
4567         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
4568         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
4569         * decl.c (grokdeclarator): Update.
4570         * mangle.c (write_integer_cst): Update.
4571         * typeck.c (build_binary_op): Update.
4572
4573 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
4574
4575         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
4576         * lex.c (cxx_init): Don't set hook.
4577
4578 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
4579
4580         * Make-lang.in (error.o): Update.
4581         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
4582         * cp-tree.h (struct diagnostic_context): Predeclare.
4583         (cxx_print_error_function): New.
4584         * error.c: Include langhooks-def.h.
4585         (lang_print_error_function): Rename.  Update.
4586         (init_error): Don't set hook.
4587
4588 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
4589
4590         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
4591         Redefine.
4592         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
4593         * decl.c (finish_enum): Similarly.
4594         * error.c (dump_type): Similarly.
4595         * lex.c (cxx_init): Similarly.
4596         * mangle.c (write_builtin_type): Similarly.
4597         * typeck.c (comptypes): Similarly.
4598
4599 2002-03-28  Roger Sayle  <roger@eyesopen.com>
4600
4601         PR c++/5998:
4602         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
4603         in the g++ front-end.
4604         (duplicate_decl): Allow redefinition of anticipated built-ins.
4605         Fix inlining problem by over-writing the old DECL_RTL.
4606         (lookup_namespace_name): Fail to find an identifier in the
4607         specified namespace if its still anticipated.
4608         (builtin_function_1): New function split out from builtin_function
4609         to create a builtin in the current namespace with given context.
4610         (builtin_function): Call builtin_function_1 to define the
4611         appropriate builtins in both the std and global namespaces.
4612         (select_decl): Don't test for anticipated decls here.
4613         (unqualified_namespace_lookup): Instead ignore them whilst
4614         searching through scopes and namespaces.
4615         * decl2.c (do_nonmember_using_decl): If a using declaration
4616         specifies an anticipated built-in function, mark it as no longer
4617         anticipated in that scope.
4618         (ambiguous_decl):  Avoid resolving to an anticipated decl.
4619         * lex.c (do_scoped_id): Fail to find an identifier in the global
4620         namespace if its still anticipated.
4621
4622 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
4623
4624         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
4625         * cp-tree.h (cp_make_lang_type): Rename.
4626         * lex.c (cp_make_lang_type): Rename.
4627         (make_aggr_type): Update.
4628         * tree.c (init_tree): Don't set make_lang_type_fn.
4629
4630 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
4631
4632         PR c++/6073
4633         * class.c (finish_struct_1): Update static field's DECL_MODE even
4634         if its type is a variant of t.
4635
4636 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
4637
4638         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
4639         * cp-tree.h (cxx_insert_default_attributes): New.
4640         * decl.c (insert_default_attributes): Rename.
4641
4642 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
4643
4644         PR c++/4884
4645         * call.c (build_op_delete_call): Allow for the fact the placement
4646         may be a COMPOUND_EXPR.
4647
4648 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
4649
4650         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
4651         * cp-tree.h (init_cplus_expand): Remove.
4652         (cxx_expand_expr): New.
4653         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
4654         fix prototype.
4655         (init_cplus_expand): Remove.
4656         * lex.c (cxx_init): Don't call init_cplus_expand.
4657
4658 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
4659
4660         PR c++/4884.
4661         * init.c (build_new_1): Allow for the fact the result of
4662         build_function_call may be a COMPOUND_EXPR.
4663
4664 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
4665
4666         PR c++/5682
4667         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
4668         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
4669         (dfs_skip_nonprimary_vbases_markedp): Remove.
4670         * search.c (get_shared_vbase_if_not_primary): Remove.
4671         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
4672         (dfs_skip_nonprimary_vbases_markedp): Remove.
4673         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
4674         (dfs_marked_real_bases_queue_p): Likewise.
4675
4676 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
4677
4678         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
4679         * cp-tree.h (cxx_mark_tree): New.
4680         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
4681
4682 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4683
4684         * cp-tree.h (cxx_maybe_build_cleanup): New.
4685         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
4686         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
4687         * tree.c (build_target_expr): Update.
4688         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
4689
4690 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
4691
4692         * decl2.c (cxx_decode_option): Handle -E.
4693         * lang-specs.h (default_compilers): Preprocess with cc1plus.
4694         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
4695
4696 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
4697
4698         PR c++/6037
4699         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
4700
4701 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4702
4703         * error.c (dump_type): Be careful about implicit typenames.
4704
4705 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4706
4707         PR C++/3656
4708         * semantics.c (finish_base_specifier): Handle erronous base
4709         classes.
4710
4711 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
4712
4713         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
4714         REAL_IS_NOT_DOUBLE.
4715
4716 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
4717
4718         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
4719         an index into the vtable_entry array regardless of
4720         TARGET_PTRMEMFUNC_VBIT_LOCATION.
4721
4722 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
4723
4724         * tree.c (cp_cannot_inline_tree_fn): Same.
4725
4726 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
4727
4728         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
4729         insert_block, getdecls, global_bindings_p): New.
4730
4731 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
4732
4733         PR c++/4361
4734         * mangle.c (struct globals) Add internal_mangling_p member.
4735         (write_template_param): Do internal mangling, if needed.
4736         (mangle_conv_op_name_for_type): Request internal mangling.
4737
4738 2002-03-20  Jason Merrill  <jason@redhat.com>
4739
4740         PR c++/2136
4741         * init.c (build_delete): Check access for a member op delete here.
4742         * decl2.c (delete_sanity): Not here.
4743
4744 2002-03-19  Jason Merrill  <jason@redhat.com>
4745
4746         PR c++/5118
4747         * class.c (get_vfield_name): Use the constructor_name.
4748
4749 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
4750
4751         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
4752         * cp-tree.h (lang_printable_name): Rename.
4753         * error.c (lang_decl_name): Use new hook.
4754         * lex.c (cxx_init): Remove old hook.
4755         * pt.c (tsubst_decl): Use new hook.
4756         * tree.c (lang_printable_name): Rename.
4757
4758 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
4759
4760         PR c++/3882
4761         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
4762         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
4763         only after recording the declaration.
4764
4765 2002-03-18  Jason Merrill  <jason@redhat.com>
4766
4767         PR c++/2039
4768         * init.c (resolve_offset_ref): Hand off to build_component_ref.
4769
4770         PR c++/4222, c++/5995
4771         * call.c (build_over_call): Fix empty class logic.
4772
4773         PR c++/3870
4774         * cp-tree.h (struct saved_scope): Add last_parms field.
4775         * decl.c (maybe_push_to_top_level): Save last_function_parms.
4776         (pop_from_top_level): Restore it.
4777
4778         PR c++/4377
4779         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
4780         NON_LVALUE_EXPRs.
4781
4782         PR c++/4003
4783         * pt.c (tsubst_friend_function): Use decl_namespace_context.
4784
4785         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
4786         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
4787         type with a nontrivial destructor.
4788
4789 2002-03-17  Jason Merrill  <jason@redhat.com>
4790
4791         PR c++/4460
4792         * class.c (build_base_path): Virtual base layout is fixed in
4793         in-charge [cd]tors.
4794
4795 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
4796
4797         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
4798         * parse.y (yyparse): Remove macro.
4799
4800 2002-03-17  Jason Merrill  <jason@redhat.com>
4801
4802         PR c++/5757
4803         * init.c (build_new_1): Pass the right pointer to op delete.
4804
4805 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
4806
4807         PR c++/4361
4808         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
4809         conversion operators go.
4810         (struct lang_decl_flags): Add template_conv_p and unused
4811         bitfields.
4812         (DECL_TEMPLATE_CONV_FN_P): New macro.
4813         * call.c (build_user_type_conversion_1): Don't check second type
4814         conversion of overload set first.
4815         * class.c (add_method): Make sure templated conversion operators
4816         all end up on slot 2.
4817         * lex.c (do_identifier): A conversion operator token might be
4818         satisfied by a templated conversion operator.
4819         * pt.c (check_explicit_specialization): Use
4820         CLASSTYPE_FIRST_CONVERSION_SLOT.
4821         (template_parm_this_level_p): New function.
4822         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
4823         * search.c (lookup_fnfields_1): Template conversions will be on
4824         the first slot.
4825         * typeck.c (build_component_ref): Preserve the type of an
4826         conversion operator name on the overload type.
4827         (build_x_function_call): Retrieve the conversion operator name.
4828
4829 2002-03-15  Richard Henderson  <rth@redhat.com>
4830
4831         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
4832
4833 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
4834
4835         * cp-tree.h (CLEANUP_DECL): Remove.
4836         (CLEANUP_EXPR): Likewise.
4837         * decl.c (destroy_local_var): Simplify.
4838         (maybe_build_cleanup): Tidy.
4839         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
4840         * semantics.c (cp_expand_stmt): Likewise.
4841         * cp/tree.c (cp_statement_code_p): Likewise.
4842
4843 2002-03-15  Jason Merrill  <jason@redhat.com>
4844
4845         PR c++/5857
4846         * decl.c (duplicate_decls): Use merge_types instead of common_type.
4847         * typeck.c (common_type): Just hand off to
4848         type_after_usual_arithmetic_conversions and
4849         composite_pointer_type.
4850         (merge_types): New fn.
4851         (commonparms): Use it instead of common_type.
4852         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
4853         (composite_pointer_type): Also handle attributes.
4854         * cp-tree.h: Declare merge_types.
4855
4856         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
4857         variables.
4858         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
4859
4860 2002-03-14  Richard Henderson  <rth@redhat.com>
4861
4862         * decl.c: Include c-pragma.h.
4863         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
4864         * Make-lang.in: Update dependencies.
4865
4866 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
4867
4868         PR c++/5908
4869         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
4870         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
4871
4872 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
4873
4874         * mangle.c (write_builtin_type): Handle 128-bit integers even if
4875         they are not a standard integer type.
4876
4877 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
4878
4879         * cp-tree.h (init_init_processing): Remove declaration.
4880         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
4881         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
4882
4883 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4884
4885         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
4886         Define.
4887         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
4888         tree_code_length.
4889         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
4890         cplus_tree_code_name): Delete.
4891         (cxx_init): Don't call add_c_tree_codes, instead set
4892         lang_unsafe_for_reeval.  Don't try to copy into the various
4893         tree_code arrays.
4894
4895 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
4896
4897         PR c++/5659
4898         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
4899         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
4900         definitions.
4901
4902 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
4903
4904         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
4905         DR209 is now not a defect.
4906         * cp-tree.h (skip_type_access_control): Remove.
4907         * decl.c (grokdeclarator): Do type access control for friend
4908         declarations.
4909         * semantics.c (decl_type_access_control): Don't reset
4910         current_type_lookups.
4911         (save_type_access_control): Always save the lookups.
4912         (skip_type_access_control): Remove.
4913         (finish_class_definition): Don't change type_lookups.
4914
4915 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
4916
4917         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
4918         It is incorrect.
4919         * typeck.c (build_static_cast): Compare non-qualified types
4920         with pointer to member conversions.
4921
4922 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
4923             Daniel Berlin  <dan@dberlin.org>
4924
4925         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
4926         (cxx_get_alias_set): Use it.
4927
4928 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4929
4930         * cp-tree.h (stabilize_expr): Prototype.
4931
4932 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4933
4934         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
4935         conditional return void.
4936
4937 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
4938
4939         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
4940         * cp-tree.h (cxx_unsave): New.
4941         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
4942         (init_tree): Update.
4943
4944 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4945
4946         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
4947         explicit sizeof/sizeof.
4948         * decl2.c (cxx_decode_option): Likewise.
4949         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
4950
4951 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4952
4953         PR c++/775
4954         * decl.c (lookup_tag): Only reject enum/class mismatch, not
4955         class/union mismatch.
4956         * parse.y (check_class_key): New function.
4957         (structsp): Call it.
4958
4959 2002-03-01  Michael Matz  <matz@suse.de>
4960
4961         * typeck.c (cp_pointer_int_sum): Complete inner type which is
4962         used later by size_in_bytes().
4963
4964 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
4965
4966         * cp-tree.h:  Require __GNUC__ to be #defined.
4967         (build_init):  Add missing prototype.
4968
4969 2002-03-01  Jason Merrill  <jason@redhat.com>
4970
4971         * except.c: Don't include decl.h or obstack.h.  Do include
4972         tree-inline.h.
4973         (build_throw): Destroy temporaries from the thrown
4974         expression before calling __cxa_throw.  Construct a thrown
4975         temporary directly into the exception object.
4976         (stabilize_throw_expr): New function.
4977         (wrap_cleanups_r): New function.
4978         * tree.c (stabilize_expr): New function.
4979         * init.c (build_init): New function.
4980         * Make-lang.in (cp/except.o): Adjust .h deps.
4981
4982 2002-02-28  Jason Merrill  <jason@redhat.com>
4983
4984         * search.c (lookup_base_r): Don't clear is_non_public just because
4985         we found a friendly scope.
4986
4987         * decl.c (finish_function): Only warn about missing return
4988         statement with -Wreturn-type.
4989
4990 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
4991
4992         * class.c (build_clone): Update.
4993         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
4994         * cp-tree.h (cxx_dup_lang_specific_decl): New.
4995         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
4996         (copy_decl): Update.
4997         * method.c (make_thunk): Update.
4998
4999 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
5000
5001         * decl2.c: Delete traditional-mode-related code copied from
5002         the C front end but not used, or used only to permit the
5003         compiler to link.
5004
5005 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
5006
5007         PR c++/4093
5008         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
5009         to void.
5010
5011 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
5012
5013         PR other/5746
5014         * semantics.c (finish_switch_cond): Don't call get_unwidened
5015         if error_mark_node.
5016
5017 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
5018
5019         PR c++/2645, DR 295
5020         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
5021         tf_keep_type_decl.
5022         (make_typename_type): Use tsubst_flags_t.
5023         * decl.c (make_typename_type): Adjust. Return non-artificial
5024         TYPE_DECLs, if required.
5025         (grokdeclarator): Simplify CVR qualification handling. Allow bad
5026         qualifiers on typedef types.
5027         * decl2.c (handle_class_head): Adjust make_typename_type call.
5028         * parse.y (nested_name_specifier): Likewise.
5029         (typename_sub0): Likewise.
5030         (typename_sub1): Likewise.
5031         * pt.c (convert_template_argument): Adjust make_typename_type
5032         return value.
5033         (tsubst): Adjust cp_build_qualified_type_real calls.
5034         (check_cv_quals_for_unify): Cope with allowing bad qualifications
5035         on template type parms.
5036         (instantiate_decl): Recheck substitutions to give warnings on bad
5037         qualifications.
5038         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
5039
5040 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
5041
5042         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
5043
5044         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
5045         unless DECL_ALWAYS_INLINE.
5046
5047 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
5048
5049         * typeck.c (cp_pointer_int_sum): Renamed from
5050         pointer_int_sum, call pointer_int_sum.
5051
5052 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
5053
5054         * decl.c (duplicate_decls): Return 0 if issued error about
5055         redeclaration.
5056
5057 2002-02-19  Jason Merrill  <jason@redhat.com>
5058
5059         ABI change: Mangle `void (A::*)() const' as
5060         M1AKFvvE, not MK1AFvvE.
5061         * mangle.c (write_function_type): Write cv-quals for member
5062         function type here.
5063         (write_pointer_to_member_type): Not here.
5064
5065 2002-02-18  Jason Merrill  <jason@redhat.com>
5066
5067         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
5068         (do_decl_instantiation): Likewise.
5069
5070 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5071
5072         PR c++/5685
5073         * decl.c (duplicate_decls): Make warning unconditional
5074         if duplicate default argument declarations are present.
5075
5076 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
5077
5078         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
5079         shortening.
5080
5081 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
5082
5083         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
5084         remove incorrect comment. Move #if 0'd code to common path. Use
5085         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
5086
5087 2002-02-13  Jason Merrill  <jason@redhat.com>
5088
5089         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
5090         (finish_function): Don't warn if current_function_returns_null.
5091
5092         * typeck2.c (digest_init): Do handle values of vector type.
5093
5094         * typeck2.c (digest_init, process_init_constructor): Treat vectors
5095         like arrays.
5096
5097 2002-02-11  Jason Merrill  <jason@redhat.com>
5098
5099         * parse.y (reserved_declspecs): Don't handle attributes.
5100         (reserved_typespecquals): Handle them here.
5101         * Make-lang.in (parse.c): Adjust expected conflicts.
5102
5103 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
5104
5105         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
5106         instead of compstmt.
5107         (compstmt_or_stmtexpr): Renamed from compstmt.
5108         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
5109
5110 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
5111
5112         Rename instantiate_type_flags to tsubst_flags_t & expand use.
5113         * cp-tree.h (instantiate_type_flags): Rename to ...
5114         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
5115         add tf_warning flag.
5116         (instantiate_type): Adjust prototype.
5117         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
5118         do_type_instantiation, cp_build_qualified_type_real): Likewise.
5119         cp_build_qualified_type: Adjust.
5120         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
5121         tf_*.
5122         * call.c (standard_conversion): Rename itf_* to tf_*.
5123         (reference_binding): Likewise.
5124         (convert_like_real): Likewise.
5125         * cvt.c (cp_convert_to_pointer): Likewise.
5126         (convert_to_reference): Likewise.
5127         * decl.c (lookup_namespace_name): Use tf_* flags.
5128         (make_typename_type): Likewise.
5129         (grokdeclarator): Likewise.
5130         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
5131         (coerce_template_template_parms, convert_template_argument,
5132         coerce_template_parms, maybe_get_template_decl_from_type_decl,
5133         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
5134         instantiate_class_template, tsubst_template_arg_vector,
5135         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
5136         tsubst_decl, tsubst_arg_types, tsubst_function_type,
5137         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
5138         instantiate_template, fn_type_unification,
5139         resolve_overloaded_unification, verify_class_unification,
5140         unify, get_bindings_real, do_type_instantiation,
5141         regenerate_decl_from_template, instantiate_decl,
5142         tsubst_initializer_list, tsubst_enum,
5143         get_mostly_instantiated_function_type,
5144         invalid_nontype_parm_type_p): Likewise.
5145         * tree.c (cp_build_qualified_type_real): Likewise.
5146         * typeck.c (build_binary_op): Rename itf_* to tf_*.
5147         (build_ptrmemfunc): Likewise.
5148         (convert_for_assignment): Likewise.
5149
5150 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
5151
5152         PR c++/109
5153         * decl.c (grokdeclarator): Allow friend declarations from
5154         dependent types.
5155         * decl2.c (handle_class_head): Don't push into template parm contexts.
5156         * pt.c (push_template_decl_real): Template parm contexts are never
5157         being defined.
5158
5159 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
5160
5161         * class.c: Include target.h.
5162         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
5163         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
5164         bit-field layout.
5165         * Make-lang.in: Adjust deps.
5166
5167 2002-02-05  Jason Merrill  <jason@redhat.com>
5168
5169         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
5170
5171 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
5172
5173         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
5174         (finish_switch_cond): Set SWITCH_TYPE.
5175
5176 2002-02-04  Richard Henderson  <rth@redhat.com>
5177
5178         * method.c (use_thunk): Always initialize the block tree.  Reindent.
5179         * semantics.c (expand_body): Emit thunks after function, not before.
5180
5181 2002-02-04  Jason Merrill  <jason@redhat.com>
5182
5183         * decl.c (start_function): Call cplus_decl_attributes immediately
5184         after grokdeclarator.
5185
5186         * decl.c (start_function): Combine DECL_RESULT handling code.
5187
5188 2002-02-03  Jason Merrill  <jason@redhat.com>
5189
5190         * xref.c: Remove.
5191         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
5192         (cp/xref.o): Remove dependencies.
5193         * class.c (finish_struct_1, check_methods): Don't call xref fns.
5194         (finish_struct_1): Likewise.
5195         * friend.c (make_friend_class): Likewise.
5196         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
5197         * spew.c (read_process_identifier): Likewise.
5198
5199 2002-02-01  Jason Merrill  <jason@redhat.com>
5200
5201         PR c++/4872
5202         * decl.c (finish_function): Warn about a non-void function with
5203         no return statement and no abnormal exit.
5204         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
5205         (current_function_returns_abnormally): New macro.
5206         * call.c (build_call): Set it.
5207
5208         * typeck.c (build_component_ref): Always complain about offsetof
5209         constructs on non-PODs.  Only make it an error for members of
5210         virtual bases.
5211
5212         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
5213         (dump_function_decl): Always dump parms.
5214
5215         * decl2.c (finish_static_data_member_decl): Complain about a local
5216         class with a static data member.
5217
5218         PR c++/4286
5219         * search.c (lookup_field_1): Don't xref a static data member
5220         just because we looked it up.
5221
5222 2002-01-31  Jason Merrill  <jason@redhat.com>
5223
5224         * Make-lang.in (parse.c): Handle .output file.
5225
5226         PR c++/3395
5227         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
5228         not TREE_TYPE.
5229         * semantics.c (finish_class_definition): Adjust.
5230
5231         Allow attributes in parms and casts.
5232         * parse.y (named_parm): Don't strip attrs.
5233         (declmods): Remove 'attributes' production.
5234         (nonempty_cv_qualifiers): Accept attributes.
5235         (ATTRIBUTE): Give precedence.
5236         * decl.c (groktypename): Handle attributes.
5237         (grokparms): Likewise.
5238
5239 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
5240
5241         * decl2.c (cxx_decode_option): Pass 0 as last argument to
5242         cpp_handle_option.
5243         * lang-specs.h: Use cpp_unique_options instead of cpp_options
5244         when used together with cc1_options.
5245
5246 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
5247
5248         PR c++/5132
5249         * typeck2.c (digest_init): Make sure non-array core type is
5250         instantiated.
5251         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
5252         constructor, rather than build a new one.
5253         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
5254         PURPOSE of constructor elts.
5255
5256 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
5257
5258         * Make-lang.in (parse.c): Adjust expected number of
5259         shift-reduce conflicts.
5260         (decl.o): Depend on diagnostic.h.
5261         * decl.c: Include diagnostic.h.
5262         (grokdeclarator): Check for null pointer.
5263         (finish_function): Don't abort when
5264         current_binding_level->parm_flag != 1, if errors have
5265         occurred; throw away the statement tree and extra binding
5266         levels, and continue.
5267         * lex.c (note_list_got_semicolon): Check for null pointer.
5268         * method.c (hack_identifier): Just return error_mark_node if
5269         value is error_mark_node.
5270         * parse.y (primary: TYPEID(type_id)): No need to use
5271         TYPE_MAIN_VARIANT here.
5272         (handler_seq): Accept an empty list of catch clauses and
5273         generate a fake handler block to avoid later crashes.
5274         (ansi_raise_identifier): Accept the error token too.
5275         * semantics.c (begin_class_definition,
5276         finish_class_definition): Check for error_mark_node.
5277
5278 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
5279
5280         * typeck2.c (friendly_abort): Delete definition.
5281         * cp-tree.h (friendly_abort): Don't prototype.
5282         (my_friendly_assert): Use fancy_abort.
5283
5284 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5285
5286         * cp-tree.h (my_friendly_abort): Remove.
5287
5288 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
5289
5290         * spew.c (pending_inlines, pending_inlines_tail,
5291         processing_these_inlines): Make static.
5292         (mark_pending_inlines): Remove static.
5293         (begin_parsing_inclass_inline): If in function, save pi
5294         for GC to cp_function_chain->unparsed_inlines instead.
5295         (process_next_inline): Likewise.
5296         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
5297         (mark_pending_inlines): Add prototype.
5298         * decl.c (spew_debug): Remove unused extern.
5299         (mark_lang_function): Call mark_pending_inlines.
5300
5301 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5302
5303         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
5304         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
5305         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
5306         Change my_fancy_abort() to abort().
5307
5308 2002-01-23  Jason Merrill  <jason@redhat.com>
5309
5310         PR c++/5453
5311         * class.c (fixed_type_or_null): Fix thinko.
5312
5313         PR c++/3331
5314         * init.c (resolve_offset_ref): Use build_indirect_ref.
5315
5316         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
5317
5318 2002-01-22  Jason Merrill  <jason@redhat.com>
5319
5320         * parse.y (function_body): Suppress the block for the outermost
5321         curly braces.
5322         * decl.c (pushdecl): Don't try to skip it.
5323         (begin_function_body): Keep the block we create, not the next one.
5324         * init.c (emit_base_init): Don't mess with keep_next_level.
5325
5326         * class.c (build_base_path): Tweak formatting.
5327
5328 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5329
5330         Fix regression introduced with patch for c++/775
5331         * parse.y (class_head_defn): Check for template specializations
5332         with a different class-key.
5333
5334 2002-01-17  Jason Merrill  <jason@redhat.com>
5335
5336         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
5337         (begin_function_body): Call them and keep_next_level.
5338         * init.c (emit_base_init): Call keep_next_level.
5339         * semantics.c (setup_vtbl_ptr): Lose.
5340         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
5341         (vtbls_set_up_p): Lose.
5342         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
5343         * method.c (do_build_copy_constructor): Likewise.
5344         (synthesize_method): Call finish_mem_initializers.
5345         * parse.y (nodecls): Likewise.
5346
5347         * error.c (dump_type_suffix): Print the exception specs before
5348         recursing.
5349         (dump_function_decl): Here, too.
5350
5351         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
5352
5353 2002-01-10  Ira Ruben   <ira@apple.com>
5354
5355         PR c++/907
5356         * decl.c (start_method): Handle attrlist.
5357
5358 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
5359
5360         * decl2.c (max_tinst_depth): Increase default limit to 500.
5361
5362 2002-01-10  Graham Stott  <grahams@redhat.com>
5363
5364         * spew.c (YYCHAR): Uppercase macro parameter and add
5365         parenthesis.
5366         (YYCODE): Likewise.
5367         (NAME): Uppercase macro parameter.
5368
5369 2002-01-09  Graham Stott  <grahams@redhat.com>
5370
5371         * decl.h (grokdeclarator): Wrap long line.
5372
5373         * semantics.c (FINISH_COND): Uppercase macro paramaters and
5374         add parenthesis.
5375
5376 2002-01-08  Graham Stott  <grahams@redhat.com>
5377
5378         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
5379         (PALLOC): Uppercase macro parameter and whitespace.
5380         (SALLOC): Uppercase macro parameter.
5381         (SFREE): Uppercase macros parameter, add parenthese and
5382         whitespace.
5383         (STREQL): Uppercase macro parameter and whitespace.
5384         (STRNEQ): Likewise.
5385         (STRLSS): Likewise.
5386         (STRLEQ): Likewise.
5387         (STRGTR): Likewise.
5388         (STRGEQ): Likewise.
5389
5390         * call.c (convert_like): Add parenthesis and wrap.
5391         (convert_like_with_context): Likewise.
5392         (ICS_RANK): Whitespace.
5393         (NEED_TEMPORARY_P): Remove parenthesis.
5394
5395         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
5396         whitespace.
5397         (VTT_MARKED_BINFO_P): Likewise.
5398
5399         * decl.c (BINDING_LEVEL): Add parenthesis.
5400         (DEF_OPERATOR): Likewise.
5401
5402         * mangle.c (MANGLE_TRACE): Add parenthesis.
5403         (MANGLE_TRACE_TREE): Likewise.
5404         (write_signed_number): Likewise.
5405         (write_unsigned_number): Likewise.
5406
5407         * pt.c (ccat): Uppercase macro parameter.
5408         (cat): Likewise
5409
5410         * search.c (SET_BINFO_ACCESS): Add parenthesis.
5411
5412 2002-01-07  Jason Merrill  <jason@redhat.com>
5413
5414         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
5415         to pedwarn.
5416
5417         PR c++/3536
5418         * method.c (make_thunk): If !flag_weak, give the thunk the
5419         function's linkage.
5420         (use_thunk): Here, too.
5421
5422 2002-01-07  Graham Stott  <grahams@redhat.com>
5423
5424         * error.c: Update copyright date.
5425         (print_scope_operator): Add parenthesis.
5426         (print_left_paren): Likewise.
5427         (print_right_paren): Likewise.
5428         (print_left_bracket): Likewise.
5429         (print_right_bracket): Likewise.
5430         (print_template_argument_list_start): Likewise.
5431         (print_template_argument_list_end): Likewise.
5432         (print_non_consecutive_character): Likewise.
5433         (print_tree_identifier): Likewise.
5434         (print_identifier): Likewise.
5435         (NEXT_CODE): Uppercase macro parameter.
5436         (ident_fndecl): Delete unused.
5437         (GLOBAL_THING): Likewise.
5438
5439 2002-01-06  Graham Stott  <grahams@redhat.com>
5440
5441         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
5442         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
5443         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
5444         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
5445         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
5446         (C_IS_RESERVED_WORD): Uppercase macro parameter.
5447         (C_RID_YYCODE) Likewise.
5448         (ptrmem_cst): Use rtx.
5449         (LOCAL_BINDING_P): Add whitespace.
5450         (INHERITED_VALUE_BINDING_P): Likewise.
5451         (BINDING_SCOPE): Wrap long line.
5452         (BINDING_HAS_LEVEL_P): Remove parenthesis.
5453         (BINDING_VALUE): Wrap long line.
5454         (BINDING_TYPE): Whitespace.
5455         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
5456         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
5457         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
5458         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
5459         (same_type_p): Uppercase macro parameters.
5460         (same_type_ignoring_top_level_qualifiers_p): Likewise.
5461         (OVL_FUNCTION): Wrap long line.
5462         (OVL_CHAIN): Whitespace.
5463         (OVL_CURRENT): Add parenthesis and whitespace.
5464         (OVL_NEXT): Whitespace.
5465         (OVL_USED): Likewise.
5466         (IDENTIFIER_TYPE_VALUE): Likewise.
5467         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
5468         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
5469         (LANG_ID_FIELD): Whitespace.
5470         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
5471         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
5472         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
5473         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
5474         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
5475         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
5476         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
5477         (IDENTIFIER_VIRTUAL_P): Likewise.
5478         (IDENTIFIER_OPNAME_P): Likewise.
5479         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
5480         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
5481         (C_SET_EXP_ORIGINAL_CODE): Likewise.
5482         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
5483         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
5484         (IS_AGGR_TYPE): Uppercase macro parameter.
5485         (CLASS_TYPE_P): Likewise.
5486         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
5487         (IS_AGGR_TYPE_2): Whitespace.
5488         (TAGGED_TYPE_P): Uppercase macro parameter.
5489         (TYPE_BUILT_IN): Whitespace.
5490         (TYPE_FOR_JAVA): Likewise.
5491         (FUNCTION_ARG_CHAIN): Remove parenthesis.
5492         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
5493         (FUNCTION_FIRST_USER_PARAM): Likewise.
5494         (PROMOTES_TO_AGGR_TYPE): Whitespace.
5495         (DERIVED_FROM_P): Add parenthesis and wrap.
5496         (UNIQUELY_DERIVED_FROM_P): Likewise.
5497         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
5498         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
5499         (CLASSTYPE_USE_TEMPLATE): Whitespace.
5500         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
5501         (TYPE_GETS_DELETE): Add parenthesis.
5502         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
5503         (TYPE_HAS_ASSIGN_REF): Likewise,
5504         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
5505         (TYPE_HAS_INIT_REF): Likewise.
5506         (TYPE_HAS_CONST_INIT_REF): Likewise.
5507         (TYPE_BEING_DEFINED): Likewise.
5508         (TYPE_LANG_SPECIFIC): Likewise.
5509         (CLASSTYPE_RTTI): Likewise.
5510         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
5511         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
5512         (TYPE_OVERLOADS_ARROW): Likewise.
5513         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
5514         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
5515         (CLASSTYPE_METHOD_VEC): Likewise.
5516         (CLASSTYPE_MARKED_N): Likewise.
5517         (CLASSTYPE_MARKED): Likewise.
5518         (CLASSTYPE_MARKED2): Likewise.
5519         (CLASSTYPE_MARKED3): Likewise.
5520         (CLASSTYPE_MARKED4): Likewise.
5521         (CLASSTYPE_MARKED5): Likewise.
5522         (CLASSTYPE_MARKED6): Likewise.
5523         (SET_CLASSTYPE_MARKED): Whitespace.
5524         (CLEAR_CLASSTYPE_MARKED): Likewise.
5525         (SET_CLASSTYPE_MARKED2): Likewise.
5526         (CLEAR_CLASSTYPE_MARKED2): Likewise.
5527         (SET_CLASSTYPE_MARKED3): Likewise.
5528         (CLEAR_CLASSTYPE_MARKED3): Likewise.
5529         (SET_CLASSTYPE_MARKED4): Likewise.
5530         (CLEAR_CLASSTYPE_MARKED4): Likewise.
5531         (SET_CLASSTYPE_MARKED5): Likewise.
5532         (CLEAR_CLASSTYPE_MARKED5): Likewise.
5533         (SET_CLASSTYPE_MARKED6): Likewise.
5534         (CLEAR_CLASSTYPE_MARKED6): Likewise.
5535         (CLASSTYPE_TAGS): Likewise.
5536         (CLASSTYPE_VSIZE): Likewise.
5537         (CLASSTYPE_VBASECLASSES): Likewise.
5538         (CANONICAL_BINFO): Add parenthesis.
5539         (CLASSTYPE_SIZE(NODE): Likewise.
5540         (CLASSTYPE_SIZE_UNIT): Likewise.
5541         (CLASSTYPE_ALIGN(NODE): Likewise.
5542         (CLASSTYPE_USER_ALIGN): Likewise.
5543         (TYPE_JAVA_INTERFACE): Likewise.
5544         (CLASSTYPE_PURE_VIRTUALS): Likewise.
5545         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
5546         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
5547         (CLASSTYPE_HAS_MUTABLE): Likewise.
5548         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
5549         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
5550         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
5551         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
5552         (CLASSTYPE_INTERFACE_ONLY): Likewise.
5553         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
5554         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5555         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
5556         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5557         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
5558         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
5559         (BINFO_UNSHARED_MARKED): Whitespace.
5560         (BINFO_MARKED): Whitespace and wrap.
5561         (SET_BINFO_MARKED): Likewise.
5562         (CLEAR_BINFO_MARKED): Likewise.
5563         (BINFO_VTABLE_PATH_MARKED): Likewise.
5564         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
5565         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
5566         (BINFO_SUBVTT_INDEX): Remove parenthesis.
5567         (BINFO_VPTR_INDEX): Likewise.
5568         (BINFO_PRIMARY_BASE_OF): Likewise,
5569         (CLASSTYPE_VFIELDS): Whitespace.
5570         (VF_DERIVED_VALUE): Wrap long line.
5571         (NAMESPACE_LEVEL): Whitespace.
5572         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
5573         (DEFARG_POINTER): Whitespace.
5574         (DECL_NEEDED_P): Remove parenthesis.
5575         (DECL_LANGUAGE): Whitespace.
5576         (SET_DECL_LANGUAGE): Add parenthesis.
5577         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
5578         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
5579         (DECL_IN_AGGR_P): Whitespace.
5580         (DECL_FRIEND_P): Likewise.
5581         (DECL_BEFRIENDING_CLASSES): Likewise.
5582         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
5583         (DECL_NONCONVERTING_P): Whitespace.
5584         (DECL_PURE_VIRTUAL_P): Likewise.
5585         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
5586         (DECL_PENDING_INLINE_INFO): Whitespace.
5587         (DECL_SORTED_FIELDS): Likewise.
5588         (DECL_DEFERRED_FN): Likewise.
5589         (DECL_TEMPLATE_INFO): Likewise.
5590         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
5591         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
5592         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
5593         (TMPL_ARGS_LEVEL): Likewise.
5594         (SET_TMPL_ARGS_LEVEL): Likewise.
5595         (INNERMOST_TEMPLATE_PARMS): Whitespace.
5596         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
5597         (INTEGRAL_CODE_P(CODE): Add parenthesis.
5598         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
5599         (TYPE_HAS_CONSTRUCTOR): Whitespace.
5600         (TREE_HAS_CONSTRUCTOR): Likewise.
5601         (TYPE_HAS_DESTRUCTOR): Likewise.
5602         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
5603         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
5604         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
5605         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
5606         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
5607         (TYPE_PTRMEMFUNC_P): Likewise.
5608         (TYPE_PTRMEMFUNC_FLAG): Likewise.
5609         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
5610         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
5611         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
5612         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5613         (DECL_ACCESS): Whitespace.
5614         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
5615         (DECL_GLOBAL_DTOR_P): Likewise.
5616         (GLOBAL_INIT_PRIORITY): Likewise.
5617         (DECL_TEMPLATE_PARMS): Likewise.
5618         (DECL_TEMPLATE_RESULT): Likewise.
5619         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
5620         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
5621         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
5622         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
5623         (PRIMARY_TEMPLATE_P): Add parenthesis.
5624         (DECL_USE_TEMPLATE): Whitespace.
5625         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
5626         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
5627         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
5628         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
5629         (CALL_DECLARATOR_PARMS): Remove parenthesis.
5630         (CALL_DECLARATOR_QUALS): Likewise.
5631         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
5632         (TEMP_NAME_P): Wrap.
5633         (VFIELD_NAME_P): Likewise.
5634         (B_SET): Uppercase macro parameters and add parenthesis.
5635         (B_CLR): Likewise.
5636         (B_TST): Likewise.
5637         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
5638         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
5639         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
5640         (same_or_base_type_p): Likewise.
5641         (cp_deprecated): Likewise.
5642
5643 2002-01-05  Richard Henderson  <rth@redhat.com>
5644
5645         * semantics.c (expand_body): Revert last change.
5646
5647 2002-01-04  Jason Merrill  <jason@redhat.com>
5648
5649         PR c++/4122
5650         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
5651         lost primary.
5652
5653         * class.c (build_vtbl_initializer): Check for a lost primary
5654         before calculating the vtable entry to throw away.
5655
5656 2002-01-02  Jason Merrill  <jason@redhat.com>
5657
5658         * semantics.c (expand_body): Call outlining_inline_function when
5659         emitting an inline function out of line.
5660
5661 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5662
5663         PR c++/5116, c++/764 reversion
5664         * call.c (build_new_op): Revert the instantiations. They are
5665         incorrect.
5666
5667 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5668
5669         PR c++/5089
5670         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
5671
5672 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5673
5674         PR c++/3716
5675         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
5676         (tsubst, case POINTER_TYPE): Handle pmfs here.
5677         (tsubst, case OFFSET_TYPE): Check it is not an offset to
5678         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
5679
5680 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5681
5682         PR c++/35
5683         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
5684         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
5685         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
5686         PARM_DECL.
5687         (tsubst_template_parms): Break up loop statements.
5688         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
5689         parm PARM_DECLs don't get promoted.
5690
5691 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5692
5693         PR c++/5123
5694         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
5695         (build_x_function_call): Cope with a COMPONENT_REF containing a
5696         TEMPLATE_ID_EXPR.
5697
5698 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5699
5700         PR c++/5213
5701         * pt.c (convert_template_argument): Be more careful determining
5702         when RECORD_TYPE templates are or are not templates.
5703
5704 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5705
5706         PR c++/775
5707         * cp-tree.h (handle_class_head): Adjust prototype.
5708         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
5709         parameters. Use for all class heads.
5710         * parse.y (named_class_head_sans_basetype, named_class_head,
5711         named_complex_class_head_sans_basetype,
5712         named_class_head_sans_basetype_defn,
5713         unnamed_class_head): Remove.
5714         (class_head, class_head_apparent_template): Recognize class heads
5715         (class_head_decl, class_head_defn): New reductions. Process class
5716         heads.
5717         (structsp): Adjust class definition and class declaration
5718         reductions.
5719         (maybe_base_class_list): Give diagnostic on empty list.
5720
5721 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5722
5723         PR c++/4379
5724         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
5725         single non-static member.
5726         (unary_complex_lvalue): If it cannot be a pointer to member, don't
5727         make it so. Check it is not pointer to reference.
5728
5729 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5730
5731         PR c++/5132
5732         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
5733         are processing a template decl.
5734
5735 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5736
5737         PR c++/5116, c++/764
5738         * call.c (build_new_op): Make sure template class operands are
5739         instantiated. Simplify arglist construction.
5740
5741 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
5742
5743         * call.c (build_user_type_conversion_1): Use my_friendly_assert
5744         rather than if ... abort.
5745         * cvt.c (convert_to_reference): Likewise.
5746         * semantics.c (setup_vtbl_ptr): Likewise.
5747         * pt.c (lookup_template_class): Comment typo.
5748
5749 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
5750
5751         PR c++/5125
5752         * pt.c (push_template_decl_real): Make sure DECL has
5753         DECL_LANG_SPECIFIC.
5754
5755 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
5756
5757         PR c++/335
5758         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
5759         for non-reference fields.
5760         * typeck.c (require_complete_type): Use resolve_offset_ref).
5761
5762 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
5763
5764         PR c++/196
5765         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
5766
5767 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
5768
5769         PR c++/160
5770         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
5771         up. Don't stabilize_references when initializing a reference.
5772
5773 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5774
5775         * decl2.c (lang_f_options): Const-ify.
5776
5777 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
5778
5779         * config-lang.in (diff_excludes): Remove.
5780
5781 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
5782
5783         PR c++/90
5784         * typeck.c (build_function_call_real): Use original function
5785         expression for errors.
5786
5787 2001-12-18  Jason Merrill  <jason@redhat.com>
5788
5789         PR c++/3242
5790         * class.c (add_method): Do compare 'this' quals when trying to match a
5791         used function.  Don't defer to another used function.
5792
5793 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
5794
5795         * pt.c (instantiate_clone): Remove, fold into ...
5796         (instantiate_template): ... here. Simplify by removing mutual
5797         recursion.
5798         * typeck2.c (build_m_component_ref): Don't cv qualify the function
5799         pointed to by a pointer to function.
5800         * class.c (delete_duplicate_fields_1): Typo.
5801
5802 2001-12-18  Jason Merrill  <jason@redhat.com>
5803
5804         C++ ABI change: destroy value arguments in caller.
5805         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
5806         create an extra binding level for the parameters.
5807         * decl.c (store_parm_decls): Don't do parameter cleanups.
5808
5809 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
5810
5811         * call.c (build_new_method_call): Use '%#V'.
5812         * error.c (cv_to_string): Use V parameter to determine padding.
5813
5814 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
5815
5816         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
5817         spellings in messages.
5818
5819 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
5820
5821         * cp-tree.h: Delete #defines for cp_error, cp_warning,
5822         cp_pedwarn, and cp_compiler_error.
5823         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
5824         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
5825         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
5826         typeck2.c: Change calls to the above macros to use their
5827         language-independent equivalents: error, warning, pedwarn, and
5828         internal_error respectively.
5829
5830 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
5831
5832         * decl2.c (finish_file): Remove back_end_hook.
5833
5834 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
5835
5836         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
5837         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
5838         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
5839
5840 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
5841
5842         * lang-options.h: Use American spelling in messages.
5843
5844 2001-12-13  Jason Merrill  <jason@redhat.com>
5845
5846         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
5847
5848         Use cleanups to run base and member destructors.
5849         * init.c (push_base_cleanups): New function, split out from...
5850         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
5851         * decl.c (finish_destructor_body): Move vbase destruction code to
5852         push_base_cleanups.
5853         (begin_function_body, finish_function_body): New fns.
5854         (finish_function): Move [cd]tor handling and call_poplevel to
5855         finish_function_body.
5856         (pushdecl): Skip the new level.
5857         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
5858         (setup_vtbl_ptr): Call push_base_cleanups.
5859         * method.c (synthesize_method): Call {begin,end}_function_body.
5860         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
5861         * cp-tree.h: Declare new fns.
5862         * parse.y (function_body, .begin_function_body): New nonterminals.
5863         (fndef, pending_inline, function_try_block): Use function_body.
5864         (ctor_initializer_opt, function_try_block): No longer has a value.
5865         (base_init): Remove .set_base_init token.
5866         (.set_base_init, compstmt_or_error): Remove.
5867         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
5868
5869         * optimize.c (maybe_clone_body): Fix parameter updating.
5870
5871 2001-12-12  Jason Merrill  <jason@redhat.com>
5872
5873         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
5874         * semantics.c (genrtl_start_function): Don't pass
5875         parms_have_cleanups or push an extra binding level.
5876         (genrtl_finish_function): Lose cleanup_label cruft.
5877
5878         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
5879         (ctor_label): Remove.
5880         * semantics.c (finish_return_stmt): Lose ctor_label support.
5881         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
5882         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
5883         dtor_label.
5884
5885         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
5886         check for [cd]tors.
5887         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
5888
5889         * decl.c (finish_function): Check VMS_TARGET, not VMS.
5890
5891         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
5892         (end_cleanup_fn): And poplevel.
5893
5894         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
5895         if we're in a template.
5896
5897 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
5898
5899         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
5900         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
5901         THIS_NAME_P): Delete.
5902         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
5903         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
5904         with internal naming scheme.
5905         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
5906
5907 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
5908
5909         * decl.c (grokdeclarator): Deprecated implicit typename use.
5910
5911 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
5912
5913         PR g++/51
5914         * parse.y (frob_specs): Indicate it is a language linkage which
5915         contained the extern.
5916         * decl.c (grokdeclarator): Allow extern language linkage with
5917         other specifiers.
5918
5919 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
5920
5921         PR g++/72
5922         * decl.c (add_binding): Don't reject duplicate typedefs involving
5923         template parameters.
5924
5925 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
5926
5927         * parse.y, semantics.c: Similarly.
5928
5929 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
5930
5931         PR g++/87
5932         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
5933         (copy_args_p): Rename to ...
5934         (copy_fn_p): ... here.
5935         (grok_special_member_properties): New function.
5936         (grok_op_properties): Lose VIRTUALP parameter.
5937         (copy_assignment_arg_p): Remove.
5938         * call.c (build_over_call): Use copy_fn_p.
5939         * decl.c (grokfndecl): Reformat. Adjust call to
5940         grok_op_properties.
5941         (copy_args_p): Rename to ...
5942         (copy_fn_p): ... here. Reject template functions. Check for pass
5943         by value.
5944         (grok_special_member_properties): Remember special functions.
5945         (grok_ctor_properties): Don't remember them here, just check.
5946         (grok_op_properties): Likewise.
5947         (start_method): Call grok_special_member_properties.
5948         * decl2.c (grokfield): Likewise.
5949         (copy_assignment_arg_p): Remove.
5950         (grok_function_init): Don't remember abstract assignment here.
5951         * pt.c (instantiate_class_template): Call
5952         grok_special_member_properties.
5953         (tsubst_decl): Adjust grok_op_properties call.
5954
5955 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
5956
5957         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
5958         RID_TYPES_COMPATIBLE_P.
5959
5960 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5961
5962         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
5963         call to build_aggr_init.
5964         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
5965
5966 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
5967
5968         * parse.y: Replace uses of the string non-terminal with STRING.
5969         Don't perform string concatentaion here.
5970         (string): Remove non-terminal.
5971         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
5972
5973 2001-12-05  Jason Merrill  <jason@redhat.com>
5974
5975         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
5976         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
5977         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
5978         * pt.c (push_tinst_level): No longer static.
5979         * cp-tree.h: Declare them.
5980
5981         * init.c (resolve_offset_ref): Don't check access for the base
5982         conversion to access a FIELD_DECL.
5983
5984         * cp-tree.h (TYPE_REFFN_P): New macro.
5985         * decl.c (bad_specifiers): Check it, too.
5986
5987         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
5988         on the __*_type_info type if we haven't seen a definition.
5989
5990 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
5991
5992         * decl.c: Include c-common.h.
5993         (shadow_warning): Move to c-common.c.
5994
5995 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5996
5997         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
5998
5999 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
6000
6001         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
6002
6003 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
6004
6005         PR g++/164
6006         * init.c (sort_base_init): Allow binfos to be directly specified.
6007         * method.c (do_build_copy_constructor): Explicitly convert to the
6008         base instance.
6009         (do_build_assign_ref): Likewise.
6010
6011 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
6012
6013         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
6014         declaration and initialization.
6015
6016 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
6017
6018         * typeck2.c: Remove leading capital from diagnostic messages, as
6019         per GNU coding standards.
6020
6021 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
6022
6023         PR c++/3394
6024         * decl.c (xref_basetypes): Handle attributes between
6025         'class' and name.
6026
6027 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
6028
6029         PR g++/3381
6030         * parse.y (named_complex_class_head_sans_basetype): Add new
6031         reduction.
6032         * Make-lang.in (parse.c): Adjust expected conflict count.
6033
6034 2001-12-03  Jason Merrill  <jason@redhat.com>
6035
6036         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
6037         immediate binfos for our virtual bases.
6038
6039 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
6040
6041         * call.c (build_java_interface_fn_ref): Similarly.
6042         * except.c (is_admissible_throw_operand): Similarly.
6043         * init.c (build_java_class_ref): Similarly.
6044         * xref.c (open_xref_file): Similarly.
6045
6046 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6047
6048         * class.c (finish_struct): Remove trailing periods from messages.
6049         * decl.c (check_tag_decl): Similarly.
6050         * lex.c (cxx_set_yydebug): Similarly.
6051         * typeck2.c (friendly_abort): Similarly.
6052
6053 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
6054
6055         PR c++/3048
6056         * cp-tree.h (ovl_member): Remove.
6057         * decl2.c (merge_functions): Handle extern "C" functions
6058         specially.
6059         * tree.c (ovl_member): Remove.
6060
6061 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
6062
6063         PR c++/4842
6064         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
6065         FUNCTION_DECL, as input.
6066         (mark_overriders): Remove.
6067         (warn_hidden): Rework for the new ABI.
6068
6069 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
6070
6071         PR c++/3471
6072         * call.c (convert_like_real): Do not build additional temporaries
6073         for rvalues of class type.
6074
6075 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
6076
6077         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
6078         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
6079         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
6080         (DERIVED_FROM_P): Likewise.
6081         (enum base_access): Renumber, add ba_quiet bit mask.
6082         (get_binfo): Remove.
6083         (get_base_distance): Remove.
6084         (binfo_value): Remove.
6085         (ACCESSIBLY_DERIVED_FROM_P): Remove.
6086         * call.c (standard_conversion): Use lookup_base.
6087         * class.c (strictly_overrides): Likewise.
6088         (layout_virtual_bases): Likewise.
6089         (warn_about_ambiguous_direct_bases): Likewise.
6090         (is_base_of_enclosing_class): Likewise.
6091         (add_vcall_offset_vtbl_entries_1): Likewise.
6092         * cvt.c (build_up_reference): Adjust comment.
6093         * init.c (build_member_call): Reformat.
6094         * search.c (get_binfo): Remove.
6095         (get_base_distance_recursive): Remove.
6096         (get_base_distance): Remove.
6097         (lookup_base_r): Tweak.
6098         (lookup_base): Add ba_quiet control. Complete the types here.
6099         (covariant_return_p): Use lookup_base.
6100         * tree.c (binfo_value): Remove.
6101         (maybe_dummy_object): Use lookup_base.
6102         * typeck.c (build_static_cast): Use lookup_base.
6103         (get_delta_difference): Likewise.
6104         * typeck2.c (binfo_or_else): Use lookup_base.
6105         (build_scoped_ref): Add back error_mark_check.
6106         (build_m_component_ref): Use lookup_base.
6107
6108 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6109
6110         * Make-lang.in (c++.generated-manpages): New dummy target.
6111
6112 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6113
6114         * Make-lang.in (cp-lang.o): Depends on c-common.h.
6115         * cp-lang.c (c-common.h): Include.
6116         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
6117         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
6118         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
6119
6120 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
6121
6122         * decl2.c (c_language): Move to c-common.c.
6123         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
6124         functions.
6125         (cxx_init): Update.
6126
6127 2001-11-26  Jason Merrill  <jason@redhat.com>
6128
6129         * call.c (joust): Remove COND_EXPR hack.
6130
6131 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
6132
6133         * search.c (lookup_base_r): Declare bk in variable declaration
6134         space.
6135
6136 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
6137
6138         PR g++/3145
6139         * class.c (build_vbase_pointer): Remove.
6140         (build_vbase_path): Remove.
6141         (build_base_path): New function.
6142         * cp-tree.h (base_access, base_kind): New enumerations.
6143         (build_base_path): Declare.
6144         (convert_pointer_to_real): Remove.
6145         (convert_pointer_to): Remove.
6146         (lookup_base): Declare.
6147         (convert_pointer_to_vbase): Remove.
6148         * call.c (build_scoped_method_call): Use lookup_base &
6149         build_base_path instead of convert_pointer_to_real,
6150         get_base_distance & get_binfo.
6151         (build_over_call): Likewise.
6152         * cvt.c (cp_convert_to_pointer): Likewise.
6153         (convert_to_pointer_force): Likewise.
6154         (build_up_reference): Likewise.
6155         (convert_pointer_to_real): Remove.
6156         (convert_pointer_to): Remove.
6157         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
6158         instead of convert_pointer_to_vbase & build_vbase_path.
6159         (emit_base_init): Use build_base_path instead of
6160         convert_pointer_to_real.
6161         (expand_virtual_init): Lose unrequired conversions.
6162         (resolve_offset_ref): Use lookup_base and build_base_path
6163         instead of convert_pointer_to.
6164         * rtti.c (build_dynamic_cast_1): Use lookup_base &
6165         build_base_path instead of get_base_distance & build_vbase_path.
6166         * search.c (get_vbase_1): Remove.
6167         (get_vbase): Remove.
6168         (convert_pointer_to_vbase): Remove.
6169         (lookup_base_r): New function.
6170         (lookup_base): New function.
6171         * typeck.c (require_complete_type): Use lookup_base &
6172         build_base_path instead of convert_pointer_to.
6173         (build_component_ref): Likewise.
6174         (build_x_function_call): Likewise.
6175         (get_member_function_from_ptrfunc): Likewise.
6176         (build_component_addr): Likewise.
6177         * typeck2.c (build_scoped_ref): Likewise.
6178
6179 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6180
6181         * cp-tree.h (CP_TYPE_QUALS): Removed.
6182         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
6183         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
6184         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
6185         * dump.c (cp_dump_tree): Use void* dump_info argument to match
6186         lang-hooks prototype.
6187         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
6188         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
6189         CP_TYPE_QUALS changed to cp_type_quals.
6190         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
6191         (CXX_C_OBJS): Remove c-dump.o.
6192
6193 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
6194
6195         PR c++/3637
6196         * pt.c (lookup_template_class): Ensure that all specializations
6197         are registered on the list corresponding to the most general
6198         template.
6199
6200 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
6201
6202         * call.c (non_reference): Add documentation.
6203         (convert_class_to_reference): Do not strip reference types
6204         from conversion operators.
6205         (maybe_handle_ref_bind): Simplify.
6206         (compare_ics): Correct handling of references.
6207
6208 2001-11-19  John Wilkinson <johnw@research.att.com>
6209
6210         * dump.c (dump_op): New function.
6211         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
6212         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
6213         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
6214
6215 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
6216
6217         PR4629
6218         * semantics.c (finish_sizeof): Make sure that expression created
6219         while processing a template do not have a type.
6220         (finish_alignof): Likewise.
6221         * typeck.c (c_sizeof): Likewise.
6222         (expr_sizeof): Likewise.
6223
6224 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
6225
6226         * lex.c (cxx_finish): Call c_common_finish.
6227         (finish_parse): Remove.
6228
6229 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6230
6231         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
6232         when displaying error message about missing array bounds.
6233
6234 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6235
6236         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
6237         CONST_CAST_EXPR.
6238         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
6239
6240 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
6241
6242         * cp-tree.h (print_class_statistics): Restore.
6243
6244 2001-11-15  Jason Merrill  <jason@redhat.com>
6245
6246         * method.c (use_thunk): Don't emit debugging information for thunks.
6247
6248         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
6249         * decl.c (make_typename_type): Handle getting a class template.
6250         * search.c (lookup_field_r): A class template is good enough for
6251         want_type.
6252
6253         * call.c (convert_like_real): Only use cp_convert for the bad part.
6254         (standard_conversion): Also allow bad int->enum.
6255         * typeck.c (ptr_reasonably_similar): Also allow functions to
6256         interconvert.  Pointers to same-size integers are reasonably
6257         similar.
6258
6259         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
6260         give it void type.
6261
6262 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
6263
6264         PR g++/3154
6265         * init.c (sort_base_init): Remove unreachable code.
6266         (expand_member_init): Adjust comment to reflect reality. Simplify
6267         and remove unreachable code.
6268
6269 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
6270
6271         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
6272         (cxx_init): Update prototype.
6273         * decl.c (init_decl_processing): Rename.  Move null node init
6274         to its creation time.
6275         * lex.c (cxx_init_options): Update.
6276         (cxx_init): Combine with old init_parse; also call
6277         cxx_init_decl_processing.
6278
6279 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
6280
6281         * decl.c (check_initializer): Try to complete the type of an
6282         array element before checking whether it's complete.  Don't
6283         complain about arrays with complete element types but an
6284         unknown size.
6285         (cp_finish_decl): Build the hierarchical constructor before
6286         calling maybe_deduce_size_from_array_init.
6287
6288 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
6289
6290         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
6291
6292 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
6293
6294         PR g++/4206
6295         * parse.y (already_scoped_stmt): Remove.
6296         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
6297
6298 2001-11-12  H.J. Lu <hjl@gnu.org>
6299
6300         * cvt.c (ocp_convert): Don't warn the address of a weak
6301         function is always `true'.
6302
6303 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6304
6305         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
6306         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
6307         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
6308         * cp-tree.h (print_class_statistics): Remove.
6309         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
6310         cxx_print_identifier, cxx_set_yydebug): New.
6311         * lex.c (set_yydebug): Rename c_set_yydebug.
6312         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
6313         lang_print_xnode): Rename.
6314         * tree.c (print_lang_statistics): Rename.
6315
6316 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6317
6318         * class.c (dump_array): Fix format specifier warning.
6319
6320 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6321
6322         * cp-lang.c (LANG_HOOKS_NAME): Override.
6323         (struct lang_hooks): Constify.
6324         * lex.c (cxx_init_options): Update.
6325         (lang_identify): Remove.
6326         * parse.y (language_string): Remove.
6327
6328 2001-11-08  Andreas Franck  <afranck@gmx.de>
6329
6330         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
6331         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
6332         suggested by autoconf.
6333         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
6334         (c++.install-common): Use the transformed target alias names.
6335
6336 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6337
6338         * Make-lang.in: Update.
6339         * cp-lang.c: Include langhooks-def.h.
6340
6341 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6342
6343         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
6344
6345 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6346
6347         * lex.c (copy_lang_type): Add static prototype.
6348
6349 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6350
6351         * pt.c (unify): Handle SCOPE_REF.
6352
6353 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
6354
6355         * tree.c (cp_copy_res_decl_for_inlining): Adjust
6356         DECL_ABSTRACT_ORIGIN for the return variable.
6357
6358 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
6359
6360         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
6361
6362 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
6363
6364         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
6365         semantics.c, spew.c: Fix spelling errors.
6366
6367 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6368
6369         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
6370
6371 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
6372
6373         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
6374         pop_everything.
6375
6376 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6377
6378         * cp-lang.c (cxx_get_alias_set): New function.
6379         Point LANG_HOOKS_GET_ALIAS_SET to it.
6380
6381 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6382
6383         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
6384         * cp-tree.h (make_unbound_class_template): Prototype new function.
6385         * decl.c (make_unbound_class_template): New function.
6386         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
6387         * error.c (dump_type): Likewise.
6388         * mangle.c (write_type): Likewise.
6389         * parse.y (template_parm): Likewise.
6390         (template_argument): Use make_unbound_class_template.
6391         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
6392         (tsubst): Likewise.
6393         (tsubst_copy): Likewise.
6394         (unify): Likewise.
6395         * tree.c (walk_tree): Likewise.
6396         * typeck.c (comptypes): Likewise.
6397
6398 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6399
6400         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
6401         extra calls into fewer ones.
6402
6403 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
6404
6405         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
6406         Warn when merging inline with attribute noinline.
6407         (start_decl, start_function): Warn if inline and attribute
6408         noinline appear in the same declaration.
6409
6410 2001-10-16  H.J. Lu <hjl@gnu.org>
6411
6412         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
6413         for tree checking disabled.
6414
6415 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
6416
6417         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
6418         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
6419
6420 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
6421
6422         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
6423         (unify): Only handle MINUS_EXPR specially if the above flag is set
6424         and the subtracted constant is 1.  Clear the flag on recursive calls.
6425         Set it when unifying the maximum value in an INTEGER_TYPE's range.
6426
6427 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
6428
6429         * decl.c (bad_specifiers): Don't allow exception specifications
6430         on any typedefs.
6431
6432 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
6433
6434         * cp/lex.c (init_cp_pragma): Similarly.
6435
6436 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6437
6438         * pt.c (lookup_template_class): Build complete template arguments
6439         for BOUND_TEMPLATE_TEMPLATE_PARM.
6440
6441 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6442
6443         * cp-tree.h (TYPE_BINFO): Update comment.
6444         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
6445         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
6446         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
6447         (copy_type): Prototype new function.
6448         * lex.c (copy_lang_decl): Gather tree node statistics.
6449         (copy_lang_type): New function.
6450         (copy_type): Likewise.
6451         (cp_make_lang_type): Create lang_type for
6452         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
6453         and BOUND_TEMPLATE_TEMPLATE_PARM.
6454         * pt.c (tsubst): Use copy_type instead of copy_node.
6455         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
6456
6457 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6458
6459         * pt.c (determine_specialization): Ignore functions without
6460         DECL_TEMPLATE_INFO.
6461
6462 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
6463
6464         PR g++/4476
6465         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
6466
6467 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
6468
6469         * typeck2.c (store_init_value): Don't re-digest a bracketed
6470         initializer.
6471
6472         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
6473         ANON_AGGR_TYPE_P.
6474
6475 2001-10-11  Richard Henderson  <rth@redhat.com>
6476
6477         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
6478         of an asm statement.
6479         (build_vtbl_ref_1): Split out from build_vtbl_ref.
6480         (build_vfn_ref): Use it to handle vtable descriptors before
6481         calling build_vtable_entry_ref.
6482         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
6483
6484 2001-10-10  Richard Henderson  <rth@redhat.com>
6485
6486         * parse.y (asm_operand): Allow named operands.
6487         * semantics.c (finish_asm_stmt): Tweek for changed location
6488         of the operand constraint.
6489
6490 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
6491
6492         * call.c (standard_conversion): Add bad conversion between
6493         integers and pointers.
6494         (convert_like_real): Don't use convert_for_initialization for bad
6495         conversions; complain here and use cp_convert.
6496         (build_over_call): Don't handle bad conversions specially.
6497         (perform_implicit_conversion): Allow bad conversions.
6498         (can_convert_arg_bad): New fn.
6499         * cp-tree.h: Declare it.
6500         * typeck.c (convert_for_assignment): Use it.
6501         (ptr_reasonably_similar): Any target type is similar to void.
6502
6503 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
6504
6505         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
6506         (cp/cp-lang.o): New rule.
6507         * cp-tree.h: Declare hooks.
6508         * tree.c: Make hooks non-static.
6509         (init_tree): Don't initialize hooks here.
6510         * lex.c: Likewise.  Move definition of lang_hooks to...
6511         * cp-lang.c: ... new file.
6512
6513 2001-10-08  Richard Henderson  <rth@redhat.com>
6514
6515         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
6516         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
6517
6518 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6519
6520         * class.c (build_vtable_entry_ref): Const-ify.
6521         * decl.c (predefined_identifier,
6522         initialize_predefined_identifiers): Likewise.
6523         * init.c (build_new_1): Likewise.
6524         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
6525         Likewise.
6526
6527 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
6528
6529         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
6530         (INSNS_PER_STMT): Likewise.
6531         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
6532         (copy_body, initialize_inlined_parameters): Likewise.
6533         (declare_return_variable, inlinable_function_p): Likewise.
6534         (expand_call_inline, expand_calls_inline): Likewise.
6535         (optimize_inline_calls, clone_body): Likewise.
6536         * tree.c (walk_tree): Moved to ../tree-inline.c.
6537         (walk_tree_without_duplicates): Likewise.
6538         (copy_tree_r, remap_save_expr): Likewise.
6539
6540 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
6541
6542         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
6543         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
6544         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
6545         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
6546         (flag_inline_trees): Moved declaration to ../tree-inline.h.
6547         (walk_tree): Moved declaration to ../tree-inline.h.
6548         (walk_tree_without_duplicates, copy_tree_r): Likewise.
6549         (remap_save_expr): Likewise.
6550         * decl.c: Include tree-inline.h.
6551         (lang_mark_tree): Don't mark inlined_fns.
6552         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
6553         * optimize.c: Include tree-inline.h.
6554         (optimize_inline_calls): Move declaration to ../tree.h, as
6555         non-static.
6556         (remap_decl): Use language-independent constructs and hooks.
6557         (remap_block, copy_body_r, declare_return_variable): Likewise.
6558         (inlinable_function_p): Likewise.  Don't test for
6559         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
6560         no longer language-specific.
6561         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
6562         call of dump_function to...
6563         (optimize_function): Here...
6564         (clone_body): New function, extracted from...
6565         (maybe_clone_body): ... here.  Build decl_map locally and pass
6566         it on to clone_body.
6567         * pt.c, semantics.c: Include tree-inline.h.
6568         * tree.c: Likewise.
6569         (cp_walk_subtrees): New language-specific hook for tree inlining.
6570         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
6571         cp_is_overload_p, cp_auto_var_in_fn_p,
6572         cp_copy_res_decl_for_inlining): Likewise.
6573         (walk_tree): Move language-specific constructs into...
6574         (cp_walk_subtrees): this new function.
6575         (copy_tree_r): Use language-independent constructs and hooks.
6576         (init_tree): Initialize tree inlining hooks.
6577         (remap_save_expr): Adjust prototype so that the declaration
6578         does not require the definition of splay_tree.
6579
6580 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6581
6582         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
6583         to build the declaration instead of the declaration itself.
6584
6585 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
6586
6587         * decl2.c (cxx_decode_option): Add 'else'.
6588
6589         * spew.c (end_input): No longer static.
6590         * cp-tree.h: Declare it.
6591         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
6592
6593 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
6594
6595         * call.c (build_over_call), typeck.c (build_function_call_real):
6596         Pass type attributes to check_function_format rather than name or
6597         assembler name.  Don't require there to be a name or assembler
6598         name to check formats.
6599
6600 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
6601
6602         * decl.c (init_decl_processing): Don't call
6603         init_function_format_info.  Initialize lang_attribute_table
6604         earlier.
6605         (builtin_function): Call decl_attributes.
6606         (insert_default_attributes): New.
6607
6608 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
6609
6610         * decl.c (grokdeclarator): Copy array typedef handling from C
6611         frontend.
6612
6613         * decl.c (grokdeclarator): Copy too-large array handling from C
6614         frontend.
6615
6616 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
6617
6618         * config-lang.in (target_libs): Added target-gperf, so that we
6619         don't try to build it if C++ is disabled.
6620
6621 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
6622
6623         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
6624         (cp/errfn.o): Delete rule.
6625         (cp/error.o): Depend on flags.h.
6626         * errfn.c: Delete file.
6627         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
6628         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
6629         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
6630         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
6631         internal_error respectively.  Make cp_deprecated into a macro.
6632         Don't define cp_printer typedef or declare cp_printers.
6633         * error.c: Include flags.h.
6634         Delete: struct tree_formatting_info, print_function_argument_list,
6635         print_declaration, print_expression, print_function_declaration,
6636         print_function_parameter, print_type_id, print_cv_qualifier_seq,
6637         print_type_specifier_seq, print_simple_type_specifier,
6638         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
6639         print_parameter_declaration_clause, print_exception_specification,
6640         print_nested_name_specifier, and definition of cp_printers.
6641         (locate_error): New function.
6642         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
6643         rewritten in terms of locate_error and diagnostic.c.
6644         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
6645         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
6646         (init_error): Adjust to match.
6647
6648 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6649
6650         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
6651
6652 2001-09-21  Richard Henderson  <rth@redhat.com>
6653
6654         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
6655         (build_vtbl_initializer): Likewise.
6656         (build_vfn_ref): New.
6657         * cp-tree.h: Declare it.
6658         * call.c (build_over_call): Use it.
6659         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
6660         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
6661
6662 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
6663
6664         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
6665
6666 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
6667
6668         Table-driven attributes.
6669         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
6670         * decl2.c (cplus_decl_attributes): Only take one attributes
6671         parameter.
6672         * cp-tree.c (cplus_decl_attributes): Update prototype.
6673         * class.c (finish_struct), decl.c (start_decl, start_function),
6674         decl2.c (grokfield), friend.c (do_friend), parse.y
6675         (parse_bitfield): Update calls to cplus_decl_attributes.
6676         * decl.c (grokdeclarator): Take a pointer to a single ordinary
6677         attribute list.
6678         * decl.h (grokdeclarator): Update prototype.
6679         * decl2.c (grokfield): Take a single ordinary attribute list.
6680         * friend.c (do_friend): Likewise.
6681         * decl.c (shadow_tag, groktypename, start_decl,
6682         start_handler_parms, grokdeclarator, grokparms, start_function,
6683         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
6684         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
6685         (process_template_parm, do_decl_instantiation): Pass single
6686         ordinary attribute lists around.
6687         * decl.c (grokdeclarator): Correct handling of nested attributes.
6688         Revert the patch
6689         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
6690                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
6691                 not the left.
6692         .
6693         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
6694         (cp_attribute_table): Declare.
6695         * decl.c (valid_lang_attribute): Don't define.
6696         (lang_attribute_table): Define.
6697         (init_decl_processing): Initialize lang_attribute_table instead of
6698         valid_lang_attribute.
6699         * tree.c (cp_valid_lang_attribute): Remove.
6700         (handle_java_interface_attribute, handle_com_interface_attribute,
6701         handle_init_priority_attribute): New functions.
6702         (cp_attribute_table): New array.
6703         * decl2.c (import_export_class): Don't use
6704         targetm.valid_type_attribute.
6705
6706 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6707
6708         * Make-lang.in (cp/error.o): Depend on real.h
6709         * error.c: #include "real.h"
6710
6711 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6712
6713         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
6714         xmalloc/strcpy/strcat.
6715
6716 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6717
6718         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
6719         Const-ification.
6720         * pt.c (tsubst_decl): Likewise.
6721
6722 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6723
6724         * decl2.c (lang_f_options): Const-ification.
6725         * lex.c (cplus_tree_code_name): Likewise.
6726         * spew.c (yyerror): Likewise.
6727
6728 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6729
6730         PR c++/3986
6731         * class.c (force_canonical_binfo_r): Check & move an indirect
6732         primary base first.
6733         (force_canonical_binfo): Check that it's not already
6734         canonical.
6735         (mark_primary_virtual_base): Remove BINFO parameter.
6736         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
6737
6738 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6739
6740         Remove TYPE_NONCOPIED_PARTS.
6741         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
6742         CLASSTYPE_PURE_VIRTUALS.
6743         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
6744         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
6745         (layout_class_type): Don't call fixup_inline_methods here ...
6746         (finish_struct_1): ... call it here.
6747
6748 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
6749
6750         * decl.c (duplicate_decls): Remove code deadling with
6751         DECL_SAVED_INSNS.
6752         * decl2.c (finish_file): Likewise.
6753         * pt.c (instantiate_decl): Likewise.
6754         * semantics.c (expand_body): Don't defer local functions if
6755         they wouldn't be deferred for some other reason.  Don't
6756         generate RTL for functions that will not be emitted.
6757         (genrtl_start_function): Remove code deadling with
6758         DECL_SAVED_INSNS.
6759         (genrtl_finish_function): Likewise.
6760
6761 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6762
6763         PR c++/4203
6764         * call.c (build_over_call): Do not optimize any empty base
6765         construction.
6766
6767 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6768
6769         * error.c (dump_template_decl): Output template parameters
6770         together with their specifiers.
6771         Output `class' prefix for template template parameter.
6772         (dump_decl): Fix formatting.
6773
6774 2001-08-30  Kurt Garloff  <garloff@suse.de>
6775
6776         * optimize.c (inlinable_function_p): Allow only smaller single
6777         functions. Halve inline limit after reaching recursive limit.
6778
6779 2001-08-30  Joern Rennecke <amylaar@redhat.com>
6780             Jason Merrill  <jason_merrill@redhat.com>
6781
6782         * class.c (build_vtable_entry_ref): Subtract in char*, not
6783         ptrdiff_t.
6784
6785 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
6786
6787         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
6788         (build_cplus_array_type): Use cp_build_qualified_type, not
6789         TYPE_MAIN_VARIANT, to get an unqualified version.
6790
6791         * decl2.c (grok_alignof): Lose.
6792         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
6793         * typeck.c (c_alignof): Lose.
6794         * semantics.c (finish_sizeof, finish_alignof): New.
6795         * parse.y: Use them.
6796         * cp-tree.h: Declare them.
6797
6798 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
6799
6800         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
6801         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
6802         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
6803
6804 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
6805
6806         * typeck2.c (add_exception_specifier): Only require complete type if
6807         not in processing template declaration.
6808
6809 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6810
6811         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
6812         GNU_xref_start_scope and GNU_xref_end_scope.
6813
6814         * tree.c (TYPE_HASH): Moved to ../tree.h.
6815
6816 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
6817
6818         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
6819         on COMPOUND_EXPRs.
6820
6821 2001-08-14  Richard Henderson  <rth@redhat.com>
6822
6823         * class.c, cp-tree.h (build_vfn_ref): Remove.
6824         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
6825
6826 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
6827
6828         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
6829         empty class assignment as having side-effects to avoid
6830         spurious warnings.
6831
6832 2001-08-13  Zack Weinberg  <zackw@panix.com>
6833
6834         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
6835         * except.c: Include libfuncs.h.
6836
6837 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6838
6839         * decl.c (grokdeclarator): Clarify diagnostic message.
6840
6841 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6842
6843         * decl2.c (do_nonmember_using_decl): Replace using directive
6844         with using declaration in the error message.
6845
6846 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6847
6848         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
6849         criterion to avoid rebuilding expression tree instead of
6850         processing_template_decl.
6851
6852 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
6853
6854         Support named return value optimization for inlines, too.
6855         * decl.c (finish_function): Nullify returns here.
6856         * semantics.c (genrtl_start_function): Not here.
6857         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
6858         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
6859         Also nullify the CLEANUP_STMT for the nrv.
6860         * cp-tree.h: Declare it.
6861         * optimize.c (declare_return_variable): Replace the nrv with the
6862         return variable.
6863         * typeck.c (check_return_expr): Be more flexible on alignment check.
6864         Ignore cv-quals when checking for a matching type.
6865
6866 2001-08-09  Richard Henderson  <rth@redhat.com>
6867
6868         * decl2.c (finish_objects): Use target hooks instead of
6869         assemble_constructor and assemble_destructor.
6870
6871 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6872
6873         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
6874
6875 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
6876
6877         PR c++/3820
6878         Stop using TYPE_NONCOPIED_PARTS.
6879         * call.c (build_over_call): Be careful when copy constructing
6880         or assigning to an empty class.
6881         * class.c (check_bases_and_members): It has a
6882         COMPLEX_ASSIGN_REF if it has a vptr.
6883         (layout_class_type): Don't add empty class padding to
6884         TYPE_NONCOPIED_PARTS.
6885         (finish_struct_1): Don't add the VFIELD either.
6886         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
6887         initialization.
6888
6889 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
6890
6891         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
6892
6893 2001-08-06  Richard Henderson  <rth@redhat.com>
6894
6895         * decl2.c (finish_objects): Pass a symbol_ref and priority to
6896         assemble_{constructor,destructor}.  Remove priority handling.
6897
6898 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6899
6900         Don't allow template-id in using-declaration.
6901         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
6902         (do_class_using_decl): Likewise.
6903
6904 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6905
6906         * cp/spew.c (read_token): No need to pop buffers.
6907
6908 2001-08-02  Stan Shebs  <shebs@apple.com>
6909
6910         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
6911         (fnaddr_from_vtable_entry): Remove decl.
6912         * method.c (use_thunk): Update comment.
6913
6914 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
6915
6916         * repo.c (get_base_filename): Change return value to const char
6917         pointer.
6918
6919 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
6920
6921         Kill -fhonor-std.
6922         * NEWS: Document.
6923         * cp-tree.h (flag_honor_std): Remove.
6924         (CPTI_FAKE_STD): Remove.
6925         (std_node): Remove comment about it being NULL.
6926         (fake_std_node): Remove.
6927         * decl.c (in_fake_std): Remove.
6928         (walk_namespaces_r): Remove fake_std_node check.
6929         (push_namespace): Remove in_fake_std code.
6930         (pop_namespace): Likewise.
6931         (lookup_name_real): Remove fake_std_node check.
6932         (init_decl_processing): Always create std_node. Always add
6933         std:: things there.
6934         (builtin_function): Always put non '_' fns in std.
6935         * decl2.c (flag_honor_std): Remove.
6936         (lang_f_options): Remove honor-std.
6937         (unsupported_options): Add honor-std.
6938         (set_decl_namespace): Remove fake_std_node check.
6939         (validate_nonmember_using_decl): Likewise.
6940         (do_using_directive): Likewise.
6941         (handle_class_head): Likewise.
6942         * dump.c (cp_dump_tree): Likewise.
6943         * except.c (init_exception_processing): Adjust.
6944         * init.c (build_member_call): Remove fake_std_node check.
6945         (build_offset_ref): Likewise.
6946         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
6947         * rtti.c (init_rtti_processing): Adjust.
6948
6949 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
6950
6951         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
6952         operand while calling cp_tree_equal.
6953
6954 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6955
6956         The 3.0 ABI no longer has vbase pointer fields.
6957         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
6958         FORMAT_VBASE_NAME): Remove.
6959         * method.c (do_build_copy_constructor): Adjust.
6960         (do_build_assign_ref): Adjust.
6961         * search.c (lookup_field_r): Adjust.
6962         * typeck.c (build_component_ref): Adjust.
6963
6964         The 3.0 ABI always has a vtable pointer at the start of every
6965         polymorphic class.
6966         * rtti.c (build_headof_sub): Remove.
6967         (build_headof): Adjust.
6968         (get_tinfo_decl_dynamic): No need to check flag_rtti
6969         here. Adjust.
6970         (create_real_tinfo_var): Explain why we need a hidden name.
6971
6972 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6973
6974         PR c++/3631
6975         * class.c (update_vtable_entry_for_fn): The fixed adjustment
6976         of a virtual thunk should be from declaring base.
6977
6978 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6979
6980         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
6981         the shared virtual base, so preserving inheritance graph order.
6982
6983 2001-07-30  Andreas Jaeger  <aj@suse.de>
6984
6985         * decl2.c: Remove unused var global_temp_name_counter.
6986
6987 2001-07-28  Richard Henderson  <rth@redhat.com>
6988
6989         * method.c (pending_inlines): Remove.
6990
6991 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
6992
6993         * class.c (mark_primary_virtual_base): Don't adjust base
6994         offsets here.
6995         (dfs_unshared_virtual_bases): Adjust them here.
6996         (mark_primary_bases): Explain why we adjust at the end.
6997
6998 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
6999
7000         * class.c (finish_struct_1): When copying the primary base's
7001         VFIELD, make sure we find it is at offset zero.
7002
7003 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7004
7005         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
7006         tsubst_expr for default template arguments.
7007
7008 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
7009
7010         PR c++/3621
7011         * spew.c (yylex): Only copy the token's lineno, if it is
7012         nonzero.
7013
7014 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
7015
7016         PR c++/3624
7017         * call.c (resolve_args): Simplify, call
7018         convert_from_reference.
7019         (build_new_op): Resolve and convert from reference ARG1
7020         earlier. Adjust ARG2 & ARG3 resolve and conversion.
7021
7022 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
7023
7024         * decl.c (last_function_parm_tags): Remove.
7025         (current_function_parm_tags): Remove.
7026         (init_decl_processing): Adjust.
7027         (start_function): Adjust.
7028         (store_parm_decls): Adjust.
7029
7030         PR c++/3152
7031         * decl.c (grokdeclarator): Detect when a function typedef is
7032         declaring a function, and create last_function_parms correctly.
7033
7034 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
7035
7036         * call.c (joust): Only prefer a non-builtin candidate to a builtin
7037         one if they have the same signature.
7038
7039         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
7040         it rather than toplevel_bindings_p.  Give it a mangled name if static.
7041         (convert_to_reference): Adjust.
7042         * decl2.c (get_temp_name): Lose.
7043         * mangle.c (mangle_ref_init_variable): New fn.
7044         (mangle_guard_variable): Strip the ref-init header.
7045         * cp-tree.h: Adjust.
7046         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
7047         initializer.
7048         (grok_reference_init): Always use DECL_INITIAL.
7049
7050 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7051
7052         PR c++/3416
7053         * call.c (build_conditional_expr): Recheck args after
7054         conversions.
7055         * cp-tree.h (build_conditional_expr): Move to correct file.
7056         * typeck.c (decay_conversion): Diagnose any unknown types
7057         reaching here.
7058         (build_binary_op): Don't do initial decay or default
7059         conversions on overloaded functions.
7060         (build_static_cast): Don't do a decay conversion here.
7061
7062 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7063
7064         PR c++/3543
7065         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
7066         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
7067
7068 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7069
7070         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
7071         (create_vtbl_ptr): ... here.
7072
7073 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7074
7075         * class.c (build_vbase_offset_vbtl_entries): Look for
7076         non-primary base of which we are a sub vtable.
7077
7078 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
7079
7080         * semantics.c (finish_this_expr):  Remove unused code.
7081
7082 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
7083
7084         Simplify rtti, now we've only one ABI.
7085         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
7086         CPTI_TINFO_VAR_ID.
7087         (tinfo_decl_id, tinfo_var_id): Remove.
7088         (get_typeid_1): Remove.
7089         * rtti.c
7090         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
7091         (typeid_ok_p): New function.
7092         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
7093         (get_tinfo_decl): Remove old abi documentation.
7094         (tinfo_from_decl): Remove.
7095         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
7096         (get_typeid_1): Remove.
7097         (get_base_offset): Remove.
7098         (synthesize_tinfo_var): Absorb get_base_offset.
7099         (create_real_tinfo_var): Don't use tinfo_decl_id.
7100
7101 2001-07-23  Graham Stott  <grahams@redhat.com>
7102
7103         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
7104         variable has_two_argument_delete_p.
7105
7106 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
7107
7108         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
7109         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
7110         (CPTI_INDEX_IDENTIFIER): Remove.
7111         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
7112         (delta2_identifier): Remove.
7113         (index_identifier): Remove.
7114         (pfn_or_delta2_identifier): Remove.
7115         (flag_vtable_thunks): Remove.
7116         (VTABLE_DELTA2_NAME): Remove.
7117         (VTABLE_INDEX_NAME): Remove.
7118         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
7119         (vfunc_ptr_type_node): Adjust.
7120         (VTABLE_NAME_PREFIX): Adjust.
7121         (build_vfn_ref): Lose first parameter.
7122         (fixup_all_virtual_upcast_offsets): Remove.
7123         * decl.c (initialize_predefined_identifiers): Remove
7124         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
7125         (init_decl_processing): Remove no-vtable-thunk code.
7126         * decl2.c (flag_vtable_thunks): Remove.
7127         (mark_vtable_entries): Remove no-vtable-thunk code.
7128         * error.c (dump_decl): Remove no-vtable-thunk code.
7129         (dump_expr): Adjust ptr to member function code.
7130         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
7131         code.
7132         * rtti.c (build_headof): Remove no-vtable-thunk code.
7133         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
7134         * search.c (get_base_distance): Remove expand_upcast_fixups case.
7135         (virtual_context) Remove.
7136         (expand_upcast_fixups): Remove.
7137         (fixup_virtual_upcast_offsets): Remove.
7138         (fixup_all_virtual_upcast_offsets): Remove.
7139         * typeck.c (get_member_function_from_ptrfunc): Remove
7140         no-vtable-thunk code.
7141         * call.c (build_over_call): Adjust call to build_vfn_ref.
7142         * class.c (build_vfn_ref): Lose first parameter. Remove
7143         no-vtable-thunk code.
7144         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
7145         (build_vtable_entry): Remove no-vtable-thunk code.
7146
7147 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
7148
7149         Remove old-abi remnants. Remove comments about old abi
7150         behavior. Remove references to 'new-abi' in comments.
7151         * cp-tree.h: Adjust comments.
7152         (vbase_offsets_in_vtable_p): Delete.
7153         (vcall_offsets_in_vtable_p): Delete.
7154         (vptrs_present_everywhere_p): Delete.
7155         (all_overridden_vfuns_in_vtables_p): Delete.
7156         (merge_primary_and_secondary_vtables_p): Delete.
7157         (TYPE_CONTAINS_VPTR_P): Adjust.
7158         (VTT_NAME_PREFIX): Remove.
7159         (CTOR_VTBL_NAME_PREFIX): Remove.
7160         (init_vbase_pointers): Remove.
7161         * class.c: Adjust coments.
7162         (build_vbase_pointer_fields): Delete.
7163         (build_vbase_pointer): Remove old-abi code.
7164         (build_secondary_vtable): Likewise.
7165         (modify_all_vtables): Likewise.
7166         (create_vtable_ptr): Likewise.
7167         (layout_class_type): Likewise.
7168         (finish_struct_1): Likewise.
7169         (finish_vtbls): Likewise.
7170         (dfs_finish_vtbls): Delete.
7171         (build_vbase_offset_vtbl_entries): Remove old-abi code.
7172         * cvt.c: Adjust comments.
7173         * decl.c: Adjust comments.
7174         * decl2.c: Adjust comments.
7175         * init.c: Adjust comments.
7176         (construct_virtual_bases): Remove old-abi code.
7177         * lang-specs.h: Remove -fno-new-abi.
7178         * mangle.c: Adjust comments.
7179         * rtti.c: Adjust comments.
7180         (get_base_offset): Remove old-abi-code.
7181         * search.c: Adjust comments.
7182         (dfs_init_vbase_pointers): Remove.
7183         (dfs_vtable_path_unmark): Remove.
7184         (init_vbase_pointers): Remove.
7185         * semantics.c: Adjust comments.
7186         (emit_associated_thunks): Remove old-abi code.
7187         * typeck.c: Adjust comments.
7188
7189 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
7190
7191         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
7192         params.h.
7193
7194 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
7195
7196         * class.c (finish_struct_anon): Forbid nested classes.
7197
7198 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7199
7200         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
7201         * optimize.c: Include debug.h.
7202         (maybe_clone_body): Use debug hook.
7203         * semantics.c: Include debug.h.
7204         (expand_body): Use debug hook.
7205
7206 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7207
7208         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
7209
7210 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
7211
7212         * class.c (type_requires_array_cookie): New function.
7213         (check_methods): Don't try to figure out whether the type needs a
7214         cookie here.
7215         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
7216         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
7217         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
7218         * pt.c (instantiate_class_template): Don't set
7219         TYPE_VEC_DELETE_TAKES_SIZE.
7220         * NEWS: Document ABI changes from GCC 3.0.
7221
7222 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
7223             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7224
7225         * NEWS (Changes in GCC 3.0): Fix typo.
7226
7227 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
7228
7229         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
7230         which attributes are to be attached, and a flags argument.  Update
7231         call to decl_attributes.
7232         (grokfield): Update call to decl_attributes.
7233         * class.c (finish_struct): Update call to cplus_decl_attributes.
7234         * cp-tree.h (cplus_decl_attributes): Update prototype.
7235         * decl.c (start_decl, grokdeclarator, start_function): Update
7236         calls to decl_attributes and cplus_decl_attributes.
7237         * friend.c (do_friend): Update call to cplus_decl_attributes.
7238         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
7239
7240 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
7241
7242         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
7243         for `register' variables with an asm-specification.
7244
7245 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
7246
7247         * semantics.c (finish_asm_stmt): Mark the output operands
7248         to an asm addressable, if necessary.
7249
7250 2001-07-11  Ben Elliston  <bje@redhat.com>
7251
7252         * Revert this change -- there is a subtle bug.
7253
7254         PR c++/80
7255         * decl.c (finish_enum): New "attributes" argument; pass it to
7256         cplus_decl_attributes.  Use a narrower type if the enum is packed.
7257         * cp-tree.h (finish_enum): Adjust prototype.
7258         * parse.y (enum_head): New non-terminal.
7259         (structsp): Use it. Enums now may be preceded or followed by
7260         optional attributes -- pass their chained tree to finish_enum().
7261         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
7262
7263 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
7264
7265         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
7266         variables.
7267
7268 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
7269
7270         * semantics.c (cp_expand_stmt): Fix for null
7271         current_function_return_value.
7272
7273 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
7274
7275         * call.c (build_op_delete_call): Initialize fn.
7276         (convert_like_real): Delete conditional.
7277         (joust): Initialize *w and *l.
7278         * class.c: Add prototype for binfo_ctor_vtable.
7279         (get_primary_binfo): Initialize result.
7280         * init.c (build_java_class_ref): Initialize name.
7281
7282 2001-07-09  Erik Rozendaal  <dlr@acm.org>
7283
7284         * typeck.c (unary_complex_lvalue): Do not duplicate the
7285         argument to modify, pre-, or post-increment when used as an
7286         lvalue and when the argument has side-effects.
7287
7288 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7289
7290         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7291         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
7292         cplus_decl_attributes even if attrs is NULL.
7293         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7294
7295 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7296
7297         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
7298         calls to decl_attributes.
7299
7300 2001-07-06  Ira Ruben   <ira@apple.com>
7301
7302         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
7303         be DECL_TEMPLATE_RESULT.
7304
7305 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7306
7307         * cp-tree.h (copy_template_template_parm): Rename to ...
7308         (bind_template_template_parm): ... here.
7309         * tree.c (copy_template_template_parm): Rename to ...
7310         (bind_template_template_parm): ... here.  Remove the case when
7311         NEWARGS is NULL_TREE.
7312         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
7313         BOUND_TEMPLATE_TEMPLATE_PARM.
7314         * pt.c (lookup_template_class): Adjust.
7315
7316 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
7317
7318         * cvt.c (convert_lvalue): New fn.
7319         * cp-tree.h: Declare it.
7320         * method.c (do_build_assign_ref): Use it.
7321         (do_build_copy_constructor): Convert parm to base types
7322         before calling base constructors.
7323
7324         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
7325         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
7326         optimize.
7327         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
7328
7329 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
7330
7331         * optimize.c (optimize_inline_calls): New function, broken out
7332         of ...
7333         (optimize_function): ... here. Call it. Don't inline if it is
7334         a thunk.
7335         (dump_function): Print name of dump flag causing this dump.
7336         * semantics.c (expand_body): Move thunk inline check to
7337         optimize_function.
7338
7339 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7340
7341         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
7342         (comptypes): Use target.comp_type_attributes.
7343
7344 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
7345
7346         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
7347
7348 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7349
7350         * error.c (lang_print_error_function): Add a `diagnostic_context *'
7351         parameter. Tweak.
7352
7353 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7354
7355         * decl2.c (import_export_class): Update.
7356
7357 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7358
7359         * error.c (init_error): Adjust settings.
7360
7361 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7362
7363         * error.c (init_error): Adjust settings.
7364
7365 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
7366
7367         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
7368         return pointers to data members by reference rather than by value.
7369
7370 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
7371
7372         Implement the Named Return Value optimization.
7373         * cp-tree.h (struct cp_language_function): Add x_return_value.
7374         (current_function_return_value): Now a macro.
7375         * decl.c: Don't define it.
7376         (define_label, finish_case_label): Don't clear it.
7377         (init_decl_processing): Don't register it with GC.
7378         * semantics.c (genrtl_finish_function): Don't check it for
7379         no_return_label.  Copy the RTL from the return value to
7380         current_function_return_value and walk, calling...
7381         (nullify_returns_r): ...this new fn.
7382         * typeck.c (check_return_expr): Set current_function_return_value.
7383
7384 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
7385
7386         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
7387         sharing a ctor vtable with.  Merge code for cases 1 and 2.
7388         (binfo_ctor_vtable): New fn.
7389         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
7390
7391 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
7392
7393         * class.c (dfs_find_final_overrider): Fix logic.
7394
7395         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
7396         virtual thunk instead of non-virtual.
7397         (get_matching_virtual): Uncomment.
7398
7399         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
7400         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
7401         PARM, not ARG.
7402
7403 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
7404
7405         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
7406         we've not emerged from the hierarchy of RTTI_BINFO on reaching
7407         a non-virtual base.
7408
7409 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
7410
7411         * NEWS: Update release number.
7412
7413 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
7414
7415         PR c++/3130, c++/3131, c++/3132
7416         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
7417         * class.c (force_canonical_binfo_r): Move
7418         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
7419         virtual bases unless they're primary and what they're primary
7420         too has been moved.
7421         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
7422         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
7423         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
7424         derived binfo.
7425         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
7426         (layout_nonempty_base_or_field): Add most derived type
7427         parameter. Adjust.
7428         (layout_empty_base): Likewise.
7429         (build_base_field): Likewise.
7430         (build_base_fields): Likewise.
7431         (propagate_binfo_offsets): Add most derived type
7432         parameter. Skip non canonical virtual bases too.
7433         (dfs_set_offset_for_unshared_vbases): Don't skip primary
7434         bases. Do skip canonical bases.
7435         (layout_virtual_bases): Adjust.
7436         (layout_class_type): Adjust.
7437         (dfs_get_primary_binfo): Build list of virtual primary base
7438         candidates.
7439         (get_primary_binfo): Check that the shared virtual primary
7440         base candidate was found first.
7441         (accumulate_vtbl_inits): Don't do anything for non-vptr
7442         containing binfos. For case 1 primary virtual bases, keep
7443         checking that we've not emerged from the hierarchy of RTTI_BINFO.
7444
7445 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
7446
7447         PR c++/3089
7448         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
7449         hierarchy looking for primary bases for a ctor
7450         vtable. Recursively call oneself, if we meet our primary via
7451         this route and haven't met it yet via inheritance graph order.
7452
7453 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
7454
7455         * lang-options.h: Emit documentation for -fno-honor-std, not
7456         -fhonor-std.
7457
7458 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
7459
7460         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
7461         Don't clobber delta.
7462         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
7463
7464 2001-06-10  Mark Mitchell <mark@codesourcery.com>
7465             Gabriel Dos Reis  <gdr@codesourcery.com>
7466
7467         * Make-lang.in (cp/call.o): Depend on diagnostic.h
7468         (cp/typeck.o): Depend on diagnostic.h
7469         (cp/typeck2.o): Depend on diagnostic.h
7470         (cp/repo.o): Depend on dignostic.h
7471         * typeck.c: #include diagnostic.h
7472         (convert_for_initialization): Remove extern declaration for
7473         warningcount and errorcount.
7474
7475         * call.c: #include diagnostic.h
7476         (convert_like_real): Remove extern declaration for warnincount and
7477         errorcount.
7478
7479         * repo.c: #include diagnostic.h
7480         * typeck2.c: #include diagnostic.h
7481
7482 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7483
7484         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
7485         in previous change.
7486
7487 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7488
7489         PR c++/2929
7490         * friend.c (do_friend): Use push_decl_namespace for classes at
7491         namespace scope.
7492
7493 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7494             Jason Merrill <jason_merrill@redhat.com>
7495
7496         PR c++/3061
7497         * class.c (build_secondary_vtable): Use assert, rather than an error
7498         message.
7499         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
7500         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
7501         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
7502         Don't set BINFO_VTABLE for a primary virtual base.
7503
7504 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
7505
7506         * decl.c (duplicate_decls): Update source position information
7507         when a template function is defined.
7508
7509 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
7510
7511         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
7512
7513 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
7514
7515         PR c++/2914
7516         * decl.c (pushtag): Don't push into a complete type's scope.
7517
7518 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
7519
7520         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
7521         (struct lang_decl_flags): Lose generate_with_vtable_p.
7522         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
7523         * class.c (copy_virtuals): Adjust.
7524         * decl2.c (mark_vtable_entries): Adjust.
7525         * method.c (make_thunk, build_vtable_entry): Adjust.
7526         * class.c (update_vtable_entry_for_fn): Only look as far as the
7527         first defining class.
7528         (build_vtbl_initializer): Put nothing in the slot for a function only
7529         defined in a lost primary virtual base.
7530         (add_vcall_offset_vtbl_entries_1): Use the same code for
7531         the lost primary case and the normal case.
7532         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
7533         (get_vfield_offset, get_derived_offset): Lose.
7534         (dfs_find_final_overrider): Use look_for_overrides_here.
7535         (get_matching_virtual): New fn.
7536         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
7537         not BV_VCALL_INDEX.
7538         * search.c (look_for_overrides_here): Split out from...
7539         (look_for_overrides_r): Here.
7540
7541         * class.c (find_final_overrider): Return error_mark_node on error.
7542
7543         * decl2.c (key_method): #if 0 accidental change.
7544
7545 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7546
7547         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
7548         (build_over_call): Likewise.
7549         * decl.c (grokparms): Likewise.
7550         * pt.c (tsubst_decl): Likewise.
7551         * typeck.c (convert_arguments): Likewise.
7552
7553 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
7554
7555         * semantics.c (begin_class_definition): Robustify.
7556
7557         * pt.c (instantiate_decl): Tell the repository code about the
7558         clones, not the cloned functions.
7559         * repo.c (repo_template_used): Explicitly instantiate the cloned
7560         function, not the clones.
7561
7562 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7563
7564         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
7565         ICS_BAD_FLAG on created conversion.
7566         (compare_ics): Break out rank.
7567
7568 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7569
7570         * decl.c (xref_tag): Remove extraneous %s on dependent name
7571         lookup warning.
7572
7573 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7574
7575         * class.c (layout_vtable_decl): Fix off by one error on
7576         build_index_type.
7577         (build_vtt): Likewise.
7578         (build_ctor_vtbl_group): Likewise.
7579
7580 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7581
7582         * class.c (maybe_indent_hierarchy): New function.
7583         (dump_class_hierarchy_r): Add flags. Dump extra binfo
7584         information, if enabled. Use maybe_indent_hierarchy. Adjust
7585         output format.
7586         (dump_class_hierarchy): Adjust prototype. Adjust output format.
7587         (dump_array, dump_vtable, dump_vtt): New functions.
7588         (finish_struct_1): Adjust hierarchy dumping.
7589         (initialize_vtable): Call dump_vtable.
7590         (build_vtt): Call dump_vtt.
7591         (build_ctor_vtbl_group): Call dump_vtable.
7592         * decl2.c (flag_dump_class_layout): Remove.
7593         (cxx_decode_option): Remove dump translation unit
7594         and dump class hierarchy check. Call dump_switch_p.
7595         (finish_file): Adjust dumping.
7596         (dump.c): Only dump base classes if not TDF_SLIM.
7597         Only dump namespace members if not TDF_SLIM.
7598         * optimize.c (dump_function): New function.
7599         (optimize_function): Call dump_function.
7600         * semantics.c (expand_body): Use dump_enabled_p.
7601
7602 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
7603
7604         PR g++/2936
7605         Part missed from first commit
7606         * decl2.c (finish_anon_union): Copy context.
7607
7608 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
7609
7610         PR g++/2936
7611         * optimize.c (remap_decl): Remap anonymous aggregate members too.
7612
7613 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
7614
7615         PR g++/2823
7616         * semantics.c (expand_body): Don't optimize thunks.
7617
7618 2001-05-25  Sam TH  <sam@uchicago.edu>
7619
7620         * cp-tree.h lex.h: Fix header include guards.
7621
7622 2001-05-25  Mark Mitchell <mark@codesourcery.com>
7623
7624         * decl.c (init_decl_processing): Tweak.
7625
7626 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
7627
7628         * decl.c (duplicate_decls): Tidy.
7629         (init_decl_processing): Always set flag_no_builtin.
7630
7631 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
7632
7633         PR c++/2184
7634         * decl2.c (do_local_using_decl): Push the decls, even in a
7635         template.
7636
7637 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
7638
7639         * optimize.c (initialize_inlined_parameters): Don't set
7640         TREE_READONLY for a VAR_DECL taking the place of an inlined
7641         PARM_DECL.
7642
7643 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
7644
7645         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
7646         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
7647         attribute.
7648
7649 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
7650
7651         * parse.y: Refer to compound literals as such, not as
7652         constructor-expressions.
7653
7654 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
7655
7656         * call.c (build_op_delete_call): Ignore exception-specifications
7657         when looking for matching delete operators.
7658         * init.c (build_new_1): Compute whether or not the allocation
7659         function used is a placement allocation function or not, and
7660         communicate this information to build_op_delete_call.
7661
7662 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
7663
7664         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
7665         (build_vtbl_ref): Adjust.
7666         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
7667         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
7668         Re-add vtable-gc.
7669         (unsupported_options): Correspondingly.
7670
7671         * decl2.c (maybe_make_one_only): Check flag_weak, not
7672         supports_one_only().
7673
7674         * cp-tree.def (START_CATCH_STMT): Lose.
7675         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
7676         * tree.c (cp_statement_code_p): Don't case it.
7677         * semantics.c (cp_expand_stmt): Likewise.
7678         * cp-tree.h (START_CATCH_TYPE): Lose.
7679         (HANDLER_TYPE): New.
7680         * except.c (expand_start_catch_block): Don't start any blocks.
7681         Return the type.
7682         (expand_end_catch_block): Don't end any blocks.
7683         * parse.y (handler): Don't pass anything from finish_handler_parms
7684         to finish_handler.
7685         * pt.c (tsubst_expr): Likewise.
7686         * semantics.c (begin_handler): Call note_level_for_catch here.
7687         (finish_handler_parms): Don't return anything.
7688         (genrtl_catch_block, begin_catch_block): Lose.
7689         (genrtl_handler): Call expand_start_catch here.
7690
7691 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
7692
7693         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
7694         (get_vtable_decl, build_vtt): Not here.
7695
7696 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
7697
7698         PR c++/2781
7699         * optimize.c (update_cloned_parm): Copy addressability and other
7700         flags.
7701
7702 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7703
7704         * pt.c (determine_specialization): Ignore artificial functions.
7705
7706 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7707
7708         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
7709         (C_RID_CODE): Remove.
7710         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
7711         (init_parse): Don't do it here.
7712
7713 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
7714
7715         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
7716         function declaration to avoid stripping the symbol's attributes.
7717
7718 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
7719
7720         * decl.c (pushdecl): Adjust error string.
7721         (xref_tag): Adjust friend class injection warning. Remove the
7722         inherited name from the class shadowed scope.
7723
7724 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
7725
7726         * except.c (cp_protect_cleanup_actions): New function.
7727         (init_exception_processing): Don't set protect_cleanup_actions
7728         here.  Do set lang_protect_cleanup_actions.
7729
7730 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
7731
7732         * spew.c (read_token): Call yyerror on all unexpected tokens.
7733
7734 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
7735
7736         * init.c (member_init_ok_or_else): Take a tree rather than
7737         string for name.
7738         (expand_member_init): Adjust.
7739
7740 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
7741
7742         * decl.c (duplicate_decls): Suppress warning about duplicate
7743         decls if the first decl is a friend.
7744
7745 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
7746
7747         * except.c (choose_personality_routine): Export.  Add
7748         explanatory comment.  Take an enum languages, not a boolean.
7749         (initialize_handler_parm): Adjust to match.
7750         * cp-tree.h: Prototype choose_personality_routine.
7751         * lex.c (handle_pragma_java_exceptions): New function.
7752         (init_cp_pragma): Register #pragma GCC java_exceptions.
7753
7754 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7755
7756         * method.c (build_mangled_C99_name): Remove unused prototype.
7757
7758 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
7759
7760         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
7761         * typeck.c (get_member_function_from_ptrfunc,
7762         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
7763         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
7764
7765         Reverted Geoff Keating's 2001-05-03's patch.
7766
7767 2001-05-11  Ira Ruben   <ira@apple.com>
7768
7769         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
7770
7771 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
7772
7773         * cp-tree.h (finish_label_expr, lookup_label): Delete.
7774         * parse.y: Update for '&&'; don't issue warning here.
7775         * semantics.c (finish_label_expr): Delete.
7776
7777 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
7778
7779         * splay-tree.h (splay_tree_max): New function.
7780         (splay_tree_min): Likewise.
7781
7782 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
7783
7784         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
7785         (pfn_vflag_identifier): Define.
7786         Update comment about layout of pointer functions.
7787         (build_ptrmemfunc1): Update prototype.
7788         (expand_ptrmemfunc_cst): Update prototype.
7789         * decl.c (initialize_predefined_identifiers): Initialize
7790         pfn_vflag_identifier.
7791         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
7792         an extra field to the type.
7793         * expr.c (cplus_expand_constant): Pass 'flag' between
7794         expand_ptrmemfunc_cst and build_ptrmemfunc1.
7795         * typeck.c (get_member_function_from_ptrfunc): When
7796         FUNCTION_BOUNDARY < 16, look at additional field to determine
7797         if a pointer-to-member is a real pointer or a vtable offset.
7798         (build_ptrmemfunc1): Add new parameter to contain extra field.
7799         (build_ptrmemfunc): Pass the extra field around.
7800         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
7801         (pfn_from_ptrmemfunc): Ignore the extra field.
7802
7803 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
7804
7805         * cp-tree.h (flag_inline_trees): Update documentation.
7806         * decl.c (init_decl_processing): Adjust handling of
7807         flag_inline_functions and flag_inline_trees to support -O3.
7808         (grokfndecl): Set DECL_INLINE on all functions if that's what
7809         the user requested.
7810         (save_function_data): Clear DECL_INLINE in
7811         current_function_cannot_inline is non-NULL.
7812         * decl2.c (flag_inline_trees): Update documentation.
7813
7814 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
7815
7816         * dump.c (cp_dump_tree, USING_STMT case): New case.
7817         * tree.c (cp_statement_code_p): Add USING_STMT.
7818         * decl2.c (do_using_directive): Add the using directive statement.
7819
7820         * tree.c (walk_tree): Reformat an if block.
7821
7822 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
7823
7824         * decl.c (compute_array_index_type): Don't try to do anything with
7825         the indices when processing a template.
7826
7827 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7828
7829         * call.c: NULL_PTR -> NULL.
7830         * class.c: Likewise.
7831         * cvt.c: Likewise.
7832         * decl.c: Likewise.
7833         * decl2.c: Likewise.
7834         * except.c: Likewise.
7835         * init.c: Likewise.
7836         * rtti.c: Likewise.
7837         * search.c: Likewise.
7838         * tree.c: Likewise.
7839         * typeck.c: Likewise.
7840         * typeck2.c: Likewise.
7841
7842 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
7843
7844         * decl2.c (do_using_directive): Revert previous patch.
7845
7846 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7847
7848         * cp-tree.def (USING_STMT): New statement node.
7849         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
7850         * decl2.c (do_using_directive): Add USING_STMT to statement
7851         tree. Don't emit errors when processing template decl.
7852         * pt.c (tsubst_expr, USING_STMT case): New case.
7853         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
7854
7855 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7856
7857         * call.c (build_new_op): Convert args from reference here.
7858         (build_conditional_expr): Don't convert here.
7859
7860 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7861
7862         * spew.c (last_token_id): New static variable.
7863         (read_token): Set it here.
7864         (yyerror): Use it here.
7865
7866 2001-04-30  Richard Henderson  <rth@redhat.com>
7867
7868         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
7869         * decl.c: Likewise.
7870
7871 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
7872
7873         * gxxint.texi: Remove.
7874         * Make-lang.in: Remove all traces of gxxint.texi.
7875
7876 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
7877
7878         * decl2.c (start_static_initialization_or_destruction): Correct
7879         logic to handle the -fno-use-cxa-atexit case.
7880
7881 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
7882
7883         * optimize.c (update_cloned_parm): New function.
7884         (maybe_clone_body): Use it.  Update the `this' parameter too.
7885
7886 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7887
7888         * decl2.c (unsupported_options): Add new-abi.
7889         * lang-options.h: Remove no longer supported options.
7890
7891 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
7892
7893         * except.c (can_convert_eh): Don't check template parms,
7894         typename types etc.
7895
7896 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
7897
7898         * optimize.c (maybe_clone_body): Copy parameter names and locations.
7899
7900 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
7901
7902         * cp-tree.h (adjust_clone_args): Prototype new function.
7903         * class.c (adjust_clone_args): New function.
7904         * decl.c (start_function): Call it for in charge ctors.
7905
7906 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
7907
7908         * method.c (use_thunk): Make sure that thunks really are emitted
7909         when requested.
7910
7911 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
7912
7913         * mangle.c (write_chars): New macro.
7914         (hwint_to_ascii): New function
7915         (write_number): Use it.
7916         (write_integer_cst): Deal with really big numbers.
7917
7918 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
7919
7920         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
7921         the clone.
7922
7923 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
7924
7925         * decl.c (grokdeclarator): Set context of namespace scope
7926         TYPE_DECLS.
7927
7928 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
7929
7930         * cp/optimize.c: Include hashtab.h.
7931         (struct inline_data): Add tree_pruner.
7932         (expand_call_inline, expand_calls_inline): Use it when calling
7933         walk_tree.
7934         (optimize_function): Initialize and free tree_pruner.
7935
7936 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
7937
7938         Lazy __FUNCTION__ generation.
7939         * cp-tree.def (FUNCTION_NAME): Remove.
7940         * cp-tree.h (function_name_declared_p): Remove.
7941         (cp_fname_init): Prototype.
7942         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
7943         don't call declare_function_name. Call start_fname_decls.
7944         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
7945         clobber the line number.
7946         (cp_fname_init): New function.
7947         (start_function): Call start_fname_decls.
7948         (finish_function): Call finish_fname_decls.
7949         * lex.c (reswords): Add slots for __FUNCTION__ et al.
7950         (rid_to_yy): Add mappings for __FUNCTION__ et al.
7951         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
7952         * parse.y (VAR_FUNC_NAME): New token.
7953         (primary): Add VAR_FUNC_NAME.
7954         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
7955         generation.
7956         (tsubst, FUNCTION_NAME case): Remove.
7957         (tsubst_copy, FUNCTION_NAME case): Remove.
7958         (tsubst_expr, DECL_STMT case): Be careful with a
7959         DECL_PRETTY_FUNCTION_P.
7960         (instantiate_decl): Remove function_name_declared_p.
7961         * semantics.c (begin_compound_statement): Don't call
7962         declare_function_name here.
7963         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
7964         (finish_translation_unit): Call finish_fname_decls.
7965         (expand_body): Remove function_name_declared_p.
7966         * typeck2.c (digest_init): Allow any ERROR_MARK.
7967
7968 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
7969
7970         * pt.c (tsubst_decl): Use VOID_TYPE_P.
7971         * semantics.c: Fix some typos.
7972
7973 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
7974
7975         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
7976
7977 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7978
7979         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
7980
7981 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
7982
7983         * except.c (build_throw): Wrap the initialization of the exception
7984         object in a MUST_NOT_THROW_EXPR.
7985         (do_free_exception): #if 0.
7986
7987 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
7988
7989         * cp-tree.h (finish_enum): Change prototype.
7990         * decl.c (finish_enum): Reorganize.
7991         * parse.y (structsp): Adjust calls to finish_enum.
7992
7993 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7994
7995         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
7996         't' case.
7997
7998 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7999
8000         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
8001         (layout_empty_base): Return at end flag.
8002         (build_base_field): Likewise.
8003         (build_base_fields): Likewise.
8004         (layout_virtual_bases): Don't add 1 to eoc value.
8005         (end_of_class): Use full size for empty bases.
8006         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
8007         empty bases. Don't add 1 to eoc value. Only add trailing padding
8008         if we're an empty class with no empty bases.
8009         (dump_class_hierarchy): Dump size and alignment.
8010
8011 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
8012
8013         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
8014         ICS_BAD_FLAG.
8015
8016 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
8017
8018         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
8019         is found, look first if name does not match the structure name.
8020
8021 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
8022
8023         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
8024         set.
8025         (SET_DECL_LANGUAGE): New macro.
8026         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
8027         (pushdecl): Likewise.
8028         (build_library_fn_1): Likewise.
8029         (build_cp_library_fn): Likewise.
8030         (grokfndecl): Likewise.
8031         (grokvardecl): Mark `extern "C"' variables as having C linkage.
8032         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
8033         * lex.c (retrofit_lang_decl): Likewise.
8034         * mangle.c (mangle_decl_string): Don't mangle the names of
8035         variables declared with C language linkage.
8036         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
8037
8038 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8039
8040         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
8041         flag_access_control from uninitialized storage.
8042
8043 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
8044
8045         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
8046         * mangle.c (write_pointer_to_member_type): Fix mangling of
8047         pointers to cv-qualified member function types.
8048
8049         * init.c (build_delete): Create a SAVE_EXPR for the address if
8050         we're going to use it more than once.
8051
8052 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
8053
8054         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
8055         (expand_ptremfunc_cst): Change prototype.
8056         (delta2_from_ptrmemfunc): Remove.
8057         * expr.c (cplus_expand_constant): Adjust call to
8058         expand_ptrmemfunc_cst.
8059         * typeck.c (build_ptrmemfunc1): Simplify.
8060         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
8061         results in a constant.
8062         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
8063         (delta2_from_ptrmemfunc): Remove.
8064         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
8065
8066 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
8067
8068         * cp-tree.h (decl_namespace_list): New macro.
8069         (struct saved_scope): Add decl_ns_list.
8070         * decl.c (mark_saved_scope): Mark it.
8071         * decl2.c: Lose static decl_namespace_list.
8072         (init_decl2): Don't save it.
8073
8074 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8075
8076         * cp-tree.h (warn_return_type, yylex): Delete redundant
8077         declarations.
8078
8079         * decl.c (current_class_depth, global_namespace): Likewise.
8080
8081         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
8082
8083         * repo.c (flag_use_repository): Likewise.
8084
8085 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8086
8087         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
8088         set_block, pushdecl, getdecls, gettags, init_decl_processing,
8089         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
8090         lvalue_or_else, print_lang_statistics, comp_target_types,
8091         unsigned_type, signed_type, signed_or_unsigned_type,
8092         build_function_call, mark_addressable, incomplete_type_error):
8093         Delete redundant declarations.
8094
8095 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
8096
8097         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
8098         (TYPE_ANONYMOUS_P): New macro.
8099         (TAGGED_TYPE_P): New macro.
8100         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
8101         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
8102         * tree.c (no_linkage_helper): Likewise.
8103         * semantics.c (begin_class_definition): Likewise.
8104         * pt.c (convert_template_argument): Likewise.
8105         * lex.c (check_for_missing_semicolon): Likewise.
8106
8107 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
8108
8109         * class.c (dfs_unshared_virtual_bases): New function.
8110         (mark_primary_bases): Call it.
8111         (check_bases): Ignore virtual bases when determining
8112         nearly-emptiness.
8113
8114 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
8115
8116         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
8117
8118 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
8119
8120         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
8121         cloned function to the clone.
8122
8123 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8124
8125         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
8126
8127         * semantics.c: Include expr.h.
8128
8129 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
8130
8131         * method.c (implicitly_declare_fn): Commonize code for copy ctor
8132         and assignment op. Set TREE_USED for parameter.
8133
8134 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
8135
8136         * class.c (find_final_overrider_data): Add `candidates'.
8137         (dfs_find_final_overrider): Don't issue error messages
8138         prematurely.
8139         (find_final_overrider): Issue error messages here.
8140         (build_base_field): Don't warn about amgibuous direct bases here.
8141         (warn_about_ambiguous_direct_bases): New function.
8142         (layout_class_type): Use it.
8143
8144 2001-04-10  Richard Henderson  <rth@redhat.com>
8145
8146         * typeck.c (build_array_ref): Push the array reference inside
8147         COMPOUND_EXPR and COND_EXPR.
8148
8149 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
8150
8151         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
8152         * decl.c (duplicate_decls): Adjust accordingly.
8153         (maybe_commonize_var): Likewise.
8154         (grokfndecl): Likewise.
8155         (start_function): Likewise.
8156         (start_method): Likewise.
8157         * decl2.c (key_method): Likewise.
8158         (import_export_decl): Likewise.
8159         * method.c (implicitly_declare_fn): Likewise.
8160         * optimize.c (maybe_clone_body): Likewise.
8161
8162 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
8163
8164         * lang-specs.h: Add __DEPRECATED.
8165
8166 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
8167
8168         * search.c (get_dynamic_cast_base_type): When building a new
8169         constant, set its type to ssizetype.
8170
8171 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
8172
8173         * optimize.c (expand_call_inline): Only add newly inlined statements
8174         into inlined_stmts.
8175
8176 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
8177
8178         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
8179         (OPERATOR_FORMAT): Likewise.
8180         (OPERATOR_TYPENAME_FORMAT): Likewise.
8181         * operators.def: Remove old name-mangling information.
8182         * decl.c (grok_op_properties): Adjust accordingly.
8183         * lex.c (init_operators): Likewise.
8184         * rtti.c (get_tinfo_decl): Issue error messages about types that
8185         have variable size.
8186
8187 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
8188
8189         * decl2.c (import_export_decl): Don't call import_export_class
8190         when processing an inline member function.
8191         * semantics.c (expand_body): Call import_export_decl before
8192         emitting inline functions.
8193
8194 2001-03-28  Richard Henderson  <rth@redhat.com>
8195
8196         IA-64 ABI Exception Handling:
8197         * cp-tree.def (EH_SPEC_BLOCK): New.
8198         (MUST_NOT_THROW_EXPR): New.
8199         * cp-tree.h: Update changed function declarations.
8200         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
8201         (CPTI_CALL_UNEXPECTED): New.
8202         (struct cp_language_function): Rename x_eh_spec_try_block
8203         to x_eh_spec_block.
8204         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
8205         * decl.c (current_binding_level): If no current function
8206         bindings, revert to scope_chain.
8207         (initialize_predefined_identifiers): Remove __cp_push_exception.
8208         (store_parm_decls): Use begin_eh_spec_block.
8209         (finish_function): Use finish_eh_spec_block.
8210         (mark_lang_function): Update for name changes.
8211         * decl2.c (finish_file): No mark_all_runtime_matches.
8212         * dump.c (cp_dump_tree): Handle new tree codes.
8213         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
8214         * except.c (catch_language_init, catch_language): Remove.
8215         (init_exception_processing): Don't set language code.
8216         Initialize call_unexpected_node, protect_cleanup_actions,
8217         eh_personality_libfunc, lang_eh_runtime_type.
8218         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
8219         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
8220         (prepare_eh_type): Split out type canonicalizations ...
8221         (build_eh_type_type): ... from here.
8222         (build_eh_type_type_ref): Remove.
8223         (mark_all_runtime_matches): Remove.
8224         (build_exc_ptr): New.
8225         (do_begin_catch, do_end_catch): New.
8226         (do_pop_exception): Remove.
8227         (build_terminate_handler): Remove.
8228         (choose_personality_routine): Split out language choice from ...
8229         (initialize_handler_parm): ... here.
8230         Use MUST_NOT_THROW_EXPR.
8231         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
8232         exception object handling.
8233         (expand_start_eh_spec, expand_end_eh_spec): Remove.
8234         (expand_exception_blocks, alloc_eh_object): Remove.
8235         (begin_eh_spec_block, finish_eh_spec_block): New.
8236         (do_allocate_exception, do_free_exception): New.
8237         (expand_throw): Merge into ...
8238         (build_throw): ... here.  Update for abi.
8239         * expr.c (cplus_expand_expr): No expand_internal_throw.
8240         Handle MUST_NOT_THROW_EXPR.
8241         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
8242         * semantics.c (*) Update for except.h name changes.
8243         (genrtl_try_block): No protect_with_terminate.
8244         (genrtl_eh_spec_block): New.
8245         (genrtl_handler): Don't emit the goto here.
8246         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
8247         (genrtl_finish_function): Don't expand_exception_blocks.
8248         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
8249
8250 2001-03-28  Richard Henderson  <rth@redhat.com>
8251
8252         * decl.c (struct named_label_list): Rename eh_region to
8253         in_try_scope, add in_catch_scope.
8254         (struct binding_level): Rename eh_region to is_try_scope,
8255         add is_catch_scope.
8256         (note_level_for_try): Rename from note_level_for_eh.
8257         (note_level_for_catch): New.
8258         (poplevel): Copy both is_try_scope and is_catch_scope to
8259         the named_label_list struct.
8260         (check_previous_goto_1): Don't check for catch block via
8261         DECL_ARTIFICIAL; use in_try_scope instead.
8262         (check_goto): Likewise.
8263         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
8264         * except.c (expand_start_catch_block): Call note_level_for_catch.
8265         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
8266
8267 2001-03-27  Richard Henderson  <rth@redhat.com>
8268
8269         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
8270         exceptions_via_longjmp.
8271
8272 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
8273
8274         * pt.c (check_default_tmpl_args):  Make error messages clearer.
8275
8276 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
8277
8278         * error.c:  Also undefine 'A' macro used for cp_printers definition.
8279
8280 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8281
8282         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
8283
8284 2001-03-26  Mike Yang <yang@research.att.com>
8285             Mark Mitchell  <mark@codesourcery.com>
8286
8287         * dump.c (dump_access): New function.
8288         (cp_dump_tree): Use it.  Dump basetype information for class
8289         types.
8290
8291 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
8292
8293         * Makefile.in (optimize.o): Depend on params.h.
8294         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
8295         (init_decl_processing): Set flag_no_inline when doing
8296         inlining-on-trees.
8297         * optimize.c: Include params.h.
8298         (struct inline_data): Improve documentation of FNS.  Add
8299         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
8300         (INSNS_PER_STMT): New macro.
8301         (remap_block): Use CLONING_P.
8302         (inlinable_function_p): Don't inline big functions.
8303         (expand_call_inline): Keep track of how much inlining we've done.
8304         (optimize_function): Set FIRST_INLINED_FN.
8305         (maybe_clone_body): Set CLONING_P.
8306         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
8307         tree nodes.
8308         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
8309         rest_of_compilation.  Clear DECL_RTL for local variables
8310         afterwards.
8311         (clear_decl_rtl): New function.
8312
8313 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
8314
8315         Implement DR 209
8316         * cp-tree.h (skip_type_access_control,
8317         reset_type_access_control): Prototype.
8318         * decl.c (grokdeclarator): Access of friends is not checked.
8319         * parse.y (component_decl_list): Reset type access control.
8320         * semantics.c (decl_type_access_control): Clear
8321         current_type_lookups.
8322         (save_type_access_control): Don't save if not deferring.
8323         (skip_type_access_control, reset_type_access_control): New
8324         functions.
8325         (begin_class_definition): Do type access control for basetypes.
8326         Start deferred access control.
8327         (finish_class_definition): Resume immediate access control if
8328         this is a local class.
8329
8330 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8331
8332         * class.c (add_method): Use memcpy/memmove, not bcopy.
8333
8334         * decl.c (duplicate_decls): Likewise.
8335
8336 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
8337
8338         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
8339         not `_'.
8340
8341 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
8342
8343         * decl.c (local_names): Define.
8344         (push_local_name): New.
8345         (grok_reference_init): Return init if initializing static reference
8346         variable with non-constant instead of emitting it.
8347         Move expand_static_init call to cp_finish_decl.
8348         (layout_var_decl): Call push_local_name.
8349         (maybe_commonize_var): Allow inlining functions even if they have
8350         static local variables, use comdat_linkage for them if flag_weak.
8351         (check_initializer): Call obscure_complex_init if
8352         grok_reference_init returned nonzero.
8353         (save_function_data): Clear x_local_names.
8354         (pop_cp_function_context): Free x_local_names.
8355         (mark_inlined_fns): Remove.
8356         (mark_lang_function): Mark x_local_names.
8357         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
8358         Mark inlined_fns as tree, remove call to mark_inlined_fns.
8359         * class.c (alter_access): Ensure DECL_ACCESS is never set if
8360         DECL_DISCRIMINATOR_P.
8361         * cp-tree.h (cp_language_function): Add x_local_names.
8362         (lang_decl_flags): Add discriminator into u2.
8363         (lang_decl_inlined_fns): Remove.
8364         (lang_decl): inlined_fns is now a TREE_VEC.
8365         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
8366         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
8367         TREE_VEC, not a custom structure.
8368         (optimize_function): Likewise.
8369         * mangle.c (discriminator_for_local_entity): Discriminate among
8370         VAR_DECL local entities.
8371         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
8372         is not valid.
8373
8374 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
8375
8376         Add support for Java interface method calls.
8377         * cp-tree.h (struct lang_type): Add java_interface flag.
8378         (TYPE_JAVA_INTERFACE): New macro.
8379         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
8380         by setting TYPE_JAVA_INTERFACE.
8381         * call.c (java_iface_lookup_fn): New static.
8382         (build_over_call): If calling a method declared in a
8383         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
8384         expression which resolves the function address.
8385         (build_java_interface_fn_ref): New function.
8386
8387 2001-03-22  Richard Henderson  <rth@redhat.com>
8388
8389         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
8390         * except.c: Don't include it.
8391
8392 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
8393             based on an idea from Joe Buck <jbuck@synopsys.com>
8394
8395         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
8396         New nonterminals.
8397         (data_def, component_decl): Add reductions to bad_decl.
8398
8399 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
8400
8401         * method.c (do_build_assign_ref): Don't use build_modify_expr for
8402         anonymous aggregates, since they don't have assignment operator
8403         method.
8404         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
8405         assignment operators for anonymous structure fields.
8406
8407 2001-03-21  Jason Merrill  <jason@redhat.com>
8408
8409         * pt.c (instantiate_decl): Abort if we see a member constant
8410         instantiation that doesn't already have its initializer.
8411         Downgrade explicit instantiation without definition to pedwarn.
8412
8413         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
8414         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
8415         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
8416
8417         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
8418         (pending_vtables): Remove.
8419         * decl2.c (pending_vtables): Remove.
8420         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
8421         CLASSTYPE_VTABLE_NEEDS_WRITING.
8422         (import_export_class): Likewise.
8423         (init_decl2): Don't mark pending_vtables.
8424         * lex.c (handle_pragma_vtable): Just sorry.
8425         * pt.c (instantiate_class_template): Don't mess with
8426         CLASSTYPE_VTABLE_NEEDS_WRITING.
8427         (mark_class_instantiated): Likewise.
8428         * ptree.c (print_lang_type): Don't print it.
8429         * semantics.c (begin_class_definition): Don't set it.
8430
8431         * pt.c (template_tail): Replace with last_pending_template.
8432         (maybe_templates, maybe_template_tail): Remove.
8433         (add_pending_template): Adjust.
8434         (instantiate_pending_templates): Adjust.
8435
8436         * cp-tree.h (struct saved_scope): Remove lang_stack field.
8437         (current_lang_stack): Remove.
8438         * decl.c (maybe_push_to_top_level): Don't initialize it.
8439         (duplicate_decls): Use current_lang_depth.
8440         (xref_basetypes): Likewise.
8441         * class.c (current_lang_depth): New fn.
8442         (push_lang_context): Use more varray functionality.
8443         (pop_lang_context): Likewise.
8444
8445         * error.c (GLOBAL_THING): Always use '__'.
8446
8447 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
8448
8449         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
8450
8451         * mangle.c (mangle_decl_string): Mangle the names of overloaded
8452         operators, even when they have `extern "C"' linkage.
8453
8454 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
8455
8456         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
8457         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8458         where it's not necessary.
8459         (add_method): Remove optimization involving comparison of
8460         DECL_ASSEMBLER_NAME.
8461         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
8462         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8463         where it's not necessary.
8464         (check_methods): Likewise.
8465         (build_clone): Likewise.
8466         (built_vtt): Likewise.
8467         * cp-tree.h (DECL_NEEDED_P): Likewise.
8468         * decl.c (pushtag): Likewise.
8469         (duplicate_decls): Likewise.
8470         (pushdecl): Likewise.
8471         (builtin_function): Likewise.
8472         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
8473         (build_cp_library_fn): Likewise.
8474         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
8475         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8476         where it's not necessary.
8477         (make_rtl_for_nonlocal_decl): Likewise.
8478         (cp_finish_decl): Likewise.
8479         (grokfndecl): Likewise.
8480         (grokvardecl): Likewise.
8481         (grokdeclarator): Likewise.
8482         (start_function): Likewise.
8483         (cp_missing_return_ok_p): Likewise.
8484         * decl2.c (grokclassfn): Likewise.
8485         (check_classfn): Likewise.
8486         (finish_static_data_member_decl): Likewise.
8487         (grokfield): Likewise.
8488         * error.c (GLOBAL_IORD_P): Remove.
8489         (dump_global_iord): Improve output.
8490         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
8491         * except.c (nothrow_libfn_p): Summarily reject any function not in
8492         namespace-scope.
8493         * init.c (build_java_class_ref): Don't explicitly set
8494         DECL_ASSEMBLER_NAME after calling mangle_decl.
8495         * mangle.c (mangle_decl_string): Handle extern "C" functions.
8496         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
8497         * method.c (set_mangled_name_for_decl): Don't explicitly set
8498         DECL_ASSEMBLER_NAME after calling mangle_decl.
8499         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
8500         IDENTIFIER_GLOBAL_VALUE for the thunk.
8501         * pt.c (set_mangled_name_for_template_decl): Remove.
8502         (check_explicit_specialization): Don't use it.
8503         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
8504         (tsubst_friend_function): Likewise.
8505         (tsubst_decl): Likewise.
8506         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
8507         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
8508         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8509         where it's not necessary.
8510         (tinfo_base_init): Likewise.
8511         (create_real_tinfo_var): Likewise.
8512         * search.c (looup_field_1): Likewise.
8513         * semantics.c (finish_named_return_value): Likewise.
8514         * tree.c (init_tree): Set lang_set_decl_assembler_name.
8515
8516 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
8517
8518         Correct semantics restrictions checking in throw-expression.
8519         * except.c (is_admissible_throw_operand): New function.
8520         (build_throw): Use it.
8521
8522 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
8523
8524         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
8525         and its ilk.
8526
8527 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
8528
8529         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8530         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
8531         * decl.c (duplicate_decls): Likewise.
8532         (builtin_function): Likewise.
8533         (build_library_fn): Likewise.
8534         (build_cp_library_fn): Likewise.
8535         (check_initializer): Likewise.
8536         (cp_finish_decl): Likewise.
8537         * decl2.c (grokfield): Likewise.
8538         (grok_function_init): Remove #if 0'd code.
8539         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8540         * friend.c (do_friend): Likewise.
8541         * init.c (get_temp_regvar): Likewise.
8542         * method.c (make_thunk): Likewise.
8543         * pt.c (tsubst_friend_function): Likewise.
8544         (tsubst_decl): Likewise.
8545         (regenerate_decl_from_template): Likewise.
8546         * semantics.c (genrtl_named_return_value): Likewise.
8547         (expand_body): Likewise.
8548         (genrtl_finish_function): Likewise.
8549         * tree.c (cp_tree_equal): Likewise.
8550
8551 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
8552
8553         * call.c (convert_like_real): Add extra semantics to INNER
8554         parameter. Don't convert to temporary if a user conversion
8555         gives us an lvalue that we're about to bind to a reference.
8556         Set INNER to indicate pending reference binding on recursive
8557         calls.
8558
8559 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
8560
8561         * cp/lex.c: Delete duplicate pending_lang_change.
8562
8563 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
8564
8565         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
8566         Similarly.
8567         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
8568         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
8569
8570 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
8571
8572         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
8573
8574 2001-03-08  Stan Shebs  <shebs@apple.com>
8575
8576         * cp-tree.h (set_identifier_local_value): Remove unused decl.
8577
8578 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
8579
8580         * spew.c: Remove references to CPP_OSTRING.
8581
8582 2001-03-06  Andrew Haley  <aph@redhat.com>
8583
8584         * typeck.c (convert_arguments): Check that we have an fndecl.
8585
8586 2001-03-05  Andrew Haley  <aph@redhat.com>
8587
8588         * typeck.c (convert_arguments): Don't do ellipsis conversion for
8589         __built_in_constant_p.
8590
8591 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8592
8593         * typeck.c (build_static_cast): Allow enum to enum conversions
8594         as per DR 128.
8595
8596 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8597
8598         * class.c (check_field_decls): Pointers to member do not a
8599         non-pod struct make, as per DR 148.
8600
8601 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8602
8603         * call.c (joust): cp_pedwarn when using gnu extension concerning
8604         worst conversion sequences.
8605
8606 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
8607
8608         * decl.c: Replace all uses of 'boolean' with 'bool'.
8609
8610 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
8611
8612         * lang-specs.h: Add zero initializer for cpp_spec field to
8613         all array elements that need one.  Don't put an #ifdef inside
8614         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
8615         use it.
8616
8617 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
8618
8619         Implement using decls inside template functions.
8620         * decl2.c (validate_nonmember_using_decl): Don't special case
8621         fake_std_node in the global namespace. Don't reject early when
8622         processing a template.
8623         (do_local_using_decl): Add to statement tree. Don't do further
8624         processing when building a template.
8625         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
8626
8627 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
8628
8629         * decl2.c (do_nonmember_using_decl): Don't complain if we find
8630         same function. Do complain about ambiguating extern "C"
8631         declarations.
8632
8633 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
8634
8635         Remove floating point and complex type template constant parms.
8636         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
8637         COMPLEX_TYPE extensions.
8638         (invalid_nontype_parm_type_p): Likewise.
8639
8640 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
8641
8642         * except.c (call_eh_info): Revert "match_function"'s type.
8643
8644 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
8645
8646         Fix ctor vtable vcall offsets.
8647         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
8648         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
8649         (get_matching_base): Remove.
8650         (get_original_base): New function.
8651         (build_vtbl_initializer): Initialize vid.rtti_binfo.
8652         Use a virtual thunk for a ctor vtable with an index
8653         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
8654         primary base within a constructor vtable. Only set
8655         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
8656         when primary base has been lost.
8657         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
8658
8659 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
8660
8661         * call.c (joust): Ensure more_specialized()'s argument length
8662         parameter has correct value for constructors.
8663
8664 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
8665
8666         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
8667
8668         * decl.c (mark_inlined_fns): Prototype.
8669
8670 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
8671
8672         * spew.c (yylex): Correct handling of friends.
8673
8674 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
8675
8676         * mangle.c (write_encoding): Pass write_function_type the
8677         FUNCTION_DECL for the function being encoded.
8678         (write_function_type): Pass it along to write_bare_function_type.
8679         (write_bare_function_type): Pass it along to write_method_parms.
8680         (write_method_parms): Don't mangle the compiler-generated
8681         parameters to a constructor or destructor.
8682
8683 2001-02-22  Andreas Jaeger  <aj@suse.de>
8684
8685         * optimize.c: Include toplev.h for
8686         note_deferral_of_defined_inline_function prototype.
8687
8688 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
8689
8690         * cp-tree.h (struct lang_decl_inlined_fns): New.
8691         (struct lang_decls): Add inlined_fns.
8692         (DECL_INLINED_FNS): New macro.
8693         * optimize.c (struct inline_data): Add inlined_fns.
8694         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
8695         (inlinable_function_p): Likewise, fix typo in comment,
8696         function is not inlinable if it already inlined function currently
8697         being optimized.
8698         (expand_call_inline): Add fn to inlined_fns if necessary.
8699         (optimize_function): Initialize inlined_fns.
8700         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
8701         * decl.c (mark_inlined_fns): New function.
8702         (lang_mark_tree): Call it.
8703
8704 2001-02-21  Jason Merrill  <jason@redhat.com>
8705
8706         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
8707         (DECL_UNINLINABLE): Move to middle-end.
8708
8709         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
8710         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
8711         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
8712         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
8713         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
8714
8715         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
8716         second parm of op=.
8717
8718 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
8719
8720         * decl2.c (set_decl_namespace): Allow explicit instantiations in
8721         any namespace.
8722
8723 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8724
8725         * optimize.c (expand_call_inline): Don't walk subtrees of type
8726         nodes.
8727
8728 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
8729
8730         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
8731         for a destructor.
8732
8733 2001-02-18  Jason Merrill  <jason@redhat.com>
8734
8735         Do put the VTT parameter in DECL_ARGUMENTS.
8736         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
8737         (current_vtt_parm): New macro.
8738         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
8739         (DECL_HAS_VTT_PARM_P): New macro.
8740         (DECL_VTT_PARM): Remove.
8741         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
8742         * decl.c (duplicate_decls): Only copy the operator code if
8743         appropriate.
8744         (start_function): Set current_vtt_parm.
8745         (lang_mark_tree): Don't mark vtt_parm.
8746         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
8747         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
8748         * class.c (build_clone): Maybe remove the VTT parm.
8749         * optimize.c (maybe_clone_body): Set up the VTT parm.
8750         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
8751         * call.c (build_over_call): Just allow the VTT arg.
8752         * method.c (make_thunk): Don't set DECL_VTT_PARM.
8753         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
8754         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
8755         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
8756         * error.c (dump_function_decl): Likewise.
8757         * call.c (build_user_type_conversion_1, convert_like_real): Abort
8758         if we try to call a constructor with in-charge or VTT parms.
8759         * method.c (skip_artificial_parms_for): New fn.
8760         * call.c (add_function_candidate, build_over_call): Call it.
8761         * call.c (build_new_method_call): Use current_vtt_parm.
8762         * init.c (expand_virtual_init): Likewise.
8763         * class.c (same_signature_p): No longer static.
8764         * cp-tree.h: Declare it.
8765         * search.c (look_for_overrides_r): Use it.
8766
8767 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
8768
8769         * cp-tree.h (new_abi_rtti_p): Remove.
8770         (name_mangling_version): Likewise.
8771         (flag_do_squangling): Likewise.
8772         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
8773         * decl.c (grokfndecl): Likewise.
8774         * decl2.c (name_mangling_version): Remove.
8775         (flag_do_squangling): Likewise.
8776         (lang_f_options): Remove `squangle'.
8777         (unsupported_options): Add `squangle'.
8778         (cxx_decode_option): Issue a warning about uses of
8779         -fname-mangling-version.
8780         (finish_file): Remove old ABI support.
8781         * pt.c (check_explicit_specialization): Likewise.
8782         (tsubst_decl): Likewise.
8783         * rtti.c (init_rtti_processing): Likewise.
8784         (build_headof): Likewise.
8785         (get_tinfo_decl_dynamic): Likewise.
8786         (tinfo_from_decl): Likewise.
8787         (build_dynamic_cast_1): Likewise.
8788         (synthesize_tinfo_var): Likewise.
8789         * init.c (build_new): Allow enumeration types for the array-bounds
8790         in a direct-new-declarator.
8791
8792         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
8793
8794         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
8795         TREE_PROTECTED from the template being specialized.
8796
8797 2001-02-17  Jason Merrill  <jason@redhat.com>
8798
8799         * decl2.c (build_artificial_parm): Set TREE_READONLY.
8800
8801         * decl.c (bad_specifiers): Allow throw specs on things with
8802         pointer-to-function or -member-function type.
8803         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
8804         a pmf.
8805
8806 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
8807
8808         * call.c (check_dtor_name): Handle template names correctly.
8809
8810 2001-02-16  Jason Merrill  <jason@redhat.com>
8811
8812         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
8813         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
8814         * optimize.c (maybe_clone_body): Don't substitute it.
8815         * call.c (build_new_method_call): Check in_chrg instead.
8816         * init.c (expand_virtual_init): Likewise.
8817
8818 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
8819
8820         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
8821         class-type introduces at least a type-name.
8822
8823 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
8824
8825         * call.c (convert_like_real): Create a temporary for non-lvalue.
8826
8827 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
8828
8829         * cp-tree.h: Fix typos in comments.
8830
8831 2001-02-16  Jason Merrill  <jason@redhat.com>
8832
8833         * optimize.c (remap_block): If we're compiling a clone, pass the
8834         new block to insert_block.
8835
8836 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
8837
8838         * semantics.c (finish_asm_stmt): Robustify.
8839
8840 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
8841
8842         * pt.c (push_template_decl_real): Don't remangle the name of a
8843         class template.
8844
8845 2001-02-15  Jim Meyering  <meyering@lucent.com>
8846
8847         * Make-lang.in (c++.install-common): Depend on installdirs.
8848         (c++.install-info): Likewise.
8849         (c++.install-man): Likewise.
8850
8851 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
8852
8853         * typeck2.c (build_m_component_ref): Robustify.
8854
8855 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
8856
8857         * friend.c (do_friend): Don't take the nested [template] class
8858         into account when deciding whether to warn about the friend
8859         function not referring to a template function.
8860
8861 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
8862
8863         * typeck.c (build_unary_op): Clarify error message.
8864
8865 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
8866
8867         * parse.y (component_constructor_declarator): allow optional
8868         parentheses around constructor class name.
8869
8870 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8871
8872         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
8873         section.
8874         * init.c (emit_base_init): Remove incorrect comment about
8875         virtual bases.
8876         * method.c (make_thunk): Fix comment alignment.
8877
8878 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8879
8880         Kill remnants of this is variable.
8881         * cp-tree.h (flag_this_is_variable): Remove.
8882         * decl2.c (flag_this_is_variable): Remove.
8883         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
8884         (build_vbase_path): The path is non-static, even in a cdtor.
8885         (resolves_to_fixed_type_p): Add additional return value.
8886         * search.c (init_vbase_pointers): Adjust.
8887         * tree.c (lvalue_p_1): Adjust.
8888         * typeck.c (mark_addressable): Adjust.
8889
8890 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8891
8892         * pt.c (unify): Don't check cv quals of array types.
8893
8894 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8895
8896         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
8897         check whether we already have the type.
8898
8899 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
8900
8901         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
8902         * call.c (build_op_delete_call): Simplify to remove duplicate
8903         code.
8904         * class.c (clone_function_decl): Don't build the deleting variant
8905         of a non-virtual destructor.
8906         * decl.c (finish_destructor_body): Don't call delete if this is a
8907         non-virtual destructor.
8908         * init.c (build_delete): Explicitly call `operator delete' when
8909         deleting an object with a non-virtual destructor.
8910
8911 2001-02-13  Jason Merrill  <jason@redhat.com>
8912
8913         * lang-specs.h: Add more __EXCEPTIONS.
8914
8915 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
8916
8917         * typeck2.c (process_init_constructor): Check
8918         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
8919
8920 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
8921
8922         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
8923         Remove spurious information in comment. Allow further
8924         adjustments of REFERENCE_TYPE args.
8925
8926 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
8927
8928         * errfn.c (cp_deprecated): Tweak diagnostic text.
8929         * parse.y (new_initializer): Deprecate initializer lists
8930         extension.
8931
8932 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
8933
8934         Remove old ABI support.
8935
8936 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
8937
8938         * decl2.c (flag_vtable_thunks): Always set it to 1.
8939         (flag_new_abi): Likewise.
8940         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
8941
8942         * Makefile.in (g++spec.o): Fix typo.
8943
8944 2001-02-09  Jason Merrill  <jason@redhat.com>
8945
8946         * lang-specs.h: Restore definition of __EXCEPTIONS.
8947
8948 2001-02-08  Jason Merrill  <jason@redhat.com>
8949
8950         * search.c (shared_member_p): New function.
8951         (lookup_field_r): Use it.
8952         * cp-tree.h (SHARED_MEMBER_P): Remove.
8953
8954         * method.c (process_overload_item): Handle template-dependent array
8955         bounds.
8956         * pt.c (type_unification_real): If we end up with undeduced nontype
8957         parms, try again.
8958
8959         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
8960         types.
8961
8962         * typeck2.c (friendly_abort): Don't say anything if we have
8963         earlier errors or sorries.
8964
8965         * decl.c (check_tag_decl): Notice attempts to redefine bool and
8966         wchar_t.  Ignore if in_system_header.
8967
8968         * decl.c (maybe_push_cleanup_level): New fn...
8969         (start_decl_1): ...split out from here.
8970         * cvt.c (build_up_reference): Use it.
8971         * cp-tree.h: Declare it.
8972
8973 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
8974
8975         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
8976         spec.
8977
8978 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
8979
8980         * pt.c (lookup_template_class): Make sure it's a primary
8981         template or template_template_parm when called from the parser.
8982         (instantiate_template_class): Add assertion.
8983
8984 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
8985
8986         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
8987         from error_mark_node.
8988
8989 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
8990
8991         Fix specification and implementation bugs in V3 ABI
8992         construction vtables.
8993         * cp-tree.h (flag_dump_class_layout): New flag.
8994         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
8995         (BINFO_LOST_PRIMARY_P): New flag.
8996         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
8997         (BINFO_PRIMARY_MARKED_P): Rename to ...
8998         (BINFO_PRIMARY_P): ... here.
8999         (binfo_via_virtual): New prototype.
9000         * decl2.c (flag_dump_class_layout): New flag.
9001         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
9002         use `=' as a file name separator.
9003         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
9004         bases.
9005         (build_vtbl_address): If this is a virtual primary base, then
9006         get the vtbl of what it is ultimately primary for.
9007         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
9008         for BINFO_PRIMARY_P.
9009         (dfs_skip_nonprimary_vbases_markedp): Likewise.
9010         (get_shared_vbase_if_not_primary): Likewise.
9011         (dfs_get_pure_virtuals): Likewise.
9012         (expand_upcast_fixups): Likewise.
9013         (fixup_virtual_upcast_offsets): Likewise.
9014         (dfs_find_vbase_instance): Likewise.
9015         (find_vbase_instance): Likewise.
9016         (binfo_from_vbase): Adjust comment to reflect reality.
9017         (binfo_via_virtual): New function.
9018         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
9019         for binfo walking during VTT construction.
9020         (dfs_mark_primary_bases): Remove.
9021         (force_canonical_binfo_r): New function.
9022         (force_canonical_binfo): New function.
9023         (mark_primary_virtual_base): New function.
9024         (mark_primary_bases): Walk in inheritance graph order, use
9025         mark_primary_virtual_base.
9026         (determine_primary_base): Use some more intermediate variables.
9027         (dfs_find_final_overrider): Don't check for overriding along a
9028         virtual path.
9029         (dfs_modify_vtables): Walk into primary virtual bases too.
9030         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
9031         (build_base_fields): Likewise.
9032         (dfs_set_offset_for_unshared_vbases): Likewise.
9033         (layout_virtual_bases): Likewise.
9034         (end_of_class): Likewise.
9035         (finish_struct_1): Call dump_class_hierarchy, if requested.
9036         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
9037         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
9038         (dump_class_hierarchy): Add file parameter. Append to file, if
9039         required.
9040         (finish_vtbls): Adjust accumulate_vtbl_inits call.
9041         Use canonical base for virtual bases.
9042         (build_vtt): Add more comments. Adjust build_vtt_inits call.
9043         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
9044         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
9045         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
9046         virtual VTTs.
9047         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
9048         from DATA.  We want virtual primary bases and all bases via virtual.
9049         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
9050         virtual base when not a construction vtable.
9051         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
9052         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
9053         Use canonical bases when processing virtual bases.
9054         (accumulate_vtbl_inits): We're interested in any base via a
9055         virtual path.
9056         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
9057         within a construction vtable, determine what is being overridden.
9058         (build_vtbl_initializer): Add more comments
9059         (add_vcall_offset_vtbl_entries_1): Adjust comment.
9060         (build_rtti_vtbl_entries): Check if the base has lost its
9061         primary.
9062
9063 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
9064
9065         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
9066
9067 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9068
9069         * decl.c (pushdecl): Call abort instead of fatal.
9070         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
9071         * init.c (build_new_1): Likewise.
9072         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
9073         * decl.c (build_typename_type): hash_table_init now returns void.
9074         decl.c (init_decl_processing): Make an error non-fatal.
9075
9076 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
9077
9078         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
9079         Document.
9080         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
9081         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
9082         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9083         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
9084         * decl.c (maybe_commonize_var): Use the new name-mangling where
9085         appropriate.
9086         * decl2.c (comdat_linkage): Enhance comments.  Make all
9087         compiler-generated things static, if COMDAT is not available.
9088         (get_tinfo_decl): Do not make typeinfo objects that belong in the
9089         library COMDAT.
9090         (tinfo_base_init): Use the correct mangled name for typeinfo
9091         strings, and push them into the global scope.
9092         (typeinfo_in_lib_p): New function.
9093         (synthesize_tinfo_var): Use it.
9094         (create_real_tinfo_var): Likewise.
9095
9096 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
9097
9098         * decl.c (push_class_binding): Use context_for_name_lookup instead
9099         of CP_DECL_CONTEXT.
9100         * search.c (context_for_name_lookup): Remove static.  Check for NULL
9101         context in the loop.
9102         * cp-tree.h (context_for_name_lookup): Add prototype.
9103
9104 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
9105
9106         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
9107         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
9108         Remove.
9109         * call.c (convert_class_to_reference, build_user_type_conversion_1,
9110         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
9111
9112 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
9113
9114         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
9115         of macros used when compiling g++spec.c.
9116         * g++spec.c (lang_specific_driver): Link with the shared
9117         libgcc by default.
9118
9119 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9120
9121         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
9122         make_reference_declarator, make_call_declarator), method.c
9123         (implicitly_declare_fn), parse.y (namespace_using_decl,
9124         notype_unqualified_id, expr_or_declarator, new_type_id,
9125         after_type_declarator, direct_after_type_declarator,
9126         notype_declarator, complex_notype_declarator,
9127         complex_direct_notype_declarator, qualified_id,
9128         notype_qualified_id, overqualified_id, direct_new_declarator,
9129         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
9130         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
9131         instead of build_parse_node.
9132
9133 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9134
9135         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
9136         (minus_one_node): Moved to top level gcc directory.  Renamed
9137         to integer_minus_one_node.
9138
9139         * init.c (init_init_processing): Don't set minus_one_node.
9140         (build_vec_init): Use integer_minus_one_node.
9141
9142         * rtti.c (get_tinfo_decl_dynamic): Likewise.
9143
9144 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
9145
9146         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
9147         identical and they would be replaced with constant, remove
9148         MODIFY_EXPR from the tree.
9149
9150 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9151
9152         * Make-lang.in: Remove all dependencies on defaults.h.
9153         * call.c: Don't include defaults.h.
9154         * decl.c: Likewise.
9155         * decl2.c: Likewise.
9156         * except.c: Likewise.
9157         * pt.c: Likewise.
9158         * rtti.c: Likewise.
9159         * tree.c: Likewise.
9160         * typeck.c: Likewise.
9161
9162 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
9163
9164         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
9165         operators even in "C" linkage.
9166         * method.c (set_mangled_name_for_decl): Likewise.
9167         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
9168         overloaded operators in "C" linkage.
9169
9170 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
9171
9172         * pt.c (tsubst_decl): Remove IN_DECL parameter.
9173         (tsubst_arg_types): Check parameter is not void.
9174         (tsubst): Adjust tsubst_decl call.
9175
9176 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
9177
9178         * call.c (add_builtin_candidate): Quote std properly, from
9179         previous change.
9180
9181 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9182
9183         * pt.c (check_explicit_specialization): Clone constructors and
9184         destructors.
9185
9186 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
9187
9188         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
9189         indicates anything special about template depth. Make sure we
9190         only count the user visible template classes.
9191
9192 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
9193
9194         * call.c (build_conv): Typo in comment.
9195         (add_builtin_candidate): Add more explanation.
9196         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
9197         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
9198         when we have enumeral types.
9199         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
9200         candidates for relops and eqops.
9201         (joust): Simplify control flow. Allow a non-template user
9202         function to hide a builtin.
9203
9204 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
9205
9206         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
9207         (more_specialized): Add deduction parameter.
9208         * call.c (joust): Adjust more_specialized call.
9209         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
9210         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
9211         (get_bindings_order): Remove.
9212         (get_bindings_real): Add DEDUCE parameter.
9213         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
9214         REFERENCE_TYPE jig for DEDUCE_ORDER.
9215         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
9216         maybe_adjust_types_for_deduction.
9217         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
9218         directly.
9219         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
9220         (check_cv_quals_for_unify): Use new unify qualifier flags.
9221         (unify): Clear new unify qualifier flags.
9222         (get_bindings_real): Add DEDUCE parameter.
9223         (get_bindings): Adjust call to get_bindings_real.
9224         (get_bindings_overload): Likewise.
9225         (most_specialized_instantiation): Adjust call to
9226         more_specialized.
9227
9228 2001-01-19  Jason Merrill  <jason@redhat.com>
9229
9230         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
9231
9232         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
9233         -fnew-abi.
9234
9235 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
9236
9237         * decl2.c (arg_assoc_class): Fix double iteration logic.
9238
9239 2001-01-19  Jason Merrill  <jason@redhat.com>
9240
9241         * init.c (build_delete): Always call convert_force to strip cv-quals.
9242
9243         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
9244         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
9245         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
9246
9247 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9248
9249         * search.c (get_vbase_1): Count only virtual bases.
9250
9251 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9252
9253         * class.c (duplicate_tag_error): Robustify flag clearing.
9254
9255 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9256
9257         * cp-tree.h (lookup_template_class): Add complain parm.
9258         * decl.c (lookup_namespace_name): Adjust call to
9259         lookup_template_class.
9260         (make_typename_type): Likewise.
9261         * semantics.c (finish_template_type): Likewise.
9262         * pt.c (lookup_template_class): Add complain parm. Adjust.
9263         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
9264         (tsubst): Likewise.
9265
9266 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9267
9268         * pt.c (copy_default_args_to_explicit_spec): Preserve
9269         object's CV quals. Reorganize.
9270
9271 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9272
9273         * typeck.c (build_modify_expr): Say `initialization' for
9274         INIT_EXPRs.
9275         * init.c (build_default_init): Convert to enumeral type, if
9276         needed.
9277
9278 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
9279
9280         * parse.y (nomods_initdcl0): Properly set things up for
9281         initdcl0_innards.
9282
9283 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9284
9285         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
9286         (type_unification_real): Set it.
9287         (unify): Use it.
9288
9289 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9290
9291         * decl.c (finish_destructor_body): Convert to vbase pointer here.
9292
9293 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9294
9295         * semantics.c (begin_class_definition): Check we're not inside a
9296         template parm list.
9297
9298 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9299
9300         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
9301         BASELINK_P.
9302
9303 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9304
9305         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
9306         * call.c (build_over_call): Add comment.
9307
9308 2001-01-16 Daniel Berlin <dberlin@redhat.com>
9309
9310         * cvt.c (ocp_convert): Handle vector type conversion
9311         * typeck2.c (digest_init): Handle vector type initializations
9312
9313 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
9314
9315         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
9316           was given.
9317
9318 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
9319
9320         * pt.c (check_nontype_parm): Rename to ...
9321         (invalid_nontype_parm_type_p): ... here.
9322         (process_template_parm): Adjust.
9323         (convert_template_argument): Adjust.
9324
9325 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
9326
9327         * pt.c (check_nontype_parm): New function.
9328         (process_template_parm): Use it.
9329         (convert_template_argument): Use it.
9330         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
9331         member.
9332
9333 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
9334
9335         * tree.c: Add defaults.h
9336         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
9337         * Make-lang.in (cp/tree.o): Add defaults.h.
9338
9339 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9340
9341         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
9342
9343 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9344
9345         * g++.1: Change to be ".so man1/gcc.1".
9346
9347 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9348
9349         * Make-lang.in (c++.info, c++.install-info): Build and install g++
9350         internals info.
9351         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
9352         ($(srcdir)/cp/g++int.info): New target.
9353         * gxxint.texi: Add info directory entry.  Use @@ in email address.
9354         * .cvsignore: Update.
9355
9356 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
9357
9358         * typeck.c (build_c_cast): Do template processing earlier.
9359         Always pedwarn on array casts.
9360
9361 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
9362
9363         * friend.c (make_friend_class): Make sure a templated class is
9364         actually a template.
9365
9366 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9367
9368         * decl2.c (get_guard): Set linkage from guarded decl.
9369
9370 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9371
9372         * call.c (convert_default_arg): Check for unprocessed
9373         DEFAULT_ARG.
9374         * cp-tree.h (replace_defarg): Move to spew.c.
9375         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
9376         spew.c, which is where they really are.
9377         (done_pending_defargs): Declare.
9378         (unprocessed_defarg_fn): Declare.
9379         * decl.c (replace_defarg): Move to spew.c
9380         * parse.y (structsp): Call done_pending_defargs.
9381         * spew.c (defarg_fns): Rearrange list structure.
9382         (defarg_fnsdone): New static variable.
9383         (defarg_depfns): New static variable.
9384         (init_spew): Adjust.
9385         (add_defarg_fn): Store the type in TREE_TYPE.
9386         (do_pending_defargs): Detect and deal with ordering constraints
9387         and circularity.
9388         (done_pending_defargs): New function.
9389         (unprocessed_defarg_fn): New function.
9390         (replace_defarg): Moved from decl.c. Robustify. Don't save
9391         if circularity detected.
9392
9393 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9394
9395         * pt.c (unify): Check array has a domain, before checking
9396         whether it is variable sized.
9397
9398 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9399
9400         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
9401         parameters with pointers to arrays of unknown bound.
9402
9403 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9404
9405         * parse.y (template_parm_header, template_spec_header): New
9406         reductions. Split out from ...
9407         (template_header): ... here. Use them.
9408         (template_template_parm): Use template_parm_header.
9409         * semantics.c (finish_template_template_parm): Add assert.
9410
9411 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
9412
9413         * mangle.c (write_builtin_type): Fix thinko.
9414
9415         * pt.c (copy_default_args_to_explicit_spec_1): New function.
9416         (copy_default_args_to_explicit_spec): Likewise.
9417         (check_explicit_specialization): Use it.
9418
9419         * class.c (finish_struct_1):  Remove last argument in call to
9420         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
9421         * decl.c (builtin_function): Likewise.
9422         (build_cp_library_fn): Likewise.
9423         (check_initializer): Likewise.
9424         (make_rtl_for_nonlocal_decl): Likewise.
9425         (cp_finish_decl): Likewise.
9426         (start_function): Likewise.
9427         * decl2.c (finish_anon_union): Likewise.
9428         * friend.c (do_friend): Likewise.
9429         * init.c (build_java_class_ref): Likewise.
9430         * method.c (make_thunk): Likewise.
9431         * pt.c (tsubst_friend_function): Likewise.
9432         * semantics.c (expand_body): Likewise.
9433
9434 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
9435
9436         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
9437         looking at DECL_CLONED_FUNCTION for non-functions.
9438
9439 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
9440
9441         * error.c (dump_template_parameter): Use parm to determine how
9442         to print default value.
9443
9444 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
9445
9446         * class.c (duplicate_tag_error): Clear more flags.
9447
9448 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
9449
9450         * call.c (build_new_method_call): Use binfo_for_vbase.
9451
9452 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
9453
9454         * cp-tree.h (flag_cond_mismatch): Don't declare.
9455         * decl2.c (flag_cond_mismatch): Don't define.
9456         (lang_f_options): Remove cond-mismatch.
9457         (unsupported_options): Add cond-mismatch.
9458
9459 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
9460
9461         * class.c (handle_using_decl): Reject using of constructor name
9462         of sourcing class. Allow injecting of a method with same name as
9463         nested class. Fixup error messages.
9464
9465 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
9466
9467         * decl2.c (lang_decode_option): Handle -Wformat=2.
9468
9469 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9470
9471         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
9472         initialized_in_class.
9473         (DECL_DEFINED_IN_CLASS_P): Rename to ...
9474         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
9475         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
9476         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
9477         * pt.c (check_default_tmpl_args): Adjust for
9478         DECL_INITIALIZED_IN_CLASS_P.
9479         (instantiate_class_template): Likewise.
9480         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
9481
9482         * class.c (finish_struct): Constify saved_filename.
9483
9484 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9485
9486         * class.c (duplicate_tag_error): Adjust diagnostic.
9487         (finish_struct): Locally set location to start of struct.
9488         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
9489
9490 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9491
9492         * decl.c (struct binding_level): Adjust class_shadowed comments
9493         to reflect reality.
9494         (push_class_level_binding): Adjust comments to reflect reality.
9495         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
9496         Don't set TREE_VALUE on the class_shadowed list.
9497
9498 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9499
9500         * decl2.c (acceptable_java_type): Allow references too.
9501         * init.c (build_java_class_ref): When using the new ABI, search
9502         `class$' and have it mangled with `mangle_decl.'
9503         * mangle.c (write_java_integer_type_codes): New function.
9504         (write_builtin_type): Detect and mangle Java integer and real
9505         types.
9506
9507 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
9508
9509         * decl2.c (grokfield): Don't accept `asm' specifiers for
9510         non-static data members.
9511
9512 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9513
9514         * expr.c (cplus_expand_expr): Don't reset `target'.
9515
9516 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
9517
9518         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
9519
9520 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
9521
9522         * parse.y (template_datadef): Check for error_mark_node.
9523
9524 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
9525
9526         * cp-tree.def (DEFAULT_ARG): Make `x' class.
9527
9528 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
9529
9530         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
9531         (record_builtin_type): Make non-static.
9532         (flag_short_double): Don't declare.
9533         (init_decl_processing): Remove the creation of many tree nodes now
9534         in c_common_nodes_and_builtins.
9535         (build_void_list_node): New function.
9536         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
9537         * cp-tree.h (flag_short_wchar): Don't declare.
9538
9539 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
9540
9541         * call.c (build_conv): Don't use build1 for USER_CONV.
9542         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
9543
9544 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
9545
9546         * lex.c (lang_init): Call c_common_lang_init.
9547
9548 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
9549
9550         * search.c (lookup_fnfields_here): Remove.
9551         (look_for_overrides_r): Use lookup_fnfields_1.
9552         Ignore functions from using declarations.
9553
9554 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
9555
9556         Implement exceptions specifiers for implicit member functions.
9557         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
9558         * method.c (synthesize_exception_spec): New function.
9559         (locate_dtor, locate_ctor, locate_copy): New functions.
9560         (implicitly_declare_fn): Generate the exception spec too.
9561         * search.c (check_final_overrider): Check artificial functions
9562         too.
9563         * typeck2.c (merge_exception_specifiers): New function.
9564
9565 2001-01-03  Jason Merrill  <jason@redhat.com>
9566
9567         * init.c (build_default_init): New fn.
9568         (perform_member_init): Split out from here.
9569         (build_new_1): Use it.  Simplify initialization logic.
9570         (build_vec_init): Take an array, rather than a pointer and maxindex.
9571         Speed up simple initializations.  Don't clean up if we're assigning.
9572         * cp-tree.h: Adjust.
9573         * decl2.c (do_static_initialization): Remove TREE_VEC case.
9574         * parse.y (new_initializer): Return void_zero_node for ().
9575         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
9576         * typeck2.c (digest_init): Only complain about user-written
9577         CONSTRUCTORs.
9578
9579 2000-12-22  Mike Stump  <mrs@wrs.com>
9580
9581         * decl2.c: (max_tinst_depth): Increase to 50.
9582
9583 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
9584
9585         * class.c (invalidate_class_lookup_cache): Zero the
9586         previous_class_values.
9587         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
9588         TREE_INT_CST_HIGH.
9589         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
9590         * decl.c (free_bindings): New variable.
9591         (push_binding): Don't create a new binding if we have one on the
9592         free list.
9593         (pop_binding): Put old bindings on the free list.
9594         (init_decl_processing): Use size_int, not build_int_2.
9595         Register free_bindings as a GC root.
9596         (cp_make_fname_decl): Use size_int, not build_int_2.
9597         (push_inline_template_parms_recursive): Likewise.
9598         (end_template_parm_list): Likewise.
9599         (for_each_template_parm): Do not use walk_tree_without_duplicates.
9600         (tsubst_template_parms): Use size_int, not build_int_2.
9601         (tsubst): Likewise.
9602         * rtti.c (get_vmi_pseudo_type_info): Likewise.
9603
9604 2001-01-02  Richard Henderson  <rth@redhat.com>
9605
9606         * parse.y (asm): Set ASM_INPUT_P.
9607
9608 2001-01-02  Jason Merrill  <jason@redhat.com>
9609
9610         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
9611         for v3 ABI.
9612
9613         * typeck.c (cp_truthvalue_conversion): New fn.
9614         * cvt.c (ocp_convert): Use it.
9615
9616         * cp-tree.h: Lose c-common.c decls.
9617
9618         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
9619         * cvt.c (convert_to_void): Use type_unknown_p.
9620
9621         * typeck.c (strip_all_pointer_quals): Also strip quals from
9622         pointer-to-member types.
9623
9624         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
9625         parse.y as C.
9626
9627         * call.c (build_new_method_call): Do evaluate the object parameter
9628         when accessing a static member.
9629         * typeck.c (build_component_ref): Likewise.
9630
9631 2001-01-02  Andreas Jaeger  <aj@suse.de>
9632
9633         * decl.c (cp_missing_noreturn_ok_p): New.
9634         (init_decl_processing): Set lang_missing_noreturn_ok_p.
9635
9636 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
9637
9638         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
9639
9640 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
9641
9642         * class.c (pushclass): Remove #if 0'd code.
9643         * cp-tree.h (overload_template_name): Remove.
9644         * decl.c (store_bindings): Simplify.
9645         (pop_from_top_level): Likewise.
9646         * pt.c (overload_template_name): Remove.
9647         (instantiate_decl): Don't call push_to_top_level if it's not
9648         needed.
9649
9650 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
9651
9652         * pt.c (register_local_specialization): Don't return a value.
9653         (lookup_template_class): Use move-to-front heuristic when looking
9654         up template instantiations.
9655         (instantiate_decl): Only push_to_top_level when we're actually
9656         going to instantiate the template.
9657
9658 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
9659
9660         * search.c (binfo_for_vtable): Return least derived class, not
9661         most.  Handle secondary vtables.
9662
9663 2000-12-22  Jason Merrill  <jason@redhat.com>
9664
9665         * pt.c (more_specialized): Don't optimize len==0.
9666         (fn_type_unification): If we're adding the return type, increase len.
9667
9668         * typeck.c (build_binary_op): Fix pmf comparison logic.
9669
9670         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
9671         DECL_STATIC_FUNCTION_P.
9672
9673         * semantics.c (genrtl_finish_function): Don't try to jump to
9674         return_label unless it exists.
9675
9676         In partial ordering for a call, ignore parms for which we don't have
9677         a real argument.
9678         * call.c (joust): Pass len to more_specialized.
9679         (add_template_candidate_real): Strip 'this', pass len.
9680         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
9681         (get_bindings_order): New fn.  Pass len down.
9682         (get_bindings_real): Strip 'this', pass len.
9683         (fn_type_unification): Likewise.
9684         (type_unification_real): Succeed after checking 'len' args.
9685         (most_specialized_instantiation): Lose explicit_args parm.
9686         * class.c (resolve_address_of_overloaded_function): Strip 'this',
9687         pass len.
9688
9689 2000-12-21  Jason Merrill  <jason@redhat.com>
9690
9691         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
9692         DECL_TEMPLATE_RESULT.
9693
9694         * search.c (lookup_field_r): Call lookup_fnfields_1, not
9695         lookup_fnfields_here.
9696
9697         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
9698
9699         * call.c (build_object_call): Also allow conversions that return
9700         reference to pointer to function.
9701         (add_conv_candidate): Handle totype being ref to ptr to fn.
9702         (build_field_call): Also allow members of type reference to function.
9703         Lose support for calling pointer to METHOD_TYPE fields.
9704
9705         * error.c (dump_expr): Handle *_CAST_EXPR.
9706
9707         * typeck2.c (build_scoped_ref): Always convert to the naming class.
9708
9709         * tree.c (break_out_cleanups): Lose.
9710         * cp-tree.h: Remove prototype.
9711         * typeck.c (build_component_ref): Don't break_out_cleanups.
9712         (build_compound_expr): Likewise.
9713         * semantics.c (finish_expr_stmt): Likewise.
9714
9715 2000-12-20  Richard Henderson  <rth@redhat.com>
9716
9717         * cp-tree.h: Update declarations.
9718         * decl.c (finish_case_label): Return the new stmt node.
9719         * semantics.c (finish_goto_stmt): Likewise.
9720         (finish_expr_stmt, finish_return_stmt): Likewise.
9721         (finish_break_stmt, finish_continue_stmt): Likewise.
9722         (finish_asm_stmt): Likewise.
9723         * parse.y (already_scoped_stmt): Set STMT_LINENO.
9724         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
9725         (simple_if, simple_stmt): Return the new stmt node.
9726         (save_lineno): New.
9727
9728 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
9729
9730         * cp-tree.h: Don't declare warn_long_long.
9731
9732 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9733
9734         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
9735         IS_AGGR_TYPE.
9736
9737 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9738
9739         * pt.c (unify): Handle when both ARG and PARM are
9740         BOUND_TEMPLATE_TEMPLATE_PARM.
9741
9742 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9743
9744         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
9745         DECL_TEMPLATE_PARM_P.
9746
9747 2000-12-15  Jason Merrill  <jason@redhat.com>
9748
9749         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
9750
9751         * init.c (build_new_1): Don't strip quals from type.
9752
9753         * decl.c (pushdecl): Don't check for linkage on a non-decl.
9754
9755         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
9756
9757         * call.c (build_new_function_call): Lose space before paren in
9758         error message.
9759         (build_new_method_call): Likewise.
9760
9761         * typeck2.c (build_m_component_ref): Propagate quals from datum.
9762
9763 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9764
9765         * pt.c (check_explicit_specialization): Propagate default
9766         function arguments to explicit specializations.
9767
9768 2000-12-13  DJ Delorie  <dj@redhat.com>
9769
9770         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
9771         and <? operators.
9772
9773 2000-12-08  Jason Merrill  <jason@redhat.com>
9774
9775         * error.c (dump_function_name): Don't let the user see __comp_ctor.
9776
9777         Clean up copy-initialization in overloading code.
9778         * call.c (build_user_type_conversion_1): Die if we are asked to
9779         convert to the same or a base type.
9780         (implicit_conversion): Avoid doing so.  Lose reference binding code.
9781         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
9782         direct-initialization.  Also do direct-init part of copy-init.
9783         (build_user_type_conversion): Don't provide context to convert_like.
9784         * cvt.c (ocp_convert): build_user_type_conversion will now provide
9785         the constructor call for copy-init.
9786
9787         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
9788         instantiation of a member template.
9789         (do_decl_instantiation): Not here.
9790
9791 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
9792
9793         * class.c (check_field_decls): Don't special case anonymous
9794         fields in error messages.
9795         (note_name_declared_in_class): Use %D on diagnostic.
9796
9797         * tree.c (pod_type_p): Use strip_array_types.
9798         (cp_valid_lang_attribute): Likewise.
9799         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
9800         multiple evaluations.
9801         (cp_has_mutable_p): Use strip_array_types.
9802
9803 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
9804
9805         * cp-tree.h (sufficient_parms_p): Declare new function.
9806         * call.c (sufficient_parms_p): New function, broken out of ...
9807         (add_function_candidate): ... here. Use it.
9808         (add_conv_candidate): Use it.
9809         * decl.c (grok_ctor_properties): Use it.
9810
9811 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
9812
9813         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
9814
9815 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
9816
9817         * decl2.c (lang_decode_option): Handle -Wformat-security.
9818
9819 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9820
9821         * pt.c (verify_class_unification): New function.
9822         (get_class_bindings): Use it.
9823         (try_class_unification): Tidy.
9824         (unify): Handle when argument of a template-id is not
9825         template parameter dependent.
9826         (template_args_equal): Handle when TREE_CODE's do not match.
9827
9828 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
9829
9830         * lang-specs.h (c++): When invoking the stand-alone preprocessor
9831         for -save-temps, pass all relevant -Defines to it, and then don't
9832         pass them to cc1plus.
9833
9834 2000-12-05  Will Cohen  <wcohen@redhat.com>
9835
9836         * decl.c (finish_case_label): Cleared
9837         more_cleanups_ok in surrounding function scopes.
9838         (define_label): Likewise.
9839
9840 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
9841
9842         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
9843         (get_matching_virtual): Remove.
9844         (look_for_overrides): Declare new function.
9845         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
9846         DECL_VINDEX here.
9847         * class.c (check_for_override): Move base class iteration code
9848         to look_for_overrides.
9849         * search.c (next_baselink): Remove.
9850         (get_virtuals_named_this): Remove.
9851         (get_virtual_destructor): Remove.
9852         (tree_has_any_destructors_p): Remove.
9853         (struct gvnt_info): Remove.
9854         (check_final_overrider): Remove `virtual' from error messages.
9855         (get_matching_virtuals): Remove. Move functionality to ...
9856         (look_for_overrides): ... here, and ...
9857         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
9858         to be overriding.
9859
9860 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
9861
9862         * typeck.c (get_delta_difference): If via a virtual base,
9863         return zero.
9864         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
9865         adjustment.
9866
9867 2000-12-04  Richard Henderson  <rth@redhat.com>
9868
9869         * error.c (dump_tree): Use output_add_string not OB_PUTS.
9870
9871 2000-12-04  Jason Merrill  <jason@redhat.com>
9872
9873         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
9874         (write_builtin_type): Pass intSI_type_node and the like through
9875         type_for_mode.
9876         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
9877         Pass intSI_type_node and the like through type_for_mode.
9878         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
9879         * pt.c (tsubst, unify): Likewise.
9880         * tree.c (walk_tree): Likewise.
9881         * error.c (dump_type): Likewise.
9882         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
9883
9884         * Make-lang.in: Tweak top comment for emacs.
9885         (cp/TAGS): Restore.
9886
9887         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
9888
9889         * class.c (clone_function_decl): Robustify.
9890
9891 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
9892
9893         * decl.c (store_bindings): Only search in the non modified
9894         old_bindings for duplicates.
9895
9896 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
9897
9898         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
9899         TYPE_POLYMORPHIC_P.
9900
9901         * typeck.c (build_static_cast): Remove unused variable.
9902
9903 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9904
9905         * pt.c: Fix typo in comment.
9906
9907 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
9908
9909         * decl2.c (warn_format): Remove definition.
9910         (lang_decode_option): Handle -Wformat-nonliteral,
9911         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
9912
9913 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
9914
9915         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
9916         (init_decl_processing): Don't create string_type_node,
9917         const_string_type_node, wint_type_node, intmax_type_node,
9918         uintmax_type_node, default_function_type, ptrdiff_type_node and
9919         unsigned_ptrdiff_type_node.  Adjust position of call to
9920         c_common_nodes_and_builtins.
9921         (identifier_global_value): New function.
9922
9923 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
9924
9925         * call.c (standard_conversion): Reject pointer to member
9926         conversions from ambiguous, inaccessible or virtual bases.
9927         * typeck.c (build_static_cast): Don't check pointers to members
9928         specially.
9929
9930 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
9931
9932         * method.c (do_build_copy_constructor): Preserve cv
9933         qualifications when accessing source object members.
9934         (do_build_assign_ref): Likewise. Remove separate diagnostics for
9935         unnamed fields.
9936
9937 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
9938
9939         * method.c (do_build_assign_ref): Construct appropriately
9940         CV-qualified base reference. Don't allow const casts in base
9941         conversion.
9942
9943 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
9944
9945         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
9946         incomplete return type.
9947
9948 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9949
9950         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
9951         * semantics.c (finish_base_specifier): Accept a _TYPE not a
9952         _DECL.
9953
9954 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9955
9956         * spew.c (yyerror): Cope if yylval.ttype is NULL.
9957
9958 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9959
9960         * decl.c (grokdeclarator): Diagnose undefined template contexts.
9961
9962 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9963
9964         * decl.c (grokdeclarator): Do type access control on friend
9965         class.
9966
9967 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
9968
9969         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
9970         bison parser ickiness.
9971         * pt.c (tsubst_friend_function): Enter namespace scope when
9972         tsubsting the function name.
9973         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
9974
9975 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
9976
9977         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
9978         * cvt.c (cp_convert_to_pointer): Add force parameter.
9979         Allow conversions via virtual base if forced.
9980         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
9981         (ocp_convert): Likewise.
9982         * search.c (binfo_from_vbase): Return the virtual base's binfo.
9983         * typeck.c (get_delta_difference): Adjust handling of virtual
9984         bases.
9985
9986 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
9987
9988         * tree.c (struct list_hash): Remove.
9989         (list_hash_table): Make it be an htab.
9990         (struct list_proxy): New type.
9991         (list_hash_eq): New function.
9992         (list_hash_pieces): Renamed from ...
9993         (list_hash): ... this.
9994         (list_hash_lookup): Remove.
9995         (list_hash_add): Remove.
9996         (hash_tree_cons): Use the generic hashtable.
9997         (mark_list_hash): Remove.
9998         (init_tree): Create the hashtable.
9999
10000 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
10001
10002         * method.c (build_mangled_C9x_name): Rename to
10003         build_mangled_C99_name.  Change C9X references in comments to
10004         refer to C99.
10005
10006 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
10007
10008         * parse.y (unary_expr): Move VA_ARG from here ...
10009         (primary): ... to here.
10010
10011 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
10012
10013         * semantics.c (finish_id_expr): If type is error_mark, return
10014         error_mark.
10015
10016 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
10017
10018         * pt.c (lookup_template_class): Simplify loop exit constructs.
10019         Cope when there is no partial instantiation of a template
10020         template member.
10021
10022 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
10023
10024         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
10025
10026 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
10027
10028         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
10029         prefix.
10030
10031         * pt.c (do_decl_instantiate): Explicitly clone constructors and
10032         destructors that haven't already been cloned.
10033
10034 2000-11-20  Richard Henderson  <rth@redhat.com>
10035
10036         * parse.y (yyparse_1): Rename the parser entry point.
10037
10038 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
10039
10040         * mangle.c (write_name): Use <unscoped-name> for names directly in
10041         function scope.
10042         (write_unscoped_name): Accept names directly in function scope.
10043
10044 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
10045
10046         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
10047         * parse.y (extdef): Add EXPORT reduction.
10048         * spew.c (yylex): Don't skip export here.
10049
10050 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
10051
10052         * decl.c (init_decl_processing): Correct name of pure virtual
10053         function under the new ABI.
10054         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
10055         (throw_bad_typeid): Likewise for bad typeid function.
10056
10057 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
10058
10059         * decl.c (grokparms): Don't even function types of `void' type,
10060         either.
10061         * mangle.c (write_type): Don't crash when confronted with the
10062         error_mark_node.
10063
10064         * decl.c (grokparms): Don't create parameters of `void' type.
10065
10066 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
10067
10068         * lex.c (mark_impl_file_chain): Delete.
10069         (init_parse): Remove call to ggc_add_string_root.  No need to
10070         ggc_strdup a string constant.  Do not add impl_file_chain to GC
10071         roots.
10072         (handle_pragma_implementation): No need to ggc_strdup main_filename.
10073
10074 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10075
10076         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
10077
10078 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10079
10080         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
10081         * decl.c (grokdeclarator): Don't reject void parms here.
10082         (require_complete_types_for_parms): Simplify, use
10083         complete_type_or_else.
10084         (grokparms): Remove bitrot. Remove funcdef parm.
10085         Deal with ellipsis parm lists here.
10086         * semantics.c (finish_parmlist): Don't append void_list_node
10087         here. Set PARMLIST_ELLIPSIS_P.
10088
10089 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10090
10091         * typeck2.c (incomplete_type_error): Reorganize to avoid
10092         excessive diagnostics.
10093
10094 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
10095
10096         * lex.c (struct impl_files, internal_filename): Constify a char *.
10097
10098 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
10099
10100         * mangle.c (write_special_name_constructor): Don't generate
10101         assembler junk when confronted with an old-style constructor.
10102         (write_special_name_destructor): Likewise.
10103         (mangle_decl_string): Do it here instead.
10104
10105 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
10106
10107         * call.c (op_error): Make error messages clearer.
10108
10109 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
10110
10111         * decl.c (wrapup_globals_for_namespace): Don't mark things
10112         TREE_ASM_WRITTEN when they're not.
10113
10114 2000-11-15  Jason Merrill  <jason@redhat.com>
10115
10116         * typeck2.c (friendly_abort): Uncount the error before handing
10117         off to fancy_abort.
10118
10119 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
10120
10121         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
10122
10123 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
10124
10125         * class.c (build_vtbl_initializer): Fix typo in comment.
10126         * typeck.c (expr_sizeof): Don't crash on errors.
10127
10128 2000-11-14  Jim Wilson  <wilson@redhat.com>
10129
10130         * lang-specs.h: Add %2 after %(cc1_options).
10131
10132 2000-11-14  Richard Henderson  <rth@redhat.com>
10133
10134         * typeck.c (c_sizeof): Be strict about casting result value
10135         back to c_size_type_node.
10136         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
10137
10138 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10139
10140         * typeck.c (build_unary_op): Use boolean_increment from
10141         c-common.c, moving the relevant code there.
10142
10143 2000-11-11  Jason Merrill  <jason@redhat.com>
10144
10145         * typeck.c (mark_addressable): Don't call put_var_into_stack.
10146
10147         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
10148         in inlines.
10149
10150 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10151
10152         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
10153         * lex.c (copy_lang_decl): Likewise.
10154
10155 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
10156
10157         * dump.c (cp_dump_tree): Don't dump function bodies here.
10158
10159         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
10160         (dump.o): Update dependency list.
10161         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
10162         (flag_dump_translation_unit): Likewise.
10163         (CP_TYPE_QUALS): Adjust definition.
10164         (DECL_C_BIT_FIELD): Remove.
10165         (SET_DECL_C_BIT_FIELD): Likewise.
10166         (CLEAR_DECL_C_BIT_FIELD): Likewise.
10167         (add_maybe_template): Likewise.
10168         (strip_array_types): Likewise.
10169         (dump_node_to_file): Likewise.
10170         (cp_dump_tree): New function.
10171         * decl.c (init_decl_processing): Set lang_dump_tree.
10172         * decl2.c (flag_dump_translation_unit): Remove.
10173         * dump.c: Move most of it to ../c-dump.c.
10174         (cp_dump_tree): New function.
10175         * pt.c (add_maybe_template): Remove.
10176         * typeck.c (strip_array_types): Likewise.
10177
10178 2000-11-07  Eric Christopher  <echristo@redhat.com>
10179
10180         * decl.c (init_decl_processing): Change definition of
10181         __wchar_t to wchar_t.  Remove artificial declaration of
10182         wchar_t.
10183         * lex.c: Change instances of __wchar_t to wchar_t.
10184
10185 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
10186
10187         * lex.c (do_identifier): Don't lookup_name for operators.
10188         * parse.y (operator): Save looking_for_typename.
10189         (unoperator): Restore it.
10190         * spew.c (frob_opname): Use nth_token for lookahead.
10191
10192 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
10193
10194         * decl.c (grok_op_properties): Always use coerce_new_type and
10195         coerce_delete_type.
10196         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
10197         exception specification. Tidy up.
10198         (coerce_delete_type): Preserve exception specification. Tidy up.
10199
10200 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10201
10202         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
10203         (push_binding_level), error.c (cp_tree_printer), pt.c
10204         (process_partial_specialization, tsubst_template_arg_vector),
10205         search.c (lookup_member): Use memset () instead of bzero ().
10206
10207 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
10208
10209         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
10210
10211 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
10212
10213         * Make-lang.in (c++.distdir): Remove.
10214
10215 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
10216
10217         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
10218         declarations from different namespaces to be combined.
10219
10220 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
10221
10222         * decl.c: Include tm_p.h.
10223
10224 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
10225
10226         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
10227
10228 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10229
10230         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
10231         (build_overload_value), repo.c (open_repo_file), xref.c
10232         (open_xref_file): Use strchr () and strrchr () instead of index ()
10233         and rindex ().
10234
10235 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
10236
10237         * call.c (build_over_call): Call fold on the CALL_EXPR.
10238
10239 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
10240
10241         * error.c (dump_template_decl): Separate template hearders with
10242         space not comma.
10243
10244 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
10245
10246         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
10247         TS_* flags with corresponding TFF_*.  Adjust prototypes of
10248         functions (which used to take a tree_string_flags) to take an int.
10249
10250         * cp-tree.h (enum tree_string_flags): Remove
10251         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
10252         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
10253         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
10254         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
10255         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
10256         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
10257         (type_as_string, decl_as_string, expr_as_string,
10258         context_as_string): Adjust prototype.
10259
10260         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
10261         instead of TS_PLAIN.
10262
10263         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
10264         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
10265         plain `0'.
10266
10267 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
10268
10269         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
10270         (linkage_kind): New enumeration.
10271         (decl_linkage): New function.
10272         * decl2.c (comdat_linkage): Extend comment.
10273         * error.c (dump_function_decl): Print the arguments used to
10274         instantiate a template, even when not printing the type of the
10275         function.
10276         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
10277         not TREE_PUBLIC, to test for external linkage.
10278         * tree.c (decl_linkage): New function.
10279
10280 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
10281
10282         * pt.c (instantiate_decl): Always instantiate static data members
10283         initialized in-class.
10284
10285 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
10286
10287         * Make-lang.in: Move all build rules here from Makefile.in,
10288         adapt to new context.  Wrap all rules that change the current
10289         directory in parentheses.  Expunge all references to $(P).
10290         When one command depends on another and they're run all at
10291         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
10292         all object-file generation rules.  Delete obsolete variables.
10293
10294         * Makefile.in: Delete.
10295         * config-lang.in: Delete outputs= line.
10296
10297 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10298
10299         * error.c (dump_function_decl): Print no space between
10300         `ptr-operator' the `type-specifier' of the return type.
10301         (dump_type_prefix): Make sure we put space at the appropriate
10302         place.
10303
10304 2000-10-23  Jason Merrill  <jason@redhat.com>
10305
10306         * call.c (equal_functions): Also call decls_match for extern "C" fns.
10307
10308 2000-10-22  Jason Merrill  <jason@redhat.com>
10309
10310         * call.c (build_conditional_expr): Use ocp_convert to force
10311         rvalue conversion.
10312
10313 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
10314
10315         * call.c (standard_conversion): Use RVALUE_CONVs for all
10316         expressions that satisfy lvalue_p, not just those that satisfy
10317         real_lvalue_p.
10318
10319         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
10320
10321         * typeck.c (c_sizeof): Return an expression of `size_t' type,
10322         not one with TYPE_IS_SIZETYPE set.
10323         (dubious_conversion_warnings): Remove special-case code.
10324
10325 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
10326
10327         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
10328         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
10329         (dump_type_prefix): Print vector-of-int as 'int vector'.
10330         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
10331         * tree.c (walk_tree): Handle VECTOR_TYPE.
10332
10333         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
10334
10335 2000-10-21  Jason Merrill  <jason@redhat.com>
10336
10337         * parse.y (operator): Set got_object from got_scope.
10338         Set looking_for_typename.
10339         * decl.c (lookup_name_real): Clear val after setting from_obj.
10340         Reorganize diagnostic.
10341
10342 2000-10-20  Jason Merrill  <jason@redhat.com>
10343
10344         * tree.c (walk_tree): Don't walk into default args.
10345
10346         * error.c (dump_expr): Use host_integerp.
10347
10348 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
10349
10350         * typeck2.c (abstract_virtuals_error): Use "because" instead of
10351         "since" in error message.
10352
10353 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10354
10355         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
10356
10357 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
10358
10359         * decl.c (revert_static_member_fn): Fixed typo.
10360
10361 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
10362
10363         * class.c (subobject_offset_fn): New type.
10364         (dfs_record_base_offsets): Remove.
10365         (record_base_offsets): Likewise.
10366         (dfs_search_base_offsets): Likewise.
10367         (record_subobject_offset): New function.
10368         (check_subobject_offset): Likewise.
10369         (walk_subobject_offsets): Likewise.
10370         (record_subobject_offsets): Likewise.
10371         (layout_conflict_p): Reimplement.
10372         (layout_nonempty_base_or_field): Correct handling of type
10373         conflicts during layout.
10374         (layout_empty_base): Likewise.
10375         (build_base_field): Adjust to handle new representation of empty
10376         base offset table.
10377         (build_base_fields): Likewise.
10378         (layout_virtual_bases): Likewise.
10379         (splay_tree_compare_integer_csts): New function.
10380         (layout_class_type): Use a splay_tree, rather than a varray, to
10381         represent the offsets of empty bases.
10382
10383         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
10384         * decl.c (select_decl): Don't return declarations that are
10385         DECL_ANTICIPATED.
10386
10387 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
10388
10389         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
10390         (fake_std_node): New macro.
10391         * decl.c (in_std): Rename to ...
10392         (in_fake_std): ... this.
10393         (flag_no_builtin): Remove.
10394         (flag_no_nonansi_builtin): Likewise.
10395         (walk_namespaces_r): Use fake_std_node.
10396         (push_namespace): Use std_identifier.
10397         (pop_namespace): Use in_fake_std.
10398         (lookup_name_real): Use fake_std_node.
10399         (init_decl_processing): When -fhonor-std, create the `std'
10400         namespace.  Don't create a dummy fake_std_node in that case.
10401         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
10402         (builtin_function): Put builtins whose names don't begin
10403         with `_' in the std namespace.
10404         * decl2.c (flag_no_builtin): Remove.
10405         (flag_no_nonansi_builtin): Likewise.
10406         (set_decl_namespace): Use fake_std_node.
10407         (validate_nonmember_using_decl): Likewise.
10408         (do_using_directive): Likewise.
10409         (handle_class_head): Likewise.
10410         * dump.c (dequeue_and_dump): Likewise.
10411         * except.c (init_exception_processing): Use std_identifier.
10412         * init.c (build_member_call): Use fake_std_node.
10413         * rtti.c (init_rtti_processing): Use std_identifier.
10414
10415 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
10416
10417         * cp-tree.h (back_end_hook): Remove declaration.
10418         * decl2.c (back_end_hook): Remove definition.
10419
10420         * dump.c (dequeue_and_dump): Dump TREE_USED.
10421
10422 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
10423
10424         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
10425
10426 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
10427
10428         * decl.c (WINT_TYPE): Define.
10429         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
10430         c_size_type_node, signed_size_type_node and wint_type_node.
10431
10432 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
10433
10434         * decl2.c (warn_missing_format_attribute): New variable.
10435         (lang_decode_option): Decode -Wmissing-format-attribute.
10436
10437 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
10438
10439         * typeck.c (qualify_type): Remove.
10440         (composite_pointer_type): Fix handling of conversions to `cv void*'.
10441
10442 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10443
10444         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
10445
10446 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10447
10448         * Makefile.in (parse.c, parse.h): Create atomically.
10449
10450 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
10451
10452         * class.c (current_obstack): Remove.
10453         * decl.c (ggc_p): Remove.
10454         (start_decl): Don't use decl_tree_cons.
10455         (grokdeclarator): Don't use build_decl_list.
10456         (start_function): Don't use decl_tree_cons.
10457         (finish_function): Don't mess with obstacks.
10458         * decl2.c (grok_x_components): Don't use build_decl_list.
10459         * lex.c (make_call_declarator): Don't call decl_tree_cons.
10460         (implicitly_declare_fn): Don't call build_decl_list.
10461         * parse.y (frob_specs): Don't call build_decl_list or
10462         decl_tree_cons.
10463         (expr_or_declarator_intern): Don't call decl_tree_cons.
10464         (primary): Don't call build_decl_list.
10465         (fcast_or_absdcl): Likewise.
10466         (typed_declspecs): Don't call decl_tree_cons.
10467         (reserved_declspecs): Don't call build_decl_list.
10468         (declmods): Likewise.
10469         (reserved_typespecquals): Likewise.
10470         (aggr): Likewise.
10471         (new_type_id): Likewise.
10472         (cv_qualifiers): Likewise.
10473         (after_type_declarator_intern): Likewise.
10474         (notype_declarator_intern): Likewise.
10475         (absdcl_intern): Likewise.
10476         (named_parm): Likewise.
10477         * pt.c (most_specialized_class): Likewise.
10478         * repo.c (temporary_obstack): Make it a structure, not a pointer.
10479         (init_repo): Initialize it.
10480         * search.c (current_obstack): Remove.
10481         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
10482
10483 2000-10-09  Richard Henderson  <rth@cygnus.com>
10484
10485         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
10486         (c++ language support bits for libgcc): Remove.
10487         (c++.clean): Remove cplib2.txt cleanup.
10488         * config-lang.in (headers, lib2funcs): Remove.
10489
10490         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
10491         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
10492         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
10493         * inc/new.h, inc/typeinfo: Remove files.
10494
10495 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10496
10497         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
10498         defined.
10499         (init_decl_processing): Initialize intmax_type_node and
10500         uintmax_type_node.
10501
10502 2000-10-06  Richard Henderson  <rth@cygnus.com>
10503
10504         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
10505         (original_result_rtx): Remove.
10506         * decl.c (save_function_data): Don't clear x_result_rtx.
10507         (mark_lang_function): Don't mark it either.
10508         * expr.c (fixup_result_decl): Remove.
10509         * semantics.c (genrtl_named_return_value): Frob the return decl
10510         before calling emit_local_var.
10511         (genrtl_finish_function): Don't call fixup_result_decl.
10512         Always emit the jump to return_label.
10513
10514 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
10515
10516         * pt.c (lookup_template_class): Set current access for enum.
10517         (tsubst_enum): Set file & line for enum decl.
10518
10519         * spew.c (yylex): Remove unused variable.
10520
10521 2000-10-05  Richard Henderson  <rth@cygnus.com>
10522
10523         * semantics.c (genrtl_finish_function): Don't init or check
10524         can_reach_end; remove noreturn and return value checks.
10525
10526 2000-10-05  Tom Tromey  <tromey@cygnus.com>
10527
10528         * init.c (build_java_class_ref): Use `build_static_name' with a
10529         suffix, not a prefix, to build the class object's name.
10530
10531 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10532
10533         * cp-tree.h (access_kind): Fix comment typo.
10534         * decl2.c (grokfield): Fix diagnostic typo.
10535         * semantics.c (finish_template_type): Fix comment typo.
10536         (finish_qualified_object_call_expr): Likewise.
10537
10538 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10539
10540         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
10541         tsubsting fails.
10542
10543 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10544
10545         * spew.c (frob_id): New static function.
10546         (frob_opname): Use it.
10547         (yylex): Use it.
10548
10549 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
10550
10551         * decl.c (lang_mark_false_label_stack): Remove.
10552         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
10553
10554 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
10555
10556         * gxxint.texi: Use @email for formatting email addresses.
10557
10558 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
10559
10560         * error.c: Remove direct obstack manipulation.  Replace with
10561         output_buffer-based formatting.  Adjust calls to removed macros.
10562         (obstack_chunk_alloc, obstack_chunk_free): Remove.
10563         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
10564         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
10565
10566 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
10567
10568         * ir.texi: Move to ../c-tree.texi.
10569
10570 2000-09-20  Jason Merrill  <jason@redhat.com>
10571
10572         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
10573
10574 2000-09-21  Andreas Jaeger  <aj@suse.de>
10575
10576         * errfn.c: Move declaration of cp_printer and cp_printers to ...
10577         * cp-tree.h: ... here.
10578
10579         * error.c: Remove declaration of cp_printer.
10580
10581 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
10582
10583         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
10584
10585 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
10586
10587         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
10588         users.
10589
10590 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
10591
10592         * decl.c (start_function): Robustify.
10593
10594 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10595
10596         * cp-tree.h (check_function_format): Accept a `status' parameter.
10597
10598         * call.c, typeck.c: Updates calls to `check_function_format'.
10599
10600 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
10601
10602         * decl2.c (handle_class_head): Always push some scope even
10603         in the error case.
10604
10605 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
10606
10607         * cp-tree.h (struct cp_language_function): Remove
10608         x_scope_stmt_stack and name_declared.
10609         (current_scope_stmt_stack): Remove.
10610         (function_name_declared_p): New macro.
10611         (struct lang_decl_flags): Use c_lang_decl as a base class.
10612         (context): Remove.
10613         (struct lang_decl): Replace saved_tree with context.
10614         (DECL_FRIEND_CONTEXT): Adjust accordingly.
10615         (SET_DECL_FRIEND_CONTEXT): Likewise.
10616         (DECL_VIRTUAL_CONTEXT): Likewise.
10617         (DECL_SAVED_TREE): Remove.
10618         (C_DECLARED_LABEL_FLAG): Likewise.
10619         (cplus_expand_expr_stmt): Don't declare.
10620         (add_decl_stmt): Likewise.
10621         (add_scope_stmt): Likewise.
10622         * decl.c (mark_stmt_tree): Remove.
10623         (case_compare): Likewise.
10624         (finish_case_label): Use c_add_case_label.
10625         (init_decl_processing): Set more language-specific hooks.
10626         (build_enumerator): Fix typo in comment.
10627         (cplus_expand_expr_stmt): Remove.
10628         (mark_lang_function): Use mark_c_language_function.
10629         (lang_mark_tree): Use c_mark_lang_decl.
10630         * decl2.c: Change order of inclusion.
10631         * except.c: Likewise.
10632         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
10633         back on c_expand_expr.
10634         * friend.c: Include expr.h.
10635         * init.c: Change order of inclusion.
10636         * Makefile.in: Update dependencies.
10637         * lex.h (free_lang_decl_chain): Remove.
10638         * optimize.c (maybe_clone_body): Use function_name_declared_p.
10639         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
10640         it doesn't exist.
10641         (instantiate_decl): Use function_name_declared_p.
10642         * semantics.c (lang_expand_expr_stmt): Remove.
10643         (set_current_function_name_declared): Likewise.
10644         (current_function_name_declared): Likewise.
10645         (begin_compound_stmt): Use function_name_declared_p.
10646         (add_decl_stmt): Remove.
10647         (setup_vtbl_ptr): Use function_name_declared_p.
10648         (add_scope_stmt): Remove.
10649         (current_scope_stmt_stack): New function.
10650         (cp_expand_stmt): Don't handle SCOPE_STMTs.
10651         (expand_body): Use function_name_declared_p.
10652         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
10653         * typeck.c: Change order of includes.
10654         (convert_sequence): Remove.
10655
10656 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
10657
10658         * lex.c (reswords): Add _Complex.
10659
10660 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10661
10662         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
10663
10664 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
10665
10666         * init.c (begin_init_stmts): Don't use // comments.
10667
10668 2000-09-12  Jason Merrill  <jason@redhat.com>
10669
10670         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
10671         all non-extern arrays.
10672
10673         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
10674         typenames, too.  Downgrade complaint to pedwarn.
10675         (xref_tag): Warn about surprising behavior of 'friend struct T'.
10676         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
10677         'class This::Inherited'.
10678
10679 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
10680
10681         * decl.c (finish_case_label): Given the LABEL_DECL a
10682         DECL_CONTEXT.
10683
10684 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
10685
10686         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
10687         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
10688         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
10689         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
10690         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
10691         New macros.
10692         (sorry_for_unsupported_tree, print_scope_operator,
10693         print_left_paren, print_right_paren, print_left_bracket,
10694         print_right_bracket, print_whitespace): Likewise.
10695         (aggr_variety): Rename to class_key_or_enum.
10696         (print_type): Rename to print_type_id.
10697         (print_type_specifier_seq, print_simple_type_specifier,
10698         print_elaborated_type_specifier,
10699         print_rest_of_abstract_declarator,
10700         print_parameter_declaration_clause, print_exception_specification,
10701         print_nested_name_specifier, print_template_id,
10702         typedef_original_name,  print_template_argument_list_start,
10703         print_template_argument_list_end): New functions.
10704
10705 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
10706
10707         * ir.texi: Add more documentation.
10708
10709 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
10710
10711         * cp-tree.h (struct saved_scope): Remove x_function_parms.
10712         (current_function_parms): Don't define.
10713         (struct cp_language_function): Remove parms_stored.
10714         (current_function_just_assigned_this): Don't define.
10715         (current_function_parms_stored): Likewise.
10716         (static_ctors): Declare.
10717         (static_dtors): Likewise.
10718         (SF_EXPAND): Don't define.
10719         (expand_start_early_try_stmts): Remove declaration.
10720         (store_parm_decls): Likewise.
10721         * decl.c (static_ctors): Don't declare.
10722         (static_dtors): Likewise.
10723         (struct binding_level): Remove this_block.
10724         (poplevel): Remove dead code.
10725         (set_block): Likewise.
10726         (mark_binding_level): Don't mark this_block.
10727         (mark_saved_scope): Don't mark x_function_parms.
10728         (init_decl_processing): Don't add current_function_parms as a GC
10729         root.
10730         (check_function_type): Change prototype.
10731         (start_function): Remove RTL-generation code.
10732         (expand_start_early_try_stmts): Remove.
10733         (store_parm_decls): Give it internal linkage.  Remove
10734         RTL-generation code.
10735         (finish_function): Remove RTL-generation code.
10736         * decl2.c (static_ctors): Fix formatting.
10737         (static_dtors): Likewise.
10738         * method.c (use_thunk): Don't call store_parm_decls.
10739         (synthesize_method): Likewise.
10740         * optimize.c (maybe_clone_body): Likewise.
10741         * parse.y (fn.def2): Likewise.
10742         (.set_base_init): Likewise.
10743         (nodecls): Likewise.
10744         * pt.c (instantiate_decl): Likewise.
10745         * rtti.c (synthesize_tinfo_fn): Likewise.
10746         * semantics.c (genrtl_try_block): Simplify.
10747         (expand_body): Use genrtl_start_function and
10748         genrtl_finish_function.
10749         (genrtl_start_function): New function.
10750         (genrtl_finish_function): Likewise.
10751
10752 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
10753
10754         * error.c (cp_tree_printer, case 'P'): Append break.
10755
10756 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
10757
10758         * cp-tree.h (frob_opname): Declare.
10759         * parse.y (saved_scopes): New static variable.
10760         (cp_parse_init): Adjust.
10761         (do_id): If lastiddecl is NULL, do do_identifier.
10762         (operator): Save scope information.
10763         (unoperator): New reduction. Restore scope information.
10764         (operator_name): Append unoperator. Call frob_opname.
10765         * spew.c (frob_opname): Define.
10766
10767 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
10768
10769         * decl.c, rtti.c: Include defaults.h if not already included.
10770         Don't define the *_TYPE_SIZE macros.
10771
10772 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
10773
10774         * cp-tree.h (push_switch): Change prototype.
10775         (check_cp_case_value): Remove declaration.
10776         (decl_constant_value): Likewise.
10777         * decl.c (struct cp_switch): Add switch_stmt and cases.
10778         (case_compare): New function.
10779         (push_switch): Set switch_stmt.  Initialize cases.
10780         (pop_switch): Clean up cases.
10781         (define_case_label): Rename to ...
10782         (finish_case_label): ... this.  Do semantic analysis for case
10783         labels here.
10784         (start_function): Correct comment.
10785         * decl2.c (check_cp_case_value): Remove.
10786         * expr.c (do_case): Remove.
10787         * pt.c (tsubst_expr): Adjust call to finish_case_label.
10788         * semantics.c (genrtl_do_poplevel): Remove declaration.
10789         (RECHAIN_STMTS): Remove.
10790         (finish_break_stmt): Use build_break_stmt.
10791         (finish_continue_stmt): Use build_continue_stmt.
10792         (finish_switch_cond): Adjust condition here, rater than in
10793         c_expand_start_case.
10794         (finish_case_label): Remove.
10795         * typeck.c (c_expand_return): Remove.
10796         (c_expand_start_case): Likewise.
10797
10798 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
10799
10800         * ir.texi: Document type nodes.
10801
10802 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
10803
10804         * cp-tree.h (init_cp_semantics): Declare.
10805         (genrtl_try_block): Don't declare.
10806         (genrtl_handler): Likewise.
10807         (genrtl_catch_block): Likewise.
10808         (genrtl_ctor_stmt): Likewise.
10809         (genrtl_subobject): Likewise.
10810         (genrtl_do_poplevel): Likewise.
10811         (genrtl_named_return_value): Likewise.
10812         * lex.c (init_parse): Call init_cp_semantics.
10813         * semantics.c (genrtl_try_block): Give it internal linkage.
10814         (genrtl_handler): Likewise.
10815         (genrtl_catch_block): Likewise.
10816         (genrtl_ctor_stmt): Likewise.
10817         (genrtl_subobject): Likewise.
10818         (genrtl_do_poplevel): Likewise.
10819         (genrtl_named_return_value): Likewise.
10820         (lang_expand_stmt): Rename to ...
10821         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
10822         (init_cp_semantics): Define.
10823
10824         * decl.c (initialize_local_var): Remove RTL-generating code.
10825         * semantics.c (genrtl_try_block): Fix formatting.
10826
10827         Move statement-tree facilities from C++ to C front-end.
10828         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
10829         (void_zero_node): Remove.
10830         (stmt_tree): Likewise.
10831         (scope_chain): Adjust.
10832         (language_function): Rename to cp_language_function.
10833         (cp_function_chain): Adjust.
10834         (current_stmt_tree): Remove.
10835         (last_tree): Likewise.
10836         (last_expr_type): Likewise.
10837         (struct lang_decl): Adjust.
10838         (STMT_IS_FULL_EXPR_P): Remove.
10839         (add_tree): Remove.
10840         (begin_stmt_tree): Likewise.
10841         (finish_stmt_tree): Likewise.
10842         (walk_tree_fn): Likewise.
10843         (walk_stmt_tree): Likewise.
10844         * class.c (finish_struct): Replace use of add_tree with add_stmt.
10845         * decl.c (mark_stmt_tree): Adjust type.
10846         (init_decl_processing): Don't build void_zero_node.
10847         (initialize_local_var): Adjust usage of current_stmt_tree.
10848         (finish_enum): Use add_stmt, not add_tree.
10849         (save_function_data): Adjust use of language_function.
10850         (finish_constructor_body): Use add_stmt, not add_tree.
10851         (finish_destructor_body): Likewise.
10852         (push_cp_function_context): Adjust use of language_function.
10853         (pop_cp_function_context): Likewise.
10854         (mark_lang_function): Likewise.
10855         (mark_cp_function_context): Likewise.
10856         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
10857         (build_vec_init): Likewise.
10858         * semantics.c (SET_LAST_STMT): Remove.
10859         (RECHAIN_STMTS): Don't use it.
10860         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
10861         (current_stmt_tree): Define.
10862         (add_tree): Remove.
10863         (finish_goto_stmt): Use add_stmt, not add_tree.
10864         (finish_expr_stmt): Likewise.
10865         (begin_if_stmt): Likewise.
10866         (finish_then_clause): Likewise.
10867         (begin_while_stmt): Likewise.
10868         (begin_do_stmt): Likewise.
10869         (finish_return_stmt): Likewise.
10870         (begin_for_stmt): Likewise.
10871         (finish_break_stmt): Likewise.
10872         (finish_continue_stmt): Likewise.
10873         (begin_switch_stmt): Likewise.
10874         (finish_case_label): Likewise.
10875         (begin_try_block): Likewise.
10876         (begin_function_try_block): Likewise.
10877         (begin_handler): Likewise.
10878         (begin_catch_block): Likewise.
10879         (begin_compound_stmt): Likewise.
10880         (begin_asm_stmt): Likewise.
10881         (finish_asm_stmt): Likewise.
10882         (finish_label_stmt): Likewise.
10883         (add_decl_stmt): Likewise.
10884         (finish_subobject): Likewise.
10885         (finish_decl_cleanup): Likewise.
10886         (finish_named_return_value): Likewise.
10887         (setup_vtbl_ptr): Likewise.
10888         (add_scope_stmt): Likewise.
10889         (finish_stmt_expr): Likewise.
10890         (prune_unused_decls): Remove.
10891         (begin_stmt_tree): Likewise.
10892         (finish_stmt_tree): Likewise.
10893         (prep_stmt): Adjust use of current_stmt_tree.
10894         (lang_expand_stmt): Likewise.
10895         * tree.c (statement_code_p): Remove.
10896         (cp_statement_code_p): New function.
10897         (walk_stmt_tree): Remove.
10898         (init_tree): Set lang_statement_code_p.
10899
10900 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
10901
10902         Integrated preprocessor.
10903
10904         * Make-lang.in, Makefile.in: Remove all references to input.c,
10905         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
10906         * gxx.gperf, hash.h, input.c: Delete.
10907         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
10908         initialized properly.
10909
10910         * class.c (fixup_pending_inline): Take a tree, not a
10911         struct pending_inline *.  All callers changed.
10912         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
10913         RID_PROTECTED entries in ridpointers[] array here.
10914         * decl.c (duplicate_decls): Do not refer to struct
10915         pending_inline.
10916         (record_builtin_type, init_decl_processing): Use RID_MAX not
10917         CP_RID_MAX.
10918         (grokdeclarator): Use C_IS_RESERVED_WORD.
10919         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
10920         cpplib.
10921         (grok_x_components): Do not inspect pending_inlines chain.
10922
10923         * cp-tree.h (struct lang_identifier): Add rid_code entry.
10924         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
10925         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
10926         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
10927         TIME_IDENTIFIER_FILEINFO): Kill.
10928         Update prototypes.
10929         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
10930         single 32-bit word.
10931         * parse.y: Call do_pending_inlines unconditionally.
10932         reinit_parse_for_method is now snarf_method.  fn.defpen is no
10933         longer necessary.  Remove unnecessary <itype> annotation on
10934         SCOPE.  Do not refer to end_of_file or struct pending_inline.
10935         * semantics.c (begin_inline_definitions): Call
10936         do_pending_inlines unconditionally.
10937
10938         * lex.c: Remove all code now shared with C front end.
10939         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
10940         into the get_identifier table.  Rewrite pragma handling to
10941         work with the registry.  Move code to save tokens for later
10942         processing to spew.c.
10943
10944         * spew.c: Rewrite everything in terms of token streams instead
10945         of text.  Move routines here from lex.c / input.c as
10946         appropriate.  GC-mark trees hanging off the pending inlines
10947         chain.
10948
10949 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
10950
10951         * NEWS: Mention that the named return value extension has been
10952         deprecated.
10953         * cp-tree.h (original_result_rtx): Define.
10954         (TREE_REFERENCE_EXPR): Remove.
10955         (DECL_VPARENT): Likewise.
10956         (pushdecl_nonclass_level): Likewise.
10957         (store_return_init): Likewise.
10958         (reinit_lang_specific): Likewise.
10959         (genrtl_named_return_value): Change prototype.
10960         * decl.c (original_result_rtx): Remove.
10961         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
10962         Do not generate RTL for local variables here.
10963         (store_return_init): Remove.
10964         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
10965         store_return_init.
10966         (finish_named_return_value): Adjust accordingly.  Warn that this
10967         extension is deprecated.
10968         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
10969
10970 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10971
10972         * pt.c (type_unification_real): Replace switch with if.
10973         (unify): Tsubst non-type parms before comparing.
10974
10975 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10976
10977         * error.c (dump_typename): New function, broken out of ...
10978         (dump_type): ... here. Use it.
10979         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
10980
10981 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10982
10983         * init.c (build_offset_ref): Deal with namespace scoped
10984         TEMPLATE_ID_EXPRs.
10985
10986 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10987
10988         * class.c (resolve_address_of_overloaded_function): Add
10989         explanation message.
10990         * decl.c (define_case_label): Reformat explanation.
10991         * decl2.c (finish_static_data_member_decl): Likewise.
10992         (grokfield): Likewise.
10993         * friend.c (do_friend): Likewise.
10994
10995 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
10996
10997         * tree.c (walk_tree): Expose tail recursion.
10998         (walk_stmt_tree): New function.
10999         * cp-tree.h: Prototype walk_stmt_tree.
11000         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
11001         the BLOCKs directly.  If a BLOCK has no variables after
11002         pruning, discard it.
11003         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
11004         restore the line number.
11005
11006 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
11007
11008         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
11009         (pt.o): Remove dependency on HTAB_H.
11010         * cp-tree.h: Include hashtab.h.
11011         (walk_tree): Change prototype.
11012         (walk_tree_without_duplicates): New function.
11013         * decl.c (check_default_argument): Use it.
11014         * optimize.c (remap_decl): Adjust calls to walk_tree.
11015         (copy_body): Likewise.
11016         (expand_calls_inline): Likewise.
11017         (calls_setjmp_p): Use walk_tree_without_duplicates.
11018         * pt.c: Don't include hashtab.h.
11019         (for_each_template_parm): Use walk_tree_without_duplicates.
11020         * semantics.c (finish-stmt_tree): Likewise.
11021         (expand_body): Likewise.
11022         * tree.c (walk_tree): Add additional parameter.
11023         (walk_tree_without_duplicates): New function.
11024         (count_trees): Use it.
11025         (verify_stmt_tree): Adjust call to walk_tree.
11026         (find_tree): Use walk_tree_without_duplicates.
11027         (no_linkage_check): Likewise.
11028         (break_out_target_exprs): Adjust call to walk_tree.
11029         (cp_unsave): Likewise.
11030
11031 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11032
11033         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
11034         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
11035         * cp-tree.h (TYPE_BINFO): Adjust comment.
11036         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
11037         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
11038         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
11039         (TYPE_TEMPLATE_INFO): Likewise.
11040         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
11041         * class.c (push_nested_class): Likewise.
11042         * decl.c (lookup_name_real): Likewise.
11043         (grokdeclarator): Likewise.
11044         (grok_op_properties): Likewise.
11045         (xref_tag): Likewise.
11046         (xref_basetypes): Likewise.
11047         * decl2.c (constructor_name_full): Likewise.
11048         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
11049         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
11050         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
11051         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11052         (dump_type_suffix): Likewise.
11053         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
11054         instead.
11055         (get_aggr_from_typedef): Likewise.
11056         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
11057         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11058         (write_template_parm): Likewise.
11059         (write_template_template_parm): Check tree code instead of
11060         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11061         * method.c (build_overload_nested_name): Add
11062         BOUND_TEMPLATE_TEMPLATE_PARM.
11063         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
11064         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11065         * pt.c (convert_template_argument): Check tree code instead of
11066         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11067         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
11068         (for_each_template_parm): Adjust comment.
11069         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
11070         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11071         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
11072         template_args_equal to compare template template parameter cases.
11073         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11074         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
11075         instead.
11076         * tree.c (copy_template_template_parm): Decide whether to create
11077         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
11078         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11079         (copy_tree_r): Likewise.
11080         * typeck.c (comptypes): Likewise.  Check tree code instead of
11081         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11082
11083 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
11084
11085         * decl.c (finish_function): Move the code for handling functions
11086         marked with the constructor and destructor attributes inside the
11087         expand_p block.
11088
11089 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11090
11091         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
11092
11093 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11094
11095         * pt.c (lookup_template_class): Remove abort.
11096         * tree.c (get_type_decl): Allow error_mark_node.
11097
11098 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11099
11100         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
11101         TEMPLATE_ID_EXPRs.
11102
11103 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
11104
11105         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
11106         new ABI mangling.
11107
11108 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
11109
11110         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
11111         union tag mismatch error reporting.
11112
11113 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
11114
11115         * call.c (build_scoped_method_call): Check it is not a namespace.
11116
11117 2000-08-30  Jason Merrill  <jason@redhat.com>
11118
11119         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
11120
11121         * tree.c (bot_manip): Check TREE_CONSTANT rather than
11122         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
11123         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
11124
11125         * decl.c (start_function): Always call make_function_rtl.
11126
11127 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11128
11129         * semantics.c (prune_unused_decls): New function.
11130         (finish_stmt_tree): Call it via walk_tree.
11131
11132 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11133
11134         * class.c (build_secondary_vtable): Constify a char *.
11135         * decl.c (init_decl_processing): Initialize function_id_node,
11136         pretty_function_id_node, and func_id_node.
11137         * input.c (struct input_source): Constify 'str'.
11138         (feed_input): Constify first argument.
11139         * mangle.c (write_identifier): Constify argument.
11140         * pt.c (mangle_class_name_for_template): Constify argument.
11141
11142 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
11143
11144         * typeck.c (mark_addressable): Remove code that pokes around in
11145         RTL.
11146
11147 2000-08-28  Jason Merrill  <jason@redhat.com>
11148
11149         * lex.c (file_name_nondirectory): Move to toplev.c.
11150
11151         * cp-tree.h (LOCAL_CLASS_P): New macro.
11152         * class.c (finish_struct_1): Use it.
11153
11154 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
11155
11156         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
11157         (write_encoding): Pass another argument to write_name.
11158         (write_name): Add ignore_local_scope parameter.  Fix handling of
11159         local names.
11160         (write_nested_name): Use write_unqualified_name.
11161         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
11162         (write_template_prefix): Use write_unqualified_name.
11163         (write_component): Remove.
11164         (write_local_name): Add parameter.  Use direct local entity to
11165         discriminator calculation.
11166         (write_class_enum_type): Pass another argument to write_name.
11167         (write_template_template_arg): Likewise.
11168         (make_guard_variable): Likewise.
11169
11170 2000-08-27  Jason Merrill  <jason@redhat.com>
11171
11172         * decl.c (pushdecl): Matching decls for local externs are found in
11173         the current level.  Propagate linkage information from previous
11174         declarations.
11175
11176 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11177
11178         * ir.texi (Expressions): Fix typo.
11179
11180 2000-08-25  Greg McGary  <greg@mcgary.org>
11181
11182         * tree.c (init_tree): Use ARRAY_SIZE.
11183
11184 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11185
11186         * error.c (cp_tree_printer): Rework.
11187
11188 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
11189
11190         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
11191         dyn-string.o.
11192         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
11193         (cp-demangle.o): Remove target.
11194         (dyn-string.o): Likewise.
11195
11196         * decl.c (grokfndecl): Require that `main' return an `int'.
11197         * mangle.c (write_encoding): Don't mangle return types for
11198         conversion functions.
11199
11200 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11201
11202         * error.c (tree_formatting_info): New data type.
11203         (tree_being_formatted): New macro.
11204         (tree_formatting_flags): Likewise.
11205         (put_whitespace): Likewise.
11206         (print_tree_identifier): Likewise.
11207         (print_identifier): Likewise.
11208         (cp_tree_printer, print_function_argument_list, print_declaration,
11209         print_expression, print_function_declaration,
11210         print_function_parameter, print_type, print_cv_qualifier): New
11211         functions.
11212         (init_error): Initialize lang_printer.
11213
11214 2000-08-24  Jason Merrill  <jason@redhat.com>
11215
11216         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
11217         adjustment necessary.
11218
11219 2000-08-24  Greg McGary  <greg@mcgary.org>
11220
11221         * cp-tree.h (MAIN_NAME_P): Remove macro.
11222
11223 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
11224
11225         * error.c (print_instantiation_context): Don't forget to flush the
11226         buffer.
11227
11228 2000-08-23  Jason Merrill  <jason@redhat.com>
11229
11230         * typeck.c (build_ptrmemfunc): Save the input pmf.
11231
11232         * method.c (process_modifiers): Use same_type_p.
11233
11234 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
11235
11236         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
11237         * mangle.c (write_function_type): Change prototype.
11238         (write_encoding): Don't mangle return types for
11239         constructors or destructors.
11240         (write_type): Adjust call to write_function_type.
11241         * pt.c (instantiate_template): Instantiate alternate entry points
11242         when instantiating the main function.
11243
11244 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
11245
11246         * error.c (cp_print_error_function): Don't use embedded '\n' in
11247         output_printf.
11248
11249 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
11250
11251         * decl.c (init_decl_processing): Remove bogus initialization.
11252         * error.c (lang_print_error_function): Restore here.
11253         (init_error): Initialize print_error_function.
11254
11255 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
11256
11257         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
11258
11259 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
11260
11261         * Makefile.in (error.o): Depends on diagnostic.h
11262
11263         * cp-tree.h (problematic_instantiation_changed,
11264         record_last_problematic_instantiation, current_instantiation,
11265         print_instantiation_context): Declare.
11266         (maybe_print_template_context): Remove.
11267
11268         * decl.c (init_decl_processing): Set print_error_function to NULL.
11269         (lang_print_error_function): Remove, since we're using a new
11270         machinery.
11271
11272         * error.c: #include diagnostic.h
11273         (function_category): New function.
11274         (cp_diagnostic_starter): Likewise.
11275         (cp_diagnostic_finalizer): Likewise.
11276         (cp_print_error_function): Likewise.
11277         (maybe_print_instantiation_context): Likewise.
11278         (print_instantiation_full_context): Likewise.
11279         (print_instantiation_partial_context): Likewise.
11280         (print_instantiation_context): Define.
11281         (init_error): Initialize diagnostic pager and finalizer.
11282
11283         * pt.c (problematic_instantiation_changed): Define.
11284         (record_last_problematic_instantiation): Likewise.
11285         (current_instantiation): Likewise.
11286         (maybe_print_template_context): Remove.
11287         (print_template_context): Likewise.
11288         (current_tinst_level): Make static to reflect Brendan Kehoe's
11289         change of 1995-04-13.
11290         (push_tinst_level): Call print_instantiation_context.
11291
11292 2000-08-21  Nix  <nix@esperi.demon.co.uk>
11293
11294         * lang-specs.h: Do not process -o or run the assembler if
11295         -fsyntax-only.
11296
11297 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
11298
11299         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
11300         variables.
11301         * decl2.c (lang_decode_option): Disable gettext attributes for
11302         -ansi.
11303
11304 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
11305
11306         * lex.c (lang_init_options): Default diagnostic message maximum
11307         length to 80, when line-wrapping.
11308
11309 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
11310
11311         * class.c (build_vtbl_initializer): Clear the entire
11312         vtbl_init_data.  Start keeping track of the functions for which we
11313         have created vcall offsets here.
11314         (dfs_build_vcall_offset_vtbl_entries): Remove.
11315         (build_vcall_offset_vtbl_entries): Reimplement.
11316         (add_vcall_offset_vtbl_entries_r): New function.
11317         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
11318         computing when vcall offsets are necessary.
11319
11320 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11321
11322         * decl.c (member_function_or_else): Use cp_error ... %T.
11323         (grokdeclarator): Likewise.
11324         (start_method): Likewise.
11325         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
11326
11327 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11328
11329         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
11330         TYPE_DECLs.
11331
11332 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11333
11334         * cp-tree.h (PTRMEM_OK_P): New macro.
11335         (itf_ptrmem_ok): New enumeration value.
11336         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
11337         argument. Diagnose implicit pointer to member.
11338         (instantiate_type): Don't diagnose implicit pointer to member
11339         here. Pass itf_ptrmem_ok if ok. Adjust calls to
11340         resolve_address_of_overloaded_function.
11341         * init.c (build_offset_ref): Set PTRMEM_OK_P.
11342         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
11343         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
11344         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
11345         (build_unary_op): Deal with single non-static member in
11346         microsoft-land.
11347
11348 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11349
11350         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
11351
11352 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11353
11354         * cp-tree.h (enum_name_string): Remove prototype.
11355         (report_case_error): Remove prototype.
11356         * cp/typeck2.c (enum_name_string): Remove.
11357         (report_case_error): Remove.
11358         * error.c (dump_expr): Deal with enum values directly.
11359         Correctly negate integer constant.
11360
11361 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11362
11363         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
11364         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
11365         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
11366         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
11367         (__cxa_vec_new): Use __cxa_vec_new2.
11368         (__cxa_vec_delete): Use __cxa_vec_delete2.
11369
11370 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11371
11372         * vec.cc (__cxa_vec_new): Set "C" linkage.
11373         (__cxa_vec_ctor): Likewise.
11374         (__cxa_vec_cctor): Likewise.
11375         (__cxa_vec_dtor): Likewise.
11376         (__cxa_vec_delete): Likewise.
11377         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
11378         (__cxa_vec_ctor): Likewise.
11379         (__cxa_vec_cctor): Likewise.
11380         (__cxa_vec_dtor): Likewise.
11381         (__cxa_vec_delete): Likewise.
11382
11383 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11384
11385         * class.c (instantiate_type): Reinstate local variable
11386         deleted in previous change.
11387
11388         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
11389         itf_no_attributes.
11390
11391 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11392
11393         * cp-tree.h (instantiate_type_flags): New enumeration.
11394         (instantiate_type): Change parameter.
11395         * class.c (instantiate_type): Adjust prototype. Adjust.
11396         * call.c (standard_conversion): Adjust instantiate_type call.
11397         (reference_binding): Likewise.
11398         (build_op_delete_call): Likewise.
11399         (convert_like_real): Likewise.
11400         * cvt.c (cp_convert_to_pointer): Likewise.
11401         (convert_to_reference): Likewise.
11402         * pt.c (convert_nontype_argument): Likewise.
11403         * typeck.c (build_binary_op): Likewise.
11404         (build_ptrmemfunc): Likewise.
11405         (convert_for_assignment): Likewise.
11406
11407 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11408
11409         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
11410         (current_aggr): Define.
11411         * decl.c (grokdeclarator): Make sure a friend class is an
11412         elaborated type specifier.
11413         * parse.y (current_aggr): Remove static definition.
11414         (cp_parse_init): Adjust.
11415         (structsp): Clear and restore current_aggr.
11416         (component_decl_list): Clear current_aggr.
11417
11418         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
11419         aggregate tag on the typename's context.
11420
11421         * pt.c (tsubst_friend_class): Return error_mark_node, if
11422         parms becomes NULL.
11423         (instantiate_class_template): Ignore error_mark_node friend types.
11424
11425 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
11426
11427         * cvt.c (warn_ref_binding): New static function, broken out of ...
11428         (convert_to_reference): ... here. Use it.
11429
11430 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11431
11432         * parse.y (template_arg): Add rule for template qualified with
11433         global scope.
11434
11435 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11436
11437         * decl2.c (add_function): Reorganize.
11438         (arg_assoc): Do not consider function template decls.
11439
11440 2000-08-11  Jason Merrill  <jason@redhat.com>
11441
11442         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
11443         looking inside.
11444
11445 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11446
11447         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
11448         (lookup_nested_tag): Likewise.
11449
11450         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
11451         can be produced.
11452
11453 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11454
11455         * parse.y (named_complex_class_head_sans_basetype): Remove
11456         always true if.
11457
11458 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11459
11460         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
11461         explicit TEMPLATE_ID_EXPR args.
11462         (build_expr_from_tree, case CALL_EXPR): Likewise.
11463
11464 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11465
11466         * decl.c (check_tag_decl): Diagnose typename's which don't
11467         declare anything.
11468
11469 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
11470
11471         * init.c (build_aggr_init): Reject bogus array initializers
11472         early.
11473
11474 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
11475
11476         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
11477         runtime.
11478         * cp/tinfo.cc (__dynamic_cast): Likewise.
11479         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
11480
11481 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
11482
11483         * cvt.c (convert_to_pointer_force): Fix error message when
11484         attempting to cast from ambiguous base.
11485
11486 2000-08-08  Jason Merrill  <jason@redhat.com>
11487
11488         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
11489         (tsubst_template_arg_vector): Likewise.
11490
11491         * decl2.c (build_anon_union_vars): Choose the largest field; don't
11492         assume that one will be as large as the union.
11493
11494 2000-08-07  Kazu Hirata  <kazu@hxi.com>
11495
11496         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
11497         * decl.c (pop_labels): Likewise.
11498
11499 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
11500
11501         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
11502         specifications.
11503         (__pointer_to_member_type_info): Likewise.
11504         (__base_class_info): Likewise.
11505         (__class_type_info): Likewise.
11506         (__si_class_type_info): Likewise.
11507         (__vmi_class_type_info): Likewise.
11508         * tinfo.cc (__si_class_type_info::__do_find_public_src):
11509         Changed member names to match specifications.
11510         (__vmi_class_type_info::__do_find_public_src): Likewise.
11511         (__si_class_type_info::__do_dyncast): Likewise.
11512         (__vmi_class_type_info::__do_dyncast): Likewise.
11513         (__si_class_type_info::__do_upcast): Likewise.
11514         (__vmi_class_type_info::__do_upcast): Likewise.
11515         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
11516         (__pbase_type_info::__pointer_catch): Likewise.
11517         (__pointer_type_info::__pointer_catch): Likewise.
11518         (__pointer_to_member_type_info::__pointer_catch): Likewise.
11519
11520 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
11521
11522         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
11523         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
11524         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
11525
11526 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
11527
11528         * cp-tree.h (add_method): Change prototype.
11529         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
11530         Don't double the size of the method vector in the error case.
11531         (handle_using_decl): Adjust call to add_method.
11532         (add_implicitly_declared_members): Likewise.
11533         (clone_function_decl): Likewise.
11534         * decl2.c (check_classfn): Likewise.
11535         * semantics.c (finish_member_declaration): Likewise.
11536
11537 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
11538
11539         * decl.c (flag_isoc94): New variable.
11540
11541 2000-08-02  Jason Merrill  <jason@redhat.com>
11542
11543         * pt.c (do_type_instantiation): Add complain parm; don't complain
11544         if called recursively.
11545         * cp-tree.h, parse.y: Adjust.
11546
11547 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
11548
11549         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
11550         -Wno-strict-prototypes.
11551
11552         * g++spec.c: Adjust type of second argument to
11553         lang_specific_driver, and update code as necessary.
11554
11555         * cp-tree.h: Don't prototype min_precision here.
11556         (my_friendly_assert): Cast expression to void.
11557         * semantics.c (do_poplevel): Initialize scope_stmts.
11558
11559 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
11560
11561         * cp-tree.h (DECL_NEEDED_P): Tweak.
11562
11563 2000-07-28  Jason Merrill  <jason@redhat.com>
11564
11565         * lang-specs.h: Use %i in rule for .ii files.
11566
11567 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
11568
11569         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
11570
11571 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
11572
11573         Allow indirect primary bases.
11574         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
11575         primary_base.
11576         (CLASSTYPE_VFIELD_PARENT): Remove.
11577         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
11578         (BINFO_PRIMARY_BINFO): Remove.
11579         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
11580         (BINFO_VBASE_PRIMARY_P): Likewise.
11581         (BINFO_PRIMARY_BASE_OF): New macro.
11582         (BINFO_INDIRECT_PRIMARY_P): Likewise.
11583         (get_primary_binfo): New function.
11584         * decl.c (lang_mark_tree): Make lang_type::primary_base.
11585         * class.c (vcall_offset_data_s): Rename to ...
11586         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
11587         and add ctor_vtbl_p.
11588         (get_derived_offset): Use get_primary_binfo.
11589         (dfs_mark_primary_bases): Adjust handling of virtual primary
11590         bases.
11591         (mark_primary_bases): Likewise.
11592         (set_primary_base): Take a binfo, not an integer, as a
11593         representation of the primary base.
11594         (indirect_primary_base_p): Remove.
11595         (determine_primary_base): Adjust for indirect primary bases.
11596         (dfs_find_final_overrider): Fix typo in coment.
11597         (update_vtable_entry_for_fn): Use get_primary_binfo.
11598         (layout_nonempty_base_or_field): Tweak.
11599         (build_base_fields): Adjust for new primary base semantics.
11600         (dfs_propagate_binfo_offsets): Remove.
11601         (propagate_binfo_offsets): Rewrite.
11602         (dfs_set_offset_for_shared_vbases): Remove.
11603         (layout_virtual_bases): Don't use it.
11604         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
11605         ABI.
11606         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
11607         CLASSTYPE_VFIELD_PARENT.
11608         (dfs_get_primary_binfo): New function.
11609         (get_primary_binfo): Likewise.
11610         (dump_class_hierarchy_r): Tweak printing of primary bases.
11611         (build_vtbl_initializer): Fix typo in comments.  Use
11612         vtbl_init_data.
11613         (build_vcall_and_vbase_vtbl_entries): Likewise.
11614         (build_vbaes_offset_vtbl_entries): Likewise.
11615         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
11616         BV_VCALL_INDEX to handle indirect primary bases.
11617         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
11618         (build_rtti_vtbl_entries): Likewise.
11619         * search.c (get_shared_vbase_if_not_primary): Tweak.
11620         (find_vbase_instance): Likewise.
11621         (binfo_for_vtable): Simplify.
11622         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
11623         (make_binfo): Make it have 11 entries.
11624
11625 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
11626
11627         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
11628         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
11629         ascertaining primaryness.
11630         (G): Remove template_args.
11631         (decl_is_template_id): New function.
11632         (write_encoding): Use decl_is_template_id.
11633         (write_name): Likewise.  Handle type_decls.  Get main variant of
11634         type decls.
11635         (write_nested_name): Likewise.
11636         (write_prefix): Likewise.
11637         (write_template_prefix): Likewise.
11638         (write_special_name_constructor): Remove defunct production from
11639         comment.
11640         (write_bare_function_type): Remove comment about absent parameter.
11641         (write_template_template_arg): Add missing grammar production to
11642         comment.
11643
11644 2000-07-27  Jason Merrill  <jason@redhat.com>
11645
11646         * decl.c (duplicate_decls): If common_type produces a non-typedef
11647         type for a typedef, just use the old type.
11648
11649 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
11650
11651         * cp-tree.h (function_depth): Declare.
11652         (verify_stmt_tree): Likewise.
11653         (find_tree): Likewise.
11654         * decl.c (function_depth): Give it external linkage.
11655         * optimize.c (optimize_function): Increment and decrement it.
11656         * tree.c (verify_stmt_tree_r): New function.
11657         (verify_stmt_tree): Likewise.
11658         (find_tree_r): Likewise.
11659         (find_tree): Likewise.
11660
11661 2000-07-27  Jason Merrill  <jason@redhat.com>
11662
11663         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
11664         TYPE_PTRMEMFUNC_P.
11665         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
11666
11667 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
11668
11669         * decl.c (start_cleanup_fn): Mark the function as `inline'.
11670         * decl2.c (get_guard): Call cp_finish_decl, not
11671         rest_of_decl_compilation, for local guards.
11672         * lex.c (do_identifier): Remove unused variable.
11673
11674 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
11675
11676         * parse.y:  Add missing ';'.
11677
11678 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
11679
11680         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
11681         of `extern "C++"'.
11682
11683 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11684
11685         Kill strict_prototype. Backwards compatibility only for
11686         non NO_IMPLICIT_EXTERN_C systems.
11687         * cp-tree.h (flag_strict_prototype): Remove.
11688         (strict_prototype): Remove.
11689         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
11690         * decl.c (maybe_push_to_top_level): Adjust.
11691         (pop_from_top_level): Adjust.
11692         (decls_match): Only allow sloppy parm matching for ancient
11693         system headers.
11694         (init_decl_processing): Adjust.
11695         (grokdeclarator): Adjust.
11696         * decl2.c (flag_strict_prototype): Remove.
11697         (strict_prototype): Remove.
11698         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
11699         (lang_f_options): Remove "strict-prototype".
11700         (unsupported-options): Add "strict-prototype".
11701         * lex.c (do_identifier): Adjust.
11702         (do_scoped_id): Adjust.
11703         * parse.y (empty_parms): Adjust.
11704         * class.c (push_lang_context): Adjust.
11705         (pop_lang_context): Adjust.
11706         * typeck.c (comp_target_parms): Adjust.
11707
11708 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11709
11710         * decl.c (poplevel): Deal with anonymous variables at for scope.
11711         (maybe_inject_for_scope_var): Likewise.
11712
11713 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
11714
11715         * decl.c: Remove all signal handling code, now done in toplev.c.
11716
11717 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
11718
11719         * decl.c (make_rtl_for_nonlocal_decl): Rework.
11720
11721         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
11722         correctly.
11723
11724 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
11725
11726         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
11727         Define my_friendly_assert and my_friendly_abort as macros
11728         which may call friendly_abort.  Prototype friendly abort, not
11729         my_friendly_abort or my_friendly_assert.
11730         * decl.c (signal_catch): Report the signal caught in the error
11731         message.  Call fatal directly.
11732         * typeck2.c (ack, my_friendly_assert): Delete.
11733         (my_friendly_abort): Rename to friendly_abort.  Expect file,
11734         line, and function parameters.  Report the abort code, then
11735         call fancy_abort.  Do not mask an abort if errors have
11736         already occurred.
11737
11738 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
11739
11740         * typeck.c (comp_target_parms): Remove obsolete parameter.
11741         (comp_target_types): Adjust.
11742
11743 2000-07-17  Jason Merrill  <jason@redhat.com>
11744
11745         * typeck.c (mark_addressable): Never set TREE_USED.
11746         * call.c (build_call): Don't abort on calls to library functions
11747         that have been declared normally.
11748
11749         * typeck.c (build_binary_op): Fix grammar in warning.
11750
11751         * exception.cc (__eh_free): Fix prototype.
11752
11753         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
11754
11755         * decl.c (pushdecl): Handle seeing an OVERLOAD in
11756         IDENTIFIER_NAMESPACE_VALUE.
11757
11758 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
11759
11760         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
11761         * method.c (use_thunk): Correct handling of vcall offsets.
11762
11763 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
11764
11765         * .cvsignore: parse.h and parse.c have no cp- prefix.
11766
11767 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
11768
11769         * .cvsignore: New file.
11770
11771 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
11772
11773         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
11774
11775 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
11776
11777         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
11778         * parse.c: Remove.
11779         * parse.h: Likewise.
11780
11781 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
11782
11783         * class.c (layout_class_type): Add pointers to virtual bases after
11784         base classes under the old ABI.
11785
11786 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
11787
11788         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
11789         (finish_continue_stmt): Likewise.
11790         (begin_for_stmt): Remove call to note_level_for_for.
11791         (finish_goto_stmt): Change call from build_min_nt
11792         to build_stmt.
11793         (finish_expr_stmt): Likewise.
11794         (begin_if_stmt): Likewise.
11795         (begin_while_stmt): Likewise.
11796         (finish_while_stmt): Likewise.
11797         (finish_return_stmt): Likewise.
11798         (begin_for_stmt): Likewise.
11799         (finish_for_stmt): Likewise.
11800         (finish_break_stmt): Likewise.
11801         (begin_switch_stmt): Likewise.
11802         (finish_case_label): Likewise.
11803         (genrtl_try_block): Likewise.
11804         (begin_try_block): Likewise.
11805         (begin_handler): Likewise.
11806         (begin_compound_stmt): Likewise.
11807         (finish_asm_stmt): Likewise.
11808         (finish_label_stmt): Likewise.
11809         (add_decl_stmt): Likewise.
11810         (finish_subobject): Likewise.
11811         (finish_decl_cleanup): Likewise.
11812         (finish_named_return_value): Likewise.
11813         (setup_vtbl_ptr): Likewise.
11814         (add_scope_stmt): Likewise.
11815         * decl.c (finish_constructor_body): Likewise.
11816         (finish_destructor_body): Likewise.
11817         * optimize.c (copy_body_r): Likewise.
11818         (initialize_inlined_parameters): Likewise.
11819         (declare_return_variable): Likewise.
11820         (expand_call_inline): Likewise.
11821
11822 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
11823
11824         * semantics.c (expand_body): Sync interface information
11825         at the end of function body expansion.
11826
11827 2000-07-09  Jason Merrill  <jason@redhat.com>
11828
11829         * init.c (build_new_1): Bail early if the call to new fails.
11830
11831         * decl.c (compute_array_index_type): Check specifically for
11832         an INTEGER_CST, not just TREE_CONSTANT.
11833
11834         * decl.c (duplicate_decls): Don't call duplicate_decls on
11835         the DECL_TEMPLATE_RESULT.
11836         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
11837         codes.
11838
11839         * error.c (dump_template_bindings): Don't crash if we had an
11840         invalid argument list.
11841
11842         * typeck.c (c_expand_start_case): Do narrowing here.
11843         * semantics.c (finish_switch_cond): Not here.
11844
11845 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
11846
11847         * parse.y (asm_clobbers): Do string concatenation.
11848
11849 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
11850
11851         * decl.c (pushtag): Don't put local classes in template functions
11852         on the local_classes list.
11853
11854 2000-07-04  Scott Snyder  <snyder@fnal.gov>
11855
11856         * decl2.c (get_guard): Add missing return for old ABI local
11857         variable case.
11858
11859 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
11860
11861         * cp-tree.h (char_type_p): New function.
11862         * decl.c (init_decl_processing): Don't initialize
11863         signed_wchar_type_node or unsigned_wchar_type_node.
11864         (complete_array_type): Handle brace-enclosed string-constants.
11865         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
11866         * tree.c (char_type_p): New function.
11867         * typeck2.c (digest_init): Use char_type_p.
11868
11869 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
11870
11871         * pt.c (tsubst): Don't layout type, if it's error_mark.
11872
11873 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
11874
11875         * pt.c (instantiate_pending_templates): Reset template level.
11876
11877 2000-07-05  Jason Merrill  <jason@redhat.com>
11878
11879         * call.c (joust): Don't complain about `operator char *()' beating
11880         `operator const char *() const'.
11881
11882 2000-07-04  scott snyder  <snyder@fnal.gov>
11883             Jason Merrill  <jason@redhat.com>
11884
11885         * repo.c (repo_get_id): Handle the case where a class with virtual
11886         bases has a null TYPE_BINFO_VTABLE.
11887
11888 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
11889             Jason Merrill  <jason@redhat.com>
11890
11891         * parse.y (member_init): Just pass in the type.
11892         * init.c (expand_member_init): Handle getting a type.
11893
11894 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11895             Jason Merrill  <jason@redhat.com>
11896
11897         * decl.c (finish_function): Warn if a function has no return
11898         statement.
11899         Suggested by Andrew Koenig.
11900         * typeck.c (check_return_expr): Do set current_function_returns_value
11901         if we got an error_mark_node.
11902
11903 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
11904
11905         * decl2.c (push_decl_namespace): Push the original namespace.
11906
11907 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
11908
11909         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
11910         * semantics.c (begin_class_definition): Clear it.
11911
11912 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
11913
11914         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
11915         (genrtl_expr_stmt): Likewise.
11916         (genrtl_decl_stmt): Likewise.
11917         (genrtl_if_stmt): Likewise.
11918         (genrtl_while_stmt): Likewise.
11919         (genrtl_do_stmt): Likewise.
11920         (genrtl_return_stmt): Likewise.
11921         (genrtl_for_stmt): Likewise.
11922         (genrtl_break_stmt): Likewise.
11923         (genrtl_continue_stmt): Likewise.
11924         (genrtl_scope_stmt): Likewise.
11925         (genrtl_switch_stmt): Likewise.
11926         (genrtl_case_label): Likewise.
11927         (genrtl_begin_compound_stmt): Likewise.
11928         (genrtl_finish_compound_stmt): Likewise.
11929         (genrtl_compound_stmt): Likewise.
11930         (genrtl_asm_stmt): Likewise.
11931
11932         * init.c (begin_init_stmts): Remove call to
11933         genrtl_begin_compound_stmt.
11934         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
11935
11936         * semantics.c (lang_expand_stmt): Changed call to
11937         genrtl_compound_stmt to ignore return value.
11938
11939 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
11940
11941         * mangle.c (canonicalize_for_substitution): Return the canonical
11942         variant of a type.
11943
11944         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
11945         TYPE_DECL.
11946         * typeck.c (commonparms): Remove obstack manipulations.
11947
11948 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
11949
11950         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
11951
11952         * Makefile.in (OBJS): Added ../c-semantics.o.
11953         (OBJDEPS): Likewise.
11954
11955         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
11956         ../c-common.h.
11957         (struct stmt_tree): Added comment.
11958         (current_function_name_declared): Removed.
11959         (stmts_are_full_exprs_p): Likewise.
11960         (genrtl_do_pushlevel): Likewise.
11961         (genrtl_clear_out_block): Likewise.
11962         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
11963         (DECL_ANON_UNION_ELEMS): Likewise.
11964         (emit_local_var): Likewise.
11965         (make_rtl_for_local_static): Likewise.
11966         (do_case): Likewise.
11967         (expand_stmt): Likewise.
11968         (genrtl_decl_cleanup): Likewise.
11969         (c_expand_asm_operands): Likewise.
11970         (c_expand_return): Likewise.
11971         (c_expand_start_case): Likewise.
11972
11973         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
11974         (emit_local_var): Likewise.
11975         (initialize_local_var): Change reference to
11976         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
11977         Change reference to stmts_are_full_exprs_p to
11978         current_stmt_tree->stmts_are_full_exprs_p.
11979         (push_cp_function_context): Likewise.
11980
11981         * expect.c (expand_throw): Change reference to
11982         stmts_are_full_exprs_p.
11983
11984         * init.c (build_aggr_init): Change reference to
11985         stmts_are_full_exprs_p.
11986         (build_vec_init): Likewise.
11987
11988         * optimize.c (maybe_clone_body): Change reference to
11989         current_function_name_declared to
11990         cp_function_chain->name_declared.
11991
11992         * pt.c (instantiate_decl): Change reference to
11993         current_function_name_declared to
11994         cp_function_chain->name_declared.
11995
11996         * semantics.c (expand_cond): Moved declaration to c-common.h.
11997         (genrtl_do_pushlevel): Moved to c-semantics.c.
11998         (genrtl_clear_out_block): Likewise.
11999         (genrtl_goto_stmt): Likewise.
12000         (genrtl_expr_stmt): Likewise.
12001         (genrtl_decl_stmt): Likewise.
12002         (gerntl_if_stmt): Likewise.
12003         (genrtl_while_stmt): Likewise.
12004         (genrtl_do_stmt): Likewise.
12005         (genrtl_return_stmt): Likewise.
12006         (genrtl_for_stmt): Likewise.
12007         (genrtl_break_stmt): Likewise.
12008         (genrtl_continue_stmt): Likewise.
12009         (genrtl_scope_stmt): Likewise.
12010         (genrtl_switch_stmt): Likewise.
12011         (genrtl_case_label): Likewise.
12012         (genrtl_begin_compound_stmt): Likewise.
12013         (genrtl_finish_compound_stmt): Likewise.
12014         (genrtl_compound_stmt): Likewise.
12015         (genrtl_asm_stmt): Likewise.
12016         (genrtl_decl_cleanup): Likewise.
12017         (expand_cond): Likewise.
12018         (expand_stmt): Renamed to ...
12019         (lang_expand_stmt): ... this.
12020         (lang_expand_expr_stmt): Initialize.
12021         (set_current_function_name_declared): Likewise.
12022         (stmts_are_full_exprs_p): Likewise.
12023         (current_function_name_declared): Likewise.
12024         (anon_aggr_type_p): Likewise.
12025         (do_poplevel): Change reference to
12026         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
12027         Change reference to stmts_are_full_exprs_p to
12028         current_stmt_tree->stmts_are_full_exprs_p.
12029         (add_tree): Likewise.
12030         (finish_expr_stmt): Likewise.
12031         (prep_stmt): Likewise.
12032         (lang_expand_stmt): Likewise.
12033         (begin_compound_stmt): Change reference to
12034         current_function_name_declared to
12035         cp_function_chain->name_declared and call to
12036         current_function_name_declared().
12037         (setup_vtbl_ptr): Likewise.
12038         (genrtl_do_poplevel): Removed.
12039
12040 2000-06-30  Jason Merrill  <jason@redhat.com>
12041
12042         * init.c (init_init_processing): Go back to aligning like
12043         double_type_node for old ABI.
12044         (get_cookie_size): Make cookie larger if we get a type that needs
12045         more alignment.
12046         (build_vec_delete): Call it.
12047
12048         * typeck.c (qualify_type_recursive): New fn.
12049         (composite_pointer_type): Use it.
12050         (build_binary_op): Use composite_pointer_type.
12051
12052 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
12053             Jason Merrill  <jason@redhat.com>
12054
12055         * typeck.c (check_return_expr): Don't complain about returning
12056         NULL from operator new if -fcheck-new.
12057         * cp-tree.h: Declare flag_check_new here.
12058         * init.c: Not here.
12059
12060 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
12061
12062         * mangle.c (find_substitution): Use same_type_p.
12063         (write_encoding): Don't check for substitutions.
12064
12065 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
12066
12067         * parse.y (expr_no_comma_rangle): New non-terminal.
12068         (template_parm): Use it for default parameter case.
12069         (template_arg): Use it.
12070         (expr_no_commas): Remove commented out undefined extensions.
12071         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
12072         * parse.h, parse.c: Rebuilt.
12073
12074 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
12075
12076         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
12077         (finish_asm_stmt): Do it here, instead.
12078
12079         * cp-tree.h (ridpointers): Don't declare.
12080         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
12081         (record_builtin_java_type): Likewise.
12082         (init_decl_processing): Likewise.
12083         * lex.c: Move inclusion of lex.h.
12084         (ridpointers): Don't define.
12085         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
12086         RID_MAX.
12087         * lex.h (enum rid): Rename to ...
12088         (enum cp_rid): ... this.
12089         (ridpointers): Don't declare.
12090         * parse.y: Move inclusion of lex.h.
12091         * parse.c: Regenerated.
12092         * spew.c: Move inclusion of lex.h.
12093
12094         * cp-tree.h (struct language_function): Remove temp_name_counter.
12095         (temp_name_counter): Remove.
12096         (get_temp_name): Change prototype.
12097         (get_guard): New function.
12098         (get_guard_cond): Likewise.
12099         (set_guard): Likewise.
12100         * cvt.c (build_up_reference): Adjust call to get_temp_name.
12101         * decl.c (expand_static_init): Use get_guard and friends to
12102         implement guard variables.
12103         * decl2.c (get_temp_name): Assume that the variables created are
12104         always static.
12105         (get_sentry): Rename to ...
12106         (get_guard): ... this.  Implement new ABI guard variables.
12107         (get_guard_bits): New function.
12108         (get_guard_cond): Likewise.
12109         (set_guard): Likewise.
12110         (start_static_initialization_or_destruction): Use them.
12111         (do_static_initialization): Replace sentry with guard throughout.
12112         (do_static_destruction): Likewise.
12113         * init.c (create_temporary_var): Add comment.
12114
12115 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
12116
12117         * mangle.c (find_substitution): Use same_type_p.
12118         (write_encoding): Don't check for substitutions.
12119
12120 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
12121
12122         * parse.y (expr_no_comma_rangle): New non-terminal.
12123         (template_parm): Use it for default parameter case.
12124         (template_arg): Use it.
12125         (expr_no_commas): Remove commented out undefined extensions.
12126         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
12127         * parse.h, parse.c: Rebuilt.
12128
12129 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
12130
12131         * cp-tree.h (flag_const_strings): Remove.
12132         (warn_parentheses): Likewise.
12133         (warn_format): Likewise.
12134         (common_type): Likewise.
12135         (default_conversion): Likewise.
12136         (build_binary_op): Likewise.
12137         (cp_build_binary_op): New macro.
12138         * call.c (build_new_op): Use cp_build_binary_op instead of
12139         build_binary_op.
12140         * class.c (build_vtable_entry_ref): Likewise.
12141         * decl.c (expand_static_init): Likewise.
12142         (compute_array_index_type): Likewise.
12143         (build_enumerator): Likewise.
12144         * decl2.c (delete_sanity): Likewise.
12145         (start_static_initialization_or_destruction): Likewise.
12146         * error.c (dump_type_suffix): Likewise.
12147         * init.c (resolve_offset_ref): Likewise.
12148         (build_new): Likewise.
12149         (build_new_1): Likewise.
12150         (build_vec_delete_1): Likewise.
12151         (build_vec_init): Likewise.
12152         (build_delete): Likewise.
12153         * rtti.c (synthesize_tinfo_fn): Likewise.
12154         (synthesize_tinfo_var): Likewise.
12155         * search.c (expand_upcast_fixups): Likewise.
12156         (fixup_all_virtual_upcast_offsets): Likewise.
12157         * typeck.c (build_array_ref): Likewise.
12158         (get_member_function_from_ptrfunc): Likewise.
12159         (build_binary_op): Add parameter.
12160         (pointer_int_sum): Use cp_build_binary_op.
12161         (pointer_diff): Likewise.
12162         (build_modify_expr): Likewise.
12163         (get_delta_difference): Likewise.
12164         (build_ptrmemfunc): Likewise.
12165
12166 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
12167
12168         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
12169         * decl.c (create_implicit_typedef): Adjust.
12170         * decl2.c (build_artificial_parm): Adjust.
12171         * method.c (implicitly_declare_fn): Adjust.
12172         * pt.c (push_inline_template_parms_recursive): Adjust.
12173         (process_template_parm): Adjust.
12174         (overloaded_template_name): Adjust.
12175         * semantics.c (finish_template_template_parm): Adjust.
12176
12177 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
12178
12179         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
12180         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
12181         where to emit thunks.
12182         (build_vtt): Adjust call to build_vtt_inits.
12183         (build_vtt_inits): Add parameter to indicate whether or not
12184         sub-VTTs for virtual bases should be included.  Adjust handling of
12185         construction vtables.
12186         (get_matching_base): New function.
12187         (dfs_build_vtt_inits): Rename to ...
12188         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
12189         construction vtables.
12190         (dfs_fixup_binfo_vtbls): Likewise.
12191         (build_ctor_vtbl_groups): Build construction vtables for virtual
12192         bases, too.
12193         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
12194         to build construction vtbls.
12195         (dfs_accumulate_vtbl_inits): Adjust handling of
12196         construction vtables.
12197
12198         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
12199         types correctly.
12200
12201 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
12202
12203         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
12204
12205 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
12206
12207         * search.c (hides): Remove.
12208         (is_subobject_of_p): Add most_derived parameter. Use
12209         CANONICAL_BINFO.
12210         (lookup_field_queue_p): Adjust.
12211         (lookup_field_r): Adjust.
12212
12213 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
12214
12215         * decl2.c (handle_class_head): Bash typedefs to the type's main
12216         decl.
12217
12218 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
12219
12220         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
12221         (begin_global_stmt_expr): ... this.
12222         (genrtl_finish_stmt_expr): Rename to ...
12223         (finish_global_stmt_expr): ... this.
12224         * init.c (begin_init_stmts): Adjust calls.
12225         (finish_init_stmts): Likewise.
12226         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
12227         (begin_global_stmt_expr): ... this.
12228         (genrtl_finish_stmt_expr): Rename to ...
12229         (finish_global_stmt_expr): ... this.
12230
12231 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12232
12233         * search.c (lookup_member): Fix typo in comment.
12234
12235 2000-06-24  Jason Merrill  <jason@redhat.com>
12236
12237         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
12238         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
12239
12240 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12241
12242         * parse.y (complex_direct_notype_declarator): Support global_scope.
12243         * Makefile.in: Adjust conflict count.
12244
12245 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12246
12247         * parse.y (template_arg): Convert TEMPLATE_DECL
12248         that is a template template parameter to
12249         TEMPLATE_TEMPLATE_PARM here.
12250
12251         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12252         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
12253         (copy_template_template_parm): Adjust prototype.
12254         * decl.c (grokdeclarator): Remove dead code.
12255         * pt.c (process_template_parm): Tidy.
12256         (lookup_template_class): Construct nodes in
12257         copy_template_template_parm.
12258         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
12259         lookup_template_class.  Use TYPE_TI_TEMPLATE.
12260         * tree.c (copy_template_template_parm): Add NEWARGS
12261         parameter.
12262         (mapcar): Adjust call to copy_template_template_parm.
12263         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
12264         * method.c (build_template_template_parm_names): Change error
12265         code to avoid compilation warning.
12266
12267         * gxxint.texi: Document template template parameter
12268         name mangling.
12269
12270 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
12271
12272         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
12273         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
12274         (cp-demangle.o): New rule.
12275         (dyn-string.o): Likewise.
12276         * inc/cxxabi.h (__cxa_demangle): New declaration.
12277
12278 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
12279
12280         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
12281         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
12282         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
12283         a tree, not an int.
12284         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
12285         (make_thunk): Change prototype.
12286         (emit_thunk): Rename to use_thunk.
12287         (mangle_thunk): Change prototype.
12288         * class.c (get_derived_offset): Simplify.
12289         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
12290         BV_GENERATE_THUNK_WITH_VTABLE_P.
12291         (build_primary_vtable): Simplify.
12292         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
12293         (dfs_find_base): Remove.
12294         (update_vtable_entry_for_fn): Correct bug in finding the base
12295         where a virtual function was first declared.  Figure out whether
12296         or not to emit a vcall-thunk with the vtables in which it appears.
12297         Correct logic for deciding whether to use an ordinary thunk, or a
12298         vcall thunk.
12299         (finish_struct_1): Remove unnecssary code.
12300         (build_vtbl_initializer): Use ssize_int for the running counter of
12301         negative indices.
12302         (build_vtbl_initializer): Only use vcall thunks where necessary.
12303         Mark thunks as needing to be emitted with their vtables, or not.
12304         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
12305         indices.  Use size_binop.
12306         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
12307         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
12308         size_binop.
12309         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
12310         (build_vtable_entry): Mark thunks as needing to be emitted with
12311         their vtables, or not.
12312         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
12313         * decl2.c (mark_vtable_entries): Use use_thunk instead of
12314         emit_thunk.
12315         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
12316         information.
12317         * error.c (dump_expr): Use BV_FN.
12318         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
12319         not an int.
12320         * method.c (make_thunk): Likewise.
12321         (emit_thunk): Rename to use_thunk.  Allow callers to decide
12322         whether or not to actually emit the thunk.  Adjust for changes in
12323         representation of vcall offsets.
12324         * search.c (dfs_get_pure_virtuals): Use BV_FN.
12325         * semantics.c (emit_associated_thunks): New function.
12326         (expand_body): Use it.
12327         * ir.texi: Adjust decriptions of thunks.
12328
12329 2000-06-22  Jason Merrill  <jason@redhat.com>
12330
12331         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
12332         (tsubst_friend_function): Copy it here.
12333
12334         * decl.c (grok_op_properties): Fix typo.
12335
12336         * decl2.c (delete_sanity): Clarify warning, avoid failure on
12337         deleting void*.
12338
12339         * pt.c (check_explicit_specialization): Clarify error.
12340
12341         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
12342         an old OVERLOAD when we're declaring a non-function.
12343         (pushdecl, destroy_local_var): Check for error_mark_node.
12344         (warn_extern_redeclared_static): Also bail early if
12345         we're a CONST_DECL.
12346         (push_overloaded_decl): Ignore an old error_mark_node.
12347
12348 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
12349
12350         * call.c (build_x_va_arg): Check if in a template decl.
12351         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
12352
12353 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12354
12355         * class.c (push_lang_context): TYPE_NAME gets you to the Java
12356         types DECLs.
12357         * decl.c (check_goto): Computed gotos assumed OK.
12358
12359 2000-06-20  Jason Merrill  <jason@redhat.com>
12360
12361         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
12362         for which we don't need to look for instantiations.
12363
12364 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
12365
12366         * parse.y (program): Always call finish_translation_unit.
12367         * parse.c, parse.h: Rebuilt.
12368
12369 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
12370
12371         * method.c: Don't include hard-reg-set.h.
12372
12373 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
12374
12375         * rtti.c (get_base_offset): Cope when vbase field is in a base.
12376
12377 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
12378
12379         * call.c (build_conditional_expr): Use VOID_TYPE_P.
12380         * cvt.c (cp_convert_to_pointer): Likewise.
12381         (convert_to_void): Likewise.
12382         * error.c (dump_expr): Likewise.
12383         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
12384         * init.c (build_delete): Likewise.
12385         * method.c (emit_thunk): Likewise.
12386         * optmize.c (declare_return_variable): Likewise.
12387         * rtti.c (get_tinfo_decl_dynamic): Likewise.
12388         (get_typeid): Likewise.
12389         (build_dynamic_cast_1): Likewise.
12390         * typeck.c (composite_pointer_type): Likewise.
12391         (common_type): Likewise.
12392         (build_indirect_ref): Likewise.
12393         (build_binary_op): Likewise.
12394         (build_x_compound_expr): Likewise.
12395         (check_return_expr): Likewise.
12396         * typeck2.c (add_exception_specifier): Likewise.
12397
12398         * mangle.c (write_method_parms): Use direct comparison for end
12399         of parmlist.
12400
12401 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
12402
12403         * cp-tree.h (genrtl_try_block): Declare function.
12404         (genrtl_handler): Likewise.
12405         (genrtl_catch_block): Likewise.
12406         (genrtl_ctor_stmt): Likewise.
12407         (genrtl_subobject): Likewise.
12408         (genrtl_decl_cleanup): Likewise.
12409         (genrtl_do_poplevel): Likewise.
12410         (genrtl_do_pushlevel): Likewise.
12411         (genrtl_clear_out_block): Likewise.
12412         (genrtl_goto_stmt): Likewise.
12413         (genrtl_expr_stmt): Likewise.
12414         (genrtl_decl_stmt): Likewise.
12415         (genrtl_if_stmt): Likewise.
12416         (genrtl_while_stmt): Likewise.
12417         (genrtl_do_stmt): Likewise.
12418         (genrtl_return_stmt): Likewise.
12419         (genrtl_for_stmt): Likewise.
12420         (genrtl_break_stmt): Likewise.
12421         (genrtl_continue_stmt): Likewise.
12422         (genrtl_scope_stmt): Likewise.
12423         (genrtl_switch_stmt): Likewise.
12424         (genrtl_case_label): Likewise.
12425         (genrtl_begin_compound_stmt): Likewise.
12426         (genrtl_finish_compound_stmt): Likewise.
12427         (genrtl_compound_stmt): Likewise.
12428         (genrtl_asm_stmt): Likewise.
12429         (genrtl_named_return_value): Likewise.
12430         (genrtl_begin_stmt_expr): Likewise.
12431         (genrtl_finish_stmt_expr): Likewise.
12432         (finish_for_stmt): Removed first argument.
12433         (finish_switch_stmt): Likewise.
12434
12435         * semantics.c (genrtl_try_block): Define function.
12436         (genrtl_handler): Likewise.
12437         (genrtl_catch_block): Likewise.
12438         (genrtl_ctor_stmt): Likewise.
12439         (genrtl_subobject): Likewise.
12440         (genrtl_decl_cleanup): Likewise.
12441         (genrtl_do_poplevel): Likewise.
12442         (genrtl_do_pushlevel): Likewise.
12443         (genrtl_clear_out_block): Likewise.
12444         (genrtl_goto_stmt): Likewise.
12445         (genrtl_expr_stmt): Likewise.
12446         (genrtl_decl_stmt): Likewise.
12447         (genrtl_if_stmt): Likewise.
12448         (genrtl_while_stmt): Likewise.
12449         (genrtl_do_stmt): Likewise.
12450         (genrtl_return_stmt): Likewise.
12451         (genrtl_for_stmt): Likewise.
12452         (genrtl_break_stmt): Likewise.
12453         (genrtl_continue_stmt): Likewise.
12454         (genrtl_scope_stmt): Likewise.
12455         (genrtl_switch_stmt): Likewise.
12456         (genrtl_case_label): Likewise.
12457         (genrtl_begin_compound_stmt): Likewise.
12458         (genrtl_finish_compound_stmt): Likewise.
12459         (genrtl_compound_stmt): Likewise.
12460         (genrtl_asm_stmt): Likewise.
12461         (genrtl_named_return_value): Likewise.
12462         (genrtl_begin_stmt_expr): Likewise.
12463         (genrtl_finish_stmt_expr): Likewise.
12464         (finish_for_stmt): Removed first argument and generate rtl
12465         specific code.
12466         (finish_switch_stmt): Likewise.
12467         (do_poplevel): Removed generate rtl specific code.
12468         (do_pushlevel): Likewise.
12469         (add_tree): Likewise.
12470         (finish_goto_stmt): Likewise.
12471         (finish_expr_stmt): Likewise.
12472         (begin_if_stmt): Likewise.
12473         (finish_if_stmt_cond): Likewise.
12474         (finish_then_clause): Likewise.
12475         (begin_else_clause): Likewise.
12476         (finish_else_clause): Likewise.
12477         (finish_if_stmt): Likewise.
12478         (clear_out_block): Likewise.
12479         (begin_while_stmt): Likewise.
12480         (finish_while_stmt_cond): Likewise.
12481         (finish_while_stmt): Likewise.
12482         (begin_do_stmt): Likewise.
12483         (finish_do_body): Likewise.
12484         (finish_do_stmt): Likewise.
12485         (finish_return_stmt): Likewise.
12486         (begin_for_stmt): Likewise.
12487         (finish_for_init_stmt): Likewise.
12488         (finish_for_cond): Likewise.
12489         (finish_for_expr): Likewise.
12490         (finish_break_stmt): Likewise.
12491         (finish_continue_stmt): Likewise.
12492         (begin_switch_stmt): Likewise.
12493         (finish_switch_cond): Likewise.
12494         (finish_case_label): Likewise.
12495         (begin_try_block): Likewise.
12496         (begin_function_try_block): Likewise.
12497         (finish_try_block): Likewise.
12498         (finish_cleanup_try_block): Likewise.
12499         (finish_cleanup): Likewise.
12500         (finish_function_try_block): Likewise.
12501         (finish_handler_sequence): Likewise.
12502         (finish_function_handler_sequence): Likewise.
12503         (begin_handler): Likewise.
12504         (finish_handler_parms): Likewise.
12505         (begin_catch_block): Likewise.
12506         (finish_handler): Likewise.
12507         (begin_compound_stmt): Likewise.
12508         (finish_compound_stmt): Likewise.
12509         (finish_asm_stmt): Likewise.
12510         (finish_label_stmt): Likewise.
12511         (finish_label_decl): Likewise.
12512         (finish_subobject): Likewise.
12513         (finish_decl_cleanup): Likewise.
12514         (finish_named_return_value): Likewise.
12515         (begin_stmt_expr): Likewise.
12516         (finish_stmt_expr): Likewise.
12517
12518         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
12519         to call genrtl_expr_stmt when appropriate.
12520
12521         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
12522         begin_compound_expr to call genrtl_begin_stmt_expr and
12523         genrtl_begin_compound_expr when appropriate.
12524         (finish_init_stmts): Changed calls to finish_compound_expr and
12525         finish_stmt_expr to call genrtl_finish_compound_expr and
12526         genrtl_finish_stmt_expr when appropriate.
12527         (expand_default_init): Changed call to finish_expr_stmt to call
12528         genrtl_expr_stmt when appropriate.
12529         (build_vec_init): Likewise.
12530
12531         * parse.y (simple_stmt): Removed first argument from call to
12532         finish_for_stmt. Removed first argument from call to
12533         finish_switch_stmt.
12534
12535         * parse.c: Regenerated.
12536
12537         * pt.c (tsubst_expr): Removed first argument from call to
12538         finish_for_stmt. Removed first argument from call to
12539         finish_switch_stmt.
12540
12541 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
12542
12543         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
12544         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
12545
12546         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
12547         (cplus_tree_code_length[]): Likewise.
12548         (cplus_tree_code_name[]): Likewise.
12549         (init_parse): Added call to add_c_tree_codes. Changed
12550         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
12551
12552 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
12553
12554         * cp-tree.h (finish_mem_initializers): Declare.
12555         (count_trees): Likewise.
12556         * parse.y (base_init): Use finish_mem_initializers.
12557         * semantics.c (finish_mem_initializers): New function.
12558
12559         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
12560         the number of trees.
12561         (n_trees): Remove.
12562         (count_trees): Don't use it.
12563
12564 2000-06-15  Jason Merrill  <jason@redhat.com>
12565
12566         * tree.c (count_trees): New debugging function.
12567
12568         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
12569         * init.c (build_member_call): Pull out the name of a DECL.
12570
12571         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
12572         * semantics.c (expand_body): Push to TV_INTEGRATION here.
12573         * optimize.c (optimize_function): Not here.
12574         * pt.c (instantiate_decl): Push to TV_PARSE.
12575
12576 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
12577
12578         * cp-tree.h (struct language_function): Remove x_base_init_list
12579         and x_member_init_list.
12580         (current_base_init_list): Remove.
12581         (current_member_init_list): Likewise.
12582         (setup_vtbl_ptr): Change prototype.
12583         (emit_base_init): Likewise.
12584         (expand_member_init): Likewise.
12585         (reinit_parse_for_function): Remove.
12586         * decl.c (save_function_data): Don't clear x_base_init_list and
12587         x_member_init_list.
12588         (mark_language_function): Don't mark them.
12589         * init.c (perform_member_init): Tweak comment.
12590         (sort_member_init): Take the list of initializers as an argument.
12591         (sort_base_init): Likewise.
12592         (emit_base_init): Likewise.
12593         (expand_member_init): Return the initializer.  Don't use global
12594         variables.
12595         * lex.c (reinit_parse_for_function): Remove.
12596         * method.c (build_template_parm_names): Correct substitution.
12597         (do_build_copy_constructor): Don't use current_member_init_list
12598         and current_base_init_list.
12599         (synthesize_method): Likewise.
12600         * parse.y (base_init): Split mem-initializers into
12601         base-initializers and field-initializers.
12602         (member_init_list): Build up the list here.
12603         (member_init): Return the initializer.
12604         (fn.depfn): Don't use reinit_parse_for_function.
12605         * parse.c: Regenerated.
12606         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
12607         ERROR_MARK.
12608         (tsubst_expr): Don't use current_member_init_list
12609         and current_base_init_list.
12610         (tsubst_expr_values): Rename to ...
12611         (tsubst_initializer_list): ... this.  Use convert_from_reference.
12612         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
12613         and current_base_init_list.
12614         (begin_function_definition): Don't call reinit_parse_for_function.
12615
12616         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
12617
12618         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
12619         correctly.
12620
12621         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
12622
12623 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
12624
12625         * cp-tree.h (IF_COND): Move to c-common.h.
12626         (THEN_CLAUSE): Likewise.
12627         (ELSE_CLAUSE): Likewise.
12628         (WHILE_COND): Likewise.
12629         (WHILE_BODY): Likewise.
12630         (DO_COND): Likewise.
12631         (DO_BODY): Likewise.
12632         (RETURN_EXPR): Likewise.
12633         (EXPR_STMT_EXPR): Likewise.
12634         (FOR_INIT_STMT): Likewise.
12635         (FOR_COND): Likewise.
12636         (FOR_EXPR): Likewise.
12637         (FOR_BODY): Likewise.
12638         (SWITCH_COND): Likewise.
12639         (SWITCH_BODY): Likewise.
12640         (CASE_LOW): Likewise.
12641         (CASE_HIGH): Likewise.
12642         (GOTO_DESTINATION): Likewise.
12643         (COMPOUND_BODY): Likewise.
12644         (ASM_CV_QUAL): Likewise.
12645         (ASM_STRING): Likewise.
12646         (ASM_OUTPUTS): Likewise.
12647         (ASM_INPUTS): Likewise.
12648         (ASM_CLOBBERS): Likewise.
12649         (DECL_STMT_DECL): Likewise.
12650         (STMT_EXPR_STMT): Likewise.
12651         (LABEL_STMT_LABEL): Likewise.
12652         (SCOPE_BEGIN_P): Likewise.
12653         (SCOPE_END_P): Likewise.
12654         (SCOPE_STMT_BLOCK): Likewise.
12655         (SCOPE_NULLIFIED_P): Likewise.
12656         (SCOPE_NO_CLEANUPS_P): Likewise.
12657         (SCOPE_PARTIAL_P): Likewise.
12658         (ASM_VOLATILE_P): Likewise.
12659         (STMT_LINENO): Likewise.
12660         (STMT_LINENO_FOR_FN_P): Likewise.
12661
12662         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
12663         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
12664         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
12665         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
12666         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
12667
12668         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
12669
12670         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
12671         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
12672
12673         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
12674         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
12675         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
12676
12677 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
12678
12679         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
12680         * class.c (dfs_find_final_overrider): Set it appropriately.
12681         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
12682         avoid unneeded secondary vptrs.
12683
12684 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
12685
12686         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
12687         (check_bitfield_decl, check_field_decl): Likewise.
12688         (build_vtbl_or_vbase_field, build_base_field): Likewise.
12689         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
12690         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
12691         (xfer_tag, finish_enum): Likewise.
12692         * decl2.c (finish_builtin_type): Likewise.
12693         * init.c (init_init_processing): Likewise.
12694         * pt.c (instantiate_class_template): Likewise.
12695         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
12696         * cp-tree.h (struct lang_type): Add user_align member.
12697         (CLASSTYPE_USER_ALIGN): Define.
12698
12699 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
12700
12701         * Make-lang.in (c++.install-common): Install g++-cross in
12702         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
12703         $(target_alias)-g++ and $(target_alias)-c++.
12704
12705 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
12706
12707         * class.c (vcall_offset_data_s): Add last_init and fns.
12708         (overrides): Rename to same_signature_p.
12709         (dfs_find_final_overrider): Adjust accordingly.
12710         (mark_overriders): Likewise.
12711         (warn_hidden): Likewise.
12712         (build_vtbl_initializer): Reorganize machinery for building things
12713         at negative offsets.
12714         (build_vcall_and_vbase_vtbl_entries): Likewise.
12715         (build_vbase_offset_vtbl_entries): Likewise.
12716         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
12717         offset entries.  Do not create two entries for functions with the
12718         same signature.
12719         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
12720         (build_rtti_vtbl_entries): Reorganize machinery for building things
12721         at negative offsets.
12722
12723         * optimize.c (expand_call_inline): Don't recurse into the code
12724         used to initialize the parameters more than once.
12725
12726 2000-06-11  Mark Mitchell <mark@codesourcery.com>
12727
12728         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
12729         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
12730         (find_substitution): Only use the `Sa' substitution for
12731         std::allocator, not instantiations of it.
12732         (write_template_prefix): Move comment.  Only use a TREE_LIST to
12733         represent substitutions for a member template.
12734         (write_array_type): Mangle array dimensions correctly.
12735         * optimize.c (maybe_clone_body): Copy more information from the
12736         cloned function.
12737         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
12738         on the regenerated declaration.
12739
12740 2000-06-11  Chip Salzenberg  <chip@valinux.com>
12741             Mark Mitchell <mark@codesourcery.com>
12742
12743         * class.c (build_vtable): Clarify comment.
12744         (build_ctor_vtbl_group): Pass the most derived type to
12745         build_vtable.
12746
12747 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12748
12749         * decl2.c (compare_options): Don't needlessly cast away const-ness.
12750
12751 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
12752
12753         * decl.c (add_binding): Handle duplicate declarations of external
12754         variables.
12755
12756 2000-06-09  Chip Salzenberg  <chip@valinux.com>
12757             Mark Mitchell <mark@codesourcery.com>
12758
12759         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
12760         argument.
12761         (write_signed_number): New macro.
12762         (write_unsigned_number): Likewise.
12763         (write_source_name): Use them.
12764         (write_number): Handle signed and unsigned values.
12765         (write_integer_cst): Use tree_int_cst_sgn, and use
12766         write_unsigned_number or write_signed_number as appropriate.
12767         (write_discriminator): Use write_unsigned_number or
12768         write_signed_number as appropriate.
12769         (write_template_arg_literal): Likewise.
12770         (write_array_type): Use tree_low_cst.
12771         (write_template_parm):  Use write_unsigned_number or
12772         write_signed_number as appropriate.
12773         (write_substitution): Adjust call to write_number.
12774         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
12775         (write_expression): Handle non-type template arguments of
12776         reference type correctly.
12777         (mangle_thunk): Use write_signed_number.
12778
12779 2000-06-09  Chip Salzenberg  <chip@valinux.com>
12780
12781         * mangle.c (find_substition): Don't mangle objects with typename
12782         substitutions (e.g. "cin" as "Si").
12783
12784 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
12785
12786         * call.c (add_candidate): Use ggc_alloc_cleared.
12787         * decl.c (lookup_label): Likewise.
12788         * lex.c (retrofit_lang_decl): Likewise.
12789
12790 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
12791
12792         * semantics.c (expand_body): Push to TV_EXPAND.
12793         * optimize.c (optimize_function): Push to TV_INTEGRATION.
12794         * decl.c (start_function): Always call announce_function.
12795
12796         * tinfo2.cc: Just declare abort.
12797
12798 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
12799
12800         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
12801         whenever @ is a symbolic name.
12802
12803 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
12804
12805         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
12806
12807 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
12808
12809         * decl.c (pushdecl): Look up functions by DECL_NAME, not
12810         DECL_ASSEMBLER_NAME.
12811
12812 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
12813
12814         * decl2.c (c_language): Define.
12815
12816 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
12817
12818         * lex.c (lang_init_options): Tweak.
12819
12820         * decl2.c: Remove #inclusion of diagnostic.h
12821         (lang_decode_option): Move diagnostic formatting options to
12822         toplevel.
12823
12824         * lang-options.h: Remove documentation for diagnostic options.
12825
12826         * Makefile.in (lex.o): Depends upon diagnostic.h
12827
12828 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
12829
12830         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
12831         the same DECL_RESULT, it's not a redefinition.
12832         * pt.c (tsubst_decl): Remove code to handle illegal
12833         specializations.
12834
12835 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
12836
12837         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
12838
12839 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
12840
12841         * search.c (maybe_suppress_debug_info): Don't check
12842         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
12843
12844         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
12845         here if extern_p.
12846
12847         Remember instantiation context in deferred instantiations.
12848         * cp-tree.h (struct tinst_level): Remove.
12849         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
12850         * pt.c (current_tinst_level): Now a tree.
12851         (print_template_context, push_tinst_level, pop_tinst_level,
12852         tinst_for_decl): Adjust.
12853         (reopen_tinst_level): New fn.
12854         (init_pt): Register current_tinst_level as a root.
12855         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
12856         of the pending templates list.
12857         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
12858         * lex.c (extract_interface_info): Adjust.
12859         * decl2.c (warn_if_unknown_interface): Adjust.
12860
12861 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
12862
12863         * class.c (indirect_primary_base_p): New function.
12864         (determine_primary_base): Use it.
12865
12866 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12867
12868         Update new-abi dynamic cast algorithm.
12869         * tinfo.cc (__class_type_info::__dyncast_result): Add
12870         whole_details. Adjust constructor.
12871         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
12872         Avoid unnecessary searching.
12873         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
12874
12875 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12876
12877         * decl.c (init_decl_processing): Don't call record_component_aliases.
12878         * tree.c (build_cplus_array_type_1): Likewise.
12879
12880 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
12881
12882         * ir.texi: Correct typo.
12883         * mangle.c (write_expression): Handle non-type template arguments
12884         with reference type.
12885         * method.c (build_overload_value): Likewise.
12886         * pt.c (convert_nontype_argument): Explicitly represent conversion
12887         to a reference with an ADDR_EXPR.
12888         (unify): Always unify arguments in left-to-right order.
12889
12890 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
12891             Mark Mitchell  <mark@codesourcery.com>
12892
12893         * Make-lang.in (CXX_SRCS): Add mangle.c.
12894         * Makefile.in (CXX_OBJS): Add mangle.o.
12895         (mangle.o): New rule.
12896
12897         * class.c (local_classes): New variable.
12898         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
12899         (get_vtt_name): Use mangle_vtt_name for new ABI.
12900         (init_class_processing): Initialize local_classes.
12901         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
12902         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
12903         (std_identifier): New macro.
12904         (DECL_VOLATILE_MEMFUNC_P): New macro.
12905         (DECL_NAMESPACE_STD_P): Likewise.
12906         (local_classes): Declare.
12907         (get_mostly_instantiated_function_type): Declare.
12908         (init_mangle): Declare.
12909         (mangle_decl): Likewise.
12910         (mangle_type_string): Likewise.
12911         (mangle_type): Likewise.
12912         (mangle_typeinfo_for_type): Likewise.
12913         (mangle_typeinfo_string_for_type): Likewise.
12914         (mangle_vtbl_for_type): Likewise.
12915         (mangle_vtt_for_type): Likewise.
12916         (mangle_ctor_vtbl_for_type): Likewise.
12917         (mangle_thunk): Likewise.
12918         (mangle_conv_op_name_for_type): Likewise.
12919         (mangle_guard_variable): Likewise.
12920         * decl.c (pushtag): Keep track of local classes.
12921         (initialize_predefined_identifiers): Initialize std_identifier.
12922         (init_decl_processing): Use std_identifier.
12923         (start_decl): Don't treat instantiations as specializations.
12924         (grokdeclarator): Likewise.
12925         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
12926         name for fully-instantiated templates.
12927         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
12928         destructors with the new ABI.
12929         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
12930         (grokfield): Use mangle_type for new ABI.
12931         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
12932         (get_sentry): Use mangle_guard_variable for new ABI.
12933         (start_static_initialization_or_destruction): Likewise.
12934         * expr.c (extract_aggr_init): Remove.
12935         (extract_scalar_init): Likewise.
12936         (extract_init): Remove #if 0'd code.
12937         * mangle.c: New function.
12938         * method.c (build_mangled_name): Assert not flag_new_abi.
12939         (build_static_name): Likewise.
12940         (build_decl_overload_real): Likewise.
12941         (build_typename_overload): Likewise.
12942         (build_overload_with_type): Likewise.
12943         (build_overload_name): Likewise.
12944         (get_ctor_vtbl_name): Likewise.
12945         (start_squangling): Likewise.
12946         (get_id_2): Likewise.
12947         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
12948         (init_method): Call init_mangle for new ABI.
12949         (make_thunk): Call mangle_thunk for new ABI.
12950         * operators.def: Correct new ABI manglings for the `%' operator.
12951         Add `::' operator.
12952         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
12953         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
12954         (lookup_template_class): Call mangle_decl for new ABI.
12955         (get_mostly_instantiated_function_type): New function.
12956         (set_mangled_name_for_template_decl): Use it.
12957         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
12958         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
12959         conversion op names.
12960         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
12961         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
12962         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
12963         mangle_typeinfo_string_for_type.
12964
12965 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
12966
12967         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
12968         (INNERMOST_TEMPLATE_ARGS): New macro.
12969         (innermost_args): Remove.
12970         (get_innermost_template_args): New function.
12971         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
12972         * error.c (dump_function_decl): Be caution when using
12973         most_general_template.
12974         * method.c (build_template_parm_names):  Use
12975         INNERMOST_TEMPLATE_ARGS.
12976         * pt.c (add_to_template_args): Tidy comment
12977         (get_innermost_template_args): New function.
12978         (check_explicit_specialization): Clear DECL_INITIAL for a new
12979         specialization.
12980         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
12981         Tidy.
12982         (push_template_decl): Always register specializations of the most
12983         general template.
12984         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
12985         (coerce_template_parms): Likewise.
12986         (lookup_template_class): Likewise.
12987         (innermost_args): Remove.
12988         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
12989         (tsubst_decl): Handle tricky specializations.  Use
12990         get_innermost_template_args.
12991         (instantiate_template): Simplify handling of partial
12992         instantiations.
12993         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
12994         (most_general_template): Reimplement, in a more straightforward
12995         manner.
12996         (regenerate_decl_from_template): Tweak formatting.  Use
12997         TMPL_ARGS_DEPTH for clarity.
12998         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
12999
13000         * dump.c (dequeue_and_dump): Dump information about thunks.
13001
13002 2000-06-01  Richard Henderson  <rth@cygnus.com>
13003
13004         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
13005
13006 2000-06-01  Richard Henderson  <rth@cygnus.com>
13007
13008         * decl2.c (unsupported_options): Fix typo, make const.
13009         (lang_decode_option): Fix bsearch argument order.
13010
13011 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
13012
13013         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
13014         on FIELD_DECLs.
13015
13016 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13017
13018         * cp-tree.h (c_get_alias_set): Deleted.
13019         * Makefile.in (decl.o): Include ../expr.h.
13020         * decl.c (expr.h): Include.
13021         (init_decl_processing): Call record_component_aliases for arrays.
13022         (grokdeclarator): Likewise.
13023         Set TREE_ADDRESSABLE for fields that aren't bitfields.
13024         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
13025
13026 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
13027
13028         Remove guiding declaration support.
13029         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
13030         (flag_guiding_decls): Remove.
13031         * call.c (build_user_type_conversion_1): Remove support for
13032         guiding decls.
13033         (build_new_function_call): Likewise.
13034         (build_new_op): Likewise.
13035         (build_new_method_call): Likewise.
13036         * decl.c (start_function): Likewise.
13037         * friend.c (is_friend): Likewise.
13038         (do_friend): Likewise.
13039         * decl2.c ((flag_dump_translation_unit): Make it const.
13040         (flag_guiding_decls): Remove.
13041         (unsupported_options): New variable
13042         (compare_options): New function.
13043         (lang_decode_option): Use them.
13044
13045         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
13046
13047         * method.c (mangle_expression): Adjust test for legal expression
13048         operators.
13049
13050         * pt.c (instantiate_decl): Save and restore the local
13051         specializations list.
13052
13053 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
13054
13055         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
13056
13057 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
13058
13059         * call.c (add_template_candidate_real): Handle member template
13060         constructors for classes with virtual bases.
13061         (build_user_type_conversion_1): Use in_charge_arg_for_name.
13062         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
13063
13064         * ir.texi: Update thunk documentation.
13065
13066         * call.c (joust): Fix handling of overloaded builtin operators.
13067
13068 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
13069
13070         * cp-tree.h (DECL_ANTICIPATED): New macro.
13071         Document new use of DECL_LANG_FLAG_7.
13072         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
13073         in the user namespace.
13074         * lex.c (do_identifier): If the identifier's declaration has
13075         DECL_ANTICIPATED on, it has not yet been declared.  But do not
13076         replace it with an ordinary implicit declaration.
13077
13078         * tinfo2.cc: Include stdlib.h.
13079
13080 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
13081
13082         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
13083         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
13084         CLASSTYPE_ALIGN.
13085
13086 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
13087
13088         * decl2.c (lang_decode_option): Use skip_leading_substring instead
13089         of plain strncmp.
13090
13091 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
13092
13093         * operators.def (<?): Duplicated, should have been...
13094         (>?): this.  Fixed.
13095
13096 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
13097             Mark Mitchell  <mark@codesourcery.com>
13098
13099         * cp-tree.h (ansi_opname): Make it a macro.
13100         (ansi_assopname): Likewise.
13101         (struct lang_decl_flags): Add assignment_operator_p.
13102         (struct lang_decl): Add operator_code.
13103         (DECL_VTT_PARM): Adjust.
13104         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
13105         overloaded operator.
13106         (SET_OVERLOADED_OPERATOR_CODE): New macro.
13107         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
13108         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
13109         (opname_tab): Remove.
13110         (assignop_tab): Likewise.
13111         (operator_name_info_t): New type.
13112         (operator_name_info): New variable.
13113         (assignment_operator_name_info): Likewise.
13114         (build_cp_library_fn): Remove declaration.
13115         (push_cp_library_fn): Likewise.
13116         (operator_name_string): Likewise.
13117         (build_decl_overload): Likewise.
13118         * call.c (print_z_candidates): Simplify.
13119         (build_object_call): Adjust usage of ansi_opname.  Use
13120         DECL_OVERLOADED_OPERATOR_P.
13121         (op_error): Adjust operator name lookup.
13122         (build_conditional_expr): Adjust usage of ansi_opname.
13123         (build_new_op): Likewise.
13124         (build_op_delete_call): Likewise.
13125         (build_over_call): Likewise.
13126         (joust): Use DECL_OVERLOADED_OPERATOR_P.
13127         * decl.c (duplicate_decls): Copy operator_code.
13128         (init_decl_processing): Adjust parameters to push_cp_library_fn.
13129         (builtin_function): Adjust parameters to build_library_fn_1.
13130         (build_library_fn_1): Accept an overloaded operator code.
13131         (build_library_fn): Pass ERROR_MARK.
13132         (build_cp_library_fn): Accept an overloaded operator code.
13133         (push_cp_library_fn): Likewise.
13134         (grokfndecl): Tweak.
13135         (grokdeclarator): Simplify code to compute names of overloaded
13136         operators.  Adjust use of ansi_opname.
13137         (ambi_op_p): Work on tree_codes, not identifiers.
13138         (unary_op_p): Likewise.
13139         (grok_op_properties): Likewise.
13140         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
13141         (lang_mark_tree): Don't try to mark the operator_code.
13142         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
13143         * error.c (dump_decl): Remove special handling for operator
13144         names.
13145         (dump_function_name): Likewise.
13146         (dump_expr): Adjust name lookup of operators.
13147         (op_to_string): Simplify.
13148         (assop_to_string): Likewise.
13149         * init.c (build_new_1): Adjust use of ansi_opname.
13150         * lex.c (opname_tab): Remove.
13151         (assignop_tab): Likewise.
13152         (ansi_opname): Likewise.
13153         (ansi_assopname): Likewise.
13154         (operator_name_string): Likewise.
13155         (reinit_lang_specific): Likewise.
13156         (operator_name_info): New variable.
13157         (assignment_operator_name_info): Likewise.
13158         (init_operators): New function.
13159         (init_parse): Use it.
13160         (do_identifier): Adjust use of ansi_opname.
13161         * method.c (mangle_expression): Don't use ansi_opname for
13162         mangling.
13163         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
13164         (build_decl_overload): Remove.
13165         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
13166         (do_build_assign_ref): Adjust use of ansi_opname.
13167         (synthesize_method): Likewise.
13168         (implicitly_declare_fn): Likewise.
13169         * operators.def: New file.
13170         * parse.y (operator): Adjust use of ansi_opname.
13171         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
13172         (set_mangled_name_for_template_decl): Don't play games with
13173         current_namespace.
13174         (special_function_p): Adjust use of ansi_opname.
13175         * typeck.c (check_return_expr): Likewise.
13176         * Make-lang.in (cc1plus): Depend on operators.def.
13177         * Makefile.in (lex.o): Likewise.
13178         (decl.o): Likewise.
13179
13180 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
13181
13182         * Make-lang.in (cplib2.ready): Eradicate.
13183
13184 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13185
13186         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
13187         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
13188         (built_min, cp_tree_equal): Likewise.
13189
13190 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
13191
13192         * class.c (layout_nonempty_base_or_field): Replace
13193         `record_layout_info' with `record_layout_info_s'.
13194
13195 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
13196
13197         Fix goto checking.
13198         * cp-tree.h (struct language_function): x_named_labels is now
13199         a struct named_label_list*.
13200         * decl.c (struct named_label_use_list): Renamed from...
13201         (struct named_label_list): ...this.  New struct.
13202         (push_binding_level): Don't set eh_region.
13203         (note_level_for_eh): New fn.
13204         (pop_label): Take label and old value directly.
13205         (pop_labels): Adjust for new named_labels format.
13206         (lookup_label): Likewise.
13207         (poplevel): Note characteristics of a binding level containing a
13208         named label.  Mess with named label lists earlier.
13209         (mark_named_label_lists): New fn.
13210         (mark_lang_function): Call it.
13211         (use_label): New fn, split out from...
13212         (make_label_decl): ...here.  Don't call it.
13213         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
13214         check_previous_gotos): New fns, split out from...
13215         (define_label): ...here.
13216         (check_switch_goto): New fn.
13217         (define_case_label): Call it.
13218         (check_goto): New fn.
13219         * semantics.c (finish_goto_stmt): Call it and use_label.
13220         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
13221         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
13222
13223 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
13224
13225         * class.c (build_vtable_entry_ref): Correct usage of
13226         get_vtbl_decl_for_binfo.
13227
13228         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
13229         * method.c (implicitly_declare_fn): Not here.
13230
13231 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
13232
13233         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
13234         (CPTI_PTMD_DESC_TYPE): ... here.
13235         (ptmd_desc_type_node): Rename to ...
13236         (ptm_desc_type_node): ... here.
13237         * decl.c: Likewise.
13238         * rtti.c (ptmd_initializer): Rename to ...
13239         (ptm_initializer): ... here.
13240         (sythesize_tinfo_var): Adjust. Deal with pointer to member
13241         function.
13242         (create_tinfo_types): Adjust.
13243
13244 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
13245
13246         Finish implementation of VTTs.
13247         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
13248         CPTI_VTT_PARM_IDENTIFIER.
13249         (vtt_parm_identifier): New macro.
13250         (vtt_parm_type): Likewise.
13251         (BINFO_SUBVTT_INDEX): Likewise.
13252         (BINFO_VPTR_INDEX): Likewise.
13253         (struct lang_decl): Add vtt_parm.
13254         (DECL_VTT_PARM): New macro.
13255         (DECL_USE_VTT_PARM): Likewise.
13256         (DECL_NEEDS_VTT_PARM_P): Likewise.
13257         (get_vtt_name): Declare.
13258         (build_artificial_parm): Likewise.
13259         (fixup_all_virtual_upcast_offsets): Likewise.
13260         (expand_indirect_vtbls_init): Remove.
13261         * call.c (build_new_method_call): Pass the vtt to subobject
13262         constructors and destructors.
13263         * class.c (get_vtt_name): Give it external linkage.
13264         (build_clone): Handle the magic VTT parameters for clones.
13265         (clone_function_decl): Fix typo in comment.
13266         (build_vtt): Keep track of the indices in the VTTs where various
13267         entities are stored.
13268         (build_vtt_inits): Likewise.
13269         (dfs_build_vtt_inits): Likewise.
13270         (build_ctor_vtbl_group): Tweak type of construction vtables.
13271         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
13272         primary bases, when building construction vtables.
13273         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
13274         (initialize_predefined_identifiers): Add vtt_parm_identifier.
13275         (init_decl_processing): Initialize vtt_parm_type.
13276         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
13277         (lang_mark_tree): Make vtt_parm.
13278         * decl2.c (build_artificial_parm): New function.
13279         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
13280         (grokclassfn): Use build_artificial_parm.
13281         * init.c (initialize_vtbl_ptrs): Call
13282         fixup_all_virtual_upcast_offsets directly.
13283         (perform_member_init): Use the complete subobject destructor for
13284         member cleanups.
13285         (build_vtbl_address): New function.
13286         (expand_virtual_init): Handle VTTs.
13287         * optimize (maybe_clone_body): Likewise.
13288         * search.c (fixup_all_virtual_upcast_offsets): Give it external
13289         linkage.
13290         (expand_indirect_vtbls_init): Remove.
13291         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
13292         * tree.c (make_binfo): Make them bigger.
13293
13294 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
13295
13296         * inc/cxxabi.h (__pbase_type_info): Define, based on
13297         __pointer_type_info.
13298         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
13299         (__pointer_to_member_type_info): Likewise.
13300         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
13301         (__pointer_to_member_type_info::__is_pointer_p): Remove.
13302         (__pointer_type_info::__do_catch): Rename to ...
13303         (__pbase_type_info::__do_catch): ... here. Adjust.
13304         (__pbase_type_info::__pointer_catch): Implement.
13305         (__pointer_type_info::__pointer_catch): Adjust.
13306         (__pointer_to_member_type_info::__pointer_catch): Adjust.
13307
13308 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
13309
13310         * tinfo.h (__user_type_info::contained_virtual_p): New
13311         predicate.
13312         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
13313         shaped hierarchy.
13314         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
13315         diamond shaped hierarchy. Add early out for mixed diamond and
13316         duplicate shaped hierarchy.
13317
13318 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
13319
13320         * cp-tree.h (build_delete): Change prototype.
13321         (build_vec_delete): Likewise.
13322         * call.c (build_scoped_method_call): Use special_function_kind
13323         values to indicate the kind of destruction to be done.
13324         (build_method_call): Likewise.
13325         * decl.c (finish_destructor_body): Likewise.
13326         (maybe_build_cleanup_1): Likewise.  Rename to ...
13327         (maybe_build_cleanup): ... this.
13328         * decl2.c (delete_sanity): Use special_function_kind
13329         values to indicate the kind of destruction to be done.
13330         (build_cleanup): Likewise.
13331         * init.c (perform_member_init): Likewise.
13332         (build_vec_delete_1): Likewise.
13333         (build_dtor_call): Simplify.
13334         (build_delete): Use special_function_kind
13335         values to indicate the kind of destruction to be done.
13336         (build_vbase_delete): Likewise.
13337         (build_vec_delete): Likewise.
13338
13339         * init.c (sort_member_init): Fix typo in error message generation
13340         code.
13341
13342 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
13343
13344         * semantics.c (begin_class_definition): make the packed
13345         attribute be sensitive to the "-fpack-struct" command line flag
13346
13347 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
13348
13349         Update new-abi upcast algorithm.
13350         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
13351         prototype and meaning of return value.
13352         (__si_class_type_info::__do_upcast): Likewise.
13353         (__vmi_class_type_info::__do_upcast): Likewise.
13354         * tinfo.cc (__class_type_info::__upcast_result): Replace
13355         whole2dst with part2dst. Adjust ctor.
13356         (__class_type_info::__do_upcast): Adjust call of worker function.
13357         (__class_type_info::__do_upcast): Adjust.
13358         (__si_class_type_info::__do_upcast): Adjust. Use parent's
13359         __do_upcast.
13360         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
13361         virtual base in diamond hierarchy bug.
13362
13363 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
13364
13365         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
13366         and bitfield to tinfo_fn_p.
13367         (DECL_TINFO_FN_P): Adjust.
13368         (SET_DECL_TINFO_FN_P): Likewise.
13369         (DECL_MUTABLE_P): Likewise.
13370         (DECL_C_BIT_FIELD): Likewise.
13371         (SET_DECL_C_BIT_FIELD): Likewise.
13372         (CLEAR_DECL_C_BIT_FIELD): Likewise.
13373         (DECL_UNINLINABLE): Likewise.
13374         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
13375         (handle_using_decl): Remove assertion.
13376         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
13377         to build FIELD_DECLs.
13378         (build_base_field): Likewise.
13379         (layout_class_type): Likewise.
13380         * decl.c (init_decl_processing): Likewise.
13381         (build_ptrmemfunc_type): Likewise.
13382         (grokdeclarator): Likewise.
13383         * decl2.c (grok_x_components): Likewise.
13384         * except.c (call_eh_info): Likewise.
13385         * init.c (init_init_processing): Likewise.
13386         * rtti.c (expand_class_desc): Likewise.
13387         (create_pseudo_type_info): Likewise.
13388         (get_vmi_pseudo_type_info): Likewise.
13389         (create_tinfo_types): Likewise.
13390         * ptree.c (print_lang_decl): Adjust.
13391         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
13392         before checking DECL_MUTABLE_P.
13393
13394         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
13395         parameters for template functions.
13396         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
13397         destructors as well as constructors.
13398
13399 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
13400
13401         * class.c (build_ctor_vtbl_group): Set inits.
13402         * optimize.c (maybe_clone_body): Set DECL_INLINE and
13403         DECL_THIS_INLINE appropriately for clones.
13404
13405         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
13406         (DECL_CONV_FN_P): Simplify.
13407         (DECL_OPERATOR): Remove.
13408         (language_to_string): Declare.
13409         * decl.c (duplicate_decls): Fix typo in comment.
13410         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
13411         (grok_op_properties): Use DECL_CONV_FN_P instead of
13412         IDENTIFIER_TYPENAME_P.
13413         * dump.c (dequeue_and_dump): Dump the language linkage of
13414         declarations.
13415         * error.c (language_to_string): Give it external linkage.
13416         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
13417         (implicitly_declare_fn): Set DECL_LANGUAGE.
13418         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
13419         IDENTIFIER_TYPENAME_P.
13420         (tsubst_decl): Likewise.
13421         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
13422         * semantics.c (finish_member_declaration): Don't mark members of
13423         classes declared in an extern "C" region as extern "C".
13424
13425 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13426
13427         * decl2.c (qualified_lookup_using_namespace): Look through
13428         namespace aliases.
13429
13430         * decl.c (push_using_decl): Return the old decl on namespace level.
13431
13432 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
13433
13434         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
13435         (VTT_NAME_PREFIX): New macro.
13436         (CTOR_VTBL_NAME_PREFIX): Likewise.
13437         (get_ctor_vtbl_name): New function.
13438         * class.c (get_vtable_name): Simplify.
13439         (get_vtt_name): New function.
13440         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
13441         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
13442         when a virtual base becomes primary.
13443         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
13444         VTTs.
13445         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
13446         additional parameters.
13447         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
13448         (initialize_array): New function.
13449         (build_vtt): Likewise.
13450         (build_vtt_inits): Likewise.
13451         (dfs_build_vtt_inits): Likewise.
13452         (dfs_fixup_binfo_vtbls): Likewise.
13453         (build_ctor_vtbl_group): Likewise.
13454         (initialize_vtable): Use initialize_array.
13455         (accumulate_vtbl_inits): Reimplement to handle construction
13456         vtables.
13457         (dfs_accumulate_vtbl_inits): Likewise.
13458         (bulid_vtbl_initializer): Adjust parameter name.
13459         * method.c (build_typename_overload): Remove #if 0'd code.
13460         (get_ctor_vtbl_name): New function.
13461         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
13462         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
13463
13464         * cp-tree.h (struct lang_type): Remove search_slot.
13465         (CLASSTYPE_SEARCH_SLOT): Remove.
13466         (emit_base_init): Change prototype.
13467         (initialize_vtbl_ptrs): Likewise.
13468         (expand_indirect_vtbls_init): Likewise.
13469         (clear_search_slots): Remove.
13470         * decl.c (lang_mark_tree): Don't mark search_slot.
13471         * init.c (initialize_vtbl_ptrs): Simplify.
13472         (emit_base_init): Likewise.
13473         * search.c (struct vbase_info): Document decl_ptr.
13474         (convert_pointer_to_single_level): Remove.
13475         (dfs_find_vbases): Remove.
13476         (dfs_init_base_pointers): Simplify.
13477         (dfs_clear_vbase_slots): Remove.
13478         (dfs_vtable_path_unmark): New function.
13479         (init_vbase_pointers): Simplify.
13480         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
13481         (expand_indirect_vtbls_init): Simplify.  Don't call
13482         mark_all_temps_used.
13483         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
13484         initialize_vtbl_ptrs.
13485
13486 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
13487
13488         * except.c: Add static prototypes.
13489
13490 2000-05-20  H.J. Lu  <hjl@gnu.org>
13491
13492         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
13493
13494 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
13495
13496         Don't create a separate copy of virtual bases for the
13497         CLASSTYPE_VBASECLASSES list.
13498         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
13499         (BINFO_FOR_VBASE): Remove.
13500         (CANONICAL_BINFO): Adjust.
13501         (binfo_for_vbase): New function.
13502         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
13503         instead of BINFO_FOR_VBASE.
13504         (build_vbase_pointer): Likewise.
13505         (build_secondary_vtable): Likewise.
13506         (dfs_mark_primary_bases): Likewise.
13507         (mark_primary_bases): Likewise.
13508         (layout_nonempty_base_or_field): Likewise.
13509         (dfs_set_offset_for_shared_vbases): Likewise.
13510         (dfs_set_offset_for_unshared_vbases): Likewise.
13511         (layout_virtual_bases): Likewise.  Adjust for changes to the
13512         CLASSTYPE_VBASECLASSES list.
13513         (dump_class_hierarchy_r): Use binfo_for_vbase
13514         instead of BINFO_FOR_VBASE.
13515         (dump_class_hierarchy): Likewise.
13516         (finish_vtbls): Likewise.
13517         (build_vtbl_initializer): Adjust for changes to the
13518         CLASSTYPE_VBASECLASSES list.
13519         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
13520         * decl.c (finish_destructor_body): Adjust for changes to the
13521         CLASSTYPE_VBASECLASSES list.
13522         * init.c (sort_base_init): Use binfo_for_vbase.
13523         (construct_virtual_bases): Adjust for changes to the
13524         CLASSTYPE_VBASECLASSES list.
13525         (expand_member_init): Use binfo_for_vbase.
13526         (build_vbase_delete):  Adjust for changes to the
13527         CLASSTYPE_VBASECLASSES list.
13528         * method.c (do_build_copy_constructor): Likewise.
13529         * rtti.c (get_base_offset): Use binfo_for_vbase.
13530         (expand_class_desc): Remove #if 0'd code.
13531         * search.c (struct vbase_info): Remove vbase_types.
13532         (get_base_distance):  Use binfo_for_vbase.
13533         (lookup_field_queue_p): Use CANONICAL_BINFO.
13534         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
13535         (get_pure_virtuals): Adjust for changes to the
13536         CLASSTYPE_VBASECLASSES list.
13537         (dfs_find_vbases): Use binfo_for_vbase.
13538         (dfs_init_vbase_pointers): Likewise.
13539         (init_vbase_pointers): Don't initialize vi.vbase_types.
13540         (virtual_context): Use binfo_for_vbase.
13541         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
13542         CLASSTYPE_VBASECLASSES list.
13543         (expand_indirect_vtbls_init): Simplify.
13544         (dfs_get_vbase_types): Don't replicate virtual bases.
13545         (find_vbase_instance): Use binfo_for_vbase.
13546         (binfo_for_vbase): New function.
13547         * typeck.c (get_delta_difference): Use binfo_for_vbase.
13548
13549 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
13550
13551         * decl2.c (finish_anon_union): Generalize error messages to handle
13552         anonymous structures.
13553         * init.c (perform_member_init): Remove `name' parameter.
13554         (build_field_list): New function.
13555         (sort_member_init): Handle anonymous union initialization order
13556         correctly.  Check for multiple initializations of the same union.
13557         (emit_base_init): Don't look up fields by name here.
13558         (expand_member_init): Record the result of name lookup for future
13559         reference.
13560         * typeck.c (build_component_ref): Fix formatting.
13561
13562 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
13563
13564         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
13565         * typeck.c (build_x_compound_expr): Replace warn_unused with
13566         warn_unused_value.
13567
13568         * decl2.c (lang_decode_option): Update -Wall unused flags by
13569         calling set_Wunused.
13570
13571 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
13572
13573         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
13574         * init.c (dfs_vtable_path_unmark): Remove.
13575         * search.c (marked_new_vtable_p): Likewise.
13576         (unmarked_new_vtable_p): Likewise.
13577         (dfs_search_slot_nonempty_p): Likewise.
13578         (dfs_mark): Likewise.
13579         (dfs_vtable_path_unmark): Likewise.
13580         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
13581         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
13582         (dfs_init_vbase_pointers): Remove special-case new ABI code.
13583         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
13584         (init_vbase_pointers): Simplify.
13585         (expand_indirect_vtbls_init): Likewise.
13586
13587         * class.c (copy_virtuals): New function.
13588         (build_primary_table): Use it.
13589         (build_secondary_vtable): Likewise.
13590         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
13591         indicate that no vcall offset is required.
13592         (add_virtual_function): Likewise.
13593         (modify_all_vtables): Likewise.
13594         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
13595         (dfs_accumulate_vtbl_inits): Likewise.
13596         (build_vtbl_initializer): Make changes to handle construction
13597         vtables.
13598         (dfs_build_vcall_offset_vtbl_entries): Likewise.
13599         (build_rtti_vtbl_entries): Likewise.
13600         (build_vtable_entries): Handle a NULL vcall_index.
13601
13602 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
13603
13604         * decl2.c (lang_decode_option): Fix thinko.
13605
13606 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
13607
13608         * except.c (check_handlers): New fn.
13609         * cp-tree.h: Declare it.
13610         * semantics.c (finish_handler_sequence): Call it.
13611         (finish_function_handler_sequence): Likewise.
13612         (finish_handler_parms): Set TREE_TYPE on the handler.
13613         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
13614         * search.c (get_base_distance_recursive): If protect>1, ignore
13615         special access.
13616         (get_base_distance): Don't reduce watch_access.
13617
13618 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
13619
13620         * lex.c: #include diagnostic.h.
13621         (lang_init_options): Set default prefixing rules.
13622
13623         * lang-options.h: Add -fdiagnostics-show-location=.
13624
13625         * decl2.c: #include diagnostic.h.
13626         (lang_decode_option): Handle -fdiagnostics-show-location=.
13627
13628 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
13629
13630         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
13631         * vec.cc: Revert my 2000-05-07 change.
13632
13633 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
13634
13635         * class.c (check_field_decls): Complain about non-static data
13636         members with same name as class in class with constructor.
13637
13638 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
13639
13640         * decl.c (grokdeclarator): Allow non-static data members with
13641         same name as class.
13642
13643 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
13644
13645         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
13646         and pending_inline.filename.  Update prototypes.
13647         * decl.c (define_label): Constify filename parameter.
13648         * decl2.c (warn_if_unknown_interface): Constify local char *.
13649         * input.c Constify input_source.filename. Don't declare
13650         input_filename or lineno.  Constify filename parameter to feed_input.
13651         * lex.c (init_parse): Constify parameter and return value.
13652         (cp_pragma_interface, cp_pragma_implementation): Constify
13653         filename argument.
13654         (reinit_parse_for_method, reinit_parse_for_block,
13655         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
13656         Constify local char *.
13657         * pt.c: Don't declare lineno or input_filename.
13658         (print_template_context, tsubst_friend_function, tsubst_decl,
13659         tsubst, instantiate_decl): Constify local char *.
13660         * semantics.c (expand_body): Constify local char *.
13661         * tree.c (build_srcloc): Constify filename parameter.
13662         * typeck.c (c_expand_asm_operands): Constify filename
13663         parameter.
13664
13665 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
13666
13667         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
13668         offsetof expansion.
13669
13670 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
13671
13672         * inc/cxxabi.h:  Fix typos in comment.
13673         (__base_class_info::__offset): Use a static_cast.
13674
13675 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
13676
13677         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
13678         of std::size_t and std::ptrdiff_t respectively.
13679         * tinfo.cc: Likewise.
13680         * vec.cc: Likewise.
13681
13682 2000-05-06  Richard Henderson  <rth@cygnus.com>
13683
13684         * typeck.c (build_c_cast): Don't warn integer->pointer size
13685         mismatch for constants.
13686
13687 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
13688
13689         * rtti.c (ptmd_initializer): Set non-public, if class is
13690         incomplete.
13691
13692         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
13693         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13694         __cxa_vec_delete): Likewise.
13695         * tinfo.cc (__dynamic_cast): Likewise.
13696         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13697         __cxa_vec_delete): Likewise.
13698
13699 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
13700
13701         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
13702         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
13703         (lang_decl_flags): Add vcall_offset.
13704         (THUNK_VCALL_OFFSET): Use it.
13705         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
13706         * method.c (make_thunk): Create the lang_decl here, not in
13707         emit_thunk.
13708         (emit_thunk): Make generic thunks into ordinary functions once
13709         they have been fed to expand_body.
13710         * semantics.c (expand_body): Set current_function_is_thunk here.
13711
13712 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13713
13714         * class.c (update_vtable_entry_for_fn): Prototype.
13715
13716         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
13717         and `tmpl'.
13718
13719         * search.c (dfs_build_inheritance_graph_order): Prototype.
13720
13721 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
13722
13723         * cp-tree.h (special_function_kind): Add various kinds of
13724         destructors.
13725         (special_function_p): New function.
13726         * class.c (overrides): Don't let one kind of destructor override
13727         another.
13728         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
13729         whether or not to instantiate a template.
13730         * tree.c (special_function_p): Define.
13731
13732 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
13733
13734         * cp-tree.def (THUNK_DECL): Remove.
13735         * cp-tree.h (DECL_THUNK_P): New macro.
13736         (DECL_NON_THUNK_FUNCTION_P): Likewise.
13737         (DECL_EXTERN_C_FUNCTION_P): Likewise.
13738         (SET_DECL_THUNK_P): Likewise.
13739         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
13740         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
13741         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
13742         * decl.c (decls_match): Use DECL_EXTERN_C_P.
13743         (duplicate_decls): Likewise.
13744         (pushdecl): Likewise.  Adjust thunk handling.
13745         (grokfndecl): Use DECL_EXTERN_C_P.
13746         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
13747         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
13748         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
13749         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
13750         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
13751         DECL_NO_STATIC_CHAIN.
13752         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
13753         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
13754         * search.c (covariant_return_p): Remove THUNK_DECL handling.
13755         * ir.texi: Update.
13756
13757 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
13758
13759         * tree.c (walk_tree): Set lineno.
13760
13761 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
13762
13763         * exception.cc: Update license notice.
13764         * new.cc: Likewise.
13765         * new1.cc: Likewise.
13766         * new2.cc: Likewise.
13767         * tinfo.cc: Likewise.
13768         * tinfo2.cc: Likewise.
13769         * vec.cc: Likewise.
13770         * inc/cxxabi.h: Likewise.
13771         * inc/exception: Likewise.
13772         * inc/new: Likewise.
13773         * inc/new.h: Likewise.
13774         * inc/typeinfo: Likewise.
13775
13776 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
13777
13778         * tree.c (build_target_expr_with_type): If we already have a
13779         TARGET_EXPR, just return it.
13780
13781         * optimize.c (initialize_inlined_parameters): Don't generate an
13782         EXPR_STMT if we can just use DECL_INITIAL.
13783         * decl.c (emit_local_var): Only make the initialization a
13784         full-expression if stmts_are_full_exprs_p.
13785
13786 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
13787
13788         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
13789         macro.
13790         * call.c (standard_conversion): Use it.
13791         (direct_reference_binding): Likewise.
13792         (build_over_call): Likewise.
13793         (is_properly_derived_from): Likewise.
13794         (compare_ics): Likewise.
13795         * class.c (resolves_to_fixed_type_p): Likewise.
13796         * optimize.c (declare_return_variable): Likewise.
13797         * pt.c (is_specialization_of): Likewise.
13798         (unify): Likewise.
13799         * typeck.c (comp_target_parms): Likeiwse.
13800         (build_static_cast): Likewise.
13801         (build_reinterpret_cast): Likewise.
13802         (build_const_cast): Likewise.
13803         (comp_ptr_ttypes_real): Likewise.
13804         (comp_ptr_ttypes_const): Likewise.
13805         * typeck2.c (process_init_constructor): Likewise.
13806
13807 2000-04-30  Scott Snyder <snyder@fnal.gov>
13808
13809         * decl.c (finish_destructor_body): Use the base destructor when
13810         destroying virtual bases.
13811
13812 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
13813
13814         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
13815         STMT_EXPRs.
13816         * optimize.c (struct inline_data): Add target_exprs field.
13817         (declare_return_variable): When a function returns an aggregate,
13818         use the variable declared in the TARGET_EXPR as the remapped
13819         DECL_RESULT.
13820         (expand_call_inline): Update the pending target_exprs stack.
13821         (optimize_function): Initialize the stack.
13822
13823         * decl2.c (finish_file): Fix typo in comment.
13824
13825         * method.c (emit_thunk): Don't try to return a `void' value.
13826
13827         * optimize.c (initialize_inlined_parameters): If the parameter is
13828         addressable, we need to make a new VAR_DECL, even if the
13829         initializer is constant.
13830
13831 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
13832
13833         * decl.c (grok_op_properties): Add an extra check of argtypes.
13834
13835 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
13836
13837         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
13838         variables.
13839         (initialize_inlined_parameters): Try to avoid creating new
13840         VAR_DECLs.
13841
13842 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
13843
13844         * lex.c (my_get_run_time): Remove.
13845         (init_filename_times): Use get_run_time instead of my_get_run_time.
13846         (check_newline): Likewise.
13847         (dump_time_statistics): Likewise.
13848         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
13849         of computing elapsed time explicitly.
13850
13851 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
13852
13853         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
13854         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
13855         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
13856         before calling decl_constant_value.
13857         * class.c (check_bitfield_decl): Likewise.
13858         * cvt.c (ocp_convert): Likewise.
13859         (convert): Likewise.
13860         * decl.c (compute_array_index_type): Likewise.
13861         (build_enumerator): Likewise.
13862         * decl2.c (check_cp_case_value): Likewise.
13863         * pt.c (convert_nontype_argument): Likewise.
13864         (tsubst): Likewise.
13865         * typeck.c (decay_conversion): Likewise.
13866         (build_compound_expr): Likewise.
13867         (build_reinterpret_cast): Likewise.
13868         (build_c_cast): Likewise.
13869         (convert_for_assignment): Likewise.
13870
13871 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
13872
13873         * decl.c (finish_function): Don't play games with DECL_INLINE.
13874
13875 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
13876
13877         * ir.texi: Correct typo.
13878
13879 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13880
13881         * decl.c (grokdeclarator): Reject VLAs as members.
13882
13883 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
13884
13885         * call.c (standard_conversion): Accept conversion between
13886         COMPLEX_TYPEs.
13887
13888         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
13889
13890 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
13891
13892         * decl2.c (finish_file): Remove double setup for accounting
13893         compile time.
13894
13895 2000-04-24  Robert Lipe <robertlipe@usa.net>
13896
13897         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
13898
13899 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
13900
13901         * new.cc (set_new_handler): Needs to be in std::.
13902
13903 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
13904
13905         * cp-tree.h (lang_decl): Remove pretty_function_p.
13906         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
13907         language-specific node.
13908         * decl.c (cp_make_fname_decl): Use build_decl, not
13909         build_lang_decl, to build the variables.
13910         (grokvardecl): Don't call build_lang_decl for local variables in
13911         templates.
13912         (grokdeclarator): Don't call build_lang_decl for local type
13913         declarations in templates.
13914         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
13915         zero'd memory, rather than calling memset.
13916         * pt.c: Include hashtab.h.
13917         (local_specializations): New variable.
13918         (retrieve_local_specialization): Use it.
13919         (register_local_specialization): Likewise.
13920         (tsubst_decl): Don't assume local variables have
13921         DECL_LANG_SPECIFIC.
13922         (instantiate_decl): Set up local_specializations.
13923         * Makefile.in (HTAB_H): New variable.
13924
13925 2000-04-23  Richard Henderson  <rth@cygnus.com>
13926
13927         * typeck.c (c_expand_asm_operands): Restore the original
13928         contents of the output list.
13929
13930 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
13931
13932         * ir.texi:  Document complex number representation.
13933
13934 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13935
13936         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
13937         (target_incomplete_p): New function.
13938         (tinfo_base_init): Create comdat NTBS name variable.
13939         (ptr_initializer): Add non_public parameter. Calculate it.
13940         (ptmd_initializer): Likewise.
13941         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
13942         (create_real_tinfo_var): Add non_public parameter. Use it.
13943         Push proxy into global namespace.
13944         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
13945         New enumeration.
13946         * inc/typeinfo (type_info::before, type_info::operator==):
13947         Compare __name addresses.
13948
13949         * tinfo2.cc: Remove new-abi builtins comment.
13950
13951 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
13952
13953         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
13954
13955         * call.c (joust): Exit early if we get the same function, too.
13956
13957         * decl2.c (key_method): Return NULL_TREE for template classes.
13958         (import_export_class): Don't need to check for template classes.
13959
13960 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
13961
13962         * lex.c: Remove references to cccp.c.
13963
13964 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
13965
13966         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
13967         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
13968         (DECL_DESTRUCTOR_P): Use destructor_attr.
13969         (DECL_CONST_MEMFUNC_P): Reimplement.
13970         (DECL_VOLATILE_MEMFUNC_P): Remove.
13971         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
13972         (overrides): Use DECL_DESTRUCTOR_P.
13973         (check_for_override): Likewise.
13974         * decl.c (start_function): Likewise.
13975         * decl2.c (grokfclassfn): Likewise.
13976         (check_classfn): Likewise.
13977         (grok_function_init): Likewise.
13978
13979 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
13980
13981         * decl2.c (grokfield): Issue error on illegal data member
13982         declaration.
13983
13984 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
13985
13986         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
13987
13988 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
13989
13990         * class.c (build_vtable_entry): Don't build thunks for type-info
13991         functions.
13992
13993 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
13994
13995         * decl.c (decls_match): Allow a redeclaration of a builtin to
13996         specify args while the builtin did not.
13997
13998 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
13999
14000         * cp-tree.def (THUNK_DECL): Add to documentation.
14001         * cp-tree.h (flag_huge_objects): Declare.
14002         * class.c (modify_vtable_entry): Tidy.
14003         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
14004         Calculate delta appropriately for the new ABI.
14005         (dfs_modify_vtables): Use it.
14006         (modify_all_vtables): Fix thinko in code to add overriding copies
14007         of functions to primary vtables.
14008         (build_clone): Fix typo in comment.
14009         (clone_function_decl): Correct order of destructors in vtable.
14010         (build_vbase_offset_vtbl_entries): Adjust comment.
14011         (dfs_vcall_offset_queue_p): Remove.
14012         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
14013         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
14014         (build_vtable_entry): Correct check for pure virtual functions.
14015         Don't declare flag_huge_objects.
14016         * decl.c (flag_huge_objects): Remove declaration.
14017         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
14018         Use int_size_in_bytes.
14019         (emit_thunk): Handle vcall offset thunks.
14020
14021 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14022
14023         * decl2.c (parse_time, varconst_time): Delete declarations.
14024         (finish_file): Delete LINENO declaration.
14025         START_TIME and THIS_TIME now long.
14026
14027 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
14028
14029         * class.c (build_base_field): Reformat comment.
14030
14031         * inc/cxxabi.h (stddef.h): Comment inclusion.
14032         (__base_class_info::__offset): Comment shift.
14033
14034 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
14035
14036         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
14037         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
14038         (cp_push_exception_identifier): New macro.
14039         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
14040         (DECL_BASE_DESTRUCTOR_P): Likewise.
14041         (DECL_DELETING_DESTRUCTOR_P): Likewise.
14042         (get_vtbl_decl_for_binfo): Fix formatting.
14043         (in_charge_arg_for_name): New macro.
14044         (maybe_build_cleanup_and_delete): Remove declaration.
14045         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
14046         (in_charge_arg_for_name): New function.
14047         (build_new_method_call): Use it.  Handle cloned destructors.
14048         (build_clone): Don't make the base constructor virtual.
14049         Automatically defer generated functions.
14050         (clone_function_decl): Handle destructors, too.
14051         (clone_constructors_and_destructors): Likewise.
14052         (create_vtable_ptr): Don't create a vtable entry for a cloned
14053         function.
14054         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
14055         (initialize_predefined_identifiers): Update appropriately.
14056         (finish_destructor_body): Simplify.
14057         (maybe_build_cleanup_and_delete): Remove.
14058         * except.c (expand_throw): Handle new-ABI destructors.
14059         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
14060         (build_dtor_call): New function.
14061         (build_delete): Use it.  Simplify.
14062         * optimize.c (maybe_clone_body): Handle destructors.
14063         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
14064
14065         * exception.cc (cleanup_fn): New typedef.
14066         (CALL_CLEANUP): New macro.
14067         (cp_eh_info): Use them.
14068         (__cp_push_exception): Likewise.
14069         (__cp_pop_exception): Likewise.
14070
14071 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
14072
14073         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
14074         (complete_dtor_identifier): New macro.
14075         (CLASSTYPE_FIRST_CONVERSION): Remove.
14076         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
14077         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
14078         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
14079         (CLASSTYPE_CONSTRUCTORS): Likewise.
14080         (CLASSTYPE_DESTRUCTORS): Likewise.
14081         (lang_decl): Add cloned_function.
14082         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
14083         (DECL_BASE_CONSTRUCTOR_P): Likewise.
14084         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
14085         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
14086         (DECL_CLONED_FUNCTION_P): Likewise.
14087         (DECL_CLONED_FUNCTION): Likewise.
14088         (clone_function_decl): Declare.
14089         (maybe_clone_body): Likewise.
14090         * call.c (build_user_type_conversion_1): Call complete object
14091         constructors in the new ABI.
14092         (build_new_method_call): Don't add in-charge parameters under the
14093         new ABI.
14094         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
14095         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
14096         CLASSTYPE_DESTRUCTOR_SLOT.
14097         (build_clone): New function.
14098         (clone_function_decl): Likewise.
14099         (clone_constructors_and_destructors): Likewise.
14100         (check_bases_and_members): Use it.
14101         * decl.c (iniitialize_predefined_identifiers): Initialize
14102         complete_dtor_identifier.
14103         (finish_function): Don't add extra code to a clone.
14104         (lang_mark_tree): Mark cloned_function.
14105         * decl2.c (mark_used): Don't bother trying to instantiate things
14106         we synthesized.
14107         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
14108         * method.c (set_mangled_name_for_decl): Don't treat clones as
14109         constructors.
14110         (synthesize_method): Sythesize cloned functions, not the clones.
14111         * optimize.c (inline_data): Update comment on ret_label.
14112         (remap_block): Don't assume DECL_INITIAL exists.
14113         (copy_body_r): Allow ret_label to be NULL.
14114         (maybe_clone_body): Define.
14115         * pt.c (tsubst_decl): Handle clones.
14116         (instantiate_clone): New function.
14117         (instantiate_template): Use it.
14118         (set_mangled_name_for_template_decl): Don't treat clones as
14119         constructors.
14120         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
14121         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
14122         * semantics.c (expand_body): Clone function bodies as necessary.
14123
14124         * optimize.c (remap_decl): Avoid sharing structure for arrays
14125         whose size is only known at run-time.
14126         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
14127
14128         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
14129         to has_in_charge_parm_p.
14130         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
14131         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
14132         (DECL_COPY_CONSTRUCTOR_P): New macro.
14133         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
14134         (build_user_type_conversion_1): Likewise.
14135         (convert_like_real): Likewise.
14136         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
14137         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
14138         (copy_args_p): Likewise.
14139         (grok_ctor_properties): Likewise.
14140         (start_function): Likewise.
14141         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
14142         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
14143         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
14144         * method.c (do_build_copy_constructor): Use
14145         DECL_HAS_IN_CHARGE_PARM_P.
14146         (synthesize_method): Likewise.
14147         * pt.c (instantiate_template): Remove goto.
14148         * tree.c (build_cplus_method_type): Remove mention of obstacks in
14149         comment.
14150
14151         * cp-tre.h (finish_function): Change prototype.
14152         * decl.c (end_cleanup_fn): Adjust caller.
14153         (finish_function): Take only one parameter.
14154         * decl2.c (finish_objects): Adjust caller.
14155         (finish_static_storage_duration_function): Likewise.
14156         * method.c (emit_thunk): Likewise.
14157         * parse.y: Likewise.
14158         * parse.c: Regenerated.
14159         * pt.c (instantiate_decl): Likewise.
14160         * rtti.c (synthesize_tinfo_fn): Likewise.
14161         * semantics.c (expand_body): Likewise.
14162
14163         * cp-tree.h (copy_decl): New function.
14164         * class.c (finish_struct_1): Use it.
14165         * lex.c (copy_decl): Define it.
14166         * pt.c (tsubst_decl): Likewise.
14167         * tree.c (copy_template_template_parm): Likewise.
14168
14169         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
14170         has_nonpublic_assign_ref.
14171         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
14172         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
14173         * class.c (finish_struct_methods): Don't set
14174         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
14175         (interface_only): Don't declare.
14176         (interface_unknown): Likewise.
14177
14178 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14179
14180         * tree.h (HAVE_TEMPLATES): Remove definition.
14181         * lang-options.h (-fthis-is-variable): Remove documentation.
14182
14183 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
14184
14185         * class.c (instantiate_type): Handle object-relative template-id.
14186
14187         * semantics.c (finish_expr_stmt): Call convert_to_void here.
14188         * decl.c (cplus_expand_expr_stmt): Not here.
14189
14190         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
14191         Initialize exprtype earlier.
14192
14193         * parse.y (fn.def1): Check for defining types in return types.
14194
14195         * decl.c (check_tag_decl): Notice extra fundamental types.
14196         Diagnose empty decls in classes, too.
14197
14198         * decl.c (grokdeclarator): Don't override an anonymous name if no
14199         declarator was given.
14200
14201         * cvt.c (convert_to_void): Call resolve_offset_ref.
14202
14203         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
14204
14205         * decl2.c (decl_namespace): Handle getting a type.
14206
14207         * typeck.c (build_c_cast): Re-enable warning for cast between
14208         pointer and integer of different size.
14209
14210 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
14211
14212         * inc/cxxabi.h (__pointer_type_info): Add restrict and
14213         incomplete flags.
14214         (__pointer_type_info::__pointer_catch): New virtual function.
14215         (__pointer_to_member_type_info): Derive from
14216         __pointer_type_info. Adjust.
14217         (__pointer_to_member_type_info::__do_catch): Remove.
14218         (__pointer_to_member_type_info::__is_pointer_p): Declare.
14219         (__pointer_to_member_type_info::__pointer_catch): Declare.
14220         * rtti.c (qualifier_flags): Add restrict flag.
14221         (ptmd_initializer): Reorder members.
14222         (create_tinfo_types): Expand comments. Reorder
14223         ptmd_desc_type_node members.
14224         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
14225         Implement.
14226         (__pointer_type_info::__do_catch): Move specific code into
14227         __pointer_catch. Call it.
14228         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
14229         specific catch checking. Fix void conversion check.
14230         (__pointer_to_member_type_info::__do_catch): Remove.
14231         (__pointer_to_member_type_info::__pointer_catch): Implement.
14232
14233 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14234
14235         * lex.c (init_parse): Remove traces of classof and headof.
14236         * decl2.c (flag_operator_names): Default to 1.
14237         (lang_decode_option): Do not set it for -ansi.
14238
14239 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
14240
14241         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
14242         (DECL_MAIN_VARIANT): Remove.
14243         * decl.c (duplicate_decls): Don't set it.
14244         (start_function): Likewise.
14245         (lang_mark_tree): Don't mark it.
14246         * decl2.c (defer_fn): Don't use it.
14247         * lex.c (retrofit_lang_decl): Don't set it.
14248         * pt.c (tsubst_decl): Likewise.
14249         * ptree.c (print_lang_decl): Don't print it.
14250         * typeck.c (mark_addressable): Don't use it.
14251
14252 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
14253
14254         * vec.cc: Include <new> and <exception>.
14255         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
14256         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
14257         terminate.
14258         (__cxa_vec_delete): Catch dtor exceptions.
14259
14260 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
14261
14262         Prepend __ to implementation defined names.
14263         * inc/typeinfo (type_info): Rename _name to __name.
14264         (type_info::type_info): Rename parameter.
14265         (type_info::operator==, type_info::operator!=,
14266         type_info::before): Likewise.
14267         (type_info::is_pointer_p, type_info::is_function_p,
14268         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
14269         parameters.
14270         * inc/cxxabi.h
14271         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
14272         (__pointer_type_info::__pointer_type_info): Likewise.
14273         (__pointer_type_info::is_pointer_p,
14274         __pointer_type_info::do_catch): Prepend __. Rename parameters.
14275         (__array_type_info::__array_type_info): Rename parameters.
14276         (__function_type_info::__function_type_info): Likewise.
14277         (__function_type_info::is_function_p): Prepend __.
14278         (__enum_type_info::__enum_type_info): Rename parameters.
14279         (__pointer_to_member_type_info::__pointer_to_member_type_info):
14280         Likewise.
14281         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
14282         parameters.
14283         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
14284         (__class_type_info::__class_type_info): Rename parameters.
14285         (__class_type_info::sub_kind): Prepend __. Adjust member names.
14286         (__class_type_info::upcast_result,
14287         __class_type_info::dyncast_result): Prepend __. Move definition
14288         into tinfo.cc.
14289         (__class_type_info::do_upcast, __class_type_info::do_catch,
14290         __class_type_info::find_public_src,
14291         __class_type_info::do_dyncast,
14292         __class_type_info::do_find_public_src): Prepend __. Rename
14293         parameters.
14294         (__si_class_type_info::__si_class_type_info): Rename parameters.
14295         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
14296         __si_class_type_info::do_find_public_src): Prepent __. Rename
14297         parameters.
14298         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
14299         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
14300         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
14301         parameters.
14302         (__dynamic_cast): Rename parameters.
14303         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
14304         type_info::do_catch, type_info::do_upcast): Prepend __.
14305         (contained_p, public_p, virtual_p, contained_public_p,
14306         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
14307         (__class_type_info::do_catch,
14308         __class_type_info::do_upcast): Prepend __. Adjust.
14309         (__class_type_info::__upcast_result,
14310         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
14311         Adjust.
14312         (__class_type_info::find_public_src): Prepend __. Adjust.
14313         (__class_type_info::do_find_public_src,
14314         __si_class_type_info::do_find_public_src,
14315         __vmi_class_type_info::do_find_public_src): Likewise.
14316         (__class_type_info::do_dyncast,
14317         __si_class_type_info::do_dyncast,
14318         __vmi_class_type_info::do_dyncast): Likewise.
14319         (__class_type_info::do_upcast,
14320         __si_class_type_info::do_upcast,
14321         __vmi_class_type_info::do_upcast): Likewise.
14322         (__dynamic_cast): Adjust.
14323         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
14324         (__function_type_info::is_function_p): Likewise.
14325         (__pointer_type_info::do_catch): Likewise. Adjust.
14326         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
14327         (__throw_type_match_rtti_2): Adjust.
14328         (__is_pointer): Adjust.
14329
14330 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
14331
14332         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
14333         (complete_ctor_identifier): New macro.
14334         (special_function_kind): Add sfk_copy_constructor and
14335         sfk_assignment_operator.
14336         (LOOKUP_HAS_IN_CHARGE): Remove.
14337         (cons_up_default_function): Rename to ...
14338         (implicitly_declare_fn): ... this.
14339         * call.c (build_new_method_call): Add in-charge parameters for
14340         constructors here.
14341         * class.c (add_implicitly_declared_members): Change parameter name
14342         from cant_have_assignment to cant_have_const_assignment.
14343         Replace calls to cons_up_default_function to implicitly_declare_fn.
14344         * cvt.c (ocp_convert): Use complete_ctor_identifier.
14345         * decl.c (initialize_predefined_identifiers): Initialize it.
14346         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
14347         complex expression.
14348         * init.c (expand_default_init): Don't calculate the in-charge
14349         parameter here.
14350         (build_new_1): Likewise.
14351         * lex.c (cons_up_default_function): Move to method.c.
14352         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
14353         (implicitly_declare_fn): New function.
14354         * typeck.c (build_static_cast): Use complete_ctor_identifier.
14355         (build_modify_expr): Likewise.
14356         * typeck2.c (build_functional_cast): Likewise.
14357
14358         Under the new ABI, constructors don't return `this'.
14359         * cp-tree.h (warn_reorder): Declare.
14360         (special_function_kind): New enum.
14361         (global_base_init_list): Remove declaration.
14362         (emit_base_init): Don't return a value.
14363         (check_base_init): Don't declare.
14364         (is_aggr_typedef): Likewise.
14365         * decl.c (check_special_function_return_type): New function.
14366         (return_types): Remove.
14367         (grokdeclarator): Use check_special_function_return_type.
14368         (start_function): Don't initialize ctor_label under the new ABI.
14369         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
14370         * init.c (begin_init_stmts): Move to top of file.
14371         (finish_init_stmts): Likewise.
14372         (warn_reorder): Don't declare.
14373         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
14374         value.
14375         (check_base_init): Remove.
14376         (is_aggr_typedef): Likewise.
14377         (build_new_1): Don't use the return value of a constructor.
14378         * semantics.c (setup_vtbl_ptr): Don't use the return value
14379         of emit_base_init.
14380         * typeck.c (check_return_expr): Don't magically convert return
14381         statements into `return this' in constructors under the new ABI.
14382
14383         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
14384         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
14385         (base_ctor_identifier): New macro.
14386         (base_dtor_identifier): Likewise.
14387         (deleting_dtor_identifier): Likewise.
14388         * decl.c: Don't include obstack.h.
14389         (obstack_chunk_alloc): Don't define.
14390         (obstack_chunk_free): Likewise.
14391         (struct predefined_identifier): New type.
14392         (initialize_predefined_identifiers): New function.
14393         (init_decl_processing): Use it.
14394         (debug_temp_inits): Remove.
14395         (start_method): Don't call preserve_data.
14396         (hack_incomplete_structures): Update comment.
14397         * init.c (init_init_processing): Don't initialize
14398         nelts_identifier.
14399         (build_offset_rf): Remove dead code.
14400         (build_delete): Use CLASSTYPE_N_BASECLASSES.
14401         * search.c (init_search_processing): Don't initialize
14402         vptr_identifier.
14403
14404 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14405
14406         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
14407         some sign_compare warnings.
14408
14409 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
14410
14411         Rename abi::__vmi_class_type_info members.
14412         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
14413         base_list, detail_masks members to vmi_flags, vmi_base_count,
14414         vmi_bases and vmi_flags_masks respectively.
14415         (__vmi_class_type_info::vmi_flags_masks): Rename
14416         details_unknown_mask to flags_unknown_mask.
14417         * tinfo.cc (__class_type_info::do_upcast): Adjust.
14418         (__vmi_class_type_info::do_find_public_src): Adjust.
14419         (__vmi_class_type_info::do_dyncast): Adjust.
14420         (__vmi_class_type_info::do_upcast): Adjust.
14421
14422 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
14423
14424         * tinfo.cc (convert_to_base): New function.
14425         (get_vbase_offset): Remove. Move into convert_to_base.
14426         (__vmi_class_type_info::do_find_public_src): Adjust.
14427         (__vmi_class_type_info::do_dyncast): Adjust.
14428         (__vmi_class_type_info::do_upcast): Adjust.
14429
14430 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
14431
14432         * tinfo.cc (operator=): Use __builtin_strcmp.
14433         * tinfo2.cc (before): Likewise.
14434
14435 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
14436
14437         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
14438         (DECL_SAVED_INLINE): Rename to ...
14439         (DECL_DEFERRED_FN): ... this.
14440         (in_function_p): Remove declaration.
14441         (mark_inline_for_output): Rename to ...
14442         (defer_fn): ... this.
14443         * decl.c (finish_function): Adjust call to mark_inline_for_output.
14444         (in_function_p): Remove definition.
14445         * decl2.c (saved_inlines): Rename to ...
14446         (deferred_fns): ... this.
14447         (saved_inlines_used): Rename to ...
14448         (deferred_fns_used): ... this.
14449         (mark_inline_for_output): Rename to ...
14450         (defer_fn): ... this.
14451         (finish_file): Adjust accordingly.
14452         (init_decl2): Likewise.
14453         * lex.c (cons_up_default_function): Likewise.
14454         * pt.c (mark_decl_instantiated): Likewise.
14455         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
14456         circumstances.
14457         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
14458         * semantics.c (expand_body): Defer more functions.
14459
14460 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
14461
14462         * vec.cc: New file.
14463         * Make-lang.in (CXX_LIB2FUNCS): Add it.
14464         (vec.o): Build it.
14465         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14466         __cxa_vec_delete): Declare.
14467
14468 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
14469
14470         * rtti.c (dfs_class_hint_mark): New static function.
14471         (dfs_class_hint_unmark): New static function.
14472         (class_hint_flags): Use them.
14473
14474 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
14475
14476         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
14477
14478 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
14479
14480         * cp-tree.h (instantiate_decl): Change prototype.
14481         * decl2.c (mark_used): Adjust call.
14482         * optimize.c (inlinable_function_p): Adjust handling of templates.
14483         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
14484         (do_type_instantiation): Likewise.
14485         (instantiate_decl): Defer more templates.
14486         (instantiate_pending_templates): Adjust logic to handle inline
14487         friend functions.
14488
14489         * Makefile.in (GGC_H): New variable.  Use it throughout in place
14490         of ggc.h.
14491
14492         * call.c: Don't include obstack.h.  Include ggc.h.
14493         (obstack_chunk_alloc): Don't define.
14494         (obstack_chunk_free): Likewise.
14495         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
14496         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
14497         (pop_switch): Free it.
14498
14499         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
14500
14501         * dump.c (dequeue_and_dump): Don't try to print the bit_position
14502         if we don't have a DECL_FIELD_OFFSET.
14503
14504 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
14505
14506         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
14507         special_function_p.
14508
14509 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14510
14511         * cfns.gperf (hash, libc_name_p): Prototype.
14512
14513         * rtti.c (build_dynamic_cast_1): Constification.
14514
14515         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
14516
14517         * semantics.c (deferred_type_access_control): Prototype.
14518
14519 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
14520
14521         Correct many new ABI issues regarding vbase and vcall offset
14522         layout.
14523         * cp-tree.h (BINFO_VTABLE): Document.
14524         (struct lang_type): Tweak formatting.
14525         (BINFO_PRIMARY_BINFO): Add to documentation.
14526         (CLASSTYPE_VSIZE): Fix typo in comment.
14527         (CLASSTYPE_VBASECLASSES): Update documentation.
14528         (BINFO_VBASE_MARKED): Remove.
14529         (SET_BINFO_VBASE_MARKED): Likewise.
14530         (CLEAR_BINFO_VBASE_MARKED): Likewise.
14531         (BINFO_FIELDS_MARKED): Remove.
14532         (SET_BINFO_FIELDS_MARKED): Likewise.
14533         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
14534         (enum access_kind): New enumeration.
14535         (num_extra_vtbl_entries): Remove declaration.
14536         (size_extra_vtbl_entries): Likewise.
14537         (get_vtbl_decl_for_binfo): New function.
14538         (dfs_vbase_unmark): Remove declaration.
14539         (mark_primary_bases): Likewise.
14540         * class.c (SAME_FN): Remove.
14541         (struct vcall_offset_data_s): Move definition.
14542         (build_vbase_pointer): Use `build', not `build_binary_op', to
14543         access the vbase pointer under the new ABI.
14544         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
14545         (build_primary_vtable): Likewise.
14546         (dfs_mark_primary_bases): Move here from search.c.
14547         (mark_primary_bases): Likewise.
14548         (determine_primary_bases): Under the new ABI, don't make a base
14549         class a primary base just because we don't yet have any virtual
14550         functions.
14551         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
14552         (num_vfun_entries): Remove.
14553         (dfs_count_virtuals): Likewise.
14554         (num_extra_vtbl_entries): Likewise.
14555         (size_extra_vtbl_entries): Likewise.
14556         (layout_virtual_bases): Iterate in inheritance graph order under
14557         the new ABI.
14558         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
14559         indicate that a vfield is present.
14560         (init_class_processing): Initialize access_public_node, etc., from
14561         ak_public, etc.
14562         (get_vtbl_decl_for_binfo): New function.
14563         (dump_class_hierarchy_r): Likewise.
14564         (dump_class_hierarchy): Use it.
14565         (finish_vtbls): Build the vtbls in inheritance graph order.
14566         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14567         (initialize_vtable): Use get_vtbl_decl_for_binfo.
14568         (accumulate_vtbl_inits): Add comments explaining why a pre-order
14569         walk is required.
14570         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
14571         where the vptr points, even for primary vtables.
14572         (build_vtbl_initializer): Adjust handling of vbase and vcall
14573         offsets.
14574         (build_vcall_and_vbase_vtable_entries): New function.
14575         (dfs_build_vbase_offset_vtbl_entries): Remove.
14576         (build_vbase_offset_vtbl_entries): Reimplement.
14577         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
14578         were already handled in a primary base class vtable.
14579         (build_vcall_offset_vtbl_entries): Adjust.
14580         (build_rtti_vtbl_entries): Adjust.
14581         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
14582         * init.c (expand_virtual_init): Simplify.
14583         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
14584         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
14585         * search.c (BINFO_ACCESS): New macro.
14586         (SET_BINFO_ACCESS): Likewise.
14587         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
14588         (access_in_type): Likewise.
14589         (dfs_accessible_p): Likewise.
14590         (protected_accessible_p): Likewise.
14591         (lookup_fnfields_1): Adjust documentation.
14592         (dfs_mark_primary_bases): Move to class.c
14593         (mark_primary_bases): Likewise.
14594         (dfs_vbase_unmark): Remove.
14595         (virtual_context): Use BINFO_FOR_VBASE.
14596         (dfs_get_vbase_types): Simplify.
14597         (dfs_build_inheritance_graph_order): New function.
14598         (get_vbase_types): Use it.
14599         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
14600
14601         * tinfo.cc (get_vbase_offset): New function.
14602         (__vmi_class_type_info::do_find_public_src): Use it.
14603         (__vmi_class_type_info::do_dyncast): Likewise.
14604         (__vmi_class_type_info::do_upcast): Likewise.
14605
14606 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
14607
14608         * lang-specs.h: Pass -fno-show-column to the preprocessor.
14609
14610 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
14611
14612         * rtti.c (class_hint_flags): Rename flags.
14613         (class_initializer): Remove flags.
14614         (synthesize_tinfo_var): Combine offset and flags. Add flags
14615         for __vmi_class_type_info.
14616         (create_tinfo_types): Remove flags from __class_type_info and
14617         __si_class_type_info. Merge flags and offset from
14618         base_class_type_info.
14619         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
14620         (__base_class_info::is_virtual_p): Adjust.
14621         (__base_class_info::is_public_p): Adjust.
14622         (__base_class_info::offset): New accessor.
14623         (__class_type_info::details): Remove member.
14624         (__class_type_info::__class_type_info): Lose details.
14625         (__class_type_info::detail_masks): Remove.
14626         (__si_class_type_info::__si_class_type_info): Lose details.
14627         (__vmi_class_type_info::details): New member.
14628         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
14629         (__vmi_class_type_info::detail_masks): New member.
14630         * tinfo.cc (__class_type_info::do_upcast): Initialize result
14631         with unknown_details_mask.
14632         (__vmi_class_type_info::do_find_public_src): Adjust
14633         (__vmi_class_type_info::do_dyncast): Adjust.
14634         (__vmi_class_type_info::do_upcast): Set result details, if
14635         needed. Adjust.
14636         (__dynamic_cast): Temporarily #if out optimization.
14637
14638 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
14639
14640         * rtti.c (get_tinfo_decl): Mark used.
14641         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
14642         mark as dealt with, if we output it.
14643
14644 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
14645
14646         * class.c: Reorganize to put virtual function table initialization
14647         machinery at the end of the file.
14648
14649 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
14650
14651         * class.c (finish_struct): Use bitsize_zero_node.
14652         * pt.c (instantiate_class_template): Likewise.
14653
14654 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
14655
14656         Put RTTI entries at negative offsets in new ABI.
14657         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
14658         vbase offset at index -3, not -1.
14659         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
14660         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
14661         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
14662         (build_rtti_vtbl_entries): New function.
14663         (set_rtti_entry): Remove.
14664         (build_primary_vtable): Don't use it.
14665         (build_secondary_vtable): Likewise.
14666         (start_vtable): Remove.
14667         (first_vfun_index): New function.
14668         (set_vindex): Likewise.
14669         (add_virtual_function): Don't call start_vtable.  Do call
14670         set_vindex.
14671         (set_primary_base): Rename parameter.
14672         (determine_primary_base): Likewise.
14673         (num_vfun_entries): Don't use skip_rtti_stuff.
14674         (num_extra_vtbl_entries): Include RTTI information.
14675         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
14676         (skip_rtti_stuff): Remove.
14677         (dfs_modify_vtables): Don't use it.
14678         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
14679         (layout_nonempty_base_or_field): Update size handling.
14680         (create_vtable_ptr): Tweak.
14681         (layout_class_type): Adjust parameter names.
14682         (finish_struct_1): Simplify.
14683         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
14684         (skip_rtti_stuff): Remove.
14685         (first_vfun_index): New function.
14686         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
14687         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
14688         (marked_vtable_pathp): Declare.
14689         (unmarked_vtable_pathp): Likewise.
14690         * error.c (dump_expr): Use first_vfun_index to calculate vtable
14691         offsets.
14692         * rtti.c (build_headof): Look for RTTI at negative offsets.
14693         (get_tinfo_decl_dynamic): Likewise.
14694         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
14695         here.
14696         (create_pseudo_type_info): Do it here instead.  Adjust so that
14697         vptr points at first virtual function.
14698         * search.c (marked_vtable_pathp): Make it global.
14699         (unmarked_vtable_pathp): Likewise.
14700         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
14701         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
14702         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
14703         (get_pure_virtuals): Likewise.
14704         (expand_upcast_fixups): Likewise.
14705         * tree.c (debug_binfo): Likewise.
14706         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
14707         negative offset.
14708
14709 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14710
14711         * class.c (check_field_decl): Fix typo.
14712         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
14713         (check_methods): Likewise.
14714         (check_field_decls): Likewise.
14715         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
14716         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
14717         Use DECL_RESULT_FLD, not DECL_RESULT.
14718         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
14719         * lex.c (identifier_type): Likewise.
14720         * pt.c (determine_specialization, lookup_template_class): Likewise.
14721         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
14722         (resolve_overloaded_unification, more_specialized): Likewise.
14723         * semantics.c (finish_member_declaration): Likewise.
14724         * typeck.c (build_x_function_call): Likewise.
14725
14726 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
14727
14728         * class.c (layout_empty_base): Handle empty bases with non-byte
14729         alignment.
14730         (build_base_field): Likewise.
14731         (layout_virtual_bases): Likewise.
14732
14733         * class.c (finish_struct_1): Fix typo in this change:
14734
14735         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14736
14737 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
14738
14739         * decl.c (grokdeclarator): Count partial specializations when
14740         keeping track of how many template classes have been seen.
14741
14742         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
14743
14744 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14745
14746         * class.c (build_vbase_pointer_fields): layout_field now place_field.
14747         (get_vfield_offset): Use byte_position.
14748         (set_rtti_entry): Set OFFSET to ssizetype zero.
14749         (get_binfo_offset_as_int): Deleted.
14750         (dfs_record_base_offsets): Use tree_low_cst.
14751         (dfs_search_base_offsets): Likewise.
14752         (layout_nonempty_base_or_field): Reflect changes in RLI format
14753         and call byte_position.
14754         (layout_empty_base): Convert offset to ssizetype.
14755         (build_base_field): use rli_size_unit_so_far.
14756         (dfs_propagate_binfo_offsets): Do computation in proper type.
14757         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
14758         (layout_class_type): Reflect changes in RLI names and fields.
14759         (finish_struct_1): Set DECL_FIELD_OFFSET.
14760         * dump.c (dequeue_and_dump): Call bit_position.
14761         * expr.c (cplus_expand_constant): Use byte_position.
14762         * rtti.c (expand_class_desc): Use bitsize_one_node.
14763         * typeck.c (build_component_addr): Use byte_position and don't
14764         special case for zero offset.
14765
14766 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
14767
14768         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
14769
14770         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
14771         tinfo object.
14772         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
14773         vtable.
14774
14775 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14776
14777         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
14778         DECL_P macros.
14779         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
14780         make_typename_type, check_initializer, cp_finish_decl,
14781         xref_tag): Likewise.
14782         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
14783         decl_namespace, arg_assoc_template_arg, arg_assoc,
14784         validate_nonmember_using_decl, do_class_using_decl): Likewise.
14785         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
14786         args_to_string): Likewise.
14787         * friend.c (is_friend): Likewise.
14788         * lex.c (note_got_semicolon, note_list_got_semicolon,
14789         is_global): Likewise.
14790         * method.c (build_overload_nested_name, build_overload_value,
14791         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
14792         * parse.y (typename_sub, typename_sub1): Likewise.
14793         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
14794         process_partial_specialization, convert_template_argument,
14795         template_args_equal, add_pending_template, lookup_template_class,
14796         for_each_template_parm_r, maybe_fold_nontype_arg,
14797         tsubst, instantiate_template, type_unification_real, unify,
14798         instantiate_pending_templates, set_mangled_name_for_template_decl):
14799         Likewise.
14800         * repo.c (repo_get_id, repo_template_used): Likewise.
14801         * search.c (lookup_field_1): Likewise.
14802         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
14803         * xref.c (classname): Likewise.
14804
14805 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
14806
14807         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
14808         (CANONICAL_BINFO): New macro.
14809         (BINFO_NEW_VTABLE_MARKED): Use it.
14810         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
14811         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
14812         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
14813         not TREE_TYPE.
14814         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14815         (build_secondary_vtable): Likewise.
14816         (dfs_finish_vtbls): Likewise.
14817         (dfs_accumulate_vtbl_inits): Likewise.
14818         (accumulate_vtbl_inits): New function.
14819         (finish_vtbls): Make sure that virtual bases come after
14820         non-virtual bases in the vtable group.
14821         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
14822         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14823         * search.c (struct vbase_info): Move definition.
14824         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14825         (unmarked_new_vtable_p): Likewise.
14826         (dfs_mark_vtable_path): Remove.
14827         (dfs_mark_new_vtable): Remove.
14828         (dfs_unmark_new_vtable): Likewise.
14829         (dfs_clear_search_slot): Likewise.
14830         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
14831         (dfs_clear_vbase_slots): Likewise.
14832         (init_vbase_pointers): LIkewise.
14833
14834 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
14835
14836         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
14837         SIZETYPE to a non-SIZETYPE.
14838
14839 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
14840
14841         * class.c (layout_virtual_bases): Adjust names in conditionally
14842         compiled code.
14843
14844         * class.c (record_base_offsets): New function.
14845         (layout_conflict_p): Likewise.
14846         (layout_nonempty_base_or_field): Use it.
14847         (layout_empty_base): New function.
14848         (build_base_field): Use it.
14849         (build_base_fields): Update comment.
14850         (layout_virtual_bases): Fold in a little code form
14851         layout_basetypes.  Use layout_empty_base.
14852         (layout_basetypes): Remove.
14853         (end_of_class): New function.
14854         (layout_class_type): Use it.  Adjust.
14855
14856         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
14857         (fntype_p): Remove.
14858         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
14859         comment.
14860         (dfs_skip_nonprimary_vbases_markedp): Likewise.
14861         * typeck.c (fntype_p): Remove.
14862
14863         * cp-tree.h (TI_SPEC_INFO): Remove.
14864         (CLASSTYPE_TI_SPEC_INFO): Likewise.
14865         * pt.c (process_partial_specialization): Likewise.
14866
14867         * class.c (build_base_field): Fix thinko in computation of binfo
14868         offsets.
14869
14870         * tree.c (mark_local_for_remap_p): Mark variables declared in
14871         TARGET_EXPRs as well.
14872
14873 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
14874
14875         * typeck.c (require_complete_type, complete_type,
14876         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
14877         build_array_ref, convert_arguments, pointer_diff,
14878         build_x_unary_op, build_unary_op, build_c_cast,
14879         build_modify_expr): Use COMPLETE_TYPE_P etc.
14880         * call.c (is_complete, convert_like_real,
14881         build_new_method_call): Likewise.
14882         * class.c (build_vbase_pointer_fields, check_bases,
14883         build_base_field, finish_struct_1, pushclass): Likewise.
14884         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
14885         * decl.c (maybe_process_template_type_declaration, pushtag,
14886         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
14887         layout_var_decl, check_initializer, cp_finish_decl,
14888         grokdeclarator, require_complete_types_for_parms,
14889         grok_op_properties, xref_tag, xref_basetypes,
14890         check_function_type): Likewise.
14891         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
14892         * friend.c (do_friend): Likewise.
14893         * init.c (build_offset_ref): Likewise.
14894         * parse.y (structsp): Likewise.
14895         * pt.c (maybe_process_partial_specialization,
14896         tsubst_friend_function, instantiate_class_template, tsubst,
14897         do_type_instantiation, instantiate_pending_templates): Likewise.
14898         * repo.c (repo_get_id): Likewise.
14899         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
14900         synthesize_tinfo_var, emit_support_tinfos): Likewise.
14901         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
14902         * semantics.c (begin_class_definition): Likewise.
14903         * tree.c (build_cplus_method_type): Likewise.
14904         * typeck2.c (digest_init, build_functional_cast,
14905         add_exception_specifier): Likewise.
14906         * parse.h, parse.c: Regenerated.
14907
14908 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
14909
14910         * inc/cxxabi.h: New header file. Define new-abi entry points.
14911         (__pointer_type_info::target): Rename member to ...
14912         (__pointer_type_info::type): ... here.
14913         (__base_class_info::type): Rename member to ...
14914         (__base_class_info::base): ... here.
14915         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
14916         * cp-tree.h (CPTI_ABI): New global tree enumeration.
14917         (abi_node): New global tree node.
14918         * decl.c (abi_node): Document.
14919         (init_decl_processing): Initialize abi_node.
14920         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
14921         (get_vmi_pseudo_type_info): Likewise.
14922         (create_tinfo_types): Likewise.
14923         (emit_support_tinfos): Likewise.
14924         * tinfo.h (cxxabi.h): Include for new-abi.
14925         Move rtti class definitions to new header file.
14926         * tinfo.cc (abi): Use the namespace.
14927         (std): Move new abi rtti classes from here ...
14928         (__cxxabiv1): ... to here.
14929         * tinfo2.cc (cxxabi.h): Include for new-abi.
14930         Move rtti class definitions to new header file.
14931         (std): Move new abi rtti classes from here ...
14932         (__cxxabiv1): ... to here.
14933         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
14934         namespace.
14935
14936 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
14937             Jason Merrill  <jason@casey.cygnus.com>
14938
14939         * method.c (build_overload_int): Use host_integerp.
14940
14941 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14942
14943         * init.c (build_offset_ref): Handle the case of a templated member
14944         function.
14945
14946 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14947
14948         * except.c (expand_exception_blocks): Clear catch_clauses_last.
14949
14950 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
14951
14952         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
14953         * class.c (check_bitfield_decl): Turn illegal bitfields into
14954         non-bitfields.
14955         (dfs_propagate_binfo_offsets): Adjust for new size_binop
14956         semantics.
14957         (dfs_offset_for_unshared_vbases): Likewise.
14958         * cvt.c (cp_convert_to_pointer): Convert NULL to a
14959         pointer-to-member correctly under the new ABI.
14960         * expr.c (cplus_expand_constant): Don't use cp_convert when
14961         turning an offset into a pointer-to-member.
14962         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
14963         when dereferencing them under the new ABI.
14964         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
14965         of pointers-to-members under the new ABI.
14966
14967         * class.c (check_bitfield_decl): Remove restriction on really long
14968         bitfields.
14969         (layout_class_type): Implement new ABI handling of bitfields
14970         longer than their types.
14971
14972 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14973
14974         * parse.y (extdefs): Call ggc_collect.
14975         * parse.c: Regenerated.
14976
14977 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
14978
14979         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
14980         (note_name_declared_in_class): Use OVL_CURRENT to get at a
14981         potential overload.
14982
14983 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14984
14985         * class.c (build_vbase_path): Use integer_zerop.
14986         (build_vtable_entry): Use tree_low_cst.
14987         (get_vfield_offset): Use bit_position.
14988         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
14989         Use tree_low_cst.
14990         (check_bitfield_decl): Set DECL_SIZE using convert.
14991         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
14992         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
14993         Use tree_low_cst.
14994         (finish_struct_1): Use bit_position.
14995         (dump_class_hierarchy): Use tree_low_cst.
14996         * cp-tree.h (min_precision): Add declaration.
14997         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
14998         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
14999         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
15000         * expr.c (cplus_expand_constant): Use bit_position.
15001         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
15002         * rtti.c (get_base_offset): Use bit_position.
15003         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
15004         host_integerp, and tree_low_cst.
15005         (pointer_int_sum): Use integer_zerop.
15006         (build_component_addr): Use bit_position.
15007
15008 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
15009
15010         * typeck.c (require_complete_type): Don't assume size_zero_node.
15011         (complete_type_or_else): Likewise.
15012
15013 2000-03-16  Steven Grady <grady@digitaldeck.com>
15014             Jason Merrill  <jason@casey.cygnus.com>
15015
15016         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
15017
15018 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
15019
15020         * decl2.c (grokfield): Bail out if type is error_mark_node.
15021
15022 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
15023
15024         * tinfo2.cc (__ptr_to_member_data): Rename to ...
15025         (__pointer_to_member_data): ... here. Adjust.
15026         * rtti.c (create_tinfo_types): Adjust.
15027
15028 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
15029
15030         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
15031         * decl.c (ref_desc_type_node): Undocument.
15032         * rtti.c (ptr_ref_initializer): Rename to ...
15033         (ptr_initializer): ... here. Adjust comments.
15034         (ptmd_initializer): Fix comment thinko.
15035         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
15036         (create_tinfo_types): Remove ref_desc_type_node init.
15037         * tinfo2.cc (__reference_type_info): Remove.
15038
15039 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
15040
15041         * decl.c (cp_finish_decl): Remove obsolete comment.
15042
15043         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
15044
15045 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
15046
15047         * cp-tree.h: Tweak documentation.
15048         * class.c (build_vbase_pointer_fields): Layout the fields, too.
15049         (avoid_overlap): Remove.
15050         (get_binfo_offset_as_int): New function.
15051         (dfs_serach_base_offsets): Likewise.
15052         (layout_nonempty_base_or_field): Likewise.
15053         (build_base_field): Layout fields here.  Avoid placing two objects
15054         of the same type at the same address, under the new ABI.
15055         (build_base_fields): Adjust accordingly.
15056         (create_vtable_ptr): Return the new field, but don't attach it to
15057         TYPE_FIELDS.
15058         (remove_base_field): Remove.
15059         (remove_base_fields): Remove.
15060         (layout_basetypes): Adjust accordingly.
15061         (layout_class_type): Call layout_field for each field, rather than
15062         just making a wholesale call to layout_type.
15063
15064 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
15065
15066         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
15067
15068 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
15069
15070         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
15071
15072         * except.c (dtor_nothrow): New fn.
15073         (do_pop_exception): Use it.  Take type parm.
15074         (push_eh_cleanup): Take type parm.
15075         (expand_start_catch_block): Pass it.
15076         (build_eh_type_type_ref): Accept null type.
15077
15078 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
15079
15080         * cp-tree.h (revert_static_member_fn): Change prototype.
15081         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
15082         (grok_op_properties): Likewise.
15083         (start_function): Likewise.
15084         (revert_static_member_fn): Simplify.
15085         * pt.c (check_explicit_specialization): Adjust call to
15086         revert_static_member_fn.
15087
15088 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
15089
15090         * cp-tree.h (scope_kind): New type.
15091         (tmpl_spec_kind): Likewise.
15092         (declare_pseudo_global_level): Remove.
15093         (pseudo_global_level_p): Rename to template_parm_scope_p.
15094         (pushlevel): Remove declaration.
15095         (begin_scope): New function.
15096         (finish_scope): Likewise.
15097         (current_tmpl_spec_kind): Likewise.
15098         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
15099         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
15100         Add template_spec_p.
15101         (toplevel_bindings_p): Adjust.
15102         (declare_pseudo_global_level): Remove.
15103         (pseudo_global_level_p): Rename to template_parm_scope_p.
15104         (current_tmpl_spec_kind): New function.
15105         (begin_scope): Likewise.
15106         (finish_scope): Likewise.
15107         (maybe_push_to_top_level): Adjust.
15108         (maybe_process_template_type_declaration): Likewise.
15109         (pushtag): Likewise.
15110         (pushdecl_nonclass_level): Likewise.
15111         (lookup_tag): Likewise.
15112         (grokfndecl): Handle member template specializations.  Share
15113         constructor and non-constructor code.
15114         * decl2.c (check_classfn): Handle member template specializations.
15115         * pt.c (begin_template_parm_list): Use begin_scope.
15116         (begin_specialization): Likewise.
15117         (end_specialization): Likewise.
15118         (check_explicit_specialization): Use current_tmpl_spec_kind.
15119         Handle member template specializations.
15120         (end_template_decl): Use finish_scope.  Remove call to
15121         get_pending_sizes.
15122         (push_template_decl_real): Remove bogus error message.
15123         (tsubst_decl): Fix typo in code contained in comment.
15124         (instantiate_template): Handle member template specializations.
15125         (most_general_template): Likewise.
15126
15127 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
15128
15129         * lex.c (whitespace_cr): Compress consecutive calls to warning().
15130         (do_identifier): Ditto for error().
15131
15132         * pt.c (convert_nontype_argument): Ditto for cp_error().
15133         (convert_template_argument): Ditto for cp_pedwarn().
15134
15135 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
15136
15137         * exception.cc (__check_null_eh_spec): New fn.
15138         * except.c (expand_end_eh_spec): Call it if the spec is throw().
15139
15140 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
15141
15142         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
15143         * except.c (expand_end_eh_spec): Add the return type.
15144         * rtti.c (throw_bad_cast): Add the parmtypes.
15145         (throw_bad_typeid): Likewise.
15146
15147         * semantics.c (expand_stmt): Only leave out rtl for unused
15148         artificials, and set DECL_IGNORED_P on them as well.
15149         * decl.c (wrapup_globals_for_namespace): Likewise.
15150
15151 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
15152
15153         * decl.c (maybe_commonize_var): Skip all artificial decls.
15154         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
15155
15156 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
15157
15158         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
15159         * cp-tree.h: Declare flag_enforce_eh_specs.
15160         * decl.c (store_parm_decls, finish_function): Check it.
15161
15162         C library functions don't throw.
15163         * Makefile.in (cfns.h): New target.
15164         (except.o): Depend on it.
15165         * Make-lang.in (cc1plus): Depend on cfns.gperf.
15166         * cfns.gperf: New file.
15167         * cfns.h: Generated.
15168         * except.c: Include it.
15169         (nothrow_libfn_p): New fn.
15170         * decl.c (grokfndecl): Use it.
15171         * cp-tree.h: Declare it.
15172
15173         * decl.c (push_overloaded_decl_1, auto_function,
15174         define_function): Lose.
15175         (build_library_fn_1): New static fn.
15176         (builtin_function): Use it.
15177         (get_atexit_node): Use build_library_fn_ptr.
15178         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
15179         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
15180         push_void_library_fn, push_throw_library_fn): New fns.
15181         * cp-tree.h: Declare them.
15182         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
15183         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
15184         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
15185         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
15186         * rtti.c (build_runtime_decl): Lose.
15187         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
15188         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
15189         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
15190
15191         * call.c (build_call): Remove result_type parm.
15192         Call mark_used on unused artificial fns.
15193         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
15194
15195 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
15196
15197         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
15198         appropriate.
15199         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
15200         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
15201         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
15202         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
15203         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
15204         expand_generic_desc): Likewise.
15205
15206 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15207
15208         * exception.cc (__cp_pop_exception): Cleanup the original object.
15209
15210 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15211
15212         * decl.c (grok_op_properties): Merge conversion to void warning
15213         with other silly op warnings.
15214
15215 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
15216
15217         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
15218         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
15219
15220 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15221
15222         * decl.c (cp_make_fname_decl): New function.
15223         (wrapup_globals_for_namespace): Don't emit unused static vars.
15224         (init_decl_processing): Remove comment about use of
15225         array_domain_type. Set make_fname_decl.
15226         (cp_finish_decl): Remove __FUNCTION__ nadgering.
15227         * semantics.c (begin_compound_stmt): Remove
15228         current_function_name_declared flagging.
15229         (expand_stmt): Don't emit unused local statics.
15230         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
15231         specially.
15232
15233 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15234
15235         * typeck.c (convert_for_assignment): Don't look at array
15236         initializer.
15237         * call.c (convert_like_real): Likewise.
15238
15239 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
15240
15241         Add initial support for '\uNNNN' specifier.
15242         * lex.c (read_ucs): New fn.
15243         (readescape, skip_white_space): Call it.
15244         (is_extended_char, is_extended_char_1): New fns.
15245         (utf8_extend_token): New fn, #if 0'd out.
15246         (real_yylex): Treat extended chars like letters.
15247
15248         * search.c (note_debug_info_needed): Walk the bases even if we
15249         weren't deferring the type itself.
15250
15251 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15252
15253         * decl2.c (finish_objects): Constify a char*.
15254
15255         * method.c (emit_thunk): Likewise.
15256
15257 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
15258
15259         * typeck.c (dubious_conversion_warnings): Look through
15260         REFERENCE_TYPE.
15261
15262 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15263
15264         * class.c (dfs_modify_vtables): I is now unsigned.
15265         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
15266         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
15267         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
15268         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
15269         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
15270         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
15271         Call integer_all_onesp.
15272         * typeck2.c (process_init_constructor): Use compare_tree_int.
15273
15274         * lang-specs.h (as): Don't call if -syntax-only.
15275
15276 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
15277
15278         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
15279         RTL_EXPR_HAS_NO_SCOPE after all.
15280
15281 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
15282
15283         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
15284         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
15285         RTL_EXPR_HAS_NO_SCOPE.
15286
15287         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
15288         later.
15289
15290         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
15291
15292 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
15293
15294         * call.c (convert_like): Macrofy.
15295         (convert_like_with_context): New macro.
15296         (convert_like_real): Renamed from convert_like.  Add calling
15297         context parameters, for diagnostics. Add recursive flag.  Call
15298         dubious_conversion_warnings for outer conversion.
15299         (build_user_type_conversion): Use convert_like_with_context.
15300         (build_over_call): Likewise. Don't warn about dubious
15301         conversions here. Adjust convert_default_arg calls.
15302         (convert_default_arg): Add context parameters for diagnostics.
15303         Pass through to convert_like_with_context.
15304         * cp-tree.h (convert_default_arg): Add context parameters.
15305         (dubious_conversion_warnings): Prototype new function.
15306         * typeck.c (convert_arguments): Adjust convert_default_arg call.
15307         (dubious_conversion_warnings): New function, broken
15308         out of convert_for_assignment.
15309         (convert_for_assignment): Adjust.
15310
15311 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
15312
15313         * decl2.c (key_method): Break out from...
15314         (import_export_vtable, import_export_class): ...here.
15315
15316         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
15317         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
15318
15319         * search.c (note_debug_info_needed, dfs_debug_mark,
15320         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
15321         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
15322
15323 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
15324
15325         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
15326         typos.
15327
15328 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
15329
15330         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
15331         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
15332         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
15333         (lang_type): Split gets_new into has_new and has_array_new.
15334         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15335         (TYPE_GETS_NEW): Split into ...
15336         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
15337         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
15338         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
15339         (build_op_new_call): Don't declare.
15340         (build_new_1): Likewise.
15341         * call.c (build_op_new_call): Remove.
15342         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
15343         instead of TYPE_NEEDS_DESTRUCTOR.
15344         (finish_struct_bits): Likewise.
15345         (add_implicitly_declared_members): Likewise.
15346         (check_field_decl): Likewise.
15347         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
15348         correctly under the new ABI.
15349         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
15350         instead of TYPE_NEEDS_DESTRUCTOR.
15351         (initialize_local_var): Likewise.
15352         (destroy_local_var): Likewise.
15353         (cp_finish_decl): Likewise.
15354         (register_dtor_fn): Likewise.
15355         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
15356         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
15357         TYPE_VEC_DELETE_TAKES_SIZE here.
15358         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
15359         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
15360         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15361         (finish_destructor_body): Likewise.
15362         (maybe_build_cleanup_1): Likewise.
15363         * decl2.c (do_static_destruction): Likewise.
15364         * init.c (build_new_1): Make it static.
15365         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15366         (expand_cleanup_for_base): Likewise.
15367         (get_cookie_size): New function.
15368         (build_new_1): Handle array-new cookies correctly under the new
15369         ABI.
15370         (build_vec_delete_1): Likewise.
15371         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15372         (build_delete): Likewise.
15373         (build_vec_delete): Handle array-new cookies correctly under the new
15374         ABI.
15375         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15376         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
15377         TYPE_HAS_ARRAY_NEW_OPERATOR.
15378         * ptree.c (print_lang_type): Check them.
15379         * search.c (context_for_name_lookup): Fix typo in comment.
15380         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15381         * tree.c (break_out_cleanups): Likewise.
15382         (build_cplus_array_test_1): Likewise.
15383         (cp_build_qualified_type_real): Likewise.
15384         * typeck.c (complete_type): Likewise.
15385
15386         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
15387         the command-line, not the end.
15388
15389 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
15390
15391         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
15392
15393 2000-03-02  Tom Tromey  <tromey@cygnus.com>
15394
15395         * cp-tree.h (build_java_class_ref): Declare.
15396         * init.c (build_java_class_ref): No longer static.
15397         * except.c (expand_throw): Generate a Java-style `throw' if the
15398         thrown object is a "Java" object.
15399         (initialize_handler_parm): Generate a Java-style lookup of
15400         exception info if the caught object is a "Java" object.
15401         (catch_language, catch_language_init): New globals.
15402         (decl_is_java_type): New function.
15403         (expand_start_catch_block): Don't call push_eh_info() or
15404         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
15405         class reference to build_catch_block.
15406
15407 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15408
15409         * typeck.c (comptypes): Treat sizetype like its language equivalent.
15410
15411 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
15412
15413         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
15414         to merge reference/pointer code and fix incorrect warnings.
15415
15416 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
15417
15418         * search.c (protected_accessible_p): Use context_for_name_lookup.
15419
15420         * init.c (construct_virtual_bases): Fix thinko.
15421         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
15422
15423 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15424
15425         * decl.c (current_function_decl): Move to toplev.c.
15426
15427 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
15428
15429         * pt.c (fn_type_unification): Unify return type, whenever
15430         provided.
15431         (get_bindings_real): Only pass return type when necessary.
15432         Remove explicit return type check.
15433         * class.c (resolve_address_of_overloaded_function): Pass desired
15434         return type to fn_type_unification.
15435
15436 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15437
15438         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
15439         DECL_FIELD_SIZE.
15440         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
15441         DECL_FIELD_SIZE.
15442         * rtti.c (expand_class_desc): Likewise.
15443         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
15444         (THUNK_VCALL_OFFSET): Likewise.
15445         (THUNK_DELTA): Reflect changes in ../tree.h.
15446
15447 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
15448
15449         * search.c (protected_accessible_p): Also allow the access if
15450         the member is public in DERIVED.  Lose TYPE parm.
15451         (friend_accessible_p): Lose TYPE parm.
15452         (accessible_p): Adjust.
15453
15454 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15455
15456         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
15457         on things that are not sizes; ssize_binop deleted.
15458         Call size_diffop when appropriate.
15459         (dfs_build_vcall_offset_vtbl_entries): Likewise.
15460         (build_primary_vtable, build_secondary_vtable): Likewise.
15461         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
15462         Variable I is HOST_WIDE_INT.
15463         (get_vfield_offset): Pass proper types to size_binop.
15464         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
15465         (finish_struct_1): Likewise.
15466         (skip_rtti_stuff): Arg N is now pointer to signed.
15467         (layout_class_type): Use size_zero_node.
15468         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
15469         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
15470         * decl.c (complete_arry_type): Pass proper types to size_binop.
15471         (xref_basetypes): BINFO_OFFSET is sizetype.
15472         * error.c (dump_expr): Don't use size_binop non-sizes.
15473         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
15474         * init.c (construct_virtual_bases): Fix type error.
15475         (build_vec_delete_1): Pass proper type to size_binop and don't
15476         fold result.
15477         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
15478         * rtti.c (get_base_offset): Pass proper type to size_binop.
15479         * search.c (dfs_find_vbases): Fix type error.
15480         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
15481         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
15482         * tree.c (debug_binfo): Variable N is signed.
15483         Use HOST_WIDE_INT_PRINT_DEC.
15484         * typeck.c (comptypes): sizetype is same as equivalent integer type.
15485         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
15486         size_one_node and size_zero_node.
15487         (c_alignof): Use size_one_node.
15488         (build_component_addr): Pass proper types to size_binop.
15489         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
15490
15491 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
15492
15493         Implement class scope using-declarations for functions.
15494         * class.c (handle_using_decl): Call add_method for used functions.
15495         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
15496         (add_method): Used functions are hidden by local functions.
15497         (check_bases_and_members): Handle using-decls before finalizing
15498         CLASSTYPE_METHOD_VEC.
15499         * call.c (add_function_candidate): Add ctype parm; if nonzero,
15500         override the type of 'this' accordingly.
15501         (add_template_candidate, add_template_candidate_real): Add ctype parm.
15502         (convert_class_to_reference, build_user_type_conversion_1,
15503         build_new_function_call, build_object_call, build_new_op,
15504         build_new_method_call): Pass ctype parm.
15505
15506         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
15507         the baselink.
15508         * call.c (convert_class_to_reference, build_user_type_conversion_1,
15509         build_new_function_call, build_object_call, build_new_op,
15510         build_new_method_call, build_op_delete_call): Don't get basetype_path
15511         from a baselink.
15512         * typeck.c (build_component_ref): Likewise.
15513         * init.c (build_offset_ref): Likewise.
15514         (resolve_offset_ref): Don't call enforce_access.
15515         Call build_scoped_ref.
15516         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
15517         would cause an error or if -pedantic.
15518         * class.c (alter_access): Lose binfo parm.
15519
15520 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
15521
15522         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
15523         types.
15524
15525 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
15526
15527         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
15528         pseudo_type_info creation into the std namespace
15529
15530 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
15531
15532         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
15533         (import_export_class): Remove declaration.
15534         * decl2.c (import_export_class): Make it static.
15535         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
15536         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
15537         EXPR_WITH_FILE_LOCATION.
15538         * lex.c (check_newline): Tweak filename/lineno setting.
15539         * semantics.c (begin_while_stmt): Fix typo in comment.
15540
15541 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15542
15543         * lang-options.h (-fmessage-length=): Add missing option.
15544
15545         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
15546
15547 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
15548
15549         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
15550
15551 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
15552
15553         * optimize.c (expand_call_inline): Emit the return label before
15554         evaluating the return value.
15555
15556 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
15557
15558         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
15559         than duplicating functionality here.
15560         * optimize.c: Include input.h.
15561         (expand_call_inline): Use push_srcloc and pop_srcloc.
15562         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
15563         * parse.c: Regenerated.
15564         * Makefile.in (lex.o): Depend on input.h.
15565         (optimize.o): Likewise.
15566
15567 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
15568
15569         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
15570         function type, rather than ICE.
15571
15572 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
15573
15574         * decl.c (grokdeclarator): Call decl_type_access_control.
15575         * parse.y (parse_end_decl): Don't call decl_type_access_control if
15576         decl is null.
15577
15578 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
15579
15580         * decl.c (decls_match): Remove obsolete static member nadgering.
15581
15582 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15583
15584         * decl.c (grokdeclarator): Change ANSI to ISO.
15585         * lex.c (consume_string, readescape, do_identifier): Likewise.
15586         (parse_float, real_yylex): Likewise.
15587         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
15588         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
15589         new_type_id, maybe_label_decls, simple_stmt,
15590         for.init.statement): Likewise.
15591         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
15592         * semantics.c (finish_named_return_value): Likewise.
15593         * parse.c: Regenerate.
15594
15595 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
15596
15597         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
15598         (CPTI_CLASS_STAR_TYPE): Remove.
15599         (vtable_index_type): Likewise.
15600         (class_star_type_node): Remove.
15601         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
15602         (build_binary_op_nodefault): Remove.
15603         * call.c (build_new_op): Use build_binary_op instead of
15604         build_binary_op_nodefault.
15605         * decl.c (init_decl_processing): Remove class_star_type_node
15606         initialization.  Make delta_type_node ptrdiff_type_node under the
15607         new ABI.  Initialize vtable_index_type.
15608         (build_ptrmemfunc_type): Build different structures for the new
15609         ABI.
15610         (build_enumerator): Use build_binary_op instead of
15611         build_binary_op_nodefault.
15612         * method.c (build_overload_value): Mangle pointers-to-members
15613         appropriately under the new ABI.
15614         * typeck.c (build_array_ref): Use build_binary_op instead of
15615         build_binary_op_nodefault.
15616         (get_member_function_from_ptrfunc): Adjust for the new ABI.
15617         (build_binary_op_nodefault): Rename to ...
15618         (build_binary_op): ... this.  Remove old version.  Adjust for
15619         pointer-to-member comparisons under the new ABI.
15620         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
15621         (build_ptrmemfunc): Adjust for the new ABI.
15622         (expand_ptrmemfunc_cst): Likewise.
15623         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
15624         (pfn_from_ptrmemfunc): Adjust for the new ABI.
15625
15626 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
15627
15628         * call.c (build_object_call): Compress consecutive calls to
15629         cp_error.
15630         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
15631         (build_op_delete_call): Adjust message formatting.
15632
15633         * class.c (check_bases): Compress consecutive calls to
15634         cp_pedwarn.
15635         (finish_struct_anon): Say 'ISO C++'.
15636
15637         * decl.c (start_decl): Same here.
15638         (grok_reference_init): Likewise.
15639         (grokfndecl): Correct message formatting.
15640         (grokfndecl): Improve diagnostic.
15641         (check_static_variable_definition): Likewise. Say 'ISO C++'
15642         (compute_array_index_type): Say 'ISO C++'
15643         (create_array_type_for_decl): Compress consecutive calls to
15644         cp_error.
15645         (grokdeclarator): Say 'ISO C++'
15646         (grok_op_properties): Likewise.
15647
15648         * decl2.c (delete_sanity): Clairify diagnostic.
15649         (check_member_template): Same here.
15650         (grok_function_init): Use consistent terminology.
15651
15652         * expr.c (do_case): Say 'ISO C++'
15653
15654         * friend.c (do_friend): Compress consecutive calls to warning.
15655
15656 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
15657
15658         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
15659         * class.c (build_secondary_vtable): Reorganize.  Don't create a
15660         new vtable under the new ABI.
15661         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
15662         computing the size.
15663         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
15664         the initializing elements.
15665         (initialize_vtable): New function.
15666         (dfs_finish_vtbls): Use it.
15667         (dfs_accumulate_vtbl_inits): New function.
15668         (finish_vtbls): Merge primary and secondary vtables under the new
15669         ABI.
15670         (finish_struct_1): Remove redundant call to layout_vtable_decl.
15671         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
15672         aren't VAR_DECLs.
15673
15674         * class.c (build_vtable): New function, split out from ...
15675         (get_vtable_decl): ... here, and ...
15676         (build_secondary_vtable): ... here.
15677
15678         * pt.c (tsubst_decl): Fix formatting.
15679
15680 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15681
15682         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
15683         (avoid_overlap, build_base_field): Likewise.
15684         (build_base_field, build_base_fields, is_empty_class):
15685         Test DECL_SIZE with integer_zero.
15686         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
15687         * cp-tree.h (struct lang_type): New field size_unit.
15688         (CLASSTYPE_SIZE_UNIT): New macro.
15689         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
15690         (cp_finish_decl): Delete -Wlarger-than processing.
15691         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
15692         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
15693         * tree.c (make_binfo): binfo vector is one entry longer.
15694         (walk_tree): Walk DECL_SIZE_UNIT.
15695
15696 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
15697
15698         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
15699         comment.
15700         (build_vtable_entry): Don't assume all vtable entries are
15701         functions.
15702         (build_vtbl_initializer): Adjust accordingly.
15703         (get_vtable_decl): Fix formatting.
15704
15705 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
15706
15707         * semantics.c (deferred_type_access_control): Walk the entire
15708         type_lookups list.
15709         (save_type_access_control): Rename from
15710         initial_deferred_type_access_control.  Just remember the value.
15711         (decl_type_access_control): New fn.
15712         (begin_function_definition): Use deferred_type_access_control, after
15713         we've started the function.  Set type_lookups to error_mark_node.
15714         * parse.y (frob_specs, fn.def1): Adjust.
15715         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
15716         (parse_end_decl, parse_bitfield0, parse_method): New fns.
15717         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
15718         (after_type_component_declarator0): Likewise.
15719         (after_type_component_declarator): Likewise.
15720         (notype_component_declarator): Likewise.
15721         * cp-tree.h: Adjust.
15722
15723         * decl.c (redeclaration_error_message): Allow redeclaration of
15724         namespace-scope decls.
15725
15726 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15727
15728         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
15729
15730 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
15731
15732         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
15733         * decl2.c (grokclassfn): Likewise.
15734
15735         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
15736
15737         * decl2.c (lang_decode_option): Don't set default message length
15738         here.
15739         * lex.c (lang_init_options): Set it here.
15740
15741 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
15742
15743         Make DECL_CONTEXT mean the class in which a member function was
15744         declared, even for a virtual function.
15745         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
15746         (DECL_FRIEND_CONTEXT): New macro.
15747         (DECL_REAL_CONTEXT): Remove.
15748         (SET_DECL_FRIEND_CONTEXT): Likewise.
15749         (DECL_VIRTUAL_CONTEXT): Adjust.
15750         (DECL_CLASS_SCOPE_P): Use TYPE_P.
15751         (add_friends): Remove.
15752         (hack_decl_function_context): Likewise.
15753         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
15754         CP_DECL_CONTEXT.
15755         (build_over_call): Fix indentation.  Use DECL_CONTEXT
15756         instead of DECL_CLASS_CONTEXT.
15757         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
15758         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
15759         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15760         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
15761         (build_base_field): Likewise.
15762         (finish_struct_1): Likewise.
15763         (build_self_reference): Likewise.
15764         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
15765         DECL_REAL_CONTEXT.
15766         (pushtag): Use decl_function_context, not
15767         hack_decl_function_context.
15768         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15769         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
15770         (pushdecl): Remove bogus code.
15771         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
15772         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15773         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15774         Use decl_function_context, nothack_decl_function_context.
15775         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
15776         (grokdeclarator): Likewise.  Use decl_function_context, not
15777         hack_decl_function_context.
15778         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
15779         (start_function): Use DECL_FRIEND_CONTEXT, not
15780         DECL_CLASS_CONTEXT.  Use decl_function_context, not
15781         hack_decl_function_context.
15782         (finish_function): Use decl_function_context, not
15783         hack_decl_function_context.
15784         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
15785         DECL_CLASS_CONTEXT.
15786         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
15787         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
15788         (grokfield): Likewise.
15789         (finish_builtin_type): Likewise.
15790         (finish_vtable_vardec): Use decl_function_context, not
15791         hack_decl_function_context.
15792         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15793         (start_static_initialization_or_destruction): Likewise.
15794         (finish_static_initialization_or_destruction): Likewise.
15795         (mark_used): Adjust logic for deciding when to synthesize methods.
15796         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
15797         DECL_REAL_CONTEXT.
15798         * error.c (dump_function_decl): Use DECL_CONTEXT, not
15799         DECL_CLASS_CONTEXT.
15800         * friend.c (is_friend): Likewise.
15801         (add_friends): Remove.
15802         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
15803         * lex.c (begin_definition_of_inclass_inline): Use
15804         decl_function_context, not hack_decl_function_context.
15805         (process_next_inline): Likewise.
15806         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15807         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
15808         DECL_CLASSS_CONTEXT.
15809         (hack_identifier): Likewise.
15810         (synthesize_method):  Use decl_function_context, not
15811         hack_decl_function_context.
15812         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
15813         DECL_REAL_CONTEXT.
15814         (is_member_template): Use decl_function_context, not
15815         hack_decl_function_context.  Use DECL_CONTEXT, not
15816         DECL_CLASS_CONTEXT.
15817         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
15818         DECL_CLASS_CONTEXT.
15819         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
15820         DECL_REAL_CONTEXT.
15821         (push_template_decl_real): Likewise.
15822         (instantiate_class_template): Don't call add_friends.
15823         (tsubst_default_argument): Use DECL_CONTEXT, not
15824         DECL_REAL_CONTEXT.
15825         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
15826         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15827         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
15828         DECL_CLASS_CONTEXT.
15829         * repo.c (repo_inline_used): Likewise.
15830         * search.c (current_scope): Adjust for new _CONTEXT macros.
15831         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
15832         DECL_REAL_CONTEXT.
15833         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15834         (lookup_fnfields_here):Likewise.
15835         (check_final_overrider): Likewise.
15836         (init_vbase_pointers): Likewise.
15837         (virtual_context): Likewise.
15838         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
15839         (expand_body): Use decl_function_context, not
15840         hack_decl_function_context.
15841         * tree.c (hack_decl_function_context): Remove.
15842         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
15843         DECL_CLASS_CONTEXT.
15844         * typeck2.c (error_not_base_type): Likewise.
15845
15846 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
15847
15848         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
15849
15850 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15851
15852         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
15853
15854 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
15855
15856         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
15857
15858 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
15859
15860         * decl2.c (lang_decode_option): Enable automatic line wrapping.
15861
15862 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
15863
15864         * parse.y (frob_specs): Split out...
15865         (parse_decl): From here.
15866         (fn.def2): Call initial_deferred_type_access_control.
15867         (after_type_component_declarator0): Call frob_specs.
15868         (notype_component_declarator0): Likewise.
15869         * search.c (friend_accessible_p): Nested classes are friends of their
15870         enclosing classes.
15871
15872 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
15873
15874         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
15875         used to create an implicit temporary.
15876
15877         * class.c (dfs_modify_vtables): Tweak calculation of functions to
15878         override.
15879
15880 2000-02-08  Nathan Sidwell  <nathan@acm.org>
15881
15882         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
15883         strip array element qualifiers too.
15884
15885 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
15886
15887         * decl.c (store_parm_decls): Don't build cleanups for parameters
15888         while processing_template_decl.
15889
15890 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
15891
15892         * cp-tree.h (struct saved_scope): Add incomplete field.
15893         (namespace_scope_incomplete): New macro.
15894         * decl.c (pushdecl): Use it.
15895         (hack_incomplete_structures): Use it.  See through artificial
15896         binding levels.
15897         (mark_saved_scope): Mark it.
15898
15899         Implement access control for nested types.
15900         * search.c (type_access_control): New fn.
15901         (accessible_p): Now we do perform access control for types.
15902         * semantics.c (deferred_type_access_control): New fn.
15903         (initial_deferred_type_access_control): New fn.
15904         (begin_function_definition): Call it.  Add lookups parm.
15905         * decl.c (struct binding_level): Add this_class field.
15906         (pushlevel_class): Set it.
15907         (mark_binding_level): Mark it.
15908         (lookup_name_real): Use it.  Call type_access_control.
15909         (mark_saved_scope): Mark lookups field.
15910         * cp-tree.h (flagged_type_tree): Add lookups field.
15911         (struct saved_scope): Add lookups field.
15912         (type_lookups): New macro.
15913         * parse.y (declmods): Now <ftype>.
15914         (parse_decl): Add lookups parm.  Call
15915         initial_deferred_type_access_control.
15916         (lang_extdef): Clear type_lookups.
15917         (typed_declspecs, declmods, typespec): Set lookups field.
15918         (initdcl): Call deferred_type_access_control.
15919         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
15920         component_decl_1, named_parm): Adjust.
15921         * friend.c (is_friend): Nested classes are friends of their
15922         enclosing classes.
15923
15924         * class.c (currently_open_derived_class): New fn.
15925         * method.c (hack_identifier): Use it.
15926
15927         * lex.c (do_identifier): Remove obsolete code.
15928
15929         * parse.y (typed_typespecs): Propagate new_type_flag properly.
15930
15931 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
15932
15933         * tinfo.h: Remove apostrophes from C++ comment (xgettext
15934         thinks this file is plain C).
15935
15936 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15937
15938         * Makefile.in (call.o): Depend on $(EXPR_H).
15939
15940         * call.c: Include "expr.h".
15941
15942         * class.c (dump_class_hierarchy): Add prototype.
15943
15944         * search.c (dfs_get_pure_virtuals): Likewise.
15945
15946 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
15947
15948         * parse.y (simple_stmt): Allow :: token in asm parameter list.
15949         * parse.c: Rebuilt.
15950
15951 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
15952
15953         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
15954         Store it in DECL_FCONTEXT.
15955         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
15956
15957 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
15958
15959         * tinfo.h (old abi): #include "tconfig.h".
15960         * tinfo.cc (convert_to_base): Move into old abi section.
15961
15962 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
15963
15964         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
15965         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
15966         (BINFO_PRIMARY_BINFO): New macro.
15967         (BF_DELTA): Rename to ...
15968         (BV_DELTA): ... this.
15969         (BF_VCALL_INDEX): Rename to ...
15970         (BV_VCALL_INDEX): ... this.
15971         (BF_FN): Rename to ...
15972         (BV_FN): ... this.
15973         * class.c (build_vbase_path): Adjust for changes to reverse_path.
15974         (set_rtti_entry): Rename BF_ macros to BV_ variants.
15975         (modify_vtable_entry): Simplify.
15976         (add_virtual_function): Rename BF_ macros to BV_ variants.
15977         (build_vtable_initializer): Likewise.
15978         (get_class_offset_1): Remove.
15979         (dfs_get_class_offset): Likewise.
15980         (get_class_offset): Likewise.
15981         (dfs_find_final_overrider): New function.
15982         (find_final_overrider): Likewise.
15983         (modify_one_vtable): Remove.
15984         (dfs_find_base): New function.
15985         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
15986         find_final_overrider.
15987         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
15988         virtuals.
15989         (dfs_fixup_vtable_deltas): Remove.
15990         (override_one_vtable): Remove.
15991         (merge_overrides): Likewise.
15992         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
15993         unreal chilren of virtual bases.
15994         (finish_struct_1): Don't use merge_overrides.  Don't use
15995         dfs_fixup_vtable_deltas.
15996         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
15997         BINFOs.
15998
15999 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
16000             Jason Merrill  <jason@yorick.cygnus.com>
16001
16002         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
16003
16004 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
16005
16006         * exception.cc (__throw_bad_typeid): Add missing std::.
16007
16008 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16009
16010         * cp-tree.h (make_thunk): PROTO -> PARAMS.
16011
16012 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
16013
16014         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
16015
16016         Runtime support for new-abi rtti.
16017         * inc/typeinfo (type_info::operator!=): Define in class.
16018         (type_info::before, type_info::name, type_info::operator==,
16019         type_info::operator!=): Define new ABI implementations.
16020         (type_info::is_pointer_p, type_info::is_function_p): Declare
16021         new virtual functions.
16022         (type_info::do_catch, type_info::do_upcast): Likewise.
16023
16024         * tinfo.h (__base_class_info): Define new class.
16025         (__class_type_info): Likewise.
16026         (__si_class_type_info): Likewise.
16027         (__vmi_class_type_info): Likewise.
16028         (__dynamic_cast): Prototype.
16029
16030         * tinfo.cc: Conditionalize old and new rtti mechanisms.
16031         (type_info::is_pointer_p): Define new function.
16032         (type_info::is_function_p): Likewise.
16033         (type_info::do_catch): Likewise.
16034         (type_info::do_upcast): Likewise.
16035         (vtable_prefix): New structure for vtable access.
16036         (adjust_pointer): Define new template function.
16037         (contained_p, public_p, virtual_p, contained_public_p,
16038         contained_nonpublic_p, contained_nonvirtual_p): Define new
16039         functions.
16040         (nonvirtual_base_type): New local variable.
16041         (__class_type_info::~__class_type_info): Define.
16042         (__si_class_type_info::~__si_class_type_info): Likewise.
16043         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
16044         (__class_type_info::do_catch): Define new function.
16045         (__class_type_info::do_upcast): Likewise.
16046         (__class_type_info::find_public_src): Likewise.
16047         (__class_type_info::do_find_public_src): Likewise.
16048         (__si_class_type_info::do_find_public_src): Likewise.
16049         (__vmi_class_type_info::do_find_public_src): Likewise.
16050         (__class_type_info::do_dyncast): Likewise.
16051         (__si_class_type_info::do_dyncast): Likewise.
16052         (__vmi_class_type_info::do_dyncast): Likewise.
16053         (__class_type_info::do_upcast): Likewise.
16054         (__si_class_type_info::do_upcast): Likewise.
16055         (__vmi_class_type_info::do_upcast): Likewise.
16056         (__dynamic_cast): Likewise.
16057
16058         * tinfo2.cc (__fundamental_type_info): Define new class.
16059         (__pointer_type_info): Likewise.
16060         (__reference_type_info): Likewise.
16061         (__array_type_info): Likewise.
16062         (__function_type_info): Likewise.
16063         (__enum_type_info): Likewise.
16064         (__ptr_to_member_type_info): Likewise.
16065         (__fundamental_type_info::~__fundamental_type_info): Define.
16066         (__pointer_type_info::~__pointer_type_info): Likewise.
16067         (__reference_type_info::~__reference_type_info): Likewise.
16068         (__array_type_info::~__array_type_info): Likewise.
16069         (__function_type_info::~__function_type_info): Likewise.
16070         (__enum_type_info::~__enum_type_info): Likewise.
16071         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
16072         (__pointer_type_info::do_catch): Define new function.
16073         (__ptr_to_member_type_info::do_catch): Define new function.
16074
16075         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
16076         (__is_pointer): Likewise.
16077
16078         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
16079
16080 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
16081
16082         * cp/class.c (build_vtable): Rename to build_primary_vtable.
16083         (prepare_fresh_vtable): Rename to build_secondary_vtable.
16084         (make_new_vtable): New function.
16085         (modify_vtable_entry): Handle generation of new vtables correctly.
16086         (modify_one_vtable): Remove unused parameter.
16087         (dfs_fixup_vtable_deltas): Likewise.
16088         (override_one_vtable): Use build_secondary_vtable.
16089         (finish_struct_1): Use build_primary_vtable and
16090         build_secondary_vtable.
16091
16092 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
16093
16094         * cp/decl.c: Adjust variable names, comments, help strings.
16095
16096 2000-01-29  Nathan Sidwell  <nathan@acm.org>
16097
16098         * new2.cc (operator delete[]): Use operator delete, don't assume
16099         implementation.
16100
16101 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
16102
16103         * class.c (build_vtbl_initializer): Add argument to
16104         build_vtable_entry call.
16105
16106 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
16107
16108         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
16109         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
16110         (BF_DELTA): New macro.
16111         (BF_VCALL_INDEX): Likewise.
16112         (BF_FN): Likewise.
16113         (THUNK_VCALL_OFFSET): Likewise.
16114         (make_thunk): Change prototype.
16115         * class.c (build_vtable_entry): Integrate
16116         build_vtable_entry_for_fn.  Handle vcall indices.
16117         (build_vtable_entry_for_fn): Remove.
16118         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
16119         BF_VCALL_INDEX, BF_FN.
16120         (modify_vtable_entry): Integrate common code from
16121         modify_one_vtable and dfs_fixup_vtable_deltas.
16122         (add_virtual_function): Set BF_VCALL_INDEX.
16123         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
16124         and BF_FN.
16125         (modify_one_vtable): Simplify.
16126         (dfs_fixup_vtable_deltas): Likewise.
16127         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
16128         * method.c (make_thunk): Handle vcall indices.
16129
16130 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
16131
16132         Compiler side new abi rtti (not enabled).
16133         * cp-tree.h (new_abi_rtti_p): New macro.
16134         (emit_support_tinfos): Prototype new function.
16135         (tinfo_decl_p): Likewise.
16136         (emit_tinfo_decl): Likwise.
16137         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
16138         macros.
16139         (doing_runtime): New local static.
16140         (init_rtti_processing): Add new-abi initializer.
16141         (get_tinfo_decl): Add new-abi logic.
16142         (tinfo_from_decl): Likewise.
16143         (build_dynamic_cast_1): Likewise.
16144         (qualifier_flags): New static function.
16145         (tinfo_base_init): Likewise.
16146         (generic_initializer): Likewise.
16147         (ptr_ref_initializer): Likewise.
16148         (ptmd_initializer): Likewise.
16149         (class_hint_flags): Likewise.
16150         (class_initializer): Likewise.
16151         (synthesize_tinfo_var): Likewise.
16152         (create_real_tinfo_var): Likewise.
16153         (create_pseudo_type_info): Likewise.
16154         (get_vmi_pseudo_type_info): Likewise.
16155         (create_tinfo_types): Likewise.
16156         (emit_support_tinfos): New global function.
16157         (tinfo_decl_p): New global predicate.
16158         (emit_tinfo_decl): New global function.
16159         * class.c (set_rtti_entry): Generalize for old and new rtti.
16160         (build_vtbl_initializer): Likewise.
16161         * decl2.c (finish_file): Likewise.
16162
16163 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
16164
16165         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
16166         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
16167
16168 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
16169
16170         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
16171         for scopes.
16172
16173 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
16174
16175         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
16176
16177 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
16178
16179         * optimize.c (calls_setjmp_r): Supply new argument
16180         to special_function_p.
16181
16182 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16183
16184         * call.c: PROTO -> PARAMS.
16185         * class.c: Likewise.
16186         * cp-tree.h: Likewise.
16187         * cvt.c: Likewise.
16188         * decl.c: Likewise.
16189         * decl.h: Likewise.
16190         * decl2.c: Likewise.
16191         * dump.c: Likewise.
16192         * errfn.c: Likewise.
16193         * error.c: Likewise.
16194         * except.c: Likewise.
16195         * expr.c: Likewise.
16196         * init.c: Likewise.
16197         * input.c: Likewise.
16198         * lex.c: Likewise.
16199         * lex.h: Likewise.
16200         * method.c: Likewise.
16201         * optimize.c: Likewise.
16202         * parse.y: Likewise.
16203         * pt.c: Likewise.
16204         * repo.c: Likewise.
16205         * rtti.c: Likewise.
16206         * search.c: Likewise.
16207         * semantics.c: Likewise.
16208         * spew.c: Likewise.
16209         * tree.c: Likewise.
16210         * typeck.c: Likewise.
16211         * typeck2.c: Likewise.
16212         * xref.c: Likewise.
16213
16214 2000-01-25  Richard Henderson  <rth@cygnus.com>
16215
16216         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
16217
16218 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
16219
16220         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
16221         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
16222         (struct vcall_offset_data_s): New type.
16223         (dfs_vcall_offset_queue_p): New function.
16224         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16225         (build_vcall_offset_vtbl_entries): Likewise.
16226         (layout_vtable_decl): Likewise.
16227         (num_vfun_entries): Likewise.
16228         (num_extra_vtbl_entries): Add the entries for vcall offsets.
16229         (build_vtbl_initializer): Likewise.
16230         (dfs_finish_vtabls): Use layout_vtable_decl.
16231         (modify_one_vtables): Always duplicate vtables under the new ABI.
16232         (finish_struct_1): Use layout_vtable_decl.
16233
16234 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16235
16236         * decl.c (member_function_or_else): Change third arg from a format
16237         specifier to an `enum overload_flags'.  Callers changed.
16238
16239 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16240
16241         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
16242         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
16243         build_const_cast, get_delta_difference, check_return_expr): Avoid
16244         ANSI string concatenation usage.
16245
16246 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
16247
16248         * class.c (layout_class_type): Put the fields required to make a
16249         class non-empty at the end, not the beginning, of the TYPE_FIELDs
16250         list.
16251
16252 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
16253
16254         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
16255         template.
16256
16257         * decl2.c (mark_used): Do instantiate inlines that have been
16258         explicitly instantiated.
16259
16260 2000-01-24  Richard Henderson  <rth@cygnus.com>
16261
16262         * call.c (build_over_call): Use expand_tree_builtin.
16263         * typeck.c (build_function_call_real): Likewise.
16264         (build_binary_op_nodefault): Handle unordered compares.
16265
16266 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16267
16268         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
16269         cp_tree_index values.
16270         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
16271         New global node #defines for them.
16272         * rtti.c (call_void_fn): Replace with ...
16273         (build_runtime_decl): ... new static function.
16274         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
16275         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
16276         (build_dynamic_cast_1): Always produce correctly typed result.
16277         Explicitly produce type_info addresses. Use dynamic_cast_node.
16278         * exception.cc (__throw_bad_cast): Return `void *'.
16279         (__throw_bad_typeid): Return `const type_info &'.
16280
16281 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16282
16283         * cp-tree.h (get_vtable_decl): Prototype new function.
16284         * class.c (get_vtable_decl): New function. Broken out from ...
16285         (build_vtable): ... here. Use it.
16286         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
16287         by get_vtable_decl.
16288
16289 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16290
16291         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
16292         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
16293         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
16294         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
16295         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
16296         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
16297         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
16298         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
16299         (CPTI_TINFO_VAR_ID): New enumeration.
16300         (__tp_desc_type_node, __access_mode_type_node,
16301         __bltn_desc_type_node, __user_desc_type_node,
16302         __class_desc_type_node, __ptr_desc_type_node,
16303         __attr_desc_type_node, __func_desc_type_node,
16304         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
16305         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
16306         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
16307         enum_desc_type_node, class_desc_type_node,
16308         si_class_desc_type_node, vmi_class_desc_type_node,
16309         ptmd_desc_type_node, base_desc_type_node): New #defines.
16310         (tinfo_fn_id, tinfo_fn_type): Rename to ...
16311         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
16312         (tinfo_var_id): New enumeration.
16313         (DECL_TINFO_FN_P): Augment comment.
16314         * decl.c (cp_global_trees): Adjust documentation.
16315         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
16316         tinfo_decl_type and tinfo_var_id.
16317         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
16318         (build_typeid): Remove unused variable.
16319         (get_tinfo_var): Use tinfo_var_id.
16320         (tinfo_name): New static function.
16321         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
16322         (tinfo_from_decl): Likewise.
16323         (get_base_offset): New static function, broken out of
16324         expand_class_desc.
16325         (expand_si_desc): Use tinfo_name.
16326         (expand_class_desc): Likewise. Lose local static variable.
16327         Use base_desc_type_node. Use get_base_offset.
16328         (expand_ptr_desc): Use tinfo_name.
16329         (expand_attr_desc): Likewise.
16330         (expand_generic_desc): Likewise.
16331
16332         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
16333         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
16334
16335 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
16336
16337         * cp-tree.h (__eprintf): Remove declaration.
16338         * tree.c (__eprintf): Remove definition.
16339
16340 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
16341             Mark Mitchell  <mark@codesourcery.com>
16342
16343         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
16344         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
16345
16346 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
16347
16348         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
16349
16350 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
16351
16352         * cp-tree.h (register_dtor_fn): New function.
16353         * decl.c (destroy_local_static): Rename to ...
16354         (register_dtor_fn): ... this.  Give it external linkage.
16355         (expand_static_init): Use it.
16356         * decl2.c (do_static_initialization): Likewise, if using
16357         __cxa_atexit.
16358         (do_static_destruction): Check that __cxa_atexit is not in use.
16359         (finish_file): Don't call do_static_destruction if using
16360         __cxa_atexit.
16361
16362         * typeck.c (convert_arguments): Restore two-message error
16363         reporting.
16364
16365 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
16366
16367         Remap dynamic cast hint values to be consistent across ABIs.
16368         * search.c (dynamic_cast_base_recurse): Remap generated value.
16369         (get_dynamic_cast_base_type): Adjust documentation.
16370         * tinfo.h (__user_type_info::dyncast): Likewise.
16371         (__user_type_info::find_public_subobj): Remap BOFF meaning.
16372         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
16373         (__class_type_info::do_dyncast): Likewise.
16374         (__class_type_info::do_find_public_subobj): Likewise.
16375         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
16376
16377 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
16378
16379         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
16380
16381         * typeck2.c (incomplete_type_error): Restore previous
16382         cp_error and cp_error_at call sequence.
16383
16384 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
16385
16386         * class.c (dump_class_hierarchy): Make format agree with argument;
16387         cast pointer to unsigned long and print with %lx.
16388
16389 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
16390
16391         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
16392
16393         * typeck.c (composite_pointer_type, common_type,
16394         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
16395         build_function_call_real, convert_arguments,
16396         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
16397         build_unary_op, mark_addressable, build_compound_expr,
16398         build_static_cast, build_reinterpret_cast, build_const_cast,
16399         build_c_cast, build_modify_expr, get_delta_difference,
16400         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
16401         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
16402         into a single one.
16403         * typeck2.c (readonly_error, abstract_virtuals_error,
16404         process_init_constructor, check_for_new_type): Likewise.
16405
16406 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
16407
16408         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
16409         VAR_DECLs.
16410
16411 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
16412
16413         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
16414         (build_x_typeid): Likewise.
16415         (get_tinfo_fn): Likewise.
16416         (get_tinfo_fn_unused): Rename to ...
16417         (get_tinfo_decl): ... here.
16418         * rtti.c (build_headof): Replace logic error with assertion.
16419         (get_tinfo_fn_dynamic): Rename to ...
16420         (get_tinfo_decl_dynamic): ... here. Make static. Use
16421         complete_type_or_else.
16422         (build_x_typeid): Move into ...
16423         (build_typeid): ... here. Adjust call to
16424         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
16425         throw_bad_typeid expression.
16426         (get_tinfo_fn_unused): Rename to ...
16427         (get_tinfo_decl): ... here. Adjust comment.
16428         (get_tinfo_fn): Delete.
16429         (tinfo_from_decl): New static function.
16430         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
16431         (get_typeid): Use complete_type_or_else.
16432         (build_dynamic_cast_1): Adjust calls to
16433         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
16434         * parse.y (primary): Adjust call to build_typeid.
16435         * except.c (build_eh_type_type_ref): Adjust call to
16436         get_tinfo_decl. Mark as used.
16437         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
16438         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
16439         * parse.c: Regenerated.
16440
16441 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
16442
16443         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
16444         calling convention.
16445         (resolves_to_fixed_type_p): Document calling convention.
16446         * rtti.c (build_x_typeid): Initialize NONNULL.
16447
16448         * cp-tree.h (build_shared_int_cst): New function.
16449         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
16450         * class.c (modify_vtable_entry): Likewise.
16451         (add_virtual_function): Split out code to generated shared
16452         INTEGER_CSTs to build_share_int_cst.
16453         (modify_all_vtables): Handle all the overridden functions here.
16454         Add overridden functions from non-primary virtual bases to the
16455         primary vtable.
16456         (finish_struct_1): Adjust call to modify_all_vtables.  Add
16457         overridden functions from non-primary bases to the vtable.
16458         * tree.c (build_shared_int_cst): New function.
16459
16460         * cp-tree.h (scratchalloc): Remove.
16461         (build_scratch_list): Likewise.
16462         * call.c (convert_class_to_reference): Replace build_scratch_list
16463         and build_expr_list with build_tree_list.
16464         (add_candidate): Replace scratchalloc with expralloc.  Note memory
16465         leak.
16466         (build_user_type_conversion_1):  Replace build_scratch_list
16467         and build_expr_list with build_tree_list.
16468         (build_new_op): Likewise.
16469         (build_op_delete_call): Likewise.
16470         (convert_like): Likewise.
16471         * cvt.c (ocp_convert): Likewise.
16472         * decl.c (start_decl): Likewise.
16473         (start_function): Likewise.
16474         (finish_destructor_body): Likewise.
16475         (maybe_build_cleanup_1): Likewise.
16476         * decl2.c (reparse_decl_as_expr): Likewise.
16477         * init.c (perform_member_init): Likewise.
16478         (expand_cleanup_for_base): Likewise.
16479         (build_builtin_delete_call): Likewise.
16480         (build_new_1): Likewise.
16481         (build_delete): Likewise.
16482         * method.c (do_build_assign_ref): Likewise.
16483         * parse.y (already_scoped_stmt): Likewise.
16484         (nontrivial_exprlist): Likewise.
16485         (net_initializer): Likewise.
16486         (initlist): Likewise.
16487         * parse.c: Regenerated.
16488         * rtti.c (build_x_typeid): Likewise.
16489         (build_dynamic_cast_1): Likewise.
16490         * typeck.c (build_x_compound_expr): Likewise.
16491         (build_static_cast): Likewise.
16492         (build_modify_expr): Likewise.
16493
16494         * cp-tree.h (DECL_VINDEX): Add documentation.
16495         * class.c (build_vtable_entry): Likewise.
16496         (start_vtable): Add comment.
16497         (add_virtual_function): Replace pending_hard_virtuals with
16498         overridden_virtuals and pending_virtuals with new_virtuals.
16499         Replace redundant assignments with assertions.
16500         (check_for_override): Add comment.
16501         (check_bases_and_members): Replace pending_hard_virtuals with
16502         overridden_virtuals and pending_virtuals with new_virtuals.
16503         (create_vtbl_ptr): Likewise.
16504         (layout_class_type): Likewise.
16505         (finish_struct_1): Likewise.  Add comments.
16506
16507 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
16508
16509         * class.c (finish_struct_1): Replace redundant code with
16510         assertions.
16511
16512         * cp-tree.h (flag_new_abi): Move.
16513         (flag_use_cxa_atexit): Likewise.
16514         (flag_honor_std): Likewise.
16515         (flag_rtti): Likewise.
16516         (vbase_offsets_in_vtable_p): Define.
16517         (vptrs_present_everywhere_p): Likewise.
16518         (TYPE_CONTAINS_VPTR_P): Likewise.
16519         (dfs_walk_real): Declare.
16520         * class.c (build_vbase_pointer_fields): Check
16521         vbase_offsets_in_vtable_p.
16522         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
16523         BINFO_VPTR_FIELD.
16524         (build_vbase_offset_vtbl_entries): Simplify.
16525         (build_vbase_offset_vtbl_entries): Adjust.
16526         (build_vbase_pointer): Add ability to look up vbase offsets in
16527         vtable.
16528         (start_vtable): New function.
16529         (add_virtual_function): Use it.
16530         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
16531         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
16532         (build_vtbl_initializer): Take the type of the complete object as
16533         input.  Use it to correctly calculate vbase offsets.
16534         (dfs_finish_vtbls): Pass the complete type to
16535         build_vtbl_initializer.
16536         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
16537         (create_vtable_ptr): Create a vtable even if there are no
16538         new virtual functions, under the new ABI.
16539         (finish_struct_1): Likewise.
16540         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
16541         * decl.c (exapnd_static_init): Remove call to
16542         preserve_initializer.
16543         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
16544         vtables.
16545         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
16546         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
16547         (construct_virtual_bases): Don't initialize virtual base pointers
16548         under the new ABI.
16549         (build_aggr_init): Clean up comment.
16550         (expand_aggr_init_1): Likewise.
16551         * rtti.c (expand_class_desc): Store the virtual function table
16552         index where the vbase offset lives in the offset field.
16553         * search.c (dfs_walk_real): Make it global.
16554         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
16555         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
16556
16557         * tinfo.h (USItype): Make it signed under the new ABI.
16558         * tinfo.cc (convert_to_base): New function.  Encapsulate base
16559         conversion logic here.
16560         (__class_type_info::do_upcast): Use it.
16561         (__class_type_info::do_dyncast): Likewise.
16562         (__class_type_info::do_find_public_subobj): Likewise.
16563
16564         * init.c (construct_virtual_bases): Don't look up the addresses of
16565         virtual bases at run-time.
16566
16567         * class.c (build_vbase_pointer): Relocate.
16568         (build_vbase_pointer_fields): Likewise.
16569         (dfs_build_vbase_offset_vtbl_entries): Likewise.
16570         (build_vbase_offset_vtbl_entries): Likewise.
16571
16572         * decl.c (init_decl_processing): Complain if -fnew-abi
16573         -fno-vtable-thunks is used.
16574
16575         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
16576         flag_new_abi.
16577
16578 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
16579
16580         * cp-tree.h (num_extra_vtbl_entries): New function.
16581         (size_extra_vtbl_entries): Likewise.
16582         (dfs_vtable_path_unmark): Likewise.
16583         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
16584         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
16585         * class.c (num_extra_vtbl_entries): New function.
16586         (size_extra_vtbl_entries): Likewise.
16587         (dfs_build_vbase_offset_vtbl_entries): New function.
16588         (build_vbase_offset_vtbl_entries): Likewise.
16589         (build_vtbl_initializer): Use it.
16590         (finish_struct_1): Adjust vtable sizes (using
16591         num_extra_vtbl_entries).
16592         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
16593         THUNK_DECL is non-NULL before expanding it.
16594         * init.c (expand_virtual_init): Adjust the vtable pointer by
16595         size_extra_vtbl_entries before storing it.
16596         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
16597         Handle TREE_LIST parameters here, not in the dfs_* functions.
16598         (dfs_unmarked_real_bases_queue_p): Adjust.
16599         (dfs_marked_real_bases_queue_p): Likewise.
16600         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
16601         (dfs_vtable_path_marked_real_bases_queue_p): New function.
16602         (dfs_vtable_path_unmark): Likewise.
16603
16604 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
16605
16606         * optimize.c (copy_body_r): Clear the operand three of a
16607         TARGET_EXPR when copying it.
16608
16609 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16610
16611         * method.c (build_decl_overload_real): Check whether we are in ::
16612         before returning __builtin_new/delete.
16613
16614 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
16615
16616         * pt.c (tsubst_friend_function): Improve comment.
16617         (instantiate_decl): Avoid crashing when a "nested" function is
16618         instantiated from the top level.
16619
16620         * dump.c (dqeueue_and_dump): Dump
16621         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
16622
16623 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16624
16625         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
16626
16627 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
16628
16629         * g++spec.c (lang_specific_driver): Add -fnew-abi if
16630         ENABLE_NEW_GXX_ABI defined.
16631         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
16632         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
16633         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
16634
16635 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
16636
16637         * decl.c (start_cleanup_fn): Call pushdecl.
16638
16639         * call.c (convert_class_to_reference): Fix typos.
16640         (build_conditional_expr): Handle errors gracefully.
16641         * class.c (push_nested_class): Likewise.
16642         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
16643         (DECL_THIS_EXTERN): Use it.
16644         (DECL_THIS_STATIC): Likewise.
16645         * cvt.c (convert_to_void): Handle errors gracefully.
16646         (build_expr_type_conversion): Likewise.
16647         * decl.c (maybe_push_decl): Likewise.
16648         (start_decl_1): Likewise.
16649         (require_complete_types_for_parms): Likewise.
16650         * parse.y (structsp): Likewise.
16651         (base_class): Likewise.
16652         * parse.c: Regenerated.
16653         * pt.c (finish_member_template_decl): Likewise.
16654         * typeck.c (decay_conversion): Likewise.
16655
16656         * cp-tree.h (dfs_skip_vbases): New function.
16657         (find_vbase_instance): Likewise.
16658         * class.c (determine_primary_base): Allow a nearly empty base to
16659         serve as a primary base class under the new ABI.
16660         (get_class_offset_1): Rename to ...
16661         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
16662         messages here.
16663         (get_class_offset): Use it.  Issue error messages here.
16664         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
16665         find the right copies of virtual bases.
16666         (fixup_vtable_deltas1): Rename to ...
16667         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
16668         bases as primary bases.
16669         (fixup_vtable_deltas): Remove.
16670         (override_one_vtable): Handle virtual bases as primary bases.
16671         (merge_overrides): Likewise.
16672         (finish_struct_1): Likewise.
16673         (dump_class_hierarchy): Dump primary-ness of bases as well.
16674         * search.c (mark_primary_bases): Use a pre-order traversal to
16675         handle primary virtual bases.
16676         (dfs_skip_vbases): New fiunction.
16677         (expand_upcast_fixups): Adjust to handle primary virtual bases.
16678         (fixup_virtual_upcast_offsets): Likewise.
16679         (fixup_all_virtual_upcast_offsets): Likewise.
16680         (dfs_find_vbase_instances): New function.
16681         (find_vbase_instance): Likewise.
16682
16683 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
16684
16685         * lex.c (DIR_SEPARATOR): Delete macro.
16686
16687 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
16688
16689        * decl2.c (lang_decode_option): Handle automatic line wrapping
16690        option.
16691
16692 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
16693
16694         * friend.c (do_friend): Don't resolve scopes when processing
16695         template declarations, even if the qualifying scope doesn't
16696         involve template parameters.
16697
16698 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
16699
16700         * class.c (dfs_modify_vtables_queue_p): Remove.
16701         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
16702         and dfs_marked_real_bases_queue_p instead of
16703         dfs_modify_vtables_queue_p.
16704
16705         * class.c (build_vbase_path): Simplify.
16706         (dfs_propagate_binfo_offsets): New function.
16707         (propagate_binfo_offsets): Use it.
16708         (remove_base_field): Simplify.
16709         (dfs_set_offset_for_vbases): Remove.
16710         (dfs_set_offset_for_shared_vbases): New function.
16711         (dfs_set_offset_for_unshared_vbases): Likewise.
16712         (layout_virtual_bases): Use them.
16713         (layout_basetypes): Don't call propagate_binfo_offsets.
16714         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
16715         for the vbases.
16716
16717         * class.c (build_base_field): New function, split out from ...
16718         (build_base_fields): ... here.  Use it.  Allocate primary bases
16719         first, under the new ABI.
16720         (get_vtable_entry): Remove.
16721         (remove_base_field): New function, split out from ...
16722         (remove_base_fields): ... here.  Adjust since primary bases come
16723         first under the new ABI.
16724
16725         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
16726         (initialize_vtbl_ptrs): New function.
16727         (expand_indirect_vtbls_init): Change prototype.
16728         (convert_pointer_to_vbase): Declare.
16729         * init.c (expand_direct_vtbls_init): Remove.
16730         (dfs_initialize_vtbl_ptrs): New function.
16731         (initialize_vtbl_ptrs): Likewise.
16732         (emit_base_init): Use initialize_vtbl_ptrs.
16733         * search.c (convert_pointer_to_vbase): Make it global.
16734         (expand_indirect_vtbls_init): Remove vtable initialization code.
16735         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
16736
16737         * class.c (dfs_finish_vtbls): New function.
16738         (finish_vtbls): Use it.
16739         (dump_class_hierarchy): New function.
16740
16741         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
16742         (BINFO_VBASE_PRIMARY_P): New macro.
16743         (BINFO_VIRTUALS): Add to documentation.
16744         (SET_BINFO_PRIMARY_MARKED_P): Remove.
16745         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16746         (dfs_mark_primary_bases_queue_p): Likewise.
16747         (dfs_unmarked_real_bases_queue_p): New function.
16748         (dfs_marked_real_bases_queue_p): Likewise.
16749         * search.c (dfs_mark_primary_bases): Adjust.
16750         (mark_primary_bases): Likewise.
16751         (get_shared_vbase_if_not_primary): New function.
16752         (dfs_unmarked_real_bases_queue_p): Likewise.
16753         (dfs_marked_real_bases_queue_p): Likewise.
16754         (dfs_get_pure_virtuals): Simplify.
16755         (get_pure_virtuals): Likewise.
16756
16757 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16758
16759         * lex.c: Include tm_p.h.
16760
16761 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
16762
16763         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
16764
16765 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
16766
16767         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
16768         * pt.c (instantiate_decl): Defer comdat templates that might not be
16769         needed.
16770
16771         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
16772         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
16773         (finish_file): Likewise.
16774
16775         * decl2.c (import_export_class): Undo 12/14 change.
16776
16777         * error.c (dump_decl): operator new, not operatornew.
16778
16779         * class.c (field_decl_cmp): A nontype is "greater" than a type.
16780         * search.c (lookup_field_1): Look for the last field with the
16781         desired name.
16782
16783 2000-01-05  Nathan Sidwell  <nathan@acm.org>
16784
16785         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
16786         FUNCTION_DECL.
16787
16788 2000-01-05  Nathan Sidwell  <nathan@acm.org>
16789
16790         * typeck.c (build_static_cast): Don't strip target qualifiers
16791         when casting from a class.
16792
16793 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16794
16795         * class.c (warn_hidden): Initialize variable `fndecl'.
16796
16797 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
16798
16799         * decl.c (flag_isoc9x): New variable to be able to use code in
16800         c-common.c.  For now always zero.
16801
16802 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
16803
16804         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
16805         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
16806         or unshare_base_binfos for virtual bases here.
16807         * search.c (dfs_get_vbase_types): Do it here.
16808         (get_vbase_types): Adjust.
16809
16810 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
16811
16812         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
16813         (BINFO_PRIMARY_MARKED_P): Use flag 5.
16814         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
16815         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16816         (unmark_primary_bases): Remove declaration.
16817         (unmarkedp): Declare.
16818         (dfs_vbase_unmark): Likewise.
16819         * class.c (determine_primary_base): Return immediately if there
16820         are no base classes.  Call mark_primary_bases here.
16821         (modify_all_direct_vtables): Remove.
16822         (modify_all_indirect_vtables): Remove.
16823         (dfs_modify_vtables_queue_p): New function.
16824         (dfs_modify_vtables): New function.
16825         (modify_all_vtables): Use them.
16826         (build_base_fields): Build FIELD_DECLs for primary virtual base
16827         classes.
16828         (create_vtable_ptr): Don't call determine_primary_base here.
16829         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
16830         (dfs_set_offset_for_vbases): ... this.
16831         (layout_virtual_bases): Use it.
16832         (layout_class_type): Call determine_primary_base here.
16833         * search.c (unmarkedp): Make it global.
16834         (shared_marked_p): Simplify.
16835         (shared_unmarked_p): Likewise.
16836         (dfs_primary_bases_queue_p): Remove.
16837         (dfs_unmark_primary_bases): Likewise.
16838         (unmark_primary_bases): Likewise.
16839         (mark_primary_bases): Simplify.
16840         (get_pure_virtuals): Don't call mark_primary_bases here.
16841         (dfs_vbase_unmark): New function.
16842         (get_vbase_types): Simplify.
16843
16844         * class.c (struct base_info): Remove.
16845         (determine_primary_base): Take has_virtual_p rather than a
16846         base_info as input.  Don't calculate max_has_virtual.
16847         (finish_struct_bits): Remove max_has_virtual argument.
16848         (create_vtable_ptr): Remove max_has_virtual_p argument.
16849         (layout_virtual_bases): Remove max argument.
16850         (layout_basetypes): Likewise.
16851         (layout_class_type): Remove max_has_virtual_p argument.
16852         (finish_struct_1): Remove max_has_virtual.
16853
16854         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
16855         (layout_basetypes): Remove.
16856         * class.c (propagate_binfo_offsets): Moved here from tree.c.
16857         Update to handle primary virtual bases.
16858         (remove_base_fields): New function, split out from
16859         layout_basetypes.
16860         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
16861         (layout_virtual_bases): New function, split out from
16862         layout_basetypes.  Update to handle primary virtual bases.
16863         (layout_basetypes): Moved here from tree.c.  Use
16864         remove_base_fields and layout_virtual_bases.
16865         * search.c (dfs_mark_primary_bases_queue_p): New function.
16866         (mark_primary_bases): Use it.
16867         * tree.c (CEIL): Remove.
16868         (propagate_binfo_offsets): Remove.
16869         (layout_basetypes): Remove.
16870
16871 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
16872
16873         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
16874         (BINFO_PRIMARY_MARKED_P): New macro.
16875         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
16876         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16877         (mark_primary_bases): New function.
16878         (unmark_primary_bases): Likewise.
16879         * search.c (get_abstract_virtuals_1): Remove.
16880         (dfs_mark_primary_bases): New function.
16881         (mark_primary_bases): Likewise.
16882         (dfs_unmark_primary_bases): Likewise.
16883         (unmark_primary_bases): Likewise.
16884         (dfs_get_pure_virtuals): Likewise.
16885
16886 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
16887
16888         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
16889         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
16890         (modify_one_vtable): Adjust.
16891         (fixup_vtable_deltas1): Likewise.
16892         (override_one_vtable): Likewise.
16893         * search.c (get_abstract_virtuals_1): Likewise.
16894         (get_pure_virtuals): Likewise.
16895         (expand_upcast_fixups): Likewise.
16896         * tree.c (debug_binfo): Likewise.
16897
16898         * class.c (build_vtable): Don't return a value.  Don't rebuild
16899         vtables for bases that have already been handled.
16900         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
16901         already been handled.
16902         (modify_one_vtable): Adjust accordingly.
16903         (fixup_vtable_deltas1): Likewise.
16904         (finish_struct_1): Likewise.
16905
16906 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16907
16908         * call.c (build_new_method_call): Also check destructors.