OSDN Git Service

PR c++/11295
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-08-01  Nathan Sidwell  <nathan@codesourcery.com>
2
3         PR c++/11295
4         * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
5         tf_stmt_expr_body.
6         (finish_stmt_expr_expr): Declare.
7         * parser.c (cp_parser_primary_expression): Tell
8         cp_parser_compount_statement that it is a statement expression.
9         (cp_parser_statement, cp_parser_labeled_statement,
10         cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
11         in_statement_expr_p parameter.
12         (cp_parser_expression_statement): Likewise. Call
13         finish_stmt_expr_expr for final expression of a statement
14         expression.
15         (cp_parser_for_init_statement,
16         cp_parser_implicitly_scoped_statement,
17         cp_parser_already_scoped_statement, cp_parser_function_definition,
18         cp_parser_try_block, cp_parser_handled): Adjust.
19         * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
20         (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
21         (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
22         * semantics.c (finish_expr_stmt): Do not deal with statement
23         expressions.
24         (begin_stmt_expr): Clear last_expr_type.
25         (finish_stmt_expr_expr): New.
26         (finish_stmt_expr): Process the value expression.
27         
28         * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
29         compound expr inside the target's initializer.
30         
31         PR c++/11525
32         * parser.c (cp_parser_primary_expression): Do not set
33         non-constant-p merely because it is a dependent scope.
34
35         PR c++/9447
36         * decl2.c (do_class_using_decl): Set type to NULL_TREE.
37         * semantics.c (finish_expr_stmt): Do not convert to void in a
38         template.
39
40 2003-07-31  Nathan Sidwell  <nathan@codesourcery.com>
41
42         * pt.c (coerce_template_parms): Refactor.
43         (fn_type_unification): Increment processing_template_decl when
44         tsubsting an incomplete set of explicit args.
45
46         PR c++/11347
47         * pt.c (instantiate_class_template): Increment
48         processing_template_decl around the tsubst of a template member
49         class.
50         (tsubst_qualified_id): Assert we do not have a dependent scope.
51
52         * pt.c (coerce_template_template_parms, lookup_template_class,
53         can_complete_type_without_circularity, instantiate_class_template,
54         tsubst_decl, unify): Reformat.
55
56 Thu Jul 31 01:07:41 CEST 2003  Jan Hubicka  <jh@suse.cz>
57
58         * decl2.c (maybe_make_one_only): Use mark_referenced.
59         * method.c (use_thunk): Likewsie.
60
61 Wed Jul 30 19:12:48 CEST 2003  Jan Hubicka  <jh@suse.cz>
62
63         * class.c (build_vtable_entry_ref): Kill.
64         (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
65         (build_vfn_ref): Do not call build_vtable_entry_ref.
66         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
67         * cp-tree.h (prepare_assemble_variable): Kill.
68         * cp-decl.c (prepare_assemble_variable): Kill.
69
70 2003-07-29  Geoffrey Keating  <geoffk@apple.com>
71
72         * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
73         of setting valid_pch by hand.
74
75 2003-07-29  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
76
77         * decl.c (finish_enum): Initialize underlying_type.
78
79 2003-07-29  Nathan Sidwell  <nathan@codesourcery.com>
80
81         PR c++/9447
82         * decl.c (add_binding): Add bval local variable.
83         (push_class_level_binding): Likewise. Allow a USING_DECL to be
84         pushed.
85         * decl2.c (do_class_using_decl):  The type of a using decl is
86         unknown.
87         * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
88         function call lookup code.
89         * pt.c (tsubst): A USING_DECL will have unknown type.
90         (tsubst_copy_and_build): Allow a using decl.
91         (type_dependent_expression_p): A USING_DECL will make it
92         dependent.
93         * semantics.c (finish_member_declaration): Push a dependent using
94         declaration.
95
96 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
97
98         PR c++/11530
99         * parser.c (cp_parser_postfix_expression): Do not call mark_used.
100         * semantics.c (finish_id_expression): Call mark_used for all
101         declarations.
102
103 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
104
105         PR c++/11667
106         * call.c (standard_conversion): Allow all integral->enumeral
107         conversions, after marking them as bad.
108         * decl.c (finish_enum): Make sure that all enumerators are
109         properly converted to the underlying type.
110         (build_enumerator): Set DECL_CONTEXT for namespace-scope
111         enumeration types.
112         * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
113         (tsubst_enum): Tidy.
114
115         * Make-lang.in (typeck.o): Depend on convert.h.
116         (class.o): Likewise.
117         (rtti.o): Likewise.
118         * call.c: Include convert.h.
119         (convert_arg_to_ellipsis): Use convert_to_real.
120         * class.c: Include convert.h.
121         (build_base_path): Use convert_to_integer.
122         * rtti.c: Include convert.h.
123         (build_headof): Use convert_to_integer.
124         * typeck.c: Include convert.h.
125         (decay_conversion): Use convert_to_integer.
126         (build_unary_op): Use build_nop.
127         (get_delta_difference): Use convert_to_integer.
128         (build_ptrmemfunc): Avoid unncessary conversions.
129
130 Mon Jul 28 23:55:10 CEST 2003  Jan Hubicka  <jh@suse.cz>
131
132         * decl2.c (mark_member_pointers): Verify that member pointer points to
133         the function.
134
135 2003-07-28  Nathan Sidwell  <nathan@codesourcery.com>
136
137         * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
138         (finish_compound_stmt): Remove no scope arg.
139         * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
140         end_compound_stmt calls.
141         (expand_static_init, begin_destructor_body, begin_function_body,
142         finish_function_body): Likewise.
143         * decl2.c (start_objects, finish_objects,
144         start_static_storage_duration_function,
145         finish_static_storage_duration_function): Likewise.
146         * init.c (begin_init_stmts, finish_init_stmts,
147         construct_virtual_base, build_vec_init): Likewise.
148         * method.c (do_build_assign_ref, synthesize_method): Likewise.
149         * parser.c (cp_parser_compound_statement,
150         cp_parser_implicitly_scoped_statement,
151         cp_parser_already_scoped_statement): Likewise.
152         * pt.c (tsubst_expr): Likewise.
153         * semantics.c (begin_compound_stmt): No scope arg is a bool.
154         (finish_compound_stmt): Remove no scope arg.
155
156         * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
157         always dyadic.
158
159 2003-07-27  Mark Mitchell  <mark@codesourcery.com>
160
161         * call.c (standard_conversion): Tweak handling of
162         pointer-to-member types.
163         * pt.c (tsubst): Correctly qualify pointers-to-data member types.
164         * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
165         pointer-to-data member types.
166
167 2003-07-27  Nathan Sidwell  <nathan@codesourcery.com>
168
169         * parser.c (cp_parser_type_parameter): Reformat.
170         (cp_parser_parameter_declaration): Deprecate default args where
171         not allowed.
172
173 2003-07-26  Nathan Sidwell  <nathan@codesourcery.com>
174
175         * cfns.h: Rebuilt.
176
177         * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
178         (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
179         * init.c (begin_init_stmts): Make static. Return is_global
180         value. Always call begin_stmt_expr.
181         (finish_init_stmts): Make static. Add is_global parm. Always
182         building a stmt tree.
183         (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
184         (build_vec_init): Likewise. Always building a stmt tree.
185         (expand_default_init): Always building a stmt tree.
186         (get_temp_regvar): Likewise.
187         * semantics.c (begin_global_stmt_expr,
188         finish_global_stmt_expr): Remove.
189
190 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
191
192         * cp-tree.h (build_compound_expr): Take LHS & RHS args.
193         (build_x_compound_expr_from_list): Declare.
194         * typeck.c (build_x_compound_expr_from_list): New.
195         (build_x_compound_expr): Adjust.
196         (build_compound_expr): Remove unreachable code. Take two
197         parameters, adjust.
198         * decl.c (grok_reference_init): Use
199         build_x_compound_expr_from_list.
200         (expand_static_init): Adjust build_compound_expr call.
201         (cxx_maybe_build_cleanup): Likewise.
202         * init.c (perform_member_init): Use
203         build_x_compound_expr_from_list.
204         (build_new_1): Likewise.
205         (build_vec_delete): Adjust build_compound_expr calls.
206         (build_vbase_delete): Likewise.
207         * typeck2.c (store_init_value): Use
208         build_x_compound_expr_from_list.
209         (build_functional_cast): Likewise.
210
211 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
212
213         * cp-tree.h (enum tsubst_flags_t): Add tf_user.
214         * decl.c (make_typename_type): Pass it.
215         * pt.c (lookup_template_class): Use it.
216         (resolve_typename_type): Pass it.
217         * semantics.c (finish_template_type): Pass it.
218
219 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
220
221         PR c++/11617
222         * cp-tree.h (qualified_name_lookup_error): Declare.
223         * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
224         errors.
225         (tsubst_expr) <DECL_STMT case>: Likewise.
226         (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
227         * semantics.c (qualified_name_lookup_error): New, broken out of ...
228         (finish_id_expression): ... here. Use it.
229
230 2003-07-25  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
231
232         * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
233
234 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
235
236         PR c++/11596
237         * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
238         (tsubst_template_arg): New.
239         (tsubst_template_arg_vector): Rename to ...
240         (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
241         tsubst_template_arg.
242         (coerce_template_parms): Use tsubst_template_arg for default
243         value.
244         (tsubst_template_parms): Likewise.
245         (tsubst_aggr_type): Adjust.
246         (tsubst_decl): Likewise.
247         (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
248         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
249
250 2003-07-25 Gabriel Dos Reis  <gdr@integrable-solutions.net>
251
252         * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
253         * error.c: Use the new pretty-printer framework.
254
255 2003-07-24  Per Bothner  <pbothner@apple.com>
256
257         * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
258         which causes errors messages to incorrectly mention included files.
259
260 2003-07-24  Mark Mitchell  <mark@codesourcery.com>
261
262         * cp-tree.h (convert_to_base_statically): Declare.
263         * call.c (build_special_member_call): Convert INSTANCE to the base
264         type.
265         * class.c (convert_to_base_statically): New method.
266         * init.c (construct_virtual_base): Use it.
267         * method.c (do_build_assign_ref): Fix typo in comment.
268
269 2003-07-24  Jason Merrill  <jason@redhat.com>
270
271         * decl.c: Just set truthvalue_* to boolean_*.
272
273 2003-07-24  Nathan Sidwell  <nathan@codesourcery.com>
274
275         * decl.c (reshape_init): Remove unreachable code.
276
277 2003-07-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
278
279         PR c++/11513
280         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
281
282 2003-07-23  Mark Mitchell  <mark@codesourcery.com>
283
284         PR c++/11645
285         * cp-tree.h (accessible_base_p): Declare.
286         * call.c (build_over_call): Use it.
287         * search.c (accessible_base_p): New function, split out from ...
288         (lookup_base): ... here.
289
290         PR c++/11517
291         * call.c (build_conditional_expr): Use perform_implicit_conversion
292         and error_operand_p.  Robustify.
293         * typeck.c (build_unary_op): Use perform_implicit_conversion.
294
295 2003-07-23  Nathan Sidwell  <nathan@codesourcery.com>
296
297         PR c++/10953
298         * parser.c (cp_parser_nested_name_specifier): Reset scope on
299         failure.
300         (cp_parser_elaborated_type_specifier): Likewise.
301
302 2003-07-22  Mark Mitchell  <mark@codesourcery.com>
303
304         Eliminate use of POINTER_TYPE for pointers-to-members.
305         * call.c (standard_conversion): Rework pointer-to-member handling.
306         Add comments.
307         (add_builtin_candidate): Likewise.
308         (resolve_scoped_fn_name): Remove.
309         (build_conditional_expr): Rework pointer-to-member handling.
310         (compare_ics): Likewise.
311         * class.c (check_field_decls): Use TYPE_PTR_P.
312         * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
313         handling.
314         * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
315         (TYPE_PTRMEM_P): Add comment.
316         (TYPE_PTR_P): Simplify.
317         (TYPE_PTROB_P): Correct definition.
318         (TYPE_PTR_TO_MEMBER_P): New macro.
319         (TYPE_PTRMEM_CLASS_TYPE): Adjust.
320         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
321         (resolved_scoped_fn_name): Remove declaration.
322         (build_offset_ref): Change prototype.
323         (resolve_offset_ref): Remove.
324         (comp_target_types): Remove.
325         * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
326         handling.
327         (convert_to_reference): Use can_convert.
328         (ocp_convert): Improve error handling.  Rework pointer-to-member
329         handling.
330         (perform_qualification_conversions): Rework pointer-to-member
331         handling.
332         * decl.c (build_ptrmem_type): Handle functions too.
333         (create_array_type_for_decl): Remove OFFSET_TYPE error message.
334         (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
335         (grokparms): Remove OFFSET_TYPE error message.
336         * dump.c (cp_dump_tree): Rework pointer-to-member handling.
337         * error.c (dump_type_prefix): Likewise.
338         * expr.c (cplus_expand_constant): Use build_nop.
339         * init.c (build_offset_ref): Add address_p parameter.  Fold in
340         necessary bits from resolve_offset_ref.
341         (resolve_offset_ref): Remove.
342         * parser.c (cp_parser_postfix_expression): Remove special case
343         code for OFFSET_TYPE.
344         * pt.c (convert_nontype_argument): Rework pointer-to-member
345         handling.
346         (convert_template_argument): Likewise.
347         (unify): Likewise.
348         (invalid_nontype_parm_type_p): Likewise.
349         (dependent_type_p_r): Likewise.
350         * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
351         (target_incomplete_p_): Rework pointer-to-member
352         handling.
353         (get_pseudo_ti_init): Likewise.
354         (get_pseudo_ti_desc): Likewise.
355         * semantics.c (finish_qualified_id_expr): Adjust call to
356         build_offset_ref.  Remove use of resolve_offset_ref.
357         * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
358         * typeck.c (target_type): Use TYPE_PTRMEM_P.
359         (type_unknown_p): Remove obsolete code about the time before
360         non-dependent expressions were handled correctly.
361         (qualify_type_recursive): Remove.
362         (composite_pointer_type_r): New function.
363         (composite_pointer_type): Use it.
364         (merge_types): Remove dead comments.
365         (comp_cv_target_types): Remove.
366         (comp_target_types): Likewise.
367         (comp_target_parms): Likewise.
368         (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
369         (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
370         (build_binary_op): Do not use of comp_target_types.
371         (pointer_diff): Remove OFFSET_TYPE case.
372         (build_unary_op): Adjust pointer-to-member handling.
373         (unary_complex_lvalue): Likewise.
374         (check_for_casting_away_constness): Add description parameter.
375         (build_static_cast): Pass it.
376         (build_reinterpret_cast): Use check_for_casting_away_constness.
377         (build_const_cast): Adjust pointer-to-member handling.
378         (build_c_cast): Likewise.
379         (convert_for_assignment): Remove OFFSET_TYPE error message.
380         (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
381         (comp_ptr_ttypes_reinterpret): Remove.
382         (casts_away_constness_r): Adjust pointer-to-member handling.
383         (casts_away_constness): Liekwise.
384         (strip_all_pointer_quals): Remove.
385         * typeck2.c (digest_init): Adjust pointer-to-member handling.
386         (build_m_component_ref): Likewise.
387         
388 2003-07-22  Wolfgang Bangerth  <bangerth@dealii.org>
389
390         * lex.c (unqualified_fn_lookup_error): Mention that the error
391         message needs to be kept in synch with the manual.
392
393 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
394
395         PR c++/11614
396         * decl.c (grokdeclarator): An array member is only a flexible
397         array member if the field itself is the array.
398
399 2003-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
400
401         PR c++/10793
402         * decl.c (xref_basetypes): Handle error_mark_node.
403
404 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
405
406         * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
407         * tree.c (lvalue_p_1): Set it.
408         * class.c (check_field): Don't allow non-packed non-POD fields to
409         be packed.
410         * call.c (reference_binding): Need a temporary for all bitfield
411         and packed fields.
412         (convert_like_real): Check it is ok to make a temporary here.
413
414 2003-07-21  Nathan Sidwell  <nathan@codesourcery.com>
415
416         * cp-tree.h (hack_identifier): Remove.
417         * method.c (hack_identifier): Remove.
418         * semantics.c (finish_id_expression): Expand hack_identifier
419         here. Simplify.
420
421 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
422
423         * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
424         semantics.c typeck.c: Remove unnecessary casts.
425
426 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
427
428         * cp-tree.h (hack_identifier): Remove.
429         * method.c (hack_identifier): Remove.
430         * semantics.c (finish_id_expression): Expand hack_identifier
431         here. Simplify.
432
433 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
434
435         * cp-tree.h (finish_non_static_data_member): Add object param.
436         * method.c (hack_identifier): Adjust.
437         * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
438         again for a FIELD_DECL.
439         * semantics.c (finish_non_static_data_member): Add object
440         parameter. Always save the DECL in the COMPONENT_REF.
441         * call.c (resolve_scoped_fn_name): Adjust.
442
443 2003-07-17  Zack Weinberg  <zack@codesourcery.com>
444
445         * pt.c (get_bindings): Make definition consistent with
446         forward declaration.
447
448 2003-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
449
450         PR c++/7809
451         * friend.c (add_friend): Check access for member functions
452         and templates.
453
454 2003-07-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
455
456         PR c++/10668
457         * typeck.c (build_class_member_access_expr): Improve diagnostic.
458
459 2003-07-16  Mark Mitchell  <mark@codesourcery.com>
460
461         PR c++/11547
462         * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
463         macro.
464         (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
465         * decl.c (duplicate_decls): Merge
466         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
467         * parser.c (cp_parser_postfix_expression): Adjust call to
468         cp_parser_initializer_list and
469         cp_parser_parenthesized_expression_list.
470         (cp_parser_parenthesized_expression_list): Add non_constant_p.
471         (cp_parser_new_placement): Adjust call to
472         cp_parser_parenthesized_expression_list.
473         (cp_parser_direct_new_declarator): Likewise.
474         (cp_parser_conditional_expression): Remove.
475         (cp_parser_constant_expression): Parse an assignment-expression,
476         not a conditional-expression.
477         (cp_parser_simple_declaration): Resolve expression/declaration
478         ambiguity more quickly.
479         (cp_parser_mem_initializer): Adjust call to
480         cp_parser_parenthesized_expression_list.
481         (cp_parser_init_declarator): Keep track of whether or not the
482         initializer is a constant-expression.
483         (cp_parser_initializer): Add non_constant_p parameter.
484         (cp_parser_initializer_clause): Likewise.
485         (cp_parser_initializer_list): Likewise.
486         (cp_parser_attribute_list): Adjust call to
487         cp_parser_parenthesized_expression_list.
488         (cp_parser_functional_cast): Likewise.
489         * pt.c (tsubst_decl): Copy
490         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
491         (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
492         * semantics.c (finish_id_expression): Use
493         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
494
495 2003-07-16  Neil Booth  <neil@daikokuya.co.uk>
496
497         * lang-options.h: Remove.
498
499 2003-07-16  Andrew Pinski  <pinskia@physics.uc.edu>
500
501         PR c/10962
502         * class.c (field_decl_cmp): Remove.
503         (resort_field_decl_cmp): Remove.
504         (resort_sorted_fields): Remove.
505         (add_fields_to_vec): Rename to ...
506         (add_fields_to_record_type): this.
507         (finish_struct_1): Change to be using
508         sorted_fields_type's fields.
509         * cp-tree.h (lang_decl): In lang_decl_u3
510         change sorted_fields to be a pointer to
511         sorted_fields_type.
512         (resort_sorted_fields): Remove prototype.
513         * search.c (lookup_field_1): Change to be using
514         sorted_fields_type's fields.
515
516 2003-07-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
517
518         PR c++/5421
519         * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
520         is a member of other class.
521         * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
522         is a specialization of function template.
523
524 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
525
526         PR c++/10903
527         * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
528         Improve.
529
530 2003-07-15  Mark Mitchell  <mark@codesourcery.com>
531
532         * cp-tree.def (LOOKUP_EXPR): Remove.
533         * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
534         (LOOKUP_EXPR_GLOBAL): Remove.
535         (get_bindings): Remove.
536         (is_aggr_type_2): Remove.
537         * call.c (resolved_scoped_fn_name): Remove support for
538         LOOKUP_EXPR.
539         * decl.c (grokfndecl): Likewise.
540         (grokdeclarator): Likewise.
541         * error.c (dump_decl): Likewise.
542         (dump_expr): Likewise.
543         * friend.c (do_friend): Likewise.
544         * init.c (build_offset_ref): Likewise.
545         * lex.c (unqualified_fn_lookup_error): Use pedwarn.  Do not create
546         LOOKUP_EXPRs
547         * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
548         * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
549         test.
550         * pt.c (get_bindings): Give it internal linkage.
551         (check_explicit_specialization): Remove support for LOOKUP_EXPR.
552         (lookup_template_function): Likewise.
553         (for_each_tempalte_parm_r): Likewise.
554         (tsubst_decl): Likewise.
555         (tsubst_qualified_id): Handle template template parameters.
556         (tsubst_copy): Remove support for LOOKUP_EXPR.
557         (tsubst_copy_and_build): Likewise.
558         (most_general_template): Likewise.
559         (value_dependent_expression_p): Likewise.
560         (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
561         always dependent.
562         * semantics.c (perform_koenig_lookup): Do not create
563         IDENTIFIER_NODEs.
564         (finish_fname): Likewise.
565         (finish_id_expression): Likewise.
566         * tree.c (is_aggr_type_2): Remove.
567
568 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
569
570         PR c++/11531
571         * typeck.c (check_return_expr): Fix thinko in diagnostic.
572
573 2003-07-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
574
575         PR c++/10108
576         * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
577         error_mark_node.
578
579 2003-07-14  Mark Mitchell  <mark@codesourcery.com>
580
581         PR c++/11509
582         * pt.c (dependent_scope_ref_p): New function.
583         (value_dependent_expression_p): Use it.
584         (type_dependent_expression_p): Likewise.
585
586         * pt.c (tsubst_friend_function): Use reregister_specialization.
587
588         PR c++/7019
589         * cp-tree.h (lookup_qualified_name): Adjust prototype.
590         * decl.c (lookup_qualified_name): Add complain parameter.  Adjust
591         call to is_aggr_type.
592         * parser.c (cp_parser_lookup_name): Adjust call to
593         lookup_qualified_name.
594         * pt.c (tsubst_qualified_id): Likewise.
595         (tsubst_copy_and_build): Likewise.
596         * semantics.c (finish_qualified_id_expr): Deal with erroneous
597         expressions.
598
599 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
600
601         PR c++/11510
602         * call.c (op_error): Properly format  REALPART_EXPR and
603         IMAGPART_EXPR.
604         * error.c (dump_expr): Likewise.
605
606 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
607
608         * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
609
610 2003-07-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
611
612         PR c++/5293
613         * call.c (initialize_reference): Improve diagnostic.
614
615 2003-07-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
616
617         PR c++/11154
618         * pt.c (more_specialized_class): Add full_args parameter.
619         (most_specialized_class): Adjust calls to more_specialized_class.
620         * cp-tree.h (more_specialized_class): Adjust declaration.
621
622 2003-07-14  Dan Nicolaescu  <dann@ics.uci.edu>
623
624         * lex.c (enum tree_node_kind): Delete.
625
626 2003-07-13  Mark Mitchell  <mark@codesourcery.com>
627
628         PR c++/11503
629         * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
630         (SET_DECL_SELF_REFERENCE_P): Likewise.
631         * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
632         * pt.c (tsubst_decl): Copy it.
633         * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
634
635         * pt.c (reregister_specialization): Fix thinko in previous change.
636
637         * cp-tree.h (cp_id_kind): New type.
638         (unqualified_name_lookup_error): Change prototype.
639         (unqualified_fn_lookup_error): New function.
640         (do_identifier): Remove.
641         (do_scoped_id): Likewise.
642         (tsubst_copy_and_build): Change prototype.
643         (reregister_specialization): New function.
644         (perform_koenig_lookup): Likewise.
645         (finish_id_expression): Likewise.
646         * call.c (build_method_call): Adjust call to
647         unqualified_name_lookup_error.
648         * decl.c (duplicate_decls): Use reregister_specialization.
649         * lex.c (is_global): Remove.
650         (unqualified_name_lookup_error): Return a value.
651         (do_identifier): Remove.
652         (do_scoped_id): Likewise.
653         (identifier_typedecl_value): Remove.
654         (unqualified_fn_lookup_error): New function.
655         * parser.c (cp_parser_id_kind): Remove.
656         (cp_parser_non_constant_id_expression): Remove.
657         (cp_parser_primary_expression): Use finish_id_expression.
658         (cp_parser_class_or_namespace_name): Use cp_id_kind, not
659         cp_parser_id_kind.
660         (cp_parser_postfix_expression): Use perform_koenig_lookup.
661         (cp_parser_template_argument): Use cp_id_kind.
662         (cp_parser_fold_non_dependent_expr): Adjust call to
663         tsubst_copy_and_build.
664         * pt.c (unregister_specialization): Rename to ...
665         (reregister_specialization): This.
666         (tsubst_friend_function): Use it.
667         (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
668         (tsubst_qualified_id): Likewise.
669         (tsubst_expr): Likewise.
670         (tsubst_copy_and_build): Add function_p parameter.  Use
671         finish_id_expression.  Introduce RECUR macro.
672         (tsubst_non_call_postfix_expression): New function.
673         (regenerate_decl_from_template): Use reregister_specialization.
674         * semantics.c (perform_koenig_lookup): New function.
675         (finish_id_expression): Likewise.
676
677 2003-07-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
678
679         * pt.c (push_access_scope_real): Remove.
680         (push_access_scope): Move code from push_access_scope_real.
681         (pop_access_scope): Don't check for TEMPLATE_DECL.
682         (instantiate_template): Defer access checking during template
683         substitution.
684         (regenerate_decl_from_template): Tidy.
685
686 2003-07-11  Nathanael Nerode  <neroden@gcc.gnu.org>
687
688         PR c++/11437
689         * operators.def: Add definitions for __imag__, __real__.
690
691 2003-07-11  Nathan Sidwell  <nathan@codesourcery.com>
692
693         PR c++/11050
694         * parser.c (cp_parser_expression_list): Rename to ...
695         (cp_parser_parenthesized_expression_list): ... here. Add attribute
696         parameter, parse the surounding parentheses.
697         (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
698         parameters. Return int.
699         (cp_parser_skip_to_closing_parenthesis or comma): Remove.
700         (cp_parser_postfix_expression): Adjust function call parsing.
701         (cp_parser_new_placement): Adjust.
702         (cp_parser_new_initializer): Likewise.
703         (cp_parser_cast_expression): Likewise.
704         (cp_parser_selection_statement): Likewise.
705         (cp_parser_mem_initializer): Likewise.
706         (cp_parser_asm_definition): Likewise.
707         (cp_parser_init_declarator): Likewise.
708         (cp_parser_declarator): Make
709         cdtor_or_conv_p an int ptr.
710         (cp_parser_direct_declarator): Likewise. Check for a parameter
711         list on cdtors & conv functions.
712         (cp_parser_initializer): Adjust.
713         (cp_parser_member_declaration): Adjust.
714         (cp_parser_attribute_list): Move code into
715         cp_parser_parens_expression_list.
716         (cp_parser_functional_cast): Adjust.
717         * pt.c (type_dependent_expression_p): Erroneous expressions are
718         non-dependent.
719
720 2003-07-11  Geoffrey Keating  <geoffk@apple.com>
721
722         * decl.c (cp_finish_decl): Handle 'used' attribute.
723
724         * cp-lang.c (c_reset_state): New dummy routine.
725         * cp-tree.h (finish_file): Move prototype to c-common.h.
726         * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
727
728 2003-07-11  Mark Mitchell  <mark@codesourcery.com>
729
730         PR c++/8327
731         * pt.c (tsubst_qualified_id): Implement suggested resolution for
732         Core Issue 2.
733         (type_dependent_expression_p): Likewise.
734
735 2003-07-10  Mark Mitchell  <mark@codesourcery.com>
736
737         * typeck.c (build_binary_op): Do not warn about signed
738         vs. unsigned comparisons in the bodies of templates.
739
740         PR c++/9411
741         * parser.c (cp_parser_postfix_expression): Check dependency of
742         functions.
743
744 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
745
746         PR c++/10032
747         * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
748         still errors.
749
750         PR c++/10527
751         * error.c (decl_to_string): Do not print default argument
752         expressions.
753
754         * cp-tree.h (break_out_calls): Remove declaration.
755         * tree.c (break_out_calls): Remove.
756         * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
757
758 2003-07-09  Nathan Sidwell  <nathan@codesourcery.com>
759
760         PR c++ 9483
761         * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
762         * decl2.c (constructor_name_p): Avoid repeated constructor_name
763         calls.
764         * decl.c (grokdeclarator): Refactor ctor/dtor detection.
765
766 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
767
768         * typeck.c (build_x_unary_op): Take note of the fact that
769         PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
770         trees.
771
772         * parser.c (cp_parser_primary_expression): Preserve the form of
773         qualified expressions in templates, even if they are not
774         dependent.
775         * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
776         (tsubst_qualified_id): Likewise.
777         * search.c (accessible_p): Treat everything in the body of a
778         template as accessible.
779
780 2003-07-08  Mark Mitchell  <mark@codesourcery.com>
781
782         * cp-tree.def (NON_DEPENDENT_EXPR): New node.
783         * cp-tree.h (build_call_from_tree): Remove.
784         (build_member_call): Likewise.
785         (dependent_template_arg_p): Remove.
786         (any_dependent_template_arguments_p): New function.
787         (dependent_template_id_p): Likewise.
788         (any_type_dependent_arguments_p): Likewise.
789         (build_non_dependent_expr): Likewise.
790         (build_non_dependent_args): Likewise.
791         (build_x_compound_expr): Adjust prototype.
792         * call.c (build_new_method_call): Handle non-dependent expressions
793         correctly.
794         * decl2.c (grok_array_decl): Likewise.
795         (build_offset_ref_call_from_tree): Likewise.
796         (build_call_from_tree): Remove.
797         * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
798         (dump_expr): Likewise.
799         * init.c (build_member_call): Remove.
800         * mangle.c (write_expression): Update handling for template-ids.
801         * parser.c (cp_parser_primary_expression): Use
802         any_dependent_template_arguments_p.  Update constant-expression
803         handling.
804         (cp_parser_postfix_expression): Use
805         any_type_dependent_arguments_p.  Simplify call processing.
806         (cp_parser_unary_expression): Simplify.
807         (cp_parser_expression): Adjust for changes to
808         build_x_compound_expr.
809         (cp_parser_template_argument): Implement standard-conforming
810         parsing of non-type template arguments.
811         (cp_parser_direct_declarator): Use
812         cp_parser_fold_non_dependent_expr.
813         (cp_parser_fold_non_dependent_expr): New function.
814         (cp_parser_next_token_ends_template_argument_p): Likewise.
815         * pt.c (convert_template_argument): Do not call
816         maybe_fold_nontype_arg.
817         (tsubst_baselink): Likewise.
818         (tsubst_copy_and_build): Share common code.  Make sizeof/alignof
819         processing work correctly for non-dependent expressions.  Adjust
820         handling of COMPOUND_EXPR.  Simplify call processing.
821         (value_dependent_expression_p): Deal with functional casts and
822         sizeof/alignof correctly.
823         (type_dependent_expression_p): Handle overloaded functions.
824         (any_type_dependent_arguments_p): New function.
825         (any_dependent_template_arguments_p): Likewise.
826         (dependent_template_p): Treat SCOPE_REFs as dependent.
827         (dependent_template_id_p): Simplify.
828         (build_non_dependent_expr): New function.
829         (build_non_dependent_args): Likewise.
830         * semantics.c (finish_stmt_expr): Don't make dependent
831         statement-expresions have void type.
832         (finish_call_expr): Handle non-dependent expressions
833         correctly.
834         * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
835         * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
836         type size_t, even in templates.
837         (expr_sizeof): Likewise.
838         (finish_class_member_access_expr): Handle non-dependent expressions
839         correctly.
840         (build_x_indirect_ref): Likewise.
841         (build_x_binary_op): Likewise.
842         (build_x_unary_op): Likewise.
843         (build_x_conditional_expr): Likewise.
844         (build_x_compound_expr): Likewise.
845         * typeck2.c (build_x_arrow): Likewise.
846
847 Wed Jul  9 02:28:39 CEST 2003  Jan Hubicka  <jh@suse.cz>
848
849         * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
850         * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
851         (start_function): Use DECL_ESTIMATED_INSNS.
852         * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
853
854         * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
855         unit-at-a-time
856
857 2003-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
858
859         PR c++/11030
860         * pt.c (instantiate_class_template): Don't call xref_tag to
861         inject name when the friend class is a specialization.
862
863 2003-07-07  Mark Mitchell  <mark@codesourcery.com>
864
865         * cp-tree.h (build_scoped_method_call): Remove.
866         (lookup_qualified_name): Remove parameter.
867         (tsubst_copy_and_build): Declare.
868         (finish_qualified_object_call_expr): Remove.
869         (check_accessibility_of_qualified_id): New function.
870         (finish_qualified_id_expr): Likewise.
871         (non_reference): Likewise.
872         (build_expr_from-tree): Remove.
873         * call.c (non_reference): Remove.
874         (build_scoped_method_call): Likewise.
875         (build_method_call): Use error_operand_p.  Assert that we are not
876         processing a template.
877         (standard_conversion): Use non_reference.
878         * class.c (build_vtbl_entry_ref): Likewise.
879         (build_vtbl_ref_1): Likewise.
880         * cvt.c (build_expr_type_conversion): Use non_reference.
881         * decl.c (lookup_qualified_name): Remove flags parameter.
882         (grok_op_properties): Use non_reference.
883         * decl2.c (grok_array_decl): Likewise.
884         (build_expr_from_tree): Remove.
885         (build_offset_ref_call_from_tree): Update comment.
886         * error.c (parm_to_string): Call reinit_global_formatting_buffer.
887         * except.c (prepare_eh_types): Use non_reference.
888         (can_convert_eh): Likewise.
889         * init.c (build_dtor_call): Avoid using build_method_call.
890         * mangle.c (write_template_param): Remove misleading comment.
891         * method.c (locate_copy): Use non_reference.
892         * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
893         (cp_parser_primary_expression): Do not create SCOPE_REFs is
894         non-dependent contexts.
895         (cp_parser_postfix_expression): Use finish_qualified_id_expr.
896         (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
897         build_expr_from_tree.
898         (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
899         Use check_accessibility_of_qualified_id.
900         * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
901         build_expr_from_tree.
902         (tsubst_baselink): New function.
903         (tsubst_qualified_id): Likewise.
904         (tsubst_copy): Use them.  Remove support for METHOD_CALL_EXPR.
905         (tsubst_expr): Adjust call to lookup_qualified_name.
906         (tsubst_copy_and_build): Handle SCOPE_REFs specially.  Adjust
907         handling of CALL_EXPRs.
908         (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
909         * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
910         * search.c (check_final_overrider): Likewise.
911         * semantics.c (check_accessibility_of_qualified_id): New function.
912         (finish_qualified_object_call_expr): Remove.
913         * typeck.c (target_type): Use non_reference.
914         (cxx_sizeof_or_alignof_type): Likewise.
915         (dubious_conversion_warnings): Likewise.
916         (convert_for_initialization): Likewise.
917         (non_reference): New function.
918
919 2003-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
920
921         * decl.c (print_binding_level, print_other_binding_stack,
922         print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
923         stdio calls.
924         * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
925
926 2003-07-07  Andreas Jaeger  <aj@suse.de>
927
928         * friend.c: Convert to ISO C90 prototypes.
929
930         * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
931         language.
932         * cfns.h: Regenerate.
933
934         * typeck.c: Convert remaining prototypes to ISO C90.
935         * search.c: Likewise.
936
937         * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
938         * semantics.c (expand_or_defer_fn): Likewise
939         * mangle.c (discriminator_for_string_literal): Likewise.
940         * g++spec.c (lang_specific_driver): Likewise.
941
942         * search.c (lookup_base_r): Remove unused variable.
943
944 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
945
946         * semantics.c: (genrtl_try_block) Adjust emit_line_note
947         calls.
948
949 2003-07-07  Andreas Jaeger  <aj@suse.de>
950
951         * search.c (lookup_base_r): Remove unused variable.
952
953 2003-07-06  Michael Chastain  <mec@shout.net>
954
955         PR debug/10055
956         * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
957         assigning to input_filename directly.
958
959 2003-07-06  Kazu Hirata  <kazu@cs.umass.edu>
960
961         * call.c: Fix comment formatting.
962         * class.c: Likewise.
963         * cp-tree.h: Likewise.
964         * decl.c: Likewise.
965         * decl2.c: Likewise.
966         * error.c: Likewise.
967         * method.c: Likewise.
968         * name-lookup.c: Likewise.
969         * parser.c: Likewise.
970         * pt.c: Likewise.
971         * rtti.c: Likewise.
972         * search.c: Likewise.
973         * typeck.c: Likewise.
974
975 2003-07-06  Mark Mitchell  <mark@codesourcery.com>
976
977         PR c++/11345
978         * search.c (lookup_base_r): Remove is_non_public and
979         within_current_scope parameters.  Remove other dead code.
980         (lookup_base): Adjust call to lookup_base_r.
981         (adjust_result_of_qualified_name_lookup): Improve comment.
982         * semantics.c (finish_call_expr): Use maybe_dummy_object.
983
984 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
985
986         * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
987         LANG_HOOKS_MISSING_ARGUMENT): Override.
988
989 2003-07-05  Mark Mitchell  <mark@codesourcery.com>
990
991         PR c++/11431
992         * typeck.c (build_static_cast): Check for reference conversions
993         earlier.
994
995 2003-07-04  Mark Mitchell  <mark@codesourcery.com>
996
997         * cp-tree.h (perform_integral_promotions): Declare.
998         * call.c (build_addr_func): Use decay_conversion.
999         (convert_arg_to_ellipsis): Likewise.  Remove misleading comment.
1000         (convert_for_arg_passing): Use perform_integral_promotions.
1001         * cvt.c (build_expr_type_conversion): Use decay_conversion.
1002         (type_promotes_to): Do not return a cv-qualified type.
1003         * decl.c (grok_reference_init): Fix formatting.
1004         (get_atexit_node): Use decay_conversion.
1005         (build_enumerator): Use perform_integral_promotions.
1006         * init.c (build_vec_init): Use decay_conversion.
1007         * semantics.c (finish_expr_stmt): Likewise.
1008         (finish_switch_cond): Use perform_integral_promotions.
1009         * typeck.c (default_conversion): Likewise.
1010         (perform_integral_promotions): New function.
1011         (build_indirect_ref): Use decay_conversion.
1012         (build_array_ref): Use perform_integral_promotions.
1013         (convert_arguments): Use decay_conversion.
1014         (build_unary_op): Use perform_integral_promotions.
1015         (build_c_cast): Use decay_conversion.
1016         (build_modify_expr): Likewise.
1017         (convert_for_initialization): Likewise.
1018         * typeck2.c (build_x_arrow): Likewise.
1019
1020 2003-07-04  Kazu Hirata  <kazu@cs.umass.edu>
1021
1022         * call.c: Fix comment typos.
1023         * class.c: Likewise.
1024         * cp-tree.h: Likewise.
1025         * cvt.c: Likewise.
1026         * decl2.c: Likewise.
1027         * decl.c: Likewise.
1028         * init.c: Likewise.
1029         * mangle.c: Likewise.
1030         * parser.c: Likewise.
1031         * pt.c: Likewise.
1032         * search.c: Likewise.
1033         * semantics.c: Likewise.
1034         * tree.c: Likewise.
1035         * typeck.c: Likewise.
1036
1037 2003-07-04  Zack Weinberg  <zack@codesourcery.com>
1038
1039         * parser.c (cp_lexer_read_token): No need to handle string
1040         constant concatenation.
1041
1042 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1043
1044         * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
1045         (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
1046         ATTRIBUTE_GCC_CXXDIAG.
1047
1048 2003-07-03  Mark Mitchell  <mark@codesourcery.com>
1049
1050         * call.c (build_addr_func): Handle bound pointers-to-members.
1051         (build_method_call): Do not call resolve_offset_ref.
1052         (implicit_conversion): Likewise.
1053         (resolve_scoped_fn_name): Use finish_non_static_data_member, not
1054         resolve_offset_ref.
1055         (resolve_args): Do not call resolve_offset_ref.
1056         (build_conditional_expr): Likewise.
1057         (build_new_method_call): Likewise.
1058         * cp-tree.def (OFFSET_REF): Update documentation.
1059         * cvt.c (cp_convert_to_pointer): Update handling of conversions from
1060         pointers to members to pointers.
1061         (ocp_convert): Do not call resolve_offset_ref.
1062         (convert_to_void): Likewise.
1063         (build_expr_type_conversion): Likewise.
1064         * decl2.c (delete_sanity): Likewise.
1065         * init.c (resolve_offset_ref): Simplify greatly.
1066         (build_vec_delete): Do not call resolve_offset_ref.
1067         * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
1068         if appropriate.
1069         (cp_parser_unary_expression): Use
1070         cp_parser_simple_cast_expression.
1071         (cp_parser_delete_expression): Likewise.
1072         (cp_parser_cast_expression): Likewise.
1073         (cp_parser_pm_expression): Use cp_parser_binary_op.
1074         (cp_parser_simple_cast_expression): New function.
1075         * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
1076         * semantics.c (finish_increment_expr): Likewise.
1077         (finish_typeof): Likewise.
1078         * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
1079         * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
1080         (decay_conversion): Do not call resolve_offset_ref.
1081         (finish_class_member_access_expr): Likewise.
1082         (convert_arguments): Likewise.
1083         (build_x_binary_op): Handle DOTSTAR_EXPR.
1084         (condition_conversion): Do not call resolve_offset_ref.
1085         (unary_complex_lvalue): Likewise.
1086         (build_static_cast): Likewise.
1087         (build_reinterpret_cast): Likewise.
1088         (build_const_cast): Likewise.
1089         (build_c_cast): Likewise.
1090         (build_modify_expr): Likewise.
1091         (convert_for_assignment): Likewise.
1092         (convert_for_initialization): Likewise.
1093         * typeck2.c (build_x_arrow): Likewise.
1094         (build_m_component_ref): Simplify.
1095
1096         * call.c (build_scoped_method_call): Use convert_to_void.
1097         (build_method_call): Likewise.
1098         * class.c (check_field_decls): Remove dead code.
1099         * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
1100         * decl2.c (grok_array_decl): Remove dead code.
1101         (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
1102         as pointer-to-member representation.
1103         * init.c (build_offset_ref): Tidy.
1104         (build_vec_delete_1): Use convert_to_void.
1105         * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
1106         as pointer-to-member representation.
1107
1108 2003-07-03  Nathan Sidwell  <nathan@codesourcery.com>
1109
1110         PR c++/9162
1111         * decl.c (grokdeclarator): Return friend decls, not
1112         void_type_node.
1113         * decl2.c (grokfield): Alter friend decl check.
1114         * parser.c (struct cp_parser): Document default_arg chain on
1115         unparsed_functions_queue.
1116         (cp_parser_save_default_args): New.
1117         (cp_parser_init_declarator, cp_parser_function_definition,
1118         cp_parser_member_declaration): Call it.
1119         (cp_parser_class_specifier): Remove unused variable. Alter
1120         processing of unparsed_functions_queue.
1121
1122 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1123
1124         * class.c (add_method, check_field_decl): Fix format specifier.
1125         * decl.c (duplicate_decls, pushdecl, check_goto,
1126         fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
1127         start_enum): Likewise.
1128         * decl2.c (ambiguous_decl): Likewise.
1129         * pt.c (redeclare_class_template): Likewise.
1130
1131 2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
1132
1133         PR c++/10219
1134         * pt.c (type_unification_real): Don't unify exprs of error type.
1135         * tree.c (error_type): Don't die on error_type.
1136
1137         PR c++/9779
1138         * decl2.c (arg_assoc_class): Don't die on NULL type.
1139         * typeck.c (type_unknown_p): Don't die on untyped expressions.
1140
1141 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
1142
1143         PR c++/6949
1144         * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
1145         classes.
1146
1147 2003-07-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1148
1149         * error.c (locate_error): %P takes an `int', not a `tree'.
1150
1151 Wed Jul  2 00:36:48 CEST 2003  Jan Hubicka  <jh@suse.cz>
1152
1153         * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
1154         (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
1155         clear DECL_DEFER_OUTPUT once function is processed; avoid flags
1156         massaging.
1157
1158         * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
1159         (expand_or_defer_fn): Declare.
1160         (lower_function): Declare.
1161         * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
1162         * decl2.c: Include cgraph.h and varpool.h
1163         (maybe_emit_vtables):  Make explicit instantations as needed.
1164         (mark_member_pointers, lower_function): New functions.
1165         (finish_file): Do unit-at-a-time.
1166         * method.c (synthesize_method): Use expand_or_defer_fn.
1167         * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
1168         * parser.c (cp_parser_function_definition_after_decl): Use
1169         expand_or_defer_fn.
1170         * pt.c (instantiate_decl): Likewise.
1171         * semantics.c: Include cgraph.h
1172         (expand_or_defer_fn): Break out from ...
1173         (expand_body): ... here; deal with unit-at-a-time.
1174         * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
1175         LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
1176
1177 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
1178
1179         * call.c (resolve_scoped_fn_name): Return error_mark_node for
1180         erroneous cases.
1181
1182 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
1183
1184         PR c++/11149
1185         * call.c (resolve_scoped_fn_name): Check that the qualifying scope
1186         is a class type.
1187
1188 2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
1189
1190         PR c++/8046
1191         * error.c (dump_decl): Handle BIT_NOT_EXPR as
1192         pseudo destructor calls.
1193
1194 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
1195
1196         * cp-tree.h (define_label): Replace filename and lineno
1197         arguments with a location_t.
1198         * decl.c (pop_label): Adjust define_label call.
1199         (define_label): Replace filename and lineno arguments with a
1200         location_t.
1201         * semantics.c (finish_label): Adjust define_label call.
1202
1203 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
1204
1205         PR c++/9559
1206         * decl2.c (grokfield): Do not build NOP_EXPRs around the
1207         error_mark_node.
1208
1209 2003-06-30  Neil Booth  <neil@daikokuya.co.uk>
1210
1211         * Make-lang.in: Update.
1212         * cp-lang.c (c_language): Define.
1213         (LANG_HOOKS_INIT_OPTIONS): Use common hook.
1214         * cp-tree.h (cxx_init_options): Remove.
1215         * lex.c: Don't include diagnostic.h.
1216         (cxx_init_options): Remove.
1217
1218 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
1219
1220         PR c++/4933
1221         * error.c (dump_expr): Support correctly the COMPOUND_EXPR
1222         tree generated within a template. Use dump_expr to dump an
1223         expression sizeof.
1224
1225 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
1226
1227         * mangle.c (write_expression): Exit gracefully when trying to
1228         mangle a CALL_EXPR.
1229
1230 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
1231
1232         PR c++/10750
1233         * parser.c (cp_parser_primary_expression): A VAR_DECL with a
1234         (value- or type-) dependent expression as DECL_INITIAL is a
1235         valid constant-expression (at parser time).
1236
1237 2003-06-30  Giovanni Bajo <giovannibajo@libero.it>
1238
1239         PR c++/11106
1240         * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
1241         USING_DECL, instead of print_tree_identifier.
1242
1243 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1244
1245         * cp-tree.h (language_to_string): Adjust declaration.
1246         * dump.c (cp_dump_tree): Adjust usage.
1247         * error.c (dump_char): Use output_formatted_scalar. Tidy.
1248         (parm_to_string): Lose unused parameter.  Tidy.
1249         (expr_to_string): Likewise.
1250         (code_to_string): Likewise.
1251         (language_to_string): Likewise.
1252         (op_to_string): Likewise.
1253         (assop_to_string): Likewise.
1254         (digit_buffer): Remove.
1255         (dump_type): Format builtin vector type as __vector__.
1256
1257 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1258
1259         * error.c (print_integer): Remove.
1260         (dump_type_suffix): Adjust.
1261         (dump_expr): Likewise.
1262
1263 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
1264
1265         * error.c (print_instantiation_partial_context): Take a
1266         location_t.
1267         (print_instantiation_full_context): Adjust.
1268         (print_instantiation_context): Adjust.
1269
1270         * cp-tree.h (cp_line_of, cp_file_of): Remove.
1271         * error.c (cp_line_of, cp_file_of): Merge into ...
1272         (location_of): ... here. Make static, return a location_t.
1273         (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
1274
1275 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
1276
1277         PR c++/10784
1278         * call.c (joust): Move warn_conversion check outwards.
1279
1280 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
1281
1282         * decl.c (build_typename_type)
1283         * mangle.c (write_template_template_arg)
1284         * parser.c (cp_parser_scope_through_which_access_occurs)
1285         * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
1286         * repo.c (get_base_filename)
1287         * semantics.c (maybe_convert_cond):
1288         Mark the definition static, matching the forward declaration.
1289
1290 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
1291
1292         PR c++/10468
1293         * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
1294
1295 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
1296
1297         PR c++/10796
1298         * decl.c (finish_enum): Implement DR377.
1299
1300         * decl.c (cp_finish_decl): Don't make variables with reference
1301         type readonly while they are being initialized.
1302
1303 2003-06-26  Mark Mitchell  <mark@codesourcery.com>
1304
1305         PR c++/11332
1306         * typeck.c (build_static_cast): Avoid returning expressions with
1307         reference type.
1308
1309 2003-06-26  Nathan Sidwell  <nathan@codesourcery.com>
1310
1311         * call.c (build_op_delete_call): Use strip_array_call. Correct
1312         error message to say 'delete' or 'delete[]'.
1313
1314 2003-06-26  Giovanni Bajo  <giovannibajo@libero.it>
1315
1316         PR c++/8266
1317         * pt.c (check_explicit_specialization): When looking up a
1318         template function from an identifier outside class-scope, bind
1319         it to CP_DECL_CONTEXT.
1320
1321 2003-06-25  Mark Mitchell  <mark@codesourcery.com>
1322
1323         PR c++/10990
1324         * search.c (lookup_base_r): Rely on accessible_p, rather than
1325         trying to emulate that logic here.
1326
1327         PR c++/10931
1328         * call.c (convert_like): Pass issue_conversion_warnings.
1329         (convert_like_with_context): Likewise.
1330         (convert_like_real): Add issue_conversion_warnings parameter.
1331         (perform_direct_initialization_if_possible): New function.
1332         * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
1333         * typeck.c (check_for_casting_away_constness): New function.
1334         (build_static_cast): Rewrite.
1335
1336 2003-06-24  Nathan Sidwell  <nathan@codesourcery.com>
1337
1338         * call.c (enforce_access): Assert we get a binfo.
1339         (build_op_delete_call): Pass a binfo to
1340         perform_or_defer_access_check.
1341         * class.c (alter_access): Likewise.
1342         * decl.c (make_typename_type): Likewise.
1343         (make_unbound_class_template): Likewise.
1344         * lex.c (do_identifier): Likewise.
1345         * method.c (hack_identifier): Likewise.
1346         * parser.c (cp_parser_lookup_name): Likewise.
1347         * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
1348         test.
1349         * semantics.c (finish_non_static_data_member): Likewise.
1350         (perform_or_defer_access_check): Expect a binfo.
1351         * typeck.c (comptypes): Expect types.
1352
1353         * mangle.c (find_substitution): Don't pass a non-type to same_type_p
1354         * friend.c (make_friend_class): Likewise.
1355         * pt.c (check_default_tmpl_args): Likewise.
1356         (lookup_template_class): Likewise.
1357
1358 Tue Jun 24 15:30:05 CEST 2003  Jan Hubicka  <jh@suse.cz>
1359
1360         * method.c (thunk_labelno): Move outside ifdef block to make garbage
1361         collector happy.
1362
1363 Tue Jun 24 13:52:34 CEST 2003  Jan Hubicka  <jh@suse.cz>
1364
1365         * class.c (build_vtable): Make vtables.
1366         * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
1367         * decl2.c (output_vtable_inherit): Rename to ...
1368         (prepare_assemble_variable): ... this one; change interface.
1369         (maybe_emit_vtables): Do not call output_vtable_inherit.
1370         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
1371         * cp-tree.h (prepare_assemble_variable): New.
1372
1373 2003-06-23  Andrew Pinski <pinskia@physics.uc.edu>
1374
1375         * method.c: add prototype for make_alias_for_thunk.
1376         (thunk_labelno, make_alias_for_thunk): only define
1377         if ASM_OUTPUT_DEF is defined.
1378
1379 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
1380
1381         * method.c (thunk_labelno): New variable.
1382         (make_alias_for_thunk): New function.
1383         (use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
1384         into the same section as the function it is calling.
1385         Include gt-cp-method.h.
1386         * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
1387         (cp/method.o): Depend on gt-cp-method.h.
1388         * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
1389
1390 Mon Jun 23 19:41:27 CEST 2003  Jan Hubicka  <jh@suse.cz>
1391
1392         * decl.c (register_dtor_fn): Mark cleanup as used.
1393         * decl2.c (mark_vtable_entries): Skip nops.
1394         * rtti.c (get_tinfo_ptr): Mark tinfo as used.
1395         (build_dynamic_cast_1): Likewise.
1396         (tinfo_base_init): Likewise.
1397         (emit_tinfo_decl): Likewise.
1398
1399 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
1400
1401         * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
1402         to it.
1403
1404 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
1405
1406         PR c++/10784
1407         * call.c (joust): Warn about choosing conversion sequence only if
1408         -Wconversion.
1409
1410 2003-06-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1411
1412         PR c++/10864
1413         * call.c (op_error): Tidy.
1414         * error.c (dump_expr): Properly format 'T()' when T is an
1415         aggregate type.
1416
1417 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
1418
1419         PR c++/10915
1420         * decl.c (grok_op_properties): Warn possible confusing conversion
1421         only if -Wconversion.
1422
1423 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
1424
1425         PR c++/10749
1426         * parser.c (cp_parser_class_head): See through dependent names
1427         when parsing a class-head.
1428
1429         PR c++/10845
1430         * pt.c (try_class_unification): Correct handling of member class
1431         templates.
1432
1433 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
1434
1435         * semantics.c (genrtl_finish_function): Adjust
1436         expand_function_end call.
1437
1438 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
1439
1440         PR c++/10939
1441         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
1442         functions.
1443         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
1444
1445         PR c++/9649
1446         * cp-tree.h (pushdecl_class_level): Change prototype.
1447         (push_class_level_binding): Likewise.
1448         * decl.c (add_binding): Reject duplicate static data members.
1449         (pushdecl_class_level): Return a value indicating whether or not
1450         the binding was valid.
1451         (push_class_level_binding): Likewise.
1452         * semantics.c (finish_member_declaration): Don't keep invalid
1453         declarations.
1454
1455         PR c++/11041
1456         * call.c (initialize_reference): Do not use cp_finish_decl to emit
1457         temporary variables.
1458         * cp-tree.h (static_aggregates): Declare.
1459         (pushdecl_top_level_and_finish): Likewise.
1460         * decl.c (pushdecl_top_level_1): New function.
1461         (pushdecl_top_level): Use it.
1462         (pushdecl_top_level_and_finish): New function.
1463         (initialize_local_var): Remove redundant code.
1464         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
1465         building_stmt_tree.
1466         * decl.h (static_aggregates): Remove.
1467         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
1468         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
1469         (tinfo_base_init): Likewise.
1470
1471 2003-06-19  Matt Austern  <austern@apple.com>
1472
1473         PR c++/11228
1474         * init.c (build_zero_init): Assert that number of array elements
1475         is an integer constant.
1476         (build_default_init) Don't use build_zero_init for arrays with
1477         variable number of elements.
1478
1479 2003-06-19  Andreas Jaeger  <aj@suse.de>
1480
1481         * cp-tree.h: Remove duplicated declarations.
1482
1483 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
1484
1485         * pt.c: Convert to ISO C.
1486         * semantics.c: Convert to ISO C.
1487
1488 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
1489
1490         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
1491         at_least_as_qualified_p, more_qualified_p): Return bool.
1492         * typeck.c: ANSIFY function definitions.
1493         (comp_array_types): Take redeclaration bool parameter.
1494         (comptypes): Rearrange STRICT handling.
1495         (at_least_as_qualified_p, more_qualified_p,
1496         comp_cv_qualification): Cache cv quals.
1497         (compparms): Rearrange loop.
1498
1499 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
1500
1501         * cp-tree.h (COMPARE_RELAXED): Rename to ...
1502         (COMPARE_DERIVED): ... here. Adjust comment.
1503         (resolve_typename_type_in_current_instantiation): Remove.
1504         (cp_tree_equal, comptypes): Return a bool.
1505         * cvt.c (convert_to_reference): Adjust comptypes call.
1506         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
1507         (resolve_typename_type_in_current_instantiation): Remove.
1508         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
1509         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
1510         calls. Refactor code.
1511         * typeck.c (comp_array_types): Return bool. Lose callback.
1512         parameter. Adjust cp_tree_equal calls.
1513         (comptypes): Return bool. Adjust strict handling. Remove relaxed
1514         enumeration and java type handling. Deal with typename types here.
1515         Adjust recursive and cp_tree_equals calls. Adjust base and derived
1516         checking.
1517         (comp_target_types): Remove unreachable code. Adjust
1518         same_or_base_type_p calls.
1519         (ptr_reasonably_similar): Adjust base and derived check.
1520
1521         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
1522         unused calculation.
1523         (check_return_expr): Adjust error messages.
1524         * cp-tree.def (SCOPE_REF): Correct comment.
1525
1526 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
1527
1528         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
1529         string again.
1530
1531 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
1532
1533         * optimize.c (dump_function): Form complete flag name by
1534         prefixing 'fdump-' to string returned by dump_flag_name().
1535
1536 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
1537
1538         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
1539         string.
1540
1541 2003-06-17  Jason Merrill  <jason@redhat.com>
1542
1543         PR c++/10929
1544         * decl.c (grokfndecl): Don't mark a function inline for
1545         -finline-functions if it isn't defined.
1546
1547 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
1548
1549         PR c++/10712
1550         * class.c (handle_using_decl): Robustify.
1551
1552         PR c++/11105
1553         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
1554         * mangle.c (struct globals): Remove internal_mangling_p.
1555         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
1556         (write_template_parm): Don't write out the level number.
1557         (conv_type_names): New variable.
1558         (hash_type): New function.
1559         (compare_type): Likewise.
1560         (mangle_conv_op_name_for_type): Don't try to mangle conversion
1561         operator names.
1562         * search.c (lookup_conversion_operator): New function.
1563         (lookup_fnfields_1): Use it.
1564
1565 2003-06-17  Andreas Jaeger  <aj@suse.de>
1566
1567         * except.c: Remove duplicate declaration of push_eh_cleanup.
1568
1569         * call.c: Remove extra declaration of inhibit_warnings.
1570
1571 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
1572
1573         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
1574         * mangle.c: Convert to ISO C.
1575
1576 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1577
1578         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
1579         macro.
1580
1581 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
1582
1583         * tree.c: Convert to ISO C.
1584
1585 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
1586
1587         * cp-tree.h: Follow spelling conventions.
1588         * mangle.c: Likewise.
1589         * method.c: Likewise.
1590         * parser.c: Likewise.
1591
1592 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
1593
1594         * decl.c (start_function): Adjust init_function_start call.
1595         * method.c (use_thunk): Likewise.
1596         * semantics.c (genrtl_start_function): Likewise.
1597
1598 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
1599
1600         * Make-lang.in: Remove c-options.o.
1601
1602 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
1603
1604         * lex.c: Convert to ISO C.
1605
1606         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
1607         * init.c: removes use of PARAMS macro.  Use ISO style function
1608         declarations.  (Not copyright-significant change.)
1609
1610         * rtti.c: Remove PARAMS.
1611
1612         * typeck2.c: Convert to ISO C.
1613
1614 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
1615
1616         PR c++/10635
1617         * typeck.c (build_c_cast): Check that the destination type is
1618         complete.
1619
1620 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
1621
1622         PR c++/10432
1623         * cp-tree.h (finish_declarator): Remove.
1624         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
1625         erroneous declarations.
1626         * semantics.c (finish_declarator): Remove.
1627
1628 2003-06-11  Roger Sayle  <roger@eyesopen.com>
1629
1630         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
1631         global static constructor/destructor if it will be empty, i.e.
1632         either doesn't call any ctors/dtors or only calls pure or const
1633         ctors/dtors.
1634
1635 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
1636
1637         * mangle.c (tm_p.h): Include it.
1638         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
1639
1640         PR c++/11131
1641         * tree.c (cp_cannot_inline_fn): Check for "inline" before
1642         instantiation.
1643
1644 2003-06-10  Jason Merrill  <jason@redhat.com>
1645
1646         PR c++/10968
1647         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
1648
1649 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
1650
1651         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
1652         (start_cleanup_cnt): New.
1653
1654 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
1655
1656         PR c++/11131
1657         * cp-tree.h (template_for_substitution): Declare.
1658         * decl2.c (mark_used): Use it when figuring out whether or not a
1659         function is inline.
1660         * pt.c (template_for_substitution): Give it external linkage.
1661         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
1662         possible.
1663
1664 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
1665
1666         PR 8861
1667         * mangle.c (write_real_cst): New function.  Implement
1668         ABI-compliant mangling of floating-point literals when
1669         -fabi-version>=2; provide backward compatibility with 3.3 when
1670         -fabi-version=1 (with warning).  Clarify commentary.
1671         (write_template_arg_literal): Use write_real_cst.
1672
1673 2003-06-07  Andreas Jaeger  <aj@suse.de>
1674
1675         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
1676
1677 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
1678
1679         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
1680         (LANG_HOOKS_HANDLE_OPTION): Override.
1681         * cp-tree.h (cxx_init_options): Update.
1682         * lex.c (cxx_init_options): Update.
1683
1684 Thu Jun  5 18:33:40 CEST 2003  Jan Hubicka  <jh@suse.cz>
1685
1686         * Make-lang.in:  Add support for stageprofile and stagefeedback
1687
1688 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
1689
1690         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
1691
1692 2003-06-04  Andreas Jaeger  <aj@suse.de>
1693
1694         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
1695
1696 2003-06-03  Jason Merrill  <jason@redhat.com>
1697
1698         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
1699
1700         * cp/decl.c (reshape_init): Handle vectors.
1701
1702         * testsuite/g++.dg/init/array10.C: New.
1703
1704 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1705
1706         PR c++/10940
1707         * pt.c (check_explicit_specialization): Check for 'static'
1708         earlier.
1709
1710 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
1711
1712         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
1713         the operand of a CONSTRUCTOR node.
1714
1715 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
1716
1717         * decl.c (cp_binding_level::this_entity): Rename from this_class.
1718         (cxx_scope_descriptor): New function.
1719         (cxx_scope_debug): Likewise.
1720         (push_binding_level): Use it.
1721         (pop_binding_level): Likewise.
1722         (suspend_binding_level): Likewise.
1723         (resume_binding_level): Likewise.
1724         (pushlevel_class): Adjust use of this_class.
1725         (pushtag): Likewise.
1726         (lookup_name_real): Likewise.
1727         (global_scope_name): New variable.
1728         (initialize_predefined_identifiers): Initialize it.
1729         (push_namespace): Use it.
1730         (make_cxx_scope): New function.
1731         (pushlevel): Use it.
1732         (pushlevel_class): Likewise.
1733         (push_binding_level): Simplify.  Loose the last two arguments.
1734         (make_binding_level): Remove.
1735         (initial_push__namespace_scope): New function.
1736         (push_namespace): Use it.  Simplify.
1737         (cxx_init_decl_processing): Likewise.
1738         (declare_namespace_level): Remove.
1739
1740 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1741
1742         PR c++/10956
1743         * pt.c (instantiate_decl): Don't use full template arguments if
1744         we are dealing with specializations.
1745
1746 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1747
1748         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
1749         (binding_depth): Unconditionally define.
1750         (is_class_level): Likewise.
1751         (indent): Likewise.  Take an indenting parameter.
1752         (push_binding_level): Remove conditional definittion.
1753         (pop_binding_level): Likewise.
1754         (suspend_binding_level): Likewise.
1755         (resume_binding_level): Likewise.
1756         (pushlevel): Likewise.
1757         (pushlevel_class): Likewise.
1758         (poplevel_class): Likewise.
1759         (pop_everything): Likewise.
1760
1761 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
1762
1763         * name-lookup.h (global_scope_p): New macro.
1764         * decl.c (pop_binding_level): Use it.  Don't refer directly to
1765         global_binding_level.
1766         (suspend_binding_level): Likewise.
1767         (global_bindings_p): Likewise.
1768         (print_other_binding_stack): Likewise.
1769         (print_binding_stack): Likewise.
1770         (maybe_push_to_top_level): Likewise.
1771         (pushdecl_namespace_level): Likewise.
1772         (cxx_init_decl_processing): Likewise.
1773         (start_decl): Likewise.
1774         (cp_finish_decl): Likewise.
1775         (start_function): Likewise.
1776         (global_binding_level): Remove.
1777
1778 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1779
1780         * parser.c (cp_parser_explicit_instantiation): Restore old
1781         access before template instantiation.
1782
1783 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
1784
1785         * lang-specs.h: Use -o to specify preprocessor's output file.
1786         Make -no-integrated-cpp work when building PCH files.
1787
1788 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1789
1790         PR c++/10682
1791         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
1792         check for implicitly created typedef to an enum.
1793
1794 2003-05-21  Jason Merrill  <jason@redhat.com>
1795
1796         * init.c (build_vec_delete): Copy the address into a temporary
1797         variable before calling build_vec_delete_1.
1798         * decl2.c (delete_sanity): Don't call stabilize_reference.
1799
1800 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
1801
1802         * pt.c (register_specialization): Update the decl's location,
1803         if necessary.
1804         (check_explicit_specialization): Likewise.
1805
1806 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1807
1808         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
1809
1810 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
1811
1812         PR c++/9738
1813         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
1814         if the old decl had instantiated DECL_RTL.
1815         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
1816
1817 2003-05-19  Matt Austern  <austern@apple.com>
1818
1819         * lang-options.h: Document -Wno-invalid-offsetof
1820         * typeck.c (build_class_member_access_expr): Don't complain about
1821         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
1822
1823 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
1824
1825         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
1826         (binding_entry_make): Make entry->chain NULL after getting an entry.
1827         fix the spelling of chain in a comment.
1828         (binding_table_free): speed up by having temporary variable.
1829         (binding_table_new): set table->chain to be NULL after allocating
1830         a table.
1831         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
1832         binding->previous to NULL after getting an binding for speed.
1833
1834 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1835
1836         * cp-tree.h (struct lang_type_class): Replace data member tags
1837         with hash-table nested_udts.
1838         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
1839         * class.c (unreverse_member_declarations): Don't touch
1840         CLASSTYPE_TAGS.
1841         (pushclass): Use cxx_remember_type_decls.
1842         * decl.c (struct cp_binding_level): Replace data member tags with
1843         hash-table type_decls.
1844         (pop_binding_level): Handle level->type_decls.
1845         (kept_level_p): Adjust.
1846         (poplevel): Remove unused local variable.
1847         (bt_print_entry): New function.
1848         (print_binding_level): Use it.
1849         (push_namespace): Build current_binding_level->type_decls.
1850         (maybe_process_template_type_declaration): Adjust.
1851         (pushtag): Likewise.
1852         (clear_anon_tags): Use binding_table_remove_anonymous_types.
1853         (gettags): Remove.
1854         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
1855         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
1856         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
1857         (cxx_init_decl_processing): Build global_binding_level->type_decls.
1858         (store_parm_decls): Remove pointless code.
1859         * name-lookup.c (free_binding_entry): New variable.
1860         (ENTRY_INDEX): New macro.
1861         (struct binding_table_s): New datatype.
1862         (binding_entry_make): New function.
1863         (binding_entry_free): Likewise.
1864         (binding_table_construct): Likewise.
1865         (binding_table_free): Likewise.
1866         (binding_table_new): Likewise.
1867         (binding_table_expand): Likewise.
1868         (binding_table_insert): Likewise.
1869         (binding_table_find): Likewise.
1870         (binding_table_find_anon_type): Likewise.
1871         (binding_table_reverse_maybe_remap): Likewise.
1872         (binding_table_remove_anonymous_types): Likewise.
1873         (binding_table_foreach): Likewise.
1874         * name-lookup.h (binding_table): New type.
1875         (binding_entry): Likewise.
1876         (bt_foreach_proc): Likewise.
1877         (struct binding_entry_s): New datatype.
1878         (SCOPE_DEFAULT_HT_SIZE): New macro.
1879         (CLASS_SCOPE_HT_SIZE): Likewise.
1880         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
1881         (NAMESPACE_STD_HT_SIZE): Likewise.
1882         (GLOBAL_SCOPE_HT_SIZE): Likewise.
1883         (binding_table_new): Declare.
1884         (binding_table_free): Likewise.
1885         (binding_table_insert): Likewise.
1886         (binding_table_find_anon_type): Likewise.
1887         (binding_table_reverse_maybe_remap): Likewise.
1888         (binding_table_remove_anonymous_types): Likewise.
1889         (binding_table_foreach): Likewise.
1890         (binding_table_find): Likewise.
1891         (cxx_remember_type_decls): Likewise.
1892         * pt.c (bt_instantiate_type_proc): New function.
1893         (do_type_instantiation): Use it.
1894         * search.c (lookup_field_r): Use binding_table_find.
1895
1896 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1897
1898         * semantics.c (perform_deferred_access_checks): Don't discard
1899         checked access.
1900
1901 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1902
1903         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
1904         libiberty VA_ macros, always use stdarg.
1905         * rtti.c (create_pseudo_type_info): Likewise.
1906         * tree.c (build_min_nt, build_min): Likewise.
1907
1908 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1909
1910         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
1911         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
1912         collapse multiple function calls into one.
1913         * tree.c (debug_binfo): Likewise.
1914
1915 2003-05-15  Jason Merrill  <jason@redhat.com>
1916
1917         PR c++/5388
1918         * call.c (conditional_conversion): Don't consider implicit
1919         conversions if T2 is a base of T1.
1920         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
1921         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
1922
1923         * parser.c (cp_parser_primary_expression): Convert a static data
1924         member from reference.
1925
1926 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
1927
1928         * call.c (build_op_delete_call): Avoid creating unnecessary types.
1929         * class.c (instantiate_type): Remove tests for tf_no_attributes.
1930         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
1931         (COMPARE_NO_ATTRIBUTES): Remove.
1932         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
1933
1934         PR c++/8385
1935         * semantics.c (finish_typeof): Refine type-dependency check.
1936
1937 2003-05-13  Jason Merrill  <jason@redhat.com>
1938
1939         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
1940         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
1941
1942 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1943
1944         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
1945
1946 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1947
1948         PR c++/10230, c++/10481
1949         * semantics.c (finish_non_static_data_member): Handle when the
1950         non-static member is not from a base of the current class type.
1951
1952 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1953
1954         PR c++/10552
1955         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
1956         template and has dependent context.
1957
1958 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1959
1960         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
1961
1962 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1963
1964         PR c++/9252
1965         * cp-tree.h (saved_scope): Remove check_access field.
1966         (tsubst_flags_t): Remove tf_parsing.
1967         * decl.c (maybe_push_to_top_level): Don't initialize
1968         scope_chain->check_access.
1969         (make_typename_type, make_unbound_class_template): Don't use
1970         tf_parsing.
1971         (register_dtor_fn): Use push/pop_deferring_access_checks
1972         instead of scope_chain->check_access.
1973         * method.c (use_thunk): Likewise.
1974         * parser.c (cp_parser_explicit_instantiation
1975         (cp_parser_constructor_declarator_p): Don't call
1976         push/pop_deferring_access_checks here.
1977         (cp_parser_template_argument, cp_parser_class_name): Don't use
1978         tf_parsing.
1979         (yyparse): Check flag_access_control.
1980         * pt.c (instantiate_class_template): Call
1981         push/pop_deferring_access_checks.
1982         * semantics.c (push_deferring_access_checks): Propagate
1983         dk_no_check.
1984         (perform_or_defer_access_check): Make sure basetype_path is
1985         a type before comparison.
1986         * call.c (build_op_delete_call, build_over_call): Use
1987         perform_or_defer_access_check.
1988         * class.c (alter_access): Likewise.
1989         * init.c (build_offset_ref): Likewise.
1990         * lex.c (do_identifier): Likewise.
1991         * method.c (hack_identifier): Likewise.
1992         * search.c (lookup_member): Likewise.
1993         * semantics.c (finish_non_static_data_member): Likewise.
1994         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
1995         instead of flag_access_control.
1996
1997 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1998
1999         PR c++/9554
2000         * parser.c (cp_parser_class_name): Remove check_access parameter.
2001         All caller adjusted.  Update declaration.
2002         (cp_parser_lookup_name): Likewise.
2003         * semantics.c (push_deferring_access_checks): Change parameter type
2004         to enum deferring_kind.  All caller adjusted.
2005         (resume_deferring_access_checks): Adjust to use new enum.
2006         (stop_deferring_access_checks): Likewise.
2007         (perform_or_defer_access_check): Likewise.
2008         * cp-tree.h (deferring_kind): New enum.
2009         (deferred_access): Adjust field type.
2010         (push_deferring_access_checks): Update declaration.
2011
2012 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2013
2014         PR c++/10555, c++/10576
2015         * pt.c (lookup_template_class): Handle class template with
2016         multiple levels of parameters when one of the levels contain
2017         errors.
2018
2019 2003-05-08  Jason Merrill  <jason@redhat.com>
2020
2021         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
2022         expression.  Undo some of the recent reorg.
2023
2024 2003-05-07  Richard Henderson  <rth@redhat.com>
2025
2026         PR c++/10570
2027         * cfns.gperf: Comment out POSIX thread cancellation points,
2028         plus abort and raise.
2029         * cfns.h: Regenerate.
2030
2031 2003-05-07  Jason Merrill  <jason@redhat.com>
2032
2033         * call.c (build_conditional_expr): Don't assume that the folded
2034         expression has result_type.
2035
2036 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2037
2038         * typeck.c (build_unary_op): Deal with const qualifier in
2039         invalid pointer-to-member earlier.
2040
2041 2003-05-05  Jason Merrill  <jason@redhat.com>
2042
2043         PR c++/9537
2044         * call.c (conditional_conversion): Build an RVALUE_CONV if
2045         we're just changing the cv-quals.
2046         (build_conditional_expr): Don't call convert to change
2047         cv-quals.
2048
2049 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2050
2051         PR c++/10496
2052         * typeck.c (build_unary_op): Don't output const qualifier when
2053         output invalid pointer-to-member diagnostics.
2054
2055 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2056
2057         * decl.c: Fix typos.
2058
2059 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2060
2061         PR c++/4494
2062         * decl.c (start_function): Use same_type_p to check return type
2063         of main.
2064
2065 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
2066
2067         PR c/10604
2068         * cp/typeck.c (build_x_compound_expr): No need to check
2069         extra_warnings as well as warn_unused_value.
2070
2071 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2072
2073         PR c++/9364, c++/10553, c++/10586
2074         * decl.c (make_typename_type): Don't crash on illegal code.
2075
2076 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
2077
2078         * class.c (finish_struct): Use location_t and input_location
2079         directly.
2080         * decl.c (make_label_decl): Likewise.
2081         (use_label): Likewise.
2082         * decl2.c (warn_if_unknown_interface): Likewise.
2083         (start_static_initialization_or_destruction): Likewise.
2084         (generate_ctor_or_dtor_function): Likewise.
2085         (finish_file): Likewise.
2086         * error.c (print_instantiation_full_context): Likewise.
2087         * init.c (create_temporary_var): Likewise.
2088         * method.c (synthesize_method): Likewise.
2089         * parser.c (cp_token): Likewise.
2090         (cp_lexer_set_source_position_from_token): Likewise.
2091         (cp_lexer_get_preprocessor_token): Likewise.
2092         (cp_parser_statement): Likewise.
2093         * pt.c (tsubst_friend_function): Likewise.
2094         (instantiate_class_template): Likewise.
2095         (tsubst_decl): Likewise.
2096         (tsubst): Likewise.
2097         (instantiate_decl): Likewise.
2098         * semantics.c (begin_class_definition): Likewise.
2099         (expand_body): Likewise.
2100
2101 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
2102
2103         * class.c (finish_struct): Rename lineno to input_line.
2104         * decl.c (push_binding_level, pop_binding_level,
2105         suspend_binding_level, resume_binding_level, make_label_decl,
2106         use_label, start_function): Likewise.
2107         * decl2.c (warn_if_unknown_interface,
2108         start_static_initialization_or_destruction,
2109         generate_ctor_or_dtor_function, finish_file): Likewise.
2110         * error.c (cp_line_of, print_instantiation_full_context,
2111         print_instantiation_context): Likewise.
2112         * except.c (check_handlers_1, check_handlers): Likewise.
2113         * init.c (create_temporary_var): Likewise.
2114         * method.c (use_thunk, synthesize_method): Likewise.
2115         * parser.c (cp_lexer_set_source_position_from_token,
2116         cp_lexer_get_preprocessor_token): Likewise.
2117         * pt.c (push_tinst_level, pop_tinst_level,
2118         tsubst_friend_function, instantiate_class_template, tsubst_decl,
2119         tsubst, tsubst_expr, instantiate_decl): Likewise.
2120         * semantics.c (genrtl_try_block, finish_label_stmt,
2121         begin_class_definition, expand_body,
2122         genrtl_finish_function): Likewise.
2123         * tree.c (build_min_nt, build_min): Likewise.
2124
2125 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
2126
2127         * decl2.c (comdat_linkage): Don't externalize explicit
2128         instantiations.
2129
2130 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2131
2132         PR c++/10554
2133         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
2134         is not NULL.
2135
2136 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
2137
2138         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
2139         (struct lang_identifier): ... to here.
2140         (LANG_ID_FIELD): Remove.
2141         (SET_LANG_ID): Remove.
2142         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
2143         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
2144         (IDENTIFIER_IMPLICIT_DECL): Likewise.
2145         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
2146         (IDENTIFIER_ERROR_LOCUS): Likewise.
2147         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2148
2149 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2150
2151         PR c++/8772
2152         * pt.c (convert_template_argument): Correct diagnostic.
2153
2154 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2155
2156         PR c++/9432, c++/9528
2157         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
2158
2159 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
2160
2161         * decl.c (check_previous_goto_1): Adjust prototype.
2162         (check_previous_goto): Adjust use.
2163         (check_switch_goto): Likewise.
2164         (use_label): Adjust.
2165         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
2166         (struct named_label_use_list): Use location_t datatype.
2167
2168 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
2169
2170         PR c++/10551
2171         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
2172         that have not yet been written out.
2173
2174 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
2175
2176         PR c++/10549
2177         * class.c (layout_class_type): Mark overlong bitfields as having
2178         the maximum size permitted by their type, after layout.
2179
2180         PR c++/10527
2181         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
2182
2183 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2184
2185         * call.c (build_operator_new_call): Fix typo.
2186         * lang-options.h: Likewise.
2187
2188 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
2189
2190         PR c++/10515
2191         * cp-tree.h (lookup_field_1): Declare it.
2192         * search.c (lookup_field_1): Make it public.
2193         * decl.c (reshape_init): Handle designated initializers.
2194
2195         * decl.c (maybe_commonize_var): Further tweak support for systems
2196         without weak symbols.
2197
2198 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
2199
2200         * decl.c (maybe_commonize_var): Fix thinko in last patch.
2201
2202 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
2203
2204         PR c++/10506
2205         * method.c (use_thunk): Decrement immediate_size_expand.
2206
2207         PR c++/10503
2208         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
2209         (DECL_MAYBE_TEMPLATE): Remove.
2210         * class.c (fixed_type_or_null): Avoid infinite recursion.
2211
2212         * decl.c (maybe_commonize_var): Make the code match the comments.
2213         * pt.c (instantiate_decl): Move call to import_export_decl.
2214
2215 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
2216
2217         * decl2.c (finish_file): Fix merge botch.
2218
2219 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
2220
2221         * decl2.c (finish_file): Don't call import_export_decl for
2222         functions that are not defined.
2223         (handle_class_head): Robustify.
2224         * pt.c (instantiate_decl): Do not call cp_finish_decl for
2225         variables that are not defined.
2226
2227 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
2228
2229         * call.c (print_z_candidates): Fix off by one error.
2230
2231 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
2232
2233         PR c++/10337
2234         * call.c (joust): Don't warn about conversion ops that are exact
2235         or cv-conversions. Rearrange to avoid multiple type comparisons.
2236
2237 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
2238
2239         PR c++/10471
2240         * call.c (build_cxx_call): Robustify.
2241
2242 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
2243
2244         * Make-lang.in (lex.o): Remove mbchar.h.
2245         * lex.c (MULTIBYTE_CHARS): Lose.
2246         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
2247         in c-lex.c.
2248
2249 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
2250
2251         PR c++/9847
2252         * cp-tree.h (duplicate_tag_error): Remove.
2253         * class.c (duplicate_tag_error): Remove.
2254         * semantics.c (begin_class_definition): Return immediately for a
2255         duplicate class definition.
2256
2257         PR c++/10451
2258         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
2259
2260 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
2261
2262         PR c++/10446
2263         * search.c (lookup_fnfields_1): Handle empty slots in the method
2264         vector.
2265
2266         PR c++/10428
2267         * decl.c (check_elaborated_type_specifier): New function, split
2268         out from ...
2269         (xref_tag): ... here.  Use the new function in more places.
2270
2271         * rtti.c (throw_bad_typeid): Use build_cxx_call.
2272
2273 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
2274
2275         * call.c (build_over_call): Use build_cxx_call.
2276         (build_cxx_call): New method, split out of build_over_call.
2277         * cp-tree.h (language_function): Add can_throw.
2278         (build_cxx_call): Declare it.
2279         * decl.c (finish_function): If a function does not contain any
2280         calls to functions that can throw an exception, indicate that
2281         fact.
2282         * decl2.c (mark_used): Do not defer the instantiation of
2283         functions, if the current function does not throw.
2284         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
2285         * pt.c (instantiate_decl): Make sure import_export_decl is called
2286         before emitting things.
2287         * rtti.c (throw_bad_cast): Use build_cxx_call.
2288         (build_dynamic_cast_1): Likewise.
2289         * typeck.c (build_function_call): Likewise.
2290
2291 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
2292
2293         PR c++/9881
2294         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
2295         expressions. Reverts my 2002-08-08 patch.
2296
2297         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
2298         cheaper early exit.
2299
2300 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
2301
2302         * cp/decl2.c (start_static_storage_duration_function): Take count
2303         arg, don't check if it wraps round.
2304         (generate_ctor_or_dtor_function): Add locus arg, use it.
2305         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
2306         locus.
2307         (finish_file): Set line numbers to past EOF for synthesized
2308         functions.
2309
2310 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
2311
2312         PR c++/10405
2313         * search.c (lookup_field_1): Final scan goes backwards for
2314         types, forwards for non-types.
2315
2316 2003-04-17  Roger Sayle  <roger@eyesopen.com>
2317
2318         PR c/10375
2319         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
2320         "nothrow" function attributes.
2321
2322 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2323
2324         PR c++/10347
2325         * pt.c (type_dependent_expression_p): Handle array new.
2326
2327 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
2328
2329         PR c++/10381
2330         * parser.c (cp_parser_primary_expression): Reorganize logic for
2331         dealing with name lookup failures.
2332
2333 2003-04-15  Jason Merrill  <jason@redhat.com>
2334
2335         * decl2.c (mark_used): Don't instantiate anything if
2336         skip_evaluation.
2337
2338 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
2339
2340         * tree.c (build_cplus_array_type_1): Do not call
2341         uses_template_parms() on a NULL index_type.
2342
2343 2003-04-13  Roger Sayle  <roger@eyesopen.com>
2344
2345         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
2346
2347 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
2348
2349         PR c++/10300
2350         * init.c (build_new_1): Reorganize.
2351
2352 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
2353
2354         * class.c (initialize_array)
2355         * decl.c (reshape_init)
2356         * decl2.c (build_expr_from_tree)
2357         * init.c (build_zero_init)
2358         * pt.c (tsubst_copy, tsubst_copy_and_build)
2359         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
2360         (ptm_initializer, class_initializer, get_pseudo_ti_init)
2361         * semantics.c (finish_compound_literal)
2362         * typeck.c (build_ptrmemfunc1)
2363         * typeck2.c (store_init_value, process_init_constructor)
2364         (build_functional_cast): Use build_constructor.
2365
2366 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
2367
2368         * call.c (print_z_candidates): Use gcc_gettext_width, not
2369         strlen, to determine how much padding to use.
2370
2371 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
2372
2373         * decl.c: Update all calls to shadow_warning.
2374
2375 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
2376
2377         * class.c (layout_class_type): Correct handling for overlong
2378         bit-fields whose width is the same as an integer type.
2379
2380 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
2381
2382         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
2383         * cp-lang.c (cp_tree_size): New function.
2384         (LANG_HOOKS_TREE_SIZE): Override.
2385
2386         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
2387         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
2388         (union lang_tree_node): Remove common and srcloc members.
2389         (build_srcloc_here): Don't prototype.
2390         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
2391         * pt.c (pending_templates): Correct comment.
2392         * tree.c (build_srcloc, build_srcloc_here): Kill.
2393
2394 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
2395
2396         * call.c: Include intl.h.
2397         (print_z_candidate): Always use inform; get rid of errfn
2398         argument. Reorganize so that all the strings get picked up
2399         by xgettext.  Note obligation of caller to pass first argument
2400         through gettext.
2401         (print_z_candidates): Update to match.  Indent second and
2402         successive candidates by strlen() of translated message.
2403         (joust): Restructure ambiguous-conversion pedwarn so that
2404         translators see a complete sentence.  Update calls to
2405         print_z_candidate.
2406
2407         * Make-lang.in (cp/call.o): Update dependencies.
2408
2409 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2410
2411         * decl.c (set_current_binding_level): Delete, revert last change.
2412         (current_binding_level): Modify to allow it as as lvalue.
2413
2414 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2415
2416         * name-lookup.c (find_binding): Pass appropriate pointer type to
2417         POP_TIMEVAR_AND_RETURN.
2418
2419 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2420
2421         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
2422         * cp-tree.h: Don't insist on having GNUC.
2423
2424 2003-04-03  Jason Merrill  <jason@redhat.com>
2425
2426         * cvt.c (ocp_convert): Only abort if we try to convert an object
2427         of TREE_ADDRESSABLE type.
2428
2429         * class.c (build_vtable): Set DECL_ALIGN here.
2430         (get_vtable_decl): Not here.
2431         (layout_vtable_decl): Or here.
2432         (create_vtable_ptr): Or here.
2433         (layout_class_type): Or here.
2434         (check_bitfield_decl): Don't mess with field alignment.
2435
2436 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2437
2438         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
2439         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
2440         * rtti.c (dfs_class_hint_mark): Likewise.
2441
2442         * decl.c (push_local_name, push_class_level_binding,
2443         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
2444         functions returning void.
2445         * decl2.c (add_using_namespace): Likewise.
2446
2447         * decl.c (print_binding_level, print_other_binding_stack,
2448         print_binding_stack): Cast argument of %p specifier to void*.
2449         * ptree.c (cxx_print_decl): Likewise.
2450
2451         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
2452         VAR_FUNCTION_OR_PARM_DECL_CHECK,
2453         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
2454         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
2455         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
2456
2457         * decl.c (set_current_binding_level): New macro.  Use throughout
2458         when setting the current binding level.
2459
2460         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
2461         in enum.
2462         * method.c (mangling_flags): Likewise.
2463
2464         * cp-tree.h (lang_type_header): Add __extension__ and use
2465         CHAR_BITFIELD for members.
2466
2467 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
2468
2469         PR other/9274
2470         * mangle.c: Include gt-cp-mangle.h.
2471         (subst_identifiers): Mark with GTY.
2472         * config-lang.in (gtfiles): Add cp/mangle.c.
2473         * Make-lang.in: (gt-cp-mangle.h): New rule.
2474         (cp/mangle.o): Depends on gt-cp-mangle.h.
2475
2476 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
2477
2478         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
2479         after \$(srcdir)/cp/name-lookup.h.
2480         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
2481         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
2482         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
2483         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
2484
2485 2003-03-31  Jason Merrill  <jason@redhat.com>
2486
2487         PR java/10145
2488         * class.c (check_field_decl): Don't set DECL_ALIGN.
2489
2490 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
2491
2492         PR c++/7647
2493         * decl.c (grokdeclarator): Tidy, slightly.
2494         * search.c (lookup_field_1): Add want_type parameter.
2495         (lookup_field_r): Adjust call to lookup_field_1.
2496
2497 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2498
2499         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
2500
2501 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
2502
2503         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
2504         prototype.
2505         (cxx_scope_find_binding_for_name): Likewise.
2506         * decl.c (find_binding: Move to name-lookup.c.
2507         (binding_for_name): Likewise.
2508         (cxx_scope_find_binding_for_name): Likewise.
2509         (BINDING_LEVEL):  Remove.
2510         (push_binding): Tidy.
2511         (push_class_binding): Likewise.
2512         (pop_binding): Likewise.
2513         (poplevel): Likewise.
2514         (poplevel_class): Likewise.
2515         (set_identifier_type_value_with_scope): Likewise.
2516         (push_overloaded_decl): Likewise.
2517         (lookup_tag): Likewise.
2518         (unqualified_namespace_lookup): Likewise.
2519         (lookup_name_current_level): Likewise.
2520         (maybe_inject_for_scope_var): Likewise.
2521         (namespace_binding): Move to name-lookup.c.
2522         (set_namespace_binding): Likewise.
2523         * decl2.c (lookup_using_namespace): Tidy.
2524         (qualified_lookup_using_namespace): Likewise.
2525         (do_toplevel_using_decl): Likewise.
2526         * name-lookup.c: Include "timevar.h"
2527         * name-lookup.h (cxx_scope):  Declare.
2528         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
2529         member declaration.
2530         (BINDING_SCOPE): Adjust definition.
2531         (BINDING_HAS_LEVEL_P): Remove.
2532
2533 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2534
2535         * name-lookup.c: New file.
2536         * name-lookup.h: Likewise..
2537         * decl.c (push_binding): Adjust use cxx_binding_make.
2538         (free_bindings): Move to name-lookup.c
2539         (pop_binding): Use cxx_binding_free.
2540         (binding_for_name): Tidy.
2541         * cp-tree.h: Include "name-lookup.h"
2542         (cxx_binding_make): Move to name-lookup.h
2543         (cxx_binding_clear): Likewise.
2544         (struct cxx_binding): Likewise.
2545         (LOCAL_BINDING_P): Likewise.
2546         (INHERITED_VALUE_BINDING_P): Likewise.
2547         (BINDING_SCOPE): Likewise.
2548         (BINDING_HAS_LEVEL_P): Likewise.
2549         (BINDING_VALUE): Likewise.
2550         (BINDING_TYPE): Likewise.
2551         * config-lang.in (gtfiles): Add cp/name-lookup.h
2552         * Make-lang.in (cp/name-lookup.o): New rule.
2553         (CXX_OBJS): Add cp/name-lookup.o
2554         (CXX_TREE_H): Add cp/name-lookup.h
2555
2556 2003-03-28  Jason Merrill  <jason@redhat.com>
2557
2558         PR c++/10245
2559         * cvt.c (force_rvalue): New fn.
2560         * call.c (build_conditional_expr): Use it.
2561         * cp-tree.h: Declare it.
2562
2563 2003-03-28  Mike Stump  <mrs@apple.com>
2564
2565         * error.c (dump_expr): Add 0x to printed hex numbers to make
2566         output match source code better.
2567
2568 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
2569
2570         PR c++/10218
2571         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
2572         definitions.
2573
2574         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
2575         non-existant ssdf_decls array.
2576         (finish_file): Call generator_ctor_or_dtor_function when there are
2577         static constructors or destructors and no other static
2578         initializations.
2579
2580 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
2581
2582         PR c++/10047
2583         * decl2.c (finish_file): Don't warn about explicitly instantiated
2584         inline decls.
2585
2586 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
2587
2588         PR c++/10224
2589         * pt.c (lookup_template_class): Only check instantiated args if
2590         they do not contain template parameters.
2591
2592 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
2593
2594         PR c++/10158
2595         * parser.c (cp_parser_function_definition): Set
2596         DECL_INITIALIZED_IN_CLASS for members.
2597         * pt.c (instantiate_decl): Only reduce the template args for
2598         friends that are not defined in class.
2599
2600 2003-03-25  Jason Merrill  <jason@redhat.com>
2601
2602         * call.c (print_z_candidate): Change name of first arg to msgid.
2603         (joust): Add comment for translators.
2604
2605 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
2606
2607         PR c++/9898, PR c++/383, DR 322
2608         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
2609         through reference types on both PARM and ARG.
2610
2611 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
2612
2613         PR c++/10119
2614         * error.c (dump_expr) <BASELINK>: Use dump_expr.
2615         * pt.c (maybe_fold_nontype_args): New function.
2616         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
2617         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
2618         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
2619         maybe_fold_nontype_args.
2620
2621 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
2622
2623         PR c++/10026
2624         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
2625
2626 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
2627
2628         PR c++/7086
2629         * typeck.c (cxx_mark_addressable):  Adjust call to
2630         gen_mem_addressof or put_var_into_stack.
2631
2632 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
2633
2634         PR c++/9978, c++/9708
2635         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
2636         * call.c (add_template_candidate_real): Adjust
2637         instantiate_template call.
2638         * class.c (resolve_address_of_overloaded_function): Likewise.
2639         * decl.c (build_enumerator): Set TREE_CONSTANT.
2640         * pt.c (check_instantiated_args): New.
2641         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
2642         TREE_READONLY.
2643         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
2644         (reduce_template_parm_level): Likewise.
2645         (process_template_parm): Likewise.
2646         (check_explicit_specialization): Adjust instantiate_template call.
2647         (convert_template_argument): Don't check non-type argument here.
2648         (lookup_template_class): Check them here.
2649         (tsubst_friend_function): Adjust instantiate_template call.
2650         (instantiate_template): Add tsubst_flags parameter, use it. Check
2651         instantiated args.
2652
2653 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
2654
2655         * decl.c: Update calls to shadow_warning.
2656
2657 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
2658
2659         PR c++/9898
2660         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
2661         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
2662
2663 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
2664
2665         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
2666         friends.
2667         * cp/pt.c (instantiate_class_template): Fix formatting.
2668
2669 2003-03-14  Matt Austern  <austern@apple.com>
2670
2671         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
2672         (unemitted_tinfo_decl_p): Remove.
2673         (emit_tinfo_decl): Change declaration to remove unused parameter.
2674         * decl2.c (finish_file): Change tinfo emission to loop through
2675         unemitted_tinfo_decls array instead of looping through all decls.
2676         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
2677         unused second parameter.
2678         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
2679         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
2680         (emit_tinfo_decl): remove unused second parameter, add assertion
2681         that decl hasn't already been emitted.
2682
2683 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
2684
2685         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
2686         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
2687         return statements.
2688
2689 2003-03-19  Jason Merrill  <jason@redhat.com>
2690
2691         PR c++/8316, c++/9315, c++/10136
2692         * call.c (print_z_candidate): Split out from...
2693         (print_z_candidiates): ...here.
2694         (joust): Use it.
2695
2696 2003-03-17  Roger Sayle  <roger@eyesopen.com>
2697
2698         PR c++/10031
2699         * decl.c (duplicate_decls): Use the new type when prototyping
2700         anticipated decls, even when the types match.  This defines the
2701         exception list for the built-in function.
2702
2703 2003-03-17  Jason Merrill  <jason@redhat.com>
2704
2705         PR c++/10091
2706         * typeck.c (build_class_member_access_expr): Compare
2707         TYPE_MAIN_VARIANTs.
2708
2709 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
2710
2711         PR c++/9639
2712         * parser.c (cp_parser_declarator_id): Clear parser->scope.
2713
2714 2003-03-16  Jason Merrill  <jason@redhat.com>
2715
2716         PR c++/9993
2717         * decl.c (finish_function): Only allow the NRVO to use variables
2718         declared at function scope.
2719
2720 2003-03-17  Andreas Jaeger  <aj@suse.de>
2721
2722         * Make-lang.in (cp/TAGS): Remove.
2723
2724 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
2725
2726         PR c++/9629
2727         * cp-tree.h (struct language_function): Add in_base_initializer.
2728         (in_base_initializer): define it.
2729         (expand_member_init): Remove INIT param.
2730         * init.c (expand_member_init): Remove INIT param, return the member.
2731         (emit_mem_initializers): Set in_base_initializer.
2732         * class.c (build_base_path): Check in_base_initializer.
2733         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
2734         * pt.c (tsubst_initializer_list): Likewise.
2735
2736 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
2737
2738         * decl.c (binding_for_name): Fix initialization thinko.
2739
2740 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
2741
2742         Compile-time improvement: 2/n.
2743         * cp-tree.h (struct cxx_binding): New datatype;
2744         (struct lang_identifier): Use it.
2745         (LOCAL_BINDING_P): Adjust definition.
2746         (INHERITED_VALUE_BINDING_P): Likewise.
2747         (BINDING_SCOPE): Likewise.
2748         (BINDING_HAS_LEVEL_P): Likewise.
2749         (BINDING_VALUE): Likewise.
2750         (BINDING_TYPE): Likewise.
2751         (IDENTIFIER_VALUE): Likewise.
2752         (struct tree_binding): Remove.
2753         (TS_CP_BINDING): Likewise.
2754         ((union lang_tree_node): Remove field "binding".
2755         (cxx_binding_clear): New macro.
2756         (binding_for_name): Adjust return type.
2757         (qualified_lookup_using_namespace): Adjust prototype.
2758         (lookup_using_namespace): Adjust prototype.
2759         (cxx_scope_find_binding_for_name): Declare.
2760         * cp-tree.def: Remove CPLUS_BINDING definition.
2761         * decl.c (push_binding): Adjust local variable type.
2762         (add_binding): Likewise.
2763         (push_class_binding): Likewise.
2764         (pop_binding): Likewise.
2765         (poplevel): Likewise.
2766         (poplevel_class): Likewise.
2767         (free_bindings):  Adjust type.
2768         (find_binding): Adjust return type, add a third parameter. Remove
2769         non-useful assertion now that we use static typing.
2770         (cxx_scope_find_binding_for_name): New function.
2771         (binding_for_name): Use it.  Adjust local variable type. Simplify.
2772         (namespace_binding):  Simplify.
2773         (set_namespace_binding): Likewise.
2774         (set_identifier_type_value_with_scope): Adjust local variable type.
2775         (lookup_tag): Don't type-abuse of local variable 'old'.
2776         (lookup_namespace_name): Likewise.  Allocate binding on stack.
2777         (select_decl): Adjust prototype.
2778         (unqualified_namespace_lookup):  Allocate binding on stack.
2779         Don't type-abuse of local variable 'val'.
2780         (lookup_name_real): Likewise.
2781         (maybe_inject_for_scope_var): Adjust local variable type.
2782         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
2783         (namespace_binding): Adjust logic, simplify.
2784         (BINDING_LEVEL): Adjust definition.
2785         (push_class_level_binding): Adjust local variable type.
2786         (struct cxx_saved_binding): Adjust field 'binding' type.
2787         * decl2.c (ambiguous_decl): Adjust prototype.
2788         (lookup_using_namespace): Adjust local variable type.
2789         (qualified_lookup_using_namespace): Catch type error and correct
2790         ensueing logic error.
2791         (do_nonmember_using_decl): Adjust local variable type.  Allocate
2792         temporary cxx_binding on stack.
2793         (do_toplevel_using_decl): Adjust local variable type.
2794         * ptree.c (cxx_print_cxx_binding): New function.
2795         (cxx_print_identifier): Use it.
2796         (cxx_print_xnode): Delete CPLUS_BINDING case label.
2797
2798 2003-03-15  Roger Sayle  <roger@eyesopen.com>
2799
2800         * tree.c (count_functions): Fix whitespace.
2801
2802 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
2803
2804         * Make-lang.in: Update.
2805
2806 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2807
2808         PR c++/6440
2809         * pt.c (maybe_process_partial_specialization): Handle
2810         member class template when enclosing class template is
2811         explicit specialized.
2812         (most_general_template): Stop looking when DECL is already
2813         specialized.
2814
2815 2003-03-13  Jason Merrill  <jason@redhat.com>
2816
2817         PR c++/9420
2818         * search.c (lookup_conversions): Call complete_type here.
2819         * call.c (implicit_conversion): Not here.
2820
2821 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
2822
2823         * decl2.c (do_nonmember_using_decl): Correct handling of
2824         simultaneous type/non-type bindings.
2825
2826         * call.c (initialize_reference): Remove bogus assertion.
2827         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
2828
2829 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
2830
2831         PR c++/7050
2832         * expr.c (cxx_expand_expr): Return const0_rtx for throw
2833         expressions.
2834
2835 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
2836
2837         PR c++/9474
2838         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
2839         to merge old and new declarations.
2840
2841 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
2842
2843         * g++.1: Remove.
2844         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
2845         (cp/g++.1): Build it from scratch in the build tree.
2846         (c++.install-man): Depend on it.  Install it from the build tree.
2847         (c++.mostlyclean): Clean it.
2848
2849 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
2850
2851         PR c++/9474
2852         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
2853         to merge old and new declarations.
2854
2855         PR c++/9924
2856         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
2857
2858 2003-03-11  Jason Merrill  <jason@redhat.com>
2859
2860         PR c++/9820
2861         * search.c (lookup_member): Fix handling of functions in a class
2862         being defined.
2863
2864 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
2865
2866         PR c++/8700
2867         * call.c (convert_class_to_reference): Adjust usage of
2868         splice_viable.
2869         (any_viable): Remove.
2870         (splice_viable): Combine with any_viable.
2871         (print_z_candidates): Avoid printing duplicates.
2872         (build_user_type_conversion_1): Adjust usage of splice_viable.
2873         (build_new_function_call): Likewise.
2874         (build_operator_new_call): Likewise.
2875         (build_object_call): Likewise.
2876         (build_conditional_expr): Likewise.
2877         (build_new_op): Likewise.
2878         (build_new_method_call): Likewise.
2879         (joust): Remove spurious comment.
2880         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
2881         * decl2.c (arg_assoc_class): Simplify.
2882         * friend.c (add_friend): Likewise.
2883
2884 2003-03-11  Jason Merrill  <jason@redhat.com>
2885
2886         PR c++/8660
2887         * decl2.c (check_classfn): A member template only matches a
2888         member template.
2889
2890 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
2891
2892         * Make-lang.in (CXX_C_OBJS): Update.
2893         * lang-specs.h: Don't define __GNUG__ here.
2894
2895 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
2896
2897         * call.c (perform_overload_resolution): New function.
2898         (build_new_function_call): Use it.
2899         (build_operator_new_call): Likewise.
2900         (add_candidates): Add explicit_targs and template_only parameters.
2901         (build_new_op): Adjust accordingly.
2902         * cp-tree.h (build_operator_new_call): New function.
2903         (build_function_call_real): Remove.
2904         (build_function_call_maybe): Likewise.
2905         * init.c (build_new_1): Use build_operator_new_call.
2906         * typeck.c (build_function_call_real): Rename to ...
2907         (build_function_call): ... this.
2908
2909 2003-03-10  Devang Patel  <dpatel@apple.com>
2910
2911         PR c++/9394
2912         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
2913
2914 2003-03-10  Jason Merrill  <jason@redhat.com>
2915
2916         PR c++/9798
2917         * decl.c (push_using_directive): Push before recursing.
2918
2919         PR c++/9868, c++/9524
2920         * call.c (resolve_scoped_fn_name): Handle the case of a function
2921         pointer member.
2922
2923         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
2924         argument in the pointer-to-member case.
2925
2926 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
2927
2928         PR c++/9373
2929         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
2930         pointers to member functions.
2931
2932         PR c++/8534
2933         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
2934         in pointer-to-member-function types.
2935
2936 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2937
2938         * expr.c (cplus_expand_constant): Use C90 prototype style.
2939         (cxx_expand_expr): Likewise.
2940
2941 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2942
2943         PR c++/9970
2944         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
2945         functions.
2946
2947 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
2948
2949         * lang-specs.h (c++-header): Change .pch to .gch.
2950
2951 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
2952
2953         * cp-tree.h (cxx_init): Update prototype.
2954         * lex.c (cxx_init): Similarly.
2955
2956 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
2957
2958         PR c++/9823
2959         * cp-tree.h (begin_mem_initializers): Remove.
2960         * parser.c (cp_parser_mem_initializer_list): Inline it here.
2961         Do not call finish_mem_initializers if not in a constructor.
2962         (cp_parser_class_head): Fix typo in error message.
2963         * semantics.c (begin_mem_initializers): Remove.
2964         * testsuite/g++.dg/parser/constructor1.C: New test.
2965
2966         PR c++/9809
2967         * call.c (add_function_candidate): Skip builtin fuctions that have
2968         not yet been declared.
2969
2970         PR c++/9982
2971         * init.c (build_new_1): Correct logic for determining whether or
2972         not to use an array cookie.
2973
2974         PR c++/9524
2975         * parser.c (cp_parser_postfix_expression): Call
2976         finish_non_static_data_member, even when processing_template_decl.
2977
2978         PR c++/9912
2979         * cp-tree.h (is_ancestor): New function.
2980         (handle_class_head): Change prototype.
2981         * decl2.c (is_namespace_ancestor): Rename to ...
2982         (namespace_anecestor): ... this.
2983         (set_decl_namespace): Adjust accordingly.
2984         (handle_class_head): Remove unncessary parameters.
2985         * parser.c (cp_parser_class_head): Check that
2986         nested-name-specifiers are used appropriately.
2987
2988 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
2989
2990         * call.c (reference_binding): Remove REF_IS_VAR parameter.
2991         (implicit_conversion): Adjust call to reference_binding.
2992         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
2993         (initialize_reference): Adjust handling for references bound to
2994         rvalues.
2995         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
2996         prototype.
2997         (real_non_cast_lvalue_p): New method.
2998         * cvt.c (build_up_reference): Adjust use of
2999         make_temporary_var_for_ref_to_temp.
3000         * tree.c (real_non_cast_lvalue_p): New method.
3001
3002 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3003
3004         * except.c (init_exception_processing): Use C90 prototype style.
3005         (cp_protect_cleanup_actions): Likewise.
3006         (prepare_eh_type): Likewise.
3007         (build_eh_type_type): Likewise.
3008         (build_exc_ptr): Likewise.
3009         (do_begin_catch): Likewise.
3010         (dtor_nothrow): Likewise.
3011         (do_end_catch): Likewise.
3012         (push_eh_cleanup): Likewise.
3013         (decl_is_java_type): Likewise.
3014         (choose_personality_routine): Likewise.
3015         (initialize_handler_parm): Likewise.
3016         (expand_start_catch_block): Likewise.
3017         (expand_end_catch_block): Likewise.
3018         (begin_eh_spec_block): Likewise.
3019         (finish_eh_spec_block): Likewise.
3020         (do_allocate_exception): Likewise.
3021         (do_free_exception): Likewise.
3022         (wrap_cleanups_r): Likewise.
3023         (stabilize_throw_expr): Likewise.
3024         (build_throw): Likewise.
3025         (complete_ptr_ref_or_void_ptr_p): Likewise.
3026         (is_admissible_throw_operand): Likewise.
3027         (nothrow_libfn_p): Likewise.
3028         (can_convert_eh): Likewise.
3029         (check_handlers_1): Likewise.
3030         (check_handlers): Likewise.
3031
3032 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
3033
3034         * call.c (merge_conversion_sequences): New function.
3035         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
3036         (convert_class_to_reference): Correct handling of second
3037         standard conversion sequence in a user-defined conversion
3038         sequence.
3039         (build_user_type_conversion_1): Use merge_conversion_sequences.
3040         * cp-tree.def: Add comments for CONV nodes.
3041         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
3042
3043 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3044
3045         * error.c (init_error): Use C90 prototype style.
3046         (dump_scope): Likewise.
3047         (dump_qualifiers): Likewise.
3048         (dump_template_argument): Likewise.
3049         (dump_template_argument_list): Likewise.
3050         (dump_template_parameter): Likewise.
3051         (dump_template_bindings): Likewise.
3052         (dump_type): Likewise.
3053         (dump_typename): Likewise.
3054         (class_key_or_enum): Likewise.
3055         (dump_aggr_type): Likewise.
3056         (dump_type_prefix): Likewise.
3057         (dump_type_suffix): Likewise.
3058         (dump_global_iord): Likewise.
3059         (dump_simple_decl): Likewise.
3060         (dump_decl): Likewise.
3061         (dump_template_decl): Likewise.
3062         (dump_function_decl): Likewise.
3063         (dump_parameters): Likewise.
3064         (dump_exception_spec): Likewise.
3065         (dump_function_name): Likewise.
3066         (dump_template_parms): Likewise.
3067         (dump_char): Likewise.
3068         (dump_expr_list): Likewise.
3069         (dump_expr): Likewise.
3070         (dump_binary_op): Likewise.
3071         (dump_unary_op): Likewise.
3072         (type_as_string): Likewise.
3073         (expr_as_string): Likewise.
3074         (decl_as_string): Likewise.
3075         (context_as_string): Likewise.
3076         (lang_decl_name): Likewise.
3077         (cp_file_of): Likewise.
3078         (cp_line_of): Likewise.
3079         (decl_to_string): Likewise.
3080         (expr_to_string): Likewise.
3081         (fndecl_to_string): Likewise.
3082         (code_to_string): Likewise.
3083         (language_to_string): Likewise.
3084         (parm_to_string): Likewise.
3085         (op_to_string): Likewise.
3086         (type_to_string): Likewise.
3087         (assop_to_string): Likewise.
3088         (args_to_string): Likewise.
3089         (cv_to_string): Likewise.
3090         (cxx_print_error_function): Likewise.
3091         (cp_diagnostic_starter): Likewise.
3092         (cp_diagnostic_finalizer): Likewise.
3093         (cp_print_error_function): Likewise.
3094         (function_category): Likewise.
3095         (print_instantiation_full_context): Likewise.
3096         (print_instantiation_partial_context): Likewise.
3097         (maybe_print_instantiation_context): Likewise.
3098         (print_instantiation_context): Likewise.
3099         (cp_printer): Likewise.
3100         (print_integer): Likewise.
3101         (print_non_consecutive_character): Likewise.
3102         (locate_error): Likewise.
3103
3104 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
3105
3106         PR c++/9965
3107         * call.c (reference_binding): Add ref_is_var parameter.
3108         (implicit_conversion): Adjust call to reference_binding.
3109         (initialize_reference): Likewise.
3110
3111         PR c++/9400
3112         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
3113         PARM_DECLs.
3114
3115         PR c++/9791
3116         * class.c (get_basefndecls): Use lookup_fnfields_1.
3117
3118 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3119
3120         PR c++/9188
3121         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
3122         in error message.
3123         (cp_parser_single_declaration): Likewise.
3124
3125 2003-03-05  Jason Merrill  <jason@redhat.com>
3126
3127         PR c++/9440
3128         * call.c (build_conditional_expr): Use convert rather than an
3129         explicit NOP_EXPR.
3130
3131 2003-03-02  Matt Austern  <austern@apple.com>
3132
3133         * decl.c (cp_binding_level): Add static_decls varray member.
3134         (add_decl_to_level): Add static/inline namespace scope
3135         declarations to static_decls array.
3136         (wrapup_global_for_namespace): Pass static_decls only, instead of
3137         all decls, to wrapup_global_declarations/check_global_declarations.
3138         (push_namespace): Initialize static_decls for ordinary namespaces.
3139         (cxx_init_decl_processing): Initialize static_decls for global
3140         namespace.
3141
3142 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
3143
3144         * class.c (end_of_class): Correct thinko.
3145
3146 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
3147
3148         * config-lang.in: Replace ${libstdcxx_version} by its value.
3149
3150 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
3151
3152         * cp-tree.h (cxx_saved_binding): Declare.
3153         (struct saved_scope): Adjust type of field 'old_binding'.
3154         * decl.c (cxx_saved_binding_make): New macro.
3155         (struct cxx_saved_binding): Define.
3156         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
3157         C++ bindings.
3158         (maybe_push_to_top_level): Adjust local variable type.
3159         (pop_from_top_level): Likewise.
3160
3161 2003-03-04  Tom Tromey  <tromey@redhat.com>
3162
3163         * Make-lang.in (c++.tags): New target.
3164
3165 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
3166
3167         * Make-lang.in: Update.
3168
3169 2003-03-03  Jason Merrill  <jason@redhat.com>
3170
3171         * decl.c (finish_enum): Do set the type in a template. Simplify.
3172         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
3173
3174 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
3175
3176         PR c++/9878
3177         * call.c (convert_class_to_reference): Correct conversion
3178         sequences.
3179         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
3180         (implicit_conversion): Adjust call to reference_binding.
3181         (add_candidate): Change type of candidates parameter.
3182         (add_function_candidate): Likewise.
3183         (add_conv_candidate): Likewise.
3184         (build_builtin_candidate): Likewise.
3185         (add_builtin_candidate): Likewise.
3186         (add_builtin_candidates): Likewise.
3187         (add_template_candidate_real): Likewise.
3188         (add_template_candidate): Likewise.
3189         (add_template_conv_candidate): Likewise.
3190         (build_user_type_conversion_1): Adjust accordingly.
3191         (build_object_call): Likewise.
3192         (build_conditional_expr): Likewise.
3193         (add_candidates): Likewise.
3194         (build_new_op): Likewise.
3195         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
3196         (build_new_method_call): Adjust calls to add_function_candidate.
3197         (make_temporary_var_for_ref_to_temp): New function.
3198         (initialize_reference): Add decl parameter.
3199         * class.c (build_rtti_vtbl_entries): Use build_address and
3200         build_nop.
3201         * cp-tree.h (initialize_reference): Change prototype.
3202         (make_temporary_var_for_ref_to_temp): New function.
3203         (build_type_conversion): Change prototype.
3204         (build_address): New function.
3205         (build_nop): Likewise.
3206         * cvt.c (cp_convert_to_pointer): Adjust call to
3207         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
3208         Use build_nop.
3209         (convert_to_pointer_force): Use build_nop.
3210         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
3211         (convert_to_reference): Adjust call to build_type_conversion.
3212         (ocp_convert): Likewise.
3213         (build_type_conversion): Remove for_sure parameter.
3214         * decl.c (grok_reference_init): Use initialize_reference.
3215         * typeck.c (build_address): New function.
3216         (build_nop): Likewise.
3217         (build_unary_op): Use them.
3218         (build_ptrmemfunc): Tidy slightly.
3219         (convert_for_initialization): Adjust call to
3220         initialize_reference.
3221         * typeck2.c (store_init_value): Remove #if 0'd code.
3222
3223 2003-03-03  Jason Merrill  <jason@redhat.com>
3224
3225         * decl.c (start_function): Clear DECL_NUM_STMTS.
3226
3227         * class.c (get_vtable_decl): Use vtbl_type_node.
3228         (build_primary_vtable): Check for it.
3229
3230 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
3231
3232         * decl.c (check_initializer): Check for vector_opaque_p.
3233
3234 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
3235
3236         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
3237           invoke an external cpp during compilation.
3238
3239 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3240
3241         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
3242         that of warning().
3243         (start_decl): Likewise.
3244         (start_function): Likewise.
3245
3246 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
3247
3248         * Make-lang.in (CXX_C_OBJS): Update.
3249
3250 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
3251
3252         PR c++/9892
3253         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
3254         instantiating it.
3255
3256 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
3257
3258         * parser.c (cp_parser_init_declarator): Revert opaque
3259         vector_opaque_p change.
3260         Do not include target.h.
3261
3262 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
3263
3264         PR c++/9879
3265         * cp-tree.h (build_zero_init): Add parameter.
3266         * decl.c (cp_finish_decl): Adjust call.
3267         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
3268         calls.
3269         (build_default_init): Add nelts parameter.  Adjust calls to
3270         build_zero_init.
3271         (build_new_1): Adjust call to build_default_init.
3272         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
3273
3274 2003-02-26  Devang Patel  <dpatel@apple.com>
3275
3276         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
3277         required.  Postpone enum setting for template decls.
3278         (build_enumerator): Delay copying value node until finish_enum
3279         (). Remove #if 0'ed code.
3280         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
3281         (tsubst_copy): Add check for enum type.
3282
3283 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
3284
3285         PR c++/9683
3286         * decl2.c (prune_vars_needing_no_initialization): Do not throw
3287         away initializations for DECL_EXTERNAL VAR_DECLs.
3288         (finish_file): Adjust accordingly.
3289         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
3290
3291 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
3292
3293         * decl.c (add_binding): Time TV_NAME_LOOKUP.
3294         (push_class_binding): Likewise.
3295         (set_namespace_binding): Likewise.
3296
3297 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
3298
3299         PR c++/9836
3300         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
3301         specializations back to the main template.
3302         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
3303         * pt.c (resolve_typename_type): Likewise.
3304
3305 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
3306
3307         PR c++/9778
3308         * pt.c (tsubst_copy_and_build): For a templated function inside a
3309         scope, process template arguments.
3310
3311 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3312
3313         PR c++/9602
3314         * typeck2.c (abstract_virtuals_error): Don't check when
3315         TYPE is still template parameter dependent.
3316
3317 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
3318
3319         PR c++/5333
3320         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
3321         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
3322         * pt.c (instantiate_class_template): Don't try to instantiate
3323         dependent types.
3324         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
3325
3326 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
3327
3328         PR c++/9749
3329         * decl.c (grokdeclarator): Do not allow parameters with variably
3330         modified types.
3331
3332 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
3333
3334         * search.c (grow_bfs_bases): Remove. Fold into ...
3335         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
3336         in previous patch.
3337
3338 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
3339
3340         PR c++/9729
3341         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
3342         when the G++ 3.2 ABI prevents correct compilation.
3343
3344 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
3345
3346         Change base class access representation. Share virtual base
3347         binfos.
3348         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
3349         call.
3350         * cp/class.c (build_base_path): Likewise.
3351         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
3352         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
3353         (make_new_vtable): Adjust.
3354         (force_canonical_binfo_r): Delete.
3355         (force_canonical_binfo): Delete.
3356         (mark_primary_virtual_base): Delete.
3357         (dfs_unshared_virtual_bases): Delete.
3358         (mark_primary_bases): Adjust.
3359         (maybe_warn_about_overly_private_class): Adjust.
3360         (dfs_base_derived_from): Delete.
3361         (base_derived_from): Follow the inheritance chain.
3362         (struct find_final_overrider_data): Add vpath member.
3363         (dfs_find_final_overrider): Adjust.
3364         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
3365         (find_final_overrider): Adjust.
3366         (update_vtable_entry_for_fn): Adjust.
3367         (modify_all_vtables): Adjust.
3368         (walk_subobject_offsets): Adjust.
3369         (layout_nonempty_base_or_field): Adjust.
3370         (layout_empty_base): Remove last parameter. Adjust.
3371         (build_base_field): Adjust.
3372         (build_base_fields): Adjust.
3373         (propagate_binfo_offsets): Remove last parameter. Adjust.
3374         (dfs_set_offset_for_unshared_vbases): Delete.
3375         (layout_virtual_bases): Adjust.
3376         (finish_struct_1): Adjust.
3377         (init_class_processing): Don't init access nodes.
3378         (dfs_get_primary_binfo): Delete.
3379         (get_primary_binfo): Adjust.
3380         (dump_class_hierarchy_r): Remove most derived arg, add IGO
3381         parameter. Adjust.
3382         (dump_class_hierarchy): Adjust.
3383         (finish_vtbls): Adjust.
3384         (get_original_base): Delete.
3385         (build_vtt_inits): Adjust.
3386         (dfs_build_secondary_vptr_vtt_inits): Adjust.
3387         (dfs_ctor_vtable_bases_queue_p): Adjust.
3388         (build_ctor_vtbl_group): Adjust.
3389         (dfs_accumulate_vtbl_inits): Adjust.
3390         (build_vtbl_initializer): Adjust.
3391         (build_vbase_offset_vtbl_entries): Adjust.
3392         (add_vcall_offset_vtbl_entries_1): Adjust.
3393         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
3394         (access_*_node): Remove.
3395         (CANONICAL_BINFO): Delete.
3396         (BINFO_UNSHARED_MARKED): Remove.
3397         (BINFO_MARKED): Set LANG_FLAG_0 directly.
3398         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
3399         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
3400         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
3401         Delete.
3402         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
3403         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
3404         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
3405         Delete.
3406         (BINFO_DEPENDENT_BASE_P): New.
3407         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
3408         index.
3409         (markedp, unmarkedp): Adjust.
3410         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
3411         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
3412         find_vbase_instance, binfo_for_vbase): Delete.
3413         (copied_binfo, original_binfo): Declare.
3414         (finish_base_specifier): Add virtual_p arg.
3415         (unshare_base_binfos): Delete.
3416         (copy_base_binfos): Declare.
3417         (reverse_path): Delete.
3418         * cp/decl.c (xref_basetypes): Access and virtuality passed
3419         differently. Don't copy direct base binfos here. Call
3420         copy_base_binfos.
3421         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
3422         (initialize_vtbl_ptrs): Adjust.
3423         (expand_member_init): Adjust.
3424         * cp/parser.c (cp_parser_base_specifier): Adjust.
3425         * cp/pt.c (instantiate_class_template): Adjust.
3426         (get_template_base_recursive): Adjust.
3427         * cp/rtti.c (get_pseudo_ti_init): Adjust.
3428         (get_pseudo_ti_desc): Adjust.
3429         * cp/tree.c (unshare_base_binfos): Rename to ...
3430         (copy_base_binfos): ... here, reimplement.
3431         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
3432         (reverse_path): Remove.
3433         * cp/typeck.c (get_delta_difference): Adjust error messages.
3434         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
3435         * cp/search.c (lookup_base_r): Adjust.
3436         (dynamic_cast_base_recurse): Adjust.
3437         (canonical_binfo): Remove.
3438         (dfs_canonical_queue): Remove.
3439         (dfs_assert_unmarked_p): Remove.
3440         (assert_canonical_unmarked): Remove.
3441         (shared_marked_p, shared_unmarked_p): Remove.
3442         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
3443         (dfs_access_in_type): Adjust.
3444         (access_in_type): Adjust.
3445         (dfs_accessible_queue_p): Adjust.
3446         (dfs_accessible_p): Adjust.
3447         (is_subobject_of_p_1, is_subobject_of_p): Remove.
3448         (struct lookup_field_info): Remove from_dep_base_p field.
3449         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
3450         (lookup_field_r): Remove dependent base code.
3451         (lookup_member): Likewise.
3452         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
3453         (dfs_unmarked_real_bases_queue_p): Remove.
3454         (dfs_marked_real_bases_queue_p): Remove.
3455         (dfs_skip_vbases): Remove.
3456         (dfs_get_pure_virtuals): Adjust.
3457         (markedp, unmarkedp): Adjust.
3458         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
3459         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
3460         (dfs_unmark): Adjust.
3461         (dfs_get_vbase_types):Remove.
3462         (dfs_build_inheritance_graph_order): Remove.
3463         (get_vbase_types): Remove
3464         (dfs_find_vbase_instance): Remove.
3465         (find_vbase_instance): Remove.
3466         (dfs_debug_unmarkedp): Adjust.
3467         (dependent_base_p): Remove.
3468         (dfs_push_type_decls): Adjust.
3469         (dfs_push_decls): Adjust.
3470         (dfs_no_overlap_yet): Adjust.
3471         (copied_binfo): New function.
3472         (original_binfo): New function.
3473         (binfo_for_vbase): Remove.
3474
3475 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
3476
3477         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
3478         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
3479         vectors, for speed.
3480
3481 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
3482
3483         PR c++/9704
3484         * class.c (layout_class_type): In the 3.2 ABI, take into account
3485         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
3486
3487 2003-02-18  Matt Austern <austern@apple.com>
3488
3489         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
3490         nothing for C++.
3491         * cp/decl.c (wrapup_globals_for_namespace): Remove special
3492         handling of global namespace.
3493
3494 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
3495
3496         * cp-tree.h (rid_to_yy): Delete.
3497         (C_RID_YYCODE): Delete.
3498         (finish_file): Delete redundant declaration.
3499
3500 2003-02-18  Jason Merrill  <jason@redhat.com>
3501
3502         PR c++/9623
3503         * decl.c (reshape_init): Don't mess with initializer labels.
3504
3505         PR c++/9485
3506         * parser.c (cp_parser_postfix_expression): Set idk properly for
3507         object->scope::member.
3508
3509 2003-02-18  Ben Elliston  <bje@redhat.com>
3510
3511         PR other/7350
3512         * decl.c (duplicate_decls): Fix typo in comment.
3513
3514 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
3515
3516         PR debug/9717
3517         * class.c (build_base_field): Mark fields for base classes with
3518         DECL_IGNORED_P.
3519
3520 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3521
3522         PR c++/9457
3523         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
3524         CONSTRUCTOR_ELTS only once.
3525
3526 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3527
3528         PR c++/9459
3529         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
3530         (dump_type_suffix): Likewise.
3531
3532 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
3533
3534         * search.c: ANSIfy function declarations and definitions.
3535         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
3536         * call.c (build_method_call, resolve_scoped_fn_name,
3537         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
3538         calls.
3539         * class.c (handle_using_decl): Likewise.
3540         * decl.c (make_typename_type, make_unmound_class_template,
3541         start_decl, compute_array_index_type): Likewise.
3542         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
3543         * init.c (expand_member_init, build_member_call): Likewise.
3544         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
3545         resolve_typename_type): Likewise.
3546         * typeck.c (lookup_destructor, finish_class_member_access_exprm
3547         build_prememfunc_access_expr): Likewise.
3548
3549 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
3550
3551         * decl2.c: Include "timevar.h".
3552         (namespace_ancestor): Time name lookup.
3553         (add_using_namespace): Likewise.
3554         (lookup_using_namespace): Likewise.
3555         (qualified_lookup_using_namespace): Likewise.
3556         (decl_namespace): Likewise.
3557         (lookup_arg_dependent): Likewise.
3558         * lex.c (do_identifier): Likewise.
3559         (do_scoped_id): Likewise.
3560         * pt.c (lookup_template_class): Likewise.
3561
3562 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
3563
3564         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
3565
3566 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3567
3568         * decl.c: Include "timevar.h".
3569         (poplevel): Time name lookup.
3570         (find_binding): Likewise.
3571         (push_namespace): Likewise.
3572         (pop_nested_namespace): Likewise.
3573         (store_bindings): Likewise.
3574         (maybe_push_to_top_level): Likewise.
3575         (pop_from_top_level): Likewise.
3576         (push_local_name): Likewise.
3577         (pushtag): Likewise.
3578         (pushdecl): Likewise.
3579         (pushdecl_with_scope): Likewise.
3580         (pushdecl_namespace_level): Likewise.
3581         (pushdecl_top_level): Likewise.
3582         (pushdecl_class_level): Likewise.
3583         (push_class_level_binding): Likewise.
3584         (push_using_decl): Likewise.
3585         (push_using_directive): Likewise.
3586         (push_overloaded_decl): Likewise.
3587         (lookup_label): Likewise.
3588         (define_label): Likewise.
3589         (lookup_tag): Likewise.
3590         (lookup_tag_reverse): Likewise.
3591         (lookup_namespace_name): Likewise.
3592         (select_decl): Likewise.
3593         (unqualified_namespace_lookup): Likewise.
3594         (lookup_name_real): Likewise.
3595         (lookup_name_current_level): Likewise.
3596         (lookup_type_current_level): Likewise.
3597         (maybe_inject_for_scope_var): Likewise.
3598         (xref_tag): Likewise.
3599
3600         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
3601
3602 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
3603
3604         * decl.c (build_enumerator):  Remove unneeded test.
3605
3606 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
3607
3608         * cp-tree.h (struct lang_type_header): Make all fields unsigned
3609         char.
3610
3611 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
3612
3613         PR c++/7129
3614         * call.c (z_candidate): Add args.
3615         (convert_class_to_reference): Set it.
3616         (implicit_conversion): Tidy.
3617         (add_candidate): Add args parameter.
3618         (add_function_candidate): Adjust call to add_candidate.
3619         (add_conv_candidate): Likewise.
3620         (build_builtin_candidate): Likewise.
3621         (build_user_type_conversion_1): Eliminate wasteful tree_cons
3622         usage.
3623         (build_new_function_call): Likewise.
3624         (build_object_call): Likewise.
3625         (add_candidates): New function.
3626         (build_new_op): Use it.
3627         (covert_like_real): Adjust call to build_over_call.
3628         (build_over_call): Remove args parameter.
3629         * operators.def: Add <?= and >?=.
3630
3631 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
3632
3633         * typeck.c (build_indirect_ref): Don't check flag_volatile.
3634
3635 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3636
3637         PR c++/8849
3638         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
3639
3640 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
3641
3642         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
3643         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
3644         (BINFO_LANG_ELTS): New #define.
3645         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
3646
3647 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
3648
3649         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
3650
3651 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
3652
3653         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
3654         for class types.
3655         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
3656         rather than TYPE_LANG_FLAG_0.
3657         (TYPE_BUILT_IN): Remove.
3658         (TYPE_DEPENDENT_P): New macro.
3659         (TYPE_DEPENDENT_P_VALID): Likewise.
3660         (lang_type_class): Add fields_readonly.
3661         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
3662         * pt.c (dependent_type_p_r): New function, split out from ...
3663         (dependent_type_p): ... here.  Memoize results.
3664         * search.c (dependent_base_p): Use dependent_type_p, not
3665         uses_template_parms.
3666         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
3667         for class types.
3668
3669 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
3670
3671         * call.c (build_field_call): Use build_new_op, not build_opfncall.
3672         (prep_operand): New function.
3673         (build_new_op): Use it.  Remove dead code.
3674         * class.c (pushclass): Change "modify" parameter type from int to
3675         bool.
3676         (currently_open_class): Use same_type_p, not pointer equality.
3677         (push_nested_class): Adjust calls to pushclass, remove modify
3678         parameter.
3679         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
3680         (pushclass): Change prototype.
3681         (push_nested_class): Likewise.
3682         (grokoptypename): Remove.
3683         (build_opfncall): Remove.
3684         (value_dependent_expression_p): Declare.
3685         (resolve_typename_type): Likewise.
3686         (resolve_typename_type_in_current_instantiation): Likewise.
3687         (enter_scope_of): Remove.
3688         (tsubst): Remove.
3689         (tsubst_expr): Likewise.
3690         (tsubst_copy): Likewise.
3691         (tsubst_copy_and_build): Likewise.
3692         * decl.c (warn_about_implicit_typename_lookup): Remove.
3693         (finish_case_label): Return error_mark_node for erroneous labels.
3694         (start_decl): Adjust calls to push_nested_class.
3695         (grokfndecl): Call push_scope/pop_scope around call to
3696         duplicate_decls.
3697         (grokdeclarator): Do not call tsubst.
3698         (start_function): Adjust calls to push_nested_class.
3699         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
3700         (check_classfn): Use push_scope/pop_scope around type comparisions.
3701         (grokoptypename): Remove.
3702         (push_sscope): Adjust call to push_nested_class.
3703         * error.c (dump_type): Show cv-qualification of typename types.
3704         * init.c (build_member_call): Use build_new_op, not
3705         build_opfncall.
3706         * method.c (build_opfncall): Remove.
3707         * parser.c (cp_parser): Add allow_non_constant_expression_p and
3708         non_constant_expression_p.
3709         (cp_parser_constant_expression): Adjust prototype.
3710         (cp_parser_resolve_typename_type): Remove.
3711         (cp_parser_non_constant_expression): New function.
3712         (cp_parser_non_constant_id_expression): Likewise.
3713         (cp_parser_new): Set allow_non_constant_expression_p and
3714         non_constant_expression_p.
3715         (cp_parser_primary_expression): Reject `this' and `va_arg' in
3716         constant-expressions.  Note that dependent names aren't really
3717         constant.
3718         (cp_parser_postfix_expression): Reject conversions to non-integral
3719         types in constant-expressions.  Neither are increments or
3720         decrements.
3721         (cp_parser_unary_expression): Reject increments and decrements in
3722         constant-expressions.
3723         (cp_parser_direct_new_declarator): Adjust call to
3724         cp_parser_constant_expression.
3725         (cp_parser_cast_expression): Reject conversions to non-integral
3726         types in constant-expressions.
3727         (cp_parser_assignment_expression): Rejects assignments in
3728         constant-expressions.
3729         (cp_parser_expression): Reject commas in constant-expressions.
3730         (cp_parser_labeled_statement): Adjust call to
3731         cp_parser_constant_expression.
3732         (cp_parser_direct_declarator): Simplify array bounds, even in
3733         templates, when they are non-dependent.  Use
3734         resolve_typename_type, not cp_parser_resolve_typename_type.
3735         (cp_parser_class_head): Use resolve_typename_type, not
3736         cp_parser_resolve_typename_type.
3737         (cp_parser_member_declaration): Adjust call to
3738         cp_parser_constant_expression.
3739         (cp_parser_constant_initializer): Likewise.
3740         (cp_parser_constructor_declarator): Use resolve_typename_type, not
3741         cp_parser_resolve_typename_type.
3742         (cp_parser_late_parsing_default_args): Adjust call to
3743         push_nested_class.
3744         * pt.c (tsubst): Give it internal linkage.
3745         (tsubst_expr): Likewise.
3746         (tsubst_copy): Likewise.
3747         (tsubst_copy_and_build): Likewise.
3748         (push_access_scope_real): Likewise.
3749         (tsubst_friend_class): Likewise.
3750         (instantiate_class_template): Adjust call to pushclass.
3751         (value_dependent_expression_p): Give it external linkage.
3752         Robustify.
3753         (resolve_typename_type): New function.
3754         * semantics.c (finish_call_expr): Use build_new_op, not
3755         build_opfncall.
3756         (begin_constructor_declarator): Remove.
3757         (begin_class_definition): Adjust call to pushclass.
3758         (enter_scope_of): Remove.
3759         * typeck.c (comptypes): Resolve typename types as appropriate.
3760         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
3761         (build_x_compound_expr): Likewise.
3762         (build_modify_expr): Likewise.
3763         (build_x_modify_expr): Likewise.
3764         * typeck2.c (build_x_arrow): Likewise.
3765
3766 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
3767
3768         * pt.c (last_pending_template) Declare GTY().
3769
3770 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3771
3772         PR c++/8591
3773         * parser.c (cp_parser_elaborated_type_specifier): Convert
3774         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
3775         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
3776
3777 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
3778
3779         PR c++/9437
3780         * pt.c (unify): Don't unify '*T' with 'U C::*'.
3781
3782         PR c++/3902
3783         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
3784         inside a declarator.
3785
3786 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
3787
3788         * class.c (update_vtable_entry_for_fn): Add index parameter.
3789         Generate vcall thunk for covariant overriding from a virtual
3790         primary base.
3791         (dfs_modify_vtables): Adjust.
3792
3793 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
3794
3795         PR c++/9403
3796         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
3797         template keyword.
3798         (cp_parser_base_specifier): Look for and consume a
3799         TEMPLATE keyword. Replace switch with array index.
3800
3801         PR c++/795
3802         * semantics.c (finish_non_static_data_member): Remember the
3803         field's type even in a template.
3804
3805         PR c++/9415
3806         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
3807         already scoped.
3808
3809         PR c++/8545
3810         * parser.c (cp_parser_cast_expression): Be more tentative.
3811
3812 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3813
3814         * cp-tree.h (flagged_type_tree_s): Remove.
3815         (check_for_new_type): Likewise.
3816         * typeck2.c (check_for_new_type): Likewise.
3817
3818 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
3819
3820         * dump.c: ANSIfy function declarations and definitions.
3821
3822         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
3823
3824 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
3825
3826         PR c++/9354
3827         * init.c (build_new): Set the type of the new-expression, even
3828         when processing_templte_decl.
3829
3830         PR c++/9216
3831         * parser.c (cp_parser_primary_expression): Improve error message
3832         for templates used in an expression context.
3833
3834         PR c++/8696
3835         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
3836         parse when encountering "typedef".
3837
3838 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
3839
3840         * class.c, parser.c: ANSIfy function definitions and declarations.
3841
3842 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
3843
3844         PR c++/9328
3845         * error.c (dump_decl): For an OVERLOAD, just print the name of the
3846         function; it doesn't make sense to try to print its type.
3847         * semantics.c (finish_typeof): Issue errors about invalid uses.
3848
3849         PR c++/9298
3850         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
3851         function.
3852         (cp_parser_expression_statement): Use it.
3853         (cp_parser_explicit_instantiation): Likewise.
3854         * pt.c (do_decl_instantiation): Improve error handling logic.
3855
3856 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
3857
3858         PR c++/9384
3859         * parser.c (cp_parser_using_declaration): Issue error messages
3860         about name resolution failures here.
3861
3862         PR c++/9388
3863         * class.c (currently_open_derived_class): Use dependent_type_p.
3864         * cp-tree.h (dependent_type_p): New function.
3865         (dependent_template_arg_p): Likewise.
3866         (dependent_template_p): Likewise.
3867         (type_dependent_expression_p): Likewise.
3868         * parser.c (cp_parser_dependent_type_p): Remove.
3869         (cp_parser_value_dependent_type_p): Likewise.
3870         (cp_parser_type_dependent_expression_p): Likewise.
3871         (cp_parser_dependent_template_arg_p): Likewise.
3872         (cp_parser_dependent_template_id_p): Likewise.
3873         (cp_parser_dependent_template_p): Likewise.
3874         (cp_parser_diagnose_invalid_type_name): Replace
3875         cp_parser_dependent_type_p with dependent_type_p, etc.
3876         (cp_parser_primary_expresion): Likewise.
3877         (cp_parser_nested_name_specifier_opt): Likewise.
3878         (cp_parser_postfix_expression): Likewise.
3879         (cp_parser_unary_expression): Likewise.
3880         (cp_parser_template_name): Likewise.
3881         (cp_parser_class_name): Likewise.
3882         (cp_parser_lookup_name): Likewise.
3883         * pt.c (dependent_type_p): New function.
3884         (value_dependent_expression_p): Likewise.
3885         (type_dependent_expression_p): Likewise.
3886         (dependent_template_arg_p): Likewise.
3887         (dependent_template_id_p): Likewise.
3888         (dependent_template_p): Likewise.
3889
3890         PR c++/9285
3891         PR c++/9294
3892         * parser.c (cp_parser_simple_declaration): Return quickly when
3893         encountering errors.
3894
3895 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3896
3897         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
3898
3899 2003-01-17  Jason Merrill  <jason@redhat.com>
3900
3901         PR c++/9167, c++/9358
3902         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
3903
3904 2003-01-17  Jason Merrill  <jason@redhat.com>
3905
3906         PR c++/9342
3907         * call.c (build_conditional_expr): Always do lvalue-rvalue
3908         conversion.
3909
3910 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
3911
3912         PR c++/9294
3913         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
3914         * cp-tree.h (BASELINK_BINFO): Adjust.
3915         (BASELINK_FUNCTIONS): Likewise.
3916         (BASELINK_ACCESS_BINFO): Likewise.
3917         (tree_baselink): New structure.
3918         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
3919         (lang_tree_node): Add baselink.
3920         * decl.c (cp_tree_node_structure): Add BASELINK case.
3921         * search.c (build_baselink): Adjust.
3922         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
3923         test from TREE_LIST case.
3924
3925         PR c++/9272
3926         * parser.c (cp_parser_constructor_declarator_p): Do not assume
3927         that a constructor cannot be declared outside of its own class.
3928
3929         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
3930         be resolved, neither can the qualified name.
3931
3932         * rtti.c (get_pseudo_ti_desc): Fix thinko.
3933
3934 2003-01-16  Jason Merrill  <jason@redhat.com>
3935
3936         PR c++/8564
3937         * init.c (build_vec_init): Re-add maxindex parm.
3938         (perform_member_init, build_aggr_init): Pass it.
3939         (build_new_1): Pass it. Use an incomplete array type for full_type.
3940         * typeck.c (build_modify_expr): Pass it.
3941         * cp-tree.h: Adjust.
3942
3943 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
3944
3945         * cp-tree.h (tsubst_copy_and_build): New declaration.
3946         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
3947         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
3948         (tsubst_copy_and_build): New function.
3949
3950 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
3951
3952         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
3953         (PARTIAL_INSTANTIATION_P): Remove.
3954         (IMPLICIT_TYPENAME_P): Likewise.
3955         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
3956         (build_typename_type): Remove declaration.
3957         (parmlist_is_exprlist): Likewise.
3958         * decl.c (build_typename_type): Make it static, remove third
3959         parameter.
3960         (push_class_binding): Don't do implicit typename stuff.
3961         (make_typename_type): Likewise.
3962         (lookup_name_real): Likewise.
3963         (grokdeclarator): Don't try to convert declarations into
3964         initializations.  Don't do implicit typename stuff.
3965         (parmlist_is_exprlist): Remove.
3966         (xref_basetypes): Simplify.
3967         * decl2.c (grokfield): Don't try to convert declarations into
3968         initializations.
3969         (build_anon_union_vars): Do this while processing templates, too.
3970         (finish_anon_union): Likewise.
3971         * error.c (dump_type): Remove implicit typename handling.
3972         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
3973         (cp_parser_primary_expression): Correct handling of names not
3974         found by unqualified name lookup in templates.
3975         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
3976         of types when possible.
3977         (cp_parser_simple_declaration): Complain intelligently about some
3978         invalid declarations.
3979         (cp_parser_member_declaration): Likewise.
3980         (cp_parser_constructor_declarator_p): Don't check when we're in a
3981         function scope.
3982         * pt.c (instantiate_class_template): Remove
3983         PARTIAL_INSTANTIATION_P gunk.
3984         * search.c (lookup_field_r): Don't build implicit typenames.
3985         (marked_pushdecls_p): Don't enter dependent base types.
3986         (unmarked_pushdecls_p): Likewise.
3987         * semantics.c (begin_class_definition): Remove implicit typename
3988         stuff.
3989
3990 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
3991
3992         PR c++/9212
3993         * parser.c (cp_parser_direct_declarator): If accepting either
3994         abstract or named, the name must be an unqualified-id.
3995
3996 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3997
3998         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
3999
4000 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4001
4002         * decl2.c (check_classfn): Fix uninitialized warning.
4003         (build_anon_union_vars): Likewise.
4004         * pt.c (tsubst_copy): Likewise.
4005
4006 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
4007
4008         Further conform g++'s __vmi_class_type_info to the C++ ABI
4009         specification.
4010         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
4011         the specification.
4012         (class_hint_flags): Likewise.
4013
4014 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4015
4016         * config-lang.in: Add semantics.c to gtfiles.
4017         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
4018         (saved_scope): Likewise.
4019         (type_lookups): Remove.
4020         (deferred_access): New structure.
4021         (type_access_control): Remove.
4022         (save_type_access_control): Likewise.
4023         (reset_type_access_control): Likewise.
4024         (decl_type_access_control): Likewise.
4025         (push_deferring_access_checks): Declare.
4026         (resume_deferring_access_checks): Likewise.
4027         (stop_deferring_access_checks): Likewise.
4028         (pop_deferring_access_checks): Likewise.
4029         (get_deferred_access_checks): Likewise.
4030         (pop_to_parent_deferring_access_checks): Likewise.
4031         (perform_deferred_access_checks): Likewise.
4032         (perform_or_defer_access_check): Likewise.
4033         * decl.c (make_typename_type): Use perform_or_defer_access_check.
4034         (make_unbound_class_template): Likewise.
4035         (grokdeclarator): Don't call decl_type_access_control.
4036         * parser.c (cp_parser_context): Remove deferred_access_checks
4037         and deferring_access_checks_p fields.
4038         (cp_parser_context_new): Adjust.
4039         (cp_parser): Remove access_checks_lists.
4040         (cp_parser_defer_access_check): Remove.
4041         (cp_parser_start_deferring_access_checks): Remove.
4042         (cp_parser_stop_deferring_access_checks): Remove.
4043         (cp_parser_perform_deferred_access_checks): Remove.
4044         (cp_parser_nested_name_specifier_opt): Use new deferred access
4045         functions.
4046         (cp_parser_simple_declaration): Likewise.
4047         (cp_parser_template_id): Likewise.
4048         (cp_parser_function_definition): Likewise.
4049         (cp_parser_class_specifier): Likewise.
4050         (cp_parser_lookup_name): Likewise.
4051         (cp_parser_single_declaration): Likewise.
4052         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
4053         (cp_parser_parse_tentatively): Likewise.
4054         (cp_parser_parse_definitely): Likewise.
4055         (yyparse): Likewise.
4056         (cp_parser_init_declarator): Remove access_checks parameter.
4057         Use new deferred access functions.
4058         (cp_parser_function_definition_from_specifiers_and_declarator):
4059         Likewise.
4060         (cp_parser_class_head): Remove deferring_access_checks_p and
4061         saved_access_checks parameters.  Use new deferred access functions.
4062         (cp_parser_member_specification_opt): Don't call
4063         reset_type_access_control.
4064         * search.c (type_access_control): Remove.
4065         * semantics.c: Include "gt-cp-semantics.h".
4066         (deferred_type_access_control): Remove.
4067         (deferred_access_stack): New variable.
4068         (deferred_access_free_list): Likewise.
4069         (push_deferring_access_checks): New function.
4070         (resume_deferring_access_checks): Likewise.
4071         (stop_deferring_access_checks): Likewise.
4072         (pop_deferring_access_checks): Likewise.
4073         (get_deferred_access_checks): Likewise.
4074         (pop_to_parent_deferring_access_checks): Likewise.
4075         (perform_deferred_access_checks): New function, adapted from
4076         cp_parser_perform_deferred_access_checks.
4077         (perform_or_defer_access_check): New function, adapted from
4078         cp_parser_defer_access_check.
4079         (current_type_lookups): Remove.
4080         (deferred_type_access_control): Likewise.
4081         (decl_type_access_control): Likewise.
4082         (save_type_access_control): Likewise.
4083         (reset_type_access_control): Likewise.
4084         (begin_function_definition): Adjust.
4085         (begin_class_definiton): Likewise.
4086
4087 2003-01-13  Jason Merrill  <jason@redhat.com>
4088
4089         PR c++/8748
4090         * class.c (build_base_path): Take the address before calling save_expr.
4091
4092         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
4093         all the ambiguous conversions are bad.
4094
4095         * class.c (maybe_warn_about_overly_private_class): Don't stop
4096         searching when we find a nonprivate method.
4097
4098         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
4099
4100 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
4101
4102         * cp-tree.h (get_arglist_len_in_bytes): Remove.
4103
4104         PR c++/9264
4105         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
4106         typeame types more robustly.
4107
4108 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
4109
4110         * parser.c:  Fix comment typos.
4111
4112 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
4113
4114         PR c++/9099
4115         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
4116         an object_type which is not a class type.
4117
4118 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
4119
4120         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
4121         (cp_parser_late_parsing_default_args): Likewise.
4122
4123 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
4124
4125         * cfns.gperf: ANSIfy function declarations.
4126         * cfns.h: Regenerate.
4127         * cp-tree.h: ANSIfy function declarations.
4128
4129 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
4130
4131         * cp-tree.h (reparse_absdcl_as_expr): Remove.
4132         (reparse_absdcl_as_casts): Likewise.
4133         (reparse_decl_as_expr): Likewise.
4134         (finish_decl_parsing): Likewise.
4135         * decl2.c (reparse_absdcl_as_expr): Remove.
4136         (reparse_absdcl_as_casts): Likewise.
4137         (repase_decl_as_expr): Likewise.
4138         (finish_decl_parsing): Likewise.
4139
4140         PR c++/9128
4141         PR c++/9153
4142         PR c++/9171
4143         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
4144         function.
4145         (cp_parser_nested_name_specifier_opt): Correct the
4146         check_dependency_p false.
4147         (cp_parser_postfix_expression): Fix formatting.
4148         (cp_parser_decl_specifier_seq): Avoid looking for constructor
4149         declarators when possible.
4150         (cp_parser_template_id): Avoid performing name-lookup when
4151         possible.
4152         (cp_parser_class_head): Do not count specializations when counting
4153         levels of templates.
4154         (cp_parser_constructor_declarator_p): Return immediately if
4155         there's no chance that the tokens form a constructor declarator.
4156         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
4157         expression with reference type.
4158         (get_tinfo_decl_dynamic): Do not return an expression with
4159         reference type.
4160         (build_typeid): Add comment.  Do not return an expression with
4161         reference type.
4162         * typeck.c (build_class_member_access_expr): Improve handling of
4163         conditionals and comma-expressions as objects.
4164
4165 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
4166
4167         * cfns.gperf: ANSIfy function declarations.
4168         * cfns.h: Regenerate.
4169         * cp-tree.h: ANSIfy function declarations.
4170         * parser.c: ANSIfy function declarations & definitions.
4171
4172         * decl.c (bad_specifiers): Fix parameter order error I introduced.
4173
4174 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
4175
4176         Merge from pch-branch:
4177
4178         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
4179
4180         Merge to tag pch-merge-20030102:
4181
4182         * semantics.c (finish_translation_unit): Don't call finish_file.
4183         * parser.c: Don't include ggc.h.
4184         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
4185         read first token here.  Don't allow PCH files after the first
4186         token is read.
4187         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
4188         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
4189         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
4190         (cp_parser_late_parsing_for_member): Don't duplicate call to
4191         cp_lexer_set_source_position_from_token.
4192         (cp_parser_late_parsing_default_args): Likewise.
4193         (yyparse): Call finish_file after clearing the_parser.
4194
4195         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
4196
4197         * Make-lang.in: Remove $(GGC_H) from all dependencies.
4198         (CXX_TREE_H): Add $(GGC_H).
4199         * class.c: Don't include ggc.h.
4200         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
4201         (method_name_cmp): Likewise.
4202         (resort_data): New variable.
4203         (resort_field_decl_cmp): New.
4204         (resort_method_name_cmp): New.
4205         (resort_sorted_fields): New.
4206         (resort_type_method_vec): New.
4207         (finish_struct_methods): Delete cast.
4208         (finish_struct_1): Delete cast.
4209         * cp-tree.h: Include ggc.h.
4210         (struct lang_type_class): Add reorder attribute to field `methods'.
4211         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
4212         (resort_sorted_fields): New prototype.
4213         (resort_type_method_vec): New prototype.
4214         * call.c: Don't include ggc.h.
4215         * decl.c: Likewise.
4216         * decl2.c: Likewise.
4217         * init.c: Likewise.
4218         * lex.c: Likewise.
4219         * method.c: Likewise.
4220         * optimize.c: Likewise.
4221         * parse.y: Likewise.
4222         * pt.c: Likewise.
4223         * repo.c: Likewise.
4224         * search.c: Likewise.
4225         * semantics.c: Likewise.
4226         * spew.c: Likewise.
4227         * tree.c: Likewise.
4228
4229         * lang-specs.h: Remove comment.
4230
4231         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
4232
4233         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
4234         (operator_name_info): Mark to be saved for PCH, specify size.
4235         (assignment_operator_name_info): Likewise.
4236
4237         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
4238
4239         * decl.c (anon_cnt): Mark to be saved for PCH.
4240
4241         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
4242
4243         * lex.c  (init_reswords): Delete now-untrue comment.
4244         Allocate ridpointers using GGC.
4245
4246         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
4247
4248         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
4249
4250         * g++spec.c (lang_specific_driver): Don't include standard
4251         libraries in `added'.
4252
4253         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
4254
4255         * decl2.c (finish_file): Call c_common_write_pch.
4256         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
4257
4258         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
4259
4260         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
4261         files when using g++.
4262         * lang-specs.h: Handle compiling C++ header files.
4263
4264 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
4265
4266         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
4267
4268 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4269
4270         * pt.c (push_access_scope_real): Call push_to_top_level for
4271         function in namespace scope.
4272         (pop_access_scope): Call pop_from_top_level for function in
4273         namespace scope.
4274
4275 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
4276
4277         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
4278
4279 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
4280
4281         * Make-lang.in (c++.install-common, c++.install-man,
4282         c++.uninstall): Prepend $(DESTDIR) to destination paths in
4283         all (un)installation commands.
4284         (c++.install-common): Rewrite $(LN) commands to support
4285         DESTDIR with "ln" as well as with "ln -s".
4286
4287 2003-01-08  Jason Merrill  <jason@redhat.com>
4288
4289         * parser.c (cp_parser_primary_expression): See through explicitly
4290         scoped ALIAS_DECLs, too.
4291
4292 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
4293
4294         * decl.c: Remove some #if 0 code.
4295
4296         * decl.c: ANSIfy function declarations.
4297
4298 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
4299
4300         * parser.c (cp_parser_asm_definition): Correct handling of omitted
4301         operands.
4302
4303 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4304
4305         PR c++/9030
4306         * decl.c (make_typename_type): Check access only when tf_error.
4307         (make_unbound_class_template): Likewise.
4308         * pt.c (saved_access_scope): New variable.
4309         (push_access_scope_real): New function.
4310         (push_access_scope): Likewise.
4311         (pop_access_scope): Likewise.
4312         (tsubst_default_argument): Use them.
4313         (instantiate_template): Likewise.
4314         (regenerate_decl_from_template): Likewise.
4315         (instantiate_decl): Likewise.
4316         (get_mostly_instantiated_function_type): Likewise.
4317
4318 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
4319
4320         * tree.c: Delete bogus #if 0 code.
4321
4322 2003-01-07  Andreas Schwab  <schwab@suse.de>
4323
4324         * class.c (layout_class_type): Don't use
4325         PCC_BITFIELD_TYPE_MATTERS if not defined.
4326
4327 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
4328
4329         PR c++/9165
4330         * decl2.c (build_cleanup): Mark the object as used.
4331
4332         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
4333         (hash_local_specialization): New function.
4334         (register_local_specialization): Revert 2003-01-05 change.
4335         (instantiate_decl): Use hash_local_specialization when creating
4336         the local_specializations table.
4337
4338         * decl2.c (mark_used): Do not synthesize thunks.
4339
4340         * class.c (layout_class_type): Correct handling of unnamed
4341         bitfields wider than their types.
4342
4343         PR c++/9189
4344         * parser.c (cp_parser): Remove default_arg_types.  Update
4345         documentation for unparsed_functions_queues.
4346         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
4347         parameter.
4348         (cp_parser_new): Don't set parser->default_arg_types.
4349         (cp_parser_function_definition): Adjust usage of
4350         unparsed_funtions_queues.
4351         (cp_parser_class_specifier): Don't mess with
4352         parser->default_arg_types.  Handle default argument processing in
4353         a separate phase from function body processing.
4354         (cp_parser_template_declaration_after_export): Adjust usage of
4355         unparsed_functions_queues.
4356         (cp_parser_late_parsing_for_member): Do not handle default
4357         arguments.
4358
4359 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
4360
4361         PR c++/9109
4362         * parser.c (cp_parser_declarator_kind): New enum.
4363         (cp_parser_declarator): Adjust.
4364         (cp_parser_direct_declarator): Adjust. Allow for either named or
4365         abstract declarator. Prefer abstract, if possible. Allow
4366         parenthesized function name.
4367         (cp_parser_condition): Adjust cp_parser_declarator call.
4368         (cp_parser_explicit_instantiation): Likewise.
4369         (cp_parser_init_declarator): Likewise.
4370         (cp_parser_type_id): Likewise.
4371         (cp_parser_function_definition): Likewise.
4372         (cp_parser_member_declaration): Likewise.
4373         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
4374         the tentative parsing.
4375         (cp_parser_exception_declaration): Likewise.
4376
4377 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
4378
4379         * parser.c (cp_parser_template_parameter): Adjust call to
4380         cp_parser_parameter_declaration.
4381         (cp_parser_parameter_declaration_list): Likewise.
4382         (cp_parser_parameter_declaration): Replace
4383         greater_than_is_operator_p with template_parm_p parameter.  Do not
4384         cache tokens for template default arguments.
4385
4386         * pt.c (retrieve_local_specialization): Use htab_find, not
4387         htab_find_with_hash.
4388         (register_local_specialization): Use htab_find_slot, not
4389         htab_find_slot_with_hash.
4390         (instantiate_decl): Pass a hash function to htab_create.
4391
4392 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4393
4394         * parser.c (cp_parser_binary_expression,
4395         cp_parser_multiplicative_expression,
4396         cp_parser_additive_expression, cp_parser_shift_expression,
4397         cp_parser_relational_expression, cp_parser_equality_expression,
4398         cp_parser_and_expression, cp_parser_exclusive_or_expression,
4399         cp_parser_inclusive_or_expression,
4400         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
4401         cp_parser_binary_expression): Const-ify.
4402
4403 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
4404
4405         * method.c (use_thunk): Disable access control while building the
4406         body of the thunk.
4407
4408 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
4409
4410         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
4411         front end.
4412
4413 2003-01-03  Matt Austern  <austern@apple.com>
4414
4415         * cp-tree.h (struct lang_type_class): add field for key method
4416         (cp_global_trees): rename dynamic_classes to keyed_classes
4417         (key_method): add definition
4418         * class.c (finish_struct_1): compute class's key method, and add
4419         the class to keyed_classes list if there is no key method.
4420         * decl.c (finish_function): add class to keyed_classes list if we
4421         see a definition of the class's key method.
4422         * pt.c (instantiate_class_template): add template specialization
4423         of a dynamic class to keyed_classes list.
4424         * decl2.c (key_method): remove
4425         (finish_file): iterate only through keyed_classes list when
4426         deciding whether to emit vtables, remove class from its list after
4427         we do the emission.
4428
4429 2003-01-02  Jason Merrill  <jason@redhat.com>
4430
4431         * call.c (build_conditional_expr): Stabilize lvalues properly.
4432         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
4433         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
4434         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
4435
4436         * call.c (convert_like_real): Call decl_constant_value for an
4437         IDENTITY_CONV even if there are no more conversions.
4438
4439         * cvt.c (build_up_reference): Don't push unnamed temps.
4440
4441         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
4442
4443         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
4444         for a backend struct.
4445
4446         * except.c (wrap_cleanups_r, build_throw): Make
4447         MUST_NOT_THROW_EXPRs void.
4448         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
4449
4450         * init.c (build_vec_delete_1): Pre-evaluate the base address.
4451
4452         * init.c (get_temp_regvar): Simplify logic.
4453
4454         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
4455         our replacement is a decl.
4456
4457         * decl.c (cp_make_fname_decl): Push the decls inside the
4458         outermost scope.
4459
4460 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
4461
4462         PR c++/45, c++/3784
4463         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
4464         the same too.
4465
4466 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
4467
4468         * parser.c (struct cp_parser): Add access_checks_lists field
4469         (cp_parser_simple_declaration): Use.
4470         (cp_parser_init_declarator): Likewise.
4471
4472 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
4473
4474         * parser.c (cp_parser_declaration): Accept the __extension__
4475         keyword before the declaration.
4476
4477         PR c++/2843
4478         * parser.c (cp_parser_parameter_declaration): Allow attributes to
4479         appear after the declarator.
4480
4481         * call.c (build_new_method_call): Fix typo in message format
4482         string.
4483
4484 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
4485
4486         * parser.c (cp_lexer_next_token_is): Declare it inline.
4487         (cp_lexer_set_source_position_from_token): Likewise.
4488         (cp_lexer_debugging_p): Likewise.
4489         (cp_parser_parsing_tentatively): Likewise.
4490         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
4491         to the cp_lexer_peek_token.
4492
4493         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
4494         expression.
4495
4496 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
4497
4498         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
4499         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
4500         cp/repo.c: Fix copyright years.
4501
4502 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
4503
4504         * lex.c: Remove superfluous include of cpplib.h.
4505         (CONSTRAINT): Define without conditions.
4506         (init_cp_pragma): Use c_register_pragma.
4507
4508 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
4509
4510         * .cvsignore: Remove.
4511
4512 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4513
4514         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
4515           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
4516           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
4517           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
4518           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
4519           copyright header.
4520         * lex.h: parse.y is dead, so don't mention it.  Also replace the
4521           copyright header with the default GNU copyright header.
4522
4523 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
4524
4525         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
4526         (lookup_name_namespace_only): Likewise.
4527         (begin_only_namespace_names): Likewise.
4528         (end_only_namespace_names): Likewise.
4529         * decl.c (only_namespace_names): Remove.
4530         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
4531         (lookup_name_real): Do not check only_namespace_names.
4532         (lookup_name_namespace_only): Remove.
4533         (begin_only_namespace_names): Likewise.
4534         (end_only_namespace_names): Likewise.
4535         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
4536         nested-name-specifiers more gracefully.
4537         (cp_parser_class_or_namespace_name): Avoid looking up namespace
4538         names when they cannot possibly appear.
4539         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
4540         (cp_parser_elaborated_type_specifier): Likewise.
4541         (cp_parser_namespace_name): Only look for namespace names.
4542         (cp_parser_lookup_name): Add is_namespace parameter.
4543         (cp_parser_lookup_name_simple): Adjust call to
4544         cp_parser_lookup_name.
4545
4546         * parser.c (cp_parser_dependent_type_p): Fix thinko.
4547
4548 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
4549
4550         * .cvsignore: Update.
4551
4552 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
4553
4554         * class.c (modify_vtable_entry): Remove unused variable.
4555         (get_vcall_index): Always expect a non-thunk.
4556         (update_vtable_entry_for_fn): Combine covariant adjustments, when
4557         overriding a thunk. Pass get_vcall_index a non-thunk.
4558
4559         * decl2.c (finish_file): Mark undefined inlines as extern.
4560
4561 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
4562
4563         * cp-tree.def (RETURN_INIT): Remove.
4564         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
4565         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
4566         (note_level_for_for): Remove.
4567         (note_level_for_try): Likewise.
4568         (note_level_for_catch): Likewise.
4569         (finish_named_return_value): Likewise.
4570         (do_pushlevel): Change prototype.
4571         (pending_lang_change): Remove.
4572         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
4573         sk_for.
4574         (note_level_for_for): Remove.
4575         (note_level_for_try): Likewise.
4576         (note_level_for_catch): Likewise.
4577         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
4578         * parser.c (cp_parser_context_free_list): Make it "deletable".
4579         (cp_parser_template_argument): Remove misleading comment.
4580         * pt.c (tsubst_expr): Remove RETURN_INIT code.
4581         * semantics.c (genrtl_named_return_value): Remove.
4582         (do_pushlevel): Take a scope kind as an argument.
4583         (begin_if_stmt): Adjust.
4584         (begin_while_stmt): Likewise.
4585         (begin_for_stmt): Likewise.
4586         (finish_for_init_stmt): Likewise.
4587         (begin_switch_stmt): Likewise.
4588         (begin_handler): Likewise.
4589         (begin_compound_stmt): Likewise.
4590         (finish_named_return_value): Remove.
4591         (cp_expand_stmt): Remove RETURN_INIT case.
4592         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
4593
4594 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
4595
4596         PR c++/9112
4597         * parser.c (cp_parser_direct_declarator): Handle erroneous
4598         parenthesized declarators correctly.
4599
4600 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4601
4602         * cp-tree.h (pending_lang_change): Declare.
4603
4604 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
4605
4606         * parser.c (cp_parser_context_free_list): New variable.
4607         (cp_parser_context_new): Use it.
4608         (cp_parser_error): Check return code from
4609         cp_parser_simulate_error.
4610         (cp_parser_simulate_error): Return a value.
4611         (cp_parser_id_expression): Optimize common case.
4612         (cp_parser_class_name): Likewise.
4613         (cp_parser_class_specifier): Adjust call to
4614         cp_parser_late_parsing_default_args.
4615         (cp_parser_lookup_name): Optimize common case.
4616         (cp_parser_late_parsing_for_member): Adjust call to
4617         cp_parser_late_parsing_default_args.
4618         (cp_parser_late_parsing_default_args): Add scope parameter.
4619         (cp_parser_require): Avoid creating the error message unless it's
4620         needed.
4621         (cp_parser_parse_definitely): Place free'd contexts on the free
4622         list.
4623
4624         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
4625
4626 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
4627
4628         * parser.c (cp_parser_parameter_declaration_clause): Treat system
4629         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
4630
4631 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
4632
4633         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
4634         GCC, not GNU CC.
4635
4636 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
4637
4638         * parse.y: Remove.
4639         * spew.c: Likewise.
4640         * Make-lang.in (gt-cp-spew.h): Remove.
4641         * cp-tree.h (do_pending_lang_change): Remove.
4642         (do_identifier): Change prototype.
4643         (finish_id_expr): Remove.
4644         * decl.c (lookup_name_real): Remove yylex variable.
4645         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
4646         * lex.c (init_cpp_parse): Remove.
4647         (reduce_cmp): Likewise.
4648         (token_cmp): Likewise.
4649         (yychar): Likewise.
4650         (lastiddecl): Likewise.
4651         (token_count): Likewise.
4652         (reduce_count): Likewise.
4653         (yyhook): Likewise.
4654         (print_parse_statistics): Likewise.
4655         (do_pending_lang_change): Likewise.
4656         (do_identifier): Remove parsing parameter.
4657         * lex.h (lastiddecl): Remove.
4658         (looking_for_typename): Remove.
4659         (looking_for_template): Likewise.
4660         (pending_lang_change): Likewise.
4661         (yylex): Likewise.
4662         * semantics.c (finish_id_expr): Remove.
4663
4664         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
4665         thread" correctly.
4666
4667 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
4668
4669         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
4670         end, not the C front end.
4671
4672 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
4673
4674         * cp-tree.h (THUNK_TARGET): New macro.
4675         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
4676         (finish_thunk): Remove offset parms.
4677         * class.c (find_final_overrider): Look through thunks.
4678         (get_vcall_index): Use THUNK_TARGET.
4679         (update_vtable_entry_for_fn): Look through thunks. Set covariant
4680         fixed offset here. Adjust finish_thunk call.
4681         (build_vtbl_initializer): Adjust finish_thunk calls.
4682         * mangle.c (mangle_call_offset): Remove superfluous if.
4683         (mangle_thunk): Adjust.
4684         * method.c (make_thunk): Adjust.
4685         (finish_thunk): Adjust.
4686         (thunk_adjust): Remove assert.
4687         (use_thunk): Use THUNK_TARGET
4688         * dump1.c (cp_dump_tree): Adjust thunk dumping.
4689
4690         PR c++/9054
4691         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
4692         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
4693
4694 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4695
4696         Remove traditional C constructs 4/n.
4697         * decl2.c (grok_method_quals, warn_if_unknown_interface,
4698         grok_x_components, cp_build_parm_decl, build_artificial_parm,
4699         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
4700         delete_sanity, check_member_template, check_java_method,
4701         check_classfn, finish_static_data_member_decl, grokfield,
4702         grokbitfield, grokoptypename, grok_function_init,
4703         cplus_decl_attributes, constructor_name, defer_fn,
4704         build_anon_union_vars, finish_anon_union, coerce_new_type,
4705         coerce_delete_type, comdat_linkage, maybe_make_one_only,
4706         key_method, import_export_vtable, import_export_class,
4707         output_vtable_inherit, import_export_decl, import_export_tinfo,
4708         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
4709         set_guard, start_objects, finish_objects,
4710         start_static_storage_duration_function,
4711         finish_static_storage_duration_function, get_priority_info,
4712         start_static_initialization_or_destruction,
4713         finish_static_initialization_or_destruction,
4714         do_static_initialization, do_static_destruction,
4715         prune_vars_needing_no_initialization, write_out_vars,
4716         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
4717         add_using_namespace, merge_functions, ambiguous_decl,
4718         lookup_using_namespace, lookup_using_namespace,
4719         qualified_lookup_using_namespace, set_decl_namespace,
4720         decl_namespace, current_decl_namespace, push_decl_namespace,
4721         pop_decl_namespace, push_scope, pop_scope, add_function,
4722         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
4723         lookup_arg_dependent, do_namespace_alias,
4724         validate_nonmember_using_decl, do_nonmember_using_decl,
4725         do_toplevel_using_decl, do_local_using_decl,
4726         do_class_using_decl, do_using_directive, check_default_args,
4727         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
4728         * parser.c (cp_parser_class_head): Use booleanss.
4729         * decl.c (walk_globals, walk_vtables): Likewise.
4730         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
4731         walk_globals): Change return type from 'int' to 'bool'.
4732         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
4733         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
4734         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
4735         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
4736         qualifier_flags, tinfo_base_init, generic_initializer,
4737         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
4738         dfs_class_hint_unmark, class_hint_flags, class_initializer,
4739         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
4740         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
4741         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
4742         * repo.c (repo_compile_flags, repo_template_declared,
4743         repo_template_defined, repo_class_defined, repo_get_id,
4744         repo_template_used, repo_vtable_used, repo_inline_used,
4745         repo_tinfo_used, repo_template_instantiated, extract_string,
4746         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
4747         finish_repo): Likewise.
4748         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
4749         cxx_print_xnode): Likewise..
4750         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
4751         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4752         * cxxfilt.c (demangle_it, print_demangler_list, usage,
4753         standard_symbol_characters, hp_symbol_characters, main, fatal):
4754         Likewise.
4755         (strip_underscore):  Change type from 'int' to 'bool'.
4756         (main): Use boolean constants.
4757
4758 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4759
4760         Remove traditional C constructs 3/n.
4761         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
4762         build_up_reference, warn_ref_binding, convert_to_reference,
4763         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
4764         convert_to_void, convert, convert_force, build_type_conversion,
4765         build_expr_type_conversion, type_promotes_to,
4766         perform_qualification_conversions): Use C90 prototyping style.
4767         * decl2.c (grok_array_decl): Use boolean constant.
4768         (delete_sanity): Likewise.
4769         * typeck.c (build_unary_op): Likewise.
4770         * semantics.c (finish_switch_cond): Likewise.
4771         * parser.c (cp_parser_direct_new_declarator): Likewise.
4772         * init.c (build_new): Likewise.
4773
4774 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
4775
4776         * Make-lang.in (po-generated): Remove parse.c.
4777         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
4778         ($(srcdir)/cp/parse.h): Remove target.
4779         ($(srcdir)/cp/parse.c): Likewise.
4780         (gt-cp-parse.h): Likewise.
4781         (gt-cp-parser.h): New target.
4782         (c++.distclean): Do not remove parse.output.
4783         (c++.maintainer-clean): Do not remove parse.c or parse.h.
4784         (cp/spew.o): Remove target.
4785         (cp/lex.o): Adjust dependencies.
4786         (cp/pt.o): Likewise.
4787         (cp/parse.o): Likewise.
4788         (cp/TAGS): Do not mention parse.c.
4789         (cp/parser.o): New target.
4790         * NEWS: Mention the new parser.
4791         * call.c (build_scoped_method_call): Simplify.
4792         (build_method_call): Likewise.
4793         (build_new_function_call): Adjust calls to add_function_candidate
4794         and add_template_candidate.
4795         (build_new_op): Improve handling of erroroneous operands.
4796         (convert_default_arg): Remove circular argument processing.
4797         (name_as_c_string): New function.
4798         (build_new_method_call): Use it.
4799         (perform_implicit_conversion): Use error_operand_p.
4800         * class.c (finish_struct_anon): Use constructor_name_p.
4801         (check_field_decls): Likewise.
4802         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
4803         (resolve_address_of_overloaded_function): Likewise.
4804         (instantiate_type): Tweak pointer-to-member handling.
4805         (get_primary_binfo): Remove incorrect assertion.
4806         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
4807         * cp-tree.h (DEFARG_TOKENS): New macro.
4808         (default_arg): New structure.
4809         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
4810         (lang_tree_node): Add default_arg.
4811         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
4812         (type_info_ref_type): New macro.
4813         (saved_scope): Make processing_explicit_instantiation a boolean.
4814         (check_access): New field.
4815         (unparsed_text): Remove.
4816         (language_function): Remove unparsed_inlines.
4817         (error_operand_p): New macro.
4818         (lang_decl): Adjust pending_inline_info.
4819         (DEFARG_POINTER): Remove.
4820         (tag_types): Add typenames.
4821         (lookup_ualified_name): Declare.
4822         (lookup_name_real): Likewise.
4823         (shadow_tag): Adjust prototype.
4824         (get_scope_of_declarator): Declare it.
4825         (process_next_inline): Remove it.
4826         (check_for_missing_semicolon): Likewise.
4827         (maybe_get_template_decl_from_type_decl): Declare it.
4828         (finish_label_stmt): Adjust prototype.
4829         (finish_non_static_data_meber): Declare it.
4830         (finish_pseudo_destructor_call_expr): Rename to ...
4831         (finish_pseudo_destructor_expr): ... this.
4832         (finish_compound_literal): Declare it.
4833         (begin_inline_definitions): Remove it.
4834         (init_spew): Remove.
4835         (peekyylex): Likewise.
4836         (arbitrate_lookup): Likewise.
4837         (frob_opname): Likewise.
4838         (maybe_snarf_defarg): Likewise.
4839         (add_defarg_fn): Likewise.
4840         (do_pending_defargs): Likewise.
4841         (done_pending_defargs): Likewise.
4842         (unprocessed_defarg_fn): Likewise.
4843         (replace_defarg): Likewise.
4844         (end_input): Likewise.
4845         (get_overloaded_fn): Likewise.
4846         * cvt.c (convert_to_reference): Improve error handling.
4847         * decl.c (lookup_name_real): Do not declare it static.
4848         (maybe_push_to_top_level): Set check_access.
4849         (identifier_type_value): Adjust call to lookup_name_real.
4850         (lookup_qualified_name): New method.
4851         (lookup_name_real): Remove special-case parsing code.
4852         (lookup_name-nonclass): Adjust call to lookup_name_real.
4853         (lookup_name_namespace_only): Likewise.
4854         (lookup_name): Likewise.
4855         (check_tag_decl): Return the type declared.
4856         (shadow_tag): Likewise.
4857         (register_dtor_fn): Tweak check_access.
4858         (grokfndecl): Use constructor_name_p.
4859         (get_scope_of_declarator): New function.
4860         (grokdeclarator): Obscure tweaks for slightly different declarator
4861         representations.
4862         (start_method): Return error_mark_node to indicate failure.
4863         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
4864         * decl2.c (constructor_name_full): Simplify.
4865         (constructor_name): Use it.
4866         (build_expr_from_tree): Adjust for changes to do new parser.
4867         (push_scope): Improve robustness.
4868         (validate_nonmember_using_decl): Process declarations, not names.
4869         (do_class_using_decl): Likewise.
4870         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
4871         here.
4872         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
4873         * expr.c (cxx_expand_expr): Handle BASELINKs.
4874         * init.c (member_init_ok_or_else): Issue more errors.
4875         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
4876         * lex.c: Do not include parse.h.
4877         (yypring): Do not declare.
4878         (yylval): Likewise.
4879         (make_reference_declarator): Remove error-generating code.
4880         (rid_to_yy): Remove.
4881         (cxx_init): Do not call init_spew.
4882         (yypring): Remove.
4883         (check_for_missing_semicolon): Remove.
4884         * lex.h (got_scope): Remove.
4885         (got_object): Remove.
4886         * method.c (hack_identifier): Use finish_non_static_data_member.
4887         (implicitly_declare_fn): Adjust use of constructor_name.
4888         * parser.c: New file.
4889         * pt.c (parse.h): Do not include it.
4890         (maybe_get_template_decl_from_template): Do not declare it.
4891         (finish_member_template_decl): Tweak.
4892         (begin_explicit_instantiation): Adjust for
4893         processing_explicit_instantiation being boolean.
4894         (end_explicit_instantiation): Likewise.
4895         (maybe_process_partial_specialization): Tighten specialization
4896         test.
4897         (retrieve_local_specialization): Adjust ue of hash table.
4898         (eq_local_specializations): New function.
4899         (register_local_specialization): Likewise.
4900         (push_template_decl_real): Remove unnecessary test.
4901         (maybe_get_template_decl_from_type_decl): Don't make it static.
4902         (for_each_template_parm_r): Handle TYPEOF_TYPE.
4903         (tsubst_copy): Use retrieive_local_specialization to handle
4904         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
4905         Handle COMPONENT_REFs with pseudo-destructor-expressions.
4906         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
4907         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
4908         (unify): Tweak handling of CONST_DECLs.
4909         (regenerate_decl_from_template): Use push_nested_class.
4910         (template_for_substitution): New funciton.
4911         (instantiate_decl): Use it.  Register parameters as local
4912         specializations.
4913         * rtti.c (init_rtti_processing): Set type_info_ref_type.
4914         (build_typeid): Use it.
4915         (get_typeid): Likeise.
4916         * search.c (accessible_p): Use check_access, not
4917         flag_access_control.
4918         (adjust_result_of_qualified_name_lookup): Pay attention to the
4919         context_class.
4920         * semantics.c (finish_asm_stmt): Adjust error handling.
4921         (finish_label_stmt): Return the statement.
4922         (finish_non_static_data_member): New function.
4923         (finish_class_expr): Handle BASELINKs.
4924         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
4925         (finish_object_call_expr): Simplify handling during templates.
4926         (finish_pseudo_destructor_call_expr): Rename to ...
4927         (finish_pseudo_dtor_expr): ... this.
4928         (finish_compound_literal): New function.
4929         (begin_inline_definitions): Remove.
4930         (finish_sizeof): Remove special template handling.
4931         * spew.c: Do not include parse.h.
4932         * tree.c (get_overloaded_fn): Remove.
4933         * typeck.c (build_class_member_access_expr): Handle
4934         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
4935         (lookup_destructor): New function.
4936         (finish_class_member_access_expr): Use it.
4937         (convert_arguments): Simplify.
4938         (build_unary_op): Handle BASELINKs.
4939
4940 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
4941
4942         PR c++/4803
4943         * decl2.c (mark_used): Defer inline functions.
4944         (finish_file): Merge deferred_fns loops. Check all used
4945         inline functions have a definition.
4946         * method.c (make_thunk): Thunks are not inline.
4947
4948         PR c++/5116, c++/764
4949         * call.c (build_new_op): Make sure template class operands are
4950         instantiated.
4951
4952 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
4953
4954         PR C++/7964
4955         * cp-tree.h (resolve_scoped_fn_name): Prototype.
4956         * call.c (resolve_scoped_fn_name): New function. Deal with
4957         more template expansion. Broken out of ...
4958         * parse.y (parse_finish_call_expr): ... here. Call it.
4959         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
4960         resolve_scoped_fn_name and build_call_from_tree.
4961
4962         PR c++/9053
4963         * decl.c (duplicate_decls): Templates may be disambiguated by
4964         return type.
4965
4966         PR c++/8702
4967         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
4968         conversion operators on failure.
4969
4970 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4971
4972         Remove traditional C constructs 2/n.
4973         * call.c (tourney, build_field_call, equal_functions, joust,
4974         compare_ics, build_over_call, build_java_interface_fn_ref,
4975         convert_like_real, op_error, build_object_call, resolve_args,
4976         build_vfield_ref, check_dtor_name, build_scoped_method_call,
4977         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
4978         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
4979         standard_conversion, reference_related_p,
4980         reference_compatible_p, convert_class_to_reference,
4981         direct_reference_binding, reference_binding,
4982         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
4983         add_template_conv_candidate, any_viable, any_strictly_viable,
4984         build_this, splice_viable, print_z_candidates,
4985         build_user_type_conversion, build_new_function_call,
4986         conditional_conversion, build_conditional_expr, build_new_op,
4987         build_op_delete_call, enforce_access, call_builtin_trap,
4988         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
4989         convert_default_arg, type_passed_as, convert_for_arg_passing,
4990         in_charge_arg_for_name, is_properly_derived_from,
4991         maybe_handle_implicit_object, maybe_handle_ref_bind,
4992         source_type, add_warning, can_convert, can_convert_arg,
4993         perform_implicit_conversion, can_convert_arg_bad,
4994         initialize_reference, add_conv_candidate,
4995         add_template_candidate_real, add_template_candidate): Ansify.
4996
4997 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
4998
4999         PR c++/8572
5000         * cp-tree.h (grokoptypename): Add SCOPE parameter.
5001         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
5002         if in a template scope.
5003         * parse.y (unoperator): Return the scope.
5004         (operator_name): Adjust grokoptypename call.
5005
5006 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5007
5008         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
5009         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
5010         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
5011
5012 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
5013
5014         * ChangeLog: Fix a typo.
5015         * class.c: Fix comment typos.
5016         * cp-tree.h: Likewise.
5017
5018 2002-12-18  Jason Merrill  <jason@redhat.com>
5019
5020         Handle anonymous unions at the tree level.
5021         C++ ABI change: Mangle anonymous unions using the name of their
5022         first named field (by depth-first search).  Should not cause
5023         binary compatibility problems, though, as the compiler previously
5024         didn't emit anything for affected unions.
5025         * cp-tree.def (ALIAS_DECL): New tree code.
5026         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
5027         first field, not the largest.
5028         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
5029         push the decl, and write it out at namespace scope.
5030         * decl.c (lookup_name_real): See through an ALIAS_DECL.
5031         (pushdecl): Add namespace bindings for ALIAS_DECLs.
5032         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
5033         of a decl which doesn't have one.
5034         * typeck.c (build_class_member_access_expr): Don't recurse if
5035         we already have the type we want.
5036
5037 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5038
5039         PR c++/8099
5040         * friend.c (make_friend_class): Allow partial specialization
5041         when declaration is not a template friend.
5042
5043 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5044
5045         PR c++/3663
5046         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
5047         TREE_PROTECTED to created decl nodes.
5048
5049 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
5050
5051         * class.c (build_base_field): Do not set DECL_PACKED on the
5052         FIELD_DECL.
5053
5054 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5055
5056         * cp-tree.h (struct tree_srcloc): Use location_t.
5057         (SOURCE_LOCUS): New.
5058         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
5059
5060 2002-12-17  Jason Merrill  <jason@redhat.com>
5061
5062         * decl.c (finish_function): Also complain about no return in
5063         templates.
5064         * semantics.c (finish_return_stmt): Also call check_return_expr in
5065         templates.
5066         * typeck.c (check_return_expr): In a template, just remember that we
5067         saw a return.
5068
5069 2002-12-16  Jason Merrill  <jason@redhat.com>
5070
5071         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
5072         of the CALL_EXPR.
5073
5074         * semantics.c (do_pushlevel): Call pushlevel after adding the
5075         SCOPE_STMT.
5076         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
5077         * parse.y (function_body): Go back to using compstmt.
5078         * decl.c (pushdecl): Skip another level to get to the parms level.
5079
5080         * call.c (build_new_method_call): Use is_dummy_object to determine
5081         whether or not to evaluate the object parameter to a static member
5082         function.
5083
5084 2002-12-14  Jason Merrill  <jason@redhat.com>
5085
5086         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
5087         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
5088         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
5089         don't bother with an AGGR_INIT_EXPR.
5090         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
5091         just generate a new decl normally.  Take return slot parm.
5092         * cp-tree.h: Adjust prototype.
5093
5094 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5095
5096         PR C++/8031
5097         * cvt.c (convert_to_pointer_force): Don't try comparing against
5098         erronous type.
5099
5100 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
5101
5102         * cp-tree.h: Have the multiple-include guards around
5103         the entire file.
5104
5105 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
5106
5107         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
5108         for SPEW_DEBUG.
5109         (snarf_method): Same.
5110         (snarf_defarg): Same.
5111
5112 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
5113
5114         PR c++/8372
5115         * pt.c (tsubst_copy): Handle destructor names more correctly.
5116
5117 2002-12-10  Matt Austern   <austern@apple.com>
5118
5119         * cp-tree.h: get rid of needs_virtual_reinit bit.
5120
5121 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
5122
5123         * NEWS: Document removal of in-class initialization extension for
5124         static data members of non-arithmetic, non-enumeration type.
5125         * decl.c (check_static_variable_definition): Do not allow that
5126         extension.
5127         * decl2.c (grokfield): Do not call digest_init when processing
5128         templates.
5129
5130 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5131
5132         * error.c (dump_expr): Fix format specifier warning.
5133
5134 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
5135
5136         * class.c (finish_struct_1): Correct comment.
5137         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
5138
5139 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5140
5141         PR C++/8799
5142         * error.c (dump_expr): Don't ever try to dump a non-existent
5143         expression.
5144
5145 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
5146
5147         Implement covariant returns.
5148         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
5149         (struct lang_decl_flags): Add this_thunk_p flag.
5150         Rename vcall_offset to virtual_offset.
5151         (struct lang_decl): Rename delta to fixed_offset.
5152         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
5153         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
5154         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
5155         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
5156         (make_thunk): Add this_adjusting arg.
5157         (finish_thunk): Declare.
5158         (mangle_thunk): Add this_adjusting arg.
5159         * class.c (get_vcall_index): Use base function for lookup.
5160         (update_vtable_entry_for_fn): Generate covariant thunk.
5161         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
5162         (build_vtbl_initializer): Use base function for lookup.
5163         Finish covariant thunk here. Adjust thunk generation.
5164         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
5165         Adjust thunk dumping.
5166         * mangle.c (mangle_call_offset): New function.
5167         (mangle_thunk): Adjust for covariant thunks.
5168         * method.c (make_thunk): Adjust. Do not set name here.
5169         (finish_thunk): New function. Set name here.
5170         (use_thunk): Generate covariant thunks too.
5171         (thunk_adjust): New function.
5172         * search.c (covariant_return_p): Remove. Fold into ...
5173         (check_final_overrider): ... here. Simplify.
5174         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
5175
5176 2002-12-03  Jason Merrill  <jason@redhat.com>
5177
5178         PR c++/8674
5179         * call.c (build_over_call): Check specifically for TARGET_EXPR
5180         when eliding.
5181
5182         PR c++/8461, c++/8625
5183         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
5184         (cp_convert_parm_for_inlining): Remove.
5185         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
5186         Remove.
5187         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
5188         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
5189
5190         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
5191         an ambiguous conversion.
5192
5193 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
5194
5195         PR c++/8688
5196         * decl.c (reshape_init): Handle erroneous initializers.
5197
5198 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
5199
5200         PR c++/8720
5201         * spew.c (remove_last_token): Make sure that last_chunk is set
5202         correctly.
5203
5204         PR c++/8615
5205         * error.c (dump_expr): Handle character constants with
5206         TREE_OVERFLOW set.
5207
5208 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5209
5210         DR 180
5211         * decl.c (grokdeclarator): Require class-key for all friend class.
5212         Output the correct type and context in the error message.
5213
5214 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
5215
5216         PR c++/5919
5217         * pt.c (unify): Use variably_modified_type_p to test validity of
5218         template argument types.
5219
5220         PR c++/8727
5221         * cp-tree.h (lang_type_class): Add typeinfo_var.
5222         (CLASSTYPE_TYPEINFO_VAR): New macro.
5223         * rtti.c (get_tinfo_decl): Use it.
5224
5225         PR c++/8663
5226         * init.c (expand_member_init): Always get the main variant of a
5227         base class.
5228
5229 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
5230
5231         PR c++/8332
5232         PR c++/8493
5233         * decl.c (cxx_init_decl_processing): Use size_type_node, not
5234         c_size_type_node.
5235         * decl2.c (coerce_new_type): Likewise.
5236         * except.c (do_allocate_exception): Likewise.
5237
5238 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
5239
5240         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
5241         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
5242         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
5243         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
5244         typeck2.c: Include coretypes.h and tm.h.
5245         * Make-lang.in: Update dependencies.
5246
5247 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
5248
5249         PR c++/8227
5250         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
5251         (check_initializer): Validate the type of the initialized
5252         variable, even if the initializer is absent.
5253         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
5254
5255         PR c++/8214
5256         * typeck.c (convert_for_assignment): Do not use
5257         decl_constant_value on the operand.
5258
5259         PR c++/8511
5260         * pt.c (instantiate_decl): Handle template friends defined outside
5261         of the class correctly.
5262
5263 2002-11-29  Joe Buck <jbuck@synopsys.com>
5264
5265         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
5266         anonymous structs.
5267
5268 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
5269
5270         * class.c (walk_subobject_offsets): Recur on binfos as well as on
5271         types.
5272         (layout_nonempty_base_or_field): Pass it a binfo when processing a
5273         base class.
5274         (layout_empty_base): Likewise.
5275         (build_base_field): Likewise.
5276
5277 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
5278
5279         * class.c (build_base_field): Make sure we get the canonical base
5280         when descending through primary bases.
5281
5282 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
5283
5284         * decl.c (check_initializer): Don't error on initialisation of
5285         a scalar with a brace-enclosed expression.
5286
5287 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
5288
5289         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
5290         (template_parms_equal): Remove prototype.
5291         * typeck.c (buuld_indirect_ref): Reformat.
5292
5293 2002-11-25  Jason Merrill  <jason@redhat.com>
5294
5295         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
5296         and a DO_STMT.
5297
5298 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
5299
5300         * tree.c (cp_build_qualified_type_real): Correct handling of
5301         array types.
5302         * class.c (walk_subobject_offsets): Fix thinko.
5303         (build_base_field): Record offsets of empty bases in primary
5304         virtual bases.
5305         (layout_class_type): Record offsets of empty bases in fields.
5306
5307         * search.c (is_subobject_of_p_1): Fix thinko.
5308         (lookup_field_queue_p): Likewise.
5309
5310 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
5311
5312         * class.c (layout_class_type): Reuse tail padding when laying out
5313         virtual bases.
5314
5315 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
5316
5317         * rtti.c (qualifier_flags): Fix thinko.
5318
5319 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5320
5321         Remove traditional C constructs 1/n.
5322         * cp-tree.h (init_method, set_mangled_name_for_decl,
5323         build_opfncall, hack_identifier, make_thunk, use_thunk,
5324         synthesize_method, implicitly_declare_fn,
5325         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
5326         maybe_clone_body): Remove use of PARAMS.
5327
5328         * method.c (do_build_assign_ref, do_build_copy_constructor,
5329         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
5330         Likewise.
5331         (synthesize_method): Use 'bool' type and constants instead of
5332         'int'.
5333         (locate_copy): Likewise.
5334         (implicitly_declare_fn): Likewise.
5335
5336         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
5337         Remove old-style declaration.
5338         (maybe_clone_body): Use 'bool' type and constants.
5339
5340 2002-11-21  Glen Nakamura  <glen@imodulo.com>
5341
5342         PR c++/8342
5343         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
5344         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
5345         of the branches of a COND_EXPR.
5346
5347 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
5348
5349         * pt.c (for_each_template_parm): Free allocated memory.
5350         * search.c (is_subobject_of_p_1): New function.
5351         (is_subobject_of_p): Avoid walking virtual bases multiple times.
5352
5353 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
5354
5355         * g++spec.c (lang_specific_spec_functions): New.
5356
5357 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
5358
5359         * ChangeLog: Follow spelling conventions.
5360         * class.c: Likewise.
5361         * decl2.c: Likewise.
5362
5363 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
5364
5365         * search.c (dfs_push_decls): Do not try to reorder elements
5366         3..n of method_vec if method_vec has only two elements.
5367         Reverse order of two tests to avoid accessing unallocated
5368         memory.
5369
5370 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
5371
5372         * class.c (dfs_find_final_overrider): Adjust so that the most
5373         derived object is a binfo, rather than a class type.
5374         (find_final_overrider): Likewise.
5375         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
5376         (add_vcall_offset): Likewise.
5377
5378 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5379
5380         PR c++/8389
5381         * pt.c (instantiate_template): Push class scope for member
5382         functions.
5383         (get_mostly_instantiated_function_type): Likewise.  Don't call
5384         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
5385         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
5386         * mangle.c (write_encoding, write_unqualified_name): Adjust.
5387
5388 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
5389
5390         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
5391         vcall offfsets.  Split out ...
5392         (add_vcall_offset): ... new function.
5393
5394         PR c++/8338
5395         * pt.c (for_each_template_parm): Add htab parameter.
5396         (process_partial_specialization): Adjust call.
5397         (push_template_decl_real): Likewise.
5398         (pair_fn_data): Add visited.
5399         (for_each_template_parm_r): Avoid walking duplicates more than
5400         once.
5401         (uses_template_parms): Adjust call to for_each_template_parm.
5402
5403 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
5404
5405         * class.c (add_implicitly_declared_members): Put implicitly
5406         declared functions at the end of TYPE_METHODs when -fabi-version
5407         is at least 2.
5408
5409 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
5410
5411         * decl2.c (finish_file): Correct spelling.
5412
5413 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
5414
5415         * call.c (build_special_member_call): Do not try to lookup VTTs by
5416         name.
5417         * class.c (vtbl_init_data): Add generate_vcall_entries.
5418         (get_vtable_decl): Do not look up virtual tables by name.
5419         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
5420         (set_primary_base): Do not set CLASSTYPE_RTTI.
5421         (determine_primary_base): Likewise.
5422         (get_matching_virtual): Remove.
5423         (get_vcall_index): New function.
5424         (update_vtable_entry_for_fn): Do not try to use virtual thunks
5425         when they are not required.  Assign vcall indices at this point.
5426         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
5427         Do update dynamic_classes.
5428         (build_vtt): Do not add VTTs to the symbol table.
5429         (build_ctor_vtbl_group): Likewise.
5430         (build_vtbl_initializer): Simplify handling of vcall indices.
5431         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
5432         for the most derived class.
5433         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
5434         the vtable.
5435         * cp-tree.h (dynamic_classes): New macro.
5436         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
5437         (CLASSTYPE_RTTI): Remove.
5438         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
5439         (CLASSTYPE_VCALL_INDICES): New macro.
5440         (CLASSTYPE_VTABLES): Likewise.
5441         (BV_USE_VCALL_INDEX_P): Remove.
5442         (build_vtable_path): Remove.
5443         * decl2.c (finish_vtable_vardecl): Remove.
5444         (key_method): Remove #if 0'd code.
5445         (finish_vtable_vardecl): Rename to ...
5446         (maybe_emit_vtables): ... this.
5447         (finish_file): Use it.
5448         * search.c (look_for_overrides_here): Update comment.
5449
5450 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
5451
5452         PR c/7353 redux
5453         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
5454
5455 2002-10-30  Jason Merrill  <jason@redhat.com>
5456
5457         PR c++/8186
5458         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
5459         * call.c (convert_for_arg_passing): Set it.
5460         * except.c (stabilize_throw_expr): Recurse for such an arg.
5461
5462 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
5463
5464         * cp-tree.h (lang_decl_flags): Remove init_priority.
5465         (lang_decl): Add delta.
5466         (GLOBAL_INIT_PRIORITY): Remove.
5467         (THUNK_DELTA): Revise definition.
5468         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
5469         * dump.c (cp_dump_tree): Don't dump it.
5470
5471 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
5472
5473         PR c++/8160
5474         * typeck2.c (process_init_constructor): Call complete_array_type.
5475
5476         PR c++/8149
5477         * decl.c (make_typename_type): Issue errors about invalid results.
5478
5479 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5480
5481         Core issue 287, PR c++/7639
5482         * cp-tree.h (lang_type_class): Add decl_list field.
5483         (CLASSTYPE_DECL_LIST): New macro.
5484         (maybe_add_class_template_decl_list): Add declaration.
5485         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
5486         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
5487         (maybe_add_class_template_decl_list): New function.
5488         (add_implicitly_declared_members): Use it.
5489         * decl.c (maybe_process_template_type_declaration): Likewise.
5490         (pushtag): Likewise.
5491         * friend.c (add_friend): Likewise.
5492         (make_friend_class): Likewise.
5493         * semantics.c (finish_member_declaration): Likewise.
5494         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
5495         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
5496         to process members and friends in the order of declaration.
5497
5498 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
5499
5500         PR c++/8287
5501         * decl.c (finish_destructor_body): Create the label to jump to
5502         when returning from a destructor here.
5503         (finish_function_body): Rather than here.
5504
5505 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
5506
5507         PR c++/7266
5508         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
5509         SCOPE_REF is not null before dereferencing it.
5510
5511 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
5512
5513         * call.c (build_over_call): Use DECL_CONTEXT, not
5514         DECL_VIRTUAL_CONTEXT.
5515         * class.c (modify_vtable_entry): Don't mess with
5516         DECL_VIRTUAL_CONTEXT.
5517         (set_vindex): Remove.
5518         (set_primary_base): Remove vfuns_p parameter.
5519         (determine_primary_base): Likewise.
5520         (modify_all_vtables): Likewise.
5521         (layout_class_type): Likewise.  Adjust calls to other functions
5522         accordingly.
5523         (finish_struct_1): Adjust calls to modified functions.  Set
5524         DECL_VINDEX here.
5525         * cp-tree.h (lang_type_class): Remove vsize.
5526         (CLASSTYPE_VSIZE): Remove.
5527         (lang_decl): Remove thunks.
5528         (DECL_THUNKS): Adjust.
5529         (DECL_VIRTUAL_CONTEXT): Remove.
5530         (duplicate_decls): Don't copy it.
5531         * pt.c (build_template_decl): Don't set it.
5532         (tsubst_decl): Likewise.
5533         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
5534
5535         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
5536         (build_vtable_entry): Remove.
5537         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
5538         (lang_decl): Add thunks.
5539         (DECL_THUNKS): New macro.
5540         * decl.c (duplicate_decls): Copy it.
5541         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
5542         * semantics.c (emit_associated_thunks): Simplify.
5543
5544 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
5545
5546         PR c++/7228
5547         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
5548         lang_type structure exists before accessing field.
5549         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
5550         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
5551         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
5552         * class.c (check_field_decls): Use new macros.
5553         * typeck2.c (process_init_constructor): Remove redundant check for
5554         existence of lang_type structure.
5555
5556 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
5557
5558         * class.c (end_of_base): New method.
5559         (end_of_class): Use it.  Check indirect virtual bases.
5560
5561         * class.c (check_field_decls): Fix typo.
5562
5563 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
5564
5565         PR c++/8067
5566         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
5567         related variables.
5568
5569         PR c++/7679
5570         * spew.c (next_token): Do not return an endless stream of
5571         END_OF_SAVED_INPUT tokens.
5572         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
5573         the cached token stream.
5574         (snarf_defarg): Likewise.
5575
5576 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
5577
5578         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
5579         variably_modified_type_p.
5580         * cp-tree.h: Remove prototype of variably_modified_type_p.
5581         * tree.c (variably_modified_type_p): Remove; now implemented
5582         in language-independent code.
5583
5584 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
5585
5586         PR c++/6579
5587         * spew.c (snarf_parenthesized_expression): New function.
5588         (snarf_block): Use it.
5589
5590 2002-10-22  Richard Henderson  <rth@redhat.com>
5591
5592         * method.c (use_thunk): Always compute vcall_value; assert that
5593         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
5594         for vcall thunks as well.
5595
5596 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
5597
5598         * class.c (empty_base_at_nonzero_offset_p): New function.
5599         (layout_nonempty_base_or_field): Do not check for conflicts when
5600         laying out a virtual base using the GCC 3.2 ABI.
5601         (build_base_field): Correct checking for presence of empty classes
5602         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
5603
5604         * class.c (include_empty_classes): Use normalize_rli.
5605         (layout_class_type): Likewise.
5606
5607         * decl.c (reshape_init): Tweak handling of character arrays.
5608
5609         PR c++/8218
5610         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
5611         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
5612         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
5613         (check_field_decls): Likewise.
5614         (layout_class_type): Likewise.
5615         (finish_struct_1): Initialize it.
5616         (walk_subobject_offsets): Use it to prune searches.
5617
5618 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
5619
5620         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
5621         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
5622         TARGET_ASM_OUTPUT_MI_THUNK in comments.
5623
5624 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
5625
5626         * decl.c (start_decl): Point users of the old initialized-
5627         typedef extension at __typeof__.
5628
5629 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
5630
5631         * Make-lang.in (method.o): Depend on TARGET_H.
5632         * method.c (target.h): Include it.
5633         (use_thunk): Use target hooks.  Use vcall thunks, if available.
5634
5635 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
5636
5637         * class.c (base_derived_from): Make sure return value is a bool.
5638
5639 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
5640
5641         * class.c (find_final_overrider_data_s): Remove overriding_fn and
5642         overriding_base.
5643         (dfs_base_derived_from): New function.
5644         (base_derived_from): Likewise.
5645         (dfs_find_final_overrider): Use base_derived_from.
5646         (find_final_overrider): Adjust.
5647
5648 2002-10-18  Jason Merrill  <jason@redhat.com>
5649
5650         PR c++/8080
5651         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
5652         with condition decls in a template.
5653
5654 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
5655
5656         * class.c (add_method): Compare template parms too.
5657
5658 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
5659
5660         PR c++/7584
5661         * class.c (handle_using_decl): Allow the declaration used to be
5662         from an ambiguous base.
5663
5664         * pt.c (convert_template_argument): Revert this change:
5665                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
5666                 * pt.c (convert_template_argument): Do not fold non-type
5667                 template rguments when inside a template.
5668
5669         * init.c (expand_default_init): Handle brace-enclosed initializers
5670         correctly.
5671
5672 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
5673
5674         * mangle.c (write_expression): Correct handling of enumeration
5675         constants.
5676         (write_template_arg): Likewise.
5677         * pt.c (convert_template_argument): Do not fold non-type template
5678         arguments when inside a template.
5679
5680         PR c++/7478
5681         * cvt.c (convert_to_reference): Allow references as the incoming
5682         type.
5683
5684 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
5685
5686         PR c++/7524
5687         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
5688         build_qualified_type.
5689
5690 2002-10-15  Richard Henderson  <rth@redhat.com>
5691
5692         * error.c (dump_expr): Use real_to_decimal directly, and with
5693         the new arguments.
5694
5695 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
5696
5697         * decl.c (reshape_init): Fix typo.
5698
5699         * cp-tree.h (operator_name_info_t): Add arity.
5700         * lex.c (init_operators): Initialize it.
5701         * mangle.c (write_conversion_operator_name): New function.
5702         (write_unqualified_name): Use it.
5703         (write_template_args): Accept template arguments as a TREE_LIST.
5704         (write_expression): Adjust handling of qualified names to match
5705         specification.
5706
5707 2002-10-15  Jason Merrill  <jason@redhat.com>
5708
5709         * call.c (call_builtin_trap): New fn.
5710         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
5711         (build_call): Don't set current_function_returns_abnormally outside
5712         a function.
5713
5714 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
5715
5716         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
5717         clear CLASSTYPE_EMPTY_P.
5718         (build_base_field): Likewise.
5719         (build_base_fields): Likewise.
5720         (check_bases_and_members): Likewise.
5721         (create_vtbl_ptr): Likewise.
5722         (layout_class_type): Likewise.  Ensure that empty classes have
5723         size zero when used as base classes in the 3.2 ABI.
5724         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
5725         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
5726         parameter.
5727         (is_empty_class): Correct definition when using post-3.2 ABI.
5728         * cp-tree.h (lang_type_class): Add empty_p.
5729         (CLASSTYPE_EMPTY_P): New macro.
5730
5731 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
5732
5733         * init.c (build_delete): Do not apply save_expr for arrays.
5734         (build_vec_delete): Likewise.
5735
5736 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
5737
5738         * decl.c (layout_var_decl): Call layout_decl even for variables
5739         whose type is an array with unspecified bounds.
5740
5741         PR c++/7176
5742         * lex.c (do_identifier): Add another option for the parsing
5743         parameter.
5744         * parse.y (do_id): Use it.
5745
5746 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5747
5748         PRs C++/6803, C++/7721 and C++/7803
5749         * decl.c (grokdeclarator): Gracefully handle template-name as
5750         decl-specifier.
5751
5752 2002-10-11  Jason Molenda  <jmolenda@apple.com>
5753
5754         * init.c (build_field_list): Provide uses_unions_p with a default
5755         value.
5756
5757 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
5758
5759         PR c++/5661
5760         * cp-tree.h (variably_modified_type_p): New function.
5761         (grokdeclarator) Tighten check for variably modified types as
5762         fields.
5763         * pt.c (convert_template_argument): Do not allow variably modified
5764         types as template arguments.
5765         * tree.c (variably_modified_type_p): New function.
5766
5767         * NEWS: Document removal of "new X = ..." extension.
5768         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
5769         brace-enclosed initializers.
5770         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
5771         (initialize_local_var): Remove declaration.
5772         (expand_static_init): Likewise.
5773         * decl.c (next_initializable_field): New function.
5774         (reshape_init): Likewise.
5775         (check_initializer): Use them.  Build dynamic initializer for
5776         aggregates here too.
5777         (initialize_local_var): Simplify, and incorporate cleanup
5778         insertion code as well.
5779         (destroy_local_var): Remove.
5780         (cp_finish_decl): Tidy.
5781         (expand_static_init): Fold checks for whether or not a variable
5782         needs initialization into this function.  Simplify.
5783         * decl2.c (do_static_initialization): Simplify.
5784         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
5785         be done for us automatically.
5786         (expand_default_init): Handle brace-enclosed initializers
5787         correctly.
5788         (expand_aggr_init_1): Remove RTL-generation code.
5789         (build_vec_init): Remove "new X = ..." support.
5790         * parse.y (new_initializer): Likewise.
5791         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
5792         brace-enclosed initializer.
5793         (create_pseudo_type_info): Likewise.
5794         * typeck2.c (store_init_value): Don't try to handle digest_init
5795         being called more than once.
5796         (digest_init): Tidy handling of brace-enclosed initializers.
5797
5798 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5799
5800         * decl.c (typename_hash): Use htab_hash_pointer.
5801
5802 2002-10-10  Jim Wilson  <wilson@redhat.com>
5803
5804         * decl.c (duplicate_decls): Don't call decl_attributes.
5805
5806 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
5807
5808         PR c/7353
5809         * decl.c (start_decl): Unconditionally issue error for
5810         'typedef foo = bar'.
5811         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
5812         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
5813
5814 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5815
5816         * decl2.c (prune_vtable_vardecl): Delete unused function.
5817
5818 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
5819
5820         PR c++/7754
5821         * decl2.c (finish_anon_union): Do not expand anonymous unions when
5822         procesing template functions.
5823         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
5824         type. Call layout_decl.
5825         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
5826
5827 2002-10-07  Richard Henderson  <rth@redhat.com>
5828
5829         * decl2.c, pt.c: Revert c++/7754 fix.
5830
5831 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5832
5833         PR c++/7804
5834         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
5835
5836 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
5837
5838         PR c++/7931
5839         * pt.c (for_each_template_parm_r): Handle BASELINKs.
5840
5841         PR c++/7754
5842         * decl2.c (finish_anon_union): Do not expand anonymous unions when
5843         procesing template functions.
5844         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
5845         type. Call layout_decl.
5846         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
5847
5848 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
5849
5850         PR c++/8006
5851         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
5852         template parameters.
5853         (globals): Add entity and need_abi_warning.
5854         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
5855         CLASSTYPE_TEMPLATE_INFO.
5856         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
5857         TYPE_TI_TEMPLATE.
5858         (write_prefix): Handle typename types correctly.
5859         (write_template_prefix): Handle template template parameters
5860         correctly.
5861         (start_mangling): Add entity parameter.
5862         (finish_mangling): Warn about names whose mangling will change.
5863         (mangle_decl_string): Adjust.
5864         (mangle_type_string): Likewise.
5865         (mangle_special_for_type): Likewise.
5866         (mangle_ctor_vtbl_for_type): Likewise.
5867         (mangle_thunk): Likewise.
5868         (mangle_guard_variable): Likewise.
5869         (mangle_ref_init_variable): Likewise.
5870
5871 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
5872
5873         PR c++/7188.
5874         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
5875         * cp-tree.h (emit_base_init): Rename to ....
5876         (emit_mem_initializers): ... this.
5877         (expand_member_init): Change prototype.
5878         * init.c (perform_member_init): Compute explicit, rather than
5879         requiring it as a parameter.
5880         (sort_member_init): Rename to ...
5881         (sort_mem_initializers): ... this.  Process bases and data members
5882         together.
5883         (sort_base_init): Remove.
5884         (emit_base_init): Rename to ...
5885         (emit_mem_initializers): ... this.
5886         (expand_aggr_vbase_init_1): Remove.
5887         (construct_virtual_bases): Rename to ...
5888         (construct_virtual_base): ... this.
5889         (expand_member_init): Rework handling of base initializers.
5890         * method.c (do_build_copy_constructor): Use
5891         finish_mem_initializers.
5892         * parse.y (member_init): Adjust calls to expand_member_init.
5893         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
5894         (tsubst_initializer_list): Use expand_member_init.
5895         * semantics.c (finish_mem_intiailizers): Simplify.
5896
5897 2002-10-02  Matt Austern  <austern@apple.com>
5898         * decl.c (walk_vtables_r): Fixed typo that caused result to
5899         never get a nonzero value.
5900
5901 2002-10-02  Roger Sayle  <roger@eyesopen.com>
5902
5903         PR optimization/6627
5904         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
5905         from here, and move it to tree.h.
5906         * decl.c (cxx_init_decl_processing): If storing the vbit
5907         in function pointers, ensure that force_align_functions_log
5908         is atleast one.
5909
5910 2002-10-02  Matt Austern  <austern@apple.com>
5911
5912         * class.c (check_field_decls): Changed warning about const member
5913         variables so that it doesn't get issued for a class aggregate.
5914
5915 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
5916
5917         * decl.c (cp_finish_decl): Make sure array types are laid out,
5918         even if the array bounds are unknown.
5919
5920 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
5921
5922         * class.c (build_vtbl_initializer): Change build_c_cast
5923         to build1.
5924
5925 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
5926
5927         * decl.c (cp_finish_decl): Make sure array types are laid out,
5928         even if the array bounds are unknown.
5929
5930         * decl.c (cp_finish_decl): Correct check for dynamic
5931         initialization of thread-local storage.
5932
5933 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
5934
5935         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
5936         overloaded.
5937
5938 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
5939
5940         * class.c (build_vtbl_initializer): Add cast.
5941         (add_vcall_offset_vtbl_entries_1):
5942         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
5943
5944 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
5945
5946         * class.c (walk_subobject_offsets): Correct the calculation of
5947         offsets for virtual bases.  Correct the counting of array
5948         elements.
5949         (layout_nonempty_base_or_field): Simplify.  Correct the
5950         calculation of offsets to be propagated through the binfo
5951         hierarchy.
5952         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
5953         Add the FIELD_DECL to TYPE_FIELDS.
5954         (build_base_fields): Adjust accordingly.
5955         (layout_virtual_bases): Use build_base_field.
5956         (end_of_class): Return a tree, not an integer.
5957         (warn_about_ambiguous_direct_bases): Rename to ...
5958         (warn_about_ambiguous_bases): ... this.
5959         (include_empty_classes): New function.
5960         (layout_class_type): Create an alternative version of the type to
5961         be used when as a base class type.  Do not call
5962         finish_record_layout until we are done laying out the class.
5963         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
5964         as_base.
5965         (CLASSTYPE_SIZE): Reimplement.
5966         (CLASSTYPE_SIZE_UNIT): Likewise.
5967         (CLASSTYPE_ALIGN): Likweise.
5968         (CLASSTYPE_USER_ALIGN): Likewise.
5969         (CLASSTYPE_AS_BASE): New macro.
5970         (DECL_INITIALIZED_P): Likewise.
5971         (extract_init): Remove prototype.
5972         (build_forced_zero_init): Rename to ...
5973         (build_zero_init): ... this.
5974         (force_store_init_value): Remove.
5975         * decl.c (obscure_complex_init): Remove.
5976         (duplicate_decls): Copy DECL_INITIALIZED_P.
5977         (check_initializer): Do not leave junk in DECL_INITIAL.
5978         (cp_finish_decl): Handle zero-initialization of entities with
5979         static storage duration.
5980         * expr.c (extract_init): Remove.
5981         * init.c (build_forced_zero_init): Remove.
5982         (build_zero_init): New function.
5983         (build_default_init): Use it.
5984         (build_field_list): Skip FIELD_DECLs for base subobjects.
5985         (push_base_cleanups): Likewise.
5986         * method.c (do_build_assign_ref): Likewise.
5987         (synthesize_exception_spec): Likewise.
5988         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
5989         (regenerate_decl_from_template): To not set DECL_INITIAL for a
5990         static data member whose initialization took place in its class.
5991         (instantiate_decl): Do not pass an initializer to cp_finish_decl
5992         in that situation.
5993         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
5994         (dfs_unuse_fields): Likewise.
5995         * tree.c (pod_type_p): Handle error_mark_node.
5996         (zero_init_p): Likewise.
5997         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
5998         subobjects.
5999         * typeck2.c (store_init_value): Remove #if 0'd code.
6000         (force_store_init_value): Remove.
6001         (process_init_constructor): Use build_zero_init.
6002
6003 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
6004
6005         PR c++/7788
6006         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
6007
6008 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
6009
6010         * cp-tree.h: Fix comment typos.
6011         * decl.c: Likewise.
6012         * pt.c: Likewise.
6013
6014 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
6015
6016         * cp/class.c (contains_empty_class_p): New method.
6017         (walk_subobject_offsets): Correct computation of field offset.
6018         (layout_empty_base): Correct placement of emtpy base classes.
6019         (layout_class_type): Warn about ABI changes.
6020
6021 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
6022
6023         * cp/class.c (layout_virtual_bases): Do not round the size of the
6024         type to a multiple of the alignment before laying out virtual bases.
6025         (layout_class_type): Correct handling of bit-fields that are wider
6026         than their type inside unions.  Round the size of the type to a
6027         even number of bytes when computing the size without virtual
6028         bases.
6029         * cp/cp-tree.h (abi_version_at_least): New macro.
6030
6031 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
6032
6033         * ChangeLog: Follow spelling conventions.
6034         * ChangeLog.2: Likewise.
6035         * call.c: Likewise.
6036         * class.c: Likewise.
6037         * cp-tree.h: Likewise.
6038         * cvt.c: Likewise.
6039         * decl.c: Likewise.
6040         * decl2.c: Likewise.
6041         * except.c: Likewise.
6042         * friend.c: Likewise.
6043         * g++spec.c: Likewise.
6044         * init.c: Likewise.
6045         * lex.c: Likewise.
6046         * mangle.c: Likewise.
6047         * method.c: Likewise.
6048         * operators.def: Likewise.
6049         * optimize.c: Likewise.
6050         * pt.c: Likewise.
6051         * rtti.c: Likewise.
6052         * search.c: Likewise.
6053         * semantics.c: Likewise.
6054         * spew.c: Likewise.
6055         * tree.c: Likewise.
6056         * typeck.c: Likewise.
6057
6058 2002-09-18  Devang Patel  <dpatel@apple.com>
6059
6060         * cp/cp-tree.h: New prototype for walk_vtabls().
6061         * cp/decl.c (walk_vtables_r): New function.
6062         (struct cp_binding_level): Add new members, namespaces,
6063         names_size and vtables.
6064         (add_decl_to_level): Add decl in namespaces or vtables
6065         chain, if conditions match.
6066         (walk_vtables): New function.
6067         (walk_namespaces_r): Travers separate namespace chain
6068         for namespace decls.
6069         (wrapup_globals_for_namespace): Use names_size instead
6070         of list_length().
6071         * cp/decl2.c (finish_file): Use walk_vtables() instead of
6072         walk_globals() to walk vtable decls.
6073
6074 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
6075
6076         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
6077         ICE with invalid pointers & references.
6078
6079 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
6080
6081         * Make-lang.in: Remove all references to the demangler.
6082         * cxxfilt.c: Moved to binutils.
6083
6084 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
6085
6086         PR c++/7718
6087         * pt.c (tsubst_decl): Remove assert.
6088
6089         Remove DR 295 implementation.
6090         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
6091         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
6092         about ignoring volatile qualifiers.
6093
6094         * search.c (lookup_member): Correct documentation.
6095
6096 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
6097
6098         * cp-tree.h (union lang_tree_node): Add chain_next option.
6099
6100 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
6101
6102         * parse.y (parse_finish_call_expr): Check lookup_member result.
6103
6104         PR c++/7015
6105         * semantic.c (finish_asm_stmt): Fix operand/output_operands
6106         thinko.
6107         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
6108
6109 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
6110
6111         PR c++/7919
6112         * call.c (build_over_call): Convert this pointer for fns found by
6113         using decls.
6114
6115 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
6116
6117         * ChangeLog: Follow spelling conventions.
6118         * ChangeLog.1: Likewise.
6119
6120 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
6121
6122         PR c++/7768
6123         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
6124
6125 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
6126
6127         * error.c: Fix comment formatting.
6128         * except.c: Likewise.
6129         * expr.c: Likewise.
6130         * friend.c: Likewise.
6131         * g++spec.c: Likewise.
6132         * init.c: Likewise.
6133         * lex.c: Likewise.
6134         * mangle.c: Likewise.
6135         * method.c: Likewise.
6136         * optimize.c: Likewise.
6137         * pt.c: Likewise.
6138         * rtti.c: Likewise.
6139         * search.c: Likewise.
6140         * semantics.c: Likewise.
6141         * spew.c: Likewise.
6142         * tree.c: Likewise.
6143         * typeck.c: Likewise.
6144         * typeck2.c: Likewise.
6145
6146 2002-09-13  Matt Austern  <austern@apple.com>
6147
6148         PR C++/7828
6149         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
6150         * cp/call.c: Change call-by-const-reference mechanism to use
6151         non_cast_lvalue_p when deciding whether the create a temporary.
6152         We need a temporary when passing, e.g. (long) x by const ref.
6153
6154 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
6155
6156         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
6157
6158 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
6159
6160         * decl.c: Fix comment formatting.
6161         * decl2.c: Likewise.
6162
6163 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
6164
6165         * call.c: Fix comment formatting.
6166         * class.c: Likewise.
6167         * cp-lang.c: Likewise.
6168         * cp-tree.h: Likewise.
6169         * cvt.c: Likewise.
6170
6171 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
6172
6173         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
6174         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
6175         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
6176         minor adjustments (use version_string, eliminate yet another
6177         duplicate of xmalloc)
6178
6179 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6180
6181         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
6182
6183 2002-09-05  Jason Merrill  <jason@redhat.com>
6184
6185         * typeck2.c (add_exception_specifier): Only pedwarn for an
6186         incomplete type.
6187         (require_complete_eh_spec_types): New fn.
6188         (cxx_incomplete_type_diagnostic): Also support pedwarning.
6189         * typeck.c (complete_type_or_diagnostic): Likewise.
6190         * call.c (build_call): Call require_complete_eh_spec_types.
6191         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
6192         on an incomplete type.
6193
6194 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
6195
6196         * decl.c (start_cleanup_fn): Clear interface_only before
6197         start_function, restore it afterwards.
6198
6199 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
6200
6201         * cp-tree.h (finish_builtin_type): Remove.
6202         * decl2.c (finish_builtin_type): Move to common code.
6203         * decl.c (build_ptrmemfunc_type): Adjust.
6204         * rtti.c (create_pseudo_type_info): Adjust.
6205         (create_tinfo_types): Adjust.
6206
6207 2002-08-31  Jason Merrill  <jason@redhat.com>
6208
6209         * cp-lang.c (cp_expr_size): Allow initialization from a
6210         CONSTRUCTOR.
6211
6212 2002-08-30  Richard Henderson  <rth@redhat.com>
6213
6214         PR opt/7515
6215         * tree.c: Include target.h.
6216         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
6217         don't bind locally.
6218         * Makefile.in (tree.o): Update.
6219
6220 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
6221
6222         * class.c (layout_virtual_bases): Warn about bugs in G++ that
6223         result in incorrect object layouts.
6224         (layout_class_type): Likewise.
6225
6226 2002-08-24  Matt Austern  <austern@apple.com>
6227
6228         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
6229         are allowable.
6230         (real_lvalue_p): Update caller.
6231         (lvalue_p): Ditto.
6232         (non_cast_lvalue_or_else): New.
6233         * tree.h: Declare it.
6234         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
6235
6236 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
6237
6238         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
6239         and COND_EXPR specially; fix error message output.
6240
6241 2002-08-22  Jason Merrill  <jason@redhat.com>
6242
6243         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
6244         * semantics.c (nullify_returns_r): Likewise.
6245
6246 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6247
6248         Fix PR/7621
6249         * typeck.c (finish_class_member_access_expr): Diagnose cases where
6250         name lookup finds nothing.
6251
6252 2002-08-15  Jason Merrill  <jason@redhat.com>
6253
6254         * semantics.c (finish_then_clause): Remove redundant assignment.
6255         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
6256         extra binding level outside the if/switch statement.
6257         (finish_while_cond, finish_for_cond): Rewrite complex condition
6258         into the loop body.
6259
6260 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
6261
6262         * parse.y (sizeof, alignof, typeof): New non-terminals to
6263         increment skip_evaluation.  Replace terminals with them and
6264         decrement skip_evaluation at the end of rules using them.
6265         * decl2.c (mark_used): Don't assemble_external if
6266         skipping evaluation.
6267
6268 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
6269
6270         Fix PR/7504
6271         * parse.y (parse_finish_call_expr): Handle incomplete
6272         type used to name a scope.
6273
6274 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
6275
6276         PR c++/7598
6277         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
6278         regression caused by my 2002-08-08 patch.
6279
6280 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
6281
6282         * decl.c (pushdecl_class_level): Honor requests to bind names to
6283         OVERLOADs.
6284
6285 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6286
6287         * decl2.c (build_call_from_tree): Fix uninitialized variable.
6288         * parse.y (parse_finish_call_expr): Likewise.
6289         * repo.c (old_args, old_dir, old_main): Const-ify.
6290
6291 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
6292
6293         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
6294         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
6295         * optimize.c (maybe_clone_body): Likewise.
6296         * pt.c (tsubst_enum): Likewise.
6297         (lookup_template_class): Likewise.
6298         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
6299
6300 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
6301
6302         * lang-specs.h: Remove -ansi.
6303
6304 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
6305
6306         * tree.c (maybe_dummy_object): Replace // with /* */
6307
6308 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
6309
6310         * call.c (standard_conversion): Use build_ptrmem_type.
6311         * cp-tree.h (build_ptrmem_type): New function.
6312         (adjust_result_of_qualified_name_lookup): Likewise.
6313         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
6314         static data members.
6315         (build_ptrmem_type): New function.
6316         (grokdeclarator): Do not use build_offset_type when encountering a
6317         qualified name.
6318         * parse.y (parse_finish_call_expr): Use
6319         adjust_result_of_qualified_name_lookup.
6320         * search.c (adjust_result_of_qualified_name_lookup): New function.
6321         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
6322         accessing OFFSET_TYPEs directly.
6323
6324 2002-08-08  Mike Stump  <mrs@apple.com>
6325
6326         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
6327         (type_decays_to): Likewise.
6328         * class.c (find_final_overrider): Likewise.
6329         (maybe_note_name_used_in_class): Likewise.
6330         * decl.c (current_tmpl_spec_kind): Likewise.
6331         (add_binding): Likewise.
6332         (push_class_binding): Likewise.
6333         (duplicate_decls): Likewise.
6334         (layout_var_decl): Likewise.
6335         (grokfndecl): Likewise.
6336         (grokdeclarator): Likewise.
6337         (check_default_argument): Likewise.
6338         * decl2.c (handle_class_head): Likewise.
6339         * error.c (dump_template_decl): Likewise.
6340         * init.c (build_offset_ref): Likewise.
6341         * pt.c (check_specialization_scope): Likewise.
6342         (determine_specialization): Likewise.
6343         (check_explicit_specialization): Likewise.
6344         (maybe_check_template_type): Likewise.
6345         (process_partial_specialization): Likewise.
6346         (check_default_tmpl_args): Likewise.
6347         (push_template_decl_real): Likewise.
6348         (convert_template_argument): Likewise.
6349         (try_class_unification): Likewise.
6350         (get_bindings_real): Likewise.
6351         (do_decl_instantiation): Likewise.
6352         * semantics.c (begin_function_definition): Likewise.
6353         (finish_member_declaration): Likewise.
6354         (check_multiple_declarators): Likewise.
6355         * typeck.c (comp_array_types): Likewise.
6356         (comptypes): Likewise.
6357         (expr_sizeof): Likewise.
6358         (build_binary_op): Likewise.
6359         (dubious_conversion_warnings): Likewise.
6360         (check_return_expr): Likewise.
6361
6362 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
6363
6364         * typeck.c (build_class_member_access_expr): Do not return
6365         error_mark_node when no error has occurred.
6366
6367 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
6368
6369         * typeck.c (build_component_addr): Remove.
6370         (build_unary_op): Just check it's not a bitfield, and then build
6371         an ADDR_EXPR.
6372
6373 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
6374
6375         * class.c (convert_to_base): Correct check for error_mark_node.
6376         (create_vtable_ptr): Remove unused VFUNS_P parm.
6377
6378 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
6379
6380         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
6381
6382 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
6383
6384         Rework build_component_ref.
6385         * call.c (build_vfield_ref): Do not go through build_component_ref.
6386         (build_field_call): Use build_class_member_access_expr.
6387         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
6388         (build_object_call): Likewise.
6389         * class.c (convert_to_base): New function.
6390         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
6391         (instantiate_type): Handle BASELINKs.
6392         * cp-tree.def (BASELINK): New tree code.
6393         * cp-tree.h (BASELINK_P): Reimplement.
6394         (SET_BASELINK_P): Remove.
6395         (BASELINK_BINFO): Reimplement.
6396         (BASELINK_FUNCTIONS): Likewise.
6397         (BASELINK_ACCESS_BINFO): Likewise.
6398         (BASELINK_OPTYPE): Likewise.
6399         (convert_to_base): New function.
6400         (name_p): Likewise.
6401         (build_object_ref): Remove.
6402         (build_component_ref_1): Likewise.
6403         (build_component_ref): Likewise.
6404         (build_x_component_ref): Likewise.
6405         (build_class_member_access_expr): New function.
6406         (finish_class_member_access_expr): Likewise.
6407         (build_ptrmemfunc_access_expr): Likewise.
6408         * decl.c (grokdeclarator): Handle BASELINKs.
6409         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
6410         finish_class_member_access_expr.
6411         (arg_assoc): Handle BASELINKs.
6412         (do_class_using_decl): Likewise.
6413         * error.c (dump_decl): Likewise.
6414         (dump_expr): Use build_ptrmemfunc_access_expr.
6415         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
6416         destructors.
6417         (build_throw): Use BASELINK_FUNCTIONS.
6418         * init.c (perform_member_init): Use
6419         build_class_member_access_expr.
6420         (build_offset_ref): Handle BASELINKs.  Use
6421         build_class_member_access_expr.
6422         * method.c (hack_identifier): Likewise.
6423         * parse.y (do_id): Use BASELINK, not TREE_LIST.
6424         (primary): Remove uses of build_object_ref.
6425         * pt.c (lookup_template_function): Handle BASELINKs.
6426         (resolve_overloaded_unification): Likewise.
6427         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
6428         (lookup_field): Use BASELINK, not TREE_LIST.
6429         (lookup_fnfiels): Likewise.
6430         (setup_class_bindings): Likewise.
6431         * semantics.c (finish_object_call_expr): Do not use
6432         build_method_call when we already know what function is being
6433         called.
6434         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
6435         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
6436         TREE_CHAIN.
6437         (name_p): New function.
6438         * typeck.c (build_object_ref): Remove.
6439         (build_component_ref_1): Likewise.
6440         (build_x_component_ref): Likewise.
6441         (build_class_member_access_expr): New function.
6442         (finish_class_member_access_expr): Likewise.
6443         (build_ptrmemfunc_access_expr): Likewise.
6444         (get_member_function_from_ptrfunc): Use
6445         build_ptrmemfunc_access_expr.
6446         (build_binary_op): Likewise.
6447         (build_unary_op): Likewise.
6448         (build_ptrmemfunc): Likewise.
6449         (pfn_from_ptrmemfunc): Likewise.
6450         * typeck2.c (build_m_component_ref): Adjust comment.
6451
6452 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
6453
6454         * Make-lang.in (CXX_C_OBJS): Update.
6455         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
6456         * cp-tree.h (cxx_decode_option): Remove.
6457         * decl2.c (compare_options, lang_f_options, unsupported_options,
6458         cxx_decode_option): Remove.
6459
6460 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
6461
6462         * typeck.c (build_x_unary_op): Handle pointer-to-member.
6463
6464 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
6465
6466         * class.c: Don't include obstack.h.
6467         (popclass):
6468         * decl2.c: Delete bogus comment.
6469         * error.c: Don't include obstack.h.
6470         * except.c: Likewise.
6471         (dump_type): Correct comment.
6472         * method.c: Don't include obstack.h.
6473         * tree.c: Likewise.
6474
6475 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
6476
6477         Fix PR/2213
6478         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
6479         expressions to pointer-to-data-member of pointer-to-member-functions.
6480
6481 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
6482
6483         * cvt.c (ocp_convert): Delete obsolete code.
6484         * parse.y (permanent_obstack): Delete declaration.
6485         * pt.c (permanent_obstack): Delete declaration.
6486         * repo.c (permanent_obstack): Delete declaration.
6487         (open_repo_file): Use xmalloc instead of permanent_obstack.
6488         (init_repo): Use xstrdup instead of permanent_obstack.
6489
6490 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
6491
6492         * cp-tree.h (VF_DERIVED_VALUE): Remove.
6493         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
6494
6495 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
6496
6497         PR 7470.
6498         C++ ABI change - vfunc ordering.
6499         * class.c (add_virtual_function): Remove.
6500         (dfs_modify_all_vtables): Take list of all declared
6501         virtuals. Assign all that are not in primary base.
6502         (check_for_override): Adjust comments.
6503         (create_vtable_ptr): Take single list of virtuals. Build chain
6504         of declared virtuals here.
6505         (layout_class_type): Take single list of virtuals. Adjust.
6506         (finish_struct_1): Keep virtuals on single list. Adjust.
6507
6508 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
6509
6510         * init.c (build_member_call): Use build_new_method_call, not
6511         build_method_call.
6512
6513 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
6514
6515         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
6516
6517 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
6518
6519         * call.c (build_method_call): Issue a more helpful error message
6520         about ambiguous method names.
6521
6522 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
6523
6524         * tree.c (build_shared_int_cst): Make cache file scope, and
6525         GTY it.
6526
6527 2002-08-02  Jason Merrill  <jason@redhat.com>
6528
6529         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
6530         (cp_expr_size): New fn.
6531         * call.c (build_over_call): Lose empty class hackery.
6532         (convert_arg_to_ellipsis): Promote non-POD warning to error.
6533         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
6534
6535         * semantics.c (expand_body): Do tree optimization in the function
6536         context, too.
6537
6538 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
6539
6540         * cp-tree.h: Move all warning and flag declarations to c-common.h.
6541         * decl.c: Move all warning and flag variables to c-common.c.
6542         * decl2.c: Move all warning and flag variables to c-common.c.
6543         * lex.c (flag_digraphs): Remove.
6544         (warn_traditional): Now in c-common.c.
6545
6546 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
6547
6548         * call.c (build_field_call): Do not look up the field by name.
6549         (build_method_call): Simplify.
6550         (struct z_candidate): Add access_path and conversion_path.  Remove
6551         basetype_path.
6552         (convert_class_to_reference): Adjust use of
6553         add_function_candidate.
6554         (add_candidate): Add conversion_path argument.
6555         (add_function_candidate): Use it.
6556         (add_conv_dndidate): Likewise.
6557         (build_builtin_candidate): Likewise.
6558         (add_template_candidate_real): Add conversion_path argument.
6559         (add_template_conv_candidate): Likewise.
6560         (add_template_candidate): Likewise.
6561         (build_user_type_conversion_1): Use it.
6562         (build_new_function_call): Remove name lookup code.  Adjust use of
6563         add_template_candidate and add_function_candidate.
6564         (build_new_op): Likewise.
6565         (convert_like_real): Use build_special_member_call.
6566         (build_over_call): Use cand->conversion_path.
6567         (build_special_member_call): New method.
6568         (build_new_method_call): Remove name lookup code.
6569         * cp-tree.def (OFFSET_REF): Update documentation.
6570         (TEMPLATE_ID_EXPR): Likewise.
6571         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
6572         (BASELINK_OPTYPE): Likewise.
6573         (build_new_method_call): Adjust prototype.
6574         (build_special_member_call): New method.
6575         (build_baselink): New method.
6576         (build_offset_ref_call_from_tree): Likewise.
6577         (build_call_from_tree): Likewise.
6578         (finish_qualified_call_expr): Remove.
6579         (finish_call_expr): Adjust prototype.
6580         (build_x_function_call): Remove.
6581         * cvt.c (ocp_convert): Use build_special_member_call.
6582         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
6583         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
6584         CALL_EXPR.
6585         (build_offset_ref_call_from_tree): New function.
6586         (build_call_from_tree): Likewise.
6587         * init.c (expand_cleanup): Use build_special_member_call.
6588         (expand_default_init): Likewise.
6589         (build_member_call): Use finish_call_expr.
6590         (build_new_1): Use build_special_member_call.
6591         (push_base_cleanups): Likewise.
6592         * method.c (do_build_assign_ref): Likewise.
6593         * parse.y (template_id): Do not pass a COMPONENT_REF to
6594         lookup_template_function.
6595         (primary): Use parse_finish_call_epxr, not finish_call_expr.
6596         (parse_finish_call_expr): New function.
6597         * pt.c (lookup_template_function): Add assertions.
6598         * search.c (lookup_base): Allow T to be a binfo.
6599         (build_baselink): New function.
6600         (lookup_member): Use it.
6601         * semantics.c (finish_call_expr): Do not do name lookup.
6602         (finish_object_call_expr): Remove #if 0'd code.
6603         (finish_qualified_call_expr): Remove.
6604         * typeck.c (build_x_function_call): Remove.
6605         (build_static_case): Use build_special_member_call.
6606         * typeck2.c (build_functional_cast): Likewise.
6607
6608 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
6609
6610         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
6611
6612 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
6613
6614         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
6615
6616 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
6617
6618         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
6619         documentation.
6620
6621 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
6622
6623         * cp-tree.h: Comment typo fix.
6624
6625 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
6626
6627         * spew.c (space_for_token): Allocate zeroed memory for a new token
6628         chunk.
6629
6630 2002-07-27  Roger Sayle  <roger@eyesopen.com>
6631
6632         * decl.c (builtin_function_1): No need to explicitly mark
6633         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
6634
6635 2002-07-27  Roger Sayle  <roger@eyesopen.com>
6636
6637         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
6638
6639 2002-07-26  Jason Merrill  <jason@redhat.com>
6640
6641         * call.c (build_over_call): Likewise.
6642         (cp_convert_parm_for_inlining): New fn.
6643         (convert_for_arg_passing): New fn.
6644         (convert_default_arg, build_over_call): Use it.
6645         (type_passed_as): New fn.
6646         * pt.c (tsubst_decl): Use it.
6647         * decl2.c (cp_build_parm_decl): New fn.
6648         (build_artificial_parm): Use it.
6649         (start_static_storage_duration_function): Likewise.
6650         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
6651         (grokparms): Don't mess with DECL_ARG_TYPE.
6652         * typeck.c (convert_arguments): Use convert_for_arg_passing.
6653         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6654         Define.
6655         * cp-tree.h: Declare new fns.
6656
6657 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
6658
6659         * cp-tree.h (flag_operator_names): Remove.
6660         * decl2.c (flag_operator_names): Remove.
6661         (lang_f_options): Remove operator-names.
6662         * lex.c (D_OPNAME): Remove.
6663         (reswords): Remove operator names.
6664         (rid_to_yy): Remove operator names.
6665         (init_reswords): No need to handle D_OPNAME.
6666         * spew.c (read_process_identifier): There are no operator
6667         names.
6668
6669 2002-07-26  Jason Merrill  <jason@redhat.com>
6670
6671         * dump.c (cp_dump_tree): Call c_dump_tree.
6672         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
6673
6674 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
6675
6676         * error.c (print_whitespace): Remove.
6677         * g++spec.c (LIBUNWIND): Move.
6678         * mangle.c (mangled_position, write_signed_number): Remove.
6679
6680 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
6681
6682         * decl2.c (cxx_decode_option): Similarly.
6683
6684 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
6685
6686         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
6687         (cxx_sizeof_or_alignof_type): Take a third argument.
6688         (cxx_sizeof): Adjust definition.
6689         (cxx_alignof): Likewise.
6690         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
6691         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
6692         complaining.
6693         (c_sizeof_nowarn): Remove definition.
6694         (build_unary_op): Use cxx_sizeof_nowarn.
6695
6696 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
6697
6698         * tree.c (cp_build_qualified_type_real): When copying
6699         pointer-to-method types, unshare the record that holds
6700         the cached pointer-to-member-function type.
6701
6702 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
6703
6704         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
6705
6706 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
6707
6708         Fix PR/7363:
6709         * typeck.c (cxx_sizeof_or_alignof_type): New function.
6710         (c_sizeof): Remove definition.
6711         (expr_sizeof): Use cxx_sizeof.
6712         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
6713         * decl.c (finish_destructor_body): Use cxx_sizeof.
6714         * semantics.c (finish_alignof): Likewise.
6715         (finish_alignof): Use cxx_alignof.
6716         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
6717         (cxx_sizeof_or_alignof_type): Declare.
6718         (my_friendly_assert): Move to ../c-common.h.
6719
6720 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
6721
6722         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
6723
6724 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6725
6726         PR c++/7347, c++/7348
6727         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
6728         * decl.c (make_typename_type): Use it.
6729         (make_unbound_class_template): Likewise.
6730         (lookup_name_real): Don't call type_access_control if scope is
6731         template parameter dependent.
6732         * parse.y (template_arg): Call make_unbound_class_template with
6733         tf_parsing set.
6734         (nest_name_specifier): Call make_typename_type with tf_parsing set.
6735         (typename_sub0): Likewise.
6736         (typename_sub1): Likewise.
6737         (instantiate_decl): Push class scope.
6738         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
6739         for both static variable and member function template.
6740         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
6741         and arguments.
6742         * search.c (type_access_control): Do type access for TEMPLATE_DECL
6743         too.
6744
6745 2002-07-20  Roger Sayle  <roger@eyesopen.com>
6746
6747         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
6748         test by using positive_option.  Make whitespace consistent.
6749
6750 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
6751
6752         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
6753         members with 'locus'.  Adjust use throughout.
6754         (struct feed):  Likewise.
6755         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
6756         Adjust use.
6757         (snarf_defarg): Use error(), not error_with_file_and_line().
6758
6759 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
6760
6761         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
6762         cpp_options is included.
6763
6764 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6765
6766         PR c++/2862, c++/2863
6767         * pt.c (determine_specialization): Compare the length of
6768         TYPE_ARG_TYPES.  Tidy.
6769
6770 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6771
6772         PR c++/3797
6773         * decl.c (duplicate_decls): Don't propagate inlining parameters from
6774         olddecl to newdecl when newdecl is a specialization of the
6775         instantiation olddecl.
6776
6777 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6778
6779         PR c++/4802, c++/5387
6780         * decl.c (make_typename_type): Use enforce_access.
6781
6782 2002-07-17  Scott Snyder <snyder@fnal.gov>
6783
6784         PR c++/7320
6785         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
6786
6787 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
6788
6789         * class.c (add_method): Correct handling of conversion operators.
6790
6791 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
6792
6793         PR c++/7224
6794         * class.c (add_method): Simplify.
6795
6796 2002-07-11  Jason Merrill  <jason@redhat.com>
6797
6798         PR c++/7279
6799         * tree.c (cp_copy_res_decl_for_inlining): Also copy
6800         TREE_ADDRESSABLE.
6801
6802 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
6803
6804         * pt.c (template_parm_this_level_p, push_template_decl_real):
6805         Pass depth as int pointer.
6806
6807 2002-07-11  Tim Josling  <tej@melbpc.org.au>
6808
6809         Remove front end hard coding from gengtype.c.
6810
6811         * config-lang.in (gtfiles): Add files needed for this front end.
6812
6813 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
6814
6815         * cp-tree.h (unqualified_name_lookup_error): Declare it.
6816         (begin_function_definition): Adjust prototype.
6817         * lex.c (unqualified_name_lookup_error): New function, split out
6818         from ...
6819         (do_identifier): ... here.
6820         * parse.y (parse_begin_function_definition): New function.
6821         (fn.def1): Use it.
6822         * semantics.c (begin_function_definition): Accept decl-specifiers
6823         and attributes as separate parameters.
6824
6825 2002-07-10  Jason Merrill  <jason@redhat.com>
6826
6827         PR c++/6255
6828         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
6829         modifying the old one.
6830
6831 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
6832
6833         * cp-tree.h (constructor_name_p): Declare it.
6834         (check_template_template_default_arg): Likewise.
6835         * class.c (handle_using_decl): Use constructor_name_p.
6836         * decl.c (grokdeclarator): Likewise.
6837         * decl2.c (constructor_name_p): Define it.
6838         * init.c (build_member_call): Use constructor_name_p.
6839         * parse.y (template_parm): Use check_template_template_default_arg.
6840         * pt.c (check_explicit_specialization): Use constructor_name_p.
6841         * semantics.c (check_template_template_default_arg): New function.
6842
6843 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6844
6845         * pt.c (can_complete_type_without_circularity): Add static to
6846         function definition.
6847
6848 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
6849
6850         * cp-tree.h (have_extern_spec): Declare it
6851         * decl.c (have_extern_spec): Define it.
6852         (start_decl): Eliminate use of used_extern_spec.
6853         (start_function): Likewise.
6854         * parse.y (have_extern_spec): Remove declaration.
6855         (used_extern_spec): Likewise.
6856         (frob_specs): Eliminate use of used_extern_spec.
6857         (.hush_warning): Likewise.
6858
6859 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
6860
6861         * Make-lang.in (cp/parse.o): Depend on decl.h.
6862         * cp-tree.h (do_decl_instantiation): Change prototype.
6863         * parse.y: Include decl.h.
6864         (parse_decl_instantiation): New function.
6865         (explicit_instantiation): Use it.
6866         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
6867         and DECLSPECS.
6868
6869 2002-07-07  Roger Sayle  <roger@eyesopen.com>
6870
6871         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
6872         constructor and destructor tests when passed a TEMPLATE_DECL.
6873
6874 2002-07-05  Jason Merrill  <jason@redhat.com>
6875
6876         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
6877         pointers.
6878
6879         PR optimization/7145
6880         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
6881
6882 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
6883
6884         Repair damage on weak-impared targets caused by my previous patch.
6885         * cp-tree.h (import_export_tinfo): Add parameter.
6886         * decl2.c (import_export_tinfo): Add parameter, post adjust
6887         DECL_COMDAT.
6888         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
6889         import_export_tinfo.
6890
6891 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6892
6893         PR c++/6944
6894         * init.c (build_aggr_init): Remove qualifiers of init before calling
6895         build_vec_init.
6896         (build_vec_init): Flatten multi-dimensional array during cleanup.
6897         (build_vec_delete_1): Abort if the type of each element is array.
6898
6899 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
6900
6901         * pt.c (instantiate_class_template): Fix typo.
6902
6903 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6904
6905         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
6906         by CVS conflict in my last patch.
6907
6908 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6909
6910         PR c++/6716
6911         * pt.c (can_complete_type_without_circularity): New function.
6912         (instantiate_class_template): Use it.
6913         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
6914         message due to incomplete fields.
6915
6916 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
6917
6918         PR c++/7112
6919         * mangle.c (write_expression): Add mangling for sizeof when
6920         applied to a type.
6921         * operators.def: Remove stale comment.
6922
6923 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
6924
6925         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
6926         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
6927         (tinfo_decl_type): Replace with ...
6928         (type_info_ptr_type): ... this.
6929         (import_export_tinfo): Declare.
6930         (tinfo_decl_p): Rename to ...
6931         (unemitted_tinfo_decl_p): ... this.
6932         * decl2.c (import_export_decl): Break out tinfo handling into ...
6933         (import_export_tinfo): ... here. New function.
6934         (finish_file): Adjust.
6935         * rtti.c (TINFO_REAL_NAME): New macro.
6936         (init_rtti_processing): Create the tinfo types.
6937         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
6938         (get_tinfo_decl): Adjust.
6939         (get_tinfo_ptr): New function.
6940         (get_type_id): Use it.
6941         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
6942         (ptr_initializer): Use get_tinfo_ptr.
6943         (ptm_initializer): Likewise.
6944         (synthesize_tinfo_var): Break into ...
6945         (get_pseudo_ti_init): ... this. Just create the initializer.
6946         (get_pseudo_ti_desc): .. and this.
6947         (create_real_tinfo_var): Remove.
6948         (create_pseudo_type_info): Don't create the vtable decl here.
6949         (get_vmi_pseudo_type_info): Remove.
6950         (create_tinfo_types): Adjust.
6951         (tinfo_decl_p): Rename to ...
6952         (unemitted_tinfo_decl_p): ... here. Adjust.
6953         (emit_tinfo_decl): Adjust. Create the initializer.
6954
6955 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
6956
6957         PR c++/6695
6958         * pt.c (tsubst_friend_class): Substitute into the context of the
6959         friend before using it.
6960
6961 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
6962
6963         * cp-tree.h (xref_tag): Change prototype.
6964         (handle_class_head): Likewise.
6965         (build_x_component_ref): Likewise.
6966         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
6967         (xref_tag): Take attributes as a separate parameter.
6968         (xref_tag_from_type): Adjust call to xref_tag.
6969         * decl2.c (build_expr_from_tree): Adjust call to
6970         build_x_component_ref.
6971         (handle_class_head): Take attributes as a separate parameter.
6972         * parse.y (parse_xref_tag): New function.
6973         (parse_handle_class_head): Likewise.
6974         (primary): Use parse_xref_tag.
6975         (class_head_decl): Use parse_handle_class_head.
6976         (class_head_defn): Likewise.
6977         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
6978         (build_dynamic_cast_1): Likewise.
6979         (create_pseudo_type_info): Likewise.
6980         (emit_support_tinfos): Likewise.
6981         * typeck.c (build_object_ref): Adjust call to
6982         build_x_component_ref.
6983         (build_x_component_ref): Remove protect parameter.
6984
6985 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
6986
6987         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
6988         * class.c (handle_using_decl): Likewise.
6989         (instantiate_type): Likewise.
6990         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
6991         (xref_basetypes): Change prototype.
6992         (begin_mem_initializers): New function.
6993         (get_overloaded_fn): Likewise.
6994         * decl.c (xref_basetypes): Simplify.
6995         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
6996         * init.c (build_offset_ref): Likewise.
6997         * parse.y (base_init): Use begin_mem_initializers().
6998         (structsp): Adjust call to xref_basetypes.
6999         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
7000         (instantiate_class_template): Adjust call to xref_basetypes.
7001         * semantics.c (begin_mem_initializers): New function.
7002         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
7003         (really_overlaoded_fn): Likewise.
7004         (get_overloaded_fn): New function.'
7005         (get_first_fn): USe BASELINK_FUNCTIONS.
7006
7007 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
7008
7009         * cp-tree.h (SCALAR_TYPE_P): New macro.
7010         (check_for_out_of_scope_variable): New function.
7011         (at_class_scope_p): Likewise.
7012         (finish_fname): Likewise.
7013         * class.c (finish_struct): Use at_function_scope_p.
7014         * decl.c (check_for_out_of_scope_variable): New function, split
7015         out from do_identifier.
7016         (finish_enum): Use at_function_scope_p.
7017         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
7018         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
7019         (primary): Use at_function_scope_p.
7020         * search.c (at_class_scope_p): New function.
7021         * semantics.c (finish_fname): Likewise.
7022         (check_multiple_declarators): Use at_function_scope_p.
7023
7024 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
7025
7026         * parse.y (parse_scoped_id): New function.
7027         (primary): Use it.
7028         * cp-tree.h (do_scoped_id): Adjust declaration.
7029         * lex.c (do_scoped_id): Remove call to yylex.
7030         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
7031         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
7032         expanding it inline.
7033
7034 2002-06-23  Matt Thomas  <matt@3am-software.com>
7035
7036         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
7037         "#if VMS_TARGET".
7038
7039 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7040
7041         * mangle.c (integer_type_codes): Const-ify.
7042
7043 2002-06-20  Richard Henderson  <rth@redhat.com>
7044
7045         PR c++/6747
7046         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
7047         Call put_var_into_stack.
7048
7049 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7050
7051         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
7052         array size calculation.
7053
7054 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7055
7056         PR c++/6892
7057         * pt.c (tsubst_expr): Handle FILE_STMT.
7058
7059 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7060
7061         PR c++/6723
7062         * pt.c (lookup_template_class): Don't build complete argument of
7063         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
7064         argument.
7065
7066 2002-06-19  Akim Demaille  <akim@epita.fr>
7067
7068         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
7069         decl.h's TYPENAME.
7070         * spew.c, lex.c: Adjust.
7071         * parse.y (explicit_instantiation): Add empty action to override
7072         the default $$ = $1 where it introduces a type clash.
7073
7074 2002-06-14  Jason Merrill  <jason@redhat.com>
7075
7076         * semantics.c (begin_for_stmt): Push the 'for' scope before
7077         adding the FOR_STMT.
7078
7079         C++ ABI changes.
7080         * class.c (build_base_field): Set DECL_PACKED.
7081         (layout_class_type): Don't use tail padding of PODs.
7082         * mangle.c (write_unqualified_name): Fix template conversion op
7083         mangling.
7084
7085 2002-06-16  Richard Henderson  <rth@redhat.com>
7086
7087         PR opt/6793
7088         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
7089         after template instantiation.
7090
7091 2002-06-16  Richard Henderson  <rth@redhat.com>
7092
7093         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
7094
7095 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
7096
7097         * cp-tree.h (compiler_error): Remove declaration.
7098         * lex.c (compiler_error): Remove definition.
7099
7100 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
7101
7102         * g++spec.c (LIBUNWIND): New.
7103         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
7104
7105 2002-06-13  Jessica Han  <jessica@cup.hp.com>
7106
7107         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
7108         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
7109         (build_vbase_offset_vtbl_entries): Likewise.
7110         * rtti.c (build_headof): Likewise.
7111         (get_tinfo_decl_dynamic): Likewise.
7112         (create_pseudo_type_info): Likewise.
7113
7114 2002-06-12  Stan Shebs  <shebs@apple.com>
7115
7116         * mpw-config.in: Remove file, no longer used.
7117         * mpw-make.sed: Ditto.
7118
7119 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
7120
7121         * decl2.c: Update call to cpp_handle_option.
7122
7123 2002-06-07  H.J. Lu  (hjl@gnu.org)
7124
7125         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
7126
7127 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
7128
7129         * error.c (cp_error_at): Fix typo.
7130
7131 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
7132
7133         * error.c (cp_diagnostic_starter): Adjust call.
7134         (maybe_print_instantiation_context): Change prototype to take a
7135         'diagnostic_info *'.
7136         (print_instantiation_full_context): Likewise.
7137         (print_instantiation_partial_context): Likewise.
7138         (cp_diagnostic_starter): Likewise.
7139         (cp_diagnostic_finalizer): Likewise.
7140         (cp_print_error_function): Likewise.
7141         (cp_printer): Take a secondary parameter as a 'text_info *'.
7142         Remove output_state savings.  Adjust calls.
7143
7144 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
7145
7146         * pt.c (inline_parm_levels): Mark for GC.
7147
7148         * mangle.c (start_mangling): Allocate G.substitutions here...
7149         (init_mangle): ... rather than here.
7150         (finish_mangling): Clear the varray pointer when done with it.
7151         * spew.c (yylexstring): Don't use VARRAY_FREE.
7152         * search.c (bfs_walk): Don't use VARRAY_FREE.
7153         * decl2.c (pending_statics): Use gengtype to mark.
7154         (deferred_fns): Likewise.
7155         (ssdf_decls): Likewise.
7156         (init_decl2): Delete.
7157         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
7158         (cxx_init_decl_processing): Don't call init_decl2.
7159         (cxx_pop_function_context): Don't use VARRAY_FREE.
7160         * cp-tree.h (struct saved_scope): No need for special marking
7161         of varrays.
7162         (struct language_function): Likewise.
7163         (local_classes): Use gengtype to mark.
7164         (init_decl2): Delete prototype.
7165         * class.c (init_class_processing): Don't use
7166         ggc_add_tree_varray_root.
7167         (build_vtbl_initializer): Don't use VARRAY_FREE.
7168
7169         * decl.c (typename_compare): Don't use same_type_p.
7170
7171         * decl.c: Include hashtab.h instead of hash.h.
7172         (typename_hash): Update to use htab_h.
7173         (typename_compare): Likewise.
7174         (typename_htab): Use gengtype to mark.
7175         (build_typename_type): Update to use htab_h.
7176         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
7177
7178         * Make-lang.in (gt-cp-tree.h): New rule.
7179         (cp/tree.o): Depend on gt-cp-tree.h.
7180         * config-lang.in (gtfiles): Add cp/tree.c.
7181         * tree.c: Include gt-cp-tree.h.
7182         (list_hash_table): Use gengtype to mark.
7183         (init_tree): Use gengtype to mark trees.
7184
7185         * Make-lang.in (cp/decl.o): Add debug.h dependency.
7186         * call.c (struct z_candidate): Use gengtype.
7187         (USER_CONV_CAND): Use WRAPPER_ZC.
7188         (convert_class_to_reference): Use build_zc_wrapper.
7189         (build_type_conversion_1): Likewise.
7190         (build_over_call): Use WRAPPER_ZC.
7191         (add_warning): Use build_zc_wrapper.
7192         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
7193         * cp-tree.h (struct lang_identifier): Use gengtype.
7194         (struct template_parm_index_s): Likewise.
7195         (struct ptrmem_cst): Likewise.
7196         (struct tree_binding): Likewise.
7197         (struct tree_overload): Likewise.
7198         (struct tree_srcloc): Likewise.
7199         (struct tree_wrapper): Likewise.  Also modify to have a pointer
7200         to struct z_candidate rather than void.
7201         (enum cp_tree_node_structure_enum): New.
7202         (union lang_tree_node): New.
7203         (cxx_mark_tree): Delete prototype.
7204         (cp_tree_node_structure): New prototype.
7205         (build_ptr_wrapper): Delete prototype.
7206         (build_int_wrapper): Delete prototype.
7207         (build_zc_wrapper): New prototype.
7208         * decl.c: Include debug.h
7209         (cxx_mark_tree): Delete.
7210         (cp_tree_node_structure): New.
7211         * tree.c (build_ptr_wrapper): Delete.
7212         (build_int_wrapper): Delete.
7213         (build_zc_wrapper): New.
7214
7215         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
7216         Correct typo.  Patch from k_fukui@highway.ne.jp.
7217
7218         * semantics.c (current_stmt_tree): Update for change to
7219         struct language_function.
7220         (finish_mem_initializers): Likewise.
7221         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
7222         * cp-tree.h (struct language_function): Rename from
7223         cp_language_function.  Change all uses.
7224         (cp_function_chain): Don't need to cast.
7225
7226         * class.c (duplicate_tag_error): Reset discriminator.
7227         (check_bases_and_members): Update for data structure changes.
7228         * cp-tree.h (struct lang_id2): Use gengtype.
7229         (flagged_type_tree): Likewise.
7230         (SET_LANG_ID): Use GGC on struct lang_id2.
7231         (struct cp_language_function): Use gengtype.  Remove field
7232         'x_vcalls_possible_p'.
7233         (current_vcalls_possible_p): Delete.
7234         (struct lang_type_header): New.
7235         (struct lang_type_class): Rename from struct lang_type.  Include
7236         struct lang_type_header.
7237         (struct lang_type_ptrmem): New.
7238         (struct lang_type): New.
7239         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
7240         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
7241         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
7242         (struct lang_decl_flags): Use gengtype.  Add discriminators.
7243         (struct lang_decl): Use gengtype.  Add and use discriminators.
7244         Update the macros that reference moved fields.
7245         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
7246         (SET_DECL_THUNK_P): Set discriminator too.
7247         (clear_inline_text_obstack): Delete prototype.
7248         (finish_inline_definitions): Delete prototype.
7249         (mark_pending_inlines): Delete prototype.
7250         (lang_check_failed): New prototype.
7251         * decl.c (struct named_label_use_list): Use gengtype.
7252         (struct named_label_list): Likewise.
7253         (mark_binding_level): Delete.
7254         (mark_named_label_lists): Delete.
7255         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
7256         (cxx_init_decl_processing): Use generated marker routine.
7257         (begin_destructor_body): Delete dead set to
7258         current_vcalls_possible_p.
7259         (mark_lang_function): Delete.
7260         (mark_cp_function_context): Delete.
7261         (lang_mark_tree): Use generated marker routines.
7262         * decl2.c (start_objects): Set discriminator when setting
7263         GLOBAL_INIT_PRIORITY.
7264         * lex.c (retrofit_lang_decl): Set discriminators.
7265         (copy_lang_type): Update for changes to lang_type structure.
7266         (cp_make_lang_type): Set discriminator.
7267         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
7268         * search.c: Include ggc.h.
7269         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
7270         (finish_inline_definitions): Delete.
7271         * spew.c (struct token): Use gengtype.
7272         (struct token_chunk): New.
7273         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
7274         (struct feed): Use gengtype.
7275         (feed_obstack): Delete.
7276         (feed): Mark as GC root.
7277         (pending_inlines): Mark as GC root.
7278         (pending_inlines_tail): Likewise.
7279         (processing_these_inlines): Likewise.
7280         (token_obstack): Make static.
7281         (first_token): Likewise.
7282         (init_spew): Don't initialize deleted things; use gengtype for roots.
7283         (clear_inline_text_obstack): Delete.
7284         (feed_input): Use GC for struct feed.  Update for changes to
7285         struct unparsed_text.
7286         (mark_pending_inlines): Delete.
7287         (next_token): Rename from add_token.  Change all callers.  Update
7288         for changes to struct unparsed_text.
7289         (space_for_token): New.
7290         (remove_last_token): New.
7291         (alloc_unparsed_text): New.
7292         (snarf_block): Take an unparsed_text.  Update for changes to struct
7293         unparsed_text.
7294         (snarf_method): Update for changes to struct unparsed_text.
7295         (snarf_defarg): Update for changes to struct unparsed_text.
7296         * tree.c (lang_check_failed): New.
7297
7298         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
7299         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
7300         (cp/spew.o): Add dependency on gt-<filename>.h.
7301         (cp/decl2.o): Add dependency on gt-<filename>.h.
7302         (cp/call.o): Add dependency on gt-<filename>.h.
7303         (cp/pt.o): Add dependency on gt-<filename>.h.
7304         (cp/repo.o): Add dependency on gt-<filename>.h.
7305         (cp/parse.o): Add dependency on gt-<filename>.h.
7306         * call.c: Use gengtype for roots.
7307         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
7308         decl2.c parse.y pt.c repo.c spew.c.
7309         * cp-tree.h: Use gengtype for roots.
7310         (struct saved_scope): Use GGC, gengtype.
7311         (cp_parse_init): Delete prototype.
7312         (init_pt): Delete prototype.
7313         * decl.c: Use gengtype for roots.
7314         (mark_saved_scope): Delete.
7315         (cxx_init_decl_processing): Don't call deleted initilisation
7316         routines.
7317         (signed_size_zero_node): Delete, unused.
7318         * decl.h: Use gengtype for roots.
7319         * decl2.c: Use gengtype for roots.
7320         * lex.h: Use gengtype for roots.
7321         * parse.y: Use gengtype for roots.
7322         (cp_parse_init): Delete.
7323         * pt.c: Use gengtype for roots.
7324         (init_pt): Delete.
7325         * repo.c: Use gengtype for roots.
7326         * spew.c: Use gengtype for roots.
7327
7328         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
7329         (cp/decl.o): Add dependency on gtype-cp.h.
7330         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
7331         Include gtype-cp.h.  Allow for filename changes.
7332
7333         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
7334         (cp/decl.o): Add cp/gt-decl.h dependency.
7335         * config-lang.in (gtfiles): New.
7336         * tree.h: Rename struct binding_level to struct cp_binding_level.
7337         * decl.c: Rename struct binding_level to struct cp_binding_level.
7338         Include cp/gt-decl.h.
7339         (struct cp_binding_level): Use gengtype.
7340         (make_binding_level): Use GGC on struct cp_binding_level.
7341         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
7342         (cxx_init_decl_processing): Mark free_binding_level as
7343         deletable.
7344
7345         * decl.c (mark_cp_function_context): Update calling sequence.
7346
7347         * decl.c (start_function): Don't free 'struct
7348         cp_language_function'.
7349         (pop_cp_function_context): Likewise.
7350         (save_function_data): Allocate it using GC.
7351         * semantics.c (genrtl_start_function): Don't free 'struct
7352         cp_language_function'.
7353
7354 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
7355
7356         * lang-specs.h: Use cpp_debug_options.
7357
7358 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
7359
7360         * mangle.c, tree.c: Include real.h.
7361         * Make-lang.in: Update dependency lists.
7362
7363 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7364
7365         * lex.c: Don't include c-lex.h.
7366         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
7367
7368 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
7369
7370         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
7371
7372 2002-05-22  Richard Henderson  <rth@redhat.com>
7373
7374         * decl.c (obscure_complex_init): Check for VAR_DECL
7375         before using DECL_THREAD_LOCAL.
7376
7377 2002-05-22  Richard Henderson  <rth@redhat.com>
7378
7379         * decl.c (check_tag_decl): Handle RID_THREAD.
7380         (obscure_complex_init): Reject run-time init of tls.
7381         (grokvardecl, grokdeclarator): Handle RID_THREAD.
7382         * lex.c (reswords): Add __thread.
7383         (rid_to_yy): Map RID_THREAD to SCSPEC.
7384
7385 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
7386
7387         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
7388         * cp-tree.h (cxx_post_options): Kill.
7389         * cp-lex.c (cxx_post_options): Kill.
7390
7391 2002-05-21  Richard Henderson  <rth@redhat.com>
7392
7393         * lex.c (rid_to_yy): Add RID_THREAD.
7394
7395 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
7396
7397         * init.c (build_vec_init): Test for trivial copy-assignment when
7398         copy-assigning arrays.
7399
7400 2002-05-20  Andreas Jaeger  <aj@suse.de>
7401
7402         * init.c (build_default_init): Remove unused variable.
7403
7404 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
7405
7406         * call.c (any_strictly_viable): New.
7407         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
7408
7409 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7410
7411         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
7412
7413 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7414
7415         PR c++/186, DR 259
7416         * pt.c (do_decl_instantiation): Don't complain explicit
7417         instantiation after explicit specialization.
7418         (do_type_instantiation): Likewise.
7419
7420 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
7421
7422         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
7423         renamed from...
7424         (complete_type_or_else): ... this.  Redefined as macro.
7425         (cxx_incomplete_type_diagnostic): Declare.
7426         (cxx_incomplete_type_error): Define as macro.
7427         * init.c (build_delete): Warn about incomplete types other than
7428         void, and use the built-in operator delete for them.
7429         * typeck.c (complete_type_or_diagnostic): Renamed from
7430         complete_type_or_else.  Added warn_only argument, passed to...
7431         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
7432         warnings or errors depending on new warn_only argument.  Renamed
7433         from...
7434         (cxx_incomplete_type_error): ... this.  New implementation in
7435         terms of cxx_incomplete_type_diagnostic.
7436
7437 2002-05-18  Jason Merrill  <jason@redhat.com>
7438
7439         PR c++/6611
7440         * decl2.c (import_export_decl): If we clear
7441         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
7442
7443 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7444
7445         PR c++/6620
7446         * pt.c (verify_class_unification): Don't check if PARM is template
7447         parameter dependent.  Simplify.
7448         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
7449         parameter dependent expression.
7450
7451 2002-05-14  Jason Merrill  <jason@redhat.com>
7452
7453         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
7454         Do set DECL_COMDAT.
7455         (synthesize_tinfo_var): Take the public decl.
7456         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
7457         (emit_tinfo_decl): Adjust.  Call import_export_decl.
7458         * decl2.c (import_export_decl): Simplify tinfo decl handling.
7459
7460 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
7461
7462         * cp-tree.h (struct lang_type): Added non_zero_init.
7463         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
7464         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
7465         * class.c (check_field_decls): Test non_zero_init.
7466         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
7467         zero-to-NULL conversions.
7468         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
7469         type that needs zero-initialization without zeros.
7470         (check_initializer_decl): Compute zero-initializer for types
7471         that require a non-trivial one.
7472         * init.c (build_forced_zero_init): New function.
7473         (build_default_init): Use it.
7474         * tree.c (zero_init_p): New function.
7475         * typeck2.c (force_store_init_value): New function.
7476         (process_init_constructor): Create non-trivial zero-initializers
7477         for array members and class fields.
7478
7479 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
7480
7481         * lang-specs.h: Remove redundant -lang-c++.
7482
7483 2002-05-13  Jason Merrill  <jason@redhat.com>
7484
7485         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
7486         (fixed_type_or_null): See through reference vars.
7487         (build_base_path): Vtable contents are constant.
7488         * typeck.c (get_member_function_from_ptrfunc): Likewise.
7489
7490 2002-05-12  Jason Merrill  <jason@redhat.com>
7491
7492         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
7493         structs are safe.
7494
7495 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7496
7497         * cp-tree.h (flag_ansi): Remove.
7498         * decl2.c (flag_ansi): Remove.
7499         (cxx_decode_option): Set flag_iso and flag_undef.
7500
7501 2002-05-09  Jason Merrill  <jason@redhat.com>
7502
7503         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
7504         Use subtraction rather than a bitmask to get the index.
7505         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
7506
7507         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
7508
7509 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
7510
7511         * Make-lang.in (decl2.o): Update.
7512         * cp-tree.h (warn_multichar): Remove.
7513         * decl2.c: Include c-common.h.
7514         (warn_multichar): Remove.
7515
7516 2002-05-03  Jason Merrill  <jason@redhat.com>
7517
7518         * tree.c (build_cplus_array_type): Only const and volatile get
7519         special handling.
7520
7521         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
7522
7523 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
7524
7525         ABI change, returning simple classes from functions.
7526         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
7527         TYPE_HAS_TRIVIAL_INIT_REF is false or
7528         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
7529
7530 2002-04-30  Jason Merrill  <jason@redhat.com>
7531
7532         PR debug/6436
7533         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
7534         anonymous class with a typedef if there are attributes.
7535
7536 2002-04-29  Paul Eggert  <eggert@twinsun.com>
7537
7538         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
7539
7540 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
7541
7542         PR c++/6477
7543         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
7544         non-NULL first.
7545
7546 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
7547
7548         PR c++/6492
7549         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
7550         enter that scope before name lookup.
7551
7552         PR c++/6486
7553         * method.c (do_build_copy_constructor): Avoid building
7554         cv-qualified reference types.
7555
7556 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
7557
7558         PR c++/5719
7559         * decl.c (grok_op_properties): Assignment ops don't have to return
7560         by value. operator% should.
7561
7562 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
7563
7564         PR c/6343
7565         * decl.c (duplicate_decls): Call merge_weak.
7566
7567 2002-04-26  Richard Henderson  <rth@redhat.com>
7568
7569         * parse.y (malloced_yyss, malloced_yyvs): New.
7570         (yyoverflow): Re-add.  Set them.
7571         (free_parser_stacks): New.
7572
7573 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
7574
7575         PR c++/6497
7576         * method.c (do_build_assign_ref): Pass a derivation to
7577         build_method_call when calling base class assignment operators.
7578
7579 2002-04-26  Richard Henderson  <rth@redhat.com>
7580
7581         * parse.y (yyoverflow): Revert.
7582
7583 2002-04-26  Richard Henderson  <rth@redhat.com>
7584
7585         PR c/3581
7586         * parse.y (string): Remove.  Update all uses to use STRING
7587         instead, and not call combine_strings.
7588         * rtti.c (tinfo_name): Use fix_string_type.
7589         * semantics.c (finish_asm_stmt): Don't call combine_strings.
7590         * spew.c (yylexstring): New.
7591         (read_token): Use it.
7592
7593 2002-04-25  Richard Henderson  <rth@redhat.com>
7594
7595         PR c/2161
7596         * parse.y (yyoverflow): New.
7597
7598 2002-04-25  Jason Merrill  <jason@redhat.com>
7599
7600         PR c++/5607
7601         * search.c (check_final_overrider): No longer static.
7602         * class.c (update_vtable_entry_for_fn): Call it.
7603         * cp-tree.h: Adjust.
7604
7605 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7606
7607         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7608         * cp-tree.h (cxx_set_yydebug): Die.
7609         * lex.c (YYDEBUG): Get from c-lex.h.
7610         (cxx_set_yydebug): Remove.
7611         * parse.y: Include c-lex.h.
7612         (YYDEBUG): Get from c-lex.h.
7613
7614 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
7615
7616         PR c++/6438.
7617         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
7618         void.
7619
7620 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
7621
7622         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
7623         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
7624         Redefine.
7625         * cp-tree.h (cp_attribute_table): Rename.
7626         * decl.c (lang_attribute_table): Remove declaration.
7627         (cxx_init_decl_processing): Don't set it.
7628         * tree.c (cp_attribute_table): Rename.
7629
7630 2002-04-24  Jason Merrill  <jason@redhat.com>
7631
7632         PR c++/6331
7633         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
7634         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
7635         The pedwarn for array assignment is now unconditional.
7636         * tree.c (build_cplus_array_type_1): Still process simple array types
7637         normally in templates.
7638
7639         PR c++/6395
7640         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
7641         stuff for comdats.
7642
7643 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
7644
7645         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
7646         node with attributes.
7647
7648 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
7649
7650         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
7651         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
7652
7653 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
7654
7655         PR c++/6256:
7656         * pt.c (tsubst_friend_class): Handle templates with explicit
7657         nested names.
7658
7659         PR c++/6331:
7660         * typeck.c (merge_types): Remember the cv-qualification of pointer
7661         types when merging them.
7662
7663 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7664
7665         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
7666         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
7667         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
7668         cxx_mark_function_context): New.
7669         * decl.c (push_cp_function_context, pop_cp_function_context,
7670         mark_cp_function_context): Rename for consistency.
7671         (cxx_init_decl_processing): Don't set old hooks.
7672
7673 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7674
7675         * call.c (convert_type_from_ellipsis): Rename, update.
7676         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
7677         * cp-tree.h (convert_type_from_ellipsis): Rename.
7678         * decl.c (cxx_init_decl_processing): Don't set hook.
7679
7680 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7681
7682         * call.c (build_new_method_call): Update.
7683         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
7684         * cp-tree.h (cxx_incomplete_type_error): New.
7685         * decl.c (grokdeclarator, grokparms): Update.
7686         * decl2.c (check_classfn): Update.
7687         * pt.c (tsubst): Update.
7688         * typeck.c (complete_type_or_else, expr_sizeof,
7689         decay_conversion): Update.
7690         * typeck2.c (incomplete_type_error): Rename.
7691         (add_exception_specifier): Update.
7692
7693 2002-04-18  Jason Merrill  <jason@redhat.com>
7694
7695         PR c++/5658
7696         * search.c (setup_class_bindings): A class template qualifies as a
7697         type binding.
7698
7699 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
7700
7701         PR c++/6316
7702         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
7703         before expanding.
7704
7705 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
7706
7707         * init.c (begin_init_stmts): Remove commented out code.
7708         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
7709         * semantics.c (begin_gobal_stmt_expr): Adjust call to
7710         expand_start_stmt_expr.
7711
7712 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
7713
7714         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
7715         dso_handle itself, to __cxa_atexit.
7716
7717 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7718
7719         * error.c (cxx_print_error_function): Adjust call to macros.
7720
7721 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
7722
7723         * class.c (layout_virtual_bases): Do all dsize computation on trees.
7724
7725 2002-04-14  Jason Merrill  <jason@redhat.com>
7726
7727         * typeck.c (get_member_function_from_ptrfunc): Don't do
7728         gratuitious division and multiplication on
7729         ptrmemfunc_vbit_in_delta targets.
7730
7731 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
7732
7733         PR c++/5373.
7734         * semantics.c (finish_expr_stmt): Remember the type of the
7735         expression before any conversions are performed.
7736
7737 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
7738
7739         PR c++/5189.
7740         * call.c (add_template_candidate_real): Do not treat member
7741         templates as copy constructors.
7742
7743 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
7744
7745         * decl.c (duplicate_decls): Do not copy the RTL for a variable
7746         declaration if the old variable had an incomplete type and the new
7747         variable does not.
7748         (complete_vars): Do not call layout_decl for completed variables.
7749
7750 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
7751
7752         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
7753         with an explicit one.
7754         (follow_tag_typedef): New.
7755         (lookup_tag): Use it to extract the tag of an explicit typedef.
7756         (xref_tag): Likewise.
7757
7758 2002-04-11  Andrew Haley  <aph@redhat.com>
7759
7760         * typeck.c (type_after_usual_arithmetic_conversions):
7761         If two types have the same variant, return immediately.
7762         When two floating-point operands are the same precision:
7763           convert to float if one of the operands is float;
7764           if neither operand is one of the standard types, return the type
7765           of the first operand.
7766
7767 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
7768
7769         PR c++/5507
7770         * decl.c (make_typename_type): Remove implicit typenameness.
7771
7772 2002-04-09  Jason Merrill  <jason@redhat.com>
7773
7774         PR optimization/6189
7775         * semantics.c (genrtl_start_function): Don't free
7776         DECL_SAVED_FUNCTION_DATA for inline functions.
7777
7778         * init.c (build_member_call): For now, don't convert to
7779         intermediate base if it would cause an error.
7780
7781 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
7782
7783         * parse.y (namespace_qualifier, maybe_identifier,
7784         begin_explicit_instantiation, end_explicit_instantiation,
7785         apparent_template_type, .finish_template_type,
7786         do_id, maybe_init, defarg_again, component_decl_1):
7787         Add ending ';', in accordance with POSIX.
7788
7789 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
7790
7791         PR c++/5571
7792         * class.c (layout_class_type): Remember incomplete static
7793         variables.
7794         (finish_struct_1): Call complete_vars, not
7795         hack_incomplete_structures.
7796         * cp-tree.h (hack_incomplete_structures): Rename to ...
7797         (complete_vars): ... this.
7798         (struct saved_scope): Remove incomplete.
7799         (namespace_scope_incomplete): Remove.
7800         * decl.c (struct binding_level): Remove incomplete.
7801         (incomplete_vars): New variable.
7802         (mark_binding_level): Don't mark incomplete.
7803         (print_binding_level): Don't print it.
7804         (mark_saved_scope): Don't mark incomplete.
7805         (pushdecl): Use maybe_register_incopmlete_var.
7806         (cxx_init_decl_processing): Register incomplete_vars for GC.
7807         (start_decl_1): Clarify error message.
7808         (hack_incomplete_vars): Remove.
7809         (maybe_register_incomplete_var): New function.
7810         (complete_vars): Likewise.
7811
7812 2002-04-06  Jason Merrill  <jason@redhat.com>
7813
7814         PR c++/4934
7815         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
7816         set before checking it.
7817
7818         PR c++/525
7819         * init.c (build_member_call): Use build_scoped_ref.
7820         (resolve_offset_ref): Likewise.
7821         * call.c (build_scoped_method_call): Likewise.
7822         * tree.c (maybe_dummy_object): Kludge around current_class_type being
7823         wrong.
7824         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
7825         * cp-tree.h: Adjust.
7826
7827         * init.c (push_base_cleanups): Just use build_scoped_method_call.
7828
7829         PR c++/6179
7830         * method.c (implicitly_declare_fn): Pass unqualified type to
7831         synthesize_exception_spec.
7832
7833 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
7834
7835         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7836         * cvt.c: Update comment.
7837         * init.c (expand_cleanup_for_base): Update.
7838         * semantics.c (finish_parenthesized_expr): Update.
7839         * typeck.c (cp_truthvalue_conversion): Update.
7840
7841 2002-04-04  Jason Merrill  <jason@redhat.com>
7842
7843         * semantics.c (finish_eh_cleanup): New fn.
7844         * cp-tree.h: Add prototype.
7845         * init.c (perform_member_init, expand_cleanup_for_base): Use
7846         finish_eh_cleanup.
7847         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
7848         * cp-tree.h: Remove references.
7849         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
7850         * dump.c (cp_dump_tree): Likewise.
7851         * pt.c (tsubst_expr): Likewise.
7852         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
7853         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
7854         * tree.c (cp_statement_code_p): Likewise.
7855
7856         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
7857
7858         PR c++/5636
7859         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
7860         cleanup for nrv.
7861
7862         PR c++/5104
7863         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
7864         specifiers.
7865         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
7866
7867 2002-04-03  Richard Henderson  <rth@redhat.com>
7868
7869         * cp-lang.c (cxx_warn_unused_global_decl): New.
7870         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
7871
7872 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
7873
7874         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
7875         * tree.c (init_tree): Don't set hook.
7876
7877 2002-04-03  Roger Sayle  <roger@eyesopen.com>
7878
7879         PR c++/5998:
7880         * decl.c (duplicate_decls): Don't mess with assembler names when
7881         redeclaring builtin functions as static.
7882
7883 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7884
7885         * call.c (build_addr_func): Update.
7886         * class.c (resolve_address_of_overloaded_function): Update.
7887         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7888         * cp-tree.h (cxx_mark_addressable): New.
7889         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
7890         * decl2.c (build_cleanup): Update.
7891         * except.c (build_throw): Update.
7892         * init.c (resolve_offset_ref): Update.
7893         * pt.c (convert_nontype_argument): Update.
7894         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
7895         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
7896         unary_complex_lvalue): Update.
7897         (mark_addressable): Rename.
7898
7899 2002-04-01  Roger Sayle  <roger@eyesopen.com>
7900
7901         PR c++/5998:
7902         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
7903         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
7904         but follow the SET_DECL_RTL idiom used elsewhere in the function.
7905
7906 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7907
7908         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
7909         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
7910         * decl.c (grokdeclarator): Update.
7911         * mangle.c (write_integer_cst): Update.
7912         * typeck.c (build_binary_op): Update.
7913
7914 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
7915
7916         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
7917         * lex.c (cxx_init): Don't set hook.
7918
7919 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
7920
7921         * Make-lang.in (error.o): Update.
7922         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
7923         * cp-tree.h (struct diagnostic_context): Predeclare.
7924         (cxx_print_error_function): New.
7925         * error.c: Include langhooks-def.h.
7926         (lang_print_error_function): Rename.  Update.
7927         (init_error): Don't set hook.
7928
7929 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
7930
7931         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
7932         Redefine.
7933         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
7934         * decl.c (finish_enum): Similarly.
7935         * error.c (dump_type): Similarly.
7936         * lex.c (cxx_init): Similarly.
7937         * mangle.c (write_builtin_type): Similarly.
7938         * typeck.c (comptypes): Similarly.
7939
7940 2002-03-28  Roger Sayle  <roger@eyesopen.com>
7941
7942         PR c++/5998:
7943         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
7944         in the g++ front-end.
7945         (duplicate_decl): Allow redefinition of anticipated built-ins.
7946         Fix inlining problem by over-writing the old DECL_RTL.
7947         (lookup_namespace_name): Fail to find an identifier in the
7948         specified namespace if its still anticipated.
7949         (builtin_function_1): New function split out from builtin_function
7950         to create a builtin in the current namespace with given context.
7951         (builtin_function): Call builtin_function_1 to define the
7952         appropriate builtins in both the std and global namespaces.
7953         (select_decl): Don't test for anticipated decls here.
7954         (unqualified_namespace_lookup): Instead ignore them whilst
7955         searching through scopes and namespaces.
7956         * decl2.c (do_nonmember_using_decl): If a using declaration
7957         specifies an anticipated built-in function, mark it as no longer
7958         anticipated in that scope.
7959         (ambiguous_decl):  Avoid resolving to an anticipated decl.
7960         * lex.c (do_scoped_id): Fail to find an identifier in the global
7961         namespace if its still anticipated.
7962
7963 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
7964
7965         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
7966         * cp-tree.h (cp_make_lang_type): Rename.
7967         * lex.c (cp_make_lang_type): Rename.
7968         (make_aggr_type): Update.
7969         * tree.c (init_tree): Don't set make_lang_type_fn.
7970
7971 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
7972
7973         PR c++/6073
7974         * class.c (finish_struct_1): Update static field's DECL_MODE even
7975         if its type is a variant of t.
7976
7977 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
7978
7979         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
7980         * cp-tree.h (cxx_insert_default_attributes): New.
7981         * decl.c (insert_default_attributes): Rename.
7982
7983 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
7984
7985         PR c++/4884
7986         * call.c (build_op_delete_call): Allow for the fact the placement
7987         may be a COMPOUND_EXPR.
7988
7989 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
7990
7991         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
7992         * cp-tree.h (init_cplus_expand): Remove.
7993         (cxx_expand_expr): New.
7994         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
7995         fix prototype.
7996         (init_cplus_expand): Remove.
7997         * lex.c (cxx_init): Don't call init_cplus_expand.
7998
7999 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
8000
8001         PR c++/4884.
8002         * init.c (build_new_1): Allow for the fact the result of
8003         build_function_call may be a COMPOUND_EXPR.
8004
8005 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
8006
8007         PR c++/5682
8008         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
8009         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8010         (dfs_skip_nonprimary_vbases_markedp): Remove.
8011         * search.c (get_shared_vbase_if_not_primary): Remove.
8012         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8013         (dfs_skip_nonprimary_vbases_markedp): Remove.
8014         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
8015         (dfs_marked_real_bases_queue_p): Likewise.
8016
8017 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
8018
8019         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8020         * cp-tree.h (cxx_mark_tree): New.
8021         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
8022
8023 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8024
8025         * cp-tree.h (cxx_maybe_build_cleanup): New.
8026         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
8027         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
8028         * tree.c (build_target_expr): Update.
8029         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
8030
8031 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
8032
8033         * decl2.c (cxx_decode_option): Handle -E.
8034         * lang-specs.h (default_compilers): Preprocess with cc1plus.
8035         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
8036
8037 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
8038
8039         PR c++/6037
8040         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
8041
8042 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8043
8044         * error.c (dump_type): Be careful about implicit typenames.
8045
8046 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8047
8048         PR C++/3656
8049         * semantics.c (finish_base_specifier): Handle erronous base
8050         classes.
8051
8052 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
8053
8054         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
8055         REAL_IS_NOT_DOUBLE.
8056
8057 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
8058
8059         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
8060         an index into the vtable_entry array regardless of
8061         TARGET_PTRMEMFUNC_VBIT_LOCATION.
8062
8063 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
8064
8065         * tree.c (cp_cannot_inline_tree_fn): Same.
8066
8067 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
8068
8069         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8070         insert_block, getdecls, global_bindings_p): New.
8071
8072 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
8073
8074         PR c++/4361
8075         * mangle.c (struct globals) Add internal_mangling_p member.
8076         (write_template_param): Do internal mangling, if needed.
8077         (mangle_conv_op_name_for_type): Request internal mangling.
8078
8079 2002-03-20  Jason Merrill  <jason@redhat.com>
8080
8081         PR c++/2136
8082         * init.c (build_delete): Check access for a member op delete here.
8083         * decl2.c (delete_sanity): Not here.
8084
8085 2002-03-19  Jason Merrill  <jason@redhat.com>
8086
8087         PR c++/5118
8088         * class.c (get_vfield_name): Use the constructor_name.
8089
8090 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8091
8092         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8093         * cp-tree.h (lang_printable_name): Rename.
8094         * error.c (lang_decl_name): Use new hook.
8095         * lex.c (cxx_init): Remove old hook.
8096         * pt.c (tsubst_decl): Use new hook.
8097         * tree.c (lang_printable_name): Rename.
8098
8099 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
8100
8101         PR c++/3882
8102         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
8103         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
8104         only after recording the declaration.
8105
8106 2002-03-18  Jason Merrill  <jason@redhat.com>
8107
8108         PR c++/2039
8109         * init.c (resolve_offset_ref): Hand off to build_component_ref.
8110
8111         PR c++/4222, c++/5995
8112         * call.c (build_over_call): Fix empty class logic.
8113
8114         PR c++/3870
8115         * cp-tree.h (struct saved_scope): Add last_parms field.
8116         * decl.c (maybe_push_to_top_level): Save last_function_parms.
8117         (pop_from_top_level): Restore it.
8118
8119         PR c++/4377
8120         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
8121         NON_LVALUE_EXPRs.
8122
8123         PR c++/4003
8124         * pt.c (tsubst_friend_function): Use decl_namespace_context.
8125
8126         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
8127         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
8128         type with a nontrivial destructor.
8129
8130 2002-03-17  Jason Merrill  <jason@redhat.com>
8131
8132         PR c++/4460
8133         * class.c (build_base_path): Virtual base layout is fixed in
8134         in-charge [cd]tors.
8135
8136 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
8137
8138         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8139         * parse.y (yyparse): Remove macro.
8140
8141 2002-03-17  Jason Merrill  <jason@redhat.com>
8142
8143         PR c++/5757
8144         * init.c (build_new_1): Pass the right pointer to op delete.
8145
8146 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
8147
8148         PR c++/4361
8149         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
8150         conversion operators go.
8151         (struct lang_decl_flags): Add template_conv_p and unused
8152         bitfields.
8153         (DECL_TEMPLATE_CONV_FN_P): New macro.
8154         * call.c (build_user_type_conversion_1): Don't check second type
8155         conversion of overload set first.
8156         * class.c (add_method): Make sure templated conversion operators
8157         all end up on slot 2.
8158         * lex.c (do_identifier): A conversion operator token might be
8159         satisfied by a templated conversion operator.
8160         * pt.c (check_explicit_specialization): Use
8161         CLASSTYPE_FIRST_CONVERSION_SLOT.
8162         (template_parm_this_level_p): New function.
8163         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
8164         * search.c (lookup_fnfields_1): Template conversions will be on
8165         the first slot.
8166         * typeck.c (build_component_ref): Preserve the type of an
8167         conversion operator name on the overload type.
8168         (build_x_function_call): Retrieve the conversion operator name.
8169
8170 2002-03-15  Richard Henderson  <rth@redhat.com>
8171
8172         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
8173
8174 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
8175
8176         * cp-tree.h (CLEANUP_DECL): Remove.
8177         (CLEANUP_EXPR): Likewise.
8178         * decl.c (destroy_local_var): Simplify.
8179         (maybe_build_cleanup): Tidy.
8180         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
8181         * semantics.c (cp_expand_stmt): Likewise.
8182         * cp/tree.c (cp_statement_code_p): Likewise.
8183
8184 2002-03-15  Jason Merrill  <jason@redhat.com>
8185
8186         PR c++/5857
8187         * decl.c (duplicate_decls): Use merge_types instead of common_type.
8188         * typeck.c (common_type): Just hand off to
8189         type_after_usual_arithmetic_conversions and
8190         composite_pointer_type.
8191         (merge_types): New fn.
8192         (commonparms): Use it instead of common_type.
8193         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
8194         (composite_pointer_type): Also handle attributes.
8195         * cp-tree.h: Declare merge_types.
8196
8197         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
8198         variables.
8199         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
8200
8201 2002-03-14  Richard Henderson  <rth@redhat.com>
8202
8203         * decl.c: Include c-pragma.h.
8204         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
8205         * Make-lang.in: Update dependencies.
8206
8207 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
8208
8209         PR c++/5908
8210         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
8211         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
8212
8213 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
8214
8215         * mangle.c (write_builtin_type): Handle 128-bit integers even if
8216         they are not a standard integer type.
8217
8218 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
8219
8220         * cp-tree.h (init_init_processing): Remove declaration.
8221         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
8222         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
8223
8224 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8225
8226         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
8227         Define.
8228         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
8229         tree_code_length.
8230         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
8231         cplus_tree_code_name): Delete.
8232         (cxx_init): Don't call add_c_tree_codes, instead set
8233         lang_unsafe_for_reeval.  Don't try to copy into the various
8234         tree_code arrays.
8235
8236 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
8237
8238         PR c++/5659
8239         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
8240         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
8241         definitions.
8242
8243 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
8244
8245         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
8246         DR209 is now not a defect.
8247         * cp-tree.h (skip_type_access_control): Remove.
8248         * decl.c (grokdeclarator): Do type access control for friend
8249         declarations.
8250         * semantics.c (decl_type_access_control): Don't reset
8251         current_type_lookups.
8252         (save_type_access_control): Always save the lookups.
8253         (skip_type_access_control): Remove.
8254         (finish_class_definition): Don't change type_lookups.
8255
8256 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
8257
8258         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
8259         It is incorrect.
8260         * typeck.c (build_static_cast): Compare non-qualified types
8261         with pointer to member conversions.
8262
8263 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
8264             Daniel Berlin  <dan@dberlin.org>
8265
8266         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
8267         (cxx_get_alias_set): Use it.
8268
8269 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8270
8271         * cp-tree.h (stabilize_expr): Prototype.
8272
8273 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8274
8275         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
8276         conditional return void.
8277
8278 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
8279
8280         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
8281         * cp-tree.h (cxx_unsave): New.
8282         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
8283         (init_tree): Update.
8284
8285 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8286
8287         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
8288         explicit sizeof/sizeof.
8289         * decl2.c (cxx_decode_option): Likewise.
8290         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
8291
8292 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8293
8294         PR c++/775
8295         * decl.c (lookup_tag): Only reject enum/class mismatch, not
8296         class/union mismatch.
8297         * parse.y (check_class_key): New function.
8298         (structsp): Call it.
8299
8300 2002-03-01  Michael Matz  <matz@suse.de>
8301
8302         * typeck.c (cp_pointer_int_sum): Complete inner type which is
8303         used later by size_in_bytes().
8304
8305 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
8306
8307         * cp-tree.h:  Require __GNUC__ to be #defined.
8308         (build_init):  Add missing prototype.
8309
8310 2002-03-01  Jason Merrill  <jason@redhat.com>
8311
8312         * except.c: Don't include decl.h or obstack.h.  Do include
8313         tree-inline.h.
8314         (build_throw): Destroy temporaries from the thrown
8315         expression before calling __cxa_throw.  Construct a thrown
8316         temporary directly into the exception object.
8317         (stabilize_throw_expr): New function.
8318         (wrap_cleanups_r): New function.
8319         * tree.c (stabilize_expr): New function.
8320         * init.c (build_init): New function.
8321         * Make-lang.in (cp/except.o): Adjust .h deps.
8322
8323 2002-02-28  Jason Merrill  <jason@redhat.com>
8324
8325         * search.c (lookup_base_r): Don't clear is_non_public just because
8326         we found a friendly scope.
8327
8328         * decl.c (finish_function): Only warn about missing return
8329         statement with -Wreturn-type.
8330
8331 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
8332
8333         * class.c (build_clone): Update.
8334         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
8335         * cp-tree.h (cxx_dup_lang_specific_decl): New.
8336         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
8337         (copy_decl): Update.
8338         * method.c (make_thunk): Update.
8339
8340 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
8341
8342         * decl2.c: Delete traditional-mode-related code copied from
8343         the C front end but not used, or used only to permit the
8344         compiler to link.
8345
8346 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
8347
8348         PR c++/4093
8349         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
8350         to void.
8351
8352 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
8353
8354         PR other/5746
8355         * semantics.c (finish_switch_cond): Don't call get_unwidened
8356         if error_mark_node.
8357
8358 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
8359
8360         PR c++/2645, DR 295
8361         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
8362         tf_keep_type_decl.
8363         (make_typename_type): Use tsubst_flags_t.
8364         * decl.c (make_typename_type): Adjust. Return non-artificial
8365         TYPE_DECLs, if required.
8366         (grokdeclarator): Simplify CVR qualification handling. Allow bad
8367         qualifiers on typedef types.
8368         * decl2.c (handle_class_head): Adjust make_typename_type call.
8369         * parse.y (nested_name_specifier): Likewise.
8370         (typename_sub0): Likewise.
8371         (typename_sub1): Likewise.
8372         * pt.c (convert_template_argument): Adjust make_typename_type
8373         return value.
8374         (tsubst): Adjust cp_build_qualified_type_real calls.
8375         (check_cv_quals_for_unify): Cope with allowing bad qualifications
8376         on template type parms.
8377         (instantiate_decl): Recheck substitutions to give warnings on bad
8378         qualifications.
8379         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
8380
8381 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
8382
8383         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
8384
8385         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
8386         unless DECL_ALWAYS_INLINE.
8387
8388 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
8389
8390         * typeck.c (cp_pointer_int_sum): Renamed from
8391         pointer_int_sum, call pointer_int_sum.
8392
8393 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
8394
8395         * decl.c (duplicate_decls): Return 0 if issued error about
8396         redeclaration.
8397
8398 2002-02-19  Jason Merrill  <jason@redhat.com>
8399
8400         ABI change: Mangle `void (A::*)() const' as
8401         M1AKFvvE, not MK1AFvvE.
8402         * mangle.c (write_function_type): Write cv-quals for member
8403         function type here.
8404         (write_pointer_to_member_type): Not here.
8405
8406 2002-02-18  Jason Merrill  <jason@redhat.com>
8407
8408         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
8409         (do_decl_instantiation): Likewise.
8410
8411 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8412
8413         PR c++/5685
8414         * decl.c (duplicate_decls): Make warning unconditional
8415         if duplicate default argument declarations are present.
8416
8417 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
8418
8419         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
8420         shortening.
8421
8422 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
8423
8424         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
8425         remove incorrect comment. Move #if 0'd code to common path. Use
8426         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
8427
8428 2002-02-13  Jason Merrill  <jason@redhat.com>
8429
8430         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
8431         (finish_function): Don't warn if current_function_returns_null.
8432
8433         * typeck2.c (digest_init): Do handle values of vector type.
8434
8435         * typeck2.c (digest_init, process_init_constructor): Treat vectors
8436         like arrays.
8437
8438 2002-02-11  Jason Merrill  <jason@redhat.com>
8439
8440         * parse.y (reserved_declspecs): Don't handle attributes.
8441         (reserved_typespecquals): Handle them here.
8442         * Make-lang.in (parse.c): Adjust expected conflicts.
8443
8444 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
8445
8446         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
8447         instead of compstmt.
8448         (compstmt_or_stmtexpr): Renamed from compstmt.
8449         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
8450
8451 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
8452
8453         Rename instantiate_type_flags to tsubst_flags_t & expand use.
8454         * cp-tree.h (instantiate_type_flags): Rename to ...
8455         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
8456         add tf_warning flag.
8457         (instantiate_type): Adjust prototype.
8458         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
8459         do_type_instantiation, cp_build_qualified_type_real): Likewise.
8460         cp_build_qualified_type: Adjust.
8461         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
8462         tf_*.
8463         * call.c (standard_conversion): Rename itf_* to tf_*.
8464         (reference_binding): Likewise.
8465         (convert_like_real): Likewise.
8466         * cvt.c (cp_convert_to_pointer): Likewise.
8467         (convert_to_reference): Likewise.
8468         * decl.c (lookup_namespace_name): Use tf_* flags.
8469         (make_typename_type): Likewise.
8470         (grokdeclarator): Likewise.
8471         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
8472         (coerce_template_template_parms, convert_template_argument,
8473         coerce_template_parms, maybe_get_template_decl_from_type_decl,
8474         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
8475         instantiate_class_template, tsubst_template_arg_vector,
8476         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
8477         tsubst_decl, tsubst_arg_types, tsubst_function_type,
8478         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
8479         instantiate_template, fn_type_unification,
8480         resolve_overloaded_unification, verify_class_unification,
8481         unify, get_bindings_real, do_type_instantiation,
8482         regenerate_decl_from_template, instantiate_decl,
8483         tsubst_initializer_list, tsubst_enum,
8484         get_mostly_instantiated_function_type,
8485         invalid_nontype_parm_type_p): Likewise.
8486         * tree.c (cp_build_qualified_type_real): Likewise.
8487         * typeck.c (build_binary_op): Rename itf_* to tf_*.
8488         (build_ptrmemfunc): Likewise.
8489         (convert_for_assignment): Likewise.
8490
8491 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
8492
8493         PR c++/109
8494         * decl.c (grokdeclarator): Allow friend declarations from
8495         dependent types.
8496         * decl2.c (handle_class_head): Don't push into template parm contexts.
8497         * pt.c (push_template_decl_real): Template parm contexts are never
8498         being defined.
8499
8500 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
8501
8502         * class.c: Include target.h.
8503         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
8504         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
8505         bit-field layout.
8506         * Make-lang.in: Adjust deps.
8507
8508 2002-02-05  Jason Merrill  <jason@redhat.com>
8509
8510         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
8511
8512 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
8513
8514         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
8515         (finish_switch_cond): Set SWITCH_TYPE.
8516
8517 2002-02-04  Richard Henderson  <rth@redhat.com>
8518
8519         * method.c (use_thunk): Always initialize the block tree.  Reindent.
8520         * semantics.c (expand_body): Emit thunks after function, not before.
8521
8522 2002-02-04  Jason Merrill  <jason@redhat.com>
8523
8524         * decl.c (start_function): Call cplus_decl_attributes immediately
8525         after grokdeclarator.
8526
8527         * decl.c (start_function): Combine DECL_RESULT handling code.
8528
8529 2002-02-03  Jason Merrill  <jason@redhat.com>
8530
8531         * xref.c: Remove.
8532         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
8533         (cp/xref.o): Remove dependencies.
8534         * class.c (finish_struct_1, check_methods): Don't call xref fns.
8535         (finish_struct_1): Likewise.
8536         * friend.c (make_friend_class): Likewise.
8537         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
8538         * spew.c (read_process_identifier): Likewise.
8539
8540 2002-02-01  Jason Merrill  <jason@redhat.com>
8541
8542         PR c++/4872
8543         * decl.c (finish_function): Warn about a non-void function with
8544         no return statement and no abnormal exit.
8545         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
8546         (current_function_returns_abnormally): New macro.
8547         * call.c (build_call): Set it.
8548
8549         * typeck.c (build_component_ref): Always complain about offsetof
8550         constructs on non-PODs.  Only make it an error for members of
8551         virtual bases.
8552
8553         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
8554         (dump_function_decl): Always dump parms.
8555
8556         * decl2.c (finish_static_data_member_decl): Complain about a local
8557         class with a static data member.
8558
8559         PR c++/4286
8560         * search.c (lookup_field_1): Don't xref a static data member
8561         just because we looked it up.
8562
8563 2002-01-31  Jason Merrill  <jason@redhat.com>
8564
8565         * Make-lang.in (parse.c): Handle .output file.
8566
8567         PR c++/3395
8568         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
8569         not TREE_TYPE.
8570         * semantics.c (finish_class_definition): Adjust.
8571
8572         Allow attributes in parms and casts.
8573         * parse.y (named_parm): Don't strip attrs.
8574         (declmods): Remove 'attributes' production.
8575         (nonempty_cv_qualifiers): Accept attributes.
8576         (ATTRIBUTE): Give precedence.
8577         * decl.c (groktypename): Handle attributes.
8578         (grokparms): Likewise.
8579
8580 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
8581
8582         * decl2.c (cxx_decode_option): Pass 0 as last argument to
8583         cpp_handle_option.
8584         * lang-specs.h: Use cpp_unique_options instead of cpp_options
8585         when used together with cc1_options.
8586
8587 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
8588
8589         PR c++/5132
8590         * typeck2.c (digest_init): Make sure non-array core type is
8591         instantiated.
8592         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
8593         constructor, rather than build a new one.
8594         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
8595         PURPOSE of constructor elts.
8596
8597 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
8598
8599         * Make-lang.in (parse.c): Adjust expected number of
8600         shift-reduce conflicts.
8601         (decl.o): Depend on diagnostic.h.
8602         * decl.c: Include diagnostic.h.
8603         (grokdeclarator): Check for null pointer.
8604         (finish_function): Don't abort when
8605         current_binding_level->parm_flag != 1, if errors have
8606         occurred; throw away the statement tree and extra binding
8607         levels, and continue.
8608         * lex.c (note_list_got_semicolon): Check for null pointer.
8609         * method.c (hack_identifier): Just return error_mark_node if
8610         value is error_mark_node.
8611         * parse.y (primary: TYPEID(type_id)): No need to use
8612         TYPE_MAIN_VARIANT here.
8613         (handler_seq): Accept an empty list of catch clauses and
8614         generate a fake handler block to avoid later crashes.
8615         (ansi_raise_identifier): Accept the error token too.
8616         * semantics.c (begin_class_definition,
8617         finish_class_definition): Check for error_mark_node.
8618
8619 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
8620
8621         * typeck2.c (friendly_abort): Delete definition.
8622         * cp-tree.h (friendly_abort): Don't prototype.
8623         (my_friendly_assert): Use fancy_abort.
8624
8625 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8626
8627         * cp-tree.h (my_friendly_abort): Remove.
8628
8629 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
8630
8631         * spew.c (pending_inlines, pending_inlines_tail,
8632         processing_these_inlines): Make static.
8633         (mark_pending_inlines): Remove static.
8634         (begin_parsing_inclass_inline): If in function, save pi
8635         for GC to cp_function_chain->unparsed_inlines instead.
8636         (process_next_inline): Likewise.
8637         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
8638         (mark_pending_inlines): Add prototype.
8639         * decl.c (spew_debug): Remove unused extern.
8640         (mark_lang_function): Call mark_pending_inlines.
8641
8642 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8643
8644         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
8645         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
8646         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
8647         Change my_fancy_abort() to abort().
8648
8649 2002-01-23  Jason Merrill  <jason@redhat.com>
8650
8651         PR c++/5453
8652         * class.c (fixed_type_or_null): Fix thinko.
8653
8654         PR c++/3331
8655         * init.c (resolve_offset_ref): Use build_indirect_ref.
8656
8657         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
8658
8659 2002-01-22  Jason Merrill  <jason@redhat.com>
8660
8661         * parse.y (function_body): Suppress the block for the outermost
8662         curly braces.
8663         * decl.c (pushdecl): Don't try to skip it.
8664         (begin_function_body): Keep the block we create, not the next one.
8665         * init.c (emit_base_init): Don't mess with keep_next_level.
8666
8667         * class.c (build_base_path): Tweak formatting.
8668
8669 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8670
8671         Fix regression introduced with patch for c++/775
8672         * parse.y (class_head_defn): Check for template specializations
8673         with a different class-key.
8674
8675 2002-01-17  Jason Merrill  <jason@redhat.com>
8676
8677         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
8678         (begin_function_body): Call them and keep_next_level.
8679         * init.c (emit_base_init): Call keep_next_level.
8680         * semantics.c (setup_vtbl_ptr): Lose.
8681         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
8682         (vtbls_set_up_p): Lose.
8683         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
8684         * method.c (do_build_copy_constructor): Likewise.
8685         (synthesize_method): Call finish_mem_initializers.
8686         * parse.y (nodecls): Likewise.
8687
8688         * error.c (dump_type_suffix): Print the exception specs before
8689         recursing.
8690         (dump_function_decl): Here, too.
8691
8692         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
8693
8694 2002-01-10  Ira Ruben   <ira@apple.com>
8695
8696         PR c++/907
8697         * decl.c (start_method): Handle attrlist.
8698
8699 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
8700
8701         * decl2.c (max_tinst_depth): Increase default limit to 500.
8702
8703 2002-01-10  Graham Stott  <grahams@redhat.com>
8704
8705         * spew.c (YYCHAR): Uppercase macro parameter and add
8706         parenthesis.
8707         (YYCODE): Likewise.
8708         (NAME): Uppercase macro parameter.
8709
8710 2002-01-09  Graham Stott  <grahams@redhat.com>
8711
8712         * decl.h (grokdeclarator): Wrap long line.
8713
8714         * semantics.c (FINISH_COND): Uppercase macro paramaters and
8715         add parenthesis.
8716
8717 2002-01-08  Graham Stott  <grahams@redhat.com>
8718
8719         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
8720         (PALLOC): Uppercase macro parameter and whitespace.
8721         (SALLOC): Uppercase macro parameter.
8722         (SFREE): Uppercase macros parameter, add parenthese and
8723         whitespace.
8724         (STREQL): Uppercase macro parameter and whitespace.
8725         (STRNEQ): Likewise.
8726         (STRLSS): Likewise.
8727         (STRLEQ): Likewise.
8728         (STRGTR): Likewise.
8729         (STRGEQ): Likewise.
8730
8731         * call.c (convert_like): Add parenthesis and wrap.
8732         (convert_like_with_context): Likewise.
8733         (ICS_RANK): Whitespace.
8734         (NEED_TEMPORARY_P): Remove parenthesis.
8735
8736         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
8737         whitespace.
8738         (VTT_MARKED_BINFO_P): Likewise.
8739
8740         * decl.c (BINDING_LEVEL): Add parenthesis.
8741         (DEF_OPERATOR): Likewise.
8742
8743         * mangle.c (MANGLE_TRACE): Add parenthesis.
8744         (MANGLE_TRACE_TREE): Likewise.
8745         (write_signed_number): Likewise.
8746         (write_unsigned_number): Likewise.
8747
8748         * pt.c (ccat): Uppercase macro parameter.
8749         (cat): Likewise
8750
8751         * search.c (SET_BINFO_ACCESS): Add parenthesis.
8752
8753 2002-01-07  Jason Merrill  <jason@redhat.com>
8754
8755         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
8756         to pedwarn.
8757
8758         PR c++/3536
8759         * method.c (make_thunk): If !flag_weak, give the thunk the
8760         function's linkage.
8761         (use_thunk): Here, too.
8762
8763 2002-01-07  Graham Stott  <grahams@redhat.com>
8764
8765         * error.c: Update copyright date.
8766         (print_scope_operator): Add parenthesis.
8767         (print_left_paren): Likewise.
8768         (print_right_paren): Likewise.
8769         (print_left_bracket): Likewise.
8770         (print_right_bracket): Likewise.
8771         (print_template_argument_list_start): Likewise.
8772         (print_template_argument_list_end): Likewise.
8773         (print_non_consecutive_character): Likewise.
8774         (print_tree_identifier): Likewise.
8775         (print_identifier): Likewise.
8776         (NEXT_CODE): Uppercase macro parameter.
8777         (ident_fndecl): Delete unused.
8778         (GLOBAL_THING): Likewise.
8779
8780 2002-01-06  Graham Stott  <grahams@redhat.com>
8781
8782         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
8783         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
8784         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
8785         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
8786         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
8787         (C_IS_RESERVED_WORD): Uppercase macro parameter.
8788         (C_RID_YYCODE) Likewise.
8789         (ptrmem_cst): Use rtx.
8790         (LOCAL_BINDING_P): Add whitespace.
8791         (INHERITED_VALUE_BINDING_P): Likewise.
8792         (BINDING_SCOPE): Wrap long line.
8793         (BINDING_HAS_LEVEL_P): Remove parenthesis.
8794         (BINDING_VALUE): Wrap long line.
8795         (BINDING_TYPE): Whitespace.
8796         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
8797         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
8798         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
8799         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
8800         (same_type_p): Uppercase macro parameters.
8801         (same_type_ignoring_top_level_qualifiers_p): Likewise.
8802         (OVL_FUNCTION): Wrap long line.
8803         (OVL_CHAIN): Whitespace.
8804         (OVL_CURRENT): Add parenthesis and whitespace.
8805         (OVL_NEXT): Whitespace.
8806         (OVL_USED): Likewise.
8807         (IDENTIFIER_TYPE_VALUE): Likewise.
8808         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
8809         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
8810         (LANG_ID_FIELD): Whitespace.
8811         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
8812         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
8813         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
8814         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
8815         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
8816         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
8817         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
8818         (IDENTIFIER_VIRTUAL_P): Likewise.
8819         (IDENTIFIER_OPNAME_P): Likewise.
8820         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
8821         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
8822         (C_SET_EXP_ORIGINAL_CODE): Likewise.
8823         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
8824         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
8825         (IS_AGGR_TYPE): Uppercase macro parameter.
8826         (CLASS_TYPE_P): Likewise.
8827         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
8828         (IS_AGGR_TYPE_2): Whitespace.
8829         (TAGGED_TYPE_P): Uppercase macro parameter.
8830         (TYPE_BUILT_IN): Whitespace.
8831         (TYPE_FOR_JAVA): Likewise.
8832         (FUNCTION_ARG_CHAIN): Remove parenthesis.
8833         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
8834         (FUNCTION_FIRST_USER_PARAM): Likewise.
8835         (PROMOTES_TO_AGGR_TYPE): Whitespace.
8836         (DERIVED_FROM_P): Add parenthesis and wrap.
8837         (UNIQUELY_DERIVED_FROM_P): Likewise.
8838         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
8839         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
8840         (CLASSTYPE_USE_TEMPLATE): Whitespace.
8841         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
8842         (TYPE_GETS_DELETE): Add parenthesis.
8843         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
8844         (TYPE_HAS_ASSIGN_REF): Likewise,
8845         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
8846         (TYPE_HAS_INIT_REF): Likewise.
8847         (TYPE_HAS_CONST_INIT_REF): Likewise.
8848         (TYPE_BEING_DEFINED): Likewise.
8849         (TYPE_LANG_SPECIFIC): Likewise.
8850         (CLASSTYPE_RTTI): Likewise.
8851         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
8852         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
8853         (TYPE_OVERLOADS_ARROW): Likewise.
8854         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
8855         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
8856         (CLASSTYPE_METHOD_VEC): Likewise.
8857         (CLASSTYPE_MARKED_N): Likewise.
8858         (CLASSTYPE_MARKED): Likewise.
8859         (CLASSTYPE_MARKED2): Likewise.
8860         (CLASSTYPE_MARKED3): Likewise.
8861         (CLASSTYPE_MARKED4): Likewise.
8862         (CLASSTYPE_MARKED5): Likewise.
8863         (CLASSTYPE_MARKED6): Likewise.
8864         (SET_CLASSTYPE_MARKED): Whitespace.
8865         (CLEAR_CLASSTYPE_MARKED): Likewise.
8866         (SET_CLASSTYPE_MARKED2): Likewise.
8867         (CLEAR_CLASSTYPE_MARKED2): Likewise.
8868         (SET_CLASSTYPE_MARKED3): Likewise.
8869         (CLEAR_CLASSTYPE_MARKED3): Likewise.
8870         (SET_CLASSTYPE_MARKED4): Likewise.
8871         (CLEAR_CLASSTYPE_MARKED4): Likewise.
8872         (SET_CLASSTYPE_MARKED5): Likewise.
8873         (CLEAR_CLASSTYPE_MARKED5): Likewise.
8874         (SET_CLASSTYPE_MARKED6): Likewise.
8875         (CLEAR_CLASSTYPE_MARKED6): Likewise.
8876         (CLASSTYPE_TAGS): Likewise.
8877         (CLASSTYPE_VSIZE): Likewise.
8878         (CLASSTYPE_VBASECLASSES): Likewise.
8879         (CANONICAL_BINFO): Add parenthesis.
8880         (CLASSTYPE_SIZE(NODE): Likewise.
8881         (CLASSTYPE_SIZE_UNIT): Likewise.
8882         (CLASSTYPE_ALIGN(NODE): Likewise.
8883         (CLASSTYPE_USER_ALIGN): Likewise.
8884         (TYPE_JAVA_INTERFACE): Likewise.
8885         (CLASSTYPE_PURE_VIRTUALS): Likewise.
8886         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
8887         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
8888         (CLASSTYPE_HAS_MUTABLE): Likewise.
8889         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
8890         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
8891         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
8892         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
8893         (CLASSTYPE_INTERFACE_ONLY): Likewise.
8894         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
8895         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8896         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
8897         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8898         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
8899         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
8900         (BINFO_UNSHARED_MARKED): Whitespace.
8901         (BINFO_MARKED): Whitespace and wrap.
8902         (SET_BINFO_MARKED): Likewise.
8903         (CLEAR_BINFO_MARKED): Likewise.
8904         (BINFO_VTABLE_PATH_MARKED): Likewise.
8905         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
8906         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
8907         (BINFO_SUBVTT_INDEX): Remove parenthesis.
8908         (BINFO_VPTR_INDEX): Likewise.
8909         (BINFO_PRIMARY_BASE_OF): Likewise,
8910         (CLASSTYPE_VFIELDS): Whitespace.
8911         (VF_DERIVED_VALUE): Wrap long line.
8912         (NAMESPACE_LEVEL): Whitespace.
8913         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
8914         (DEFARG_POINTER): Whitespace.
8915         (DECL_NEEDED_P): Remove parenthesis.
8916         (DECL_LANGUAGE): Whitespace.
8917         (SET_DECL_LANGUAGE): Add parenthesis.
8918         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
8919         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
8920         (DECL_IN_AGGR_P): Whitespace.
8921         (DECL_FRIEND_P): Likewise.
8922         (DECL_BEFRIENDING_CLASSES): Likewise.
8923         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
8924         (DECL_NONCONVERTING_P): Whitespace.
8925         (DECL_PURE_VIRTUAL_P): Likewise.
8926         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
8927         (DECL_PENDING_INLINE_INFO): Whitespace.
8928         (DECL_SORTED_FIELDS): Likewise.
8929         (DECL_DEFERRED_FN): Likewise.
8930         (DECL_TEMPLATE_INFO): Likewise.
8931         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
8932         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
8933         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
8934         (TMPL_ARGS_LEVEL): Likewise.
8935         (SET_TMPL_ARGS_LEVEL): Likewise.
8936         (INNERMOST_TEMPLATE_PARMS): Whitespace.
8937         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
8938         (INTEGRAL_CODE_P(CODE): Add parenthesis.
8939         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
8940         (TYPE_HAS_CONSTRUCTOR): Whitespace.
8941         (TREE_HAS_CONSTRUCTOR): Likewise.
8942         (TYPE_HAS_DESTRUCTOR): Likewise.
8943         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
8944         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
8945         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
8946         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
8947         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
8948         (TYPE_PTRMEMFUNC_P): Likewise.
8949         (TYPE_PTRMEMFUNC_FLAG): Likewise.
8950         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
8951         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
8952         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
8953         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
8954         (DECL_ACCESS): Whitespace.
8955         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
8956         (DECL_GLOBAL_DTOR_P): Likewise.
8957         (GLOBAL_INIT_PRIORITY): Likewise.
8958         (DECL_TEMPLATE_PARMS): Likewise.
8959         (DECL_TEMPLATE_RESULT): Likewise.
8960         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
8961         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
8962         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
8963         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
8964         (PRIMARY_TEMPLATE_P): Add parenthesis.
8965         (DECL_USE_TEMPLATE): Whitespace.
8966         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
8967         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
8968         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
8969         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
8970         (CALL_DECLARATOR_PARMS): Remove parenthesis.
8971         (CALL_DECLARATOR_QUALS): Likewise.
8972         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
8973         (TEMP_NAME_P): Wrap.
8974         (VFIELD_NAME_P): Likewise.
8975         (B_SET): Uppercase macro parameters and add parenthesis.
8976         (B_CLR): Likewise.
8977         (B_TST): Likewise.
8978         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
8979         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
8980         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
8981         (same_or_base_type_p): Likewise.
8982         (cp_deprecated): Likewise.
8983
8984 2002-01-05  Richard Henderson  <rth@redhat.com>
8985
8986         * semantics.c (expand_body): Revert last change.
8987
8988 2002-01-04  Jason Merrill  <jason@redhat.com>
8989
8990         PR c++/4122
8991         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
8992         lost primary.
8993
8994         * class.c (build_vtbl_initializer): Check for a lost primary
8995         before calculating the vtable entry to throw away.
8996
8997 2002-01-02  Jason Merrill  <jason@redhat.com>
8998
8999         * semantics.c (expand_body): Call outlining_inline_function when
9000         emitting an inline function out of line.
9001
9002 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9003
9004         PR c++/5116, c++/764 reversion
9005         * call.c (build_new_op): Revert the instantiations. They are
9006         incorrect.
9007
9008 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9009
9010         PR c++/5089
9011         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
9012
9013 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9014
9015         PR c++/3716
9016         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
9017         (tsubst, case POINTER_TYPE): Handle pmfs here.
9018         (tsubst, case OFFSET_TYPE): Check it is not an offset to
9019         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
9020
9021 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9022
9023         PR c++/35
9024         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
9025         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
9026         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
9027         PARM_DECL.
9028         (tsubst_template_parms): Break up loop statements.
9029         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
9030         parm PARM_DECLs don't get promoted.
9031
9032 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9033
9034         PR c++/5123
9035         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
9036         (build_x_function_call): Cope with a COMPONENT_REF containing a
9037         TEMPLATE_ID_EXPR.
9038
9039 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9040
9041         PR c++/5213
9042         * pt.c (convert_template_argument): Be more careful determining
9043         when RECORD_TYPE templates are or are not templates.
9044
9045 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9046
9047         PR c++/775
9048         * cp-tree.h (handle_class_head): Adjust prototype.
9049         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
9050         parameters. Use for all class heads.
9051         * parse.y (named_class_head_sans_basetype, named_class_head,
9052         named_complex_class_head_sans_basetype,
9053         named_class_head_sans_basetype_defn,
9054         unnamed_class_head): Remove.
9055         (class_head, class_head_apparent_template): Recognize class heads
9056         (class_head_decl, class_head_defn): New reductions. Process class
9057         heads.
9058         (structsp): Adjust class definition and class declaration
9059         reductions.
9060         (maybe_base_class_list): Give diagnostic on empty list.
9061
9062 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9063
9064         PR c++/4379
9065         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
9066         single non-static member.
9067         (unary_complex_lvalue): If it cannot be a pointer to member, don't
9068         make it so. Check it is not pointer to reference.
9069
9070 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9071
9072         PR c++/5132
9073         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
9074         are processing a template decl.
9075
9076 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9077
9078         PR c++/5116, c++/764
9079         * call.c (build_new_op): Make sure template class operands are
9080         instantiated. Simplify arglist construction.
9081
9082 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
9083
9084         * call.c (build_user_type_conversion_1): Use my_friendly_assert
9085         rather than if ... abort.
9086         * cvt.c (convert_to_reference): Likewise.
9087         * semantics.c (setup_vtbl_ptr): Likewise.
9088         * pt.c (lookup_template_class): Comment typo.
9089
9090 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
9091
9092         PR c++/5125
9093         * pt.c (push_template_decl_real): Make sure DECL has
9094         DECL_LANG_SPECIFIC.
9095
9096 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
9097
9098         PR c++/335
9099         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
9100         for non-reference fields.
9101         * typeck.c (require_complete_type): Use resolve_offset_ref).
9102
9103 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
9104
9105         PR c++/196
9106         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
9107
9108 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
9109
9110         PR c++/160
9111         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
9112         up. Don't stabilize_references when initializing a reference.
9113
9114 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9115
9116         * decl2.c (lang_f_options): Const-ify.
9117
9118 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
9119
9120         * config-lang.in (diff_excludes): Remove.
9121
9122 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
9123
9124         PR c++/90
9125         * typeck.c (build_function_call_real): Use original function
9126         expression for errors.
9127
9128 2001-12-18  Jason Merrill  <jason@redhat.com>
9129
9130         PR c++/3242
9131         * class.c (add_method): Do compare 'this' quals when trying to match a
9132         used function.  Don't defer to another used function.
9133
9134 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
9135
9136         * pt.c (instantiate_clone): Remove, fold into ...
9137         (instantiate_template): ... here. Simplify by removing mutual
9138         recursion.
9139         * typeck2.c (build_m_component_ref): Don't cv qualify the function
9140         pointed to by a pointer to function.
9141         * class.c (delete_duplicate_fields_1): Typo.
9142
9143 2001-12-18  Jason Merrill  <jason@redhat.com>
9144
9145         C++ ABI change: destroy value arguments in caller.
9146         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
9147         create an extra binding level for the parameters.
9148         * decl.c (store_parm_decls): Don't do parameter cleanups.
9149
9150 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
9151
9152         * call.c (build_new_method_call): Use '%#V'.
9153         * error.c (cv_to_string): Use V parameter to determine padding.
9154
9155 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
9156
9157         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
9158         spellings in messages.
9159
9160 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
9161
9162         * cp-tree.h: Delete #defines for cp_error, cp_warning,
9163         cp_pedwarn, and cp_compiler_error.
9164         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
9165         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
9166         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
9167         typeck2.c: Change calls to the above macros to use their
9168         language-independent equivalents: error, warning, pedwarn, and
9169         internal_error respectively.
9170
9171 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
9172
9173         * decl2.c (finish_file): Remove back_end_hook.
9174
9175 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
9176
9177         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
9178         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
9179         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
9180
9181 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
9182
9183         * lang-options.h: Use American spelling in messages.
9184
9185 2001-12-13  Jason Merrill  <jason@redhat.com>
9186
9187         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
9188
9189         Use cleanups to run base and member destructors.
9190         * init.c (push_base_cleanups): New function, split out from...
9191         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
9192         * decl.c (finish_destructor_body): Move vbase destruction code to
9193         push_base_cleanups.
9194         (begin_function_body, finish_function_body): New fns.
9195         (finish_function): Move [cd]tor handling and call_poplevel to
9196         finish_function_body.
9197         (pushdecl): Skip the new level.
9198         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
9199         (setup_vtbl_ptr): Call push_base_cleanups.
9200         * method.c (synthesize_method): Call {begin,end}_function_body.
9201         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
9202         * cp-tree.h: Declare new fns.
9203         * parse.y (function_body, .begin_function_body): New nonterminals.
9204         (fndef, pending_inline, function_try_block): Use function_body.
9205         (ctor_initializer_opt, function_try_block): No longer has a value.
9206         (base_init): Remove .set_base_init token.
9207         (.set_base_init, compstmt_or_error): Remove.
9208         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
9209
9210         * optimize.c (maybe_clone_body): Fix parameter updating.
9211
9212 2001-12-12  Jason Merrill  <jason@redhat.com>
9213
9214         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
9215         * semantics.c (genrtl_start_function): Don't pass
9216         parms_have_cleanups or push an extra binding level.
9217         (genrtl_finish_function): Lose cleanup_label cruft.
9218
9219         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
9220         (ctor_label): Remove.
9221         * semantics.c (finish_return_stmt): Lose ctor_label support.
9222         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
9223         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
9224         dtor_label.
9225
9226         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
9227         check for [cd]tors.
9228         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
9229
9230         * decl.c (finish_function): Check VMS_TARGET, not VMS.
9231
9232         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
9233         (end_cleanup_fn): And poplevel.
9234
9235         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
9236         if we're in a template.
9237
9238 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
9239
9240         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
9241         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
9242         THIS_NAME_P): Delete.
9243         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
9244         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
9245         with internal naming scheme.
9246         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
9247
9248 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
9249
9250         * decl.c (grokdeclarator): Deprecated implicit typename use.
9251
9252 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
9253
9254         PR g++/51
9255         * parse.y (frob_specs): Indicate it is a language linkage which
9256         contained the extern.
9257         * decl.c (grokdeclarator): Allow extern language linkage with
9258         other specifiers.
9259
9260 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
9261
9262         PR g++/72
9263         * decl.c (add_binding): Don't reject duplicate typedefs involving
9264         template parameters.
9265
9266 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9267
9268         * parse.y, semantics.c: Similarly.
9269
9270 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
9271
9272         PR g++/87
9273         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
9274         (copy_args_p): Rename to ...
9275         (copy_fn_p): ... here.
9276         (grok_special_member_properties): New function.
9277         (grok_op_properties): Lose VIRTUALP parameter.
9278         (copy_assignment_arg_p): Remove.
9279         * call.c (build_over_call): Use copy_fn_p.
9280         * decl.c (grokfndecl): Reformat. Adjust call to
9281         grok_op_properties.
9282         (copy_args_p): Rename to ...
9283         (copy_fn_p): ... here. Reject template functions. Check for pass
9284         by value.
9285         (grok_special_member_properties): Remember special functions.
9286         (grok_ctor_properties): Don't remember them here, just check.
9287         (grok_op_properties): Likewise.
9288         (start_method): Call grok_special_member_properties.
9289         * decl2.c (grokfield): Likewise.
9290         (copy_assignment_arg_p): Remove.
9291         (grok_function_init): Don't remember abstract assignment here.
9292         * pt.c (instantiate_class_template): Call
9293         grok_special_member_properties.
9294         (tsubst_decl): Adjust grok_op_properties call.
9295
9296 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
9297
9298         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
9299         RID_TYPES_COMPATIBLE_P.
9300
9301 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9302
9303         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
9304         call to build_aggr_init.
9305         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
9306
9307 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
9308
9309         * parse.y: Replace uses of the string non-terminal with STRING.
9310         Don't perform string concatentaion here.
9311         (string): Remove non-terminal.
9312         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
9313
9314 2001-12-05  Jason Merrill  <jason@redhat.com>
9315
9316         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
9317         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
9318         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
9319         * pt.c (push_tinst_level): No longer static.
9320         * cp-tree.h: Declare them.
9321
9322         * init.c (resolve_offset_ref): Don't check access for the base
9323         conversion to access a FIELD_DECL.
9324
9325         * cp-tree.h (TYPE_REFFN_P): New macro.
9326         * decl.c (bad_specifiers): Check it, too.
9327
9328         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
9329         on the __*_type_info type if we haven't seen a definition.
9330
9331 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
9332
9333         * decl.c: Include c-common.h.
9334         (shadow_warning): Move to c-common.c.
9335
9336 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9337
9338         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
9339
9340 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
9341
9342         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
9343
9344 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
9345
9346         PR g++/164
9347         * init.c (sort_base_init): Allow binfos to be directly specified.
9348         * method.c (do_build_copy_constructor): Explicitly convert to the
9349         base instance.
9350         (do_build_assign_ref): Likewise.
9351
9352 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
9353
9354         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
9355         declaration and initialization.
9356
9357 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
9358
9359         * typeck2.c: Remove leading capital from diagnostic messages, as
9360         per GNU coding standards.
9361
9362 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
9363
9364         PR c++/3394
9365         * decl.c (xref_basetypes): Handle attributes between
9366         'class' and name.
9367
9368 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
9369
9370         PR g++/3381
9371         * parse.y (named_complex_class_head_sans_basetype): Add new
9372         reduction.
9373         * Make-lang.in (parse.c): Adjust expected conflict count.
9374
9375 2001-12-03  Jason Merrill  <jason@redhat.com>
9376
9377         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
9378         immediate binfos for our virtual bases.
9379
9380 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
9381
9382         * call.c (build_java_interface_fn_ref): Similarly.
9383         * except.c (is_admissible_throw_operand): Similarly.
9384         * init.c (build_java_class_ref): Similarly.
9385         * xref.c (open_xref_file): Similarly.
9386
9387 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9388
9389         * class.c (finish_struct): Remove trailing periods from messages.
9390         * decl.c (check_tag_decl): Similarly.
9391         * lex.c (cxx_set_yydebug): Similarly.
9392         * typeck2.c (friendly_abort): Similarly.
9393
9394 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
9395
9396         PR c++/3048
9397         * cp-tree.h (ovl_member): Remove.
9398         * decl2.c (merge_functions): Handle extern "C" functions
9399         specially.
9400         * tree.c (ovl_member): Remove.
9401
9402 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
9403
9404         PR c++/4842
9405         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
9406         FUNCTION_DECL, as input.
9407         (mark_overriders): Remove.
9408         (warn_hidden): Rework for the new ABI.
9409
9410 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
9411
9412         PR c++/3471
9413         * call.c (convert_like_real): Do not build additional temporaries
9414         for rvalues of class type.
9415
9416 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9417
9418         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
9419         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
9420         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
9421         (DERIVED_FROM_P): Likewise.
9422         (enum base_access): Renumber, add ba_quiet bit mask.
9423         (get_binfo): Remove.
9424         (get_base_distance): Remove.
9425         (binfo_value): Remove.
9426         (ACCESSIBLY_DERIVED_FROM_P): Remove.
9427         * call.c (standard_conversion): Use lookup_base.
9428         * class.c (strictly_overrides): Likewise.
9429         (layout_virtual_bases): Likewise.
9430         (warn_about_ambiguous_direct_bases): Likewise.
9431         (is_base_of_enclosing_class): Likewise.
9432         (add_vcall_offset_vtbl_entries_1): Likewise.
9433         * cvt.c (build_up_reference): Adjust comment.
9434         * init.c (build_member_call): Reformat.
9435         * search.c (get_binfo): Remove.
9436         (get_base_distance_recursive): Remove.
9437         (get_base_distance): Remove.
9438         (lookup_base_r): Tweak.
9439         (lookup_base): Add ba_quiet control. Complete the types here.
9440         (covariant_return_p): Use lookup_base.
9441         * tree.c (binfo_value): Remove.
9442         (maybe_dummy_object): Use lookup_base.
9443         * typeck.c (build_static_cast): Use lookup_base.
9444         (get_delta_difference): Likewise.
9445         * typeck2.c (binfo_or_else): Use lookup_base.
9446         (build_scoped_ref): Add back error_mark_check.
9447         (build_m_component_ref): Use lookup_base.
9448
9449 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9450
9451         * Make-lang.in (c++.generated-manpages): New dummy target.
9452
9453 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9454
9455         * Make-lang.in (cp-lang.o): Depends on c-common.h.
9456         * cp-lang.c (c-common.h): Include.
9457         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
9458         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
9459         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
9460
9461 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
9462
9463         * decl2.c (c_language): Move to c-common.c.
9464         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
9465         functions.
9466         (cxx_init): Update.
9467
9468 2001-11-26  Jason Merrill  <jason@redhat.com>
9469
9470         * call.c (joust): Remove COND_EXPR hack.
9471
9472 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
9473
9474         * search.c (lookup_base_r): Declare bk in variable declaration
9475         space.
9476
9477 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
9478
9479         PR g++/3145
9480         * class.c (build_vbase_pointer): Remove.
9481         (build_vbase_path): Remove.
9482         (build_base_path): New function.
9483         * cp-tree.h (base_access, base_kind): New enumerations.
9484         (build_base_path): Declare.
9485         (convert_pointer_to_real): Remove.
9486         (convert_pointer_to): Remove.
9487         (lookup_base): Declare.
9488         (convert_pointer_to_vbase): Remove.
9489         * call.c (build_scoped_method_call): Use lookup_base &
9490         build_base_path instead of convert_pointer_to_real,
9491         get_base_distance & get_binfo.
9492         (build_over_call): Likewise.
9493         * cvt.c (cp_convert_to_pointer): Likewise.
9494         (convert_to_pointer_force): Likewise.
9495         (build_up_reference): Likewise.
9496         (convert_pointer_to_real): Remove.
9497         (convert_pointer_to): Remove.
9498         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
9499         instead of convert_pointer_to_vbase & build_vbase_path.
9500         (emit_base_init): Use build_base_path instead of
9501         convert_pointer_to_real.
9502         (expand_virtual_init): Lose unrequired conversions.
9503         (resolve_offset_ref): Use lookup_base and build_base_path
9504         instead of convert_pointer_to.
9505         * rtti.c (build_dynamic_cast_1): Use lookup_base &
9506         build_base_path instead of get_base_distance & build_vbase_path.
9507         * search.c (get_vbase_1): Remove.
9508         (get_vbase): Remove.
9509         (convert_pointer_to_vbase): Remove.
9510         (lookup_base_r): New function.
9511         (lookup_base): New function.
9512         * typeck.c (require_complete_type): Use lookup_base &
9513         build_base_path instead of convert_pointer_to.
9514         (build_component_ref): Likewise.
9515         (build_x_function_call): Likewise.
9516         (get_member_function_from_ptrfunc): Likewise.
9517         (build_component_addr): Likewise.
9518         * typeck2.c (build_scoped_ref): Likewise.
9519
9520 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9521
9522         * cp-tree.h (CP_TYPE_QUALS): Removed.
9523         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
9524         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
9525         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
9526         * dump.c (cp_dump_tree): Use void* dump_info argument to match
9527         lang-hooks prototype.
9528         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
9529         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
9530         CP_TYPE_QUALS changed to cp_type_quals.
9531         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
9532         (CXX_C_OBJS): Remove c-dump.o.
9533
9534 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
9535
9536         PR c++/3637
9537         * pt.c (lookup_template_class): Ensure that all specializations
9538         are registered on the list corresponding to the most general
9539         template.
9540
9541 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
9542
9543         * call.c (non_reference): Add documentation.
9544         (convert_class_to_reference): Do not strip reference types
9545         from conversion operators.
9546         (maybe_handle_ref_bind): Simplify.
9547         (compare_ics): Correct handling of references.
9548
9549 2001-11-19  John Wilkinson <johnw@research.att.com>
9550
9551         * dump.c (dump_op): New function.
9552         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
9553         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
9554         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
9555
9556 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
9557
9558         PR4629
9559         * semantics.c (finish_sizeof): Make sure that expression created
9560         while processing a template do not have a type.
9561         (finish_alignof): Likewise.
9562         * typeck.c (c_sizeof): Likewise.
9563         (expr_sizeof): Likewise.
9564
9565 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9566
9567         * lex.c (cxx_finish): Call c_common_finish.
9568         (finish_parse): Remove.
9569
9570 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9571
9572         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
9573         when displaying error message about missing array bounds.
9574
9575 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9576
9577         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
9578         CONST_CAST_EXPR.
9579         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
9580
9581 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
9582
9583         * cp-tree.h (print_class_statistics): Restore.
9584
9585 2001-11-15  Jason Merrill  <jason@redhat.com>
9586
9587         * method.c (use_thunk): Don't emit debugging information for thunks.
9588
9589         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
9590         * decl.c (make_typename_type): Handle getting a class template.
9591         * search.c (lookup_field_r): A class template is good enough for
9592         want_type.
9593
9594         * call.c (convert_like_real): Only use cp_convert for the bad part.
9595         (standard_conversion): Also allow bad int->enum.
9596         * typeck.c (ptr_reasonably_similar): Also allow functions to
9597         interconvert.  Pointers to same-size integers are reasonably
9598         similar.
9599
9600         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
9601         give it void type.
9602
9603 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
9604
9605         PR g++/3154
9606         * init.c (sort_base_init): Remove unreachable code.
9607         (expand_member_init): Adjust comment to reflect reality. Simplify
9608         and remove unreachable code.
9609
9610 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
9611
9612         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
9613         (cxx_init): Update prototype.
9614         * decl.c (init_decl_processing): Rename.  Move null node init
9615         to its creation time.
9616         * lex.c (cxx_init_options): Update.
9617         (cxx_init): Combine with old init_parse; also call
9618         cxx_init_decl_processing.
9619
9620 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
9621
9622         * decl.c (check_initializer): Try to complete the type of an
9623         array element before checking whether it's complete.  Don't
9624         complain about arrays with complete element types but an
9625         unknown size.
9626         (cp_finish_decl): Build the hierarchical constructor before
9627         calling maybe_deduce_size_from_array_init.
9628
9629 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
9630
9631         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
9632
9633 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
9634
9635         PR g++/4206
9636         * parse.y (already_scoped_stmt): Remove.
9637         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
9638
9639 2001-11-12  H.J. Lu <hjl@gnu.org>
9640
9641         * cvt.c (ocp_convert): Don't warn the address of a weak
9642         function is always `true'.
9643
9644 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9645
9646         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
9647         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
9648         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
9649         * cp-tree.h (print_class_statistics): Remove.
9650         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
9651         cxx_print_identifier, cxx_set_yydebug): New.
9652         * lex.c (set_yydebug): Rename c_set_yydebug.
9653         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
9654         lang_print_xnode): Rename.
9655         * tree.c (print_lang_statistics): Rename.
9656
9657 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9658
9659         * class.c (dump_array): Fix format specifier warning.
9660
9661 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9662
9663         * cp-lang.c (LANG_HOOKS_NAME): Override.
9664         (struct lang_hooks): Constify.
9665         * lex.c (cxx_init_options): Update.
9666         (lang_identify): Remove.
9667         * parse.y (language_string): Remove.
9668
9669 2001-11-08  Andreas Franck  <afranck@gmx.de>
9670
9671         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
9672         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
9673         suggested by autoconf.
9674         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
9675         (c++.install-common): Use the transformed target alias names.
9676
9677 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9678
9679         * Make-lang.in: Update.
9680         * cp-lang.c: Include langhooks-def.h.
9681
9682 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9683
9684         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
9685
9686 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9687
9688         * lex.c (copy_lang_type): Add static prototype.
9689
9690 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9691
9692         * pt.c (unify): Handle SCOPE_REF.
9693
9694 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
9695
9696         * tree.c (cp_copy_res_decl_for_inlining): Adjust
9697         DECL_ABSTRACT_ORIGIN for the return variable.
9698
9699 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
9700
9701         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9702
9703 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
9704
9705         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
9706         semantics.c, spew.c: Fix spelling errors.
9707
9708 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9709
9710         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
9711
9712 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
9713
9714         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
9715         pop_everything.
9716
9717 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9718
9719         * cp-lang.c (cxx_get_alias_set): New function.
9720         Point LANG_HOOKS_GET_ALIAS_SET to it.
9721
9722 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9723
9724         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
9725         * cp-tree.h (make_unbound_class_template): Prototype new function.
9726         * decl.c (make_unbound_class_template): New function.
9727         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
9728         * error.c (dump_type): Likewise.
9729         * mangle.c (write_type): Likewise.
9730         * parse.y (template_parm): Likewise.
9731         (template_argument): Use make_unbound_class_template.
9732         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
9733         (tsubst): Likewise.
9734         (tsubst_copy): Likewise.
9735         (unify): Likewise.
9736         * tree.c (walk_tree): Likewise.
9737         * typeck.c (comptypes): Likewise.
9738
9739 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9740
9741         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
9742         extra calls into fewer ones.
9743
9744 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
9745
9746         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
9747         Warn when merging inline with attribute noinline.
9748         (start_decl, start_function): Warn if inline and attribute
9749         noinline appear in the same declaration.
9750
9751 2001-10-16  H.J. Lu <hjl@gnu.org>
9752
9753         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
9754         for tree checking disabled.
9755
9756 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
9757
9758         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
9759         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
9760
9761 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
9762
9763         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
9764         (unify): Only handle MINUS_EXPR specially if the above flag is set
9765         and the subtracted constant is 1.  Clear the flag on recursive calls.
9766         Set it when unifying the maximum value in an INTEGER_TYPE's range.
9767
9768 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
9769
9770         * decl.c (bad_specifiers): Don't allow exception specifications
9771         on any typedefs.
9772
9773 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
9774
9775         * cp/lex.c (init_cp_pragma): Similarly.
9776
9777 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9778
9779         * pt.c (lookup_template_class): Build complete template arguments
9780         for BOUND_TEMPLATE_TEMPLATE_PARM.
9781
9782 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9783
9784         * cp-tree.h (TYPE_BINFO): Update comment.
9785         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
9786         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
9787         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
9788         (copy_type): Prototype new function.
9789         * lex.c (copy_lang_decl): Gather tree node statistics.
9790         (copy_lang_type): New function.
9791         (copy_type): Likewise.
9792         (cp_make_lang_type): Create lang_type for
9793         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
9794         and BOUND_TEMPLATE_TEMPLATE_PARM.
9795         * pt.c (tsubst): Use copy_type instead of copy_node.
9796         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
9797
9798 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9799
9800         * pt.c (determine_specialization): Ignore functions without
9801         DECL_TEMPLATE_INFO.
9802
9803 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
9804
9805         PR g++/4476
9806         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
9807
9808 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
9809
9810         * typeck2.c (store_init_value): Don't re-digest a bracketed
9811         initializer.
9812
9813         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
9814         ANON_AGGR_TYPE_P.
9815
9816 2001-10-11  Richard Henderson  <rth@redhat.com>
9817
9818         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
9819         of an asm statement.
9820         (build_vtbl_ref_1): Split out from build_vtbl_ref.
9821         (build_vfn_ref): Use it to handle vtable descriptors before
9822         calling build_vtable_entry_ref.
9823         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
9824
9825 2001-10-10  Richard Henderson  <rth@redhat.com>
9826
9827         * parse.y (asm_operand): Allow named operands.
9828         * semantics.c (finish_asm_stmt): Tweek for changed location
9829         of the operand constraint.
9830
9831 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
9832
9833         * call.c (standard_conversion): Add bad conversion between
9834         integers and pointers.
9835         (convert_like_real): Don't use convert_for_initialization for bad
9836         conversions; complain here and use cp_convert.
9837         (build_over_call): Don't handle bad conversions specially.
9838         (perform_implicit_conversion): Allow bad conversions.
9839         (can_convert_arg_bad): New fn.
9840         * cp-tree.h: Declare it.
9841         * typeck.c (convert_for_assignment): Use it.
9842         (ptr_reasonably_similar): Any target type is similar to void.
9843
9844 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
9845
9846         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
9847         (cp/cp-lang.o): New rule.
9848         * cp-tree.h: Declare hooks.
9849         * tree.c: Make hooks non-static.
9850         (init_tree): Don't initialize hooks here.
9851         * lex.c: Likewise.  Move definition of lang_hooks to...
9852         * cp-lang.c: ... new file.
9853
9854 2001-10-08  Richard Henderson  <rth@redhat.com>
9855
9856         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
9857         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
9858
9859 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9860
9861         * class.c (build_vtable_entry_ref): Const-ify.
9862         * decl.c (predefined_identifier,
9863         initialize_predefined_identifiers): Likewise.
9864         * init.c (build_new_1): Likewise.
9865         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
9866         Likewise.
9867
9868 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
9869
9870         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
9871         (INSNS_PER_STMT): Likewise.
9872         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
9873         (copy_body, initialize_inlined_parameters): Likewise.
9874         (declare_return_variable, inlinable_function_p): Likewise.
9875         (expand_call_inline, expand_calls_inline): Likewise.
9876         (optimize_inline_calls, clone_body): Likewise.
9877         * tree.c (walk_tree): Moved to ../tree-inline.c.
9878         (walk_tree_without_duplicates): Likewise.
9879         (copy_tree_r, remap_save_expr): Likewise.
9880
9881 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
9882
9883         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
9884         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
9885         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
9886         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
9887         (flag_inline_trees): Moved declaration to ../tree-inline.h.
9888         (walk_tree): Moved declaration to ../tree-inline.h.
9889         (walk_tree_without_duplicates, copy_tree_r): Likewise.
9890         (remap_save_expr): Likewise.
9891         * decl.c: Include tree-inline.h.
9892         (lang_mark_tree): Don't mark inlined_fns.
9893         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
9894         * optimize.c: Include tree-inline.h.
9895         (optimize_inline_calls): Move declaration to ../tree.h, as
9896         non-static.
9897         (remap_decl): Use language-independent constructs and hooks.
9898         (remap_block, copy_body_r, declare_return_variable): Likewise.
9899         (inlinable_function_p): Likewise.  Don't test for
9900         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
9901         no longer language-specific.
9902         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
9903         call of dump_function to...
9904         (optimize_function): Here...
9905         (clone_body): New function, extracted from...
9906         (maybe_clone_body): ... here.  Build decl_map locally and pass
9907         it on to clone_body.
9908         * pt.c, semantics.c: Include tree-inline.h.
9909         * tree.c: Likewise.
9910         (cp_walk_subtrees): New language-specific hook for tree inlining.
9911         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
9912         cp_is_overload_p, cp_auto_var_in_fn_p,
9913         cp_copy_res_decl_for_inlining): Likewise.
9914         (walk_tree): Move language-specific constructs into...
9915         (cp_walk_subtrees): this new function.
9916         (copy_tree_r): Use language-independent constructs and hooks.
9917         (init_tree): Initialize tree inlining hooks.
9918         (remap_save_expr): Adjust prototype so that the declaration
9919         does not require the definition of splay_tree.
9920
9921 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9922
9923         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
9924         to build the declaration instead of the declaration itself.
9925
9926 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
9927
9928         * decl2.c (cxx_decode_option): Add 'else'.
9929
9930         * spew.c (end_input): No longer static.
9931         * cp-tree.h: Declare it.
9932         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
9933
9934 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9935
9936         * call.c (build_over_call), typeck.c (build_function_call_real):
9937         Pass type attributes to check_function_format rather than name or
9938         assembler name.  Don't require there to be a name or assembler
9939         name to check formats.
9940
9941 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9942
9943         * decl.c (init_decl_processing): Don't call
9944         init_function_format_info.  Initialize lang_attribute_table
9945         earlier.
9946         (builtin_function): Call decl_attributes.
9947         (insert_default_attributes): New.
9948
9949 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
9950
9951         * decl.c (grokdeclarator): Copy array typedef handling from C
9952         frontend.
9953
9954         * decl.c (grokdeclarator): Copy too-large array handling from C
9955         frontend.
9956
9957 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
9958
9959         * config-lang.in (target_libs): Added target-gperf, so that we
9960         don't try to build it if C++ is disabled.
9961
9962 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
9963
9964         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
9965         (cp/errfn.o): Delete rule.
9966         (cp/error.o): Depend on flags.h.
9967         * errfn.c: Delete file.
9968         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
9969         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
9970         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
9971         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
9972         internal_error respectively.  Make cp_deprecated into a macro.
9973         Don't define cp_printer typedef or declare cp_printers.
9974         * error.c: Include flags.h.
9975         Delete: struct tree_formatting_info, print_function_argument_list,
9976         print_declaration, print_expression, print_function_declaration,
9977         print_function_parameter, print_type_id, print_cv_qualifier_seq,
9978         print_type_specifier_seq, print_simple_type_specifier,
9979         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
9980         print_parameter_declaration_clause, print_exception_specification,
9981         print_nested_name_specifier, and definition of cp_printers.
9982         (locate_error): New function.
9983         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
9984         rewritten in terms of locate_error and diagnostic.c.
9985         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
9986         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
9987         (init_error): Adjust to match.
9988
9989 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9990
9991         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
9992
9993 2001-09-21  Richard Henderson  <rth@redhat.com>
9994
9995         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
9996         (build_vtbl_initializer): Likewise.
9997         (build_vfn_ref): New.
9998         * cp-tree.h: Declare it.
9999         * call.c (build_over_call): Use it.
10000         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
10001         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
10002
10003 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
10004
10005         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
10006
10007 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
10008
10009         Table-driven attributes.
10010         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
10011         * decl2.c (cplus_decl_attributes): Only take one attributes
10012         parameter.
10013         * cp-tree.c (cplus_decl_attributes): Update prototype.
10014         * class.c (finish_struct), decl.c (start_decl, start_function),
10015         decl2.c (grokfield), friend.c (do_friend), parse.y
10016         (parse_bitfield): Update calls to cplus_decl_attributes.
10017         * decl.c (grokdeclarator): Take a pointer to a single ordinary
10018         attribute list.
10019         * decl.h (grokdeclarator): Update prototype.
10020         * decl2.c (grokfield): Take a single ordinary attribute list.
10021         * friend.c (do_friend): Likewise.
10022         * decl.c (shadow_tag, groktypename, start_decl,
10023         start_handler_parms, grokdeclarator, grokparms, start_function,
10024         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
10025         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
10026         (process_template_parm, do_decl_instantiation): Pass single
10027         ordinary attribute lists around.
10028         * decl.c (grokdeclarator): Correct handling of nested attributes.
10029         Revert the patch
10030         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
10031                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
10032                 not the left.
10033         .
10034         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
10035         (cp_attribute_table): Declare.
10036         * decl.c (valid_lang_attribute): Don't define.
10037         (lang_attribute_table): Define.
10038         (init_decl_processing): Initialize lang_attribute_table instead of
10039         valid_lang_attribute.
10040         * tree.c (cp_valid_lang_attribute): Remove.
10041         (handle_java_interface_attribute, handle_com_interface_attribute,
10042         handle_init_priority_attribute): New functions.
10043         (cp_attribute_table): New array.
10044         * decl2.c (import_export_class): Don't use
10045         targetm.valid_type_attribute.
10046
10047 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
10048
10049         * Make-lang.in (cp/error.o): Depend on real.h
10050         * error.c: #include "real.h"
10051
10052 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10053
10054         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
10055         xmalloc/strcpy/strcat.
10056
10057 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10058
10059         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
10060         Const-ification.
10061         * pt.c (tsubst_decl): Likewise.
10062
10063 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10064
10065         * decl2.c (lang_f_options): Const-ification.
10066         * lex.c (cplus_tree_code_name): Likewise.
10067         * spew.c (yyerror): Likewise.
10068
10069 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10070
10071         PR c++/3986
10072         * class.c (force_canonical_binfo_r): Check & move an indirect
10073         primary base first.
10074         (force_canonical_binfo): Check that it's not already
10075         canonical.
10076         (mark_primary_virtual_base): Remove BINFO parameter.
10077         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
10078
10079 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10080
10081         Remove TYPE_NONCOPIED_PARTS.
10082         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
10083         CLASSTYPE_PURE_VIRTUALS.
10084         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
10085         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
10086         (layout_class_type): Don't call fixup_inline_methods here ...
10087         (finish_struct_1): ... call it here.
10088
10089 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
10090
10091         * decl.c (duplicate_decls): Remove code deadling with
10092         DECL_SAVED_INSNS.
10093         * decl2.c (finish_file): Likewise.
10094         * pt.c (instantiate_decl): Likewise.
10095         * semantics.c (expand_body): Don't defer local functions if
10096         they wouldn't be deferred for some other reason.  Don't
10097         generate RTL for functions that will not be emitted.
10098         (genrtl_start_function): Remove code deadling with
10099         DECL_SAVED_INSNS.
10100         (genrtl_finish_function): Likewise.
10101
10102 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10103
10104         PR c++/4203
10105         * call.c (build_over_call): Do not optimize any empty base
10106         construction.
10107
10108 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10109
10110         * error.c (dump_template_decl): Output template parameters
10111         together with their specifiers.
10112         Output `class' prefix for template template parameter.
10113         (dump_decl): Fix formatting.
10114
10115 2001-08-30  Kurt Garloff  <garloff@suse.de>
10116
10117         * optimize.c (inlinable_function_p): Allow only smaller single
10118         functions. Halve inline limit after reaching recursive limit.
10119
10120 2001-08-30  Joern Rennecke <amylaar@redhat.com>
10121             Jason Merrill  <jason_merrill@redhat.com>
10122
10123         * class.c (build_vtable_entry_ref): Subtract in char*, not
10124         ptrdiff_t.
10125
10126 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
10127
10128         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
10129         (build_cplus_array_type): Use cp_build_qualified_type, not
10130         TYPE_MAIN_VARIANT, to get an unqualified version.
10131
10132         * decl2.c (grok_alignof): Lose.
10133         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
10134         * typeck.c (c_alignof): Lose.
10135         * semantics.c (finish_sizeof, finish_alignof): New.
10136         * parse.y: Use them.
10137         * cp-tree.h: Declare them.
10138
10139 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
10140
10141         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
10142         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
10143         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
10144
10145 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
10146
10147         * typeck2.c (add_exception_specifier): Only require complete type if
10148         not in processing template declaration.
10149
10150 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10151
10152         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
10153         GNU_xref_start_scope and GNU_xref_end_scope.
10154
10155         * tree.c (TYPE_HASH): Moved to ../tree.h.
10156
10157 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
10158
10159         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
10160         on COMPOUND_EXPRs.
10161
10162 2001-08-14  Richard Henderson  <rth@redhat.com>
10163
10164         * class.c, cp-tree.h (build_vfn_ref): Remove.
10165         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
10166
10167 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
10168
10169         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
10170         empty class assignment as having side-effects to avoid
10171         spurious warnings.
10172
10173 2001-08-13  Zack Weinberg  <zackw@panix.com>
10174
10175         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
10176         * except.c: Include libfuncs.h.
10177
10178 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
10179
10180         * decl.c (grokdeclarator): Clarify diagnostic message.
10181
10182 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10183
10184         * decl2.c (do_nonmember_using_decl): Replace using directive
10185         with using declaration in the error message.
10186
10187 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10188
10189         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
10190         criterion to avoid rebuilding expression tree instead of
10191         processing_template_decl.
10192
10193 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
10194
10195         Support named return value optimization for inlines, too.
10196         * decl.c (finish_function): Nullify returns here.
10197         * semantics.c (genrtl_start_function): Not here.
10198         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
10199         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
10200         Also nullify the CLEANUP_STMT for the nrv.
10201         * cp-tree.h: Declare it.
10202         * optimize.c (declare_return_variable): Replace the nrv with the
10203         return variable.
10204         * typeck.c (check_return_expr): Be more flexible on alignment check.
10205         Ignore cv-quals when checking for a matching type.
10206
10207 2001-08-09  Richard Henderson  <rth@redhat.com>
10208
10209         * decl2.c (finish_objects): Use target hooks instead of
10210         assemble_constructor and assemble_destructor.
10211
10212 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10213
10214         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
10215
10216 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
10217
10218         PR c++/3820
10219         Stop using TYPE_NONCOPIED_PARTS.
10220         * call.c (build_over_call): Be careful when copy constructing
10221         or assigning to an empty class.
10222         * class.c (check_bases_and_members): It has a
10223         COMPLEX_ASSIGN_REF if it has a vptr.
10224         (layout_class_type): Don't add empty class padding to
10225         TYPE_NONCOPIED_PARTS.
10226         (finish_struct_1): Don't add the VFIELD either.
10227         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
10228         initialization.
10229
10230 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
10231
10232         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
10233
10234 2001-08-06  Richard Henderson  <rth@redhat.com>
10235
10236         * decl2.c (finish_objects): Pass a symbol_ref and priority to
10237         assemble_{constructor,destructor}.  Remove priority handling.
10238
10239 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
10240
10241         Don't allow template-id in using-declaration.
10242         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
10243         (do_class_using_decl): Likewise.
10244
10245 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10246
10247         * cp/spew.c (read_token): No need to pop buffers.
10248
10249 2001-08-02  Stan Shebs  <shebs@apple.com>
10250
10251         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
10252         (fnaddr_from_vtable_entry): Remove decl.
10253         * method.c (use_thunk): Update comment.
10254
10255 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
10256
10257         * repo.c (get_base_filename): Change return value to const char
10258         pointer.
10259
10260 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
10261
10262         Kill -fhonor-std.
10263         * NEWS: Document.
10264         * cp-tree.h (flag_honor_std): Remove.
10265         (CPTI_FAKE_STD): Remove.
10266         (std_node): Remove comment about it being NULL.
10267         (fake_std_node): Remove.
10268         * decl.c (in_fake_std): Remove.
10269         (walk_namespaces_r): Remove fake_std_node check.
10270         (push_namespace): Remove in_fake_std code.
10271         (pop_namespace): Likewise.
10272         (lookup_name_real): Remove fake_std_node check.
10273         (init_decl_processing): Always create std_node. Always add
10274         std:: things there.
10275         (builtin_function): Always put non '_' fns in std.
10276         * decl2.c (flag_honor_std): Remove.
10277         (lang_f_options): Remove honor-std.
10278         (unsupported_options): Add honor-std.
10279         (set_decl_namespace): Remove fake_std_node check.
10280         (validate_nonmember_using_decl): Likewise.
10281         (do_using_directive): Likewise.
10282         (handle_class_head): Likewise.
10283         * dump.c (cp_dump_tree): Likewise.
10284         * except.c (init_exception_processing): Adjust.
10285         * init.c (build_member_call): Remove fake_std_node check.
10286         (build_offset_ref): Likewise.
10287         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
10288         * rtti.c (init_rtti_processing): Adjust.
10289
10290 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
10291
10292         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
10293         operand while calling cp_tree_equal.
10294
10295 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
10296
10297         The 3.0 ABI no longer has vbase pointer fields.
10298         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
10299         FORMAT_VBASE_NAME): Remove.
10300         * method.c (do_build_copy_constructor): Adjust.
10301         (do_build_assign_ref): Adjust.
10302         * search.c (lookup_field_r): Adjust.
10303         * typeck.c (build_component_ref): Adjust.
10304
10305         The 3.0 ABI always has a vtable pointer at the start of every
10306         polymorphic class.
10307         * rtti.c (build_headof_sub): Remove.
10308         (build_headof): Adjust.
10309         (get_tinfo_decl_dynamic): No need to check flag_rtti
10310         here. Adjust.
10311         (create_real_tinfo_var): Explain why we need a hidden name.
10312
10313 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
10314
10315         PR c++/3631
10316         * class.c (update_vtable_entry_for_fn): The fixed adjustment
10317         of a virtual thunk should be from declaring base.
10318
10319 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
10320
10321         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
10322         the shared virtual base, so preserving inheritance graph order.
10323
10324 2001-07-30  Andreas Jaeger  <aj@suse.de>
10325
10326         * decl2.c: Remove unused var global_temp_name_counter.
10327
10328 2001-07-28  Richard Henderson  <rth@redhat.com>
10329
10330         * method.c (pending_inlines): Remove.
10331
10332 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
10333
10334         * class.c (mark_primary_virtual_base): Don't adjust base
10335         offsets here.
10336         (dfs_unshared_virtual_bases): Adjust them here.
10337         (mark_primary_bases): Explain why we adjust at the end.
10338
10339 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
10340
10341         * class.c (finish_struct_1): When copying the primary base's
10342         VFIELD, make sure we find it is at offset zero.
10343
10344 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10345
10346         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
10347         tsubst_expr for default template arguments.
10348
10349 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
10350
10351         PR c++/3621
10352         * spew.c (yylex): Only copy the token's lineno, if it is
10353         nonzero.
10354
10355 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
10356
10357         PR c++/3624
10358         * call.c (resolve_args): Simplify, call
10359         convert_from_reference.
10360         (build_new_op): Resolve and convert from reference ARG1
10361         earlier. Adjust ARG2 & ARG3 resolve and conversion.
10362
10363 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
10364
10365         * decl.c (last_function_parm_tags): Remove.
10366         (current_function_parm_tags): Remove.
10367         (init_decl_processing): Adjust.
10368         (start_function): Adjust.
10369         (store_parm_decls): Adjust.
10370
10371         PR c++/3152
10372         * decl.c (grokdeclarator): Detect when a function typedef is
10373         declaring a function, and create last_function_parms correctly.
10374
10375 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
10376
10377         * call.c (joust): Only prefer a non-builtin candidate to a builtin
10378         one if they have the same signature.
10379
10380         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
10381         it rather than toplevel_bindings_p.  Give it a mangled name if static.
10382         (convert_to_reference): Adjust.
10383         * decl2.c (get_temp_name): Lose.
10384         * mangle.c (mangle_ref_init_variable): New fn.
10385         (mangle_guard_variable): Strip the ref-init header.
10386         * cp-tree.h: Adjust.
10387         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
10388         initializer.
10389         (grok_reference_init): Always use DECL_INITIAL.
10390
10391 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10392
10393         PR c++/3416
10394         * call.c (build_conditional_expr): Recheck args after
10395         conversions.
10396         * cp-tree.h (build_conditional_expr): Move to correct file.
10397         * typeck.c (decay_conversion): Diagnose any unknown types
10398         reaching here.
10399         (build_binary_op): Don't do initial decay or default
10400         conversions on overloaded functions.
10401         (build_static_cast): Don't do a decay conversion here.
10402
10403 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10404
10405         PR c++/3543
10406         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
10407         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
10408
10409 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10410
10411         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
10412         (create_vtbl_ptr): ... here.
10413
10414 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10415
10416         * class.c (build_vbase_offset_vbtl_entries): Look for
10417         non-primary base of which we are a sub vtable.
10418
10419 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
10420
10421         * semantics.c (finish_this_expr):  Remove unused code.
10422
10423 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
10424
10425         Simplify rtti, now we've only one ABI.
10426         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
10427         CPTI_TINFO_VAR_ID.
10428         (tinfo_decl_id, tinfo_var_id): Remove.
10429         (get_typeid_1): Remove.
10430         * rtti.c
10431         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
10432         (typeid_ok_p): New function.
10433         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
10434         (get_tinfo_decl): Remove old abi documentation.
10435         (tinfo_from_decl): Remove.
10436         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
10437         (get_typeid_1): Remove.
10438         (get_base_offset): Remove.
10439         (synthesize_tinfo_var): Absorb get_base_offset.
10440         (create_real_tinfo_var): Don't use tinfo_decl_id.
10441
10442 2001-07-23  Graham Stott  <grahams@redhat.com>
10443
10444         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
10445         variable has_two_argument_delete_p.
10446
10447 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
10448
10449         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
10450         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
10451         (CPTI_INDEX_IDENTIFIER): Remove.
10452         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
10453         (delta2_identifier): Remove.
10454         (index_identifier): Remove.
10455         (pfn_or_delta2_identifier): Remove.
10456         (flag_vtable_thunks): Remove.
10457         (VTABLE_DELTA2_NAME): Remove.
10458         (VTABLE_INDEX_NAME): Remove.
10459         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
10460         (vfunc_ptr_type_node): Adjust.
10461         (VTABLE_NAME_PREFIX): Adjust.
10462         (build_vfn_ref): Lose first parameter.
10463         (fixup_all_virtual_upcast_offsets): Remove.
10464         * decl.c (initialize_predefined_identifiers): Remove
10465         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
10466         (init_decl_processing): Remove no-vtable-thunk code.
10467         * decl2.c (flag_vtable_thunks): Remove.
10468         (mark_vtable_entries): Remove no-vtable-thunk code.
10469         * error.c (dump_decl): Remove no-vtable-thunk code.
10470         (dump_expr): Adjust ptr to member function code.
10471         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
10472         code.
10473         * rtti.c (build_headof): Remove no-vtable-thunk code.
10474         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
10475         * search.c (get_base_distance): Remove expand_upcast_fixups case.
10476         (virtual_context) Remove.
10477         (expand_upcast_fixups): Remove.
10478         (fixup_virtual_upcast_offsets): Remove.
10479         (fixup_all_virtual_upcast_offsets): Remove.
10480         * typeck.c (get_member_function_from_ptrfunc): Remove
10481         no-vtable-thunk code.
10482         * call.c (build_over_call): Adjust call to build_vfn_ref.
10483         * class.c (build_vfn_ref): Lose first parameter. Remove
10484         no-vtable-thunk code.
10485         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
10486         (build_vtable_entry): Remove no-vtable-thunk code.
10487
10488 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
10489
10490         Remove old-abi remnants. Remove comments about old abi
10491         behavior. Remove references to 'new-abi' in comments.
10492         * cp-tree.h: Adjust comments.
10493         (vbase_offsets_in_vtable_p): Delete.
10494         (vcall_offsets_in_vtable_p): Delete.
10495         (vptrs_present_everywhere_p): Delete.
10496         (all_overridden_vfuns_in_vtables_p): Delete.
10497         (merge_primary_and_secondary_vtables_p): Delete.
10498         (TYPE_CONTAINS_VPTR_P): Adjust.
10499         (VTT_NAME_PREFIX): Remove.
10500         (CTOR_VTBL_NAME_PREFIX): Remove.
10501         (init_vbase_pointers): Remove.
10502         * class.c: Adjust coments.
10503         (build_vbase_pointer_fields): Delete.
10504         (build_vbase_pointer): Remove old-abi code.
10505         (build_secondary_vtable): Likewise.
10506         (modify_all_vtables): Likewise.
10507         (create_vtable_ptr): Likewise.
10508         (layout_class_type): Likewise.
10509         (finish_struct_1): Likewise.
10510         (finish_vtbls): Likewise.
10511         (dfs_finish_vtbls): Delete.
10512         (build_vbase_offset_vtbl_entries): Remove old-abi code.
10513         * cvt.c: Adjust comments.
10514         * decl.c: Adjust comments.
10515         * decl2.c: Adjust comments.
10516         * init.c: Adjust comments.
10517         (construct_virtual_bases): Remove old-abi code.
10518         * lang-specs.h: Remove -fno-new-abi.
10519         * mangle.c: Adjust comments.
10520         * rtti.c: Adjust comments.
10521         (get_base_offset): Remove old-abi-code.
10522         * search.c: Adjust comments.
10523         (dfs_init_vbase_pointers): Remove.
10524         (dfs_vtable_path_unmark): Remove.
10525         (init_vbase_pointers): Remove.
10526         * semantics.c: Adjust comments.
10527         (emit_associated_thunks): Remove old-abi code.
10528         * typeck.c: Adjust comments.
10529
10530 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
10531
10532         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
10533         params.h.
10534
10535 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
10536
10537         * class.c (finish_struct_anon): Forbid nested classes.
10538
10539 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
10540
10541         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
10542         * optimize.c: Include debug.h.
10543         (maybe_clone_body): Use debug hook.
10544         * semantics.c: Include debug.h.
10545         (expand_body): Use debug hook.
10546
10547 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
10548
10549         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
10550
10551 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
10552
10553         * class.c (type_requires_array_cookie): New function.
10554         (check_methods): Don't try to figure out whether the type needs a
10555         cookie here.
10556         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
10557         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
10558         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
10559         * pt.c (instantiate_class_template): Don't set
10560         TYPE_VEC_DELETE_TAKES_SIZE.
10561         * NEWS: Document ABI changes from GCC 3.0.
10562
10563 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
10564             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
10565
10566         * NEWS (Changes in GCC 3.0): Fix typo.
10567
10568 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10569
10570         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
10571         which attributes are to be attached, and a flags argument.  Update
10572         call to decl_attributes.
10573         (grokfield): Update call to decl_attributes.
10574         * class.c (finish_struct): Update call to cplus_decl_attributes.
10575         * cp-tree.h (cplus_decl_attributes): Update prototype.
10576         * decl.c (start_decl, grokdeclarator, start_function): Update
10577         calls to decl_attributes and cplus_decl_attributes.
10578         * friend.c (do_friend): Update call to cplus_decl_attributes.
10579         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
10580
10581 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
10582
10583         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
10584         for `register' variables with an asm-specification.
10585
10586 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
10587
10588         * semantics.c (finish_asm_stmt): Mark the output operands
10589         to an asm addressable, if necessary.
10590
10591 2001-07-11  Ben Elliston  <bje@redhat.com>
10592
10593         * Revert this change -- there is a subtle bug.
10594
10595         PR c++/80
10596         * decl.c (finish_enum): New "attributes" argument; pass it to
10597         cplus_decl_attributes.  Use a narrower type if the enum is packed.
10598         * cp-tree.h (finish_enum): Adjust prototype.
10599         * parse.y (enum_head): New non-terminal.
10600         (structsp): Use it. Enums now may be preceded or followed by
10601         optional attributes -- pass their chained tree to finish_enum().
10602         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
10603
10604 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
10605
10606         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
10607         variables.
10608
10609 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
10610
10611         * semantics.c (cp_expand_stmt): Fix for null
10612         current_function_return_value.
10613
10614 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
10615
10616         * call.c (build_op_delete_call): Initialize fn.
10617         (convert_like_real): Delete conditional.
10618         (joust): Initialize *w and *l.
10619         * class.c: Add prototype for binfo_ctor_vtable.
10620         (get_primary_binfo): Initialize result.
10621         * init.c (build_java_class_ref): Initialize name.
10622
10623 2001-07-09  Erik Rozendaal  <dlr@acm.org>
10624
10625         * typeck.c (unary_complex_lvalue): Do not duplicate the
10626         argument to modify, pre-, or post-increment when used as an
10627         lvalue and when the argument has side-effects.
10628
10629 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10630
10631         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
10632         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
10633         cplus_decl_attributes even if attrs is NULL.
10634         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
10635
10636 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10637
10638         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
10639         calls to decl_attributes.
10640
10641 2001-07-06  Ira Ruben   <ira@apple.com>
10642
10643         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
10644         be DECL_TEMPLATE_RESULT.
10645
10646 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10647
10648         * cp-tree.h (copy_template_template_parm): Rename to ...
10649         (bind_template_template_parm): ... here.
10650         * tree.c (copy_template_template_parm): Rename to ...
10651         (bind_template_template_parm): ... here.  Remove the case when
10652         NEWARGS is NULL_TREE.
10653         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
10654         BOUND_TEMPLATE_TEMPLATE_PARM.
10655         * pt.c (lookup_template_class): Adjust.
10656
10657 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
10658
10659         * cvt.c (convert_lvalue): New fn.
10660         * cp-tree.h: Declare it.
10661         * method.c (do_build_assign_ref): Use it.
10662         (do_build_copy_constructor): Convert parm to base types
10663         before calling base constructors.
10664
10665         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
10666         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
10667         optimize.
10668         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
10669
10670 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
10671
10672         * optimize.c (optimize_inline_calls): New function, broken out
10673         of ...
10674         (optimize_function): ... here. Call it. Don't inline if it is
10675         a thunk.
10676         (dump_function): Print name of dump flag causing this dump.
10677         * semantics.c (expand_body): Move thunk inline check to
10678         optimize_function.
10679
10680 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10681
10682         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
10683         (comptypes): Use target.comp_type_attributes.
10684
10685 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
10686
10687         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
10688
10689 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
10690
10691         * error.c (lang_print_error_function): Add a `diagnostic_context *'
10692         parameter. Tweak.
10693
10694 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10695
10696         * decl2.c (import_export_class): Update.
10697
10698 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10699
10700         * error.c (init_error): Adjust settings.
10701
10702 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10703
10704         * error.c (init_error): Adjust settings.
10705
10706 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
10707
10708         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
10709         return pointers to data members by reference rather than by value.
10710
10711 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
10712
10713         Implement the Named Return Value optimization.
10714         * cp-tree.h (struct cp_language_function): Add x_return_value.
10715         (current_function_return_value): Now a macro.
10716         * decl.c: Don't define it.
10717         (define_label, finish_case_label): Don't clear it.
10718         (init_decl_processing): Don't register it with GC.
10719         * semantics.c (genrtl_finish_function): Don't check it for
10720         no_return_label.  Copy the RTL from the return value to
10721         current_function_return_value and walk, calling...
10722         (nullify_returns_r): ...this new fn.
10723         * typeck.c (check_return_expr): Set current_function_return_value.
10724
10725 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
10726
10727         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
10728         sharing a ctor vtable with.  Merge code for cases 1 and 2.
10729         (binfo_ctor_vtable): New fn.
10730         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
10731
10732 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
10733
10734         * class.c (dfs_find_final_overrider): Fix logic.
10735
10736         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
10737         virtual thunk instead of non-virtual.
10738         (get_matching_virtual): Uncomment.
10739
10740         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
10741         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
10742         PARM, not ARG.
10743
10744 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
10745
10746         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
10747         we've not emerged from the hierarchy of RTTI_BINFO on reaching
10748         a non-virtual base.
10749
10750 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
10751
10752         * NEWS: Update release number.
10753
10754 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
10755
10756         PR c++/3130, c++/3131, c++/3132
10757         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
10758         * class.c (force_canonical_binfo_r): Move
10759         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
10760         virtual bases unless they're primary and what they're primary
10761         too has been moved.
10762         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
10763         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
10764         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
10765         derived binfo.
10766         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
10767         (layout_nonempty_base_or_field): Add most derived type
10768         parameter. Adjust.
10769         (layout_empty_base): Likewise.
10770         (build_base_field): Likewise.
10771         (build_base_fields): Likewise.
10772         (propagate_binfo_offsets): Add most derived type
10773         parameter. Skip non canonical virtual bases too.
10774         (dfs_set_offset_for_unshared_vbases): Don't skip primary
10775         bases. Do skip canonical bases.
10776         (layout_virtual_bases): Adjust.
10777         (layout_class_type): Adjust.
10778         (dfs_get_primary_binfo): Build list of virtual primary base
10779         candidates.
10780         (get_primary_binfo): Check that the shared virtual primary
10781         base candidate was found first.
10782         (accumulate_vtbl_inits): Don't do anything for non-vptr
10783         containing binfos. For case 1 primary virtual bases, keep
10784         checking that we've not emerged from the hierarchy of RTTI_BINFO.
10785
10786 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
10787
10788         PR c++/3089
10789         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
10790         hierarchy looking for primary bases for a ctor
10791         vtable. Recursively call oneself, if we meet our primary via
10792         this route and haven't met it yet via inheritance graph order.
10793
10794 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
10795
10796         * lang-options.h: Emit documentation for -fno-honor-std, not
10797         -fhonor-std.
10798
10799 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
10800
10801         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
10802         Don't clobber delta.
10803         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
10804
10805 2001-06-10  Mark Mitchell <mark@codesourcery.com>
10806             Gabriel Dos Reis  <gdr@codesourcery.com>
10807
10808         * Make-lang.in (cp/call.o): Depend on diagnostic.h
10809         (cp/typeck.o): Depend on diagnostic.h
10810         (cp/typeck2.o): Depend on diagnostic.h
10811         (cp/repo.o): Depend on dignostic.h
10812         * typeck.c: #include diagnostic.h
10813         (convert_for_initialization): Remove extern declaration for
10814         warningcount and errorcount.
10815
10816         * call.c: #include diagnostic.h
10817         (convert_like_real): Remove extern declaration for warnincount and
10818         errorcount.
10819
10820         * repo.c: #include diagnostic.h
10821         * typeck2.c: #include diagnostic.h
10822
10823 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
10824
10825         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
10826         in previous change.
10827
10828 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
10829
10830         PR c++/2929
10831         * friend.c (do_friend): Use push_decl_namespace for classes at
10832         namespace scope.
10833
10834 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
10835             Jason Merrill <jason_merrill@redhat.com>
10836
10837         PR c++/3061
10838         * class.c (build_secondary_vtable): Use assert, rather than an error
10839         message.
10840         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
10841         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
10842         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
10843         Don't set BINFO_VTABLE for a primary virtual base.
10844
10845 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
10846
10847         * decl.c (duplicate_decls): Update source position information
10848         when a template function is defined.
10849
10850 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
10851
10852         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
10853
10854 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
10855
10856         PR c++/2914
10857         * decl.c (pushtag): Don't push into a complete type's scope.
10858
10859 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
10860
10861         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
10862         (struct lang_decl_flags): Lose generate_with_vtable_p.
10863         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
10864         * class.c (copy_virtuals): Adjust.
10865         * decl2.c (mark_vtable_entries): Adjust.
10866         * method.c (make_thunk, build_vtable_entry): Adjust.
10867         * class.c (update_vtable_entry_for_fn): Only look as far as the
10868         first defining class.
10869         (build_vtbl_initializer): Put nothing in the slot for a function only
10870         defined in a lost primary virtual base.
10871         (add_vcall_offset_vtbl_entries_1): Use the same code for
10872         the lost primary case and the normal case.
10873         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
10874         (get_vfield_offset, get_derived_offset): Lose.
10875         (dfs_find_final_overrider): Use look_for_overrides_here.
10876         (get_matching_virtual): New fn.
10877         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
10878         not BV_VCALL_INDEX.
10879         * search.c (look_for_overrides_here): Split out from...
10880         (look_for_overrides_r): Here.
10881
10882         * class.c (find_final_overrider): Return error_mark_node on error.
10883
10884         * decl2.c (key_method): #if 0 accidental change.
10885
10886 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10887
10888         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
10889         (build_over_call): Likewise.
10890         * decl.c (grokparms): Likewise.
10891         * pt.c (tsubst_decl): Likewise.
10892         * typeck.c (convert_arguments): Likewise.
10893
10894 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
10895
10896         * semantics.c (begin_class_definition): Robustify.
10897
10898         * pt.c (instantiate_decl): Tell the repository code about the
10899         clones, not the cloned functions.
10900         * repo.c (repo_template_used): Explicitly instantiate the cloned
10901         function, not the clones.
10902
10903 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
10904
10905         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
10906         ICS_BAD_FLAG on created conversion.
10907         (compare_ics): Break out rank.
10908
10909 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
10910
10911         * decl.c (xref_tag): Remove extraneous %s on dependent name
10912         lookup warning.
10913
10914 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
10915
10916         * class.c (layout_vtable_decl): Fix off by one error on
10917         build_index_type.
10918         (build_vtt): Likewise.
10919         (build_ctor_vtbl_group): Likewise.
10920
10921 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
10922
10923         * class.c (maybe_indent_hierarchy): New function.
10924         (dump_class_hierarchy_r): Add flags. Dump extra binfo
10925         information, if enabled. Use maybe_indent_hierarchy. Adjust
10926         output format.
10927         (dump_class_hierarchy): Adjust prototype. Adjust output format.
10928         (dump_array, dump_vtable, dump_vtt): New functions.
10929         (finish_struct_1): Adjust hierarchy dumping.
10930         (initialize_vtable): Call dump_vtable.
10931         (build_vtt): Call dump_vtt.
10932         (build_ctor_vtbl_group): Call dump_vtable.
10933         * decl2.c (flag_dump_class_layout): Remove.
10934         (cxx_decode_option): Remove dump translation unit
10935         and dump class hierarchy check. Call dump_switch_p.
10936         (finish_file): Adjust dumping.
10937         (dump.c): Only dump base classes if not TDF_SLIM.
10938         Only dump namespace members if not TDF_SLIM.
10939         * optimize.c (dump_function): New function.
10940         (optimize_function): Call dump_function.
10941         * semantics.c (expand_body): Use dump_enabled_p.
10942
10943 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
10944
10945         PR g++/2936
10946         Part missed from first commit
10947         * decl2.c (finish_anon_union): Copy context.
10948
10949 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
10950
10951         PR g++/2936
10952         * optimize.c (remap_decl): Remap anonymous aggregate members too.
10953
10954 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
10955
10956         PR g++/2823
10957         * semantics.c (expand_body): Don't optimize thunks.
10958
10959 2001-05-25  Sam TH  <sam@uchicago.edu>
10960
10961         * cp-tree.h lex.h: Fix header include guards.
10962
10963 2001-05-25  Mark Mitchell <mark@codesourcery.com>
10964
10965         * decl.c (init_decl_processing): Tweak.
10966
10967 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
10968
10969         * decl.c (duplicate_decls): Tidy.
10970         (init_decl_processing): Always set flag_no_builtin.
10971
10972 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
10973
10974         PR c++/2184
10975         * decl2.c (do_local_using_decl): Push the decls, even in a
10976         template.
10977
10978 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
10979
10980         * optimize.c (initialize_inlined_parameters): Don't set
10981         TREE_READONLY for a VAR_DECL taking the place of an inlined
10982         PARM_DECL.
10983
10984 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
10985
10986         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
10987         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
10988         attribute.
10989
10990 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
10991
10992         * parse.y: Refer to compound literals as such, not as
10993         constructor-expressions.
10994
10995 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
10996
10997         * call.c (build_op_delete_call): Ignore exception-specifications
10998         when looking for matching delete operators.
10999         * init.c (build_new_1): Compute whether or not the allocation
11000         function used is a placement allocation function or not, and
11001         communicate this information to build_op_delete_call.
11002
11003 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
11004
11005         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
11006         (build_vtbl_ref): Adjust.
11007         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
11008         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
11009         Re-add vtable-gc.
11010         (unsupported_options): Correspondingly.
11011
11012         * decl2.c (maybe_make_one_only): Check flag_weak, not
11013         supports_one_only().
11014
11015         * cp-tree.def (START_CATCH_STMT): Lose.
11016         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
11017         * tree.c (cp_statement_code_p): Don't case it.
11018         * semantics.c (cp_expand_stmt): Likewise.
11019         * cp-tree.h (START_CATCH_TYPE): Lose.
11020         (HANDLER_TYPE): New.
11021         * except.c (expand_start_catch_block): Don't start any blocks.
11022         Return the type.
11023         (expand_end_catch_block): Don't end any blocks.
11024         * parse.y (handler): Don't pass anything from finish_handler_parms
11025         to finish_handler.
11026         * pt.c (tsubst_expr): Likewise.
11027         * semantics.c (begin_handler): Call note_level_for_catch here.
11028         (finish_handler_parms): Don't return anything.
11029         (genrtl_catch_block, begin_catch_block): Lose.
11030         (genrtl_handler): Call expand_start_catch here.
11031
11032 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
11033
11034         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
11035         (get_vtable_decl, build_vtt): Not here.
11036
11037 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
11038
11039         PR c++/2781
11040         * optimize.c (update_cloned_parm): Copy addressability and other
11041         flags.
11042
11043 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11044
11045         * pt.c (determine_specialization): Ignore artificial functions.
11046
11047 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
11048
11049         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
11050         (C_RID_CODE): Remove.
11051         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
11052         (init_parse): Don't do it here.
11053
11054 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
11055
11056         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
11057         function declaration to avoid stripping the symbol's attributes.
11058
11059 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
11060
11061         * decl.c (pushdecl): Adjust error string.
11062         (xref_tag): Adjust friend class injection warning. Remove the
11063         inherited name from the class shadowed scope.
11064
11065 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
11066
11067         * except.c (cp_protect_cleanup_actions): New function.
11068         (init_exception_processing): Don't set protect_cleanup_actions
11069         here.  Do set lang_protect_cleanup_actions.
11070
11071 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
11072
11073         * spew.c (read_token): Call yyerror on all unexpected tokens.
11074
11075 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
11076
11077         * init.c (member_init_ok_or_else): Take a tree rather than
11078         string for name.
11079         (expand_member_init): Adjust.
11080
11081 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
11082
11083         * decl.c (duplicate_decls): Suppress warning about duplicate
11084         decls if the first decl is a friend.
11085
11086 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
11087
11088         * except.c (choose_personality_routine): Export.  Add
11089         explanatory comment.  Take an enum languages, not a boolean.
11090         (initialize_handler_parm): Adjust to match.
11091         * cp-tree.h: Prototype choose_personality_routine.
11092         * lex.c (handle_pragma_java_exceptions): New function.
11093         (init_cp_pragma): Register #pragma GCC java_exceptions.
11094
11095 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11096
11097         * method.c (build_mangled_C99_name): Remove unused prototype.
11098
11099 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
11100
11101         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
11102         * typeck.c (get_member_function_from_ptrfunc,
11103         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
11104         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
11105
11106         Reverted Geoff Keating's 2001-05-03's patch.
11107
11108 2001-05-11  Ira Ruben   <ira@apple.com>
11109
11110         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
11111
11112 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
11113
11114         * cp-tree.h (finish_label_expr, lookup_label): Delete.
11115         * parse.y: Update for '&&'; don't issue warning here.
11116         * semantics.c (finish_label_expr): Delete.
11117
11118 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
11119
11120         * splay-tree.h (splay_tree_max): New function.
11121         (splay_tree_min): Likewise.
11122
11123 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
11124
11125         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
11126         (pfn_vflag_identifier): Define.
11127         Update comment about layout of pointer functions.
11128         (build_ptrmemfunc1): Update prototype.
11129         (expand_ptrmemfunc_cst): Update prototype.
11130         * decl.c (initialize_predefined_identifiers): Initialize
11131         pfn_vflag_identifier.
11132         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
11133         an extra field to the type.
11134         * expr.c (cplus_expand_constant): Pass 'flag' between
11135         expand_ptrmemfunc_cst and build_ptrmemfunc1.
11136         * typeck.c (get_member_function_from_ptrfunc): When
11137         FUNCTION_BOUNDARY < 16, look at additional field to determine
11138         if a pointer-to-member is a real pointer or a vtable offset.
11139         (build_ptrmemfunc1): Add new parameter to contain extra field.
11140         (build_ptrmemfunc): Pass the extra field around.
11141         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
11142         (pfn_from_ptrmemfunc): Ignore the extra field.
11143
11144 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
11145
11146         * cp-tree.h (flag_inline_trees): Update documentation.
11147         * decl.c (init_decl_processing): Adjust handling of
11148         flag_inline_functions and flag_inline_trees to support -O3.
11149         (grokfndecl): Set DECL_INLINE on all functions if that's what
11150         the user requested.
11151         (save_function_data): Clear DECL_INLINE in
11152         current_function_cannot_inline is non-NULL.
11153         * decl2.c (flag_inline_trees): Update documentation.
11154
11155 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
11156
11157         * dump.c (cp_dump_tree, USING_STMT case): New case.
11158         * tree.c (cp_statement_code_p): Add USING_STMT.
11159         * decl2.c (do_using_directive): Add the using directive statement.
11160
11161         * tree.c (walk_tree): Reformat an if block.
11162
11163 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
11164
11165         * decl.c (compute_array_index_type): Don't try to do anything with
11166         the indices when processing a template.
11167
11168 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11169
11170         * call.c: NULL_PTR -> NULL.
11171         * class.c: Likewise.
11172         * cvt.c: Likewise.
11173         * decl.c: Likewise.
11174         * decl2.c: Likewise.
11175         * except.c: Likewise.
11176         * init.c: Likewise.
11177         * rtti.c: Likewise.
11178         * search.c: Likewise.
11179         * tree.c: Likewise.
11180         * typeck.c: Likewise.
11181         * typeck2.c: Likewise.
11182
11183 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
11184
11185         * decl2.c (do_using_directive): Revert previous patch.
11186
11187 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
11188
11189         * cp-tree.def (USING_STMT): New statement node.
11190         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
11191         * decl2.c (do_using_directive): Add USING_STMT to statement
11192         tree. Don't emit errors when processing template decl.
11193         * pt.c (tsubst_expr, USING_STMT case): New case.
11194         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
11195
11196 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
11197
11198         * call.c (build_new_op): Convert args from reference here.
11199         (build_conditional_expr): Don't convert here.
11200
11201 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
11202
11203         * spew.c (last_token_id): New static variable.
11204         (read_token): Set it here.
11205         (yyerror): Use it here.
11206
11207 2001-04-30  Richard Henderson  <rth@redhat.com>
11208
11209         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
11210         * decl.c: Likewise.
11211
11212 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
11213
11214         * gxxint.texi: Remove.
11215         * Make-lang.in: Remove all traces of gxxint.texi.
11216
11217 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
11218
11219         * decl2.c (start_static_initialization_or_destruction): Correct
11220         logic to handle the -fno-use-cxa-atexit case.
11221
11222 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
11223
11224         * optimize.c (update_cloned_parm): New function.
11225         (maybe_clone_body): Use it.  Update the `this' parameter too.
11226
11227 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
11228
11229         * decl2.c (unsupported_options): Add new-abi.
11230         * lang-options.h: Remove no longer supported options.
11231
11232 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
11233
11234         * except.c (can_convert_eh): Don't check template parms,
11235         typename types etc.
11236
11237 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
11238
11239         * optimize.c (maybe_clone_body): Copy parameter names and locations.
11240
11241 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
11242
11243         * cp-tree.h (adjust_clone_args): Prototype new function.
11244         * class.c (adjust_clone_args): New function.
11245         * decl.c (start_function): Call it for in charge ctors.
11246
11247 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
11248
11249         * method.c (use_thunk): Make sure that thunks really are emitted
11250         when requested.
11251
11252 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
11253
11254         * mangle.c (write_chars): New macro.
11255         (hwint_to_ascii): New function
11256         (write_number): Use it.
11257         (write_integer_cst): Deal with really big numbers.
11258
11259 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
11260
11261         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
11262         the clone.
11263
11264 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
11265
11266         * decl.c (grokdeclarator): Set context of namespace scope
11267         TYPE_DECLS.
11268
11269 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
11270
11271         * cp/optimize.c: Include hashtab.h.
11272         (struct inline_data): Add tree_pruner.
11273         (expand_call_inline, expand_calls_inline): Use it when calling
11274         walk_tree.
11275         (optimize_function): Initialize and free tree_pruner.
11276
11277 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
11278
11279         Lazy __FUNCTION__ generation.
11280         * cp-tree.def (FUNCTION_NAME): Remove.
11281         * cp-tree.h (function_name_declared_p): Remove.
11282         (cp_fname_init): Prototype.
11283         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
11284         don't call declare_function_name. Call start_fname_decls.
11285         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
11286         clobber the line number.
11287         (cp_fname_init): New function.
11288         (start_function): Call start_fname_decls.
11289         (finish_function): Call finish_fname_decls.
11290         * lex.c (reswords): Add slots for __FUNCTION__ et al.
11291         (rid_to_yy): Add mappings for __FUNCTION__ et al.
11292         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
11293         * parse.y (VAR_FUNC_NAME): New token.
11294         (primary): Add VAR_FUNC_NAME.
11295         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
11296         generation.
11297         (tsubst, FUNCTION_NAME case): Remove.
11298         (tsubst_copy, FUNCTION_NAME case): Remove.
11299         (tsubst_expr, DECL_STMT case): Be careful with a
11300         DECL_PRETTY_FUNCTION_P.
11301         (instantiate_decl): Remove function_name_declared_p.
11302         * semantics.c (begin_compound_statement): Don't call
11303         declare_function_name here.
11304         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
11305         (finish_translation_unit): Call finish_fname_decls.
11306         (expand_body): Remove function_name_declared_p.
11307         * typeck2.c (digest_init): Allow any ERROR_MARK.
11308
11309 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
11310
11311         * pt.c (tsubst_decl): Use VOID_TYPE_P.
11312         * semantics.c: Fix some typos.
11313
11314 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
11315
11316         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
11317
11318 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11319
11320         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
11321
11322 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
11323
11324         * except.c (build_throw): Wrap the initialization of the exception
11325         object in a MUST_NOT_THROW_EXPR.
11326         (do_free_exception): #if 0.
11327
11328 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
11329
11330         * cp-tree.h (finish_enum): Change prototype.
11331         * decl.c (finish_enum): Reorganize.
11332         * parse.y (structsp): Adjust calls to finish_enum.
11333
11334 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
11335
11336         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
11337         't' case.
11338
11339 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
11340
11341         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
11342         (layout_empty_base): Return at end flag.
11343         (build_base_field): Likewise.
11344         (build_base_fields): Likewise.
11345         (layout_virtual_bases): Don't add 1 to eoc value.
11346         (end_of_class): Use full size for empty bases.
11347         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
11348         empty bases. Don't add 1 to eoc value. Only add trailing padding
11349         if we're an empty class with no empty bases.
11350         (dump_class_hierarchy): Dump size and alignment.
11351
11352 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
11353
11354         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
11355         ICS_BAD_FLAG.
11356
11357 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
11358
11359         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
11360         is found, look first if name does not match the structure name.
11361
11362 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
11363
11364         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
11365         set.
11366         (SET_DECL_LANGUAGE): New macro.
11367         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
11368         (pushdecl): Likewise.
11369         (build_library_fn_1): Likewise.
11370         (build_cp_library_fn): Likewise.
11371         (grokfndecl): Likewise.
11372         (grokvardecl): Mark `extern "C"' variables as having C linkage.
11373         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
11374         * lex.c (retrofit_lang_decl): Likewise.
11375         * mangle.c (mangle_decl_string): Don't mangle the names of
11376         variables declared with C language linkage.
11377         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
11378
11379 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11380
11381         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
11382         flag_access_control from uninitialized storage.
11383
11384 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
11385
11386         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
11387         * mangle.c (write_pointer_to_member_type): Fix mangling of
11388         pointers to cv-qualified member function types.
11389
11390         * init.c (build_delete): Create a SAVE_EXPR for the address if
11391         we're going to use it more than once.
11392
11393 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
11394
11395         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
11396         (expand_ptremfunc_cst): Change prototype.
11397         (delta2_from_ptrmemfunc): Remove.
11398         * expr.c (cplus_expand_constant): Adjust call to
11399         expand_ptrmemfunc_cst.
11400         * typeck.c (build_ptrmemfunc1): Simplify.
11401         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
11402         results in a constant.
11403         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
11404         (delta2_from_ptrmemfunc): Remove.
11405         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
11406
11407 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
11408
11409         * cp-tree.h (decl_namespace_list): New macro.
11410         (struct saved_scope): Add decl_ns_list.
11411         * decl.c (mark_saved_scope): Mark it.
11412         * decl2.c: Lose static decl_namespace_list.
11413         (init_decl2): Don't save it.
11414
11415 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11416
11417         * cp-tree.h (warn_return_type, yylex): Delete redundant
11418         declarations.
11419
11420         * decl.c (current_class_depth, global_namespace): Likewise.
11421
11422         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
11423
11424         * repo.c (flag_use_repository): Likewise.
11425
11426 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11427
11428         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
11429         set_block, pushdecl, getdecls, gettags, init_decl_processing,
11430         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
11431         lvalue_or_else, print_lang_statistics, comp_target_types,
11432         unsigned_type, signed_type, signed_or_unsigned_type,
11433         build_function_call, mark_addressable, incomplete_type_error):
11434         Delete redundant declarations.
11435
11436 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
11437
11438         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
11439         (TYPE_ANONYMOUS_P): New macro.
11440         (TAGGED_TYPE_P): New macro.
11441         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
11442         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
11443         * tree.c (no_linkage_helper): Likewise.
11444         * semantics.c (begin_class_definition): Likewise.
11445         * pt.c (convert_template_argument): Likewise.
11446         * lex.c (check_for_missing_semicolon): Likewise.
11447
11448 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
11449
11450         * class.c (dfs_unshared_virtual_bases): New function.
11451         (mark_primary_bases): Call it.
11452         (check_bases): Ignore virtual bases when determining
11453         nearly-emptiness.
11454
11455 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
11456
11457         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
11458
11459 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
11460
11461         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
11462         cloned function to the clone.
11463
11464 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11465
11466         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
11467
11468         * semantics.c: Include expr.h.
11469
11470 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
11471
11472         * method.c (implicitly_declare_fn): Commonize code for copy ctor
11473         and assignment op. Set TREE_USED for parameter.
11474
11475 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
11476
11477         * class.c (find_final_overrider_data): Add `candidates'.
11478         (dfs_find_final_overrider): Don't issue error messages
11479         prematurely.
11480         (find_final_overrider): Issue error messages here.
11481         (build_base_field): Don't warn about amgibuous direct bases here.
11482         (warn_about_ambiguous_direct_bases): New function.
11483         (layout_class_type): Use it.
11484
11485 2001-04-10  Richard Henderson  <rth@redhat.com>
11486
11487         * typeck.c (build_array_ref): Push the array reference inside
11488         COMPOUND_EXPR and COND_EXPR.
11489
11490 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
11491
11492         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
11493         * decl.c (duplicate_decls): Adjust accordingly.
11494         (maybe_commonize_var): Likewise.
11495         (grokfndecl): Likewise.
11496         (start_function): Likewise.
11497         (start_method): Likewise.
11498         * decl2.c (key_method): Likewise.
11499         (import_export_decl): Likewise.
11500         * method.c (implicitly_declare_fn): Likewise.
11501         * optimize.c (maybe_clone_body): Likewise.
11502
11503 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
11504
11505         * lang-specs.h: Add __DEPRECATED.
11506
11507 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
11508
11509         * search.c (get_dynamic_cast_base_type): When building a new
11510         constant, set its type to ssizetype.
11511
11512 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
11513
11514         * optimize.c (expand_call_inline): Only add newly inlined statements
11515         into inlined_stmts.
11516
11517 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
11518
11519         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
11520         (OPERATOR_FORMAT): Likewise.
11521         (OPERATOR_TYPENAME_FORMAT): Likewise.
11522         * operators.def: Remove old name-mangling information.
11523         * decl.c (grok_op_properties): Adjust accordingly.
11524         * lex.c (init_operators): Likewise.
11525         * rtti.c (get_tinfo_decl): Issue error messages about types that
11526         have variable size.
11527
11528 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
11529
11530         * decl2.c (import_export_decl): Don't call import_export_class
11531         when processing an inline member function.
11532         * semantics.c (expand_body): Call import_export_decl before
11533         emitting inline functions.
11534
11535 2001-03-28  Richard Henderson  <rth@redhat.com>
11536
11537         IA-64 ABI Exception Handling:
11538         * cp-tree.def (EH_SPEC_BLOCK): New.
11539         (MUST_NOT_THROW_EXPR): New.
11540         * cp-tree.h: Update changed function declarations.
11541         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
11542         (CPTI_CALL_UNEXPECTED): New.
11543         (struct cp_language_function): Rename x_eh_spec_try_block
11544         to x_eh_spec_block.
11545         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
11546         * decl.c (current_binding_level): If no current function
11547         bindings, revert to scope_chain.
11548         (initialize_predefined_identifiers): Remove __cp_push_exception.
11549         (store_parm_decls): Use begin_eh_spec_block.
11550         (finish_function): Use finish_eh_spec_block.
11551         (mark_lang_function): Update for name changes.
11552         * decl2.c (finish_file): No mark_all_runtime_matches.
11553         * dump.c (cp_dump_tree): Handle new tree codes.
11554         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
11555         * except.c (catch_language_init, catch_language): Remove.
11556         (init_exception_processing): Don't set language code.
11557         Initialize call_unexpected_node, protect_cleanup_actions,
11558         eh_personality_libfunc, lang_eh_runtime_type.
11559         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
11560         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
11561         (prepare_eh_type): Split out type canonicalizations ...
11562         (build_eh_type_type): ... from here.
11563         (build_eh_type_type_ref): Remove.
11564         (mark_all_runtime_matches): Remove.
11565         (build_exc_ptr): New.
11566         (do_begin_catch, do_end_catch): New.
11567         (do_pop_exception): Remove.
11568         (build_terminate_handler): Remove.
11569         (choose_personality_routine): Split out language choice from ...
11570         (initialize_handler_parm): ... here.
11571         Use MUST_NOT_THROW_EXPR.
11572         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
11573         exception object handling.
11574         (expand_start_eh_spec, expand_end_eh_spec): Remove.
11575         (expand_exception_blocks, alloc_eh_object): Remove.
11576         (begin_eh_spec_block, finish_eh_spec_block): New.
11577         (do_allocate_exception, do_free_exception): New.
11578         (expand_throw): Merge into ...
11579         (build_throw): ... here.  Update for abi.
11580         * expr.c (cplus_expand_expr): No expand_internal_throw.
11581         Handle MUST_NOT_THROW_EXPR.
11582         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
11583         * semantics.c (*) Update for except.h name changes.
11584         (genrtl_try_block): No protect_with_terminate.
11585         (genrtl_eh_spec_block): New.
11586         (genrtl_handler): Don't emit the goto here.
11587         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
11588         (genrtl_finish_function): Don't expand_exception_blocks.
11589         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
11590
11591 2001-03-28  Richard Henderson  <rth@redhat.com>
11592
11593         * decl.c (struct named_label_list): Rename eh_region to
11594         in_try_scope, add in_catch_scope.
11595         (struct binding_level): Rename eh_region to is_try_scope,
11596         add is_catch_scope.
11597         (note_level_for_try): Rename from note_level_for_eh.
11598         (note_level_for_catch): New.
11599         (poplevel): Copy both is_try_scope and is_catch_scope to
11600         the named_label_list struct.
11601         (check_previous_goto_1): Don't check for catch block via
11602         DECL_ARTIFICIAL; use in_try_scope instead.
11603         (check_goto): Likewise.
11604         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
11605         * except.c (expand_start_catch_block): Call note_level_for_catch.
11606         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
11607
11608 2001-03-27  Richard Henderson  <rth@redhat.com>
11609
11610         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
11611         exceptions_via_longjmp.
11612
11613 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
11614
11615         * pt.c (check_default_tmpl_args):  Make error messages clearer.
11616
11617 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
11618
11619         * error.c:  Also undefine 'A' macro used for cp_printers definition.
11620
11621 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11622
11623         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11624
11625 2001-03-26  Mike Yang <yang@research.att.com>
11626             Mark Mitchell  <mark@codesourcery.com>
11627
11628         * dump.c (dump_access): New function.
11629         (cp_dump_tree): Use it.  Dump basetype information for class
11630         types.
11631
11632 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
11633
11634         * Makefile.in (optimize.o): Depend on params.h.
11635         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
11636         (init_decl_processing): Set flag_no_inline when doing
11637         inlining-on-trees.
11638         * optimize.c: Include params.h.
11639         (struct inline_data): Improve documentation of FNS.  Add
11640         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
11641         (INSNS_PER_STMT): New macro.
11642         (remap_block): Use CLONING_P.
11643         (inlinable_function_p): Don't inline big functions.
11644         (expand_call_inline): Keep track of how much inlining we've done.
11645         (optimize_function): Set FIRST_INLINED_FN.
11646         (maybe_clone_body): Set CLONING_P.
11647         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
11648         tree nodes.
11649         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
11650         rest_of_compilation.  Clear DECL_RTL for local variables
11651         afterwards.
11652         (clear_decl_rtl): New function.
11653
11654 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
11655
11656         Implement DR 209
11657         * cp-tree.h (skip_type_access_control,
11658         reset_type_access_control): Prototype.
11659         * decl.c (grokdeclarator): Access of friends is not checked.
11660         * parse.y (component_decl_list): Reset type access control.
11661         * semantics.c (decl_type_access_control): Clear
11662         current_type_lookups.
11663         (save_type_access_control): Don't save if not deferring.
11664         (skip_type_access_control, reset_type_access_control): New
11665         functions.
11666         (begin_class_definition): Do type access control for basetypes.
11667         Start deferred access control.
11668         (finish_class_definition): Resume immediate access control if
11669         this is a local class.
11670
11671 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11672
11673         * class.c (add_method): Use memcpy/memmove, not bcopy.
11674
11675         * decl.c (duplicate_decls): Likewise.
11676
11677 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
11678
11679         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
11680         not `_'.
11681
11682 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
11683
11684         * decl.c (local_names): Define.
11685         (push_local_name): New.
11686         (grok_reference_init): Return init if initializing static reference
11687         variable with non-constant instead of emitting it.
11688         Move expand_static_init call to cp_finish_decl.
11689         (layout_var_decl): Call push_local_name.
11690         (maybe_commonize_var): Allow inlining functions even if they have
11691         static local variables, use comdat_linkage for them if flag_weak.
11692         (check_initializer): Call obscure_complex_init if
11693         grok_reference_init returned nonzero.
11694         (save_function_data): Clear x_local_names.
11695         (pop_cp_function_context): Free x_local_names.
11696         (mark_inlined_fns): Remove.
11697         (mark_lang_function): Mark x_local_names.
11698         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
11699         Mark inlined_fns as tree, remove call to mark_inlined_fns.
11700         * class.c (alter_access): Ensure DECL_ACCESS is never set if
11701         DECL_DISCRIMINATOR_P.
11702         * cp-tree.h (cp_language_function): Add x_local_names.
11703         (lang_decl_flags): Add discriminator into u2.
11704         (lang_decl_inlined_fns): Remove.
11705         (lang_decl): inlined_fns is now a TREE_VEC.
11706         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
11707         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
11708         TREE_VEC, not a custom structure.
11709         (optimize_function): Likewise.
11710         * mangle.c (discriminator_for_local_entity): Discriminate among
11711         VAR_DECL local entities.
11712         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
11713         is not valid.
11714
11715 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
11716
11717         Add support for Java interface method calls.
11718         * cp-tree.h (struct lang_type): Add java_interface flag.
11719         (TYPE_JAVA_INTERFACE): New macro.
11720         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
11721         by setting TYPE_JAVA_INTERFACE.
11722         * call.c (java_iface_lookup_fn): New static.
11723         (build_over_call): If calling a method declared in a
11724         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
11725         expression which resolves the function address.
11726         (build_java_interface_fn_ref): New function.
11727
11728 2001-03-22  Richard Henderson  <rth@redhat.com>
11729
11730         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
11731         * except.c: Don't include it.
11732
11733 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
11734             based on an idea from Joe Buck <jbuck@synopsys.com>
11735
11736         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
11737         New nonterminals.
11738         (data_def, component_decl): Add reductions to bad_decl.
11739
11740 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
11741
11742         * method.c (do_build_assign_ref): Don't use build_modify_expr for
11743         anonymous aggregates, since they don't have assignment operator
11744         method.
11745         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
11746         assignment operators for anonymous structure fields.
11747
11748 2001-03-21  Jason Merrill  <jason@redhat.com>
11749
11750         * pt.c (instantiate_decl): Abort if we see a member constant
11751         instantiation that doesn't already have its initializer.
11752         Downgrade explicit instantiation without definition to pedwarn.
11753
11754         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
11755         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
11756         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
11757
11758         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
11759         (pending_vtables): Remove.
11760         * decl2.c (pending_vtables): Remove.
11761         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
11762         CLASSTYPE_VTABLE_NEEDS_WRITING.
11763         (import_export_class): Likewise.
11764         (init_decl2): Don't mark pending_vtables.
11765         * lex.c (handle_pragma_vtable): Just sorry.
11766         * pt.c (instantiate_class_template): Don't mess with
11767         CLASSTYPE_VTABLE_NEEDS_WRITING.
11768         (mark_class_instantiated): Likewise.
11769         * ptree.c (print_lang_type): Don't print it.
11770         * semantics.c (begin_class_definition): Don't set it.
11771
11772         * pt.c (template_tail): Replace with last_pending_template.
11773         (maybe_templates, maybe_template_tail): Remove.
11774         (add_pending_template): Adjust.
11775         (instantiate_pending_templates): Adjust.
11776
11777         * cp-tree.h (struct saved_scope): Remove lang_stack field.
11778         (current_lang_stack): Remove.
11779         * decl.c (maybe_push_to_top_level): Don't initialize it.
11780         (duplicate_decls): Use current_lang_depth.
11781         (xref_basetypes): Likewise.
11782         * class.c (current_lang_depth): New fn.
11783         (push_lang_context): Use more varray functionality.
11784         (pop_lang_context): Likewise.
11785
11786         * error.c (GLOBAL_THING): Always use '__'.
11787
11788 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
11789
11790         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
11791
11792         * mangle.c (mangle_decl_string): Mangle the names of overloaded
11793         operators, even when they have `extern "C"' linkage.
11794
11795 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
11796
11797         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
11798         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
11799         where it's not necessary.
11800         (add_method): Remove optimization involving comparison of
11801         DECL_ASSEMBLER_NAME.
11802         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
11803         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
11804         where it's not necessary.
11805         (check_methods): Likewise.
11806         (build_clone): Likewise.
11807         (built_vtt): Likewise.
11808         * cp-tree.h (DECL_NEEDED_P): Likewise.
11809         * decl.c (pushtag): Likewise.
11810         (duplicate_decls): Likewise.
11811         (pushdecl): Likewise.
11812         (builtin_function): Likewise.
11813         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
11814         (build_cp_library_fn): Likewise.
11815         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
11816         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
11817         where it's not necessary.
11818         (make_rtl_for_nonlocal_decl): Likewise.
11819         (cp_finish_decl): Likewise.
11820         (grokfndecl): Likewise.
11821         (grokvardecl): Likewise.
11822         (grokdeclarator): Likewise.
11823         (start_function): Likewise.
11824         (cp_missing_return_ok_p): Likewise.
11825         * decl2.c (grokclassfn): Likewise.
11826         (check_classfn): Likewise.
11827         (finish_static_data_member_decl): Likewise.
11828         (grokfield): Likewise.
11829         * error.c (GLOBAL_IORD_P): Remove.
11830         (dump_global_iord): Improve output.
11831         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
11832         * except.c (nothrow_libfn_p): Summarily reject any function not in
11833         namespace-scope.
11834         * init.c (build_java_class_ref): Don't explicitly set
11835         DECL_ASSEMBLER_NAME after calling mangle_decl.
11836         * mangle.c (mangle_decl_string): Handle extern "C" functions.
11837         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
11838         * method.c (set_mangled_name_for_decl): Don't explicitly set
11839         DECL_ASSEMBLER_NAME after calling mangle_decl.
11840         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
11841         IDENTIFIER_GLOBAL_VALUE for the thunk.
11842         * pt.c (set_mangled_name_for_template_decl): Remove.
11843         (check_explicit_specialization): Don't use it.
11844         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
11845         (tsubst_friend_function): Likewise.
11846         (tsubst_decl): Likewise.
11847         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
11848         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
11849         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
11850         where it's not necessary.
11851         (tinfo_base_init): Likewise.
11852         (create_real_tinfo_var): Likewise.
11853         * search.c (looup_field_1): Likewise.
11854         * semantics.c (finish_named_return_value): Likewise.
11855         * tree.c (init_tree): Set lang_set_decl_assembler_name.
11856
11857 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
11858
11859         Correct semantics restrictions checking in throw-expression.
11860         * except.c (is_admissible_throw_operand): New function.
11861         (build_throw): Use it.
11862
11863 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
11864
11865         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
11866         and its ilk.
11867
11868 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
11869
11870         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11871         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
11872         * decl.c (duplicate_decls): Likewise.
11873         (builtin_function): Likewise.
11874         (build_library_fn): Likewise.
11875         (build_cp_library_fn): Likewise.
11876         (check_initializer): Likewise.
11877         (cp_finish_decl): Likewise.
11878         * decl2.c (grokfield): Likewise.
11879         (grok_function_init): Remove #if 0'd code.
11880         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11881         * friend.c (do_friend): Likewise.
11882         * init.c (get_temp_regvar): Likewise.
11883         * method.c (make_thunk): Likewise.
11884         * pt.c (tsubst_friend_function): Likewise.
11885         (tsubst_decl): Likewise.
11886         (regenerate_decl_from_template): Likewise.
11887         * semantics.c (genrtl_named_return_value): Likewise.
11888         (expand_body): Likewise.
11889         (genrtl_finish_function): Likewise.
11890         * tree.c (cp_tree_equal): Likewise.
11891
11892 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
11893
11894         * call.c (convert_like_real): Add extra semantics to INNER
11895         parameter. Don't convert to temporary if a user conversion
11896         gives us an lvalue that we're about to bind to a reference.
11897         Set INNER to indicate pending reference binding on recursive
11898         calls.
11899
11900 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
11901
11902         * cp/lex.c: Delete duplicate pending_lang_change.
11903
11904 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
11905
11906         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
11907         Similarly.
11908         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
11909         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
11910
11911 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
11912
11913         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
11914
11915 2001-03-08  Stan Shebs  <shebs@apple.com>
11916
11917         * cp-tree.h (set_identifier_local_value): Remove unused decl.
11918
11919 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
11920
11921         * spew.c: Remove references to CPP_OSTRING.
11922
11923 2001-03-06  Andrew Haley  <aph@redhat.com>
11924
11925         * typeck.c (convert_arguments): Check that we have an fndecl.
11926
11927 2001-03-05  Andrew Haley  <aph@redhat.com>
11928
11929         * typeck.c (convert_arguments): Don't do ellipsis conversion for
11930         __built_in_constant_p.
11931
11932 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
11933
11934         * typeck.c (build_static_cast): Allow enum to enum conversions
11935         as per DR 128.
11936
11937 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
11938
11939         * class.c (check_field_decls): Pointers to member do not a
11940         non-pod struct make, as per DR 148.
11941
11942 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
11943
11944         * call.c (joust): cp_pedwarn when using gnu extension concerning
11945         worst conversion sequences.
11946
11947 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11948
11949         * decl.c: Replace all uses of 'boolean' with 'bool'.
11950
11951 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11952
11953         * lang-specs.h: Add zero initializer for cpp_spec field to
11954         all array elements that need one.  Don't put an #ifdef inside
11955         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
11956         use it.
11957
11958 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
11959
11960         Implement using decls inside template functions.
11961         * decl2.c (validate_nonmember_using_decl): Don't special case
11962         fake_std_node in the global namespace. Don't reject early when
11963         processing a template.
11964         (do_local_using_decl): Add to statement tree. Don't do further
11965         processing when building a template.
11966         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
11967
11968 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
11969
11970         * decl2.c (do_nonmember_using_decl): Don't complain if we find
11971         same function. Do complain about ambiguating extern "C"
11972         declarations.
11973
11974 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
11975
11976         Remove floating point and complex type template constant parms.
11977         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
11978         COMPLEX_TYPE extensions.
11979         (invalid_nontype_parm_type_p): Likewise.
11980
11981 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
11982
11983         * except.c (call_eh_info): Revert "match_function"'s type.
11984
11985 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
11986
11987         Fix ctor vtable vcall offsets.
11988         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
11989         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
11990         (get_matching_base): Remove.
11991         (get_original_base): New function.
11992         (build_vtbl_initializer): Initialize vid.rtti_binfo.
11993         Use a virtual thunk for a ctor vtable with an index
11994         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
11995         primary base within a constructor vtable. Only set
11996         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
11997         when primary base has been lost.
11998         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
11999
12000 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
12001
12002         * call.c (joust): Ensure more_specialized()'s argument length
12003         parameter has correct value for constructors.
12004
12005 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
12006
12007         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
12008
12009         * decl.c (mark_inlined_fns): Prototype.
12010
12011 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
12012
12013         * spew.c (yylex): Correct handling of friends.
12014
12015 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
12016
12017         * mangle.c (write_encoding): Pass write_function_type the
12018         FUNCTION_DECL for the function being encoded.
12019         (write_function_type): Pass it along to write_bare_function_type.
12020         (write_bare_function_type): Pass it along to write_method_parms.
12021         (write_method_parms): Don't mangle the compiler-generated
12022         parameters to a constructor or destructor.
12023
12024 2001-02-22  Andreas Jaeger  <aj@suse.de>
12025
12026         * optimize.c: Include toplev.h for
12027         note_deferral_of_defined_inline_function prototype.
12028
12029 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
12030
12031         * cp-tree.h (struct lang_decl_inlined_fns): New.
12032         (struct lang_decls): Add inlined_fns.
12033         (DECL_INLINED_FNS): New macro.
12034         * optimize.c (struct inline_data): Add inlined_fns.
12035         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
12036         (inlinable_function_p): Likewise, fix typo in comment,
12037         function is not inlinable if it already inlined function currently
12038         being optimized.
12039         (expand_call_inline): Add fn to inlined_fns if necessary.
12040         (optimize_function): Initialize inlined_fns.
12041         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
12042         * decl.c (mark_inlined_fns): New function.
12043         (lang_mark_tree): Call it.
12044
12045 2001-02-21  Jason Merrill  <jason@redhat.com>
12046
12047         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
12048         (DECL_UNINLINABLE): Move to middle-end.
12049
12050         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
12051         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
12052         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
12053         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
12054         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
12055
12056         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
12057         second parm of op=.
12058
12059 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
12060
12061         * decl2.c (set_decl_namespace): Allow explicit instantiations in
12062         any namespace.
12063
12064 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12065
12066         * optimize.c (expand_call_inline): Don't walk subtrees of type
12067         nodes.
12068
12069 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
12070
12071         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
12072         for a destructor.
12073
12074 2001-02-18  Jason Merrill  <jason@redhat.com>
12075
12076         Do put the VTT parameter in DECL_ARGUMENTS.
12077         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
12078         (current_vtt_parm): New macro.
12079         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
12080         (DECL_HAS_VTT_PARM_P): New macro.
12081         (DECL_VTT_PARM): Remove.
12082         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
12083         * decl.c (duplicate_decls): Only copy the operator code if
12084         appropriate.
12085         (start_function): Set current_vtt_parm.
12086         (lang_mark_tree): Don't mark vtt_parm.
12087         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
12088         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
12089         * class.c (build_clone): Maybe remove the VTT parm.
12090         * optimize.c (maybe_clone_body): Set up the VTT parm.
12091         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
12092         * call.c (build_over_call): Just allow the VTT arg.
12093         * method.c (make_thunk): Don't set DECL_VTT_PARM.
12094         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
12095         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
12096         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
12097         * error.c (dump_function_decl): Likewise.
12098         * call.c (build_user_type_conversion_1, convert_like_real): Abort
12099         if we try to call a constructor with in-charge or VTT parms.
12100         * method.c (skip_artificial_parms_for): New fn.
12101         * call.c (add_function_candidate, build_over_call): Call it.
12102         * call.c (build_new_method_call): Use current_vtt_parm.
12103         * init.c (expand_virtual_init): Likewise.
12104         * class.c (same_signature_p): No longer static.
12105         * cp-tree.h: Declare it.
12106         * search.c (look_for_overrides_r): Use it.
12107
12108 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
12109
12110         * cp-tree.h (new_abi_rtti_p): Remove.
12111         (name_mangling_version): Likewise.
12112         (flag_do_squangling): Likewise.
12113         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
12114         * decl.c (grokfndecl): Likewise.
12115         * decl2.c (name_mangling_version): Remove.
12116         (flag_do_squangling): Likewise.
12117         (lang_f_options): Remove `squangle'.
12118         (unsupported_options): Add `squangle'.
12119         (cxx_decode_option): Issue a warning about uses of
12120         -fname-mangling-version.
12121         (finish_file): Remove old ABI support.
12122         * pt.c (check_explicit_specialization): Likewise.
12123         (tsubst_decl): Likewise.
12124         * rtti.c (init_rtti_processing): Likewise.
12125         (build_headof): Likewise.
12126         (get_tinfo_decl_dynamic): Likewise.
12127         (tinfo_from_decl): Likewise.
12128         (build_dynamic_cast_1): Likewise.
12129         (synthesize_tinfo_var): Likewise.
12130         * init.c (build_new): Allow enumeration types for the array-bounds
12131         in a direct-new-declarator.
12132
12133         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
12134
12135         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
12136         TREE_PROTECTED from the template being specialized.
12137
12138 2001-02-17  Jason Merrill  <jason@redhat.com>
12139
12140         * decl2.c (build_artificial_parm): Set TREE_READONLY.
12141
12142         * decl.c (bad_specifiers): Allow throw specs on things with
12143         pointer-to-function or -member-function type.
12144         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
12145         a pmf.
12146
12147 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
12148
12149         * call.c (check_dtor_name): Handle template names correctly.
12150
12151 2001-02-16  Jason Merrill  <jason@redhat.com>
12152
12153         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
12154         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
12155         * optimize.c (maybe_clone_body): Don't substitute it.
12156         * call.c (build_new_method_call): Check in_chrg instead.
12157         * init.c (expand_virtual_init): Likewise.
12158
12159 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
12160
12161         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
12162         class-type introduces at least a type-name.
12163
12164 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
12165
12166         * call.c (convert_like_real): Create a temporary for non-lvalue.
12167
12168 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
12169
12170         * cp-tree.h: Fix typos in comments.
12171
12172 2001-02-16  Jason Merrill  <jason@redhat.com>
12173
12174         * optimize.c (remap_block): If we're compiling a clone, pass the
12175         new block to insert_block.
12176
12177 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
12178
12179         * semantics.c (finish_asm_stmt): Robustify.
12180
12181 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
12182
12183         * pt.c (push_template_decl_real): Don't remangle the name of a
12184         class template.
12185
12186 2001-02-15  Jim Meyering  <meyering@lucent.com>
12187
12188         * Make-lang.in (c++.install-common): Depend on installdirs.
12189         (c++.install-info): Likewise.
12190         (c++.install-man): Likewise.
12191
12192 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
12193
12194         * typeck2.c (build_m_component_ref): Robustify.
12195
12196 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
12197
12198         * friend.c (do_friend): Don't take the nested [template] class
12199         into account when deciding whether to warn about the friend
12200         function not referring to a template function.
12201
12202 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
12203
12204         * typeck.c (build_unary_op): Clarify error message.
12205
12206 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
12207
12208         * parse.y (component_constructor_declarator): allow optional
12209         parentheses around constructor class name.
12210
12211 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
12212
12213         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
12214         section.
12215         * init.c (emit_base_init): Remove incorrect comment about
12216         virtual bases.
12217         * method.c (make_thunk): Fix comment alignment.
12218
12219 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
12220
12221         Kill remnants of this is variable.
12222         * cp-tree.h (flag_this_is_variable): Remove.
12223         * decl2.c (flag_this_is_variable): Remove.
12224         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
12225         (build_vbase_path): The path is non-static, even in a cdtor.
12226         (resolves_to_fixed_type_p): Add additional return value.
12227         * search.c (init_vbase_pointers): Adjust.
12228         * tree.c (lvalue_p_1): Adjust.
12229         * typeck.c (mark_addressable): Adjust.
12230
12231 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
12232
12233         * pt.c (unify): Don't check cv quals of array types.
12234
12235 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
12236
12237         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
12238         check whether we already have the type.
12239
12240 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
12241
12242         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
12243         * call.c (build_op_delete_call): Simplify to remove duplicate
12244         code.
12245         * class.c (clone_function_decl): Don't build the deleting variant
12246         of a non-virtual destructor.
12247         * decl.c (finish_destructor_body): Don't call delete if this is a
12248         non-virtual destructor.
12249         * init.c (build_delete): Explicitly call `operator delete' when
12250         deleting an object with a non-virtual destructor.
12251
12252 2001-02-13  Jason Merrill  <jason@redhat.com>
12253
12254         * lang-specs.h: Add more __EXCEPTIONS.
12255
12256 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
12257
12258         * typeck2.c (process_init_constructor): Check
12259         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
12260
12261 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
12262
12263         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
12264         Remove spurious information in comment. Allow further
12265         adjustments of REFERENCE_TYPE args.
12266
12267 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
12268
12269         * errfn.c (cp_deprecated): Tweak diagnostic text.
12270         * parse.y (new_initializer): Deprecate initializer lists
12271         extension.
12272
12273 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
12274
12275         Remove old ABI support.
12276
12277 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
12278
12279         * decl2.c (flag_vtable_thunks): Always set it to 1.
12280         (flag_new_abi): Likewise.
12281         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
12282
12283         * Makefile.in (g++spec.o): Fix typo.
12284
12285 2001-02-09  Jason Merrill  <jason@redhat.com>
12286
12287         * lang-specs.h: Restore definition of __EXCEPTIONS.
12288
12289 2001-02-08  Jason Merrill  <jason@redhat.com>
12290
12291         * search.c (shared_member_p): New function.
12292         (lookup_field_r): Use it.
12293         * cp-tree.h (SHARED_MEMBER_P): Remove.
12294
12295         * method.c (process_overload_item): Handle template-dependent array
12296         bounds.
12297         * pt.c (type_unification_real): If we end up with undeduced nontype
12298         parms, try again.
12299
12300         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
12301         types.
12302
12303         * typeck2.c (friendly_abort): Don't say anything if we have
12304         earlier errors or sorries.
12305
12306         * decl.c (check_tag_decl): Notice attempts to redefine bool and
12307         wchar_t.  Ignore if in_system_header.
12308
12309         * decl.c (maybe_push_cleanup_level): New fn...
12310         (start_decl_1): ...split out from here.
12311         * cvt.c (build_up_reference): Use it.
12312         * cp-tree.h: Declare it.
12313
12314 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
12315
12316         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
12317         spec.
12318
12319 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
12320
12321         * pt.c (lookup_template_class): Make sure it's a primary
12322         template or template_template_parm when called from the parser.
12323         (instantiate_template_class): Add assertion.
12324
12325 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
12326
12327         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
12328         from error_mark_node.
12329
12330 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
12331
12332         Fix specification and implementation bugs in V3 ABI
12333         construction vtables.
12334         * cp-tree.h (flag_dump_class_layout): New flag.
12335         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
12336         (BINFO_LOST_PRIMARY_P): New flag.
12337         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
12338         (BINFO_PRIMARY_MARKED_P): Rename to ...
12339         (BINFO_PRIMARY_P): ... here.
12340         (binfo_via_virtual): New prototype.
12341         * decl2.c (flag_dump_class_layout): New flag.
12342         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
12343         use `=' as a file name separator.
12344         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
12345         bases.
12346         (build_vtbl_address): If this is a virtual primary base, then
12347         get the vtbl of what it is ultimately primary for.
12348         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
12349         for BINFO_PRIMARY_P.
12350         (dfs_skip_nonprimary_vbases_markedp): Likewise.
12351         (get_shared_vbase_if_not_primary): Likewise.
12352         (dfs_get_pure_virtuals): Likewise.
12353         (expand_upcast_fixups): Likewise.
12354         (fixup_virtual_upcast_offsets): Likewise.
12355         (dfs_find_vbase_instance): Likewise.
12356         (find_vbase_instance): Likewise.
12357         (binfo_from_vbase): Adjust comment to reflect reality.
12358         (binfo_via_virtual): New function.
12359         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
12360         for binfo walking during VTT construction.
12361         (dfs_mark_primary_bases): Remove.
12362         (force_canonical_binfo_r): New function.
12363         (force_canonical_binfo): New function.
12364         (mark_primary_virtual_base): New function.
12365         (mark_primary_bases): Walk in inheritance graph order, use
12366         mark_primary_virtual_base.
12367         (determine_primary_base): Use some more intermediate variables.
12368         (dfs_find_final_overrider): Don't check for overriding along a
12369         virtual path.
12370         (dfs_modify_vtables): Walk into primary virtual bases too.
12371         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
12372         (build_base_fields): Likewise.
12373         (dfs_set_offset_for_unshared_vbases): Likewise.
12374         (layout_virtual_bases): Likewise.
12375         (end_of_class): Likewise.
12376         (finish_struct_1): Call dump_class_hierarchy, if requested.
12377         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
12378         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
12379         (dump_class_hierarchy): Add file parameter. Append to file, if
12380         required.
12381         (finish_vtbls): Adjust accumulate_vtbl_inits call.
12382         Use canonical base for virtual bases.
12383         (build_vtt): Add more comments. Adjust build_vtt_inits call.
12384         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
12385         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
12386         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
12387         virtual VTTs.
12388         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
12389         from DATA.  We want virtual primary bases and all bases via virtual.
12390         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
12391         virtual base when not a construction vtable.
12392         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
12393         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
12394         Use canonical bases when processing virtual bases.
12395         (accumulate_vtbl_inits): We're interested in any base via a
12396         virtual path.
12397         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
12398         within a construction vtable, determine what is being overridden.
12399         (build_vtbl_initializer): Add more comments
12400         (add_vcall_offset_vtbl_entries_1): Adjust comment.
12401         (build_rtti_vtbl_entries): Check if the base has lost its
12402         primary.
12403
12404 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
12405
12406         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
12407
12408 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12409
12410         * decl.c (pushdecl): Call abort instead of fatal.
12411         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
12412         * init.c (build_new_1): Likewise.
12413         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
12414         * decl.c (build_typename_type): hash_table_init now returns void.
12415         decl.c (init_decl_processing): Make an error non-fatal.
12416
12417 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
12418
12419         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
12420         Document.
12421         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
12422         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
12423         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
12424         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
12425         * decl.c (maybe_commonize_var): Use the new name-mangling where
12426         appropriate.
12427         * decl2.c (comdat_linkage): Enhance comments.  Make all
12428         compiler-generated things static, if COMDAT is not available.
12429         (get_tinfo_decl): Do not make typeinfo objects that belong in the
12430         library COMDAT.
12431         (tinfo_base_init): Use the correct mangled name for typeinfo
12432         strings, and push them into the global scope.
12433         (typeinfo_in_lib_p): New function.
12434         (synthesize_tinfo_var): Use it.
12435         (create_real_tinfo_var): Likewise.
12436
12437 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
12438
12439         * decl.c (push_class_binding): Use context_for_name_lookup instead
12440         of CP_DECL_CONTEXT.
12441         * search.c (context_for_name_lookup): Remove static.  Check for NULL
12442         context in the loop.
12443         * cp-tree.h (context_for_name_lookup): Add prototype.
12444
12445 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
12446
12447         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
12448         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
12449         Remove.
12450         * call.c (convert_class_to_reference, build_user_type_conversion_1,
12451         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
12452
12453 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
12454
12455         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
12456         of macros used when compiling g++spec.c.
12457         * g++spec.c (lang_specific_driver): Link with the shared
12458         libgcc by default.
12459
12460 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
12461
12462         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
12463         make_reference_declarator, make_call_declarator), method.c
12464         (implicitly_declare_fn), parse.y (namespace_using_decl,
12465         notype_unqualified_id, expr_or_declarator, new_type_id,
12466         after_type_declarator, direct_after_type_declarator,
12467         notype_declarator, complex_notype_declarator,
12468         complex_direct_notype_declarator, qualified_id,
12469         notype_qualified_id, overqualified_id, direct_new_declarator,
12470         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
12471         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
12472         instead of build_parse_node.
12473
12474 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12475
12476         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
12477         (minus_one_node): Moved to top level gcc directory.  Renamed
12478         to integer_minus_one_node.
12479
12480         * init.c (init_init_processing): Don't set minus_one_node.
12481         (build_vec_init): Use integer_minus_one_node.
12482
12483         * rtti.c (get_tinfo_decl_dynamic): Likewise.
12484
12485 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
12486
12487         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
12488         identical and they would be replaced with constant, remove
12489         MODIFY_EXPR from the tree.
12490
12491 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12492
12493         * Make-lang.in: Remove all dependencies on defaults.h.
12494         * call.c: Don't include defaults.h.
12495         * decl.c: Likewise.
12496         * decl2.c: Likewise.
12497         * except.c: Likewise.
12498         * pt.c: Likewise.
12499         * rtti.c: Likewise.
12500         * tree.c: Likewise.
12501         * typeck.c: Likewise.
12502
12503 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
12504
12505         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
12506         operators even in "C" linkage.
12507         * method.c (set_mangled_name_for_decl): Likewise.
12508         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
12509         overloaded operators in "C" linkage.
12510
12511 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
12512
12513         * pt.c (tsubst_decl): Remove IN_DECL parameter.
12514         (tsubst_arg_types): Check parameter is not void.
12515         (tsubst): Adjust tsubst_decl call.
12516
12517 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
12518
12519         * call.c (add_builtin_candidate): Quote std properly, from
12520         previous change.
12521
12522 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12523
12524         * pt.c (check_explicit_specialization): Clone constructors and
12525         destructors.
12526
12527 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
12528
12529         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
12530         indicates anything special about template depth. Make sure we
12531         only count the user visible template classes.
12532
12533 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
12534
12535         * call.c (build_conv): Typo in comment.
12536         (add_builtin_candidate): Add more explanation.
12537         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
12538         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
12539         when we have enumeral types.
12540         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
12541         candidates for relops and eqops.
12542         (joust): Simplify control flow. Allow a non-template user
12543         function to hide a builtin.
12544
12545 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
12546
12547         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
12548         (more_specialized): Add deduction parameter.
12549         * call.c (joust): Adjust more_specialized call.
12550         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
12551         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
12552         (get_bindings_order): Remove.
12553         (get_bindings_real): Add DEDUCE parameter.
12554         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
12555         REFERENCE_TYPE jig for DEDUCE_ORDER.
12556         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
12557         maybe_adjust_types_for_deduction.
12558         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
12559         directly.
12560         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
12561         (check_cv_quals_for_unify): Use new unify qualifier flags.
12562         (unify): Clear new unify qualifier flags.
12563         (get_bindings_real): Add DEDUCE parameter.
12564         (get_bindings): Adjust call to get_bindings_real.
12565         (get_bindings_overload): Likewise.
12566         (most_specialized_instantiation): Adjust call to
12567         more_specialized.
12568
12569 2001-01-19  Jason Merrill  <jason@redhat.com>
12570
12571         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
12572
12573         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
12574         -fnew-abi.
12575
12576 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
12577
12578         * decl2.c (arg_assoc_class): Fix double iteration logic.
12579
12580 2001-01-19  Jason Merrill  <jason@redhat.com>
12581
12582         * init.c (build_delete): Always call convert_force to strip cv-quals.
12583
12584         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
12585         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
12586         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
12587
12588 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
12589
12590         * search.c (get_vbase_1): Count only virtual bases.
12591
12592 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
12593
12594         * class.c (duplicate_tag_error): Robustify flag clearing.
12595
12596 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
12597
12598         * cp-tree.h (lookup_template_class): Add complain parm.
12599         * decl.c (lookup_namespace_name): Adjust call to
12600         lookup_template_class.
12601         (make_typename_type): Likewise.
12602         * semantics.c (finish_template_type): Likewise.
12603         * pt.c (lookup_template_class): Add complain parm. Adjust.
12604         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
12605         (tsubst): Likewise.
12606
12607 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
12608
12609         * pt.c (copy_default_args_to_explicit_spec): Preserve
12610         object's CV quals. Reorganize.
12611
12612 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12613
12614         * typeck.c (build_modify_expr): Say `initialization' for
12615         INIT_EXPRs.
12616         * init.c (build_default_init): Convert to enumeral type, if
12617         needed.
12618
12619 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
12620
12621         * parse.y (nomods_initdcl0): Properly set things up for
12622         initdcl0_innards.
12623
12624 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12625
12626         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
12627         (type_unification_real): Set it.
12628         (unify): Use it.
12629
12630 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12631
12632         * decl.c (finish_destructor_body): Convert to vbase pointer here.
12633
12634 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12635
12636         * semantics.c (begin_class_definition): Check we're not inside a
12637         template parm list.
12638
12639 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12640
12641         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
12642         BASELINK_P.
12643
12644 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12645
12646         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
12647         * call.c (build_over_call): Add comment.
12648
12649 2001-01-16 Daniel Berlin <dberlin@redhat.com>
12650
12651         * cvt.c (ocp_convert): Handle vector type conversion
12652         * typeck2.c (digest_init): Handle vector type initializations
12653
12654 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
12655
12656         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
12657           was given.
12658
12659 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
12660
12661         * pt.c (check_nontype_parm): Rename to ...
12662         (invalid_nontype_parm_type_p): ... here.
12663         (process_template_parm): Adjust.
12664         (convert_template_argument): Adjust.
12665
12666 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
12667
12668         * pt.c (check_nontype_parm): New function.
12669         (process_template_parm): Use it.
12670         (convert_template_argument): Use it.
12671         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
12672         member.
12673
12674 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
12675
12676         * tree.c: Add defaults.h
12677         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
12678         * Make-lang.in (cp/tree.o): Add defaults.h.
12679
12680 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12681
12682         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
12683
12684 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12685
12686         * g++.1: Change to be ".so man1/gcc.1".
12687
12688 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12689
12690         * Make-lang.in (c++.info, c++.install-info): Build and install g++
12691         internals info.
12692         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
12693         ($(srcdir)/cp/g++int.info): New target.
12694         * gxxint.texi: Add info directory entry.  Use @@ in email address.
12695         * .cvsignore: Update.
12696
12697 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
12698
12699         * typeck.c (build_c_cast): Do template processing earlier.
12700         Always pedwarn on array casts.
12701
12702 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
12703
12704         * friend.c (make_friend_class): Make sure a templated class is
12705         actually a template.
12706
12707 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
12708
12709         * decl2.c (get_guard): Set linkage from guarded decl.
12710
12711 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
12712
12713         * call.c (convert_default_arg): Check for unprocessed
12714         DEFAULT_ARG.
12715         * cp-tree.h (replace_defarg): Move to spew.c.
12716         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
12717         spew.c, which is where they really are.
12718         (done_pending_defargs): Declare.
12719         (unprocessed_defarg_fn): Declare.
12720         * decl.c (replace_defarg): Move to spew.c
12721         * parse.y (structsp): Call done_pending_defargs.
12722         * spew.c (defarg_fns): Rearrange list structure.
12723         (defarg_fnsdone): New static variable.
12724         (defarg_depfns): New static variable.
12725         (init_spew): Adjust.
12726         (add_defarg_fn): Store the type in TREE_TYPE.
12727         (do_pending_defargs): Detect and deal with ordering constraints
12728         and circularity.
12729         (done_pending_defargs): New function.
12730         (unprocessed_defarg_fn): New function.
12731         (replace_defarg): Moved from decl.c. Robustify. Don't save
12732         if circularity detected.
12733
12734 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
12735
12736         * pt.c (unify): Check array has a domain, before checking
12737         whether it is variable sized.
12738
12739 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
12740
12741         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
12742         parameters with pointers to arrays of unknown bound.
12743
12744 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
12745
12746         * parse.y (template_parm_header, template_spec_header): New
12747         reductions. Split out from ...
12748         (template_header): ... here. Use them.
12749         (template_template_parm): Use template_parm_header.
12750         * semantics.c (finish_template_template_parm): Add assert.
12751
12752 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
12753
12754         * mangle.c (write_builtin_type): Fix thinko.
12755
12756         * pt.c (copy_default_args_to_explicit_spec_1): New function.
12757         (copy_default_args_to_explicit_spec): Likewise.
12758         (check_explicit_specialization): Use it.
12759
12760         * class.c (finish_struct_1):  Remove last argument in call to
12761         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
12762         * decl.c (builtin_function): Likewise.
12763         (build_cp_library_fn): Likewise.
12764         (check_initializer): Likewise.
12765         (make_rtl_for_nonlocal_decl): Likewise.
12766         (cp_finish_decl): Likewise.
12767         (start_function): Likewise.
12768         * decl2.c (finish_anon_union): Likewise.
12769         * friend.c (do_friend): Likewise.
12770         * init.c (build_java_class_ref): Likewise.
12771         * method.c (make_thunk): Likewise.
12772         * pt.c (tsubst_friend_function): Likewise.
12773         * semantics.c (expand_body): Likewise.
12774
12775 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
12776
12777         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
12778         looking at DECL_CLONED_FUNCTION for non-functions.
12779
12780 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
12781
12782         * error.c (dump_template_parameter): Use parm to determine how
12783         to print default value.
12784
12785 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
12786
12787         * class.c (duplicate_tag_error): Clear more flags.
12788
12789 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
12790
12791         * call.c (build_new_method_call): Use binfo_for_vbase.
12792
12793 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
12794
12795         * cp-tree.h (flag_cond_mismatch): Don't declare.
12796         * decl2.c (flag_cond_mismatch): Don't define.
12797         (lang_f_options): Remove cond-mismatch.
12798         (unsupported_options): Add cond-mismatch.
12799
12800 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
12801
12802         * class.c (handle_using_decl): Reject using of constructor name
12803         of sourcing class. Allow injecting of a method with same name as
12804         nested class. Fixup error messages.
12805
12806 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
12807
12808         * decl2.c (lang_decode_option): Handle -Wformat=2.
12809
12810 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
12811
12812         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
12813         initialized_in_class.
12814         (DECL_DEFINED_IN_CLASS_P): Rename to ...
12815         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
12816         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
12817         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
12818         * pt.c (check_default_tmpl_args): Adjust for
12819         DECL_INITIALIZED_IN_CLASS_P.
12820         (instantiate_class_template): Likewise.
12821         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
12822
12823         * class.c (finish_struct): Constify saved_filename.
12824
12825 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
12826
12827         * class.c (duplicate_tag_error): Adjust diagnostic.
12828         (finish_struct): Locally set location to start of struct.
12829         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
12830
12831 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
12832
12833         * decl.c (struct binding_level): Adjust class_shadowed comments
12834         to reflect reality.
12835         (push_class_level_binding): Adjust comments to reflect reality.
12836         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
12837         Don't set TREE_VALUE on the class_shadowed list.
12838
12839 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12840
12841         * decl2.c (acceptable_java_type): Allow references too.
12842         * init.c (build_java_class_ref): When using the new ABI, search
12843         `class$' and have it mangled with `mangle_decl.'
12844         * mangle.c (write_java_integer_type_codes): New function.
12845         (write_builtin_type): Detect and mangle Java integer and real
12846         types.
12847
12848 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
12849
12850         * decl2.c (grokfield): Don't accept `asm' specifiers for
12851         non-static data members.
12852
12853 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12854
12855         * expr.c (cplus_expand_expr): Don't reset `target'.
12856
12857 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
12858
12859         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
12860
12861 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
12862
12863         * parse.y (template_datadef): Check for error_mark_node.
12864
12865 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
12866
12867         * cp-tree.def (DEFAULT_ARG): Make `x' class.
12868
12869 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
12870
12871         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
12872         (record_builtin_type): Make non-static.
12873         (flag_short_double): Don't declare.
12874         (init_decl_processing): Remove the creation of many tree nodes now
12875         in c_common_nodes_and_builtins.
12876         (build_void_list_node): New function.
12877         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
12878         * cp-tree.h (flag_short_wchar): Don't declare.
12879
12880 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
12881
12882         * call.c (build_conv): Don't use build1 for USER_CONV.
12883         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
12884
12885 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
12886
12887         * lex.c (lang_init): Call c_common_lang_init.
12888
12889 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
12890
12891         * search.c (lookup_fnfields_here): Remove.
12892         (look_for_overrides_r): Use lookup_fnfields_1.
12893         Ignore functions from using declarations.
12894
12895 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
12896
12897         Implement exceptions specifiers for implicit member functions.
12898         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
12899         * method.c (synthesize_exception_spec): New function.
12900         (locate_dtor, locate_ctor, locate_copy): New functions.
12901         (implicitly_declare_fn): Generate the exception spec too.
12902         * search.c (check_final_overrider): Check artificial functions
12903         too.
12904         * typeck2.c (merge_exception_specifiers): New function.
12905
12906 2001-01-03  Jason Merrill  <jason@redhat.com>
12907
12908         * init.c (build_default_init): New fn.
12909         (perform_member_init): Split out from here.
12910         (build_new_1): Use it.  Simplify initialization logic.
12911         (build_vec_init): Take an array, rather than a pointer and maxindex.
12912         Speed up simple initializations.  Don't clean up if we're assigning.
12913         * cp-tree.h: Adjust.
12914         * decl2.c (do_static_initialization): Remove TREE_VEC case.
12915         * parse.y (new_initializer): Return void_zero_node for ().
12916         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
12917         * typeck2.c (digest_init): Only complain about user-written
12918         CONSTRUCTORs.
12919
12920 2000-12-22  Mike Stump  <mrs@wrs.com>
12921
12922         * decl2.c: (max_tinst_depth): Increase to 50.
12923
12924 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
12925
12926         * class.c (invalidate_class_lookup_cache): Zero the
12927         previous_class_values.
12928         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
12929         TREE_INT_CST_HIGH.
12930         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
12931         * decl.c (free_bindings): New variable.
12932         (push_binding): Don't create a new binding if we have one on the
12933         free list.
12934         (pop_binding): Put old bindings on the free list.
12935         (init_decl_processing): Use size_int, not build_int_2.
12936         Register free_bindings as a GC root.
12937         (cp_make_fname_decl): Use size_int, not build_int_2.
12938         (push_inline_template_parms_recursive): Likewise.
12939         (end_template_parm_list): Likewise.
12940         (for_each_template_parm): Do not use walk_tree_without_duplicates.
12941         (tsubst_template_parms): Use size_int, not build_int_2.
12942         (tsubst): Likewise.
12943         * rtti.c (get_vmi_pseudo_type_info): Likewise.
12944
12945 2001-01-02  Richard Henderson  <rth@redhat.com>
12946
12947         * parse.y (asm): Set ASM_INPUT_P.
12948
12949 2001-01-02  Jason Merrill  <jason@redhat.com>
12950
12951         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
12952         for v3 ABI.
12953
12954         * typeck.c (cp_truthvalue_conversion): New fn.
12955         * cvt.c (ocp_convert): Use it.
12956
12957         * cp-tree.h: Lose c-common.c decls.
12958
12959         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
12960         * cvt.c (convert_to_void): Use type_unknown_p.
12961
12962         * typeck.c (strip_all_pointer_quals): Also strip quals from
12963         pointer-to-member types.
12964
12965         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
12966         parse.y as C.
12967
12968         * call.c (build_new_method_call): Do evaluate the object parameter
12969         when accessing a static member.
12970         * typeck.c (build_component_ref): Likewise.
12971
12972 2001-01-02  Andreas Jaeger  <aj@suse.de>
12973
12974         * decl.c (cp_missing_noreturn_ok_p): New.
12975         (init_decl_processing): Set lang_missing_noreturn_ok_p.
12976
12977 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
12978
12979         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
12980
12981 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
12982
12983         * class.c (pushclass): Remove #if 0'd code.
12984         * cp-tree.h (overload_template_name): Remove.
12985         * decl.c (store_bindings): Simplify.
12986         (pop_from_top_level): Likewise.
12987         * pt.c (overload_template_name): Remove.
12988         (instantiate_decl): Don't call push_to_top_level if it's not
12989         needed.
12990
12991 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
12992
12993         * pt.c (register_local_specialization): Don't return a value.
12994         (lookup_template_class): Use move-to-front heuristic when looking
12995         up template instantiations.
12996         (instantiate_decl): Only push_to_top_level when we're actually
12997         going to instantiate the template.
12998
12999 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
13000
13001         * search.c (binfo_for_vtable): Return least derived class, not
13002         most.  Handle secondary vtables.
13003
13004 2000-12-22  Jason Merrill  <jason@redhat.com>
13005
13006         * pt.c (more_specialized): Don't optimize len==0.
13007         (fn_type_unification): If we're adding the return type, increase len.
13008
13009         * typeck.c (build_binary_op): Fix pmf comparison logic.
13010
13011         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
13012         DECL_STATIC_FUNCTION_P.
13013
13014         * semantics.c (genrtl_finish_function): Don't try to jump to
13015         return_label unless it exists.
13016
13017         In partial ordering for a call, ignore parms for which we don't have
13018         a real argument.
13019         * call.c (joust): Pass len to more_specialized.
13020         (add_template_candidate_real): Strip 'this', pass len.
13021         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
13022         (get_bindings_order): New fn.  Pass len down.
13023         (get_bindings_real): Strip 'this', pass len.
13024         (fn_type_unification): Likewise.
13025         (type_unification_real): Succeed after checking 'len' args.
13026         (most_specialized_instantiation): Lose explicit_args parm.
13027         * class.c (resolve_address_of_overloaded_function): Strip 'this',
13028         pass len.
13029
13030 2000-12-21  Jason Merrill  <jason@redhat.com>
13031
13032         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
13033         DECL_TEMPLATE_RESULT.
13034
13035         * search.c (lookup_field_r): Call lookup_fnfields_1, not
13036         lookup_fnfields_here.
13037
13038         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
13039
13040         * call.c (build_object_call): Also allow conversions that return
13041         reference to pointer to function.
13042         (add_conv_candidate): Handle totype being ref to ptr to fn.
13043         (build_field_call): Also allow members of type reference to function.
13044         Lose support for calling pointer to METHOD_TYPE fields.
13045
13046         * error.c (dump_expr): Handle *_CAST_EXPR.
13047
13048         * typeck2.c (build_scoped_ref): Always convert to the naming class.
13049
13050         * tree.c (break_out_cleanups): Lose.
13051         * cp-tree.h: Remove prototype.
13052         * typeck.c (build_component_ref): Don't break_out_cleanups.
13053         (build_compound_expr): Likewise.
13054         * semantics.c (finish_expr_stmt): Likewise.
13055
13056 2000-12-20  Richard Henderson  <rth@redhat.com>
13057
13058         * cp-tree.h: Update declarations.
13059         * decl.c (finish_case_label): Return the new stmt node.
13060         * semantics.c (finish_goto_stmt): Likewise.
13061         (finish_expr_stmt, finish_return_stmt): Likewise.
13062         (finish_break_stmt, finish_continue_stmt): Likewise.
13063         (finish_asm_stmt): Likewise.
13064         * parse.y (already_scoped_stmt): Set STMT_LINENO.
13065         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
13066         (simple_if, simple_stmt): Return the new stmt node.
13067         (save_lineno): New.
13068
13069 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
13070
13071         * cp-tree.h: Don't declare warn_long_long.
13072
13073 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13074
13075         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
13076         IS_AGGR_TYPE.
13077
13078 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13079
13080         * pt.c (unify): Handle when both ARG and PARM are
13081         BOUND_TEMPLATE_TEMPLATE_PARM.
13082
13083 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13084
13085         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
13086         DECL_TEMPLATE_PARM_P.
13087
13088 2000-12-15  Jason Merrill  <jason@redhat.com>
13089
13090         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
13091
13092         * init.c (build_new_1): Don't strip quals from type.
13093
13094         * decl.c (pushdecl): Don't check for linkage on a non-decl.
13095
13096         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
13097
13098         * call.c (build_new_function_call): Lose space before paren in
13099         error message.
13100         (build_new_method_call): Likewise.
13101
13102         * typeck2.c (build_m_component_ref): Propagate quals from datum.
13103
13104 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13105
13106         * pt.c (check_explicit_specialization): Propagate default
13107         function arguments to explicit specializations.
13108
13109 2000-12-13  DJ Delorie  <dj@redhat.com>
13110
13111         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
13112         and <? operators.
13113
13114 2000-12-08  Jason Merrill  <jason@redhat.com>
13115
13116         * error.c (dump_function_name): Don't let the user see __comp_ctor.
13117
13118         Clean up copy-initialization in overloading code.
13119         * call.c (build_user_type_conversion_1): Die if we are asked to
13120         convert to the same or a base type.
13121         (implicit_conversion): Avoid doing so.  Lose reference binding code.
13122         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
13123         direct-initialization.  Also do direct-init part of copy-init.
13124         (build_user_type_conversion): Don't provide context to convert_like.
13125         * cvt.c (ocp_convert): build_user_type_conversion will now provide
13126         the constructor call for copy-init.
13127
13128         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
13129         instantiation of a member template.
13130         (do_decl_instantiation): Not here.
13131
13132 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
13133
13134         * class.c (check_field_decls): Don't special case anonymous
13135         fields in error messages.
13136         (note_name_declared_in_class): Use %D on diagnostic.
13137
13138         * tree.c (pod_type_p): Use strip_array_types.
13139         (cp_valid_lang_attribute): Likewise.
13140         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
13141         multiple evaluations.
13142         (cp_has_mutable_p): Use strip_array_types.
13143
13144 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
13145
13146         * cp-tree.h (sufficient_parms_p): Declare new function.
13147         * call.c (sufficient_parms_p): New function, broken out of ...
13148         (add_function_candidate): ... here. Use it.
13149         (add_conv_candidate): Use it.
13150         * decl.c (grok_ctor_properties): Use it.
13151
13152 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
13153
13154         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
13155
13156 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
13157
13158         * decl2.c (lang_decode_option): Handle -Wformat-security.
13159
13160 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13161
13162         * pt.c (verify_class_unification): New function.
13163         (get_class_bindings): Use it.
13164         (try_class_unification): Tidy.
13165         (unify): Handle when argument of a template-id is not
13166         template parameter dependent.
13167         (template_args_equal): Handle when TREE_CODE's do not match.
13168
13169 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
13170
13171         * lang-specs.h (c++): When invoking the stand-alone preprocessor
13172         for -save-temps, pass all relevant -Defines to it, and then don't
13173         pass them to cc1plus.
13174
13175 2000-12-05  Will Cohen  <wcohen@redhat.com>
13176
13177         * decl.c (finish_case_label): Cleared
13178         more_cleanups_ok in surrounding function scopes.
13179         (define_label): Likewise.
13180
13181 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
13182
13183         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
13184         (get_matching_virtual): Remove.
13185         (look_for_overrides): Declare new function.
13186         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
13187         DECL_VINDEX here.
13188         * class.c (check_for_override): Move base class iteration code
13189         to look_for_overrides.
13190         * search.c (next_baselink): Remove.
13191         (get_virtuals_named_this): Remove.
13192         (get_virtual_destructor): Remove.
13193         (tree_has_any_destructors_p): Remove.
13194         (struct gvnt_info): Remove.
13195         (check_final_overrider): Remove `virtual' from error messages.
13196         (get_matching_virtuals): Remove. Move functionality to ...
13197         (look_for_overrides): ... here, and ...
13198         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
13199         to be overriding.
13200
13201 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
13202
13203         * typeck.c (get_delta_difference): If via a virtual base,
13204         return zero.
13205         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
13206         adjustment.
13207
13208 2000-12-04  Richard Henderson  <rth@redhat.com>
13209
13210         * error.c (dump_tree): Use output_add_string not OB_PUTS.
13211
13212 2000-12-04  Jason Merrill  <jason@redhat.com>
13213
13214         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
13215         (write_builtin_type): Pass intSI_type_node and the like through
13216         type_for_mode.
13217         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
13218         Pass intSI_type_node and the like through type_for_mode.
13219         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
13220         * pt.c (tsubst, unify): Likewise.
13221         * tree.c (walk_tree): Likewise.
13222         * error.c (dump_type): Likewise.
13223         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
13224
13225         * Make-lang.in: Tweak top comment for emacs.
13226         (cp/TAGS): Restore.
13227
13228         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
13229
13230         * class.c (clone_function_decl): Robustify.
13231
13232 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
13233
13234         * decl.c (store_bindings): Only search in the non modified
13235         old_bindings for duplicates.
13236
13237 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
13238
13239         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
13240         TYPE_POLYMORPHIC_P.
13241
13242         * typeck.c (build_static_cast): Remove unused variable.
13243
13244 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13245
13246         * pt.c: Fix typo in comment.
13247
13248 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
13249
13250         * decl2.c (warn_format): Remove definition.
13251         (lang_decode_option): Handle -Wformat-nonliteral,
13252         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
13253
13254 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
13255
13256         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
13257         (init_decl_processing): Don't create string_type_node,
13258         const_string_type_node, wint_type_node, intmax_type_node,
13259         uintmax_type_node, default_function_type, ptrdiff_type_node and
13260         unsigned_ptrdiff_type_node.  Adjust position of call to
13261         c_common_nodes_and_builtins.
13262         (identifier_global_value): New function.
13263
13264 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
13265
13266         * call.c (standard_conversion): Reject pointer to member
13267         conversions from ambiguous, inaccessible or virtual bases.
13268         * typeck.c (build_static_cast): Don't check pointers to members
13269         specially.
13270
13271 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
13272
13273         * method.c (do_build_copy_constructor): Preserve cv
13274         qualifications when accessing source object members.
13275         (do_build_assign_ref): Likewise. Remove separate diagnostics for
13276         unnamed fields.
13277
13278 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
13279
13280         * method.c (do_build_assign_ref): Construct appropriately
13281         CV-qualified base reference. Don't allow const casts in base
13282         conversion.
13283
13284 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
13285
13286         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
13287         incomplete return type.
13288
13289 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
13290
13291         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
13292         * semantics.c (finish_base_specifier): Accept a _TYPE not a
13293         _DECL.
13294
13295 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
13296
13297         * spew.c (yyerror): Cope if yylval.ttype is NULL.
13298
13299 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
13300
13301         * decl.c (grokdeclarator): Diagnose undefined template contexts.
13302
13303 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
13304
13305         * decl.c (grokdeclarator): Do type access control on friend
13306         class.
13307
13308 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
13309
13310         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
13311         bison parser ickiness.
13312         * pt.c (tsubst_friend_function): Enter namespace scope when
13313         tsubsting the function name.
13314         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
13315
13316 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
13317
13318         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
13319         * cvt.c (cp_convert_to_pointer): Add force parameter.
13320         Allow conversions via virtual base if forced.
13321         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
13322         (ocp_convert): Likewise.
13323         * search.c (binfo_from_vbase): Return the virtual base's binfo.
13324         * typeck.c (get_delta_difference): Adjust handling of virtual
13325         bases.
13326
13327 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
13328
13329         * tree.c (struct list_hash): Remove.
13330         (list_hash_table): Make it be an htab.
13331         (struct list_proxy): New type.
13332         (list_hash_eq): New function.
13333         (list_hash_pieces): Renamed from ...
13334         (list_hash): ... this.
13335         (list_hash_lookup): Remove.
13336         (list_hash_add): Remove.
13337         (hash_tree_cons): Use the generic hashtable.
13338         (mark_list_hash): Remove.
13339         (init_tree): Create the hashtable.
13340
13341 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
13342
13343         * method.c (build_mangled_C9x_name): Rename to
13344         build_mangled_C99_name.  Change C9X references in comments to
13345         refer to C99.
13346
13347 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
13348
13349         * parse.y (unary_expr): Move VA_ARG from here ...
13350         (primary): ... to here.
13351
13352 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
13353
13354         * semantics.c (finish_id_expr): If type is error_mark, return
13355         error_mark.
13356
13357 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
13358
13359         * pt.c (lookup_template_class): Simplify loop exit constructs.
13360         Cope when there is no partial instantiation of a template
13361         template member.
13362
13363 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
13364
13365         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
13366
13367 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
13368
13369         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
13370         prefix.
13371
13372         * pt.c (do_decl_instantiate): Explicitly clone constructors and
13373         destructors that haven't already been cloned.
13374
13375 2000-11-20  Richard Henderson  <rth@redhat.com>
13376
13377         * parse.y (yyparse_1): Rename the parser entry point.
13378
13379 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
13380
13381         * mangle.c (write_name): Use <unscoped-name> for names directly in
13382         function scope.
13383         (write_unscoped_name): Accept names directly in function scope.
13384
13385 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
13386
13387         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
13388         * parse.y (extdef): Add EXPORT reduction.
13389         * spew.c (yylex): Don't skip export here.
13390
13391 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
13392
13393         * decl.c (init_decl_processing): Correct name of pure virtual
13394         function under the new ABI.
13395         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
13396         (throw_bad_typeid): Likewise for bad typeid function.
13397
13398 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
13399
13400         * decl.c (grokparms): Don't even function types of `void' type,
13401         either.
13402         * mangle.c (write_type): Don't crash when confronted with the
13403         error_mark_node.
13404
13405         * decl.c (grokparms): Don't create parameters of `void' type.
13406
13407 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
13408
13409         * lex.c (mark_impl_file_chain): Delete.
13410         (init_parse): Remove call to ggc_add_string_root.  No need to
13411         ggc_strdup a string constant.  Do not add impl_file_chain to GC
13412         roots.
13413         (handle_pragma_implementation): No need to ggc_strdup main_filename.
13414
13415 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
13416
13417         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
13418
13419 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
13420
13421         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
13422         * decl.c (grokdeclarator): Don't reject void parms here.
13423         (require_complete_types_for_parms): Simplify, use
13424         complete_type_or_else.
13425         (grokparms): Remove bitrot. Remove funcdef parm.
13426         Deal with ellipsis parm lists here.
13427         * semantics.c (finish_parmlist): Don't append void_list_node
13428         here. Set PARMLIST_ELLIPSIS_P.
13429
13430 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
13431
13432         * typeck2.c (incomplete_type_error): Reorganize to avoid
13433         excessive diagnostics.
13434
13435 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
13436
13437         * lex.c (struct impl_files, internal_filename): Constify a char *.
13438
13439 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
13440
13441         * mangle.c (write_special_name_constructor): Don't generate
13442         assembler junk when confronted with an old-style constructor.
13443         (write_special_name_destructor): Likewise.
13444         (mangle_decl_string): Do it here instead.
13445
13446 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
13447
13448         * call.c (op_error): Make error messages clearer.
13449
13450 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
13451
13452         * decl.c (wrapup_globals_for_namespace): Don't mark things
13453         TREE_ASM_WRITTEN when they're not.
13454
13455 2000-11-15  Jason Merrill  <jason@redhat.com>
13456
13457         * typeck2.c (friendly_abort): Uncount the error before handing
13458         off to fancy_abort.
13459
13460 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
13461
13462         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
13463
13464 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
13465
13466         * class.c (build_vtbl_initializer): Fix typo in comment.
13467         * typeck.c (expr_sizeof): Don't crash on errors.
13468
13469 2000-11-14  Jim Wilson  <wilson@redhat.com>
13470
13471         * lang-specs.h: Add %2 after %(cc1_options).
13472
13473 2000-11-14  Richard Henderson  <rth@redhat.com>
13474
13475         * typeck.c (c_sizeof): Be strict about casting result value
13476         back to c_size_type_node.
13477         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
13478
13479 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
13480
13481         * typeck.c (build_unary_op): Use boolean_increment from
13482         c-common.c, moving the relevant code there.
13483
13484 2000-11-11  Jason Merrill  <jason@redhat.com>
13485
13486         * typeck.c (mark_addressable): Don't call put_var_into_stack.
13487
13488         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
13489         in inlines.
13490
13491 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13492
13493         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
13494         * lex.c (copy_lang_decl): Likewise.
13495
13496 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
13497
13498         * dump.c (cp_dump_tree): Don't dump function bodies here.
13499
13500         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
13501         (dump.o): Update dependency list.
13502         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
13503         (flag_dump_translation_unit): Likewise.
13504         (CP_TYPE_QUALS): Adjust definition.
13505         (DECL_C_BIT_FIELD): Remove.
13506         (SET_DECL_C_BIT_FIELD): Likewise.
13507         (CLEAR_DECL_C_BIT_FIELD): Likewise.
13508         (add_maybe_template): Likewise.
13509         (strip_array_types): Likewise.
13510         (dump_node_to_file): Likewise.
13511         (cp_dump_tree): New function.
13512         * decl.c (init_decl_processing): Set lang_dump_tree.
13513         * decl2.c (flag_dump_translation_unit): Remove.
13514         * dump.c: Move most of it to ../c-dump.c.
13515         (cp_dump_tree): New function.
13516         * pt.c (add_maybe_template): Remove.
13517         * typeck.c (strip_array_types): Likewise.
13518
13519 2000-11-07  Eric Christopher  <echristo@redhat.com>
13520
13521         * decl.c (init_decl_processing): Change definition of
13522         __wchar_t to wchar_t.  Remove artificial declaration of
13523         wchar_t.
13524         * lex.c: Change instances of __wchar_t to wchar_t.
13525
13526 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
13527
13528         * lex.c (do_identifier): Don't lookup_name for operators.
13529         * parse.y (operator): Save looking_for_typename.
13530         (unoperator): Restore it.
13531         * spew.c (frob_opname): Use nth_token for lookahead.
13532
13533 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
13534
13535         * decl.c (grok_op_properties): Always use coerce_new_type and
13536         coerce_delete_type.
13537         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
13538         exception specification. Tidy up.
13539         (coerce_delete_type): Preserve exception specification. Tidy up.
13540
13541 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
13542
13543         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
13544         (push_binding_level), error.c (cp_tree_printer), pt.c
13545         (process_partial_specialization, tsubst_template_arg_vector),
13546         search.c (lookup_member): Use memset () instead of bzero ().
13547
13548 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
13549
13550         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
13551
13552 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
13553
13554         * Make-lang.in (c++.distdir): Remove.
13555
13556 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
13557
13558         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
13559         declarations from different namespaces to be combined.
13560
13561 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
13562
13563         * decl.c: Include tm_p.h.
13564
13565 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
13566
13567         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
13568
13569 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
13570
13571         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
13572         (build_overload_value), repo.c (open_repo_file), xref.c
13573         (open_xref_file): Use strchr () and strrchr () instead of index ()
13574         and rindex ().
13575
13576 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
13577
13578         * call.c (build_over_call): Call fold on the CALL_EXPR.
13579
13580 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
13581
13582         * error.c (dump_template_decl): Separate template hearders with
13583         space not comma.
13584
13585 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
13586
13587         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
13588         TS_* flags with corresponding TFF_*.  Adjust prototypes of
13589         functions (which used to take a tree_string_flags) to take an int.
13590
13591         * cp-tree.h (enum tree_string_flags): Remove
13592         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
13593         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
13594         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
13595         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
13596         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
13597         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
13598         (type_as_string, decl_as_string, expr_as_string,
13599         context_as_string): Adjust prototype.
13600
13601         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
13602         instead of TS_PLAIN.
13603
13604         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
13605         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
13606         plain `0'.
13607
13608 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
13609
13610         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
13611         (linkage_kind): New enumeration.
13612         (decl_linkage): New function.
13613         * decl2.c (comdat_linkage): Extend comment.
13614         * error.c (dump_function_decl): Print the arguments used to
13615         instantiate a template, even when not printing the type of the
13616         function.
13617         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
13618         not TREE_PUBLIC, to test for external linkage.
13619         * tree.c (decl_linkage): New function.
13620
13621 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
13622
13623         * pt.c (instantiate_decl): Always instantiate static data members
13624         initialized in-class.
13625
13626 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
13627
13628         * Make-lang.in: Move all build rules here from Makefile.in,
13629         adapt to new context.  Wrap all rules that change the current
13630         directory in parentheses.  Expunge all references to $(P).
13631         When one command depends on another and they're run all at
13632         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
13633         all object-file generation rules.  Delete obsolete variables.
13634
13635         * Makefile.in: Delete.
13636         * config-lang.in: Delete outputs= line.
13637
13638 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
13639
13640         * error.c (dump_function_decl): Print no space between
13641         `ptr-operator' the `type-specifier' of the return type.
13642         (dump_type_prefix): Make sure we put space at the appropriate
13643         place.
13644
13645 2000-10-23  Jason Merrill  <jason@redhat.com>
13646
13647         * call.c (equal_functions): Also call decls_match for extern "C" fns.
13648
13649 2000-10-22  Jason Merrill  <jason@redhat.com>
13650
13651         * call.c (build_conditional_expr): Use ocp_convert to force
13652         rvalue conversion.
13653
13654 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
13655
13656         * call.c (standard_conversion): Use RVALUE_CONVs for all
13657         expressions that satisfy lvalue_p, not just those that satisfy
13658         real_lvalue_p.
13659
13660         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
13661
13662         * typeck.c (c_sizeof): Return an expression of `size_t' type,
13663         not one with TYPE_IS_SIZETYPE set.
13664         (dubious_conversion_warnings): Remove special-case code.
13665
13666 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
13667
13668         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
13669         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
13670         (dump_type_prefix): Print vector-of-int as 'int vector'.
13671         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
13672         * tree.c (walk_tree): Handle VECTOR_TYPE.
13673
13674         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
13675
13676 2000-10-21  Jason Merrill  <jason@redhat.com>
13677
13678         * parse.y (operator): Set got_object from got_scope.
13679         Set looking_for_typename.
13680         * decl.c (lookup_name_real): Clear val after setting from_obj.
13681         Reorganize diagnostic.
13682
13683 2000-10-20  Jason Merrill  <jason@redhat.com>
13684
13685         * tree.c (walk_tree): Don't walk into default args.
13686
13687         * error.c (dump_expr): Use host_integerp.
13688
13689 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
13690
13691         * typeck2.c (abstract_virtuals_error): Use "because" instead of
13692         "since" in error message.
13693
13694 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13695
13696         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
13697
13698 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
13699
13700         * decl.c (revert_static_member_fn): Fixed typo.
13701
13702 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
13703
13704         * class.c (subobject_offset_fn): New type.
13705         (dfs_record_base_offsets): Remove.
13706         (record_base_offsets): Likewise.
13707         (dfs_search_base_offsets): Likewise.
13708         (record_subobject_offset): New function.
13709         (check_subobject_offset): Likewise.
13710         (walk_subobject_offsets): Likewise.
13711         (record_subobject_offsets): Likewise.
13712         (layout_conflict_p): Reimplement.
13713         (layout_nonempty_base_or_field): Correct handling of type
13714         conflicts during layout.
13715         (layout_empty_base): Likewise.
13716         (build_base_field): Adjust to handle new representation of empty
13717         base offset table.
13718         (build_base_fields): Likewise.
13719         (layout_virtual_bases): Likewise.
13720         (splay_tree_compare_integer_csts): New function.
13721         (layout_class_type): Use a splay_tree, rather than a varray, to
13722         represent the offsets of empty bases.
13723
13724         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
13725         * decl.c (select_decl): Don't return declarations that are
13726         DECL_ANTICIPATED.
13727
13728 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
13729
13730         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
13731         (fake_std_node): New macro.
13732         * decl.c (in_std): Rename to ...
13733         (in_fake_std): ... this.
13734         (flag_no_builtin): Remove.
13735         (flag_no_nonansi_builtin): Likewise.
13736         (walk_namespaces_r): Use fake_std_node.
13737         (push_namespace): Use std_identifier.
13738         (pop_namespace): Use in_fake_std.
13739         (lookup_name_real): Use fake_std_node.
13740         (init_decl_processing): When -fhonor-std, create the `std'
13741         namespace.  Don't create a dummy fake_std_node in that case.
13742         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
13743         (builtin_function): Put builtins whose names don't begin
13744         with `_' in the std namespace.
13745         * decl2.c (flag_no_builtin): Remove.
13746         (flag_no_nonansi_builtin): Likewise.
13747         (set_decl_namespace): Use fake_std_node.
13748         (validate_nonmember_using_decl): Likewise.
13749         (do_using_directive): Likewise.
13750         (handle_class_head): Likewise.
13751         * dump.c (dequeue_and_dump): Likewise.
13752         * except.c (init_exception_processing): Use std_identifier.
13753         * init.c (build_member_call): Use fake_std_node.
13754         * rtti.c (init_rtti_processing): Use std_identifier.
13755
13756 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
13757
13758         * cp-tree.h (back_end_hook): Remove declaration.
13759         * decl2.c (back_end_hook): Remove definition.
13760
13761         * dump.c (dequeue_and_dump): Dump TREE_USED.
13762
13763 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
13764
13765         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
13766
13767 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
13768
13769         * decl.c (WINT_TYPE): Define.
13770         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
13771         c_size_type_node, signed_size_type_node and wint_type_node.
13772
13773 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
13774
13775         * decl2.c (warn_missing_format_attribute): New variable.
13776         (lang_decode_option): Decode -Wmissing-format-attribute.
13777
13778 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
13779
13780         * typeck.c (qualify_type): Remove.
13781         (composite_pointer_type): Fix handling of conversions to `cv void*'.
13782
13783 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13784
13785         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
13786
13787 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13788
13789         * Makefile.in (parse.c, parse.h): Create atomically.
13790
13791 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
13792
13793         * class.c (current_obstack): Remove.
13794         * decl.c (ggc_p): Remove.
13795         (start_decl): Don't use decl_tree_cons.
13796         (grokdeclarator): Don't use build_decl_list.
13797         (start_function): Don't use decl_tree_cons.
13798         (finish_function): Don't mess with obstacks.
13799         * decl2.c (grok_x_components): Don't use build_decl_list.
13800         * lex.c (make_call_declarator): Don't call decl_tree_cons.
13801         (implicitly_declare_fn): Don't call build_decl_list.
13802         * parse.y (frob_specs): Don't call build_decl_list or
13803         decl_tree_cons.
13804         (expr_or_declarator_intern): Don't call decl_tree_cons.
13805         (primary): Don't call build_decl_list.
13806         (fcast_or_absdcl): Likewise.
13807         (typed_declspecs): Don't call decl_tree_cons.
13808         (reserved_declspecs): Don't call build_decl_list.
13809         (declmods): Likewise.
13810         (reserved_typespecquals): Likewise.
13811         (aggr): Likewise.
13812         (new_type_id): Likewise.
13813         (cv_qualifiers): Likewise.
13814         (after_type_declarator_intern): Likewise.
13815         (notype_declarator_intern): Likewise.
13816         (absdcl_intern): Likewise.
13817         (named_parm): Likewise.
13818         * pt.c (most_specialized_class): Likewise.
13819         * repo.c (temporary_obstack): Make it a structure, not a pointer.
13820         (init_repo): Initialize it.
13821         * search.c (current_obstack): Remove.
13822         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
13823
13824 2000-10-09  Richard Henderson  <rth@cygnus.com>
13825
13826         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
13827         (c++ language support bits for libgcc): Remove.
13828         (c++.clean): Remove cplib2.txt cleanup.
13829         * config-lang.in (headers, lib2funcs): Remove.
13830
13831         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
13832         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
13833         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
13834         * inc/new.h, inc/typeinfo: Remove files.
13835
13836 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
13837
13838         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
13839         defined.
13840         (init_decl_processing): Initialize intmax_type_node and
13841         uintmax_type_node.
13842
13843 2000-10-06  Richard Henderson  <rth@cygnus.com>
13844
13845         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
13846         (original_result_rtx): Remove.
13847         * decl.c (save_function_data): Don't clear x_result_rtx.
13848         (mark_lang_function): Don't mark it either.
13849         * expr.c (fixup_result_decl): Remove.
13850         * semantics.c (genrtl_named_return_value): Frob the return decl
13851         before calling emit_local_var.
13852         (genrtl_finish_function): Don't call fixup_result_decl.
13853         Always emit the jump to return_label.
13854
13855 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
13856
13857         * pt.c (lookup_template_class): Set current access for enum.
13858         (tsubst_enum): Set file & line for enum decl.
13859
13860         * spew.c (yylex): Remove unused variable.
13861
13862 2000-10-05  Richard Henderson  <rth@cygnus.com>
13863
13864         * semantics.c (genrtl_finish_function): Don't init or check
13865         can_reach_end; remove noreturn and return value checks.
13866
13867 2000-10-05  Tom Tromey  <tromey@cygnus.com>
13868
13869         * init.c (build_java_class_ref): Use `build_static_name' with a
13870         suffix, not a prefix, to build the class object's name.
13871
13872 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
13873
13874         * cp-tree.h (access_kind): Fix comment typo.
13875         * decl2.c (grokfield): Fix diagnostic typo.
13876         * semantics.c (finish_template_type): Fix comment typo.
13877         (finish_qualified_object_call_expr): Likewise.
13878
13879 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
13880
13881         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
13882         tsubsting fails.
13883
13884 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
13885
13886         * spew.c (frob_id): New static function.
13887         (frob_opname): Use it.
13888         (yylex): Use it.
13889
13890 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
13891
13892         * decl.c (lang_mark_false_label_stack): Remove.
13893         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
13894
13895 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
13896
13897         * gxxint.texi: Use @email for formatting email addresses.
13898
13899 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
13900
13901         * error.c: Remove direct obstack manipulation.  Replace with
13902         output_buffer-based formatting.  Adjust calls to removed macros.
13903         (obstack_chunk_alloc, obstack_chunk_free): Remove.
13904         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
13905         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
13906
13907 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
13908
13909         * ir.texi: Move to ../c-tree.texi.
13910
13911 2000-09-20  Jason Merrill  <jason@redhat.com>
13912
13913         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
13914
13915 2000-09-21  Andreas Jaeger  <aj@suse.de>
13916
13917         * errfn.c: Move declaration of cp_printer and cp_printers to ...
13918         * cp-tree.h: ... here.
13919
13920         * error.c: Remove declaration of cp_printer.
13921
13922 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
13923
13924         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
13925
13926 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
13927
13928         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
13929         users.
13930
13931 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
13932
13933         * decl.c (start_function): Robustify.
13934
13935 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13936
13937         * cp-tree.h (check_function_format): Accept a `status' parameter.
13938
13939         * call.c, typeck.c: Updates calls to `check_function_format'.
13940
13941 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
13942
13943         * decl2.c (handle_class_head): Always push some scope even
13944         in the error case.
13945
13946 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
13947
13948         * cp-tree.h (struct cp_language_function): Remove
13949         x_scope_stmt_stack and name_declared.
13950         (current_scope_stmt_stack): Remove.
13951         (function_name_declared_p): New macro.
13952         (struct lang_decl_flags): Use c_lang_decl as a base class.
13953         (context): Remove.
13954         (struct lang_decl): Replace saved_tree with context.
13955         (DECL_FRIEND_CONTEXT): Adjust accordingly.
13956         (SET_DECL_FRIEND_CONTEXT): Likewise.
13957         (DECL_VIRTUAL_CONTEXT): Likewise.
13958         (DECL_SAVED_TREE): Remove.
13959         (C_DECLARED_LABEL_FLAG): Likewise.
13960         (cplus_expand_expr_stmt): Don't declare.
13961         (add_decl_stmt): Likewise.
13962         (add_scope_stmt): Likewise.
13963         * decl.c (mark_stmt_tree): Remove.
13964         (case_compare): Likewise.
13965         (finish_case_label): Use c_add_case_label.
13966         (init_decl_processing): Set more language-specific hooks.
13967         (build_enumerator): Fix typo in comment.
13968         (cplus_expand_expr_stmt): Remove.
13969         (mark_lang_function): Use mark_c_language_function.
13970         (lang_mark_tree): Use c_mark_lang_decl.
13971         * decl2.c: Change order of inclusion.
13972         * except.c: Likewise.
13973         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
13974         back on c_expand_expr.
13975         * friend.c: Include expr.h.
13976         * init.c: Change order of inclusion.
13977         * Makefile.in: Update dependencies.
13978         * lex.h (free_lang_decl_chain): Remove.
13979         * optimize.c (maybe_clone_body): Use function_name_declared_p.
13980         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
13981         it doesn't exist.
13982         (instantiate_decl): Use function_name_declared_p.
13983         * semantics.c (lang_expand_expr_stmt): Remove.
13984         (set_current_function_name_declared): Likewise.
13985         (current_function_name_declared): Likewise.
13986         (begin_compound_stmt): Use function_name_declared_p.
13987         (add_decl_stmt): Remove.
13988         (setup_vtbl_ptr): Use function_name_declared_p.
13989         (add_scope_stmt): Remove.
13990         (current_scope_stmt_stack): New function.
13991         (cp_expand_stmt): Don't handle SCOPE_STMTs.
13992         (expand_body): Use function_name_declared_p.
13993         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
13994         * typeck.c: Change order of includes.
13995         (convert_sequence): Remove.
13996
13997 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
13998
13999         * lex.c (reswords): Add _Complex.
14000
14001 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14002
14003         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
14004
14005 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
14006
14007         * init.c (begin_init_stmts): Don't use // comments.
14008
14009 2000-09-12  Jason Merrill  <jason@redhat.com>
14010
14011         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
14012         all non-extern arrays.
14013
14014         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
14015         typenames, too.  Downgrade complaint to pedwarn.
14016         (xref_tag): Warn about surprising behavior of 'friend struct T'.
14017         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
14018         'class This::Inherited'.
14019
14020 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
14021
14022         * decl.c (finish_case_label): Given the LABEL_DECL a
14023         DECL_CONTEXT.
14024
14025 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
14026
14027         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
14028         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
14029         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14030         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14031         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
14032         New macros.
14033         (sorry_for_unsupported_tree, print_scope_operator,
14034         print_left_paren, print_right_paren, print_left_bracket,
14035         print_right_bracket, print_whitespace): Likewise.
14036         (aggr_variety): Rename to class_key_or_enum.
14037         (print_type): Rename to print_type_id.
14038         (print_type_specifier_seq, print_simple_type_specifier,
14039         print_elaborated_type_specifier,
14040         print_rest_of_abstract_declarator,
14041         print_parameter_declaration_clause, print_exception_specification,
14042         print_nested_name_specifier, print_template_id,
14043         typedef_original_name,  print_template_argument_list_start,
14044         print_template_argument_list_end): New functions.
14045
14046 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
14047
14048         * ir.texi: Add more documentation.
14049
14050 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
14051
14052         * cp-tree.h (struct saved_scope): Remove x_function_parms.
14053         (current_function_parms): Don't define.
14054         (struct cp_language_function): Remove parms_stored.
14055         (current_function_just_assigned_this): Don't define.
14056         (current_function_parms_stored): Likewise.
14057         (static_ctors): Declare.
14058         (static_dtors): Likewise.
14059         (SF_EXPAND): Don't define.
14060         (expand_start_early_try_stmts): Remove declaration.
14061         (store_parm_decls): Likewise.
14062         * decl.c (static_ctors): Don't declare.
14063         (static_dtors): Likewise.
14064         (struct binding_level): Remove this_block.
14065         (poplevel): Remove dead code.
14066         (set_block): Likewise.
14067         (mark_binding_level): Don't mark this_block.
14068         (mark_saved_scope): Don't mark x_function_parms.
14069         (init_decl_processing): Don't add current_function_parms as a GC
14070         root.
14071         (check_function_type): Change prototype.
14072         (start_function): Remove RTL-generation code.
14073         (expand_start_early_try_stmts): Remove.
14074         (store_parm_decls): Give it internal linkage.  Remove
14075         RTL-generation code.
14076         (finish_function): Remove RTL-generation code.
14077         * decl2.c (static_ctors): Fix formatting.
14078         (static_dtors): Likewise.
14079         * method.c (use_thunk): Don't call store_parm_decls.
14080         (synthesize_method): Likewise.
14081         * optimize.c (maybe_clone_body): Likewise.
14082         * parse.y (fn.def2): Likewise.
14083         (.set_base_init): Likewise.
14084         (nodecls): Likewise.
14085         * pt.c (instantiate_decl): Likewise.
14086         * rtti.c (synthesize_tinfo_fn): Likewise.
14087         * semantics.c (genrtl_try_block): Simplify.
14088         (expand_body): Use genrtl_start_function and
14089         genrtl_finish_function.
14090         (genrtl_start_function): New function.
14091         (genrtl_finish_function): Likewise.
14092
14093 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
14094
14095         * error.c (cp_tree_printer, case 'P'): Append break.
14096
14097 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
14098
14099         * cp-tree.h (frob_opname): Declare.
14100         * parse.y (saved_scopes): New static variable.
14101         (cp_parse_init): Adjust.
14102         (do_id): If lastiddecl is NULL, do do_identifier.
14103         (operator): Save scope information.
14104         (unoperator): New reduction. Restore scope information.
14105         (operator_name): Append unoperator. Call frob_opname.
14106         * spew.c (frob_opname): Define.
14107
14108 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
14109
14110         * decl.c, rtti.c: Include defaults.h if not already included.
14111         Don't define the *_TYPE_SIZE macros.
14112
14113 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
14114
14115         * cp-tree.h (push_switch): Change prototype.
14116         (check_cp_case_value): Remove declaration.
14117         (decl_constant_value): Likewise.
14118         * decl.c (struct cp_switch): Add switch_stmt and cases.
14119         (case_compare): New function.
14120         (push_switch): Set switch_stmt.  Initialize cases.
14121         (pop_switch): Clean up cases.
14122         (define_case_label): Rename to ...
14123         (finish_case_label): ... this.  Do semantic analysis for case
14124         labels here.
14125         (start_function): Correct comment.
14126         * decl2.c (check_cp_case_value): Remove.
14127         * expr.c (do_case): Remove.
14128         * pt.c (tsubst_expr): Adjust call to finish_case_label.
14129         * semantics.c (genrtl_do_poplevel): Remove declaration.
14130         (RECHAIN_STMTS): Remove.
14131         (finish_break_stmt): Use build_break_stmt.
14132         (finish_continue_stmt): Use build_continue_stmt.
14133         (finish_switch_cond): Adjust condition here, rater than in
14134         c_expand_start_case.
14135         (finish_case_label): Remove.
14136         * typeck.c (c_expand_return): Remove.
14137         (c_expand_start_case): Likewise.
14138
14139 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
14140
14141         * ir.texi: Document type nodes.
14142
14143 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
14144
14145         * cp-tree.h (init_cp_semantics): Declare.
14146         (genrtl_try_block): Don't declare.
14147         (genrtl_handler): Likewise.
14148         (genrtl_catch_block): Likewise.
14149         (genrtl_ctor_stmt): Likewise.
14150         (genrtl_subobject): Likewise.
14151         (genrtl_do_poplevel): Likewise.
14152         (genrtl_named_return_value): Likewise.
14153         * lex.c (init_parse): Call init_cp_semantics.
14154         * semantics.c (genrtl_try_block): Give it internal linkage.
14155         (genrtl_handler): Likewise.
14156         (genrtl_catch_block): Likewise.
14157         (genrtl_ctor_stmt): Likewise.
14158         (genrtl_subobject): Likewise.
14159         (genrtl_do_poplevel): Likewise.
14160         (genrtl_named_return_value): Likewise.
14161         (lang_expand_stmt): Rename to ...
14162         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
14163         (init_cp_semantics): Define.
14164
14165         * decl.c (initialize_local_var): Remove RTL-generating code.
14166         * semantics.c (genrtl_try_block): Fix formatting.
14167
14168         Move statement-tree facilities from C++ to C front-end.
14169         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
14170         (void_zero_node): Remove.
14171         (stmt_tree): Likewise.
14172         (scope_chain): Adjust.
14173         (language_function): Rename to cp_language_function.
14174         (cp_function_chain): Adjust.
14175         (current_stmt_tree): Remove.
14176         (last_tree): Likewise.
14177         (last_expr_type): Likewise.
14178         (struct lang_decl): Adjust.
14179         (STMT_IS_FULL_EXPR_P): Remove.
14180         (add_tree): Remove.
14181         (begin_stmt_tree): Likewise.
14182         (finish_stmt_tree): Likewise.
14183         (walk_tree_fn): Likewise.
14184         (walk_stmt_tree): Likewise.
14185         * class.c (finish_struct): Replace use of add_tree with add_stmt.
14186         * decl.c (mark_stmt_tree): Adjust type.
14187         (init_decl_processing): Don't build void_zero_node.
14188         (initialize_local_var): Adjust usage of current_stmt_tree.
14189         (finish_enum): Use add_stmt, not add_tree.
14190         (save_function_data): Adjust use of language_function.
14191         (finish_constructor_body): Use add_stmt, not add_tree.
14192         (finish_destructor_body): Likewise.
14193         (push_cp_function_context): Adjust use of language_function.
14194         (pop_cp_function_context): Likewise.
14195         (mark_lang_function): Likewise.
14196         (mark_cp_function_context): Likewise.
14197         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
14198         (build_vec_init): Likewise.
14199         * semantics.c (SET_LAST_STMT): Remove.
14200         (RECHAIN_STMTS): Don't use it.
14201         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
14202         (current_stmt_tree): Define.
14203         (add_tree): Remove.
14204         (finish_goto_stmt): Use add_stmt, not add_tree.
14205         (finish_expr_stmt): Likewise.
14206         (begin_if_stmt): Likewise.
14207         (finish_then_clause): Likewise.
14208         (begin_while_stmt): Likewise.
14209         (begin_do_stmt): Likewise.
14210         (finish_return_stmt): Likewise.
14211         (begin_for_stmt): Likewise.
14212         (finish_break_stmt): Likewise.
14213         (finish_continue_stmt): Likewise.
14214         (begin_switch_stmt): Likewise.
14215         (finish_case_label): Likewise.
14216         (begin_try_block): Likewise.
14217         (begin_function_try_block): Likewise.
14218         (begin_handler): Likewise.
14219         (begin_catch_block): Likewise.
14220         (begin_compound_stmt): Likewise.
14221         (begin_asm_stmt): Likewise.
14222         (finish_asm_stmt): Likewise.
14223         (finish_label_stmt): Likewise.
14224         (add_decl_stmt): Likewise.
14225         (finish_subobject): Likewise.
14226         (finish_decl_cleanup): Likewise.
14227         (finish_named_return_value): Likewise.
14228         (setup_vtbl_ptr): Likewise.
14229         (add_scope_stmt): Likewise.
14230         (finish_stmt_expr): Likewise.
14231         (prune_unused_decls): Remove.
14232         (begin_stmt_tree): Likewise.
14233         (finish_stmt_tree): Likewise.
14234         (prep_stmt): Adjust use of current_stmt_tree.
14235         (lang_expand_stmt): Likewise.
14236         * tree.c (statement_code_p): Remove.
14237         (cp_statement_code_p): New function.
14238         (walk_stmt_tree): Remove.
14239         (init_tree): Set lang_statement_code_p.
14240
14241 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
14242
14243         Integrated preprocessor.
14244
14245         * Make-lang.in, Makefile.in: Remove all references to input.c,
14246         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
14247         * gxx.gperf, hash.h, input.c: Delete.
14248         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
14249         initialized properly.
14250
14251         * class.c (fixup_pending_inline): Take a tree, not a
14252         struct pending_inline *.  All callers changed.
14253         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
14254         RID_PROTECTED entries in ridpointers[] array here.
14255         * decl.c (duplicate_decls): Do not refer to struct
14256         pending_inline.
14257         (record_builtin_type, init_decl_processing): Use RID_MAX not
14258         CP_RID_MAX.
14259         (grokdeclarator): Use C_IS_RESERVED_WORD.
14260         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
14261         cpplib.
14262         (grok_x_components): Do not inspect pending_inlines chain.
14263
14264         * cp-tree.h (struct lang_identifier): Add rid_code entry.
14265         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
14266         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
14267         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
14268         TIME_IDENTIFIER_FILEINFO): Kill.
14269         Update prototypes.
14270         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
14271         single 32-bit word.
14272         * parse.y: Call do_pending_inlines unconditionally.
14273         reinit_parse_for_method is now snarf_method.  fn.defpen is no
14274         longer necessary.  Remove unnecessary <itype> annotation on
14275         SCOPE.  Do not refer to end_of_file or struct pending_inline.
14276         * semantics.c (begin_inline_definitions): Call
14277         do_pending_inlines unconditionally.
14278
14279         * lex.c: Remove all code now shared with C front end.
14280         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
14281         into the get_identifier table.  Rewrite pragma handling to
14282         work with the registry.  Move code to save tokens for later
14283         processing to spew.c.
14284
14285         * spew.c: Rewrite everything in terms of token streams instead
14286         of text.  Move routines here from lex.c / input.c as
14287         appropriate.  GC-mark trees hanging off the pending inlines
14288         chain.
14289
14290 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
14291
14292         * NEWS: Mention that the named return value extension has been
14293         deprecated.
14294         * cp-tree.h (original_result_rtx): Define.
14295         (TREE_REFERENCE_EXPR): Remove.
14296         (DECL_VPARENT): Likewise.
14297         (pushdecl_nonclass_level): Likewise.
14298         (store_return_init): Likewise.
14299         (reinit_lang_specific): Likewise.
14300         (genrtl_named_return_value): Change prototype.
14301         * decl.c (original_result_rtx): Remove.
14302         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
14303         Do not generate RTL for local variables here.
14304         (store_return_init): Remove.
14305         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
14306         store_return_init.
14307         (finish_named_return_value): Adjust accordingly.  Warn that this
14308         extension is deprecated.
14309         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
14310
14311 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
14312
14313         * pt.c (type_unification_real): Replace switch with if.
14314         (unify): Tsubst non-type parms before comparing.
14315
14316 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
14317
14318         * error.c (dump_typename): New function, broken out of ...
14319         (dump_type): ... here. Use it.
14320         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
14321
14322 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
14323
14324         * init.c (build_offset_ref): Deal with namespace scoped
14325         TEMPLATE_ID_EXPRs.
14326
14327 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
14328
14329         * class.c (resolve_address_of_overloaded_function): Add
14330         explanation message.
14331         * decl.c (define_case_label): Reformat explanation.
14332         * decl2.c (finish_static_data_member_decl): Likewise.
14333         (grokfield): Likewise.
14334         * friend.c (do_friend): Likewise.
14335
14336 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
14337
14338         * tree.c (walk_tree): Expose tail recursion.
14339         (walk_stmt_tree): New function.
14340         * cp-tree.h: Prototype walk_stmt_tree.
14341         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
14342         the BLOCKs directly.  If a BLOCK has no variables after
14343         pruning, discard it.
14344         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
14345         restore the line number.
14346
14347 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
14348
14349         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
14350         (pt.o): Remove dependency on HTAB_H.
14351         * cp-tree.h: Include hashtab.h.
14352         (walk_tree): Change prototype.
14353         (walk_tree_without_duplicates): New function.
14354         * decl.c (check_default_argument): Use it.
14355         * optimize.c (remap_decl): Adjust calls to walk_tree.
14356         (copy_body): Likewise.
14357         (expand_calls_inline): Likewise.
14358         (calls_setjmp_p): Use walk_tree_without_duplicates.
14359         * pt.c: Don't include hashtab.h.
14360         (for_each_template_parm): Use walk_tree_without_duplicates.
14361         * semantics.c (finish-stmt_tree): Likewise.
14362         (expand_body): Likewise.
14363         * tree.c (walk_tree): Add additional parameter.
14364         (walk_tree_without_duplicates): New function.
14365         (count_trees): Use it.
14366         (verify_stmt_tree): Adjust call to walk_tree.
14367         (find_tree): Use walk_tree_without_duplicates.
14368         (no_linkage_check): Likewise.
14369         (break_out_target_exprs): Adjust call to walk_tree.
14370         (cp_unsave): Likewise.
14371
14372 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14373
14374         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
14375         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
14376         * cp-tree.h (TYPE_BINFO): Adjust comment.
14377         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
14378         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
14379         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
14380         (TYPE_TEMPLATE_INFO): Likewise.
14381         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
14382         * class.c (push_nested_class): Likewise.
14383         * decl.c (lookup_name_real): Likewise.
14384         (grokdeclarator): Likewise.
14385         (grok_op_properties): Likewise.
14386         (xref_tag): Likewise.
14387         (xref_basetypes): Likewise.
14388         * decl2.c (constructor_name_full): Likewise.
14389         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
14390         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
14391         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
14392         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14393         (dump_type_suffix): Likewise.
14394         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
14395         instead.
14396         (get_aggr_from_typedef): Likewise.
14397         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
14398         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14399         (write_template_parm): Likewise.
14400         (write_template_template_parm): Check tree code instead of
14401         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14402         * method.c (build_overload_nested_name): Add
14403         BOUND_TEMPLATE_TEMPLATE_PARM.
14404         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
14405         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14406         * pt.c (convert_template_argument): Check tree code instead of
14407         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14408         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
14409         (for_each_template_parm): Adjust comment.
14410         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
14411         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14412         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
14413         template_args_equal to compare template template parameter cases.
14414         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14415         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
14416         instead.
14417         * tree.c (copy_template_template_parm): Decide whether to create
14418         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
14419         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14420         (copy_tree_r): Likewise.
14421         * typeck.c (comptypes): Likewise.  Check tree code instead of
14422         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14423
14424 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
14425
14426         * decl.c (finish_function): Move the code for handling functions
14427         marked with the constructor and destructor attributes inside the
14428         expand_p block.
14429
14430 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
14431
14432         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
14433
14434 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
14435
14436         * pt.c (lookup_template_class): Remove abort.
14437         * tree.c (get_type_decl): Allow error_mark_node.
14438
14439 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
14440
14441         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
14442         TEMPLATE_ID_EXPRs.
14443
14444 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
14445
14446         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
14447         new ABI mangling.
14448
14449 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
14450
14451         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
14452         union tag mismatch error reporting.
14453
14454 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
14455
14456         * call.c (build_scoped_method_call): Check it is not a namespace.
14457
14458 2000-08-30  Jason Merrill  <jason@redhat.com>
14459
14460         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
14461
14462         * tree.c (bot_manip): Check TREE_CONSTANT rather than
14463         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
14464         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
14465
14466         * decl.c (start_function): Always call make_function_rtl.
14467
14468 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
14469
14470         * semantics.c (prune_unused_decls): New function.
14471         (finish_stmt_tree): Call it via walk_tree.
14472
14473 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
14474
14475         * class.c (build_secondary_vtable): Constify a char *.
14476         * decl.c (init_decl_processing): Initialize function_id_node,
14477         pretty_function_id_node, and func_id_node.
14478         * input.c (struct input_source): Constify 'str'.
14479         (feed_input): Constify first argument.
14480         * mangle.c (write_identifier): Constify argument.
14481         * pt.c (mangle_class_name_for_template): Constify argument.
14482
14483 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
14484
14485         * typeck.c (mark_addressable): Remove code that pokes around in
14486         RTL.
14487
14488 2000-08-28  Jason Merrill  <jason@redhat.com>
14489
14490         * lex.c (file_name_nondirectory): Move to toplev.c.
14491
14492         * cp-tree.h (LOCAL_CLASS_P): New macro.
14493         * class.c (finish_struct_1): Use it.
14494
14495 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
14496
14497         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
14498         (write_encoding): Pass another argument to write_name.
14499         (write_name): Add ignore_local_scope parameter.  Fix handling of
14500         local names.
14501         (write_nested_name): Use write_unqualified_name.
14502         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
14503         (write_template_prefix): Use write_unqualified_name.
14504         (write_component): Remove.
14505         (write_local_name): Add parameter.  Use direct local entity to
14506         discriminator calculation.
14507         (write_class_enum_type): Pass another argument to write_name.
14508         (write_template_template_arg): Likewise.
14509         (make_guard_variable): Likewise.
14510
14511 2000-08-27  Jason Merrill  <jason@redhat.com>
14512
14513         * decl.c (pushdecl): Matching decls for local externs are found in
14514         the current level.  Propagate linkage information from previous
14515         declarations.
14516
14517 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
14518
14519         * ir.texi (Expressions): Fix typo.
14520
14521 2000-08-25  Greg McGary  <greg@mcgary.org>
14522
14523         * tree.c (init_tree): Use ARRAY_SIZE.
14524
14525 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
14526
14527         * error.c (cp_tree_printer): Rework.
14528
14529 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
14530
14531         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
14532         dyn-string.o.
14533         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
14534         (cp-demangle.o): Remove target.
14535         (dyn-string.o): Likewise.
14536
14537         * decl.c (grokfndecl): Require that `main' return an `int'.
14538         * mangle.c (write_encoding): Don't mangle return types for
14539         conversion functions.
14540
14541 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
14542
14543         * error.c (tree_formatting_info): New data type.
14544         (tree_being_formatted): New macro.
14545         (tree_formatting_flags): Likewise.
14546         (put_whitespace): Likewise.
14547         (print_tree_identifier): Likewise.
14548         (print_identifier): Likewise.
14549         (cp_tree_printer, print_function_argument_list, print_declaration,
14550         print_expression, print_function_declaration,
14551         print_function_parameter, print_type, print_cv_qualifier): New
14552         functions.
14553         (init_error): Initialize lang_printer.
14554
14555 2000-08-24  Jason Merrill  <jason@redhat.com>
14556
14557         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
14558         adjustment necessary.
14559
14560 2000-08-24  Greg McGary  <greg@mcgary.org>
14561
14562         * cp-tree.h (MAIN_NAME_P): Remove macro.
14563
14564 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
14565
14566         * error.c (print_instantiation_context): Don't forget to flush the
14567         buffer.
14568
14569 2000-08-23  Jason Merrill  <jason@redhat.com>
14570
14571         * typeck.c (build_ptrmemfunc): Save the input pmf.
14572
14573         * method.c (process_modifiers): Use same_type_p.
14574
14575 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
14576
14577         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
14578         * mangle.c (write_function_type): Change prototype.
14579         (write_encoding): Don't mangle return types for
14580         constructors or destructors.
14581         (write_type): Adjust call to write_function_type.
14582         * pt.c (instantiate_template): Instantiate alternate entry points
14583         when instantiating the main function.
14584
14585 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
14586
14587         * error.c (cp_print_error_function): Don't use embedded '\n' in
14588         output_printf.
14589
14590 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
14591
14592         * decl.c (init_decl_processing): Remove bogus initialization.
14593         * error.c (lang_print_error_function): Restore here.
14594         (init_error): Initialize print_error_function.
14595
14596 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
14597
14598         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
14599
14600 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
14601
14602         * Makefile.in (error.o): Depends on diagnostic.h
14603
14604         * cp-tree.h (problematic_instantiation_changed,
14605         record_last_problematic_instantiation, current_instantiation,
14606         print_instantiation_context): Declare.
14607         (maybe_print_template_context): Remove.
14608
14609         * decl.c (init_decl_processing): Set print_error_function to NULL.
14610         (lang_print_error_function): Remove, since we're using a new
14611         machinery.
14612
14613         * error.c: #include diagnostic.h
14614         (function_category): New function.
14615         (cp_diagnostic_starter): Likewise.
14616         (cp_diagnostic_finalizer): Likewise.
14617         (cp_print_error_function): Likewise.
14618         (maybe_print_instantiation_context): Likewise.
14619         (print_instantiation_full_context): Likewise.
14620         (print_instantiation_partial_context): Likewise.
14621         (print_instantiation_context): Define.
14622         (init_error): Initialize diagnostic pager and finalizer.
14623
14624         * pt.c (problematic_instantiation_changed): Define.
14625         (record_last_problematic_instantiation): Likewise.
14626         (current_instantiation): Likewise.
14627         (maybe_print_template_context): Remove.
14628         (print_template_context): Likewise.
14629         (current_tinst_level): Make static to reflect Brendan Kehoe's
14630         change of 1995-04-13.
14631         (push_tinst_level): Call print_instantiation_context.
14632
14633 2000-08-21  Nix  <nix@esperi.demon.co.uk>
14634
14635         * lang-specs.h: Do not process -o or run the assembler if
14636         -fsyntax-only.
14637
14638 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
14639
14640         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
14641         variables.
14642         * decl2.c (lang_decode_option): Disable gettext attributes for
14643         -ansi.
14644
14645 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
14646
14647         * lex.c (lang_init_options): Default diagnostic message maximum
14648         length to 80, when line-wrapping.
14649
14650 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
14651
14652         * class.c (build_vtbl_initializer): Clear the entire
14653         vtbl_init_data.  Start keeping track of the functions for which we
14654         have created vcall offsets here.
14655         (dfs_build_vcall_offset_vtbl_entries): Remove.
14656         (build_vcall_offset_vtbl_entries): Reimplement.
14657         (add_vcall_offset_vtbl_entries_r): New function.
14658         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
14659         computing when vcall offsets are necessary.
14660
14661 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14662
14663         * decl.c (member_function_or_else): Use cp_error ... %T.
14664         (grokdeclarator): Likewise.
14665         (start_method): Likewise.
14666         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
14667
14668 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14669
14670         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
14671         TYPE_DECLs.
14672
14673 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14674
14675         * cp-tree.h (PTRMEM_OK_P): New macro.
14676         (itf_ptrmem_ok): New enumeration value.
14677         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
14678         argument. Diagnose implicit pointer to member.
14679         (instantiate_type): Don't diagnose implicit pointer to member
14680         here. Pass itf_ptrmem_ok if ok. Adjust calls to
14681         resolve_address_of_overloaded_function.
14682         * init.c (build_offset_ref): Set PTRMEM_OK_P.
14683         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
14684         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
14685         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
14686         (build_unary_op): Deal with single non-static member in
14687         microsoft-land.
14688
14689 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14690
14691         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
14692
14693 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14694
14695         * cp-tree.h (enum_name_string): Remove prototype.
14696         (report_case_error): Remove prototype.
14697         * cp/typeck2.c (enum_name_string): Remove.
14698         (report_case_error): Remove.
14699         * error.c (dump_expr): Deal with enum values directly.
14700         Correctly negate integer constant.
14701
14702 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
14703
14704         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
14705         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
14706         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
14707         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
14708         (__cxa_vec_new): Use __cxa_vec_new2.
14709         (__cxa_vec_delete): Use __cxa_vec_delete2.
14710
14711 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
14712
14713         * vec.cc (__cxa_vec_new): Set "C" linkage.
14714         (__cxa_vec_ctor): Likewise.
14715         (__cxa_vec_cctor): Likewise.
14716         (__cxa_vec_dtor): Likewise.
14717         (__cxa_vec_delete): Likewise.
14718         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
14719         (__cxa_vec_ctor): Likewise.
14720         (__cxa_vec_cctor): Likewise.
14721         (__cxa_vec_dtor): Likewise.
14722         (__cxa_vec_delete): Likewise.
14723
14724 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
14725
14726         * class.c (instantiate_type): Reinstate local variable
14727         deleted in previous change.
14728
14729         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
14730         itf_no_attributes.
14731
14732 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
14733
14734         * cp-tree.h (instantiate_type_flags): New enumeration.
14735         (instantiate_type): Change parameter.
14736         * class.c (instantiate_type): Adjust prototype. Adjust.
14737         * call.c (standard_conversion): Adjust instantiate_type call.
14738         (reference_binding): Likewise.
14739         (build_op_delete_call): Likewise.
14740         (convert_like_real): Likewise.
14741         * cvt.c (cp_convert_to_pointer): Likewise.
14742         (convert_to_reference): Likewise.
14743         * pt.c (convert_nontype_argument): Likewise.
14744         * typeck.c (build_binary_op): Likewise.
14745         (build_ptrmemfunc): Likewise.
14746         (convert_for_assignment): Likewise.
14747
14748 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
14749
14750         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
14751         (current_aggr): Define.
14752         * decl.c (grokdeclarator): Make sure a friend class is an
14753         elaborated type specifier.
14754         * parse.y (current_aggr): Remove static definition.
14755         (cp_parse_init): Adjust.
14756         (structsp): Clear and restore current_aggr.
14757         (component_decl_list): Clear current_aggr.
14758
14759         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
14760         aggregate tag on the typename's context.
14761
14762         * pt.c (tsubst_friend_class): Return error_mark_node, if
14763         parms becomes NULL.
14764         (instantiate_class_template): Ignore error_mark_node friend types.
14765
14766 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
14767
14768         * cvt.c (warn_ref_binding): New static function, broken out of ...
14769         (convert_to_reference): ... here. Use it.
14770
14771 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
14772
14773         * parse.y (template_arg): Add rule for template qualified with
14774         global scope.
14775
14776 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14777
14778         * decl2.c (add_function): Reorganize.
14779         (arg_assoc): Do not consider function template decls.
14780
14781 2000-08-11  Jason Merrill  <jason@redhat.com>
14782
14783         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
14784         looking inside.
14785
14786 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
14787
14788         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
14789         (lookup_nested_tag): Likewise.
14790
14791         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
14792         can be produced.
14793
14794 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
14795
14796         * parse.y (named_complex_class_head_sans_basetype): Remove
14797         always true if.
14798
14799 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
14800
14801         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
14802         explicit TEMPLATE_ID_EXPR args.
14803         (build_expr_from_tree, case CALL_EXPR): Likewise.
14804
14805 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
14806
14807         * decl.c (check_tag_decl): Diagnose typename's which don't
14808         declare anything.
14809
14810 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
14811
14812         * init.c (build_aggr_init): Reject bogus array initializers
14813         early.
14814
14815 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
14816
14817         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
14818         runtime.
14819         * cp/tinfo.cc (__dynamic_cast): Likewise.
14820         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
14821
14822 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
14823
14824         * cvt.c (convert_to_pointer_force): Fix error message when
14825         attempting to cast from ambiguous base.
14826
14827 2000-08-08  Jason Merrill  <jason@redhat.com>
14828
14829         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
14830         (tsubst_template_arg_vector): Likewise.
14831
14832         * decl2.c (build_anon_union_vars): Choose the largest field; don't
14833         assume that one will be as large as the union.
14834
14835 2000-08-07  Kazu Hirata  <kazu@hxi.com>
14836
14837         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
14838         * decl.c (pop_labels): Likewise.
14839
14840 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
14841
14842         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
14843         specifications.
14844         (__pointer_to_member_type_info): Likewise.
14845         (__base_class_info): Likewise.
14846         (__class_type_info): Likewise.
14847         (__si_class_type_info): Likewise.
14848         (__vmi_class_type_info): Likewise.
14849         * tinfo.cc (__si_class_type_info::__do_find_public_src):
14850         Changed member names to match specifications.
14851         (__vmi_class_type_info::__do_find_public_src): Likewise.
14852         (__si_class_type_info::__do_dyncast): Likewise.
14853         (__vmi_class_type_info::__do_dyncast): Likewise.
14854         (__si_class_type_info::__do_upcast): Likewise.
14855         (__vmi_class_type_info::__do_upcast): Likewise.
14856         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
14857         (__pbase_type_info::__pointer_catch): Likewise.
14858         (__pointer_type_info::__pointer_catch): Likewise.
14859         (__pointer_to_member_type_info::__pointer_catch): Likewise.
14860
14861 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
14862
14863         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
14864         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
14865         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
14866
14867 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
14868
14869         * cp-tree.h (add_method): Change prototype.
14870         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
14871         Don't double the size of the method vector in the error case.
14872         (handle_using_decl): Adjust call to add_method.
14873         (add_implicitly_declared_members): Likewise.
14874         (clone_function_decl): Likewise.
14875         * decl2.c (check_classfn): Likewise.
14876         * semantics.c (finish_member_declaration): Likewise.
14877
14878 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
14879
14880         * decl.c (flag_isoc94): New variable.
14881
14882 2000-08-02  Jason Merrill  <jason@redhat.com>
14883
14884         * pt.c (do_type_instantiation): Add complain parm; don't complain
14885         if called recursively.
14886         * cp-tree.h, parse.y: Adjust.
14887
14888 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
14889
14890         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
14891         -Wno-strict-prototypes.
14892
14893         * g++spec.c: Adjust type of second argument to
14894         lang_specific_driver, and update code as necessary.
14895
14896         * cp-tree.h: Don't prototype min_precision here.
14897         (my_friendly_assert): Cast expression to void.
14898         * semantics.c (do_poplevel): Initialize scope_stmts.
14899
14900 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
14901
14902         * cp-tree.h (DECL_NEEDED_P): Tweak.
14903
14904 2000-07-28  Jason Merrill  <jason@redhat.com>
14905
14906         * lang-specs.h: Use %i in rule for .ii files.
14907
14908 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
14909
14910         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
14911
14912 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
14913
14914         Allow indirect primary bases.
14915         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
14916         primary_base.
14917         (CLASSTYPE_VFIELD_PARENT): Remove.
14918         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
14919         (BINFO_PRIMARY_BINFO): Remove.
14920         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
14921         (BINFO_VBASE_PRIMARY_P): Likewise.
14922         (BINFO_PRIMARY_BASE_OF): New macro.
14923         (BINFO_INDIRECT_PRIMARY_P): Likewise.
14924         (get_primary_binfo): New function.
14925         * decl.c (lang_mark_tree): Make lang_type::primary_base.
14926         * class.c (vcall_offset_data_s): Rename to ...
14927         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
14928         and add ctor_vtbl_p.
14929         (get_derived_offset): Use get_primary_binfo.
14930         (dfs_mark_primary_bases): Adjust handling of virtual primary
14931         bases.
14932         (mark_primary_bases): Likewise.
14933         (set_primary_base): Take a binfo, not an integer, as a
14934         representation of the primary base.
14935         (indirect_primary_base_p): Remove.
14936         (determine_primary_base): Adjust for indirect primary bases.
14937         (dfs_find_final_overrider): Fix typo in coment.
14938         (update_vtable_entry_for_fn): Use get_primary_binfo.
14939         (layout_nonempty_base_or_field): Tweak.
14940         (build_base_fields): Adjust for new primary base semantics.
14941         (dfs_propagate_binfo_offsets): Remove.
14942         (propagate_binfo_offsets): Rewrite.
14943         (dfs_set_offset_for_shared_vbases): Remove.
14944         (layout_virtual_bases): Don't use it.
14945         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
14946         ABI.
14947         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
14948         CLASSTYPE_VFIELD_PARENT.
14949         (dfs_get_primary_binfo): New function.
14950         (get_primary_binfo): Likewise.
14951         (dump_class_hierarchy_r): Tweak printing of primary bases.
14952         (build_vtbl_initializer): Fix typo in comments.  Use
14953         vtbl_init_data.
14954         (build_vcall_and_vbase_vtbl_entries): Likewise.
14955         (build_vbaes_offset_vtbl_entries): Likewise.
14956         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
14957         BV_VCALL_INDEX to handle indirect primary bases.
14958         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
14959         (build_rtti_vtbl_entries): Likewise.
14960         * search.c (get_shared_vbase_if_not_primary): Tweak.
14961         (find_vbase_instance): Likewise.
14962         (binfo_for_vtable): Simplify.
14963         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
14964         (make_binfo): Make it have 11 entries.
14965
14966 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
14967
14968         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
14969         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
14970         ascertaining primaryness.
14971         (G): Remove template_args.
14972         (decl_is_template_id): New function.
14973         (write_encoding): Use decl_is_template_id.
14974         (write_name): Likewise.  Handle type_decls.  Get main variant of
14975         type decls.
14976         (write_nested_name): Likewise.
14977         (write_prefix): Likewise.
14978         (write_template_prefix): Likewise.
14979         (write_special_name_constructor): Remove defunct production from
14980         comment.
14981         (write_bare_function_type): Remove comment about absent parameter.
14982         (write_template_template_arg): Add missing grammar production to
14983         comment.
14984
14985 2000-07-27  Jason Merrill  <jason@redhat.com>
14986
14987         * decl.c (duplicate_decls): If common_type produces a non-typedef
14988         type for a typedef, just use the old type.
14989
14990 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
14991
14992         * cp-tree.h (function_depth): Declare.
14993         (verify_stmt_tree): Likewise.
14994         (find_tree): Likewise.
14995         * decl.c (function_depth): Give it external linkage.
14996         * optimize.c (optimize_function): Increment and decrement it.
14997         * tree.c (verify_stmt_tree_r): New function.
14998         (verify_stmt_tree): Likewise.
14999         (find_tree_r): Likewise.
15000         (find_tree): Likewise.
15001
15002 2000-07-27  Jason Merrill  <jason@redhat.com>
15003
15004         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
15005         TYPE_PTRMEMFUNC_P.
15006         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
15007
15008 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
15009
15010         * decl.c (start_cleanup_fn): Mark the function as `inline'.
15011         * decl2.c (get_guard): Call cp_finish_decl, not
15012         rest_of_decl_compilation, for local guards.
15013         * lex.c (do_identifier): Remove unused variable.
15014
15015 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
15016
15017         * parse.y:  Add missing ';'.
15018
15019 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
15020
15021         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
15022         of `extern "C++"'.
15023
15024 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
15025
15026         Kill strict_prototype. Backwards compatibility only for
15027         non NO_IMPLICIT_EXTERN_C systems.
15028         * cp-tree.h (flag_strict_prototype): Remove.
15029         (strict_prototype): Remove.
15030         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15031         * decl.c (maybe_push_to_top_level): Adjust.
15032         (pop_from_top_level): Adjust.
15033         (decls_match): Only allow sloppy parm matching for ancient
15034         system headers.
15035         (init_decl_processing): Adjust.
15036         (grokdeclarator): Adjust.
15037         * decl2.c (flag_strict_prototype): Remove.
15038         (strict_prototype): Remove.
15039         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15040         (lang_f_options): Remove "strict-prototype".
15041         (unsupported-options): Add "strict-prototype".
15042         * lex.c (do_identifier): Adjust.
15043         (do_scoped_id): Adjust.
15044         * parse.y (empty_parms): Adjust.
15045         * class.c (push_lang_context): Adjust.
15046         (pop_lang_context): Adjust.
15047         * typeck.c (comp_target_parms): Adjust.
15048
15049 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
15050
15051         * decl.c (poplevel): Deal with anonymous variables at for scope.
15052         (maybe_inject_for_scope_var): Likewise.
15053
15054 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
15055
15056         * decl.c: Remove all signal handling code, now done in toplev.c.
15057
15058 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
15059
15060         * decl.c (make_rtl_for_nonlocal_decl): Rework.
15061
15062         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
15063         correctly.
15064
15065 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
15066
15067         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
15068         Define my_friendly_assert and my_friendly_abort as macros
15069         which may call friendly_abort.  Prototype friendly abort, not
15070         my_friendly_abort or my_friendly_assert.
15071         * decl.c (signal_catch): Report the signal caught in the error
15072         message.  Call fatal directly.
15073         * typeck2.c (ack, my_friendly_assert): Delete.
15074         (my_friendly_abort): Rename to friendly_abort.  Expect file,
15075         line, and function parameters.  Report the abort code, then
15076         call fancy_abort.  Do not mask an abort if errors have
15077         already occurred.
15078
15079 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
15080
15081         * typeck.c (comp_target_parms): Remove obsolete parameter.
15082         (comp_target_types): Adjust.
15083
15084 2000-07-17  Jason Merrill  <jason@redhat.com>
15085
15086         * typeck.c (mark_addressable): Never set TREE_USED.
15087         * call.c (build_call): Don't abort on calls to library functions
15088         that have been declared normally.
15089
15090         * typeck.c (build_binary_op): Fix grammar in warning.
15091
15092         * exception.cc (__eh_free): Fix prototype.
15093
15094         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
15095
15096         * decl.c (pushdecl): Handle seeing an OVERLOAD in
15097         IDENTIFIER_NAMESPACE_VALUE.
15098
15099 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
15100
15101         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
15102         * method.c (use_thunk): Correct handling of vcall offsets.
15103
15104 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
15105
15106         * .cvsignore: parse.h and parse.c have no cp- prefix.
15107
15108 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
15109
15110         * .cvsignore: New file.
15111
15112 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
15113
15114         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
15115
15116 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
15117
15118         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
15119         * parse.c: Remove.
15120         * parse.h: Likewise.
15121
15122 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
15123
15124         * class.c (layout_class_type): Add pointers to virtual bases after
15125         base classes under the old ABI.
15126
15127 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
15128
15129         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
15130         (finish_continue_stmt): Likewise.
15131         (begin_for_stmt): Remove call to note_level_for_for.
15132         (finish_goto_stmt): Change call from build_min_nt
15133         to build_stmt.
15134         (finish_expr_stmt): Likewise.
15135         (begin_if_stmt): Likewise.
15136         (begin_while_stmt): Likewise.
15137         (finish_while_stmt): Likewise.
15138         (finish_return_stmt): Likewise.
15139         (begin_for_stmt): Likewise.
15140         (finish_for_stmt): Likewise.
15141         (finish_break_stmt): Likewise.
15142         (begin_switch_stmt): Likewise.
15143         (finish_case_label): Likewise.
15144         (genrtl_try_block): Likewise.
15145         (begin_try_block): Likewise.
15146         (begin_handler): Likewise.
15147         (begin_compound_stmt): Likewise.
15148         (finish_asm_stmt): Likewise.
15149         (finish_label_stmt): Likewise.
15150         (add_decl_stmt): Likewise.
15151         (finish_subobject): Likewise.
15152         (finish_decl_cleanup): Likewise.
15153         (finish_named_return_value): Likewise.
15154         (setup_vtbl_ptr): Likewise.
15155         (add_scope_stmt): Likewise.
15156         * decl.c (finish_constructor_body): Likewise.
15157         (finish_destructor_body): Likewise.
15158         * optimize.c (copy_body_r): Likewise.
15159         (initialize_inlined_parameters): Likewise.
15160         (declare_return_variable): Likewise.
15161         (expand_call_inline): Likewise.
15162
15163 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
15164
15165         * semantics.c (expand_body): Sync interface information
15166         at the end of function body expansion.
15167
15168 2000-07-09  Jason Merrill  <jason@redhat.com>
15169
15170         * init.c (build_new_1): Bail early if the call to new fails.
15171
15172         * decl.c (compute_array_index_type): Check specifically for
15173         an INTEGER_CST, not just TREE_CONSTANT.
15174
15175         * decl.c (duplicate_decls): Don't call duplicate_decls on
15176         the DECL_TEMPLATE_RESULT.
15177         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
15178         codes.
15179
15180         * error.c (dump_template_bindings): Don't crash if we had an
15181         invalid argument list.
15182
15183         * typeck.c (c_expand_start_case): Do narrowing here.
15184         * semantics.c (finish_switch_cond): Not here.
15185
15186 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
15187
15188         * parse.y (asm_clobbers): Do string concatenation.
15189
15190 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
15191
15192         * decl.c (pushtag): Don't put local classes in template functions
15193         on the local_classes list.
15194
15195 2000-07-04  Scott Snyder  <snyder@fnal.gov>
15196
15197         * decl2.c (get_guard): Add missing return for old ABI local
15198         variable case.
15199
15200 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
15201
15202         * cp-tree.h (char_type_p): New function.
15203         * decl.c (init_decl_processing): Don't initialize
15204         signed_wchar_type_node or unsigned_wchar_type_node.
15205         (complete_array_type): Handle brace-enclosed string-constants.
15206         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
15207         * tree.c (char_type_p): New function.
15208         * typeck2.c (digest_init): Use char_type_p.
15209
15210 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
15211
15212         * pt.c (tsubst): Don't layout type, if it's error_mark.
15213
15214 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
15215
15216         * pt.c (instantiate_pending_templates): Reset template level.
15217
15218 2000-07-05  Jason Merrill  <jason@redhat.com>
15219
15220         * call.c (joust): Don't complain about `operator char *()' beating
15221         `operator const char *() const'.
15222
15223 2000-07-04  scott snyder  <snyder@fnal.gov>
15224             Jason Merrill  <jason@redhat.com>
15225
15226         * repo.c (repo_get_id): Handle the case where a class with virtual
15227         bases has a null TYPE_BINFO_VTABLE.
15228
15229 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
15230             Jason Merrill  <jason@redhat.com>
15231
15232         * parse.y (member_init): Just pass in the type.
15233         * init.c (expand_member_init): Handle getting a type.
15234
15235 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15236             Jason Merrill  <jason@redhat.com>
15237
15238         * decl.c (finish_function): Warn if a function has no return
15239         statement.
15240         Suggested by Andrew Koenig.
15241         * typeck.c (check_return_expr): Do set current_function_returns_value
15242         if we got an error_mark_node.
15243
15244 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
15245
15246         * decl2.c (push_decl_namespace): Push the original namespace.
15247
15248 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
15249
15250         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
15251         * semantics.c (begin_class_definition): Clear it.
15252
15253 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
15254
15255         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
15256         (genrtl_expr_stmt): Likewise.
15257         (genrtl_decl_stmt): Likewise.
15258         (genrtl_if_stmt): Likewise.
15259         (genrtl_while_stmt): Likewise.
15260         (genrtl_do_stmt): Likewise.
15261         (genrtl_return_stmt): Likewise.
15262         (genrtl_for_stmt): Likewise.
15263         (genrtl_break_stmt): Likewise.
15264         (genrtl_continue_stmt): Likewise.
15265         (genrtl_scope_stmt): Likewise.
15266         (genrtl_switch_stmt): Likewise.
15267         (genrtl_case_label): Likewise.
15268         (genrtl_begin_compound_stmt): Likewise.
15269         (genrtl_finish_compound_stmt): Likewise.
15270         (genrtl_compound_stmt): Likewise.
15271         (genrtl_asm_stmt): Likewise.
15272
15273         * init.c (begin_init_stmts): Remove call to
15274         genrtl_begin_compound_stmt.
15275         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
15276
15277         * semantics.c (lang_expand_stmt): Changed call to
15278         genrtl_compound_stmt to ignore return value.
15279
15280 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
15281
15282         * mangle.c (canonicalize_for_substitution): Return the canonical
15283         variant of a type.
15284
15285         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
15286         TYPE_DECL.
15287         * typeck.c (commonparms): Remove obstack manipulations.
15288
15289 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
15290
15291         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
15292
15293         * Makefile.in (OBJS): Added ../c-semantics.o.
15294         (OBJDEPS): Likewise.
15295
15296         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
15297         ../c-common.h.
15298         (struct stmt_tree): Added comment.
15299         (current_function_name_declared): Removed.
15300         (stmts_are_full_exprs_p): Likewise.
15301         (genrtl_do_pushlevel): Likewise.
15302         (genrtl_clear_out_block): Likewise.
15303         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
15304         (DECL_ANON_UNION_ELEMS): Likewise.
15305         (emit_local_var): Likewise.
15306         (make_rtl_for_local_static): Likewise.
15307         (do_case): Likewise.
15308         (expand_stmt): Likewise.
15309         (genrtl_decl_cleanup): Likewise.
15310         (c_expand_asm_operands): Likewise.
15311         (c_expand_return): Likewise.
15312         (c_expand_start_case): Likewise.
15313
15314         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
15315         (emit_local_var): Likewise.
15316         (initialize_local_var): Change reference to
15317         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
15318         Change reference to stmts_are_full_exprs_p to
15319         current_stmt_tree->stmts_are_full_exprs_p.
15320         (push_cp_function_context): Likewise.
15321
15322         * expect.c (expand_throw): Change reference to
15323         stmts_are_full_exprs_p.
15324
15325         * init.c (build_aggr_init): Change reference to
15326         stmts_are_full_exprs_p.
15327         (build_vec_init): Likewise.
15328
15329         * optimize.c (maybe_clone_body): Change reference to
15330         current_function_name_declared to
15331         cp_function_chain->name_declared.
15332
15333         * pt.c (instantiate_decl): Change reference to
15334         current_function_name_declared to
15335         cp_function_chain->name_declared.
15336
15337         * semantics.c (expand_cond): Moved declaration to c-common.h.
15338         (genrtl_do_pushlevel): Moved to c-semantics.c.
15339         (genrtl_clear_out_block): Likewise.
15340         (genrtl_goto_stmt): Likewise.
15341         (genrtl_expr_stmt): Likewise.
15342         (genrtl_decl_stmt): Likewise.
15343         (gerntl_if_stmt): Likewise.
15344         (genrtl_while_stmt): Likewise.
15345         (genrtl_do_stmt): Likewise.
15346         (genrtl_return_stmt): Likewise.
15347         (genrtl_for_stmt): Likewise.
15348         (genrtl_break_stmt): Likewise.
15349         (genrtl_continue_stmt): Likewise.
15350         (genrtl_scope_stmt): Likewise.
15351         (genrtl_switch_stmt): Likewise.
15352         (genrtl_case_label): Likewise.
15353         (genrtl_begin_compound_stmt): Likewise.
15354         (genrtl_finish_compound_stmt): Likewise.
15355         (genrtl_compound_stmt): Likewise.
15356         (genrtl_asm_stmt): Likewise.
15357         (genrtl_decl_cleanup): Likewise.
15358         (expand_cond): Likewise.
15359         (expand_stmt): Renamed to ...
15360         (lang_expand_stmt): ... this.
15361         (lang_expand_expr_stmt): Initialize.
15362         (set_current_function_name_declared): Likewise.
15363         (stmts_are_full_exprs_p): Likewise.
15364         (current_function_name_declared): Likewise.
15365         (anon_aggr_type_p): Likewise.
15366         (do_poplevel): Change reference to
15367         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
15368         Change reference to stmts_are_full_exprs_p to
15369         current_stmt_tree->stmts_are_full_exprs_p.
15370         (add_tree): Likewise.
15371         (finish_expr_stmt): Likewise.
15372         (prep_stmt): Likewise.
15373         (lang_expand_stmt): Likewise.
15374         (begin_compound_stmt): Change reference to
15375         current_function_name_declared to
15376         cp_function_chain->name_declared and call to
15377         current_function_name_declared().
15378         (setup_vtbl_ptr): Likewise.
15379         (genrtl_do_poplevel): Removed.
15380
15381 2000-06-30  Jason Merrill  <jason@redhat.com>
15382
15383         * init.c (init_init_processing): Go back to aligning like
15384         double_type_node for old ABI.
15385         (get_cookie_size): Make cookie larger if we get a type that needs
15386         more alignment.
15387         (build_vec_delete): Call it.
15388
15389         * typeck.c (qualify_type_recursive): New fn.
15390         (composite_pointer_type): Use it.
15391         (build_binary_op): Use composite_pointer_type.
15392
15393 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
15394             Jason Merrill  <jason@redhat.com>
15395
15396         * typeck.c (check_return_expr): Don't complain about returning
15397         NULL from operator new if -fcheck-new.
15398         * cp-tree.h: Declare flag_check_new here.
15399         * init.c: Not here.
15400
15401 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
15402
15403         * mangle.c (find_substitution): Use same_type_p.
15404         (write_encoding): Don't check for substitutions.
15405
15406 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
15407
15408         * parse.y (expr_no_comma_rangle): New non-terminal.
15409         (template_parm): Use it for default parameter case.
15410         (template_arg): Use it.
15411         (expr_no_commas): Remove commented out undefined extensions.
15412         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
15413         * parse.h, parse.c: Rebuilt.
15414
15415 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
15416
15417         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
15418         (finish_asm_stmt): Do it here, instead.
15419
15420         * cp-tree.h (ridpointers): Don't declare.
15421         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
15422         (record_builtin_java_type): Likewise.
15423         (init_decl_processing): Likewise.
15424         * lex.c: Move inclusion of lex.h.
15425         (ridpointers): Don't define.
15426         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
15427         RID_MAX.
15428         * lex.h (enum rid): Rename to ...
15429         (enum cp_rid): ... this.
15430         (ridpointers): Don't declare.
15431         * parse.y: Move inclusion of lex.h.
15432         * parse.c: Regenerated.
15433         * spew.c: Move inclusion of lex.h.
15434
15435         * cp-tree.h (struct language_function): Remove temp_name_counter.
15436         (temp_name_counter): Remove.
15437         (get_temp_name): Change prototype.
15438         (get_guard): New function.
15439         (get_guard_cond): Likewise.
15440         (set_guard): Likewise.
15441         * cvt.c (build_up_reference): Adjust call to get_temp_name.
15442         * decl.c (expand_static_init): Use get_guard and friends to
15443         implement guard variables.
15444         * decl2.c (get_temp_name): Assume that the variables created are
15445         always static.
15446         (get_sentry): Rename to ...
15447         (get_guard): ... this.  Implement new ABI guard variables.
15448         (get_guard_bits): New function.
15449         (get_guard_cond): Likewise.
15450         (set_guard): Likewise.
15451         (start_static_initialization_or_destruction): Use them.
15452         (do_static_initialization): Replace sentry with guard throughout.
15453         (do_static_destruction): Likewise.
15454         * init.c (create_temporary_var): Add comment.
15455
15456 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
15457
15458         * mangle.c (find_substitution): Use same_type_p.
15459         (write_encoding): Don't check for substitutions.
15460
15461 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
15462
15463         * parse.y (expr_no_comma_rangle): New non-terminal.
15464         (template_parm): Use it for default parameter case.
15465         (template_arg): Use it.
15466         (expr_no_commas): Remove commented out undefined extensions.
15467         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
15468         * parse.h, parse.c: Rebuilt.
15469
15470 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
15471
15472         * cp-tree.h (flag_const_strings): Remove.
15473         (warn_parentheses): Likewise.
15474         (warn_format): Likewise.
15475         (common_type): Likewise.
15476         (default_conversion): Likewise.
15477         (build_binary_op): Likewise.
15478         (cp_build_binary_op): New macro.
15479         * call.c (build_new_op): Use cp_build_binary_op instead of
15480         build_binary_op.
15481         * class.c (build_vtable_entry_ref): Likewise.
15482         * decl.c (expand_static_init): Likewise.
15483         (compute_array_index_type): Likewise.
15484         (build_enumerator): Likewise.
15485         * decl2.c (delete_sanity): Likewise.
15486         (start_static_initialization_or_destruction): Likewise.
15487         * error.c (dump_type_suffix): Likewise.
15488         * init.c (resolve_offset_ref): Likewise.
15489         (build_new): Likewise.
15490         (build_new_1): Likewise.
15491         (build_vec_delete_1): Likewise.
15492         (build_vec_init): Likewise.
15493         (build_delete): Likewise.
15494         * rtti.c (synthesize_tinfo_fn): Likewise.
15495         (synthesize_tinfo_var): Likewise.
15496         * search.c (expand_upcast_fixups): Likewise.
15497         (fixup_all_virtual_upcast_offsets): Likewise.
15498         * typeck.c (build_array_ref): Likewise.
15499         (get_member_function_from_ptrfunc): Likewise.
15500         (build_binary_op): Add parameter.
15501         (pointer_int_sum): Use cp_build_binary_op.
15502         (pointer_diff): Likewise.
15503         (build_modify_expr): Likewise.
15504         (get_delta_difference): Likewise.
15505         (build_ptrmemfunc): Likewise.
15506
15507 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
15508
15509         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
15510         * decl.c (create_implicit_typedef): Adjust.
15511         * decl2.c (build_artificial_parm): Adjust.
15512         * method.c (implicitly_declare_fn): Adjust.
15513         * pt.c (push_inline_template_parms_recursive): Adjust.
15514         (process_template_parm): Adjust.
15515         (overloaded_template_name): Adjust.
15516         * semantics.c (finish_template_template_parm): Adjust.
15517
15518 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
15519
15520         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
15521         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
15522         where to emit thunks.
15523         (build_vtt): Adjust call to build_vtt_inits.
15524         (build_vtt_inits): Add parameter to indicate whether or not
15525         sub-VTTs for virtual bases should be included.  Adjust handling of
15526         construction vtables.
15527         (get_matching_base): New function.
15528         (dfs_build_vtt_inits): Rename to ...
15529         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
15530         construction vtables.
15531         (dfs_fixup_binfo_vtbls): Likewise.
15532         (build_ctor_vtbl_groups): Build construction vtables for virtual
15533         bases, too.
15534         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
15535         to build construction vtbls.
15536         (dfs_accumulate_vtbl_inits): Adjust handling of
15537         construction vtables.
15538
15539         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
15540         types correctly.
15541
15542 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
15543
15544         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
15545
15546 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
15547
15548         * search.c (hides): Remove.
15549         (is_subobject_of_p): Add most_derived parameter. Use
15550         CANONICAL_BINFO.
15551         (lookup_field_queue_p): Adjust.
15552         (lookup_field_r): Adjust.
15553
15554 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
15555
15556         * decl2.c (handle_class_head): Bash typedefs to the type's main
15557         decl.
15558
15559 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
15560
15561         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
15562         (begin_global_stmt_expr): ... this.
15563         (genrtl_finish_stmt_expr): Rename to ...
15564         (finish_global_stmt_expr): ... this.
15565         * init.c (begin_init_stmts): Adjust calls.
15566         (finish_init_stmts): Likewise.
15567         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
15568         (begin_global_stmt_expr): ... this.
15569         (genrtl_finish_stmt_expr): Rename to ...
15570         (finish_global_stmt_expr): ... this.
15571
15572 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15573
15574         * search.c (lookup_member): Fix typo in comment.
15575
15576 2000-06-24  Jason Merrill  <jason@redhat.com>
15577
15578         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
15579         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
15580
15581 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15582
15583         * parse.y (complex_direct_notype_declarator): Support global_scope.
15584         * Makefile.in: Adjust conflict count.
15585
15586 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15587
15588         * parse.y (template_arg): Convert TEMPLATE_DECL
15589         that is a template template parameter to
15590         TEMPLATE_TEMPLATE_PARM here.
15591
15592         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15593         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
15594         (copy_template_template_parm): Adjust prototype.
15595         * decl.c (grokdeclarator): Remove dead code.
15596         * pt.c (process_template_parm): Tidy.
15597         (lookup_template_class): Construct nodes in
15598         copy_template_template_parm.
15599         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
15600         lookup_template_class.  Use TYPE_TI_TEMPLATE.
15601         * tree.c (copy_template_template_parm): Add NEWARGS
15602         parameter.
15603         (mapcar): Adjust call to copy_template_template_parm.
15604         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
15605         * method.c (build_template_template_parm_names): Change error
15606         code to avoid compilation warning.
15607
15608         * gxxint.texi: Document template template parameter
15609         name mangling.
15610
15611 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
15612
15613         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
15614         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
15615         (cp-demangle.o): New rule.
15616         (dyn-string.o): Likewise.
15617         * inc/cxxabi.h (__cxa_demangle): New declaration.
15618
15619 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
15620
15621         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
15622         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
15623         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
15624         a tree, not an int.
15625         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
15626         (make_thunk): Change prototype.
15627         (emit_thunk): Rename to use_thunk.
15628         (mangle_thunk): Change prototype.
15629         * class.c (get_derived_offset): Simplify.
15630         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
15631         BV_GENERATE_THUNK_WITH_VTABLE_P.
15632         (build_primary_vtable): Simplify.
15633         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
15634         (dfs_find_base): Remove.
15635         (update_vtable_entry_for_fn): Correct bug in finding the base
15636         where a virtual function was first declared.  Figure out whether
15637         or not to emit a vcall-thunk with the vtables in which it appears.
15638         Correct logic for deciding whether to use an ordinary thunk, or a
15639         vcall thunk.
15640         (finish_struct_1): Remove unnecssary code.
15641         (build_vtbl_initializer): Use ssize_int for the running counter of
15642         negative indices.
15643         (build_vtbl_initializer): Only use vcall thunks where necessary.
15644         Mark thunks as needing to be emitted with their vtables, or not.
15645         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
15646         indices.  Use size_binop.
15647         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
15648         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
15649         size_binop.
15650         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
15651         (build_vtable_entry): Mark thunks as needing to be emitted with
15652         their vtables, or not.
15653         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
15654         * decl2.c (mark_vtable_entries): Use use_thunk instead of
15655         emit_thunk.
15656         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
15657         information.
15658         * error.c (dump_expr): Use BV_FN.
15659         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
15660         not an int.
15661         * method.c (make_thunk): Likewise.
15662         (emit_thunk): Rename to use_thunk.  Allow callers to decide
15663         whether or not to actually emit the thunk.  Adjust for changes in
15664         representation of vcall offsets.
15665         * search.c (dfs_get_pure_virtuals): Use BV_FN.
15666         * semantics.c (emit_associated_thunks): New function.
15667         (expand_body): Use it.
15668         * ir.texi: Adjust decriptions of thunks.
15669
15670 2000-06-22  Jason Merrill  <jason@redhat.com>
15671
15672         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
15673         (tsubst_friend_function): Copy it here.
15674
15675         * decl.c (grok_op_properties): Fix typo.
15676
15677         * decl2.c (delete_sanity): Clarify warning, avoid failure on
15678         deleting void*.
15679
15680         * pt.c (check_explicit_specialization): Clarify error.
15681
15682         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
15683         an old OVERLOAD when we're declaring a non-function.
15684         (pushdecl, destroy_local_var): Check for error_mark_node.
15685         (warn_extern_redeclared_static): Also bail early if
15686         we're a CONST_DECL.
15687         (push_overloaded_decl): Ignore an old error_mark_node.
15688
15689 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
15690
15691         * call.c (build_x_va_arg): Check if in a template decl.
15692         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
15693
15694 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15695
15696         * class.c (push_lang_context): TYPE_NAME gets you to the Java
15697         types DECLs.
15698         * decl.c (check_goto): Computed gotos assumed OK.
15699
15700 2000-06-20  Jason Merrill  <jason@redhat.com>
15701
15702         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
15703         for which we don't need to look for instantiations.
15704
15705 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
15706
15707         * parse.y (program): Always call finish_translation_unit.
15708         * parse.c, parse.h: Rebuilt.
15709
15710 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
15711
15712         * method.c: Don't include hard-reg-set.h.
15713
15714 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
15715
15716         * rtti.c (get_base_offset): Cope when vbase field is in a base.
15717
15718 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
15719
15720         * call.c (build_conditional_expr): Use VOID_TYPE_P.
15721         * cvt.c (cp_convert_to_pointer): Likewise.
15722         (convert_to_void): Likewise.
15723         * error.c (dump_expr): Likewise.
15724         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
15725         * init.c (build_delete): Likewise.
15726         * method.c (emit_thunk): Likewise.
15727         * optmize.c (declare_return_variable): Likewise.
15728         * rtti.c (get_tinfo_decl_dynamic): Likewise.
15729         (get_typeid): Likewise.
15730         (build_dynamic_cast_1): Likewise.
15731         * typeck.c (composite_pointer_type): Likewise.
15732         (common_type): Likewise.
15733         (build_indirect_ref): Likewise.
15734         (build_binary_op): Likewise.
15735         (build_x_compound_expr): Likewise.
15736         (check_return_expr): Likewise.
15737         * typeck2.c (add_exception_specifier): Likewise.
15738
15739         * mangle.c (write_method_parms): Use direct comparison for end
15740         of parmlist.
15741
15742 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
15743
15744         * cp-tree.h (genrtl_try_block): Declare function.
15745         (genrtl_handler): Likewise.
15746         (genrtl_catch_block): Likewise.
15747         (genrtl_ctor_stmt): Likewise.
15748         (genrtl_subobject): Likewise.
15749         (genrtl_decl_cleanup): Likewise.
15750         (genrtl_do_poplevel): Likewise.
15751         (genrtl_do_pushlevel): Likewise.
15752         (genrtl_clear_out_block): Likewise.
15753         (genrtl_goto_stmt): Likewise.
15754         (genrtl_expr_stmt): Likewise.
15755         (genrtl_decl_stmt): Likewise.
15756         (genrtl_if_stmt): Likewise.
15757         (genrtl_while_stmt): Likewise.
15758         (genrtl_do_stmt): Likewise.
15759         (genrtl_return_stmt): Likewise.
15760         (genrtl_for_stmt): Likewise.
15761         (genrtl_break_stmt): Likewise.
15762         (genrtl_continue_stmt): Likewise.
15763         (genrtl_scope_stmt): Likewise.
15764         (genrtl_switch_stmt): Likewise.
15765         (genrtl_case_label): Likewise.
15766         (genrtl_begin_compound_stmt): Likewise.
15767         (genrtl_finish_compound_stmt): Likewise.
15768         (genrtl_compound_stmt): Likewise.
15769         (genrtl_asm_stmt): Likewise.
15770         (genrtl_named_return_value): Likewise.
15771         (genrtl_begin_stmt_expr): Likewise.
15772         (genrtl_finish_stmt_expr): Likewise.
15773         (finish_for_stmt): Removed first argument.
15774         (finish_switch_stmt): Likewise.
15775
15776         * semantics.c (genrtl_try_block): Define function.
15777         (genrtl_handler): Likewise.
15778         (genrtl_catch_block): Likewise.
15779         (genrtl_ctor_stmt): Likewise.
15780         (genrtl_subobject): Likewise.
15781         (genrtl_decl_cleanup): Likewise.
15782         (genrtl_do_poplevel): Likewise.
15783         (genrtl_do_pushlevel): Likewise.
15784         (genrtl_clear_out_block): Likewise.
15785         (genrtl_goto_stmt): Likewise.
15786         (genrtl_expr_stmt): Likewise.
15787         (genrtl_decl_stmt): Likewise.
15788         (genrtl_if_stmt): Likewise.
15789         (genrtl_while_stmt): Likewise.
15790         (genrtl_do_stmt): Likewise.
15791         (genrtl_return_stmt): Likewise.
15792         (genrtl_for_stmt): Likewise.
15793         (genrtl_break_stmt): Likewise.
15794         (genrtl_continue_stmt): Likewise.
15795         (genrtl_scope_stmt): Likewise.
15796         (genrtl_switch_stmt): Likewise.
15797         (genrtl_case_label): Likewise.
15798         (genrtl_begin_compound_stmt): Likewise.
15799         (genrtl_finish_compound_stmt): Likewise.
15800         (genrtl_compound_stmt): Likewise.
15801         (genrtl_asm_stmt): Likewise.
15802         (genrtl_named_return_value): Likewise.
15803         (genrtl_begin_stmt_expr): Likewise.
15804         (genrtl_finish_stmt_expr): Likewise.
15805         (finish_for_stmt): Removed first argument and generate rtl
15806         specific code.
15807         (finish_switch_stmt): Likewise.
15808         (do_poplevel): Removed generate rtl specific code.
15809         (do_pushlevel): Likewise.
15810         (add_tree): Likewise.
15811         (finish_goto_stmt): Likewise.
15812         (finish_expr_stmt): Likewise.
15813         (begin_if_stmt): Likewise.
15814         (finish_if_stmt_cond): Likewise.
15815         (finish_then_clause): Likewise.
15816         (begin_else_clause): Likewise.
15817         (finish_else_clause): Likewise.
15818         (finish_if_stmt): Likewise.
15819         (clear_out_block): Likewise.
15820         (begin_while_stmt): Likewise.
15821         (finish_while_stmt_cond): Likewise.
15822         (finish_while_stmt): Likewise.
15823         (begin_do_stmt): Likewise.
15824         (finish_do_body): Likewise.
15825         (finish_do_stmt): Likewise.
15826         (finish_return_stmt): Likewise.
15827         (begin_for_stmt): Likewise.
15828         (finish_for_init_stmt): Likewise.
15829         (finish_for_cond): Likewise.
15830         (finish_for_expr): Likewise.
15831         (finish_break_stmt): Likewise.
15832         (finish_continue_stmt): Likewise.
15833         (begin_switch_stmt): Likewise.
15834         (finish_switch_cond): Likewise.
15835         (finish_case_label): Likewise.
15836         (begin_try_block): Likewise.
15837         (begin_function_try_block): Likewise.
15838         (finish_try_block): Likewise.
15839         (finish_cleanup_try_block): Likewise.
15840         (finish_cleanup): Likewise.
15841         (finish_function_try_block): Likewise.
15842         (finish_handler_sequence): Likewise.
15843         (finish_function_handler_sequence): Likewise.
15844         (begin_handler): Likewise.
15845         (finish_handler_parms): Likewise.
15846         (begin_catch_block): Likewise.
15847         (finish_handler): Likewise.
15848         (begin_compound_stmt): Likewise.
15849         (finish_compound_stmt): Likewise.
15850         (finish_asm_stmt): Likewise.
15851         (finish_label_stmt): Likewise.
15852         (finish_label_decl): Likewise.
15853         (finish_subobject): Likewise.
15854         (finish_decl_cleanup): Likewise.
15855         (finish_named_return_value): Likewise.
15856         (begin_stmt_expr): Likewise.
15857         (finish_stmt_expr): Likewise.
15858
15859         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
15860         to call genrtl_expr_stmt when appropriate.
15861
15862         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
15863         begin_compound_expr to call genrtl_begin_stmt_expr and
15864         genrtl_begin_compound_expr when appropriate.
15865         (finish_init_stmts): Changed calls to finish_compound_expr and
15866         finish_stmt_expr to call genrtl_finish_compound_expr and
15867         genrtl_finish_stmt_expr when appropriate.
15868         (expand_default_init): Changed call to finish_expr_stmt to call
15869         genrtl_expr_stmt when appropriate.
15870         (build_vec_init): Likewise.
15871
15872         * parse.y (simple_stmt): Removed first argument from call to
15873         finish_for_stmt. Removed first argument from call to
15874         finish_switch_stmt.
15875
15876         * parse.c: Regenerated.
15877
15878         * pt.c (tsubst_expr): Removed first argument from call to
15879         finish_for_stmt. Removed first argument from call to
15880         finish_switch_stmt.
15881
15882 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
15883
15884         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
15885         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
15886
15887         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
15888         (cplus_tree_code_length[]): Likewise.
15889         (cplus_tree_code_name[]): Likewise.
15890         (init_parse): Added call to add_c_tree_codes. Changed
15891         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
15892
15893 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
15894
15895         * cp-tree.h (finish_mem_initializers): Declare.
15896         (count_trees): Likewise.
15897         * parse.y (base_init): Use finish_mem_initializers.
15898         * semantics.c (finish_mem_initializers): New function.
15899
15900         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
15901         the number of trees.
15902         (n_trees): Remove.
15903         (count_trees): Don't use it.
15904
15905 2000-06-15  Jason Merrill  <jason@redhat.com>
15906
15907         * tree.c (count_trees): New debugging function.
15908
15909         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
15910         * init.c (build_member_call): Pull out the name of a DECL.
15911
15912         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
15913         * semantics.c (expand_body): Push to TV_INTEGRATION here.
15914         * optimize.c (optimize_function): Not here.
15915         * pt.c (instantiate_decl): Push to TV_PARSE.
15916
15917 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
15918
15919         * cp-tree.h (struct language_function): Remove x_base_init_list
15920         and x_member_init_list.
15921         (current_base_init_list): Remove.
15922         (current_member_init_list): Likewise.
15923         (setup_vtbl_ptr): Change prototype.
15924         (emit_base_init): Likewise.
15925         (expand_member_init): Likewise.
15926         (reinit_parse_for_function): Remove.
15927         * decl.c (save_function_data): Don't clear x_base_init_list and
15928         x_member_init_list.
15929         (mark_language_function): Don't mark them.
15930         * init.c (perform_member_init): Tweak comment.
15931         (sort_member_init): Take the list of initializers as an argument.
15932         (sort_base_init): Likewise.
15933         (emit_base_init): Likewise.
15934         (expand_member_init): Return the initializer.  Don't use global
15935         variables.
15936         * lex.c (reinit_parse_for_function): Remove.
15937         * method.c (build_template_parm_names): Correct substitution.
15938         (do_build_copy_constructor): Don't use current_member_init_list
15939         and current_base_init_list.
15940         (synthesize_method): Likewise.
15941         * parse.y (base_init): Split mem-initializers into
15942         base-initializers and field-initializers.
15943         (member_init_list): Build up the list here.
15944         (member_init): Return the initializer.
15945         (fn.depfn): Don't use reinit_parse_for_function.
15946         * parse.c: Regenerated.
15947         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
15948         ERROR_MARK.
15949         (tsubst_expr): Don't use current_member_init_list
15950         and current_base_init_list.
15951         (tsubst_expr_values): Rename to ...
15952         (tsubst_initializer_list): ... this.  Use convert_from_reference.
15953         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
15954         and current_base_init_list.
15955         (begin_function_definition): Don't call reinit_parse_for_function.
15956
15957         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
15958
15959         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
15960         correctly.
15961
15962         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
15963
15964 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
15965
15966         * cp-tree.h (IF_COND): Move to c-common.h.
15967         (THEN_CLAUSE): Likewise.
15968         (ELSE_CLAUSE): Likewise.
15969         (WHILE_COND): Likewise.
15970         (WHILE_BODY): Likewise.
15971         (DO_COND): Likewise.
15972         (DO_BODY): Likewise.
15973         (RETURN_EXPR): Likewise.
15974         (EXPR_STMT_EXPR): Likewise.
15975         (FOR_INIT_STMT): Likewise.
15976         (FOR_COND): Likewise.
15977         (FOR_EXPR): Likewise.
15978         (FOR_BODY): Likewise.
15979         (SWITCH_COND): Likewise.
15980         (SWITCH_BODY): Likewise.
15981         (CASE_LOW): Likewise.
15982         (CASE_HIGH): Likewise.
15983         (GOTO_DESTINATION): Likewise.
15984         (COMPOUND_BODY): Likewise.
15985         (ASM_CV_QUAL): Likewise.
15986         (ASM_STRING): Likewise.
15987         (ASM_OUTPUTS): Likewise.
15988         (ASM_INPUTS): Likewise.
15989         (ASM_CLOBBERS): Likewise.
15990         (DECL_STMT_DECL): Likewise.
15991         (STMT_EXPR_STMT): Likewise.
15992         (LABEL_STMT_LABEL): Likewise.
15993         (SCOPE_BEGIN_P): Likewise.
15994         (SCOPE_END_P): Likewise.
15995         (SCOPE_STMT_BLOCK): Likewise.
15996         (SCOPE_NULLIFIED_P): Likewise.
15997         (SCOPE_NO_CLEANUPS_P): Likewise.
15998         (SCOPE_PARTIAL_P): Likewise.
15999         (ASM_VOLATILE_P): Likewise.
16000         (STMT_LINENO): Likewise.
16001         (STMT_LINENO_FOR_FN_P): Likewise.
16002
16003         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
16004         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
16005         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
16006         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
16007         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
16008
16009         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
16010
16011         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
16012         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
16013
16014         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
16015         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
16016         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
16017
16018 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
16019
16020         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
16021         * class.c (dfs_find_final_overrider): Set it appropriately.
16022         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
16023         avoid unneeded secondary vptrs.
16024
16025 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
16026
16027         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
16028         (check_bitfield_decl, check_field_decl): Likewise.
16029         (build_vtbl_or_vbase_field, build_base_field): Likewise.
16030         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
16031         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
16032         (xfer_tag, finish_enum): Likewise.
16033         * decl2.c (finish_builtin_type): Likewise.
16034         * init.c (init_init_processing): Likewise.
16035         * pt.c (instantiate_class_template): Likewise.
16036         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
16037         * cp-tree.h (struct lang_type): Add user_align member.
16038         (CLASSTYPE_USER_ALIGN): Define.
16039
16040 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
16041
16042         * Make-lang.in (c++.install-common): Install g++-cross in
16043         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
16044         $(target_alias)-g++ and $(target_alias)-c++.
16045
16046 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
16047
16048         * class.c (vcall_offset_data_s): Add last_init and fns.
16049         (overrides): Rename to same_signature_p.
16050         (dfs_find_final_overrider): Adjust accordingly.
16051         (mark_overriders): Likewise.
16052         (warn_hidden): Likewise.
16053         (build_vtbl_initializer): Reorganize machinery for building things
16054         at negative offsets.
16055         (build_vcall_and_vbase_vtbl_entries): Likewise.
16056         (build_vbase_offset_vtbl_entries): Likewise.
16057         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
16058         offset entries.  Do not create two entries for functions with the
16059         same signature.
16060         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
16061         (build_rtti_vtbl_entries): Reorganize machinery for building things
16062         at negative offsets.
16063
16064         * optimize.c (expand_call_inline): Don't recurse into the code
16065         used to initialize the parameters more than once.
16066
16067 2000-06-11  Mark Mitchell <mark@codesourcery.com>
16068
16069         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
16070         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
16071         (find_substitution): Only use the `Sa' substitution for
16072         std::allocator, not instantiations of it.
16073         (write_template_prefix): Move comment.  Only use a TREE_LIST to
16074         represent substitutions for a member template.
16075         (write_array_type): Mangle array dimensions correctly.
16076         * optimize.c (maybe_clone_body): Copy more information from the
16077         cloned function.
16078         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
16079         on the regenerated declaration.
16080
16081 2000-06-11  Chip Salzenberg  <chip@valinux.com>
16082             Mark Mitchell <mark@codesourcery.com>
16083
16084         * class.c (build_vtable): Clarify comment.
16085         (build_ctor_vtbl_group): Pass the most derived type to
16086         build_vtable.
16087
16088 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16089
16090         * decl2.c (compare_options): Don't needlessly cast away const-ness.
16091
16092 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
16093
16094         * decl.c (add_binding): Handle duplicate declarations of external
16095         variables.
16096
16097 2000-06-09  Chip Salzenberg  <chip@valinux.com>
16098             Mark Mitchell <mark@codesourcery.com>
16099
16100         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
16101         argument.
16102         (write_signed_number): New macro.
16103         (write_unsigned_number): Likewise.
16104         (write_source_name): Use them.
16105         (write_number): Handle signed and unsigned values.
16106         (write_integer_cst): Use tree_int_cst_sgn, and use
16107         write_unsigned_number or write_signed_number as appropriate.
16108         (write_discriminator): Use write_unsigned_number or
16109         write_signed_number as appropriate.
16110         (write_template_arg_literal): Likewise.
16111         (write_array_type): Use tree_low_cst.
16112         (write_template_parm):  Use write_unsigned_number or
16113         write_signed_number as appropriate.
16114         (write_substitution): Adjust call to write_number.
16115         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
16116         (write_expression): Handle non-type template arguments of
16117         reference type correctly.
16118         (mangle_thunk): Use write_signed_number.
16119
16120 2000-06-09  Chip Salzenberg  <chip@valinux.com>
16121
16122         * mangle.c (find_substition): Don't mangle objects with typename
16123         substitutions (e.g. "cin" as "Si").
16124
16125 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
16126
16127         * call.c (add_candidate): Use ggc_alloc_cleared.
16128         * decl.c (lookup_label): Likewise.
16129         * lex.c (retrofit_lang_decl): Likewise.
16130
16131 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
16132
16133         * semantics.c (expand_body): Push to TV_EXPAND.
16134         * optimize.c (optimize_function): Push to TV_INTEGRATION.
16135         * decl.c (start_function): Always call announce_function.
16136
16137         * tinfo2.cc: Just declare abort.
16138
16139 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
16140
16141         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
16142         whenever @ is a symbolic name.
16143
16144 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
16145
16146         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
16147
16148 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
16149
16150         * decl.c (pushdecl): Look up functions by DECL_NAME, not
16151         DECL_ASSEMBLER_NAME.
16152
16153 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
16154
16155         * decl2.c (c_language): Define.
16156
16157 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
16158
16159         * lex.c (lang_init_options): Tweak.
16160
16161         * decl2.c: Remove #inclusion of diagnostic.h
16162         (lang_decode_option): Move diagnostic formatting options to
16163         toplevel.
16164
16165         * lang-options.h: Remove documentation for diagnostic options.
16166
16167         * Makefile.in (lex.o): Depends upon diagnostic.h
16168
16169 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
16170
16171         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
16172         the same DECL_RESULT, it's not a redefinition.
16173         * pt.c (tsubst_decl): Remove code to handle illegal
16174         specializations.
16175
16176 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
16177
16178         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
16179
16180 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
16181
16182         * search.c (maybe_suppress_debug_info): Don't check
16183         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
16184
16185         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
16186         here if extern_p.
16187
16188         Remember instantiation context in deferred instantiations.
16189         * cp-tree.h (struct tinst_level): Remove.
16190         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
16191         * pt.c (current_tinst_level): Now a tree.
16192         (print_template_context, push_tinst_level, pop_tinst_level,
16193         tinst_for_decl): Adjust.
16194         (reopen_tinst_level): New fn.
16195         (init_pt): Register current_tinst_level as a root.
16196         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
16197         of the pending templates list.
16198         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
16199         * lex.c (extract_interface_info): Adjust.
16200         * decl2.c (warn_if_unknown_interface): Adjust.
16201
16202 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
16203
16204         * class.c (indirect_primary_base_p): New function.
16205         (determine_primary_base): Use it.
16206
16207 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
16208
16209         Update new-abi dynamic cast algorithm.
16210         * tinfo.cc (__class_type_info::__dyncast_result): Add
16211         whole_details. Adjust constructor.
16212         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
16213         Avoid unnecessary searching.
16214         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
16215
16216 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16217
16218         * decl.c (init_decl_processing): Don't call record_component_aliases.
16219         * tree.c (build_cplus_array_type_1): Likewise.
16220
16221 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
16222
16223         * ir.texi: Correct typo.
16224         * mangle.c (write_expression): Handle non-type template arguments
16225         with reference type.
16226         * method.c (build_overload_value): Likewise.
16227         * pt.c (convert_nontype_argument): Explicitly represent conversion
16228         to a reference with an ADDR_EXPR.
16229         (unify): Always unify arguments in left-to-right order.
16230
16231 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
16232             Mark Mitchell  <mark@codesourcery.com>
16233
16234         * Make-lang.in (CXX_SRCS): Add mangle.c.
16235         * Makefile.in (CXX_OBJS): Add mangle.o.
16236         (mangle.o): New rule.
16237
16238         * class.c (local_classes): New variable.
16239         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
16240         (get_vtt_name): Use mangle_vtt_name for new ABI.
16241         (init_class_processing): Initialize local_classes.
16242         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
16243         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
16244         (std_identifier): New macro.
16245         (DECL_VOLATILE_MEMFUNC_P): New macro.
16246         (DECL_NAMESPACE_STD_P): Likewise.
16247         (local_classes): Declare.
16248         (get_mostly_instantiated_function_type): Declare.
16249         (init_mangle): Declare.
16250         (mangle_decl): Likewise.
16251         (mangle_type_string): Likewise.
16252         (mangle_type): Likewise.
16253         (mangle_typeinfo_for_type): Likewise.
16254         (mangle_typeinfo_string_for_type): Likewise.
16255         (mangle_vtbl_for_type): Likewise.
16256         (mangle_vtt_for_type): Likewise.
16257         (mangle_ctor_vtbl_for_type): Likewise.
16258         (mangle_thunk): Likewise.
16259         (mangle_conv_op_name_for_type): Likewise.
16260         (mangle_guard_variable): Likewise.
16261         * decl.c (pushtag): Keep track of local classes.
16262         (initialize_predefined_identifiers): Initialize std_identifier.
16263         (init_decl_processing): Use std_identifier.
16264         (start_decl): Don't treat instantiations as specializations.
16265         (grokdeclarator): Likewise.
16266         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
16267         name for fully-instantiated templates.
16268         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
16269         destructors with the new ABI.
16270         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
16271         (grokfield): Use mangle_type for new ABI.
16272         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
16273         (get_sentry): Use mangle_guard_variable for new ABI.
16274         (start_static_initialization_or_destruction): Likewise.
16275         * expr.c (extract_aggr_init): Remove.
16276         (extract_scalar_init): Likewise.
16277         (extract_init): Remove #if 0'd code.
16278         * mangle.c: New function.
16279         * method.c (build_mangled_name): Assert not flag_new_abi.
16280         (build_static_name): Likewise.
16281         (build_decl_overload_real): Likewise.
16282         (build_typename_overload): Likewise.
16283         (build_overload_with_type): Likewise.
16284         (build_overload_name): Likewise.
16285         (get_ctor_vtbl_name): Likewise.
16286         (start_squangling): Likewise.
16287         (get_id_2): Likewise.
16288         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
16289         (init_method): Call init_mangle for new ABI.
16290         (make_thunk): Call mangle_thunk for new ABI.
16291         * operators.def: Correct new ABI manglings for the `%' operator.
16292         Add `::' operator.
16293         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
16294         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
16295         (lookup_template_class): Call mangle_decl for new ABI.
16296         (get_mostly_instantiated_function_type): New function.
16297         (set_mangled_name_for_template_decl): Use it.
16298         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
16299         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
16300         conversion op names.
16301         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
16302         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
16303         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
16304         mangle_typeinfo_string_for_type.
16305
16306 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
16307
16308         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
16309         (INNERMOST_TEMPLATE_ARGS): New macro.
16310         (innermost_args): Remove.
16311         (get_innermost_template_args): New function.
16312         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
16313         * error.c (dump_function_decl): Be caution when using
16314         most_general_template.
16315         * method.c (build_template_parm_names):  Use
16316         INNERMOST_TEMPLATE_ARGS.
16317         * pt.c (add_to_template_args): Tidy comment
16318         (get_innermost_template_args): New function.
16319         (check_explicit_specialization): Clear DECL_INITIAL for a new
16320         specialization.
16321         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
16322         Tidy.
16323         (push_template_decl): Always register specializations of the most
16324         general template.
16325         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
16326         (coerce_template_parms): Likewise.
16327         (lookup_template_class): Likewise.
16328         (innermost_args): Remove.
16329         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
16330         (tsubst_decl): Handle tricky specializations.  Use
16331         get_innermost_template_args.
16332         (instantiate_template): Simplify handling of partial
16333         instantiations.
16334         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
16335         (most_general_template): Reimplement, in a more straightforward
16336         manner.
16337         (regenerate_decl_from_template): Tweak formatting.  Use
16338         TMPL_ARGS_DEPTH for clarity.
16339         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
16340
16341         * dump.c (dequeue_and_dump): Dump information about thunks.
16342
16343 2000-06-01  Richard Henderson  <rth@cygnus.com>
16344
16345         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
16346
16347 2000-06-01  Richard Henderson  <rth@cygnus.com>
16348
16349         * decl2.c (unsupported_options): Fix typo, make const.
16350         (lang_decode_option): Fix bsearch argument order.
16351
16352 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
16353
16354         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
16355         on FIELD_DECLs.
16356
16357 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16358
16359         * cp-tree.h (c_get_alias_set): Deleted.
16360         * Makefile.in (decl.o): Include ../expr.h.
16361         * decl.c (expr.h): Include.
16362         (init_decl_processing): Call record_component_aliases for arrays.
16363         (grokdeclarator): Likewise.
16364         Set TREE_ADDRESSABLE for fields that aren't bitfields.
16365         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
16366
16367 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
16368
16369         Remove guiding declaration support.
16370         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
16371         (flag_guiding_decls): Remove.
16372         * call.c (build_user_type_conversion_1): Remove support for
16373         guiding decls.
16374         (build_new_function_call): Likewise.
16375         (build_new_op): Likewise.
16376         (build_new_method_call): Likewise.
16377         * decl.c (start_function): Likewise.
16378         * friend.c (is_friend): Likewise.
16379         (do_friend): Likewise.
16380         * decl2.c ((flag_dump_translation_unit): Make it const.
16381         (flag_guiding_decls): Remove.
16382         (unsupported_options): New variable
16383         (compare_options): New function.
16384         (lang_decode_option): Use them.
16385
16386         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
16387
16388         * method.c (mangle_expression): Adjust test for legal expression
16389         operators.
16390
16391         * pt.c (instantiate_decl): Save and restore the local
16392         specializations list.
16393
16394 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
16395
16396         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
16397
16398 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
16399
16400         * call.c (add_template_candidate_real): Handle member template
16401         constructors for classes with virtual bases.
16402         (build_user_type_conversion_1): Use in_charge_arg_for_name.
16403         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
16404
16405         * ir.texi: Update thunk documentation.
16406
16407         * call.c (joust): Fix handling of overloaded builtin operators.
16408
16409 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
16410
16411         * cp-tree.h (DECL_ANTICIPATED): New macro.
16412         Document new use of DECL_LANG_FLAG_7.
16413         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
16414         in the user namespace.
16415         * lex.c (do_identifier): If the identifier's declaration has
16416         DECL_ANTICIPATED on, it has not yet been declared.  But do not
16417         replace it with an ordinary implicit declaration.
16418
16419         * tinfo2.cc: Include stdlib.h.
16420
16421 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
16422
16423         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
16424         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
16425         CLASSTYPE_ALIGN.
16426
16427 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
16428
16429         * decl2.c (lang_decode_option): Use skip_leading_substring instead
16430         of plain strncmp.
16431
16432 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
16433
16434         * operators.def (<?): Duplicated, should have been...
16435         (>?): this.  Fixed.
16436
16437 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
16438             Mark Mitchell  <mark@codesourcery.com>
16439
16440         * cp-tree.h (ansi_opname): Make it a macro.
16441         (ansi_assopname): Likewise.
16442         (struct lang_decl_flags): Add assignment_operator_p.
16443         (struct lang_decl): Add operator_code.
16444         (DECL_VTT_PARM): Adjust.
16445         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
16446         overloaded operator.
16447         (SET_OVERLOADED_OPERATOR_CODE): New macro.
16448         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
16449         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
16450         (opname_tab): Remove.
16451         (assignop_tab): Likewise.
16452         (operator_name_info_t): New type.
16453         (operator_name_info): New variable.
16454         (assignment_operator_name_info): Likewise.
16455         (build_cp_library_fn): Remove declaration.
16456         (push_cp_library_fn): Likewise.
16457         (operator_name_string): Likewise.
16458         (build_decl_overload): Likewise.
16459         * call.c (print_z_candidates): Simplify.
16460         (build_object_call): Adjust usage of ansi_opname.  Use
16461         DECL_OVERLOADED_OPERATOR_P.
16462         (op_error): Adjust operator name lookup.
16463         (build_conditional_expr): Adjust usage of ansi_opname.
16464         (build_new_op): Likewise.
16465         (build_op_delete_call): Likewise.
16466         (build_over_call): Likewise.
16467         (joust): Use DECL_OVERLOADED_OPERATOR_P.
16468         * decl.c (duplicate_decls): Copy operator_code.
16469         (init_decl_processing): Adjust parameters to push_cp_library_fn.
16470         (builtin_function): Adjust parameters to build_library_fn_1.
16471         (build_library_fn_1): Accept an overloaded operator code.
16472         (build_library_fn): Pass ERROR_MARK.
16473         (build_cp_library_fn): Accept an overloaded operator code.
16474         (push_cp_library_fn): Likewise.
16475         (grokfndecl): Tweak.
16476         (grokdeclarator): Simplify code to compute names of overloaded
16477         operators.  Adjust use of ansi_opname.
16478         (ambi_op_p): Work on tree_codes, not identifiers.
16479         (unary_op_p): Likewise.
16480         (grok_op_properties): Likewise.
16481         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
16482         (lang_mark_tree): Don't try to mark the operator_code.
16483         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
16484         * error.c (dump_decl): Remove special handling for operator
16485         names.
16486         (dump_function_name): Likewise.
16487         (dump_expr): Adjust name lookup of operators.
16488         (op_to_string): Simplify.
16489         (assop_to_string): Likewise.
16490         * init.c (build_new_1): Adjust use of ansi_opname.
16491         * lex.c (opname_tab): Remove.
16492         (assignop_tab): Likewise.
16493         (ansi_opname): Likewise.
16494         (ansi_assopname): Likewise.
16495         (operator_name_string): Likewise.
16496         (reinit_lang_specific): Likewise.
16497         (operator_name_info): New variable.
16498         (assignment_operator_name_info): Likewise.
16499         (init_operators): New function.
16500         (init_parse): Use it.
16501         (do_identifier): Adjust use of ansi_opname.
16502         * method.c (mangle_expression): Don't use ansi_opname for
16503         mangling.
16504         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
16505         (build_decl_overload): Remove.
16506         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
16507         (do_build_assign_ref): Adjust use of ansi_opname.
16508         (synthesize_method): Likewise.
16509         (implicitly_declare_fn): Likewise.
16510         * operators.def: New file.
16511         * parse.y (operator): Adjust use of ansi_opname.
16512         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
16513         (set_mangled_name_for_template_decl): Don't play games with
16514         current_namespace.
16515         (special_function_p): Adjust use of ansi_opname.
16516         * typeck.c (check_return_expr): Likewise.
16517         * Make-lang.in (cc1plus): Depend on operators.def.
16518         * Makefile.in (lex.o): Likewise.
16519         (decl.o): Likewise.
16520
16521 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
16522
16523         * Make-lang.in (cplib2.ready): Eradicate.
16524
16525 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16526
16527         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
16528         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
16529         (built_min, cp_tree_equal): Likewise.
16530
16531 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
16532
16533         * class.c (layout_nonempty_base_or_field): Replace
16534         `record_layout_info' with `record_layout_info_s'.
16535
16536 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
16537
16538         Fix goto checking.
16539         * cp-tree.h (struct language_function): x_named_labels is now
16540         a struct named_label_list*.
16541         * decl.c (struct named_label_use_list): Renamed from...
16542         (struct named_label_list): ...this.  New struct.
16543         (push_binding_level): Don't set eh_region.
16544         (note_level_for_eh): New fn.
16545         (pop_label): Take label and old value directly.
16546         (pop_labels): Adjust for new named_labels format.
16547         (lookup_label): Likewise.
16548         (poplevel): Note characteristics of a binding level containing a
16549         named label.  Mess with named label lists earlier.
16550         (mark_named_label_lists): New fn.
16551         (mark_lang_function): Call it.
16552         (use_label): New fn, split out from...
16553         (make_label_decl): ...here.  Don't call it.
16554         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
16555         check_previous_gotos): New fns, split out from...
16556         (define_label): ...here.
16557         (check_switch_goto): New fn.
16558         (define_case_label): Call it.
16559         (check_goto): New fn.
16560         * semantics.c (finish_goto_stmt): Call it and use_label.
16561         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
16562         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
16563
16564 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
16565
16566         * class.c (build_vtable_entry_ref): Correct usage of
16567         get_vtbl_decl_for_binfo.
16568
16569         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
16570         * method.c (implicitly_declare_fn): Not here.
16571
16572 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
16573
16574         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
16575         (CPTI_PTMD_DESC_TYPE): ... here.
16576         (ptmd_desc_type_node): Rename to ...
16577         (ptm_desc_type_node): ... here.
16578         * decl.c: Likewise.
16579         * rtti.c (ptmd_initializer): Rename to ...
16580         (ptm_initializer): ... here.
16581         (sythesize_tinfo_var): Adjust. Deal with pointer to member
16582         function.
16583         (create_tinfo_types): Adjust.
16584
16585 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
16586
16587         Finish implementation of VTTs.
16588         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
16589         CPTI_VTT_PARM_IDENTIFIER.
16590         (vtt_parm_identifier): New macro.
16591         (vtt_parm_type): Likewise.
16592         (BINFO_SUBVTT_INDEX): Likewise.
16593         (BINFO_VPTR_INDEX): Likewise.
16594         (struct lang_decl): Add vtt_parm.
16595         (DECL_VTT_PARM): New macro.
16596         (DECL_USE_VTT_PARM): Likewise.
16597         (DECL_NEEDS_VTT_PARM_P): Likewise.
16598         (get_vtt_name): Declare.
16599         (build_artificial_parm): Likewise.
16600         (fixup_all_virtual_upcast_offsets): Likewise.
16601         (expand_indirect_vtbls_init): Remove.
16602         * call.c (build_new_method_call): Pass the vtt to subobject
16603         constructors and destructors.
16604         * class.c (get_vtt_name): Give it external linkage.
16605         (build_clone): Handle the magic VTT parameters for clones.
16606         (clone_function_decl): Fix typo in comment.
16607         (build_vtt): Keep track of the indices in the VTTs where various
16608         entities are stored.
16609         (build_vtt_inits): Likewise.
16610         (dfs_build_vtt_inits): Likewise.
16611         (build_ctor_vtbl_group): Tweak type of construction vtables.
16612         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
16613         primary bases, when building construction vtables.
16614         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
16615         (initialize_predefined_identifiers): Add vtt_parm_identifier.
16616         (init_decl_processing): Initialize vtt_parm_type.
16617         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
16618         (lang_mark_tree): Make vtt_parm.
16619         * decl2.c (build_artificial_parm): New function.
16620         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
16621         (grokclassfn): Use build_artificial_parm.
16622         * init.c (initialize_vtbl_ptrs): Call
16623         fixup_all_virtual_upcast_offsets directly.
16624         (perform_member_init): Use the complete subobject destructor for
16625         member cleanups.
16626         (build_vtbl_address): New function.
16627         (expand_virtual_init): Handle VTTs.
16628         * optimize (maybe_clone_body): Likewise.
16629         * search.c (fixup_all_virtual_upcast_offsets): Give it external
16630         linkage.
16631         (expand_indirect_vtbls_init): Remove.
16632         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
16633         * tree.c (make_binfo): Make them bigger.
16634
16635 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
16636
16637         * inc/cxxabi.h (__pbase_type_info): Define, based on
16638         __pointer_type_info.
16639         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
16640         (__pointer_to_member_type_info): Likewise.
16641         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
16642         (__pointer_to_member_type_info::__is_pointer_p): Remove.
16643         (__pointer_type_info::__do_catch): Rename to ...
16644         (__pbase_type_info::__do_catch): ... here. Adjust.
16645         (__pbase_type_info::__pointer_catch): Implement.
16646         (__pointer_type_info::__pointer_catch): Adjust.
16647         (__pointer_to_member_type_info::__pointer_catch): Adjust.
16648
16649 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
16650
16651         * tinfo.h (__user_type_info::contained_virtual_p): New
16652         predicate.
16653         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
16654         shaped hierarchy.
16655         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
16656         diamond shaped hierarchy. Add early out for mixed diamond and
16657         duplicate shaped hierarchy.
16658
16659 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
16660
16661         * cp-tree.h (build_delete): Change prototype.
16662         (build_vec_delete): Likewise.
16663         * call.c (build_scoped_method_call): Use special_function_kind
16664         values to indicate the kind of destruction to be done.
16665         (build_method_call): Likewise.
16666         * decl.c (finish_destructor_body): Likewise.
16667         (maybe_build_cleanup_1): Likewise.  Rename to ...
16668         (maybe_build_cleanup): ... this.
16669         * decl2.c (delete_sanity): Use special_function_kind
16670         values to indicate the kind of destruction to be done.
16671         (build_cleanup): Likewise.
16672         * init.c (perform_member_init): Likewise.
16673         (build_vec_delete_1): Likewise.
16674         (build_dtor_call): Simplify.
16675         (build_delete): Use special_function_kind
16676         values to indicate the kind of destruction to be done.
16677         (build_vbase_delete): Likewise.
16678         (build_vec_delete): Likewise.
16679
16680         * init.c (sort_member_init): Fix typo in error message generation
16681         code.
16682
16683 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
16684
16685         * semantics.c (begin_class_definition): make the packed
16686         attribute be sensitive to the "-fpack-struct" command line flag
16687
16688 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
16689
16690         Update new-abi upcast algorithm.
16691         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
16692         prototype and meaning of return value.
16693         (__si_class_type_info::__do_upcast): Likewise.
16694         (__vmi_class_type_info::__do_upcast): Likewise.
16695         * tinfo.cc (__class_type_info::__upcast_result): Replace
16696         whole2dst with part2dst. Adjust ctor.
16697         (__class_type_info::__do_upcast): Adjust call of worker function.
16698         (__class_type_info::__do_upcast): Adjust.
16699         (__si_class_type_info::__do_upcast): Adjust. Use parent's
16700         __do_upcast.
16701         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
16702         virtual base in diamond hierarchy bug.
16703
16704 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
16705
16706         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
16707         and bitfield to tinfo_fn_p.
16708         (DECL_TINFO_FN_P): Adjust.
16709         (SET_DECL_TINFO_FN_P): Likewise.
16710         (DECL_MUTABLE_P): Likewise.
16711         (DECL_C_BIT_FIELD): Likewise.
16712         (SET_DECL_C_BIT_FIELD): Likewise.
16713         (CLEAR_DECL_C_BIT_FIELD): Likewise.
16714         (DECL_UNINLINABLE): Likewise.
16715         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
16716         (handle_using_decl): Remove assertion.
16717         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
16718         to build FIELD_DECLs.
16719         (build_base_field): Likewise.
16720         (layout_class_type): Likewise.
16721         * decl.c (init_decl_processing): Likewise.
16722         (build_ptrmemfunc_type): Likewise.
16723         (grokdeclarator): Likewise.
16724         * decl2.c (grok_x_components): Likewise.
16725         * except.c (call_eh_info): Likewise.
16726         * init.c (init_init_processing): Likewise.
16727         * rtti.c (expand_class_desc): Likewise.
16728         (create_pseudo_type_info): Likewise.
16729         (get_vmi_pseudo_type_info): Likewise.
16730         (create_tinfo_types): Likewise.
16731         * ptree.c (print_lang_decl): Adjust.
16732         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
16733         before checking DECL_MUTABLE_P.
16734
16735         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
16736         parameters for template functions.
16737         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
16738         destructors as well as constructors.
16739
16740 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
16741
16742         * class.c (build_ctor_vtbl_group): Set inits.
16743         * optimize.c (maybe_clone_body): Set DECL_INLINE and
16744         DECL_THIS_INLINE appropriately for clones.
16745
16746         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
16747         (DECL_CONV_FN_P): Simplify.
16748         (DECL_OPERATOR): Remove.
16749         (language_to_string): Declare.
16750         * decl.c (duplicate_decls): Fix typo in comment.
16751         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
16752         (grok_op_properties): Use DECL_CONV_FN_P instead of
16753         IDENTIFIER_TYPENAME_P.
16754         * dump.c (dequeue_and_dump): Dump the language linkage of
16755         declarations.
16756         * error.c (language_to_string): Give it external linkage.
16757         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
16758         (implicitly_declare_fn): Set DECL_LANGUAGE.
16759         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
16760         IDENTIFIER_TYPENAME_P.
16761         (tsubst_decl): Likewise.
16762         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
16763         * semantics.c (finish_member_declaration): Don't mark members of
16764         classes declared in an extern "C" region as extern "C".
16765
16766 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16767
16768         * decl2.c (qualified_lookup_using_namespace): Look through
16769         namespace aliases.
16770
16771         * decl.c (push_using_decl): Return the old decl on namespace level.
16772
16773 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
16774
16775         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
16776         (VTT_NAME_PREFIX): New macro.
16777         (CTOR_VTBL_NAME_PREFIX): Likewise.
16778         (get_ctor_vtbl_name): New function.
16779         * class.c (get_vtable_name): Simplify.
16780         (get_vtt_name): New function.
16781         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
16782         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
16783         when a virtual base becomes primary.
16784         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
16785         VTTs.
16786         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
16787         additional parameters.
16788         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
16789         (initialize_array): New function.
16790         (build_vtt): Likewise.
16791         (build_vtt_inits): Likewise.
16792         (dfs_build_vtt_inits): Likewise.
16793         (dfs_fixup_binfo_vtbls): Likewise.
16794         (build_ctor_vtbl_group): Likewise.
16795         (initialize_vtable): Use initialize_array.
16796         (accumulate_vtbl_inits): Reimplement to handle construction
16797         vtables.
16798         (dfs_accumulate_vtbl_inits): Likewise.
16799         (bulid_vtbl_initializer): Adjust parameter name.
16800         * method.c (build_typename_overload): Remove #if 0'd code.
16801         (get_ctor_vtbl_name): New function.
16802         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
16803         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
16804
16805         * cp-tree.h (struct lang_type): Remove search_slot.
16806         (CLASSTYPE_SEARCH_SLOT): Remove.
16807         (emit_base_init): Change prototype.
16808         (initialize_vtbl_ptrs): Likewise.
16809         (expand_indirect_vtbls_init): Likewise.
16810         (clear_search_slots): Remove.
16811         * decl.c (lang_mark_tree): Don't mark search_slot.
16812         * init.c (initialize_vtbl_ptrs): Simplify.
16813         (emit_base_init): Likewise.
16814         * search.c (struct vbase_info): Document decl_ptr.
16815         (convert_pointer_to_single_level): Remove.
16816         (dfs_find_vbases): Remove.
16817         (dfs_init_base_pointers): Simplify.
16818         (dfs_clear_vbase_slots): Remove.
16819         (dfs_vtable_path_unmark): New function.
16820         (init_vbase_pointers): Simplify.
16821         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
16822         (expand_indirect_vtbls_init): Simplify.  Don't call
16823         mark_all_temps_used.
16824         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
16825         initialize_vtbl_ptrs.
16826
16827 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
16828
16829         * except.c: Add static prototypes.
16830
16831 2000-05-20  H.J. Lu  <hjl@gnu.org>
16832
16833         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
16834
16835 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
16836
16837         Don't create a separate copy of virtual bases for the
16838         CLASSTYPE_VBASECLASSES list.
16839         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
16840         (BINFO_FOR_VBASE): Remove.
16841         (CANONICAL_BINFO): Adjust.
16842         (binfo_for_vbase): New function.
16843         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
16844         instead of BINFO_FOR_VBASE.
16845         (build_vbase_pointer): Likewise.
16846         (build_secondary_vtable): Likewise.
16847         (dfs_mark_primary_bases): Likewise.
16848         (mark_primary_bases): Likewise.
16849         (layout_nonempty_base_or_field): Likewise.
16850         (dfs_set_offset_for_shared_vbases): Likewise.
16851         (dfs_set_offset_for_unshared_vbases): Likewise.
16852         (layout_virtual_bases): Likewise.  Adjust for changes to the
16853         CLASSTYPE_VBASECLASSES list.
16854         (dump_class_hierarchy_r): Use binfo_for_vbase
16855         instead of BINFO_FOR_VBASE.
16856         (dump_class_hierarchy): Likewise.
16857         (finish_vtbls): Likewise.
16858         (build_vtbl_initializer): Adjust for changes to the
16859         CLASSTYPE_VBASECLASSES list.
16860         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
16861         * decl.c (finish_destructor_body): Adjust for changes to the
16862         CLASSTYPE_VBASECLASSES list.
16863         * init.c (sort_base_init): Use binfo_for_vbase.
16864         (construct_virtual_bases): Adjust for changes to the
16865         CLASSTYPE_VBASECLASSES list.
16866         (expand_member_init): Use binfo_for_vbase.
16867         (build_vbase_delete):  Adjust for changes to the
16868         CLASSTYPE_VBASECLASSES list.
16869         * method.c (do_build_copy_constructor): Likewise.
16870         * rtti.c (get_base_offset): Use binfo_for_vbase.
16871         (expand_class_desc): Remove #if 0'd code.
16872         * search.c (struct vbase_info): Remove vbase_types.
16873         (get_base_distance):  Use binfo_for_vbase.
16874         (lookup_field_queue_p): Use CANONICAL_BINFO.
16875         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
16876         (get_pure_virtuals): Adjust for changes to the
16877         CLASSTYPE_VBASECLASSES list.
16878         (dfs_find_vbases): Use binfo_for_vbase.
16879         (dfs_init_vbase_pointers): Likewise.
16880         (init_vbase_pointers): Don't initialize vi.vbase_types.
16881         (virtual_context): Use binfo_for_vbase.
16882         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
16883         CLASSTYPE_VBASECLASSES list.
16884         (expand_indirect_vtbls_init): Simplify.
16885         (dfs_get_vbase_types): Don't replicate virtual bases.
16886         (find_vbase_instance): Use binfo_for_vbase.
16887         (binfo_for_vbase): New function.
16888         * typeck.c (get_delta_difference): Use binfo_for_vbase.
16889
16890 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
16891
16892         * decl2.c (finish_anon_union): Generalize error messages to handle
16893         anonymous structures.
16894         * init.c (perform_member_init): Remove `name' parameter.
16895         (build_field_list): New function.
16896         (sort_member_init): Handle anonymous union initialization order
16897         correctly.  Check for multiple initializations of the same union.
16898         (emit_base_init): Don't look up fields by name here.
16899         (expand_member_init): Record the result of name lookup for future
16900         reference.
16901         * typeck.c (build_component_ref): Fix formatting.
16902
16903 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
16904
16905         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
16906         * typeck.c (build_x_compound_expr): Replace warn_unused with
16907         warn_unused_value.
16908
16909         * decl2.c (lang_decode_option): Update -Wall unused flags by
16910         calling set_Wunused.
16911
16912 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
16913
16914         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
16915         * init.c (dfs_vtable_path_unmark): Remove.
16916         * search.c (marked_new_vtable_p): Likewise.
16917         (unmarked_new_vtable_p): Likewise.
16918         (dfs_search_slot_nonempty_p): Likewise.
16919         (dfs_mark): Likewise.
16920         (dfs_vtable_path_unmark): Likewise.
16921         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
16922         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
16923         (dfs_init_vbase_pointers): Remove special-case new ABI code.
16924         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
16925         (init_vbase_pointers): Simplify.
16926         (expand_indirect_vtbls_init): Likewise.
16927
16928         * class.c (copy_virtuals): New function.
16929         (build_primary_table): Use it.
16930         (build_secondary_vtable): Likewise.
16931         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
16932         indicate that no vcall offset is required.
16933         (add_virtual_function): Likewise.
16934         (modify_all_vtables): Likewise.
16935         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
16936         (dfs_accumulate_vtbl_inits): Likewise.
16937         (build_vtbl_initializer): Make changes to handle construction
16938         vtables.
16939         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16940         (build_rtti_vtbl_entries): Likewise.
16941         (build_vtable_entries): Handle a NULL vcall_index.
16942
16943 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
16944
16945         * decl2.c (lang_decode_option): Fix thinko.
16946
16947 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
16948
16949         * except.c (check_handlers): New fn.
16950         * cp-tree.h: Declare it.
16951         * semantics.c (finish_handler_sequence): Call it.
16952         (finish_function_handler_sequence): Likewise.
16953         (finish_handler_parms): Set TREE_TYPE on the handler.
16954         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
16955         * search.c (get_base_distance_recursive): If protect>1, ignore
16956         special access.
16957         (get_base_distance): Don't reduce watch_access.
16958
16959 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
16960
16961         * lex.c: #include diagnostic.h.
16962         (lang_init_options): Set default prefixing rules.
16963
16964         * lang-options.h: Add -fdiagnostics-show-location=.
16965
16966         * decl2.c: #include diagnostic.h.
16967         (lang_decode_option): Handle -fdiagnostics-show-location=.
16968
16969 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
16970
16971         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
16972         * vec.cc: Revert my 2000-05-07 change.
16973
16974 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
16975
16976         * class.c (check_field_decls): Complain about non-static data
16977         members with same name as class in class with constructor.
16978
16979 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
16980
16981         * decl.c (grokdeclarator): Allow non-static data members with
16982         same name as class.
16983
16984 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
16985
16986         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
16987         and pending_inline.filename.  Update prototypes.
16988         * decl.c (define_label): Constify filename parameter.
16989         * decl2.c (warn_if_unknown_interface): Constify local char *.
16990         * input.c Constify input_source.filename. Don't declare
16991         input_filename or lineno.  Constify filename parameter to feed_input.
16992         * lex.c (init_parse): Constify parameter and return value.
16993         (cp_pragma_interface, cp_pragma_implementation): Constify
16994         filename argument.
16995         (reinit_parse_for_method, reinit_parse_for_block,
16996         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
16997         Constify local char *.
16998         * pt.c: Don't declare lineno or input_filename.
16999         (print_template_context, tsubst_friend_function, tsubst_decl,
17000         tsubst, instantiate_decl): Constify local char *.
17001         * semantics.c (expand_body): Constify local char *.
17002         * tree.c (build_srcloc): Constify filename parameter.
17003         * typeck.c (c_expand_asm_operands): Constify filename
17004         parameter.
17005
17006 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
17007
17008         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
17009         offsetof expansion.
17010
17011 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
17012
17013         * inc/cxxabi.h:  Fix typos in comment.
17014         (__base_class_info::__offset): Use a static_cast.
17015
17016 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
17017
17018         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
17019         of std::size_t and std::ptrdiff_t respectively.
17020         * tinfo.cc: Likewise.
17021         * vec.cc: Likewise.
17022
17023 2000-05-06  Richard Henderson  <rth@cygnus.com>
17024
17025         * typeck.c (build_c_cast): Don't warn integer->pointer size
17026         mismatch for constants.
17027
17028 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
17029
17030         * rtti.c (ptmd_initializer): Set non-public, if class is
17031         incomplete.
17032
17033         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
17034         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17035         __cxa_vec_delete): Likewise.
17036         * tinfo.cc (__dynamic_cast): Likewise.
17037         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17038         __cxa_vec_delete): Likewise.
17039
17040 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
17041
17042         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
17043         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
17044         (lang_decl_flags): Add vcall_offset.
17045         (THUNK_VCALL_OFFSET): Use it.
17046         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
17047         * method.c (make_thunk): Create the lang_decl here, not in
17048         emit_thunk.
17049         (emit_thunk): Make generic thunks into ordinary functions once
17050         they have been fed to expand_body.
17051         * semantics.c (expand_body): Set current_function_is_thunk here.
17052
17053 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17054
17055         * class.c (update_vtable_entry_for_fn): Prototype.
17056
17057         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
17058         and `tmpl'.
17059
17060         * search.c (dfs_build_inheritance_graph_order): Prototype.
17061
17062 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
17063
17064         * cp-tree.h (special_function_kind): Add various kinds of
17065         destructors.
17066         (special_function_p): New function.
17067         * class.c (overrides): Don't let one kind of destructor override
17068         another.
17069         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
17070         whether or not to instantiate a template.
17071         * tree.c (special_function_p): Define.
17072
17073 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
17074
17075         * cp-tree.def (THUNK_DECL): Remove.
17076         * cp-tree.h (DECL_THUNK_P): New macro.
17077         (DECL_NON_THUNK_FUNCTION_P): Likewise.
17078         (DECL_EXTERN_C_FUNCTION_P): Likewise.
17079         (SET_DECL_THUNK_P): Likewise.
17080         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
17081         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
17082         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
17083         * decl.c (decls_match): Use DECL_EXTERN_C_P.
17084         (duplicate_decls): Likewise.
17085         (pushdecl): Likewise.  Adjust thunk handling.
17086         (grokfndecl): Use DECL_EXTERN_C_P.
17087         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
17088         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
17089         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
17090         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
17091         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
17092         DECL_NO_STATIC_CHAIN.
17093         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
17094         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
17095         * search.c (covariant_return_p): Remove THUNK_DECL handling.
17096         * ir.texi: Update.
17097
17098 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
17099
17100         * tree.c (walk_tree): Set lineno.
17101
17102 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
17103
17104         * exception.cc: Update license notice.
17105         * new.cc: Likewise.
17106         * new1.cc: Likewise.
17107         * new2.cc: Likewise.
17108         * tinfo.cc: Likewise.
17109         * tinfo2.cc: Likewise.
17110         * vec.cc: Likewise.
17111         * inc/cxxabi.h: Likewise.
17112         * inc/exception: Likewise.
17113         * inc/new: Likewise.
17114         * inc/new.h: Likewise.
17115         * inc/typeinfo: Likewise.
17116
17117 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
17118
17119         * tree.c (build_target_expr_with_type): If we already have a
17120         TARGET_EXPR, just return it.
17121
17122         * optimize.c (initialize_inlined_parameters): Don't generate an
17123         EXPR_STMT if we can just use DECL_INITIAL.
17124         * decl.c (emit_local_var): Only make the initialization a
17125         full-expression if stmts_are_full_exprs_p.
17126
17127 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
17128
17129         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
17130         macro.
17131         * call.c (standard_conversion): Use it.
17132         (direct_reference_binding): Likewise.
17133         (build_over_call): Likewise.
17134         (is_properly_derived_from): Likewise.
17135         (compare_ics): Likewise.
17136         * class.c (resolves_to_fixed_type_p): Likewise.
17137         * optimize.c (declare_return_variable): Likewise.
17138         * pt.c (is_specialization_of): Likewise.
17139         (unify): Likewise.
17140         * typeck.c (comp_target_parms): Likeiwse.
17141         (build_static_cast): Likewise.
17142         (build_reinterpret_cast): Likewise.
17143         (build_const_cast): Likewise.
17144         (comp_ptr_ttypes_real): Likewise.
17145         (comp_ptr_ttypes_const): Likewise.
17146         * typeck2.c (process_init_constructor): Likewise.
17147
17148 2000-04-30  Scott Snyder <snyder@fnal.gov>
17149
17150         * decl.c (finish_destructor_body): Use the base destructor when
17151         destroying virtual bases.
17152
17153 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
17154
17155         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
17156         STMT_EXPRs.
17157         * optimize.c (struct inline_data): Add target_exprs field.
17158         (declare_return_variable): When a function returns an aggregate,
17159         use the variable declared in the TARGET_EXPR as the remapped
17160         DECL_RESULT.
17161         (expand_call_inline): Update the pending target_exprs stack.
17162         (optimize_function): Initialize the stack.
17163
17164         * decl2.c (finish_file): Fix typo in comment.
17165
17166         * method.c (emit_thunk): Don't try to return a `void' value.
17167
17168         * optimize.c (initialize_inlined_parameters): If the parameter is
17169         addressable, we need to make a new VAR_DECL, even if the
17170         initializer is constant.
17171
17172 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
17173
17174         * decl.c (grok_op_properties): Add an extra check of argtypes.
17175
17176 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
17177
17178         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
17179         variables.
17180         (initialize_inlined_parameters): Try to avoid creating new
17181         VAR_DECLs.
17182
17183 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
17184
17185         * lex.c (my_get_run_time): Remove.
17186         (init_filename_times): Use get_run_time instead of my_get_run_time.
17187         (check_newline): Likewise.
17188         (dump_time_statistics): Likewise.
17189         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
17190         of computing elapsed time explicitly.
17191
17192 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
17193
17194         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
17195         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
17196         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
17197         before calling decl_constant_value.
17198         * class.c (check_bitfield_decl): Likewise.
17199         * cvt.c (ocp_convert): Likewise.
17200         (convert): Likewise.
17201         * decl.c (compute_array_index_type): Likewise.
17202         (build_enumerator): Likewise.
17203         * decl2.c (check_cp_case_value): Likewise.
17204         * pt.c (convert_nontype_argument): Likewise.
17205         (tsubst): Likewise.
17206         * typeck.c (decay_conversion): Likewise.
17207         (build_compound_expr): Likewise.
17208         (build_reinterpret_cast): Likewise.
17209         (build_c_cast): Likewise.
17210         (convert_for_assignment): Likewise.
17211
17212 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
17213
17214         * decl.c (finish_function): Don't play games with DECL_INLINE.
17215
17216 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
17217
17218         * ir.texi: Correct typo.
17219
17220 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17221
17222         * decl.c (grokdeclarator): Reject VLAs as members.
17223
17224 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
17225
17226         * call.c (standard_conversion): Accept conversion between
17227         COMPLEX_TYPEs.
17228
17229         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
17230
17231 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
17232
17233         * decl2.c (finish_file): Remove double setup for accounting
17234         compile time.
17235
17236 2000-04-24  Robert Lipe <robertlipe@usa.net>
17237
17238         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
17239
17240 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
17241
17242         * new.cc (set_new_handler): Needs to be in std::.
17243
17244 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
17245
17246         * cp-tree.h (lang_decl): Remove pretty_function_p.
17247         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
17248         language-specific node.
17249         * decl.c (cp_make_fname_decl): Use build_decl, not
17250         build_lang_decl, to build the variables.
17251         (grokvardecl): Don't call build_lang_decl for local variables in
17252         templates.
17253         (grokdeclarator): Don't call build_lang_decl for local type
17254         declarations in templates.
17255         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
17256         zero'd memory, rather than calling memset.
17257         * pt.c: Include hashtab.h.
17258         (local_specializations): New variable.
17259         (retrieve_local_specialization): Use it.
17260         (register_local_specialization): Likewise.
17261         (tsubst_decl): Don't assume local variables have
17262         DECL_LANG_SPECIFIC.
17263         (instantiate_decl): Set up local_specializations.
17264         * Makefile.in (HTAB_H): New variable.
17265
17266 2000-04-23  Richard Henderson  <rth@cygnus.com>
17267
17268         * typeck.c (c_expand_asm_operands): Restore the original
17269         contents of the output list.
17270
17271 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
17272
17273         * ir.texi:  Document complex number representation.
17274
17275 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
17276
17277         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
17278         (target_incomplete_p): New function.
17279         (tinfo_base_init): Create comdat NTBS name variable.
17280         (ptr_initializer): Add non_public parameter. Calculate it.
17281         (ptmd_initializer): Likewise.
17282         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
17283         (create_real_tinfo_var): Add non_public parameter. Use it.
17284         Push proxy into global namespace.
17285         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
17286         New enumeration.
17287         * inc/typeinfo (type_info::before, type_info::operator==):
17288         Compare __name addresses.
17289
17290         * tinfo2.cc: Remove new-abi builtins comment.
17291
17292 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
17293
17294         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
17295
17296         * call.c (joust): Exit early if we get the same function, too.
17297
17298         * decl2.c (key_method): Return NULL_TREE for template classes.
17299         (import_export_class): Don't need to check for template classes.
17300
17301 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
17302
17303         * lex.c: Remove references to cccp.c.
17304
17305 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
17306
17307         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
17308         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
17309         (DECL_DESTRUCTOR_P): Use destructor_attr.
17310         (DECL_CONST_MEMFUNC_P): Reimplement.
17311         (DECL_VOLATILE_MEMFUNC_P): Remove.
17312         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
17313         (overrides): Use DECL_DESTRUCTOR_P.
17314         (check_for_override): Likewise.
17315         * decl.c (start_function): Likewise.
17316         * decl2.c (grokfclassfn): Likewise.
17317         (check_classfn): Likewise.
17318         (grok_function_init): Likewise.
17319
17320 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
17321
17322         * decl2.c (grokfield): Issue error on illegal data member
17323         declaration.
17324
17325 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
17326
17327         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
17328
17329 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
17330
17331         * class.c (build_vtable_entry): Don't build thunks for type-info
17332         functions.
17333
17334 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
17335
17336         * decl.c (decls_match): Allow a redeclaration of a builtin to
17337         specify args while the builtin did not.
17338
17339 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
17340
17341         * cp-tree.def (THUNK_DECL): Add to documentation.
17342         * cp-tree.h (flag_huge_objects): Declare.
17343         * class.c (modify_vtable_entry): Tidy.
17344         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
17345         Calculate delta appropriately for the new ABI.
17346         (dfs_modify_vtables): Use it.
17347         (modify_all_vtables): Fix thinko in code to add overriding copies
17348         of functions to primary vtables.
17349         (build_clone): Fix typo in comment.
17350         (clone_function_decl): Correct order of destructors in vtable.
17351         (build_vbase_offset_vtbl_entries): Adjust comment.
17352         (dfs_vcall_offset_queue_p): Remove.
17353         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
17354         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
17355         (build_vtable_entry): Correct check for pure virtual functions.
17356         Don't declare flag_huge_objects.
17357         * decl.c (flag_huge_objects): Remove declaration.
17358         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
17359         Use int_size_in_bytes.
17360         (emit_thunk): Handle vcall offset thunks.
17361
17362 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17363
17364         * decl2.c (parse_time, varconst_time): Delete declarations.
17365         (finish_file): Delete LINENO declaration.
17366         START_TIME and THIS_TIME now long.
17367
17368 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
17369
17370         * class.c (build_base_field): Reformat comment.
17371
17372         * inc/cxxabi.h (stddef.h): Comment inclusion.
17373         (__base_class_info::__offset): Comment shift.
17374
17375 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
17376
17377         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
17378         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
17379         (cp_push_exception_identifier): New macro.
17380         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
17381         (DECL_BASE_DESTRUCTOR_P): Likewise.
17382         (DECL_DELETING_DESTRUCTOR_P): Likewise.
17383         (get_vtbl_decl_for_binfo): Fix formatting.
17384         (in_charge_arg_for_name): New macro.
17385         (maybe_build_cleanup_and_delete): Remove declaration.
17386         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
17387         (in_charge_arg_for_name): New function.
17388         (build_new_method_call): Use it.  Handle cloned destructors.
17389         (build_clone): Don't make the base constructor virtual.
17390         Automatically defer generated functions.
17391         (clone_function_decl): Handle destructors, too.
17392         (clone_constructors_and_destructors): Likewise.
17393         (create_vtable_ptr): Don't create a vtable entry for a cloned
17394         function.
17395         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
17396         (initialize_predefined_identifiers): Update appropriately.
17397         (finish_destructor_body): Simplify.
17398         (maybe_build_cleanup_and_delete): Remove.
17399         * except.c (expand_throw): Handle new-ABI destructors.
17400         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
17401         (build_dtor_call): New function.
17402         (build_delete): Use it.  Simplify.
17403         * optimize.c (maybe_clone_body): Handle destructors.
17404         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
17405
17406         * exception.cc (cleanup_fn): New typedef.
17407         (CALL_CLEANUP): New macro.
17408         (cp_eh_info): Use them.
17409         (__cp_push_exception): Likewise.
17410         (__cp_pop_exception): Likewise.
17411
17412 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
17413
17414         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
17415         (complete_dtor_identifier): New macro.
17416         (CLASSTYPE_FIRST_CONVERSION): Remove.
17417         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
17418         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
17419         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
17420         (CLASSTYPE_CONSTRUCTORS): Likewise.
17421         (CLASSTYPE_DESTRUCTORS): Likewise.
17422         (lang_decl): Add cloned_function.
17423         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
17424         (DECL_BASE_CONSTRUCTOR_P): Likewise.
17425         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
17426         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
17427         (DECL_CLONED_FUNCTION_P): Likewise.
17428         (DECL_CLONED_FUNCTION): Likewise.
17429         (clone_function_decl): Declare.
17430         (maybe_clone_body): Likewise.
17431         * call.c (build_user_type_conversion_1): Call complete object
17432         constructors in the new ABI.
17433         (build_new_method_call): Don't add in-charge parameters under the
17434         new ABI.
17435         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
17436         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
17437         CLASSTYPE_DESTRUCTOR_SLOT.
17438         (build_clone): New function.
17439         (clone_function_decl): Likewise.
17440         (clone_constructors_and_destructors): Likewise.
17441         (check_bases_and_members): Use it.
17442         * decl.c (iniitialize_predefined_identifiers): Initialize
17443         complete_dtor_identifier.
17444         (finish_function): Don't add extra code to a clone.
17445         (lang_mark_tree): Mark cloned_function.
17446         * decl2.c (mark_used): Don't bother trying to instantiate things
17447         we synthesized.
17448         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
17449         * method.c (set_mangled_name_for_decl): Don't treat clones as
17450         constructors.
17451         (synthesize_method): Sythesize cloned functions, not the clones.
17452         * optimize.c (inline_data): Update comment on ret_label.
17453         (remap_block): Don't assume DECL_INITIAL exists.
17454         (copy_body_r): Allow ret_label to be NULL.
17455         (maybe_clone_body): Define.
17456         * pt.c (tsubst_decl): Handle clones.
17457         (instantiate_clone): New function.
17458         (instantiate_template): Use it.
17459         (set_mangled_name_for_template_decl): Don't treat clones as
17460         constructors.
17461         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
17462         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
17463         * semantics.c (expand_body): Clone function bodies as necessary.
17464
17465         * optimize.c (remap_decl): Avoid sharing structure for arrays
17466         whose size is only known at run-time.
17467         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
17468
17469         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
17470         to has_in_charge_parm_p.
17471         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
17472         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
17473         (DECL_COPY_CONSTRUCTOR_P): New macro.
17474         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
17475         (build_user_type_conversion_1): Likewise.
17476         (convert_like_real): Likewise.
17477         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
17478         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
17479         (copy_args_p): Likewise.
17480         (grok_ctor_properties): Likewise.
17481         (start_function): Likewise.
17482         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
17483         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
17484         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
17485         * method.c (do_build_copy_constructor): Use
17486         DECL_HAS_IN_CHARGE_PARM_P.
17487         (synthesize_method): Likewise.
17488         * pt.c (instantiate_template): Remove goto.
17489         * tree.c (build_cplus_method_type): Remove mention of obstacks in
17490         comment.
17491
17492         * cp-tre.h (finish_function): Change prototype.
17493         * decl.c (end_cleanup_fn): Adjust caller.
17494         (finish_function): Take only one parameter.
17495         * decl2.c (finish_objects): Adjust caller.
17496         (finish_static_storage_duration_function): Likewise.
17497         * method.c (emit_thunk): Likewise.
17498         * parse.y: Likewise.
17499         * parse.c: Regenerated.
17500         * pt.c (instantiate_decl): Likewise.
17501         * rtti.c (synthesize_tinfo_fn): Likewise.
17502         * semantics.c (expand_body): Likewise.
17503
17504         * cp-tree.h (copy_decl): New function.
17505         * class.c (finish_struct_1): Use it.
17506         * lex.c (copy_decl): Define it.
17507         * pt.c (tsubst_decl): Likewise.
17508         * tree.c (copy_template_template_parm): Likewise.
17509
17510         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
17511         has_nonpublic_assign_ref.
17512         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
17513         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
17514         * class.c (finish_struct_methods): Don't set
17515         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
17516         (interface_only): Don't declare.
17517         (interface_unknown): Likewise.
17518
17519 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17520
17521         * tree.h (HAVE_TEMPLATES): Remove definition.
17522         * lang-options.h (-fthis-is-variable): Remove documentation.
17523
17524 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
17525
17526         * class.c (instantiate_type): Handle object-relative template-id.
17527
17528         * semantics.c (finish_expr_stmt): Call convert_to_void here.
17529         * decl.c (cplus_expand_expr_stmt): Not here.
17530
17531         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
17532         Initialize exprtype earlier.
17533
17534         * parse.y (fn.def1): Check for defining types in return types.
17535
17536         * decl.c (check_tag_decl): Notice extra fundamental types.
17537         Diagnose empty decls in classes, too.
17538
17539         * decl.c (grokdeclarator): Don't override an anonymous name if no
17540         declarator was given.
17541
17542         * cvt.c (convert_to_void): Call resolve_offset_ref.
17543
17544         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
17545
17546         * decl2.c (decl_namespace): Handle getting a type.
17547
17548         * typeck.c (build_c_cast): Re-enable warning for cast between
17549         pointer and integer of different size.
17550
17551 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
17552
17553         * inc/cxxabi.h (__pointer_type_info): Add restrict and
17554         incomplete flags.
17555         (__pointer_type_info::__pointer_catch): New virtual function.
17556         (__pointer_to_member_type_info): Derive from
17557         __pointer_type_info. Adjust.
17558         (__pointer_to_member_type_info::__do_catch): Remove.
17559         (__pointer_to_member_type_info::__is_pointer_p): Declare.
17560         (__pointer_to_member_type_info::__pointer_catch): Declare.
17561         * rtti.c (qualifier_flags): Add restrict flag.
17562         (ptmd_initializer): Reorder members.
17563         (create_tinfo_types): Expand comments. Reorder
17564         ptmd_desc_type_node members.
17565         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
17566         Implement.
17567         (__pointer_type_info::__do_catch): Move specific code into
17568         __pointer_catch. Call it.
17569         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
17570         specific catch checking. Fix void conversion check.
17571         (__pointer_to_member_type_info::__do_catch): Remove.
17572         (__pointer_to_member_type_info::__pointer_catch): Implement.
17573
17574 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17575
17576         * lex.c (init_parse): Remove traces of classof and headof.
17577         * decl2.c (flag_operator_names): Default to 1.
17578         (lang_decode_option): Do not set it for -ansi.
17579
17580 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
17581
17582         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
17583         (DECL_MAIN_VARIANT): Remove.
17584         * decl.c (duplicate_decls): Don't set it.
17585         (start_function): Likewise.
17586         (lang_mark_tree): Don't mark it.
17587         * decl2.c (defer_fn): Don't use it.
17588         * lex.c (retrofit_lang_decl): Don't set it.
17589         * pt.c (tsubst_decl): Likewise.
17590         * ptree.c (print_lang_decl): Don't print it.
17591         * typeck.c (mark_addressable): Don't use it.
17592
17593 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
17594
17595         * vec.cc: Include <new> and <exception>.
17596         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
17597         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
17598         terminate.
17599         (__cxa_vec_delete): Catch dtor exceptions.
17600
17601 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
17602
17603         Prepend __ to implementation defined names.
17604         * inc/typeinfo (type_info): Rename _name to __name.
17605         (type_info::type_info): Rename parameter.
17606         (type_info::operator==, type_info::operator!=,
17607         type_info::before): Likewise.
17608         (type_info::is_pointer_p, type_info::is_function_p,
17609         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
17610         parameters.
17611         * inc/cxxabi.h
17612         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
17613         (__pointer_type_info::__pointer_type_info): Likewise.
17614         (__pointer_type_info::is_pointer_p,
17615         __pointer_type_info::do_catch): Prepend __. Rename parameters.
17616         (__array_type_info::__array_type_info): Rename parameters.
17617         (__function_type_info::__function_type_info): Likewise.
17618         (__function_type_info::is_function_p): Prepend __.
17619         (__enum_type_info::__enum_type_info): Rename parameters.
17620         (__pointer_to_member_type_info::__pointer_to_member_type_info):
17621         Likewise.
17622         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
17623         parameters.
17624         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
17625         (__class_type_info::__class_type_info): Rename parameters.
17626         (__class_type_info::sub_kind): Prepend __. Adjust member names.
17627         (__class_type_info::upcast_result,
17628         __class_type_info::dyncast_result): Prepend __. Move definition
17629         into tinfo.cc.
17630         (__class_type_info::do_upcast, __class_type_info::do_catch,
17631         __class_type_info::find_public_src,
17632         __class_type_info::do_dyncast,
17633         __class_type_info::do_find_public_src): Prepend __. Rename
17634         parameters.
17635         (__si_class_type_info::__si_class_type_info): Rename parameters.
17636         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
17637         __si_class_type_info::do_find_public_src): Prepent __. Rename
17638         parameters.
17639         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
17640         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
17641         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
17642         parameters.
17643         (__dynamic_cast): Rename parameters.
17644         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
17645         type_info::do_catch, type_info::do_upcast): Prepend __.
17646         (contained_p, public_p, virtual_p, contained_public_p,
17647         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
17648         (__class_type_info::do_catch,
17649         __class_type_info::do_upcast): Prepend __. Adjust.
17650         (__class_type_info::__upcast_result,
17651         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
17652         Adjust.
17653         (__class_type_info::find_public_src): Prepend __. Adjust.
17654         (__class_type_info::do_find_public_src,
17655         __si_class_type_info::do_find_public_src,
17656         __vmi_class_type_info::do_find_public_src): Likewise.
17657         (__class_type_info::do_dyncast,
17658         __si_class_type_info::do_dyncast,
17659         __vmi_class_type_info::do_dyncast): Likewise.
17660         (__class_type_info::do_upcast,
17661         __si_class_type_info::do_upcast,
17662         __vmi_class_type_info::do_upcast): Likewise.
17663         (__dynamic_cast): Adjust.
17664         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
17665         (__function_type_info::is_function_p): Likewise.
17666         (__pointer_type_info::do_catch): Likewise. Adjust.
17667         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
17668         (__throw_type_match_rtti_2): Adjust.
17669         (__is_pointer): Adjust.
17670
17671 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
17672
17673         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
17674         (complete_ctor_identifier): New macro.
17675         (special_function_kind): Add sfk_copy_constructor and
17676         sfk_assignment_operator.
17677         (LOOKUP_HAS_IN_CHARGE): Remove.
17678         (cons_up_default_function): Rename to ...
17679         (implicitly_declare_fn): ... this.
17680         * call.c (build_new_method_call): Add in-charge parameters for
17681         constructors here.
17682         * class.c (add_implicitly_declared_members): Change parameter name
17683         from cant_have_assignment to cant_have_const_assignment.
17684         Replace calls to cons_up_default_function to implicitly_declare_fn.
17685         * cvt.c (ocp_convert): Use complete_ctor_identifier.
17686         * decl.c (initialize_predefined_identifiers): Initialize it.
17687         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
17688         complex expression.
17689         * init.c (expand_default_init): Don't calculate the in-charge
17690         parameter here.
17691         (build_new_1): Likewise.
17692         * lex.c (cons_up_default_function): Move to method.c.
17693         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
17694         (implicitly_declare_fn): New function.
17695         * typeck.c (build_static_cast): Use complete_ctor_identifier.
17696         (build_modify_expr): Likewise.
17697         * typeck2.c (build_functional_cast): Likewise.
17698
17699         Under the new ABI, constructors don't return `this'.
17700         * cp-tree.h (warn_reorder): Declare.
17701         (special_function_kind): New enum.
17702         (global_base_init_list): Remove declaration.
17703         (emit_base_init): Don't return a value.
17704         (check_base_init): Don't declare.
17705         (is_aggr_typedef): Likewise.
17706         * decl.c (check_special_function_return_type): New function.
17707         (return_types): Remove.
17708         (grokdeclarator): Use check_special_function_return_type.
17709         (start_function): Don't initialize ctor_label under the new ABI.
17710         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
17711         * init.c (begin_init_stmts): Move to top of file.
17712         (finish_init_stmts): Likewise.
17713         (warn_reorder): Don't declare.
17714         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
17715         value.
17716         (check_base_init): Remove.
17717         (is_aggr_typedef): Likewise.
17718         (build_new_1): Don't use the return value of a constructor.
17719         * semantics.c (setup_vtbl_ptr): Don't use the return value
17720         of emit_base_init.
17721         * typeck.c (check_return_expr): Don't magically convert return
17722         statements into `return this' in constructors under the new ABI.
17723
17724         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
17725         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
17726         (base_ctor_identifier): New macro.
17727         (base_dtor_identifier): Likewise.
17728         (deleting_dtor_identifier): Likewise.
17729         * decl.c: Don't include obstack.h.
17730         (obstack_chunk_alloc): Don't define.
17731         (obstack_chunk_free): Likewise.
17732         (struct predefined_identifier): New type.
17733         (initialize_predefined_identifiers): New function.
17734         (init_decl_processing): Use it.
17735         (debug_temp_inits): Remove.
17736         (start_method): Don't call preserve_data.
17737         (hack_incomplete_structures): Update comment.
17738         * init.c (init_init_processing): Don't initialize
17739         nelts_identifier.
17740         (build_offset_rf): Remove dead code.
17741         (build_delete): Use CLASSTYPE_N_BASECLASSES.
17742         * search.c (init_search_processing): Don't initialize
17743         vptr_identifier.
17744
17745 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17746
17747         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
17748         some sign_compare warnings.
17749
17750 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
17751
17752         Rename abi::__vmi_class_type_info members.
17753         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
17754         base_list, detail_masks members to vmi_flags, vmi_base_count,
17755         vmi_bases and vmi_flags_masks respectively.
17756         (__vmi_class_type_info::vmi_flags_masks): Rename
17757         details_unknown_mask to flags_unknown_mask.
17758         * tinfo.cc (__class_type_info::do_upcast): Adjust.
17759         (__vmi_class_type_info::do_find_public_src): Adjust.
17760         (__vmi_class_type_info::do_dyncast): Adjust.
17761         (__vmi_class_type_info::do_upcast): Adjust.
17762
17763 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
17764
17765         * tinfo.cc (convert_to_base): New function.
17766         (get_vbase_offset): Remove. Move into convert_to_base.
17767         (__vmi_class_type_info::do_find_public_src): Adjust.
17768         (__vmi_class_type_info::do_dyncast): Adjust.
17769         (__vmi_class_type_info::do_upcast): Adjust.
17770
17771 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
17772
17773         * tinfo.cc (operator=): Use __builtin_strcmp.
17774         * tinfo2.cc (before): Likewise.
17775
17776 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
17777
17778         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
17779         (DECL_SAVED_INLINE): Rename to ...
17780         (DECL_DEFERRED_FN): ... this.
17781         (in_function_p): Remove declaration.
17782         (mark_inline_for_output): Rename to ...
17783         (defer_fn): ... this.
17784         * decl.c (finish_function): Adjust call to mark_inline_for_output.
17785         (in_function_p): Remove definition.
17786         * decl2.c (saved_inlines): Rename to ...
17787         (deferred_fns): ... this.
17788         (saved_inlines_used): Rename to ...
17789         (deferred_fns_used): ... this.
17790         (mark_inline_for_output): Rename to ...
17791         (defer_fn): ... this.
17792         (finish_file): Adjust accordingly.
17793         (init_decl2): Likewise.
17794         * lex.c (cons_up_default_function): Likewise.
17795         * pt.c (mark_decl_instantiated): Likewise.
17796         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
17797         circumstances.
17798         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
17799         * semantics.c (expand_body): Defer more functions.
17800
17801 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
17802
17803         * vec.cc: New file.
17804         * Make-lang.in (CXX_LIB2FUNCS): Add it.
17805         (vec.o): Build it.
17806         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17807         __cxa_vec_delete): Declare.
17808
17809 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
17810
17811         * rtti.c (dfs_class_hint_mark): New static function.
17812         (dfs_class_hint_unmark): New static function.
17813         (class_hint_flags): Use them.
17814
17815 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
17816
17817         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
17818
17819 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
17820
17821         * cp-tree.h (instantiate_decl): Change prototype.
17822         * decl2.c (mark_used): Adjust call.
17823         * optimize.c (inlinable_function_p): Adjust handling of templates.
17824         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
17825         (do_type_instantiation): Likewise.
17826         (instantiate_decl): Defer more templates.
17827         (instantiate_pending_templates): Adjust logic to handle inline
17828         friend functions.
17829
17830         * Makefile.in (GGC_H): New variable.  Use it throughout in place
17831         of ggc.h.
17832
17833         * call.c: Don't include obstack.h.  Include ggc.h.
17834         (obstack_chunk_alloc): Don't define.
17835         (obstack_chunk_free): Likewise.
17836         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
17837         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
17838         (pop_switch): Free it.
17839
17840         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
17841
17842         * dump.c (dequeue_and_dump): Don't try to print the bit_position
17843         if we don't have a DECL_FIELD_OFFSET.
17844
17845 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
17846
17847         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
17848         special_function_p.
17849
17850 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17851
17852         * cfns.gperf (hash, libc_name_p): Prototype.
17853
17854         * rtti.c (build_dynamic_cast_1): Constification.
17855
17856         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
17857
17858         * semantics.c (deferred_type_access_control): Prototype.
17859
17860 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
17861
17862         Correct many new ABI issues regarding vbase and vcall offset
17863         layout.
17864         * cp-tree.h (BINFO_VTABLE): Document.
17865         (struct lang_type): Tweak formatting.
17866         (BINFO_PRIMARY_BINFO): Add to documentation.
17867         (CLASSTYPE_VSIZE): Fix typo in comment.
17868         (CLASSTYPE_VBASECLASSES): Update documentation.
17869         (BINFO_VBASE_MARKED): Remove.
17870         (SET_BINFO_VBASE_MARKED): Likewise.
17871         (CLEAR_BINFO_VBASE_MARKED): Likewise.
17872         (BINFO_FIELDS_MARKED): Remove.
17873         (SET_BINFO_FIELDS_MARKED): Likewise.
17874         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
17875         (enum access_kind): New enumeration.
17876         (num_extra_vtbl_entries): Remove declaration.
17877         (size_extra_vtbl_entries): Likewise.
17878         (get_vtbl_decl_for_binfo): New function.
17879         (dfs_vbase_unmark): Remove declaration.
17880         (mark_primary_bases): Likewise.
17881         * class.c (SAME_FN): Remove.
17882         (struct vcall_offset_data_s): Move definition.
17883         (build_vbase_pointer): Use `build', not `build_binary_op', to
17884         access the vbase pointer under the new ABI.
17885         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
17886         (build_primary_vtable): Likewise.
17887         (dfs_mark_primary_bases): Move here from search.c.
17888         (mark_primary_bases): Likewise.
17889         (determine_primary_bases): Under the new ABI, don't make a base
17890         class a primary base just because we don't yet have any virtual
17891         functions.
17892         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
17893         (num_vfun_entries): Remove.
17894         (dfs_count_virtuals): Likewise.
17895         (num_extra_vtbl_entries): Likewise.
17896         (size_extra_vtbl_entries): Likewise.
17897         (layout_virtual_bases): Iterate in inheritance graph order under
17898         the new ABI.
17899         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
17900         indicate that a vfield is present.
17901         (init_class_processing): Initialize access_public_node, etc., from
17902         ak_public, etc.
17903         (get_vtbl_decl_for_binfo): New function.
17904         (dump_class_hierarchy_r): Likewise.
17905         (dump_class_hierarchy): Use it.
17906         (finish_vtbls): Build the vtbls in inheritance graph order.
17907         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
17908         (initialize_vtable): Use get_vtbl_decl_for_binfo.
17909         (accumulate_vtbl_inits): Add comments explaining why a pre-order
17910         walk is required.
17911         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
17912         where the vptr points, even for primary vtables.
17913         (build_vtbl_initializer): Adjust handling of vbase and vcall
17914         offsets.
17915         (build_vcall_and_vbase_vtable_entries): New function.
17916         (dfs_build_vbase_offset_vtbl_entries): Remove.
17917         (build_vbase_offset_vtbl_entries): Reimplement.
17918         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
17919         were already handled in a primary base class vtable.
17920         (build_vcall_offset_vtbl_entries): Adjust.
17921         (build_rtti_vtbl_entries): Adjust.
17922         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
17923         * init.c (expand_virtual_init): Simplify.
17924         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
17925         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
17926         * search.c (BINFO_ACCESS): New macro.
17927         (SET_BINFO_ACCESS): Likewise.
17928         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
17929         (access_in_type): Likewise.
17930         (dfs_accessible_p): Likewise.
17931         (protected_accessible_p): Likewise.
17932         (lookup_fnfields_1): Adjust documentation.
17933         (dfs_mark_primary_bases): Move to class.c
17934         (mark_primary_bases): Likewise.
17935         (dfs_vbase_unmark): Remove.
17936         (virtual_context): Use BINFO_FOR_VBASE.
17937         (dfs_get_vbase_types): Simplify.
17938         (dfs_build_inheritance_graph_order): New function.
17939         (get_vbase_types): Use it.
17940         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
17941
17942         * tinfo.cc (get_vbase_offset): New function.
17943         (__vmi_class_type_info::do_find_public_src): Use it.
17944         (__vmi_class_type_info::do_dyncast): Likewise.
17945         (__vmi_class_type_info::do_upcast): Likewise.
17946
17947 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
17948
17949         * lang-specs.h: Pass -fno-show-column to the preprocessor.
17950
17951 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
17952
17953         * rtti.c (class_hint_flags): Rename flags.
17954         (class_initializer): Remove flags.
17955         (synthesize_tinfo_var): Combine offset and flags. Add flags
17956         for __vmi_class_type_info.
17957         (create_tinfo_types): Remove flags from __class_type_info and
17958         __si_class_type_info. Merge flags and offset from
17959         base_class_type_info.
17960         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
17961         (__base_class_info::is_virtual_p): Adjust.
17962         (__base_class_info::is_public_p): Adjust.
17963         (__base_class_info::offset): New accessor.
17964         (__class_type_info::details): Remove member.
17965         (__class_type_info::__class_type_info): Lose details.
17966         (__class_type_info::detail_masks): Remove.
17967         (__si_class_type_info::__si_class_type_info): Lose details.
17968         (__vmi_class_type_info::details): New member.
17969         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
17970         (__vmi_class_type_info::detail_masks): New member.
17971         * tinfo.cc (__class_type_info::do_upcast): Initialize result
17972         with unknown_details_mask.
17973         (__vmi_class_type_info::do_find_public_src): Adjust
17974         (__vmi_class_type_info::do_dyncast): Adjust.
17975         (__vmi_class_type_info::do_upcast): Set result details, if
17976         needed. Adjust.
17977         (__dynamic_cast): Temporarily #if out optimization.
17978
17979 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
17980
17981         * rtti.c (get_tinfo_decl): Mark used.
17982         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
17983         mark as dealt with, if we output it.
17984
17985 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
17986
17987         * class.c: Reorganize to put virtual function table initialization
17988         machinery at the end of the file.
17989
17990 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
17991
17992         * class.c (finish_struct): Use bitsize_zero_node.
17993         * pt.c (instantiate_class_template): Likewise.
17994
17995 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
17996
17997         Put RTTI entries at negative offsets in new ABI.
17998         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
17999         vbase offset at index -3, not -1.
18000         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
18001         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
18002         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
18003         (build_rtti_vtbl_entries): New function.
18004         (set_rtti_entry): Remove.
18005         (build_primary_vtable): Don't use it.
18006         (build_secondary_vtable): Likewise.
18007         (start_vtable): Remove.
18008         (first_vfun_index): New function.
18009         (set_vindex): Likewise.
18010         (add_virtual_function): Don't call start_vtable.  Do call
18011         set_vindex.
18012         (set_primary_base): Rename parameter.
18013         (determine_primary_base): Likewise.
18014         (num_vfun_entries): Don't use skip_rtti_stuff.
18015         (num_extra_vtbl_entries): Include RTTI information.
18016         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
18017         (skip_rtti_stuff): Remove.
18018         (dfs_modify_vtables): Don't use it.
18019         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
18020         (layout_nonempty_base_or_field): Update size handling.
18021         (create_vtable_ptr): Tweak.
18022         (layout_class_type): Adjust parameter names.
18023         (finish_struct_1): Simplify.
18024         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
18025         (skip_rtti_stuff): Remove.
18026         (first_vfun_index): New function.
18027         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18028         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
18029         (marked_vtable_pathp): Declare.
18030         (unmarked_vtable_pathp): Likewise.
18031         * error.c (dump_expr): Use first_vfun_index to calculate vtable
18032         offsets.
18033         * rtti.c (build_headof): Look for RTTI at negative offsets.
18034         (get_tinfo_decl_dynamic): Likewise.
18035         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
18036         here.
18037         (create_pseudo_type_info): Do it here instead.  Adjust so that
18038         vptr points at first virtual function.
18039         * search.c (marked_vtable_pathp): Make it global.
18040         (unmarked_vtable_pathp): Likewise.
18041         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18042         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
18043         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
18044         (get_pure_virtuals): Likewise.
18045         (expand_upcast_fixups): Likewise.
18046         * tree.c (debug_binfo): Likewise.
18047         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
18048         negative offset.
18049
18050 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18051
18052         * class.c (check_field_decl): Fix typo.
18053         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
18054         (check_methods): Likewise.
18055         (check_field_decls): Likewise.
18056         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
18057         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
18058         Use DECL_RESULT_FLD, not DECL_RESULT.
18059         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
18060         * lex.c (identifier_type): Likewise.
18061         * pt.c (determine_specialization, lookup_template_class): Likewise.
18062         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
18063         (resolve_overloaded_unification, more_specialized): Likewise.
18064         * semantics.c (finish_member_declaration): Likewise.
18065         * typeck.c (build_x_function_call): Likewise.
18066
18067 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
18068
18069         * class.c (layout_empty_base): Handle empty bases with non-byte
18070         alignment.
18071         (build_base_field): Likewise.
18072         (layout_virtual_bases): Likewise.
18073
18074         * class.c (finish_struct_1): Fix typo in this change:
18075
18076         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18077
18078 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
18079
18080         * decl.c (grokdeclarator): Count partial specializations when
18081         keeping track of how many template classes have been seen.
18082
18083         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
18084
18085 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18086
18087         * class.c (build_vbase_pointer_fields): layout_field now place_field.
18088         (get_vfield_offset): Use byte_position.
18089         (set_rtti_entry): Set OFFSET to ssizetype zero.
18090         (get_binfo_offset_as_int): Deleted.
18091         (dfs_record_base_offsets): Use tree_low_cst.
18092         (dfs_search_base_offsets): Likewise.
18093         (layout_nonempty_base_or_field): Reflect changes in RLI format
18094         and call byte_position.
18095         (layout_empty_base): Convert offset to ssizetype.
18096         (build_base_field): use rli_size_unit_so_far.
18097         (dfs_propagate_binfo_offsets): Do computation in proper type.
18098         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
18099         (layout_class_type): Reflect changes in RLI names and fields.
18100         (finish_struct_1): Set DECL_FIELD_OFFSET.
18101         * dump.c (dequeue_and_dump): Call bit_position.
18102         * expr.c (cplus_expand_constant): Use byte_position.
18103         * rtti.c (expand_class_desc): Use bitsize_one_node.
18104         * typeck.c (build_component_addr): Use byte_position and don't
18105         special case for zero offset.
18106
18107 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
18108
18109         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
18110
18111         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
18112         tinfo object.
18113         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
18114         vtable.
18115
18116 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
18117
18118         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
18119         DECL_P macros.
18120         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
18121         make_typename_type, check_initializer, cp_finish_decl,
18122         xref_tag): Likewise.
18123         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
18124         decl_namespace, arg_assoc_template_arg, arg_assoc,
18125         validate_nonmember_using_decl, do_class_using_decl): Likewise.
18126         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
18127         args_to_string): Likewise.
18128         * friend.c (is_friend): Likewise.
18129         * lex.c (note_got_semicolon, note_list_got_semicolon,
18130         is_global): Likewise.
18131         * method.c (build_overload_nested_name, build_overload_value,
18132         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
18133         * parse.y (typename_sub, typename_sub1): Likewise.
18134         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
18135         process_partial_specialization, convert_template_argument,
18136         template_args_equal, add_pending_template, lookup_template_class,
18137         for_each_template_parm_r, maybe_fold_nontype_arg,
18138         tsubst, instantiate_template, type_unification_real, unify,
18139         instantiate_pending_templates, set_mangled_name_for_template_decl):
18140         Likewise.
18141         * repo.c (repo_get_id, repo_template_used): Likewise.
18142         * search.c (lookup_field_1): Likewise.
18143         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
18144         * xref.c (classname): Likewise.
18145
18146 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
18147
18148         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
18149         (CANONICAL_BINFO): New macro.
18150         (BINFO_NEW_VTABLE_MARKED): Use it.
18151         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
18152         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
18153         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
18154         not TREE_TYPE.
18155         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18156         (build_secondary_vtable): Likewise.
18157         (dfs_finish_vtbls): Likewise.
18158         (dfs_accumulate_vtbl_inits): Likewise.
18159         (accumulate_vtbl_inits): New function.
18160         (finish_vtbls): Make sure that virtual bases come after
18161         non-virtual bases in the vtable group.
18162         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
18163         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18164         * search.c (struct vbase_info): Move definition.
18165         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18166         (unmarked_new_vtable_p): Likewise.
18167         (dfs_mark_vtable_path): Remove.
18168         (dfs_mark_new_vtable): Remove.
18169         (dfs_unmark_new_vtable): Likewise.
18170         (dfs_clear_search_slot): Likewise.
18171         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
18172         (dfs_clear_vbase_slots): Likewise.
18173         (init_vbase_pointers): LIkewise.
18174
18175 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
18176
18177         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
18178         SIZETYPE to a non-SIZETYPE.
18179
18180 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
18181
18182         * class.c (layout_virtual_bases): Adjust names in conditionally
18183         compiled code.
18184
18185         * class.c (record_base_offsets): New function.
18186         (layout_conflict_p): Likewise.
18187         (layout_nonempty_base_or_field): Use it.
18188         (layout_empty_base): New function.
18189         (build_base_field): Use it.
18190         (build_base_fields): Update comment.
18191         (layout_virtual_bases): Fold in a little code form
18192         layout_basetypes.  Use layout_empty_base.
18193         (layout_basetypes): Remove.
18194         (end_of_class): New function.
18195         (layout_class_type): Use it.  Adjust.
18196
18197         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
18198         (fntype_p): Remove.
18199         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
18200         comment.
18201         (dfs_skip_nonprimary_vbases_markedp): Likewise.
18202         * typeck.c (fntype_p): Remove.
18203
18204         * cp-tree.h (TI_SPEC_INFO): Remove.
18205         (CLASSTYPE_TI_SPEC_INFO): Likewise.
18206         * pt.c (process_partial_specialization): Likewise.
18207
18208         * class.c (build_base_field): Fix thinko in computation of binfo
18209         offsets.
18210
18211         * tree.c (mark_local_for_remap_p): Mark variables declared in
18212         TARGET_EXPRs as well.
18213
18214 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
18215
18216         * typeck.c (require_complete_type, complete_type,
18217         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
18218         build_array_ref, convert_arguments, pointer_diff,
18219         build_x_unary_op, build_unary_op, build_c_cast,
18220         build_modify_expr): Use COMPLETE_TYPE_P etc.
18221         * call.c (is_complete, convert_like_real,
18222         build_new_method_call): Likewise.
18223         * class.c (build_vbase_pointer_fields, check_bases,
18224         build_base_field, finish_struct_1, pushclass): Likewise.
18225         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
18226         * decl.c (maybe_process_template_type_declaration, pushtag,
18227         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
18228         layout_var_decl, check_initializer, cp_finish_decl,
18229         grokdeclarator, require_complete_types_for_parms,
18230         grok_op_properties, xref_tag, xref_basetypes,
18231         check_function_type): Likewise.
18232         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
18233         * friend.c (do_friend): Likewise.
18234         * init.c (build_offset_ref): Likewise.
18235         * parse.y (structsp): Likewise.
18236         * pt.c (maybe_process_partial_specialization,
18237         tsubst_friend_function, instantiate_class_template, tsubst,
18238         do_type_instantiation, instantiate_pending_templates): Likewise.
18239         * repo.c (repo_get_id): Likewise.
18240         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
18241         synthesize_tinfo_var, emit_support_tinfos): Likewise.
18242         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
18243         * semantics.c (begin_class_definition): Likewise.
18244         * tree.c (build_cplus_method_type): Likewise.
18245         * typeck2.c (digest_init, build_functional_cast,
18246         add_exception_specifier): Likewise.
18247         * parse.h, parse.c: Regenerated.
18248
18249 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
18250
18251         * inc/cxxabi.h: New header file. Define new-abi entry points.
18252         (__pointer_type_info::target): Rename member to ...
18253         (__pointer_type_info::type): ... here.
18254         (__base_class_info::type): Rename member to ...
18255         (__base_class_info::base): ... here.
18256         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
18257         * cp-tree.h (CPTI_ABI): New global tree enumeration.
18258         (abi_node): New global tree node.
18259         * decl.c (abi_node): Document.
18260         (init_decl_processing): Initialize abi_node.
18261         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
18262         (get_vmi_pseudo_type_info): Likewise.
18263         (create_tinfo_types): Likewise.
18264         (emit_support_tinfos): Likewise.
18265         * tinfo.h (cxxabi.h): Include for new-abi.
18266         Move rtti class definitions to new header file.
18267         * tinfo.cc (abi): Use the namespace.
18268         (std): Move new abi rtti classes from here ...
18269         (__cxxabiv1): ... to here.
18270         * tinfo2.cc (cxxabi.h): Include for new-abi.
18271         Move rtti class definitions to new header file.
18272         (std): Move new abi rtti classes from here ...
18273         (__cxxabiv1): ... to here.
18274         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
18275         namespace.
18276
18277 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
18278             Jason Merrill  <jason@casey.cygnus.com>
18279
18280         * method.c (build_overload_int): Use host_integerp.
18281
18282 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
18283
18284         * init.c (build_offset_ref): Handle the case of a templated member
18285         function.
18286
18287 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18288
18289         * except.c (expand_exception_blocks): Clear catch_clauses_last.
18290
18291 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
18292
18293         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
18294         * class.c (check_bitfield_decl): Turn illegal bitfields into
18295         non-bitfields.
18296         (dfs_propagate_binfo_offsets): Adjust for new size_binop
18297         semantics.
18298         (dfs_offset_for_unshared_vbases): Likewise.
18299         * cvt.c (cp_convert_to_pointer): Convert NULL to a
18300         pointer-to-member correctly under the new ABI.
18301         * expr.c (cplus_expand_constant): Don't use cp_convert when
18302         turning an offset into a pointer-to-member.
18303         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
18304         when dereferencing them under the new ABI.
18305         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
18306         of pointers-to-members under the new ABI.
18307
18308         * class.c (check_bitfield_decl): Remove restriction on really long
18309         bitfields.
18310         (layout_class_type): Implement new ABI handling of bitfields
18311         longer than their types.
18312
18313 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18314
18315         * parse.y (extdefs): Call ggc_collect.
18316         * parse.c: Regenerated.
18317
18318 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
18319
18320         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
18321         (note_name_declared_in_class): Use OVL_CURRENT to get at a
18322         potential overload.
18323
18324 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18325
18326         * class.c (build_vbase_path): Use integer_zerop.
18327         (build_vtable_entry): Use tree_low_cst.
18328         (get_vfield_offset): Use bit_position.
18329         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
18330         Use tree_low_cst.
18331         (check_bitfield_decl): Set DECL_SIZE using convert.
18332         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
18333         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
18334         Use tree_low_cst.
18335         (finish_struct_1): Use bit_position.
18336         (dump_class_hierarchy): Use tree_low_cst.
18337         * cp-tree.h (min_precision): Add declaration.
18338         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
18339         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
18340         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
18341         * expr.c (cplus_expand_constant): Use bit_position.
18342         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
18343         * rtti.c (get_base_offset): Use bit_position.
18344         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
18345         host_integerp, and tree_low_cst.
18346         (pointer_int_sum): Use integer_zerop.
18347         (build_component_addr): Use bit_position.
18348
18349 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
18350
18351         * typeck.c (require_complete_type): Don't assume size_zero_node.
18352         (complete_type_or_else): Likewise.
18353
18354 2000-03-16  Steven Grady <grady@digitaldeck.com>
18355             Jason Merrill  <jason@casey.cygnus.com>
18356
18357         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
18358
18359 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
18360
18361         * decl2.c (grokfield): Bail out if type is error_mark_node.
18362
18363 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
18364
18365         * tinfo2.cc (__ptr_to_member_data): Rename to ...
18366         (__pointer_to_member_data): ... here. Adjust.
18367         * rtti.c (create_tinfo_types): Adjust.
18368
18369 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
18370
18371         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
18372         * decl.c (ref_desc_type_node): Undocument.
18373         * rtti.c (ptr_ref_initializer): Rename to ...
18374         (ptr_initializer): ... here. Adjust comments.
18375         (ptmd_initializer): Fix comment thinko.
18376         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
18377         (create_tinfo_types): Remove ref_desc_type_node init.
18378         * tinfo2.cc (__reference_type_info): Remove.
18379
18380 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
18381
18382         * decl.c (cp_finish_decl): Remove obsolete comment.
18383
18384         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
18385
18386 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
18387
18388         * cp-tree.h: Tweak documentation.
18389         * class.c (build_vbase_pointer_fields): Layout the fields, too.
18390         (avoid_overlap): Remove.
18391         (get_binfo_offset_as_int): New function.
18392         (dfs_serach_base_offsets): Likewise.
18393         (layout_nonempty_base_or_field): Likewise.
18394         (build_base_field): Layout fields here.  Avoid placing two objects
18395         of the same type at the same address, under the new ABI.
18396         (build_base_fields): Adjust accordingly.
18397         (create_vtable_ptr): Return the new field, but don't attach it to
18398         TYPE_FIELDS.
18399         (remove_base_field): Remove.
18400         (remove_base_fields): Remove.
18401         (layout_basetypes): Adjust accordingly.
18402         (layout_class_type): Call layout_field for each field, rather than
18403         just making a wholesale call to layout_type.
18404
18405 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
18406
18407         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
18408
18409 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
18410
18411         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
18412
18413         * except.c (dtor_nothrow): New fn.
18414         (do_pop_exception): Use it.  Take type parm.
18415         (push_eh_cleanup): Take type parm.
18416         (expand_start_catch_block): Pass it.
18417         (build_eh_type_type_ref): Accept null type.
18418
18419 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
18420
18421         * cp-tree.h (revert_static_member_fn): Change prototype.
18422         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
18423         (grok_op_properties): Likewise.
18424         (start_function): Likewise.
18425         (revert_static_member_fn): Simplify.
18426         * pt.c (check_explicit_specialization): Adjust call to
18427         revert_static_member_fn.
18428
18429 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
18430
18431         * cp-tree.h (scope_kind): New type.
18432         (tmpl_spec_kind): Likewise.
18433         (declare_pseudo_global_level): Remove.
18434         (pseudo_global_level_p): Rename to template_parm_scope_p.
18435         (pushlevel): Remove declaration.
18436         (begin_scope): New function.
18437         (finish_scope): Likewise.
18438         (current_tmpl_spec_kind): Likewise.
18439         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
18440         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
18441         Add template_spec_p.
18442         (toplevel_bindings_p): Adjust.
18443         (declare_pseudo_global_level): Remove.
18444         (pseudo_global_level_p): Rename to template_parm_scope_p.
18445         (current_tmpl_spec_kind): New function.
18446         (begin_scope): Likewise.
18447         (finish_scope): Likewise.
18448         (maybe_push_to_top_level): Adjust.
18449         (maybe_process_template_type_declaration): Likewise.
18450         (pushtag): Likewise.
18451         (pushdecl_nonclass_level): Likewise.
18452         (lookup_tag): Likewise.
18453         (grokfndecl): Handle member template specializations.  Share
18454         constructor and non-constructor code.
18455         * decl2.c (check_classfn): Handle member template specializations.
18456         * pt.c (begin_template_parm_list): Use begin_scope.
18457         (begin_specialization): Likewise.
18458         (end_specialization): Likewise.
18459         (check_explicit_specialization): Use current_tmpl_spec_kind.
18460         Handle member template specializations.
18461         (end_template_decl): Use finish_scope.  Remove call to
18462         get_pending_sizes.
18463         (push_template_decl_real): Remove bogus error message.
18464         (tsubst_decl): Fix typo in code contained in comment.
18465         (instantiate_template): Handle member template specializations.
18466         (most_general_template): Likewise.
18467
18468 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
18469
18470         * lex.c (whitespace_cr): Compress consecutive calls to warning().
18471         (do_identifier): Ditto for error().
18472
18473         * pt.c (convert_nontype_argument): Ditto for cp_error().
18474         (convert_template_argument): Ditto for cp_pedwarn().
18475
18476 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
18477
18478         * exception.cc (__check_null_eh_spec): New fn.
18479         * except.c (expand_end_eh_spec): Call it if the spec is throw().
18480
18481 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
18482
18483         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
18484         * except.c (expand_end_eh_spec): Add the return type.
18485         * rtti.c (throw_bad_cast): Add the parmtypes.
18486         (throw_bad_typeid): Likewise.
18487
18488         * semantics.c (expand_stmt): Only leave out rtl for unused
18489         artificials, and set DECL_IGNORED_P on them as well.
18490         * decl.c (wrapup_globals_for_namespace): Likewise.
18491
18492 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
18493
18494         * decl.c (maybe_commonize_var): Skip all artificial decls.
18495         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
18496
18497 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
18498
18499         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
18500         * cp-tree.h: Declare flag_enforce_eh_specs.
18501         * decl.c (store_parm_decls, finish_function): Check it.
18502
18503         C library functions don't throw.
18504         * Makefile.in (cfns.h): New target.
18505         (except.o): Depend on it.
18506         * Make-lang.in (cc1plus): Depend on cfns.gperf.
18507         * cfns.gperf: New file.
18508         * cfns.h: Generated.
18509         * except.c: Include it.
18510         (nothrow_libfn_p): New fn.
18511         * decl.c (grokfndecl): Use it.
18512         * cp-tree.h: Declare it.
18513
18514         * decl.c (push_overloaded_decl_1, auto_function,
18515         define_function): Lose.
18516         (build_library_fn_1): New static fn.
18517         (builtin_function): Use it.
18518         (get_atexit_node): Use build_library_fn_ptr.
18519         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
18520         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
18521         push_void_library_fn, push_throw_library_fn): New fns.
18522         * cp-tree.h: Declare them.
18523         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
18524         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
18525         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
18526         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
18527         * rtti.c (build_runtime_decl): Lose.
18528         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
18529         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
18530         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
18531
18532         * call.c (build_call): Remove result_type parm.
18533         Call mark_used on unused artificial fns.
18534         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
18535
18536 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
18537
18538         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
18539         appropriate.
18540         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
18541         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
18542         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
18543         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
18544         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
18545         expand_generic_desc): Likewise.
18546
18547 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
18548
18549         * exception.cc (__cp_pop_exception): Cleanup the original object.
18550
18551 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
18552
18553         * decl.c (grok_op_properties): Merge conversion to void warning
18554         with other silly op warnings.
18555
18556 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
18557
18558         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
18559         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
18560
18561 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
18562
18563         * decl.c (cp_make_fname_decl): New function.
18564         (wrapup_globals_for_namespace): Don't emit unused static vars.
18565         (init_decl_processing): Remove comment about use of
18566         array_domain_type. Set make_fname_decl.
18567         (cp_finish_decl): Remove __FUNCTION__ nadgering.
18568         * semantics.c (begin_compound_stmt): Remove
18569         current_function_name_declared flagging.
18570         (expand_stmt): Don't emit unused local statics.
18571         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
18572         specially.
18573
18574 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
18575
18576         * typeck.c (convert_for_assignment): Don't look at array
18577         initializer.
18578         * call.c (convert_like_real): Likewise.
18579
18580 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
18581
18582         Add initial support for '\uNNNN' specifier.
18583         * lex.c (read_ucs): New fn.
18584         (readescape, skip_white_space): Call it.
18585         (is_extended_char, is_extended_char_1): New fns.
18586         (utf8_extend_token): New fn, #if 0'd out.
18587         (real_yylex): Treat extended chars like letters.
18588
18589         * search.c (note_debug_info_needed): Walk the bases even if we
18590         weren't deferring the type itself.
18591
18592 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18593
18594         * decl2.c (finish_objects): Constify a char*.
18595
18596         * method.c (emit_thunk): Likewise.
18597
18598 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
18599
18600         * typeck.c (dubious_conversion_warnings): Look through
18601         REFERENCE_TYPE.
18602
18603 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18604
18605         * class.c (dfs_modify_vtables): I is now unsigned.
18606         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
18607         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
18608         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
18609         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
18610         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
18611         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
18612         Call integer_all_onesp.
18613         * typeck2.c (process_init_constructor): Use compare_tree_int.
18614
18615         * lang-specs.h (as): Don't call if -syntax-only.
18616
18617 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
18618
18619         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
18620         RTL_EXPR_HAS_NO_SCOPE after all.
18621
18622 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
18623
18624         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
18625         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
18626         RTL_EXPR_HAS_NO_SCOPE.
18627
18628         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
18629         later.
18630
18631         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
18632
18633 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
18634
18635         * call.c (convert_like): Macrofy.
18636         (convert_like_with_context): New macro.
18637         (convert_like_real): Renamed from convert_like.  Add calling
18638         context parameters, for diagnostics. Add recursive flag.  Call
18639         dubious_conversion_warnings for outer conversion.
18640         (build_user_type_conversion): Use convert_like_with_context.
18641         (build_over_call): Likewise. Don't warn about dubious
18642         conversions here. Adjust convert_default_arg calls.
18643         (convert_default_arg): Add context parameters for diagnostics.
18644         Pass through to convert_like_with_context.
18645         * cp-tree.h (convert_default_arg): Add context parameters.
18646         (dubious_conversion_warnings): Prototype new function.
18647         * typeck.c (convert_arguments): Adjust convert_default_arg call.
18648         (dubious_conversion_warnings): New function, broken
18649         out of convert_for_assignment.
18650         (convert_for_assignment): Adjust.
18651
18652 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
18653
18654         * decl2.c (key_method): Break out from...
18655         (import_export_vtable, import_export_class): ...here.
18656
18657         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
18658         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
18659
18660         * search.c (note_debug_info_needed, dfs_debug_mark,
18661         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
18662         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
18663
18664 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
18665
18666         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
18667         typos.
18668
18669 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
18670
18671         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
18672         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
18673         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
18674         (lang_type): Split gets_new into has_new and has_array_new.
18675         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18676         (TYPE_GETS_NEW): Split into ...
18677         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
18678         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
18679         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
18680         (build_op_new_call): Don't declare.
18681         (build_new_1): Likewise.
18682         * call.c (build_op_new_call): Remove.
18683         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
18684         instead of TYPE_NEEDS_DESTRUCTOR.
18685         (finish_struct_bits): Likewise.
18686         (add_implicitly_declared_members): Likewise.
18687         (check_field_decl): Likewise.
18688         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
18689         correctly under the new ABI.
18690         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
18691         instead of TYPE_NEEDS_DESTRUCTOR.
18692         (initialize_local_var): Likewise.
18693         (destroy_local_var): Likewise.
18694         (cp_finish_decl): Likewise.
18695         (register_dtor_fn): Likewise.
18696         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
18697         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
18698         TYPE_VEC_DELETE_TAKES_SIZE here.
18699         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
18700         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
18701         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18702         (finish_destructor_body): Likewise.
18703         (maybe_build_cleanup_1): Likewise.
18704         * decl2.c (do_static_destruction): Likewise.
18705         * init.c (build_new_1): Make it static.
18706         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18707         (expand_cleanup_for_base): Likewise.
18708         (get_cookie_size): New function.
18709         (build_new_1): Handle array-new cookies correctly under the new
18710         ABI.
18711         (build_vec_delete_1): Likewise.
18712         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18713         (build_delete): Likewise.
18714         (build_vec_delete): Handle array-new cookies correctly under the new
18715         ABI.
18716         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18717         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
18718         TYPE_HAS_ARRAY_NEW_OPERATOR.
18719         * ptree.c (print_lang_type): Check them.
18720         * search.c (context_for_name_lookup): Fix typo in comment.
18721         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18722         * tree.c (break_out_cleanups): Likewise.
18723         (build_cplus_array_test_1): Likewise.
18724         (cp_build_qualified_type_real): Likewise.
18725         * typeck.c (complete_type): Likewise.
18726
18727         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
18728         the command-line, not the end.
18729
18730 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
18731
18732         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
18733
18734 2000-03-02  Tom Tromey  <tromey@cygnus.com>
18735
18736         * cp-tree.h (build_java_class_ref): Declare.
18737         * init.c (build_java_class_ref): No longer static.
18738         * except.c (expand_throw): Generate a Java-style `throw' if the
18739         thrown object is a "Java" object.
18740         (initialize_handler_parm): Generate a Java-style lookup of
18741         exception info if the caught object is a "Java" object.
18742         (catch_language, catch_language_init): New globals.
18743         (decl_is_java_type): New function.
18744         (expand_start_catch_block): Don't call push_eh_info() or
18745         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
18746         class reference to build_catch_block.
18747
18748 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18749
18750         * typeck.c (comptypes): Treat sizetype like its language equivalent.
18751
18752 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
18753
18754         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
18755         to merge reference/pointer code and fix incorrect warnings.
18756
18757 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
18758
18759         * search.c (protected_accessible_p): Use context_for_name_lookup.
18760
18761         * init.c (construct_virtual_bases): Fix thinko.
18762         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
18763
18764 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
18765
18766         * decl.c (current_function_decl): Move to toplev.c.
18767
18768 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
18769
18770         * pt.c (fn_type_unification): Unify return type, whenever
18771         provided.
18772         (get_bindings_real): Only pass return type when necessary.
18773         Remove explicit return type check.
18774         * class.c (resolve_address_of_overloaded_function): Pass desired
18775         return type to fn_type_unification.
18776
18777 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18778
18779         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
18780         DECL_FIELD_SIZE.
18781         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
18782         DECL_FIELD_SIZE.
18783         * rtti.c (expand_class_desc): Likewise.
18784         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
18785         (THUNK_VCALL_OFFSET): Likewise.
18786         (THUNK_DELTA): Reflect changes in ../tree.h.
18787
18788 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
18789
18790         * search.c (protected_accessible_p): Also allow the access if
18791         the member is public in DERIVED.  Lose TYPE parm.
18792         (friend_accessible_p): Lose TYPE parm.
18793         (accessible_p): Adjust.
18794
18795 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18796
18797         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
18798         on things that are not sizes; ssize_binop deleted.
18799         Call size_diffop when appropriate.
18800         (dfs_build_vcall_offset_vtbl_entries): Likewise.
18801         (build_primary_vtable, build_secondary_vtable): Likewise.
18802         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
18803         Variable I is HOST_WIDE_INT.
18804         (get_vfield_offset): Pass proper types to size_binop.
18805         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
18806         (finish_struct_1): Likewise.
18807         (skip_rtti_stuff): Arg N is now pointer to signed.
18808         (layout_class_type): Use size_zero_node.
18809         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
18810         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
18811         * decl.c (complete_arry_type): Pass proper types to size_binop.
18812         (xref_basetypes): BINFO_OFFSET is sizetype.
18813         * error.c (dump_expr): Don't use size_binop non-sizes.
18814         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
18815         * init.c (construct_virtual_bases): Fix type error.
18816         (build_vec_delete_1): Pass proper type to size_binop and don't
18817         fold result.
18818         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
18819         * rtti.c (get_base_offset): Pass proper type to size_binop.
18820         * search.c (dfs_find_vbases): Fix type error.
18821         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
18822         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
18823         * tree.c (debug_binfo): Variable N is signed.
18824         Use HOST_WIDE_INT_PRINT_DEC.
18825         * typeck.c (comptypes): sizetype is same as equivalent integer type.
18826         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
18827         size_one_node and size_zero_node.
18828         (c_alignof): Use size_one_node.
18829         (build_component_addr): Pass proper types to size_binop.
18830         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
18831
18832 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
18833
18834         Implement class scope using-declarations for functions.
18835         * class.c (handle_using_decl): Call add_method for used functions.
18836         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
18837         (add_method): Used functions are hidden by local functions.
18838         (check_bases_and_members): Handle using-decls before finalizing
18839         CLASSTYPE_METHOD_VEC.
18840         * call.c (add_function_candidate): Add ctype parm; if nonzero,
18841         override the type of 'this' accordingly.
18842         (add_template_candidate, add_template_candidate_real): Add ctype parm.
18843         (convert_class_to_reference, build_user_type_conversion_1,
18844         build_new_function_call, build_object_call, build_new_op,
18845         build_new_method_call): Pass ctype parm.
18846
18847         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
18848         the baselink.
18849         * call.c (convert_class_to_reference, build_user_type_conversion_1,
18850         build_new_function_call, build_object_call, build_new_op,
18851         build_new_method_call, build_op_delete_call): Don't get basetype_path
18852         from a baselink.
18853         * typeck.c (build_component_ref): Likewise.
18854         * init.c (build_offset_ref): Likewise.
18855         (resolve_offset_ref): Don't call enforce_access.
18856         Call build_scoped_ref.
18857         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
18858         would cause an error or if -pedantic.
18859         * class.c (alter_access): Lose binfo parm.
18860
18861 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
18862
18863         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
18864         types.
18865
18866 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
18867
18868         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
18869         pseudo_type_info creation into the std namespace
18870
18871 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
18872
18873         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
18874         (import_export_class): Remove declaration.
18875         * decl2.c (import_export_class): Make it static.
18876         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
18877         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
18878         EXPR_WITH_FILE_LOCATION.
18879         * lex.c (check_newline): Tweak filename/lineno setting.
18880         * semantics.c (begin_while_stmt): Fix typo in comment.
18881
18882 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18883
18884         * lang-options.h (-fmessage-length=): Add missing option.
18885
18886         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
18887
18888 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
18889
18890         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
18891
18892 2000-02-25  Jim Wilson  <wilson@cygnus.com>
18893
18894         * optimize.c (expand_call_inline): Emit the return label before
18895         evaluating the return value.
18896
18897 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
18898
18899         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
18900         than duplicating functionality here.
18901         * optimize.c: Include input.h.
18902         (expand_call_inline): Use push_srcloc and pop_srcloc.
18903         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
18904         * parse.c: Regenerated.
18905         * Makefile.in (lex.o): Depend on input.h.
18906         (optimize.o): Likewise.
18907
18908 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
18909
18910         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
18911         function type, rather than ICE.
18912
18913 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
18914
18915         * decl.c (grokdeclarator): Call decl_type_access_control.
18916         * parse.y (parse_end_decl): Don't call decl_type_access_control if
18917         decl is null.
18918
18919 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
18920
18921         * decl.c (decls_match): Remove obsolete static member nadgering.
18922
18923 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18924
18925         * decl.c (grokdeclarator): Change ANSI to ISO.
18926         * lex.c (consume_string, readescape, do_identifier): Likewise.
18927         (parse_float, real_yylex): Likewise.
18928         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
18929         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
18930         new_type_id, maybe_label_decls, simple_stmt,
18931         for.init.statement): Likewise.
18932         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
18933         * semantics.c (finish_named_return_value): Likewise.
18934         * parse.c: Regenerate.
18935
18936 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
18937
18938         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
18939         (CPTI_CLASS_STAR_TYPE): Remove.
18940         (vtable_index_type): Likewise.
18941         (class_star_type_node): Remove.
18942         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
18943         (build_binary_op_nodefault): Remove.
18944         * call.c (build_new_op): Use build_binary_op instead of
18945         build_binary_op_nodefault.
18946         * decl.c (init_decl_processing): Remove class_star_type_node
18947         initialization.  Make delta_type_node ptrdiff_type_node under the
18948         new ABI.  Initialize vtable_index_type.
18949         (build_ptrmemfunc_type): Build different structures for the new
18950         ABI.
18951         (build_enumerator): Use build_binary_op instead of
18952         build_binary_op_nodefault.
18953         * method.c (build_overload_value): Mangle pointers-to-members
18954         appropriately under the new ABI.
18955         * typeck.c (build_array_ref): Use build_binary_op instead of
18956         build_binary_op_nodefault.
18957         (get_member_function_from_ptrfunc): Adjust for the new ABI.
18958         (build_binary_op_nodefault): Rename to ...
18959         (build_binary_op): ... this.  Remove old version.  Adjust for
18960         pointer-to-member comparisons under the new ABI.
18961         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
18962         (build_ptrmemfunc): Adjust for the new ABI.
18963         (expand_ptrmemfunc_cst): Likewise.
18964         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
18965         (pfn_from_ptrmemfunc): Adjust for the new ABI.
18966
18967 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
18968
18969         * call.c (build_object_call): Compress consecutive calls to
18970         cp_error.
18971         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
18972         (build_op_delete_call): Adjust message formatting.
18973
18974         * class.c (check_bases): Compress consecutive calls to
18975         cp_pedwarn.
18976         (finish_struct_anon): Say 'ISO C++'.
18977
18978         * decl.c (start_decl): Same here.
18979         (grok_reference_init): Likewise.
18980         (grokfndecl): Correct message formatting.
18981         (grokfndecl): Improve diagnostic.
18982         (check_static_variable_definition): Likewise. Say 'ISO C++'
18983         (compute_array_index_type): Say 'ISO C++'
18984         (create_array_type_for_decl): Compress consecutive calls to
18985         cp_error.
18986         (grokdeclarator): Say 'ISO C++'
18987         (grok_op_properties): Likewise.
18988
18989         * decl2.c (delete_sanity): Clairify diagnostic.
18990         (check_member_template): Same here.
18991         (grok_function_init): Use consistent terminology.
18992
18993         * expr.c (do_case): Say 'ISO C++'
18994
18995         * friend.c (do_friend): Compress consecutive calls to warning.
18996
18997 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
18998
18999         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
19000         * class.c (build_secondary_vtable): Reorganize.  Don't create a
19001         new vtable under the new ABI.
19002         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
19003         computing the size.
19004         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
19005         the initializing elements.
19006         (initialize_vtable): New function.
19007         (dfs_finish_vtbls): Use it.
19008         (dfs_accumulate_vtbl_inits): New function.
19009         (finish_vtbls): Merge primary and secondary vtables under the new
19010         ABI.
19011         (finish_struct_1): Remove redundant call to layout_vtable_decl.
19012         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
19013         aren't VAR_DECLs.
19014
19015         * class.c (build_vtable): New function, split out from ...
19016         (get_vtable_decl): ... here, and ...
19017         (build_secondary_vtable): ... here.
19018
19019         * pt.c (tsubst_decl): Fix formatting.
19020
19021 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19022
19023         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
19024         (avoid_overlap, build_base_field): Likewise.
19025         (build_base_field, build_base_fields, is_empty_class):
19026         Test DECL_SIZE with integer_zero.
19027         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
19028         * cp-tree.h (struct lang_type): New field size_unit.
19029         (CLASSTYPE_SIZE_UNIT): New macro.
19030         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
19031         (cp_finish_decl): Delete -Wlarger-than processing.
19032         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
19033         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
19034         * tree.c (make_binfo): binfo vector is one entry longer.
19035         (walk_tree): Walk DECL_SIZE_UNIT.
19036
19037 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
19038
19039         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
19040         comment.
19041         (build_vtable_entry): Don't assume all vtable entries are
19042         functions.
19043         (build_vtbl_initializer): Adjust accordingly.
19044         (get_vtable_decl): Fix formatting.
19045
19046 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
19047
19048         * semantics.c (deferred_type_access_control): Walk the entire
19049         type_lookups list.
19050         (save_type_access_control): Rename from
19051         initial_deferred_type_access_control.  Just remember the value.
19052         (decl_type_access_control): New fn.
19053         (begin_function_definition): Use deferred_type_access_control, after
19054         we've started the function.  Set type_lookups to error_mark_node.
19055         * parse.y (frob_specs, fn.def1): Adjust.
19056         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
19057         (parse_end_decl, parse_bitfield0, parse_method): New fns.
19058         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
19059         (after_type_component_declarator0): Likewise.
19060         (after_type_component_declarator): Likewise.
19061         (notype_component_declarator): Likewise.
19062         * cp-tree.h: Adjust.
19063
19064         * decl.c (redeclaration_error_message): Allow redeclaration of
19065         namespace-scope decls.
19066
19067 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
19068
19069         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
19070
19071 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
19072
19073         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
19074         * decl2.c (grokclassfn): Likewise.
19075
19076         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
19077
19078         * decl2.c (lang_decode_option): Don't set default message length
19079         here.
19080         * lex.c (lang_init_options): Set it here.
19081
19082 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
19083
19084         Make DECL_CONTEXT mean the class in which a member function was
19085         declared, even for a virtual function.
19086         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
19087         (DECL_FRIEND_CONTEXT): New macro.
19088         (DECL_REAL_CONTEXT): Remove.
19089         (SET_DECL_FRIEND_CONTEXT): Likewise.
19090         (DECL_VIRTUAL_CONTEXT): Adjust.
19091         (DECL_CLASS_SCOPE_P): Use TYPE_P.
19092         (add_friends): Remove.
19093         (hack_decl_function_context): Likewise.
19094         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
19095         CP_DECL_CONTEXT.
19096         (build_over_call): Fix indentation.  Use DECL_CONTEXT
19097         instead of DECL_CLASS_CONTEXT.
19098         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
19099         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
19100         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19101         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
19102         (build_base_field): Likewise.
19103         (finish_struct_1): Likewise.
19104         (build_self_reference): Likewise.
19105         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
19106         DECL_REAL_CONTEXT.
19107         (pushtag): Use decl_function_context, not
19108         hack_decl_function_context.
19109         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19110         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
19111         (pushdecl): Remove bogus code.
19112         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
19113         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19114         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19115         Use decl_function_context, nothack_decl_function_context.
19116         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
19117         (grokdeclarator): Likewise.  Use decl_function_context, not
19118         hack_decl_function_context.
19119         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
19120         (start_function): Use DECL_FRIEND_CONTEXT, not
19121         DECL_CLASS_CONTEXT.  Use decl_function_context, not
19122         hack_decl_function_context.
19123         (finish_function): Use decl_function_context, not
19124         hack_decl_function_context.
19125         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
19126         DECL_CLASS_CONTEXT.
19127         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
19128         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
19129         (grokfield): Likewise.
19130         (finish_builtin_type): Likewise.
19131         (finish_vtable_vardec): Use decl_function_context, not
19132         hack_decl_function_context.
19133         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19134         (start_static_initialization_or_destruction): Likewise.
19135         (finish_static_initialization_or_destruction): Likewise.
19136         (mark_used): Adjust logic for deciding when to synthesize methods.
19137         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
19138         DECL_REAL_CONTEXT.
19139         * error.c (dump_function_decl): Use DECL_CONTEXT, not
19140         DECL_CLASS_CONTEXT.
19141         * friend.c (is_friend): Likewise.
19142         (add_friends): Remove.
19143         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
19144         * lex.c (begin_definition_of_inclass_inline): Use
19145         decl_function_context, not hack_decl_function_context.
19146         (process_next_inline): Likewise.
19147         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19148         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
19149         DECL_CLASSS_CONTEXT.
19150         (hack_identifier): Likewise.
19151         (synthesize_method):  Use decl_function_context, not
19152         hack_decl_function_context.
19153         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
19154         DECL_REAL_CONTEXT.
19155         (is_member_template): Use decl_function_context, not
19156         hack_decl_function_context.  Use DECL_CONTEXT, not
19157         DECL_CLASS_CONTEXT.
19158         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
19159         DECL_CLASS_CONTEXT.
19160         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
19161         DECL_REAL_CONTEXT.
19162         (push_template_decl_real): Likewise.
19163         (instantiate_class_template): Don't call add_friends.
19164         (tsubst_default_argument): Use DECL_CONTEXT, not
19165         DECL_REAL_CONTEXT.
19166         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
19167         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19168         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
19169         DECL_CLASS_CONTEXT.
19170         * repo.c (repo_inline_used): Likewise.
19171         * search.c (current_scope): Adjust for new _CONTEXT macros.
19172         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
19173         DECL_REAL_CONTEXT.
19174         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19175         (lookup_fnfields_here):Likewise.
19176         (check_final_overrider): Likewise.
19177         (init_vbase_pointers): Likewise.
19178         (virtual_context): Likewise.
19179         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
19180         (expand_body): Use decl_function_context, not
19181         hack_decl_function_context.
19182         * tree.c (hack_decl_function_context): Remove.
19183         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
19184         DECL_CLASS_CONTEXT.
19185         * typeck2.c (error_not_base_type): Likewise.
19186
19187 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
19188
19189         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
19190
19191 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19192
19193         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
19194
19195 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
19196
19197         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
19198
19199 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
19200
19201         * decl2.c (lang_decode_option): Enable automatic line wrapping.
19202
19203 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
19204
19205         * parse.y (frob_specs): Split out...
19206         (parse_decl): From here.
19207         (fn.def2): Call initial_deferred_type_access_control.
19208         (after_type_component_declarator0): Call frob_specs.
19209         (notype_component_declarator0): Likewise.
19210         * search.c (friend_accessible_p): Nested classes are friends of their
19211         enclosing classes.
19212
19213 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
19214
19215         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
19216         used to create an implicit temporary.
19217
19218         * class.c (dfs_modify_vtables): Tweak calculation of functions to
19219         override.
19220
19221 2000-02-08  Nathan Sidwell  <nathan@acm.org>
19222
19223         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
19224         strip array element qualifiers too.
19225
19226 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
19227
19228         * decl.c (store_parm_decls): Don't build cleanups for parameters
19229         while processing_template_decl.
19230
19231 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
19232
19233         * cp-tree.h (struct saved_scope): Add incomplete field.
19234         (namespace_scope_incomplete): New macro.
19235         * decl.c (pushdecl): Use it.
19236         (hack_incomplete_structures): Use it.  See through artificial
19237         binding levels.
19238         (mark_saved_scope): Mark it.
19239
19240         Implement access control for nested types.
19241         * search.c (type_access_control): New fn.
19242         (accessible_p): Now we do perform access control for types.
19243         * semantics.c (deferred_type_access_control): New fn.
19244         (initial_deferred_type_access_control): New fn.
19245         (begin_function_definition): Call it.  Add lookups parm.
19246         * decl.c (struct binding_level): Add this_class field.
19247         (pushlevel_class): Set it.
19248         (mark_binding_level): Mark it.
19249         (lookup_name_real): Use it.  Call type_access_control.
19250         (mark_saved_scope): Mark lookups field.
19251         * cp-tree.h (flagged_type_tree): Add lookups field.
19252         (struct saved_scope): Add lookups field.
19253         (type_lookups): New macro.
19254         * parse.y (declmods): Now <ftype>.
19255         (parse_decl): Add lookups parm.  Call
19256         initial_deferred_type_access_control.
19257         (lang_extdef): Clear type_lookups.
19258         (typed_declspecs, declmods, typespec): Set lookups field.
19259         (initdcl): Call deferred_type_access_control.
19260         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
19261         component_decl_1, named_parm): Adjust.
19262         * friend.c (is_friend): Nested classes are friends of their
19263         enclosing classes.
19264
19265         * class.c (currently_open_derived_class): New fn.
19266         * method.c (hack_identifier): Use it.
19267
19268         * lex.c (do_identifier): Remove obsolete code.
19269
19270         * parse.y (typed_typespecs): Propagate new_type_flag properly.
19271
19272 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
19273
19274         * tinfo.h: Remove apostrophes from C++ comment (xgettext
19275         thinks this file is plain C).
19276
19277 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19278
19279         * Makefile.in (call.o): Depend on $(EXPR_H).
19280
19281         * call.c: Include "expr.h".
19282
19283         * class.c (dump_class_hierarchy): Add prototype.
19284
19285         * search.c (dfs_get_pure_virtuals): Likewise.
19286
19287 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
19288
19289         * parse.y (simple_stmt): Allow :: token in asm parameter list.
19290         * parse.c: Rebuilt.
19291
19292 2000-01-31  Jim Wilson  <wilson@cygnus.com>
19293
19294         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
19295         Store it in DECL_FCONTEXT.
19296         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
19297
19298 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
19299
19300         * tinfo.h (old abi): #include "tconfig.h".
19301         * tinfo.cc (convert_to_base): Move into old abi section.
19302
19303 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
19304
19305         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
19306         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
19307         (BINFO_PRIMARY_BINFO): New macro.
19308         (BF_DELTA): Rename to ...
19309         (BV_DELTA): ... this.
19310         (BF_VCALL_INDEX): Rename to ...
19311         (BV_VCALL_INDEX): ... this.
19312         (BF_FN): Rename to ...
19313         (BV_FN): ... this.
19314         * class.c (build_vbase_path): Adjust for changes to reverse_path.
19315         (set_rtti_entry): Rename BF_ macros to BV_ variants.
19316         (modify_vtable_entry): Simplify.
19317         (add_virtual_function): Rename BF_ macros to BV_ variants.
19318         (build_vtable_initializer): Likewise.
19319         (get_class_offset_1): Remove.
19320         (dfs_get_class_offset): Likewise.
19321         (get_class_offset): Likewise.
19322         (dfs_find_final_overrider): New function.
19323         (find_final_overrider): Likewise.
19324         (modify_one_vtable): Remove.
19325         (dfs_find_base): New function.
19326         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
19327         find_final_overrider.
19328         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
19329         virtuals.
19330         (dfs_fixup_vtable_deltas): Remove.
19331         (override_one_vtable): Remove.
19332         (merge_overrides): Likewise.
19333         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
19334         unreal chilren of virtual bases.
19335         (finish_struct_1): Don't use merge_overrides.  Don't use
19336         dfs_fixup_vtable_deltas.
19337         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
19338         BINFOs.
19339
19340 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
19341             Jason Merrill  <jason@yorick.cygnus.com>
19342
19343         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
19344
19345 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
19346
19347         * exception.cc (__throw_bad_typeid): Add missing std::.
19348
19349 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19350
19351         * cp-tree.h (make_thunk): PROTO -> PARAMS.
19352
19353 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
19354
19355         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
19356
19357         Runtime support for new-abi rtti.
19358         * inc/typeinfo (type_info::operator!=): Define in class.
19359         (type_info::before, type_info::name, type_info::operator==,
19360         type_info::operator!=): Define new ABI implementations.
19361         (type_info::is_pointer_p, type_info::is_function_p): Declare
19362         new virtual functions.
19363         (type_info::do_catch, type_info::do_upcast): Likewise.
19364
19365         * tinfo.h (__base_class_info): Define new class.
19366         (__class_type_info): Likewise.
19367         (__si_class_type_info): Likewise.
19368         (__vmi_class_type_info): Likewise.
19369         (__dynamic_cast): Prototype.
19370
19371         * tinfo.cc: Conditionalize old and new rtti mechanisms.
19372         (type_info::is_pointer_p): Define new function.
19373         (type_info::is_function_p): Likewise.
19374         (type_info::do_catch): Likewise.
19375         (type_info::do_upcast): Likewise.
19376         (vtable_prefix): New structure for vtable access.
19377         (adjust_pointer): Define new template function.
19378         (contained_p, public_p, virtual_p, contained_public_p,
19379         contained_nonpublic_p, contained_nonvirtual_p): Define new
19380         functions.
19381         (nonvirtual_base_type): New local variable.
19382         (__class_type_info::~__class_type_info): Define.
19383         (__si_class_type_info::~__si_class_type_info): Likewise.
19384         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
19385         (__class_type_info::do_catch): Define new function.
19386         (__class_type_info::do_upcast): Likewise.
19387         (__class_type_info::find_public_src): Likewise.
19388         (__class_type_info::do_find_public_src): Likewise.
19389         (__si_class_type_info::do_find_public_src): Likewise.
19390         (__vmi_class_type_info::do_find_public_src): Likewise.
19391         (__class_type_info::do_dyncast): Likewise.
19392         (__si_class_type_info::do_dyncast): Likewise.
19393         (__vmi_class_type_info::do_dyncast): Likewise.
19394         (__class_type_info::do_upcast): Likewise.
19395         (__si_class_type_info::do_upcast): Likewise.
19396         (__vmi_class_type_info::do_upcast): Likewise.
19397         (__dynamic_cast): Likewise.
19398
19399         * tinfo2.cc (__fundamental_type_info): Define new class.
19400         (__pointer_type_info): Likewise.
19401         (__reference_type_info): Likewise.
19402         (__array_type_info): Likewise.
19403         (__function_type_info): Likewise.
19404         (__enum_type_info): Likewise.
19405         (__ptr_to_member_type_info): Likewise.
19406         (__fundamental_type_info::~__fundamental_type_info): Define.
19407         (__pointer_type_info::~__pointer_type_info): Likewise.
19408         (__reference_type_info::~__reference_type_info): Likewise.
19409         (__array_type_info::~__array_type_info): Likewise.
19410         (__function_type_info::~__function_type_info): Likewise.
19411         (__enum_type_info::~__enum_type_info): Likewise.
19412         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
19413         (__pointer_type_info::do_catch): Define new function.
19414         (__ptr_to_member_type_info::do_catch): Define new function.
19415
19416         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
19417         (__is_pointer): Likewise.
19418
19419         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
19420
19421 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
19422
19423         * cp/class.c (build_vtable): Rename to build_primary_vtable.
19424         (prepare_fresh_vtable): Rename to build_secondary_vtable.
19425         (make_new_vtable): New function.
19426         (modify_vtable_entry): Handle generation of new vtables correctly.
19427         (modify_one_vtable): Remove unused parameter.
19428         (dfs_fixup_vtable_deltas): Likewise.
19429         (override_one_vtable): Use build_secondary_vtable.
19430         (finish_struct_1): Use build_primary_vtable and
19431         build_secondary_vtable.
19432
19433 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
19434
19435         * cp/decl.c: Adjust variable names, comments, help strings.
19436
19437 2000-01-29  Nathan Sidwell  <nathan@acm.org>
19438
19439         * new2.cc (operator delete[]): Use operator delete, don't assume
19440         implementation.
19441
19442 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
19443
19444         * class.c (build_vtbl_initializer): Add argument to
19445         build_vtable_entry call.
19446
19447 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
19448
19449         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
19450         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
19451         (BF_DELTA): New macro.
19452         (BF_VCALL_INDEX): Likewise.
19453         (BF_FN): Likewise.
19454         (THUNK_VCALL_OFFSET): Likewise.
19455         (make_thunk): Change prototype.
19456         * class.c (build_vtable_entry): Integrate
19457         build_vtable_entry_for_fn.  Handle vcall indices.
19458         (build_vtable_entry_for_fn): Remove.
19459         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
19460         BF_VCALL_INDEX, BF_FN.
19461         (modify_vtable_entry): Integrate common code from
19462         modify_one_vtable and dfs_fixup_vtable_deltas.
19463         (add_virtual_function): Set BF_VCALL_INDEX.
19464         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
19465         and BF_FN.
19466         (modify_one_vtable): Simplify.
19467         (dfs_fixup_vtable_deltas): Likewise.
19468         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
19469         * method.c (make_thunk): Handle vcall indices.
19470
19471 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
19472
19473         Compiler side new abi rtti (not enabled).
19474         * cp-tree.h (new_abi_rtti_p): New macro.
19475         (emit_support_tinfos): Prototype new function.
19476         (tinfo_decl_p): Likewise.
19477         (emit_tinfo_decl): Likwise.
19478         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
19479         macros.
19480         (doing_runtime): New local static.
19481         (init_rtti_processing): Add new-abi initializer.
19482         (get_tinfo_decl): Add new-abi logic.
19483         (tinfo_from_decl): Likewise.
19484         (build_dynamic_cast_1): Likewise.
19485         (qualifier_flags): New static function.
19486         (tinfo_base_init): Likewise.
19487         (generic_initializer): Likewise.
19488         (ptr_ref_initializer): Likewise.
19489         (ptmd_initializer): Likewise.
19490         (class_hint_flags): Likewise.
19491         (class_initializer): Likewise.
19492         (synthesize_tinfo_var): Likewise.
19493         (create_real_tinfo_var): Likewise.
19494         (create_pseudo_type_info): Likewise.
19495         (get_vmi_pseudo_type_info): Likewise.
19496         (create_tinfo_types): Likewise.
19497         (emit_support_tinfos): New global function.
19498         (tinfo_decl_p): New global predicate.
19499         (emit_tinfo_decl): New global function.
19500         * class.c (set_rtti_entry): Generalize for old and new rtti.
19501         (build_vtbl_initializer): Likewise.
19502         * decl2.c (finish_file): Likewise.
19503
19504 2000-01-27  Jim Wilson  <wilson@cygnus.com>
19505
19506         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
19507         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
19508
19509 2000-01-27  Mike Stump  <mrs@wrs.com>
19510
19511         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
19512         for scopes.
19513
19514 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
19515
19516         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
19517
19518 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
19519
19520         * optimize.c (calls_setjmp_r): Supply new argument
19521         to special_function_p.
19522
19523 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19524
19525         * call.c: PROTO -> PARAMS.
19526         * class.c: Likewise.
19527         * cp-tree.h: Likewise.
19528         * cvt.c: Likewise.
19529         * decl.c: Likewise.
19530         * decl.h: Likewise.
19531         * decl2.c: Likewise.
19532         * dump.c: Likewise.
19533         * errfn.c: Likewise.
19534         * error.c: Likewise.
19535         * except.c: Likewise.
19536         * expr.c: Likewise.
19537         * init.c: Likewise.
19538         * input.c: Likewise.
19539         * lex.c: Likewise.
19540         * lex.h: Likewise.
19541         * method.c: Likewise.
19542         * optimize.c: Likewise.
19543         * parse.y: Likewise.
19544         * pt.c: Likewise.
19545         * repo.c: Likewise.
19546         * rtti.c: Likewise.
19547         * search.c: Likewise.
19548         * semantics.c: Likewise.
19549         * spew.c: Likewise.
19550         * tree.c: Likewise.
19551         * typeck.c: Likewise.
19552         * typeck2.c: Likewise.
19553         * xref.c: Likewise.
19554
19555 2000-01-25  Richard Henderson  <rth@cygnus.com>
19556
19557         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
19558
19559 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
19560
19561         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
19562         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
19563         (struct vcall_offset_data_s): New type.
19564         (dfs_vcall_offset_queue_p): New function.
19565         (dfs_build_vcall_offset_vtbl_entries): Likewise.
19566         (build_vcall_offset_vtbl_entries): Likewise.
19567         (layout_vtable_decl): Likewise.
19568         (num_vfun_entries): Likewise.
19569         (num_extra_vtbl_entries): Add the entries for vcall offsets.
19570         (build_vtbl_initializer): Likewise.
19571         (dfs_finish_vtabls): Use layout_vtable_decl.
19572         (modify_one_vtables): Always duplicate vtables under the new ABI.
19573         (finish_struct_1): Use layout_vtable_decl.
19574
19575 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19576
19577         * decl.c (member_function_or_else): Change third arg from a format
19578         specifier to an `enum overload_flags'.  Callers changed.
19579
19580 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
19581
19582         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
19583         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
19584         build_const_cast, get_delta_difference, check_return_expr): Avoid
19585         ANSI string concatenation usage.
19586
19587 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
19588
19589         * class.c (layout_class_type): Put the fields required to make a
19590         class non-empty at the end, not the beginning, of the TYPE_FIELDs
19591         list.
19592
19593 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
19594
19595         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
19596         template.
19597
19598         * decl2.c (mark_used): Do instantiate inlines that have been
19599         explicitly instantiated.
19600
19601 2000-01-24  Richard Henderson  <rth@cygnus.com>
19602
19603         * call.c (build_over_call): Use expand_tree_builtin.
19604         * typeck.c (build_function_call_real): Likewise.
19605         (build_binary_op_nodefault): Handle unordered compares.
19606
19607 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
19608
19609         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
19610         cp_tree_index values.
19611         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
19612         New global node #defines for them.
19613         * rtti.c (call_void_fn): Replace with ...
19614         (build_runtime_decl): ... new static function.
19615         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
19616         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
19617         (build_dynamic_cast_1): Always produce correctly typed result.
19618         Explicitly produce type_info addresses. Use dynamic_cast_node.
19619         * exception.cc (__throw_bad_cast): Return `void *'.
19620         (__throw_bad_typeid): Return `const type_info &'.
19621
19622 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
19623
19624         * cp-tree.h (get_vtable_decl): Prototype new function.
19625         * class.c (get_vtable_decl): New function. Broken out from ...
19626         (build_vtable): ... here. Use it.
19627         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
19628         by get_vtable_decl.
19629
19630 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
19631
19632         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
19633         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
19634         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
19635         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
19636         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
19637         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
19638         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
19639         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
19640         (CPTI_TINFO_VAR_ID): New enumeration.
19641         (__tp_desc_type_node, __access_mode_type_node,
19642         __bltn_desc_type_node, __user_desc_type_node,
19643         __class_desc_type_node, __ptr_desc_type_node,
19644         __attr_desc_type_node, __func_desc_type_node,
19645         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
19646         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
19647         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
19648         enum_desc_type_node, class_desc_type_node,
19649         si_class_desc_type_node, vmi_class_desc_type_node,
19650         ptmd_desc_type_node, base_desc_type_node): New #defines.
19651         (tinfo_fn_id, tinfo_fn_type): Rename to ...
19652         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
19653         (tinfo_var_id): New enumeration.
19654         (DECL_TINFO_FN_P): Augment comment.
19655         * decl.c (cp_global_trees): Adjust documentation.
19656         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
19657         tinfo_decl_type and tinfo_var_id.
19658         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
19659         (build_typeid): Remove unused variable.
19660         (get_tinfo_var): Use tinfo_var_id.
19661         (tinfo_name): New static function.
19662         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
19663         (tinfo_from_decl): Likewise.
19664         (get_base_offset): New static function, broken out of
19665         expand_class_desc.
19666         (expand_si_desc): Use tinfo_name.
19667         (expand_class_desc): Likewise. Lose local static variable.
19668         Use base_desc_type_node. Use get_base_offset.
19669         (expand_ptr_desc): Use tinfo_name.
19670         (expand_attr_desc): Likewise.
19671         (expand_generic_desc): Likewise.
19672
19673         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
19674         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
19675
19676 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
19677
19678         * cp-tree.h (__eprintf): Remove declaration.
19679         * tree.c (__eprintf): Remove definition.
19680
19681 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
19682             Mark Mitchell  <mark@codesourcery.com>
19683
19684         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
19685         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
19686
19687 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
19688
19689         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
19690
19691 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
19692
19693         * cp-tree.h (register_dtor_fn): New function.
19694         * decl.c (destroy_local_static): Rename to ...
19695         (register_dtor_fn): ... this.  Give it external linkage.
19696         (expand_static_init): Use it.
19697         * decl2.c (do_static_initialization): Likewise, if using
19698         __cxa_atexit.
19699         (do_static_destruction): Check that __cxa_atexit is not in use.
19700         (finish_file): Don't call do_static_destruction if using
19701         __cxa_atexit.
19702
19703         * typeck.c (convert_arguments): Restore two-message error
19704         reporting.
19705
19706 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
19707
19708         Remap dynamic cast hint values to be consistent across ABIs.
19709         * search.c (dynamic_cast_base_recurse): Remap generated value.
19710         (get_dynamic_cast_base_type): Adjust documentation.
19711         * tinfo.h (__user_type_info::dyncast): Likewise.
19712         (__user_type_info::find_public_subobj): Remap BOFF meaning.
19713         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
19714         (__class_type_info::do_dyncast): Likewise.
19715         (__class_type_info::do_find_public_subobj): Likewise.
19716         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
19717
19718 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
19719
19720         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
19721
19722         * typeck2.c (incomplete_type_error): Restore previous
19723         cp_error and cp_error_at call sequence.
19724
19725 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
19726
19727         * class.c (dump_class_hierarchy): Make format agree with argument;
19728         cast pointer to unsigned long and print with %lx.
19729
19730 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
19731
19732         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
19733
19734         * typeck.c (composite_pointer_type, common_type,
19735         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
19736         build_function_call_real, convert_arguments,
19737         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
19738         build_unary_op, mark_addressable, build_compound_expr,
19739         build_static_cast, build_reinterpret_cast, build_const_cast,
19740         build_c_cast, build_modify_expr, get_delta_difference,
19741         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
19742         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
19743         into a single one.
19744         * typeck2.c (readonly_error, abstract_virtuals_error,
19745         process_init_constructor, check_for_new_type): Likewise.
19746
19747 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
19748
19749         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
19750         VAR_DECLs.
19751
19752 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
19753
19754         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
19755         (build_x_typeid): Likewise.
19756         (get_tinfo_fn): Likewise.
19757         (get_tinfo_fn_unused): Rename to ...
19758         (get_tinfo_decl): ... here.
19759         * rtti.c (build_headof): Replace logic error with assertion.
19760         (get_tinfo_fn_dynamic): Rename to ...
19761         (get_tinfo_decl_dynamic): ... here. Make static. Use
19762         complete_type_or_else.
19763         (build_x_typeid): Move into ...
19764         (build_typeid): ... here. Adjust call to
19765         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
19766         throw_bad_typeid expression.
19767         (get_tinfo_fn_unused): Rename to ...
19768         (get_tinfo_decl): ... here. Adjust comment.
19769         (get_tinfo_fn): Delete.
19770         (tinfo_from_decl): New static function.
19771         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
19772         (get_typeid): Use complete_type_or_else.
19773         (build_dynamic_cast_1): Adjust calls to
19774         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
19775         * parse.y (primary): Adjust call to build_typeid.
19776         * except.c (build_eh_type_type_ref): Adjust call to
19777         get_tinfo_decl. Mark as used.
19778         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
19779         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
19780         * parse.c: Regenerated.
19781
19782 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
19783
19784         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
19785         calling convention.
19786         (resolves_to_fixed_type_p): Document calling convention.
19787         * rtti.c (build_x_typeid): Initialize NONNULL.
19788
19789         * cp-tree.h (build_shared_int_cst): New function.
19790         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
19791         * class.c (modify_vtable_entry): Likewise.
19792         (add_virtual_function): Split out code to generated shared
19793         INTEGER_CSTs to build_share_int_cst.
19794         (modify_all_vtables): Handle all the overridden functions here.
19795         Add overridden functions from non-primary virtual bases to the
19796         primary vtable.
19797         (finish_struct_1): Adjust call to modify_all_vtables.  Add
19798         overridden functions from non-primary bases to the vtable.
19799         * tree.c (build_shared_int_cst): New function.
19800
19801         * cp-tree.h (scratchalloc): Remove.
19802         (build_scratch_list): Likewise.
19803         * call.c (convert_class_to_reference): Replace build_scratch_list
19804         and build_expr_list with build_tree_list.
19805         (add_candidate): Replace scratchalloc with expralloc.  Note memory
19806         leak.
19807         (build_user_type_conversion_1):  Replace build_scratch_list
19808         and build_expr_list with build_tree_list.
19809         (build_new_op): Likewise.
19810         (build_op_delete_call): Likewise.
19811         (convert_like): Likewise.
19812         * cvt.c (ocp_convert): Likewise.
19813         * decl.c (start_decl): Likewise.
19814         (start_function): Likewise.
19815         (finish_destructor_body): Likewise.
19816         (maybe_build_cleanup_1): Likewise.
19817         * decl2.c (reparse_decl_as_expr): Likewise.
19818         * init.c (perform_member_init): Likewise.
19819         (expand_cleanup_for_base): Likewise.
19820         (build_builtin_delete_call): Likewise.
19821         (build_new_1): Likewise.
19822         (build_delete): Likewise.
19823         * method.c (do_build_assign_ref): Likewise.
19824         * parse.y (already_scoped_stmt): Likewise.
19825         (nontrivial_exprlist): Likewise.
19826         (net_initializer): Likewise.
19827         (initlist): Likewise.
19828         * parse.c: Regenerated.
19829         * rtti.c (build_x_typeid): Likewise.
19830         (build_dynamic_cast_1): Likewise.
19831         * typeck.c (build_x_compound_expr): Likewise.
19832         (build_static_cast): Likewise.
19833         (build_modify_expr): Likewise.
19834
19835         * cp-tree.h (DECL_VINDEX): Add documentation.
19836         * class.c (build_vtable_entry): Likewise.
19837         (start_vtable): Add comment.
19838         (add_virtual_function): Replace pending_hard_virtuals with
19839         overridden_virtuals and pending_virtuals with new_virtuals.
19840         Replace redundant assignments with assertions.
19841         (check_for_override): Add comment.
19842         (check_bases_and_members): Replace pending_hard_virtuals with
19843         overridden_virtuals and pending_virtuals with new_virtuals.
19844         (create_vtbl_ptr): Likewise.
19845         (layout_class_type): Likewise.
19846         (finish_struct_1): Likewise.  Add comments.
19847
19848 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
19849
19850         * class.c (finish_struct_1): Replace redundant code with
19851         assertions.
19852
19853         * cp-tree.h (flag_new_abi): Move.
19854         (flag_use_cxa_atexit): Likewise.
19855         (flag_honor_std): Likewise.
19856         (flag_rtti): Likewise.
19857         (vbase_offsets_in_vtable_p): Define.
19858         (vptrs_present_everywhere_p): Likewise.
19859         (TYPE_CONTAINS_VPTR_P): Likewise.
19860         (dfs_walk_real): Declare.
19861         * class.c (build_vbase_pointer_fields): Check
19862         vbase_offsets_in_vtable_p.
19863         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
19864         BINFO_VPTR_FIELD.
19865         (build_vbase_offset_vtbl_entries): Simplify.
19866         (build_vbase_offset_vtbl_entries): Adjust.
19867         (build_vbase_pointer): Add ability to look up vbase offsets in
19868         vtable.
19869         (start_vtable): New function.
19870         (add_virtual_function): Use it.
19871         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
19872         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
19873         (build_vtbl_initializer): Take the type of the complete object as
19874         input.  Use it to correctly calculate vbase offsets.
19875         (dfs_finish_vtbls): Pass the complete type to
19876         build_vtbl_initializer.
19877         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
19878         (create_vtable_ptr): Create a vtable even if there are no
19879         new virtual functions, under the new ABI.
19880         (finish_struct_1): Likewise.
19881         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
19882         * decl.c (exapnd_static_init): Remove call to
19883         preserve_initializer.
19884         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
19885         vtables.
19886         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
19887         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
19888         (construct_virtual_bases): Don't initialize virtual base pointers
19889         under the new ABI.
19890         (build_aggr_init): Clean up comment.
19891         (expand_aggr_init_1): Likewise.
19892         * rtti.c (expand_class_desc): Store the virtual function table
19893         index where the vbase offset lives in the offset field.
19894         * search.c (dfs_walk_real): Make it global.
19895         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
19896         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
19897
19898         * tinfo.h (USItype): Make it signed under the new ABI.
19899         * tinfo.cc (convert_to_base): New function.  Encapsulate base
19900         conversion logic here.
19901         (__class_type_info::do_upcast): Use it.
19902         (__class_type_info::do_dyncast): Likewise.
19903         (__class_type_info::do_find_public_subobj): Likewise.
19904
19905         * init.c (construct_virtual_bases): Don't look up the addresses of
19906         virtual bases at run-time.
19907
19908         * class.c (build_vbase_pointer): Relocate.
19909         (build_vbase_pointer_fields): Likewise.
19910         (dfs_build_vbase_offset_vtbl_entries): Likewise.
19911         (build_vbase_offset_vtbl_entries): Likewise.
19912
19913         * decl.c (init_decl_processing): Complain if -fnew-abi
19914         -fno-vtable-thunks is used.
19915
19916         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
19917         flag_new_abi.
19918
19919 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
19920
19921         * cp-tree.h (num_extra_vtbl_entries): New function.
19922         (size_extra_vtbl_entries): Likewise.
19923         (dfs_vtable_path_unmark): Likewise.
19924         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
19925         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19926         * class.c (num_extra_vtbl_entries): New function.
19927         (size_extra_vtbl_entries): Likewise.
19928         (dfs_build_vbase_offset_vtbl_entries): New function.
19929         (build_vbase_offset_vtbl_entries): Likewise.
19930         (build_vtbl_initializer): Use it.
19931         (finish_struct_1): Adjust vtable sizes (using
19932         num_extra_vtbl_entries).
19933         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
19934         THUNK_DECL is non-NULL before expanding it.
19935         * init.c (expand_virtual_init): Adjust the vtable pointer by
19936         size_extra_vtbl_entries before storing it.
19937         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
19938         Handle TREE_LIST parameters here, not in the dfs_* functions.
19939         (dfs_unmarked_real_bases_queue_p): Adjust.
19940         (dfs_marked_real_bases_queue_p): Likewise.
19941         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
19942         (dfs_vtable_path_marked_real_bases_queue_p): New function.
19943         (dfs_vtable_path_unmark): Likewise.
19944
19945 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
19946
19947         * optimize.c (copy_body_r): Clear the operand three of a
19948         TARGET_EXPR when copying it.
19949
19950 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19951
19952         * method.c (build_decl_overload_real): Check whether we are in ::
19953         before returning __builtin_new/delete.
19954
19955 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
19956
19957         * pt.c (tsubst_friend_function): Improve comment.
19958         (instantiate_decl): Avoid crashing when a "nested" function is
19959         instantiated from the top level.
19960
19961         * dump.c (dqeueue_and_dump): Dump
19962         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
19963
19964 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19965
19966         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
19967
19968 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
19969
19970         * g++spec.c (lang_specific_driver): Add -fnew-abi if
19971         ENABLE_NEW_GXX_ABI defined.
19972         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
19973         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
19974         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
19975
19976 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
19977
19978         * decl.c (start_cleanup_fn): Call pushdecl.
19979
19980         * call.c (convert_class_to_reference): Fix typos.
19981         (build_conditional_expr): Handle errors gracefully.
19982         * class.c (push_nested_class): Likewise.
19983         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
19984         (DECL_THIS_EXTERN): Use it.
19985         (DECL_THIS_STATIC): Likewise.
19986         * cvt.c (convert_to_void): Handle errors gracefully.
19987         (build_expr_type_conversion): Likewise.
19988         * decl.c (maybe_push_decl): Likewise.
19989         (start_decl_1): Likewise.
19990         (require_complete_types_for_parms): Likewise.
19991         * parse.y (structsp): Likewise.
19992         (base_class): Likewise.
19993         * parse.c: Regenerated.
19994         * pt.c (finish_member_template_decl): Likewise.
19995         * typeck.c (decay_conversion): Likewise.
19996
19997         * cp-tree.h (dfs_skip_vbases): New function.
19998         (find_vbase_instance): Likewise.
19999         * class.c (determine_primary_base): Allow a nearly empty base to
20000         serve as a primary base class under the new ABI.
20001         (get_class_offset_1): Rename to ...
20002         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
20003         messages here.
20004         (get_class_offset): Use it.  Issue error messages here.
20005         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
20006         find the right copies of virtual bases.
20007         (fixup_vtable_deltas1): Rename to ...
20008         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
20009         bases as primary bases.
20010         (fixup_vtable_deltas): Remove.
20011         (override_one_vtable): Handle virtual bases as primary bases.
20012         (merge_overrides): Likewise.
20013         (finish_struct_1): Likewise.
20014         (dump_class_hierarchy): Dump primary-ness of bases as well.
20015         * search.c (mark_primary_bases): Use a pre-order traversal to
20016         handle primary virtual bases.
20017         (dfs_skip_vbases): New fiunction.
20018         (expand_upcast_fixups): Adjust to handle primary virtual bases.
20019         (fixup_virtual_upcast_offsets): Likewise.
20020         (fixup_all_virtual_upcast_offsets): Likewise.
20021         (dfs_find_vbase_instances): New function.
20022         (find_vbase_instance): Likewise.
20023
20024 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
20025
20026         * lex.c (DIR_SEPARATOR): Delete macro.
20027
20028 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
20029
20030        * decl2.c (lang_decode_option): Handle automatic line wrapping
20031        option.
20032
20033 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
20034
20035         * friend.c (do_friend): Don't resolve scopes when processing
20036         template declarations, even if the qualifying scope doesn't
20037         involve template parameters.
20038
20039 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
20040
20041         * class.c (dfs_modify_vtables_queue_p): Remove.
20042         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
20043         and dfs_marked_real_bases_queue_p instead of
20044         dfs_modify_vtables_queue_p.
20045
20046         * class.c (build_vbase_path): Simplify.
20047         (dfs_propagate_binfo_offsets): New function.
20048         (propagate_binfo_offsets): Use it.
20049         (remove_base_field): Simplify.
20050         (dfs_set_offset_for_vbases): Remove.
20051         (dfs_set_offset_for_shared_vbases): New function.
20052         (dfs_set_offset_for_unshared_vbases): Likewise.
20053         (layout_virtual_bases): Use them.
20054         (layout_basetypes): Don't call propagate_binfo_offsets.
20055         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
20056         for the vbases.
20057
20058         * class.c (build_base_field): New function, split out from ...
20059         (build_base_fields): ... here.  Use it.  Allocate primary bases
20060         first, under the new ABI.
20061         (get_vtable_entry): Remove.
20062         (remove_base_field): New function, split out from ...
20063         (remove_base_fields): ... here.  Adjust since primary bases come
20064         first under the new ABI.
20065
20066         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
20067         (initialize_vtbl_ptrs): New function.
20068         (expand_indirect_vtbls_init): Change prototype.
20069         (convert_pointer_to_vbase): Declare.
20070         * init.c (expand_direct_vtbls_init): Remove.
20071         (dfs_initialize_vtbl_ptrs): New function.
20072         (initialize_vtbl_ptrs): Likewise.
20073         (emit_base_init): Use initialize_vtbl_ptrs.
20074         * search.c (convert_pointer_to_vbase): Make it global.
20075         (expand_indirect_vtbls_init): Remove vtable initialization code.
20076         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
20077
20078         * class.c (dfs_finish_vtbls): New function.
20079         (finish_vtbls): Use it.
20080         (dump_class_hierarchy): New function.
20081
20082         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
20083         (BINFO_VBASE_PRIMARY_P): New macro.
20084         (BINFO_VIRTUALS): Add to documentation.
20085         (SET_BINFO_PRIMARY_MARKED_P): Remove.
20086         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20087         (dfs_mark_primary_bases_queue_p): Likewise.
20088         (dfs_unmarked_real_bases_queue_p): New function.
20089         (dfs_marked_real_bases_queue_p): Likewise.
20090         * search.c (dfs_mark_primary_bases): Adjust.
20091         (mark_primary_bases): Likewise.
20092         (get_shared_vbase_if_not_primary): New function.
20093         (dfs_unmarked_real_bases_queue_p): Likewise.
20094         (dfs_marked_real_bases_queue_p): Likewise.
20095         (dfs_get_pure_virtuals): Simplify.
20096         (get_pure_virtuals): Likewise.
20097
20098 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20099
20100         * lex.c: Include tm_p.h.
20101
20102 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
20103
20104         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
20105
20106 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
20107
20108         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
20109         * pt.c (instantiate_decl): Defer comdat templates that might not be
20110         needed.
20111
20112         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
20113         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
20114         (finish_file): Likewise.
20115
20116         * decl2.c (import_export_class): Undo 12/14 change.
20117
20118         * error.c (dump_decl): operator new, not operatornew.
20119
20120         * class.c (field_decl_cmp): A nontype is "greater" than a type.
20121         * search.c (lookup_field_1): Look for the last field with the
20122         desired name.
20123
20124 2000-01-05  Nathan Sidwell  <nathan@acm.org>
20125
20126         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
20127         FUNCTION_DECL.
20128
20129 2000-01-05  Nathan Sidwell  <nathan@acm.org>
20130
20131         * typeck.c (build_static_cast): Don't strip target qualifiers
20132         when casting from a class.
20133
20134 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20135
20136         * class.c (warn_hidden): Initialize variable `fndecl'.
20137
20138 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
20139
20140         * decl.c (flag_isoc9x): New variable to be able to use code in
20141         c-common.c.  For now always zero.
20142
20143 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
20144
20145         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
20146         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
20147         or unshare_base_binfos for virtual bases here.
20148         * search.c (dfs_get_vbase_types): Do it here.
20149         (get_vbase_types): Adjust.
20150
20151 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
20152
20153         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
20154         (BINFO_PRIMARY_MARKED_P): Use flag 5.
20155         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
20156         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20157         (unmark_primary_bases): Remove declaration.
20158         (unmarkedp): Declare.
20159         (dfs_vbase_unmark): Likewise.
20160         * class.c (determine_primary_base): Return immediately if there
20161         are no base classes.  Call mark_primary_bases here.
20162         (modify_all_direct_vtables): Remove.
20163         (modify_all_indirect_vtables): Remove.
20164         (dfs_modify_vtables_queue_p): New function.
20165         (dfs_modify_vtables): New function.
20166         (modify_all_vtables): Use them.
20167         (build_base_fields): Build FIELD_DECLs for primary virtual base
20168         classes.
20169         (create_vtable_ptr): Don't call determine_primary_base here.
20170         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
20171         (dfs_set_offset_for_vbases): ... this.
20172         (layout_virtual_bases): Use it.
20173         (layout_class_type): Call determine_primary_base here.
20174         * search.c (unmarkedp): Make it global.
20175         (shared_marked_p): Simplify.
20176         (shared_unmarked_p): Likewise.
20177         (dfs_primary_bases_queue_p): Remove.
20178         (dfs_unmark_primary_bases): Likewise.
20179         (unmark_primary_bases): Likewise.
20180         (mark_primary_bases): Simplify.
20181         (get_pure_virtuals): Don't call mark_primary_bases here.
20182         (dfs_vbase_unmark): New function.
20183         (get_vbase_types): Simplify.
20184
20185         * class.c (struct base_info): Remove.
20186         (determine_primary_base): Take has_virtual_p rather than a
20187         base_info as input.  Don't calculate max_has_virtual.
20188         (finish_struct_bits): Remove max_has_virtual argument.
20189         (create_vtable_ptr): Remove max_has_virtual_p argument.
20190         (layout_virtual_bases): Remove max argument.
20191         (layout_basetypes): Likewise.
20192         (layout_class_type): Remove max_has_virtual_p argument.
20193         (finish_struct_1): Remove max_has_virtual.
20194
20195         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
20196         (layout_basetypes): Remove.
20197         * class.c (propagate_binfo_offsets): Moved here from tree.c.
20198         Update to handle primary virtual bases.
20199         (remove_base_fields): New function, split out from
20200         layout_basetypes.
20201         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
20202         (layout_virtual_bases): New function, split out from
20203         layout_basetypes.  Update to handle primary virtual bases.
20204         (layout_basetypes): Moved here from tree.c.  Use
20205         remove_base_fields and layout_virtual_bases.
20206         * search.c (dfs_mark_primary_bases_queue_p): New function.
20207         (mark_primary_bases): Use it.
20208         * tree.c (CEIL): Remove.
20209         (propagate_binfo_offsets): Remove.
20210         (layout_basetypes): Remove.
20211
20212 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
20213
20214         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
20215         (BINFO_PRIMARY_MARKED_P): New macro.
20216         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
20217         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20218         (mark_primary_bases): New function.
20219         (unmark_primary_bases): Likewise.
20220         * search.c (get_abstract_virtuals_1): Remove.
20221         (dfs_mark_primary_bases): New function.
20222         (mark_primary_bases): Likewise.
20223         (dfs_unmark_primary_bases): Likewise.
20224         (unmark_primary_bases): Likewise.
20225         (dfs_get_pure_virtuals): Likewise.
20226
20227 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
20228
20229         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
20230         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
20231         (modify_one_vtable): Adjust.
20232         (fixup_vtable_deltas1): Likewise.
20233         (override_one_vtable): Likewise.
20234         * search.c (get_abstract_virtuals_1): Likewise.
20235         (get_pure_virtuals): Likewise.
20236         (expand_upcast_fixups): Likewise.
20237         * tree.c (debug_binfo): Likewise.
20238
20239         * class.c (build_vtable): Don't return a value.  Don't rebuild
20240         vtables for bases that have already been handled.
20241         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
20242         already been handled.
20243         (modify_one_vtable): Adjust accordingly.
20244         (fixup_vtable_deltas1): Likewise.
20245         (finish_struct_1): Likewise.
20246
20247 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20248
20249         * call.c (build_new_method_call): Also check destructors.