OSDN Git Service

4d53eb74e1a302ed23469d3fe4fc047db7ce5612
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-09-10  Richard Henderson  <rth@redhat.com>
2
3         * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
4
5 2003-09-10  Jan Hubicka  <jh@suse.cz>
6
7         * decl2.c (var_finalized_p): New.
8         (maybe_emit_vtables, write_out_vars, finish_file): Use it.
9
10 2003-09-10  Richard Henderson  <rth@redhat.com>
11
12         * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
13         mark_member_pointers.
14         (lower_function): Remove.
15         * cp-tree.h: Update to match.
16         * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
17         (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
18
19 2003-09-09  Richard Henderson  <rth@redhat.com>
20
21         * semantics.c (expand_or_defer_fn): Update call to 
22         cgraph_finalize_function.
23
24         * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
25         always.
26
27         * decl2.c (finish_file): Avoid out-of-bounds array reference
28         during memmove.
29
30 2003-09-09  Richard Henderson  <rth@redhat.com>
31
32         * decl2.c (mark_member_pointers): Rename from
33         mark_member_pointers_and_eh_handlers and don't check eh handlers.
34
35 2003-09-09  Christian Ehrhardt  <ehrhardt@mathematik.uni-ulm.de>
36
37         PR bootstrap/12168
38         * method.c (use_thunk): Clear DECL_RTL of copied nodes.
39
40 2003-09-08  Mark Mitchell  <mark@codesourcery.com>
41
42         * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
43         c_register_builtin_type.
44
45         PR c++/11786
46         * decl2.c (add_function): Do not complain about seeing the same
47         non-function twice.
48         * semantics.c (perform_koenig_lookup): Improve documentation.
49
50         PR c++/5296
51         * pt.c (try_one_overload): Add addr_p parameter.
52         (resolve_overloaded_unification): Pass it.
53
54 2003-09-08  Richard Henderson  <rth@redhat.com>
55
56         * optimize.c (maybe_clone_body): Inc/dec function_depth.
57
58 2003-09-08  Richard Henderson  <rth@redhat.com>
59
60         * decl.c (finish_function): Clear current_function_decl.
61         * decl2.c (mark_used): Don't push/pop gc context.
62         * optimize.c (optimize_function): Likewise.
63         * tree.c (cp_cannot_inline_tree_fn): Likewise.
64         * pt.c (instantiate_decl): Inc/dec function_depth instead.
65         * semantics.c (expand_body): Update for tree_rest_of_compilation
66         nested argument.
67
68 2003-09-07  Gabriel Dos Reis  <gcc@integrable-solutions.net>
69
70         PR c++/11762
71         * error.c (dump_decl): Handle namespace-alias-definition.
72         * decl.c (warn_extern_redeclared_static): There is no point in
73         checking changes in storage class specifier for a namespace
74         declaration. 
75         (duplicate_decls): Tidy diagnostic message.
76         * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
77         (pp_cxx_right_brace): Likewise.
78         (pp_cxx_original_namespace_definition): New function.
79         (pp_cxx_namespace_alias_definition): Likewise.
80         (pp_cxx_declaration): Use them.  Handle NAMESPACE_DECLs.
81
82 Sun Sep  7 13:15:14 CEST 2003  Jan Hubicka  <jh@suse.cz>
83
84         * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
85         Avoid re-emitting variables in unit-at-a-time mode.
86
87 2003-09-06  Mark Mitchell  <mark@codesourcery.com>
88
89         PR c++/11867
90         * call.c (standard_conversion): Improve comments.
91         (perform_direct_initialization): Make sure we return an expression
92         of the correct type.
93         * typeck.c (build_static_cast): Check for ambiguity and
94         accessibility when performing conversions.
95
96 2003-09-06  Gabriel Dos Reis  <gdr@integrable-solutions.net>
97
98         * cp-tree.h (add_binding): Remove declaration.
99         * name-lookup.h (supplement_binding): Declare.
100         * decl.c (add_binding): Move to name-lookup.c.
101         (push_local_binding): Adjust.
102         (push_class_binding): Likewise.
103         (set_identifier_type_value_with_scope): Likewise.
104         * name-lookup.c (supplement_binding): Rename from add_binding.
105         Return a bool.  Improve documentation. 
106         (set_namespace_binding): Adjust.
107         * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
108
109 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
110
111         PR c++/11794
112         * class.c (pushclass): Push dependent using decls for nested
113         classes of templates too.
114
115 2003-09-06  Roger Sayle  <roger@eyesopen.com>
116
117         PR c++/11409
118         * class.c (resolve_address_of_overloaded_function): When building
119         list of matching non-template function decls, ignore anticipated
120         declarations of undeclared or shadowed GCC builtins.
121
122 2003-09-06  Steven Bosscher  <steven@gcc.gnu.org>
123
124         PR c++/11595
125         * decl.c (define_label): Remove unreachable timevar pop.
126         Always return the decl, even if the definition is invalid.
127
128 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
129
130         PR c++/12167
131         * parser.c (cp_parser_late_parsing_default_args): Push & pop the
132         unparsed functions queue.
133
134 2003-09-05  Mark Mitchell  <mark@codesourcery.com>
135
136         PR c++/12163
137         * call.c (perform_direct_initialization): Correct logic for
138         direct-initialization of a class type.
139
140         PR c++/12146
141         * pt.c (lookup_template_function): Robustify.
142
143 2003-09-05  Nathan Sidwell  <nathan@codesourcery.com>
144
145         PR c++/11922
146         * pt.c (tsubst_qualified_id): Make sure we get a non-type.
147         (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
148         is_type_p to lookup_qualified_name.
149
150         * semantics.c (finish_call_expr): Refactor some code.
151
152         PR c++/12037
153         * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
154         (build_min_non_dep): Declare.
155         * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
156         (build_min_non_dep): New.
157         * cvt.c (convert_to_void): Don't explicitly copy
158         TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
159         * call.c (build_new_method_call): Use build_min_non_dep.
160         * decl2.c (grok_array_decl): Likewise.
161         (build_offset_ref_call_from_tree): Likewise.
162         * typeck.c (finish_class_member_access_expr,
163         build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
164         build_x_conditional_expr, build_x_compound_expr): Likewise.
165         (build_static_cast, build_reinterpret_cast,
166         build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
167         * typeck2.c (build_x_arrow): Use build_min_non_dep.
168         (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
169         template.
170         * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
171         (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
172         * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
173
174 2003-09-04  Richard Henderson  <rth@redhat.com>
175
176         * decl2.c (mark_member_pointers_and_eh_handlers): Update for
177         change in cgraph_mark_needed_node arguments.
178
179 2003-09-02  Geoffrey Keating  <geoffk@apple.com>
180
181         PR 12161
182         * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
183         * tree.c (cp_cannot_inline_tree_fn): Likewise.
184
185 2003-09-04  Nathan Sidwell  <nathan@codesourcery.com>
186
187         * cp-tree.h (finish_sizeof, finish_alignof): Remove.
188         (expr_sizeof): Replace with ...
189         (cxx_sizeof_or_alignof_expr): ... here.
190         (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
191         * parser.c (cp_parser_unary_expression): Commonize alignof and
192         sizeof handling.
193         * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
194         substitution.
195         * semantics.c (finish_sizeof, finish_alignof): Remove.
196         * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
197         becomes bool. Set TREE_READONLY.
198         (expr_sizeof): Replace with ...
199         (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
200
201 2003-09-04  Mark Mitchell  <mark@codesourcery.com>
202
203         Remove cast-as-lvalue extension.
204         * call.c (build_conditional_expr): Correct formatting.
205         (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
206         (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
207         * cp-tree.h (non_cast_lvalue_p): Remove.
208         (real_non_cast_lvalue_p): Remove.
209         (non_cast_lvalue_or_else): Remove.
210         * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
211         (real_lvalue_p): Adjust call to lvalue_p_1.
212         (non_cast_lvalue_p): Remove.
213         (non_cast_lvalue_or_else): Remove.
214         (lvalue_p): Adjust call to lvalue_p_1.
215         (lvalue_or_else): Simplify.
216         * typeck.c (build_unary_op): Use lvalue_or_else, not
217         non_cast_lvalue_or_else.
218         (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
219
220 2003-09-03  DJ Delorie  <dj@redhat.com>
221
222         * decl.c (finish_function): Pass fndecl to aggregate_value_p.
223
224 2003-09-03  Mark Mitchell  <mark@codesourcery.com>
225
226         PR c++/12053
227         * class.c (include_empty_classes): Correct logic for ABI version 1.
228
229 2003-09-03  Richard Henderson  <rth@redhat.com>
230
231         * optimize.c (optimize_function): Push/pop ggc context around
232         the call to optimize_inline_calls.
233
234 2003-09-02  Scott Brumbaugh  <scottb.lists@verizon.net>
235
236         PR c++/11553
237         * parser.c (cp_parser_decl_specifier_seq): Add check for a
238         duplicate friend decl-specifier.
239
240 2003-09-02  Mark Mitchell  <mark@codesourcery.com>
241
242         PR c++/11847
243         * pt.c (convert_nontype_argument): Correct representation of
244         REFERENCE_TYPE expressions.
245
246         PR c++/11808
247         * cp-tree.h (KOENIG_LOOKUP_P): New macro.
248         (finish_call_expr): Change prototype.
249         * parser.c (cp_parser_postfix_expression): Adjust call to
250         finish_call_expr.
251         * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
252         * semantics.c (finish_call_expr): Add koenig_p parameter.
253
254 2003-09-01  Mark Mitchell  <mark@codesourcery.com>
255
256         PR c++/12114
257         * cp-tree.h (initialize_reference): Change prototype.
258         * call.c (initialize_reference): Add cleanup parameter.
259         * decl.c (grok_reference_init): Likewise.
260         (check_initializer): Likewise.
261         (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
262         (duplicate_decls): When replacing an anticipated builtin, do not
263         honor TREE_NOTHROW.
264         * typeck.c (convert_for_initialization): Correct call to
265         initialize_reference.
266
267         PR c++/11972
268         * pt.c (dependent_type_p_r): Pass only the innermost template
269         arguments to any_dependent_template_arguments_p.
270
271 2003-09-01  Josef Zlomek  <zlomekj@suse.cz>
272
273         * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
274         * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
275         * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
276         * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
277         (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
278
279 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
280
281         PR c++/12093
282         * pt.c (build_non_dependent_expr): Do not build a
283         NON_DEPENDENT_EXPR for a STRING_CST.
284
285         PR c++/11928
286         * search.c (add_conversions): Avoid adding two conversion
287         operators for the same type.
288
289 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
290
291         PR c++/6196
292         * pt.c (tsubst_copy_and_build): Correct handling of
293         address-of-label extension.
294         * semantics.c (finish_goto_stmt): The address of a label must go
295         through the lvalue-to-rvalue conversion.
296
297 2003-08-29  Richard Henderson  <rth@redhat.com>
298             Jason Merrill <jason@redhat.com>
299
300         * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
301         (LANG_HOOKS_RTL_EXPAND_STMT): New.
302         * cp-tree.h (cxx_expand_function_start): Declare.
303         * decl.c (start_function): Use allocate_struct_function.
304         Move stmts_are_full_exprs_p assertion from expand_body.
305         Do not free_after_parsing or free_after_compilation.
306         (cxx_push_function_context): Move code to set struct function
307         data from genrtl_start_function.
308         * optimize.c (optimize_function): Don't inc/dec function_depth.
309         * semantics.c (expand_body): Use tree_rest_of_compilation.
310         (cxx_expand_function_start): Rename from genrtl_start_function,
311         omit bits done by tree_rest_of_compilation.
312         (genrtl_finish_function): Remove.
313         (clear_decl_rtl): Move to ../tree-optimize.c.
314
315 2003-08-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
316
317         PR c++/11811
318         * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
319         function. 
320         * cxx-pretty-print.h: Declare.
321         * error.c (dump_template_parameter): Use it.
322         (dump_type): Likewise.
323
324 2003-08-28  Mark Mitchell  <mark@codesourcery.com>
325
326         * init.c (decl_constant_value): Deal with COND_EXPR specially.
327         * call.c (build_conditional_expr): Revert previous patch.
328
329         PR optimization/5079
330         * call.c (build_conditional_expr): Use decl_constant_value to
331         simplify the arguments.
332
333 2003-08-26  Dan Nicolaescu  <dann@ics.uci.edu>
334
335         * parser.c (struct cp_token): Use enum bitfields.
336         (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
337         512B allocation unit.
338         (cp_parser_token_tree_map_node): Use enum bitfields.
339
340 2003-08-26  Nathan Sidwell  <nathan@codesourcery.com>
341
342         PR c++/11871
343         * decl.c (push_class_level_binding): Correct old_decl value from
344         my 2003-07-29 reorganization.
345
346         * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
347         (build_new_method_call): Add goto finish.
348         * semantics.c (simplify_aggr_init_exprs_r): Don't set
349         TREE_SIDE_EFFECTS on a call.
350
351 2003-08-25  Richard Henderson  <rth@redhat.com>
352
353         * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
354
355 2003-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
356
357         * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
358         (cxx_pretty_printer): Adjust base type.
359         (pp_cxx_function_specifier): Declare.
360         * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
361         (pp_cxx_left_paren): Likewise.
362         (pp_cxx_right_paren): Likewise.
363         (pp_cxx_dot): Likewise.
364         (pp_cxx_arrow): Likewise.
365         (pp_cxx_semicolon): Likewise.
366         (pp_cxx_identifier): Likewise.
367         (pp_cxx_cv_qualifier_seq): Likewise.
368         (pp_cxx_storage_class_specifier): Likewise.
369         (pp_cxx_expression_list): Likewise.
370         (pp_cxx_space_for_pointer_operator): Likewise.
371         (pp_cxx_init_declarator): Likewise.
372         (pp_cxx_call_argument_list): Likewise.
373         (pp_cxx_nonconsecutive_character): Tidy.
374         (pp_cxx_conversion_function_id): New function.
375         (pp_cxx_template_id): Likewise.
376         (pp_cxx_template_keyword_if_needed): Likewise.
377         (pp_cxx_nested_name_specifier): Likewise.
378         (pp_cxx_unqualified_id): Tidy
379         (pp_cxx_qualified_id): Handle more nodes.
380         (pp_cxx_primary_expression): Tidy.
381         (pp_cxx_postfix_expression): Likewise.
382         (pp_cxx_new_expression): Tidy.
383         (pp_cxx_delete_expression): Likewise.
384         (pp_cxx_cast_expression): New function.
385         (pp_cxx_pm_expression): Tidy.
386         (pp_cxx_conditional_expression): Likewise.
387         (pp_cxx_assignment_operator): New function.
388         (pp_cxx_assignment_expression): Tidy.
389         (pp_cxx_expression): New function.
390         (pp_cxx_function_specifier): Likewise.
391         (pp_cxx_decl_specifier_seq): Likewise.
392         (pp_cxx_simple_type_specifier): Tidy.
393         (pp_cxx_type_specifier_seq): Likewise.
394         (pp_cxx_ptr_operator): New function.
395         (pp_cxx_implicit_parameter_type): Likewise.
396         (pp_cxx_parameter_declaration): Tidy.
397         (pp_cxx_parameter_declaration_clause): New function.
398         (pp_cxx_exception_specification): Likewise.
399         (pp_cxx_direct_declarator): Tidy.
400         (pp_cxx_declarator): Likewise.
401         (pp_cxx_ctor_initializer): New function.
402         (pp_cxx_function_definition): Likewise.
403         (pp_cxx_abstract_declarator): Tidy.
404         (pp_cxx_direct_abstract_declarator): Likewise.
405         (pp_cxx_type_id): Likewise.
406         (pp_cxx_exception_declaration): New function.
407         (pp_cxx_statement): Likewise.
408         (pp_cxx_simple_declaration): Likewise.
409         (pp_cxx_template_parameter_list): Likewise.
410         (pp_cxx_template_parameter): Likewise.
411         (pp_cxx_template_declaration): Likewise.
412         (pp_cxx_explicit_specialization): Likewise.
413         (pp_cxx_explicit_instantiation): Likewise.
414         (pp_cxx_declaration): Tidy.
415         (pp_cxx_pretty_printer_init): Initialize more fields.
416
417 2003-08-25  Mark Mitchell  <mark@codesourcery.com>
418
419         PR c++/8795
420         * cp-tree.h (build_cplus_method_type): Remove.
421         * call.c (standard_conversion): Use build_method_type_directly
422         instead of build_cplus_method_type.
423         * class.c (build_clone): Likewise.
424         (adjust_clone_args): Likewise.
425         * decl.c (build_ptrmem_type): Likewise.
426         (grokdeclarator): Likewise.
427         (check_function_type): Likewise.
428         * decl2.c (grok_method_quals): Likewise.
429         (maybe_retrofit_in_chrg): Likewise.
430         * pt.c (copy_default_args_to_explicit_spec): Likewise.
431         (tsubst_function_type): Likewise.
432         (tsubst): Likewise.
433         * tree.c (build_cplus_method_type): Remove.
434         * typeck.c (merge_types): Use build_method_type_directly.
435
436 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
437
438         PR c++/3765
439         * search.c (dfs_access_in_type): Fix typo in comment.
440         (dfs_accessible_queue_p): Likewise.
441         (dfs_accessible_p): Only terminate when a friend is found.
442         (accessible_p): Return immediately if access_in_type allows
443         access.
444
445 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
446
447         PR c++/641, c++/11876
448         * friend.c (add_friend): Add complain parameter.
449         (make_friend_class): Likewise.
450         (do_friend): Adjust add_friend call.
451         * decl.c (grokdeclarator): Adjust make_friend_class call.
452         * parser.c (cp_parser_member_declaration): Likewise.
453         (cp_parser_template_declaration_after_exp): Likewise.
454         * pt.c (instantiate_class_template): Adjust make_friend_class
455         and add_friend call.
456         * cp-tree.h (make_friend_class): Adjust declaration.
457         (add_friend): Likewise.
458
459 2003-08-21  Jason Merrill  <jason@redhat.com>
460
461         PR c++/11283
462         * call.c (build_conditional_expr): Ignore cv-qual differences for
463         non-class types.
464
465 2003-08-21  Mark Mitchell  <mark@codesourcery.com>
466
467         PR c++/11551
468         * parser.c (cp_parser_id_expression): Add declarator_p parameter.
469         (cp_parser_primary_expression): Adjust call to
470         cp_parser_id_expression.
471         (cp_parser_unqualified_id): Complain about the use of
472         typedef-names in a destructor declarator.
473         (cp_parser_postfix_expression): Adjust call to
474         cp_parser_id_expression.
475         (cp_parser_type_parameter): Likewise.
476         (cp_parser_template_argument): Likewise.
477         (cp_parser_declarator_id): Likewise.
478
479         PR c++/11919
480         * call.c (standard_conversion): Use same_type_p, not pointer
481         equality, to compare types.
482
483         PR c++/10762
484         * parser.c (cp_parser_using_declaration): Check for invalid uses
485         of template-ids here...
486         * decl2.c (do_class_using_decl): ... rather than here.
487
488 2003-08-20  Mark Mitchell  <mark@codesourcery.com>
489
490         PR c++/11834
491         * pt.c (more_specialized): Bump processing_template_decl.
492
493 2003-08-21  Jason Merrill  <jason@redhat.com>
494
495         PR c++/11614
496         * decl.c (grokdeclarator): Recognize a flexible array based on the
497         type, not the form of the declarator.
498
499 2003-08-20  Jason Merrill  <jason@redhat.com>
500
501         * semantics.c (simplify_aggr_init_expr): Split out from
502         simplify_aggr_init_exprs_r.  Convert slot address to match
503         the return type.
504         * cp-tree.h: Declare it.
505         * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
506         DECL_NAME of a user variable.
507
508 2003-08-20  Nathan Sidwell  <nathan@codesourcery.com>
509
510         PR c++/11945
511         * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
512         COMPOUND_EXPR.
513         * semantics.c (finish_expr_stmt): Always convert to void.
514         * typeck.c (build_x_compound_exp): Always convert to void.
515
516 2003-08-19  Mark Mitchell  <mark@codesourcery.com>
517
518         PR c++/11684
519         * cp-tree.h (grok_op_properties): Change prototype.
520         * decl.c (grok_op_properties): Add complain parameter.
521         (grokfndecl): Pass it.
522         * pt.c (tsubst_decl): Adjust accordingly.
523
524         PR c++/10926
525         * decl.c (start_method): Return immediately if push_template_decl
526         does not like the declaration.
527         * pt.c (push_template_decl_real): Disallow member template
528         destructors.
529
530         PR c++/11036
531         * cp-tree.h (add_binding): Add prototype.
532         * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
533         (maybe_warn_about_overly_private_class): Use
534         CLASSTYPE_DESTRUCTORS.
535         (pushclass): Adjust call to set_identifier_type_value.
536         * decl.c (add_binding): Give it external linkage.
537         (push_local_binding): Adjust call to add_binding.
538         (push_class_binding): Likewise.
539         (set_identifier_type_value_with_scope): Change prototype.  Use
540         add_binding for global bindings.
541         (set_identifier_type_value): Adjust accordingly.
542         (pushtag): Likewise.
543         (pushdecl): Use set_identifier_type_value, not
544         set_identifier_type_value_with_scope.
545         (pushdecl_namespace_level): Adjust calls to
546         SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
547         (pushdecl_class_level): Likewise.
548         (lookup_tag): Use select_decl.
549         (select_decl): Improve comment.
550         (record_builtin_type): Do not call pushdecl.
551         (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
552         (cp_finish_decl): Adjust call to set_identifier_type_value.
553         (check_elaborated_type_specifier): Improve checks for invalid uses
554         of typedefs.
555         (xref_tag): Adjust call to check_elaborated_type_specifier.
556         * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
557         * name-lookup.c (set_namespace_binding): Use add_binding.
558         * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
559         rather than an IDENTIFIER_NODE, to represent built-in types, if
560         requested by the caller.
561         (cp_parser_postfix_expression): Adjust call.
562         (cp_parser_type_specifier): Likewise.
563         (cp_parser_elaborated_type_specifier): Adjust call to
564         check_elaborated_type_specifier.
565         * typeck2.c (build_functional_cast): Do not perform name lookups.
566
567         PR c++/10717
568         * decl.c (expand_static_init): Remove unncessary code.
569
570 2003-08-19  Andrew Pinski  <pinskia@physics.uc.edu>
571
572         PR c++/10538, PR c/5582
573         * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
574
575 2003-08-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
576
577         PR c++/11174
578         * init.c (build_offset_ref): Perform access checking for
579         pointer to member correctly.
580
581 2003-08-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
582
583         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
584
585 2003-08-18  Nathan Sidwell  <nathan@codesourcery.com>
586
587         PR c++/11957
588         * cp-tree.h (finish_stmt_expr): Add bool parameter.
589         * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
590         adjust the stmt_expr here.
591         (build_vec_init): Use finish_stmt_expr_expr, convert result to
592         array type.
593         * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
594         call.
595         * pt.c (tsubst_copy): Likewise.
596         * semantics.c (finish_stmt_expr): Add parameter.
597
598         * pt.c (instantiate_class_template): Push to class's scope before
599         tsubsting base.
600
601 Sun Aug 17 10:05:38 CEST 2003  Jan Hubicka  <jh@suse.cz>
602
603         PR C++/11702
604         * semantics.c (finish_id_expression): Mark all functions as used.
605
606 2003-08-16  Nathan Sidwell  <nathan@codesourcery.com>
607
608         PR c++/11512
609         * cvt.c (convert_to_void): Indicate which side of conditional has
610         no effects, and rhs of comma operator. Test for no sideeffect
611         expressions here and always build a convert expr.
612         * init.c (expand_default_init): Convert the init to void.
613         * typeck.c (build_x_compound_expr): Do not check for side effects
614         here.
615         (build_compound_expr): Do not convert lhs when building a
616         template.
617
618 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
619
620         * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
621         * decl2.c (build_offset_ref_call_from_tree): Use
622         build_non_dependent_expr.
623         * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
624         * pt.c (build_non_dependent_expr): Set operand.
625
626 2003-08-14  Jan Hubicka  <jh@suse.cz>
627
628         * decl2.c (mark_member_pointers): Rename to...
629         (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
630         (lower_function): Update call.
631         * except.c (eh_type_info): Break out from ...
632         (build_eh_type): ... here; tinfo is already used.
633         (finish_eh_spec_block): Mark tinfos as used.
634         * semantics.c (finish_handler_params): Mark tinfo as used.
635         * cp-tree.h (eh_type_info): Declare.
636
637 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
638
639         * pt.c (instantiate_class_template): Set location before
640         substuting bases.
641
642         * decl.c (make_typename_type): Use my_friendly_assert.
643         * pt.c (tsubst_aggr_type): Rearrange context substitution.
644
645 Thu Aug 14 12:19:25 CEST 2003  Jan Hubicka  <jh@suse.cz>
646
647         * method.c (use_thunk): Expand body directly.
648
649 2003-08-12  Mark Mitchell  <mark@codesourcery.com>
650
651         PR c++/11703
652         * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
653         determine whether or not to promote types.
654         (convert_for_arg_passing): Likewise.
655         * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
656         templates.
657         * pt.c (tsubst_decl): Do not expect it to be set.
658
659         PR c++/9512
660         PR c++/10923
661         * cp-tree.h (check_elaborated_type_specifier): Declare.
662         (handle_class_head): Remove.
663         (note_got_semicolon): Likewise.
664         (note_list_got_semicolon): Likewise.
665         (finish_class_definition): Likewise.
666         * decl.c (check_elaborated_type_specifier): Make it public.
667         Robustify.
668         (handle_class_head): Remove.
669         * parser.c (cp_parser_elaborated_type_specifier): Use
670         check_elaborated_type_specifier.
671         (cp_parser_class_specifier): Do not call finish_class_definition.
672         (cp_parser_class_head): Or handle_class_head.  Check for
673         over-qualified names.
674         * semantics.c (finish_class_definition): Remove.
675
676         * parser.c (cp_parser_check_for_definition_in_return_type): New
677         function.
678         (cp_parser_simple_declaration): Adjust call to
679         cp_parser_init_declarator.
680         (cp_parser_decl_specifier_seq): Change type of
681         declares_class_or_enum parameter.
682         (cp_parser_explicit_instantiation): Adjust accordingly.
683         (cp_parser_type_specifier): Change type of
684         declares_class_or_enum parameter.
685         (cp_parser_init_declarator): Add declares_class_or_enum
686         parameter.
687         (cp_parser_parameter_declaration): Adjust call to
688         cp_parser_decl_specifier_seq.
689         (cp_parser_function_definition): Likewise.
690         (cp_parser_member_declaration): Likewise.
691         (cp_parser_single_declaration): Likewise.
692
693         * cp-tree.h (lang_type_class): Remove has_call_overloaded,
694         has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
695         (TYPE_OVERLOADS_CALL_EXPR): Remove.
696         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
697         (TYPE_OVERLOADS_ARROW): Likewise.
698         (CLASSTYPE_GOT_SEMICOLON): Likewise.
699         * class.c (check_bases): Do not set them.
700         (finish_struct_1): Likewise.
701         * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
702         (build_ptrmemfunc_type): Likewise.
703         (grok_op_properties): Do not set TYPE_OVERLOADS_*.
704         (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
705         * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
706         * lex.c (note_got_semicolon): Remove.
707         (note_list_got_semicolon): Likewise.
708         * parser.c (cp_parser_simple_declaration): Do not call
709         note_list_got_semicolon.
710         * pt.c (list_eq): Remove.
711         (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
712         (instantiate_class_template): Do not set TYPE_OVERLOADS*.
713         (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
714         * ptree.c (cxx_print_type): Do not print them.
715         * semantics.c (finish_member_class_template): Do not call
716         note_list_got_semicolon.
717
718 2003-08-11  Aldy Hernandez  <aldyh@redhat.com>
719
720         * call.c (standard_conversion): Opaque pointers interconvert.
721
722         * testsuite/g++.dg/other/opaque-3.C: New.
723
724 2003-08-11  Mark Mitchell  <mark@codesourcery.com>
725
726         * typeck.c (merge_types): Handle cv-qualified pointer-to-member
727         types correctly.
728
729 2003-08-10  Mark Mitchell  <mark@codesourcery.com>
730
731         PR c++/11789
732         * cp-tree.h (get_vbase): Remove.
733         (get_vbase_types): Remove.
734         * init.c (expand_member_init): Correct logic for looking up base
735         classes.
736
737 2003-08-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
738
739         * error.c (dump_expr): Tidy.
740         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
741         (pp_cxx_begin_template_argument_list): Likewise.
742         (pp_cxx_end_template_argument_list): Likewise.
743         (is_destructor_name): Likewise.
744         (pp_cxx_unqualified_id): Likewise.
745         (pp_cxx_qualified_id): Likewise.
746         (pp_cxx_id_expression): Likewise.
747         (pp_cxx_new_expression): Likewise.
748         (pp_cxx_delete_expression): Likewise.
749         (pp_cxx_pm_expression): Likewise.
750         (pp_cxx_type_specifier): Rework.
751         (pp_cxx_type_id): Likewise.
752         (pp_cxx_primary_expression): Likewise.
753         (pp_cxx_postfix_expression): Likewise.
754         (pp_cxx_unary_expression): Likewise.
755         (pp_cxx_multiplicative_expression): Likewise.
756         (pp_cxx_conditional_expression): Likewise.
757         (pp_cxx_assignment_expression): Likewise.
758         (pp_cxx_pretty_printer_init): Tidy.
759
760 2003-08-10  Nathan Sidwell  <nathan@codesourcery.com>
761
762         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
763         NODE is always a TREE_VEC of non-zero size.
764         (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
765         * decl2.c (arg_assoc): Template args will be a vec.
766         * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
767         dump_template_argument_list.
768         (dump_template_parms): Args will be a vec.
769         * parser.c (cp_parser_template_argument_list): Produce a
770         vector, not a list.
771         * pt.c (coerce_template_parms): Args are always vectors.
772         (mangle_class_name_for_template): Likewise.
773         (lookup_template_function): Likewise.
774         (lookup_template_class): Likewise.
775         (tsubst_template_args): Likewise.
776         (tsubst_baselink): Use tsubst_template_args.
777         (tsubst_qualified_id): Likewise.
778         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
779         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
780         (any_dependent_template_args_p):  Args are always vectors.
781         * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
782
783         PR c++/11670
784         * call.c (convert_like_real): Add rvalue binding error message.
785         * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
786         really a cast.
787
788         PR c++/10530
789         * pt.c (dependent_type_p_r): A dependent template-id is a class
790         type with dependent template arguments, or a bound template
791         template parameter.
792         (type_dependent_expression_p): A template function decl cannot
793         have a dependent context.
794
795 2003-08-07  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
796
797         PR c++/5767
798         * parser.c (cp_parser_class_name): Return immediately when scope
799         is error_mark_node.
800
801 2003-08-07  Aldy Hernandez  <aldyh@redhat.com>
802
803         * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
804
805         * cp/call.c (standard_conversion): Support opaque types.
806         Include target.h.
807         (strip_top_quals): Use cp_build_qualified_type instead of
808         TYPE_MAIN_VARIANT.
809
810         * cp/typeck.c (convert_for_assignment): Support opaque types.
811
812         * testsuite/g++.dg/other/opaque-1.C: New.
813
814         * testsuite/g++.dg/other/opaque-2.C: New.
815
816 2003-08-06  Aldy Hernandez  <aldyh@redhat.com>
817
818         * decl.c (grokparms): Use cp_build_qualified_type instead
819         TYPE_MAIN_VARIANT.
820
821 2003-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
822
823         * cxx-pretty-print.h: New file.
824         * cxx-pretty-print.c: Likewise.
825         * error.c (scratch_pretty_printer): Change type.
826         (init_error): Tidy.
827         (dump_aggr_type): Likewise.
828         (dump_global_iord): Likewise.
829         (dump_expr): Likewise.
830         (dump_char): Remove.
831         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
832         (cxx_initialize_diagnostics): New function.
833         * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
834         (CXX_PRETTY_PRINT_H): New variable.
835         (cp/cxx-pretty-print.o): New rule.
836         (cp/cp-lang.o): Update dependence.
837         (cp/error.o): Likewise.
838
839 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
840
841         * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
842         (DECL_DECLARED_INLINE_P): Remove.
843         * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
844         if decl is a FUNCTION_DECL.  This never made sense, but now it is
845         required to avoid a tree check failure.
846         * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
847         * optimize.c (maybe_clone_body): Likewise.
848
849 2003-08-04  Roger Sayle  <roger@eyesopen.com>
850
851         * decl.c (cxx_insert_default_attributes): Delete.
852         * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
853         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
854
855 2003-08-03  Nathan Sidwell  <nathan@codesourcery.com>
856
857         PR c++/11704
858         * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
859         unknown type.
860
861         PR c++/11766
862         * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
863         member functions.
864
865 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
866
867         PR c++/9447
868         * cp-tree.def (USING_DECL): Document its type.
869         * class.c (pushclass): If we're entering a template, push any
870         dependent using decls it has.
871         * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
872         a dependent scope.
873         * pt.c (tsubst_decl) <USING_DECL case>: Set type.
874         (tsubst): Remove USING_DECL checks.
875         (type_dependent_expression_p): Remove USING_DECL case.
876         * semantics.c (finish_member_declaration): A USING_DECL's type
877         indicates whether it is dependent.
878
879 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
880
881         * cp-tree.h (pushclass): Remove unneeded parameter.
882         * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
883         (push_nested_class): Adjust pushclass call.
884         * pt.c (instantiate_class_template): Likewise.
885         * semantics.c (begin_class_definition): Likewise.
886
887 2003-08-01  Nathanael Nerode  <neroden@gcc.gnu.org>
888
889         * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
890
891 2003-08-01  Mark Mitchell  <mark@codesourcery.com>
892
893         PR c++/11697
894         * decl.c (decls_match): Don't ignore the types of template
895         classes.
896
897         PR c++/11744
898         * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
899
900 2003-08-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
901
902         PR c++/8442, c++/8806
903         * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
904         preferred.
905         (check_elaborated_type_specifier): Add allow_template_p
906         parameter.  Check tag mismatch and class template.
907         (xref_tag): Add template_header_p parameter.  Add assertion
908         that name is an IDENTIFIER_NODE.  Remove implicit typename
909         warning.  Simplify lookup process if globalize is true.
910         (cxx_init_decl_processing): Adjust call to xref_tag.
911         (xref_tag_from_type): Likewise.
912         * decl2.c (handle_class_head): Likewise.
913         * parser.c (cp_parser_elaborated_type_specifier,
914         cp_parser_class_head): Likewise.
915         * rtti.c (init_rtti_processing, build_dynamic_cast1,
916         tinfo_base_init, emit_support_tinfos): Likewise.
917         * class.c (is_base_of_enclosing_class): Remove.
918         * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
919         template template argument.
920         * cp-tree.h (xref_tag): Adjust declaration.
921         (is_base_of_enclosing_class): Remove.
922         * NEWS: Document template template argument change.
923
924 2003-08-01  Nathan Sidwell  <nathan@codesourcery.com>
925
926         * parser.c (cp_parser_init_declarator,
927         cp_paser_member_declaration): Reformat.
928         * pt.c (lookup_template_class, type_unification_real, unify,
929         type_dependent_expression_p): Reformat.
930
931         PR c++/11295
932         * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
933         tf_stmt_expr_body.
934         (finish_stmt_expr_expr): Declare.
935         * parser.c (cp_parser_primary_expression): Tell
936         cp_parser_compount_statement that it is a statement expression.
937         (cp_parser_statement, cp_parser_labeled_statement,
938         cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
939         in_statement_expr_p parameter.
940         (cp_parser_expression_statement): Likewise. Call
941         finish_stmt_expr_expr for final expression of a statement
942         expression.
943         (cp_parser_for_init_statement,
944         cp_parser_implicitly_scoped_statement,
945         cp_parser_already_scoped_statement, cp_parser_function_definition,
946         cp_parser_try_block, cp_parser_handled): Adjust.
947         * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
948         (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
949         (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
950         * semantics.c (finish_expr_stmt): Do not deal with statement
951         expressions.
952         (begin_stmt_expr): Clear last_expr_type.
953         (finish_stmt_expr_expr): New.
954         (finish_stmt_expr): Process the value expression.
955
956         * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
957         compound expr inside the target's initializer.
958
959         PR c++/11525
960         * parser.c (cp_parser_primary_expression): Do not set
961         non-constant-p merely because it is a dependent scope.
962
963         PR c++/9447
964         * decl2.c (do_class_using_decl): Set type to NULL_TREE.
965         * semantics.c (finish_expr_stmt): Do not convert to void in a
966         template.
967
968 2003-07-31  Nathan Sidwell  <nathan@codesourcery.com>
969
970         * pt.c (coerce_template_parms): Refactor.
971         (fn_type_unification): Increment processing_template_decl when
972         tsubsting an incomplete set of explicit args.
973
974         PR c++/11347
975         * pt.c (instantiate_class_template): Increment
976         processing_template_decl around the tsubst of a template member
977         class.
978         (tsubst_qualified_id): Assert we do not have a dependent scope.
979
980         * pt.c (coerce_template_template_parms, lookup_template_class,
981         can_complete_type_without_circularity, instantiate_class_template,
982         tsubst_decl, unify): Reformat.
983
984 Thu Jul 31 01:07:41 CEST 2003  Jan Hubicka  <jh@suse.cz>
985
986         * decl2.c (maybe_make_one_only): Use mark_referenced.
987         * method.c (use_thunk): Likewsie.
988
989 Wed Jul 30 19:12:48 CEST 2003  Jan Hubicka  <jh@suse.cz>
990
991         * class.c (build_vtable_entry_ref): Kill.
992         (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
993         (build_vfn_ref): Do not call build_vtable_entry_ref.
994         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
995         * cp-tree.h (prepare_assemble_variable): Kill.
996         * cp-decl.c (prepare_assemble_variable): Kill.
997
998 2003-07-29  Geoffrey Keating  <geoffk@apple.com>
999
1000         * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
1001         of setting valid_pch by hand.
1002
1003 2003-07-29  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1004
1005         * decl.c (finish_enum): Initialize underlying_type.
1006
1007 2003-07-29  Nathan Sidwell  <nathan@codesourcery.com>
1008
1009         PR c++/9447
1010         * decl.c (add_binding): Add bval local variable.
1011         (push_class_level_binding): Likewise. Allow a USING_DECL to be
1012         pushed.
1013         * decl2.c (do_class_using_decl):  The type of a using decl is
1014         unknown.
1015         * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
1016         function call lookup code.
1017         * pt.c (tsubst): A USING_DECL will have unknown type.
1018         (tsubst_copy_and_build): Allow a using decl.
1019         (type_dependent_expression_p): A USING_DECL will make it
1020         dependent.
1021         * semantics.c (finish_member_declaration): Push a dependent using
1022         declaration.
1023
1024 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
1025
1026         PR c++/11530
1027         * parser.c (cp_parser_postfix_expression): Do not call mark_used.
1028         * semantics.c (finish_id_expression): Call mark_used for all
1029         declarations.
1030
1031 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
1032
1033         PR c++/11667
1034         * call.c (standard_conversion): Allow all integral->enumeral
1035         conversions, after marking them as bad.
1036         * decl.c (finish_enum): Make sure that all enumerators are
1037         properly converted to the underlying type.
1038         (build_enumerator): Set DECL_CONTEXT for namespace-scope
1039         enumeration types.
1040         * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
1041         (tsubst_enum): Tidy.
1042
1043         * Make-lang.in (typeck.o): Depend on convert.h.
1044         (class.o): Likewise.
1045         (rtti.o): Likewise.
1046         * call.c: Include convert.h.
1047         (convert_arg_to_ellipsis): Use convert_to_real.
1048         * class.c: Include convert.h.
1049         (build_base_path): Use convert_to_integer.
1050         * rtti.c: Include convert.h.
1051         (build_headof): Use convert_to_integer.
1052         * typeck.c: Include convert.h.
1053         (decay_conversion): Use convert_to_integer.
1054         (build_unary_op): Use build_nop.
1055         (get_delta_difference): Use convert_to_integer.
1056         (build_ptrmemfunc): Avoid unncessary conversions.
1057
1058 Mon Jul 28 23:55:10 CEST 2003  Jan Hubicka  <jh@suse.cz>
1059
1060         * decl2.c (mark_member_pointers): Verify that member pointer points to
1061         the function.
1062
1063 2003-07-28  Nathan Sidwell  <nathan@codesourcery.com>
1064
1065         * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
1066         (finish_compound_stmt): Remove no scope arg.
1067         * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
1068         end_compound_stmt calls.
1069         (expand_static_init, begin_destructor_body, begin_function_body,
1070         finish_function_body): Likewise.
1071         * decl2.c (start_objects, finish_objects,
1072         start_static_storage_duration_function,
1073         finish_static_storage_duration_function): Likewise.
1074         * init.c (begin_init_stmts, finish_init_stmts,
1075         construct_virtual_base, build_vec_init): Likewise.
1076         * method.c (do_build_assign_ref, synthesize_method): Likewise.
1077         * parser.c (cp_parser_compound_statement,
1078         cp_parser_implicitly_scoped_statement,
1079         cp_parser_already_scoped_statement): Likewise.
1080         * pt.c (tsubst_expr): Likewise.
1081         * semantics.c (begin_compound_stmt): No scope arg is a bool.
1082         (finish_compound_stmt): Remove no scope arg.
1083
1084         * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
1085         always dyadic.
1086
1087 2003-07-27  Mark Mitchell  <mark@codesourcery.com>
1088
1089         * call.c (standard_conversion): Tweak handling of
1090         pointer-to-member types.
1091         * pt.c (tsubst): Correctly qualify pointers-to-data member types.
1092         * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
1093         pointer-to-data member types.
1094
1095 2003-07-27  Nathan Sidwell  <nathan@codesourcery.com>
1096
1097         * parser.c (cp_parser_type_parameter): Reformat.
1098         (cp_parser_parameter_declaration): Deprecate default args where
1099         not allowed.
1100
1101 2003-07-26  Nathan Sidwell  <nathan@codesourcery.com>
1102
1103         * cfns.h: Rebuilt.
1104
1105         * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
1106         (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
1107         * init.c (begin_init_stmts): Make static. Return is_global
1108         value. Always call begin_stmt_expr.
1109         (finish_init_stmts): Make static. Add is_global parm. Always
1110         building a stmt tree.
1111         (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
1112         (build_vec_init): Likewise. Always building a stmt tree.
1113         (expand_default_init): Always building a stmt tree.
1114         (get_temp_regvar): Likewise.
1115         * semantics.c (begin_global_stmt_expr,
1116         finish_global_stmt_expr): Remove.
1117
1118 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1119
1120         * cp-tree.h (build_compound_expr): Take LHS & RHS args.
1121         (build_x_compound_expr_from_list): Declare.
1122         * typeck.c (build_x_compound_expr_from_list): New.
1123         (build_x_compound_expr): Adjust.
1124         (build_compound_expr): Remove unreachable code. Take two
1125         parameters, adjust.
1126         * decl.c (grok_reference_init): Use
1127         build_x_compound_expr_from_list.
1128         (expand_static_init): Adjust build_compound_expr call.
1129         (cxx_maybe_build_cleanup): Likewise.
1130         * init.c (perform_member_init): Use
1131         build_x_compound_expr_from_list.
1132         (build_new_1): Likewise.
1133         (build_vec_delete): Adjust build_compound_expr calls.
1134         (build_vbase_delete): Likewise.
1135         * typeck2.c (store_init_value): Use
1136         build_x_compound_expr_from_list.
1137         (build_functional_cast): Likewise.
1138
1139 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1140
1141         * cp-tree.h (enum tsubst_flags_t): Add tf_user.
1142         * decl.c (make_typename_type): Pass it.
1143         * pt.c (lookup_template_class): Use it.
1144         (resolve_typename_type): Pass it.
1145         * semantics.c (finish_template_type): Pass it.
1146
1147 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1148
1149         PR c++/11617
1150         * cp-tree.h (qualified_name_lookup_error): Declare.
1151         * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
1152         errors.
1153         (tsubst_expr) <DECL_STMT case>: Likewise.
1154         (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
1155         * semantics.c (qualified_name_lookup_error): New, broken out of ...
1156         (finish_id_expression): ... here. Use it.
1157
1158 2003-07-25  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
1159
1160         * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
1161
1162 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1163
1164         PR c++/11596
1165         * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
1166         (tsubst_template_arg): New.
1167         (tsubst_template_arg_vector): Rename to ...
1168         (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
1169         tsubst_template_arg.
1170         (coerce_template_parms): Use tsubst_template_arg for default
1171         value.
1172         (tsubst_template_parms): Likewise.
1173         (tsubst_aggr_type): Adjust.
1174         (tsubst_decl): Likewise.
1175         (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
1176         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
1177
1178 2003-07-25 Gabriel Dos Reis  <gdr@integrable-solutions.net>
1179
1180         * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
1181         * error.c: Use the new pretty-printer framework.
1182
1183 2003-07-24  Per Bothner  <pbothner@apple.com>
1184
1185         * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
1186         which causes errors messages to incorrectly mention included files.
1187
1188 2003-07-24  Mark Mitchell  <mark@codesourcery.com>
1189
1190         * cp-tree.h (convert_to_base_statically): Declare.
1191         * call.c (build_special_member_call): Convert INSTANCE to the base
1192         type.
1193         * class.c (convert_to_base_statically): New method.
1194         * init.c (construct_virtual_base): Use it.
1195         * method.c (do_build_assign_ref): Fix typo in comment.
1196
1197 2003-07-24  Jason Merrill  <jason@redhat.com>
1198
1199         * decl.c: Just set truthvalue_* to boolean_*.
1200
1201 2003-07-24  Nathan Sidwell  <nathan@codesourcery.com>
1202
1203         * decl.c (reshape_init): Remove unreachable code.
1204
1205 2003-07-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1206
1207         PR c++/11513
1208         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
1209
1210 2003-07-23  Mark Mitchell  <mark@codesourcery.com>
1211
1212         PR c++/11645
1213         * cp-tree.h (accessible_base_p): Declare.
1214         * call.c (build_over_call): Use it.
1215         * search.c (accessible_base_p): New function, split out from ...
1216         (lookup_base): ... here.
1217
1218         PR c++/11517
1219         * call.c (build_conditional_expr): Use perform_implicit_conversion
1220         and error_operand_p.  Robustify.
1221         * typeck.c (build_unary_op): Use perform_implicit_conversion.
1222
1223 2003-07-23  Nathan Sidwell  <nathan@codesourcery.com>
1224
1225         PR c++/10953
1226         * parser.c (cp_parser_nested_name_specifier): Reset scope on
1227         failure.
1228         (cp_parser_elaborated_type_specifier): Likewise.
1229
1230 2003-07-22  Mark Mitchell  <mark@codesourcery.com>
1231
1232         Eliminate use of POINTER_TYPE for pointers-to-members.
1233         * call.c (standard_conversion): Rework pointer-to-member handling.
1234         Add comments.
1235         (add_builtin_candidate): Likewise.
1236         (resolve_scoped_fn_name): Remove.
1237         (build_conditional_expr): Rework pointer-to-member handling.
1238         (compare_ics): Likewise.
1239         * class.c (check_field_decls): Use TYPE_PTR_P.
1240         * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
1241         handling.
1242         * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
1243         (TYPE_PTRMEM_P): Add comment.
1244         (TYPE_PTR_P): Simplify.
1245         (TYPE_PTROB_P): Correct definition.
1246         (TYPE_PTR_TO_MEMBER_P): New macro.
1247         (TYPE_PTRMEM_CLASS_TYPE): Adjust.
1248         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1249         (resolved_scoped_fn_name): Remove declaration.
1250         (build_offset_ref): Change prototype.
1251         (resolve_offset_ref): Remove.
1252         (comp_target_types): Remove.
1253         * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
1254         handling.
1255         (convert_to_reference): Use can_convert.
1256         (ocp_convert): Improve error handling.  Rework pointer-to-member
1257         handling.
1258         (perform_qualification_conversions): Rework pointer-to-member
1259         handling.
1260         * decl.c (build_ptrmem_type): Handle functions too.
1261         (create_array_type_for_decl): Remove OFFSET_TYPE error message.
1262         (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
1263         (grokparms): Remove OFFSET_TYPE error message.
1264         * dump.c (cp_dump_tree): Rework pointer-to-member handling.
1265         * error.c (dump_type_prefix): Likewise.
1266         * expr.c (cplus_expand_constant): Use build_nop.
1267         * init.c (build_offset_ref): Add address_p parameter.  Fold in
1268         necessary bits from resolve_offset_ref.
1269         (resolve_offset_ref): Remove.
1270         * parser.c (cp_parser_postfix_expression): Remove special case
1271         code for OFFSET_TYPE.
1272         * pt.c (convert_nontype_argument): Rework pointer-to-member
1273         handling.
1274         (convert_template_argument): Likewise.
1275         (unify): Likewise.
1276         (invalid_nontype_parm_type_p): Likewise.
1277         (dependent_type_p_r): Likewise.
1278         * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
1279         (target_incomplete_p_): Rework pointer-to-member
1280         handling.
1281         (get_pseudo_ti_init): Likewise.
1282         (get_pseudo_ti_desc): Likewise.
1283         * semantics.c (finish_qualified_id_expr): Adjust call to
1284         build_offset_ref.  Remove use of resolve_offset_ref.
1285         * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
1286         * typeck.c (target_type): Use TYPE_PTRMEM_P.
1287         (type_unknown_p): Remove obsolete code about the time before
1288         non-dependent expressions were handled correctly.
1289         (qualify_type_recursive): Remove.
1290         (composite_pointer_type_r): New function.
1291         (composite_pointer_type): Use it.
1292         (merge_types): Remove dead comments.
1293         (comp_cv_target_types): Remove.
1294         (comp_target_types): Likewise.
1295         (comp_target_parms): Likewise.
1296         (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
1297         (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
1298         (build_binary_op): Do not use of comp_target_types.
1299         (pointer_diff): Remove OFFSET_TYPE case.
1300         (build_unary_op): Adjust pointer-to-member handling.
1301         (unary_complex_lvalue): Likewise.
1302         (check_for_casting_away_constness): Add description parameter.
1303         (build_static_cast): Pass it.
1304         (build_reinterpret_cast): Use check_for_casting_away_constness.
1305         (build_const_cast): Adjust pointer-to-member handling.
1306         (build_c_cast): Likewise.
1307         (convert_for_assignment): Remove OFFSET_TYPE error message.
1308         (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
1309         (comp_ptr_ttypes_reinterpret): Remove.
1310         (casts_away_constness_r): Adjust pointer-to-member handling.
1311         (casts_away_constness): Liekwise.
1312         (strip_all_pointer_quals): Remove.
1313         * typeck2.c (digest_init): Adjust pointer-to-member handling.
1314         (build_m_component_ref): Likewise.
1315
1316 2003-07-22  Wolfgang Bangerth  <bangerth@dealii.org>
1317
1318         * lex.c (unqualified_fn_lookup_error): Mention that the error
1319         message needs to be kept in synch with the manual.
1320
1321 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1322
1323         PR c++/11614
1324         * decl.c (grokdeclarator): An array member is only a flexible
1325         array member if the field itself is the array.
1326
1327 2003-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1328
1329         PR c++/10793
1330         * decl.c (xref_basetypes): Handle error_mark_node.
1331
1332 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1333
1334         * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
1335         * tree.c (lvalue_p_1): Set it.
1336         * class.c (check_field): Don't allow non-packed non-POD fields to
1337         be packed.
1338         * call.c (reference_binding): Need a temporary for all bitfield
1339         and packed fields.
1340         (convert_like_real): Check it is ok to make a temporary here.
1341
1342 2003-07-21  Nathan Sidwell  <nathan@codesourcery.com>
1343
1344         * cp-tree.h (hack_identifier): Remove.
1345         * method.c (hack_identifier): Remove.
1346         * semantics.c (finish_id_expression): Expand hack_identifier
1347         here. Simplify.
1348
1349 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1350
1351         * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
1352         semantics.c typeck.c: Remove unnecessary casts.
1353
1354 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
1355
1356         * cp-tree.h (hack_identifier): Remove.
1357         * method.c (hack_identifier): Remove.
1358         * semantics.c (finish_id_expression): Expand hack_identifier
1359         here. Simplify.
1360
1361 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
1362
1363         * cp-tree.h (finish_non_static_data_member): Add object param.
1364         * method.c (hack_identifier): Adjust.
1365         * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
1366         again for a FIELD_DECL.
1367         * semantics.c (finish_non_static_data_member): Add object
1368         parameter. Always save the DECL in the COMPONENT_REF.
1369         * call.c (resolve_scoped_fn_name): Adjust.
1370
1371 2003-07-17  Zack Weinberg  <zack@codesourcery.com>
1372
1373         * pt.c (get_bindings): Make definition consistent with
1374         forward declaration.
1375
1376 2003-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1377
1378         PR c++/7809
1379         * friend.c (add_friend): Check access for member functions
1380         and templates.
1381
1382 2003-07-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1383
1384         PR c++/10668
1385         * typeck.c (build_class_member_access_expr): Improve diagnostic.
1386
1387 2003-07-16  Mark Mitchell  <mark@codesourcery.com>
1388
1389         PR c++/11547
1390         * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
1391         macro.
1392         (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
1393         * decl.c (duplicate_decls): Merge
1394         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1395         * parser.c (cp_parser_postfix_expression): Adjust call to
1396         cp_parser_initializer_list and
1397         cp_parser_parenthesized_expression_list.
1398         (cp_parser_parenthesized_expression_list): Add non_constant_p.
1399         (cp_parser_new_placement): Adjust call to
1400         cp_parser_parenthesized_expression_list.
1401         (cp_parser_direct_new_declarator): Likewise.
1402         (cp_parser_conditional_expression): Remove.
1403         (cp_parser_constant_expression): Parse an assignment-expression,
1404         not a conditional-expression.
1405         (cp_parser_simple_declaration): Resolve expression/declaration
1406         ambiguity more quickly.
1407         (cp_parser_mem_initializer): Adjust call to
1408         cp_parser_parenthesized_expression_list.
1409         (cp_parser_init_declarator): Keep track of whether or not the
1410         initializer is a constant-expression.
1411         (cp_parser_initializer): Add non_constant_p parameter.
1412         (cp_parser_initializer_clause): Likewise.
1413         (cp_parser_initializer_list): Likewise.
1414         (cp_parser_attribute_list): Adjust call to
1415         cp_parser_parenthesized_expression_list.
1416         (cp_parser_functional_cast): Likewise.
1417         * pt.c (tsubst_decl): Copy
1418         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1419         (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
1420         * semantics.c (finish_id_expression): Use
1421         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1422
1423 2003-07-16  Neil Booth  <neil@daikokuya.co.uk>
1424
1425         * lang-options.h: Remove.
1426
1427 2003-07-16  Andrew Pinski  <pinskia@physics.uc.edu>
1428
1429         PR c/10962
1430         * class.c (field_decl_cmp): Remove.
1431         (resort_field_decl_cmp): Remove.
1432         (resort_sorted_fields): Remove.
1433         (add_fields_to_vec): Rename to ...
1434         (add_fields_to_record_type): this.
1435         (finish_struct_1): Change to be using
1436         sorted_fields_type's fields.
1437         * cp-tree.h (lang_decl): In lang_decl_u3
1438         change sorted_fields to be a pointer to
1439         sorted_fields_type.
1440         (resort_sorted_fields): Remove prototype.
1441         * search.c (lookup_field_1): Change to be using
1442         sorted_fields_type's fields.
1443
1444 2003-07-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1445
1446         PR c++/5421
1447         * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
1448         is a member of other class.
1449         * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
1450         is a specialization of function template.
1451
1452 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1453
1454         PR c++/10903
1455         * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
1456         Improve.
1457
1458 2003-07-15  Mark Mitchell  <mark@codesourcery.com>
1459
1460         * cp-tree.def (LOOKUP_EXPR): Remove.
1461         * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
1462         (LOOKUP_EXPR_GLOBAL): Remove.
1463         (get_bindings): Remove.
1464         (is_aggr_type_2): Remove.
1465         * call.c (resolved_scoped_fn_name): Remove support for
1466         LOOKUP_EXPR.
1467         * decl.c (grokfndecl): Likewise.
1468         (grokdeclarator): Likewise.
1469         * error.c (dump_decl): Likewise.
1470         (dump_expr): Likewise.
1471         * friend.c (do_friend): Likewise.
1472         * init.c (build_offset_ref): Likewise.
1473         * lex.c (unqualified_fn_lookup_error): Use pedwarn.  Do not create
1474         LOOKUP_EXPRs
1475         * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
1476         * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
1477         test.
1478         * pt.c (get_bindings): Give it internal linkage.
1479         (check_explicit_specialization): Remove support for LOOKUP_EXPR.
1480         (lookup_template_function): Likewise.
1481         (for_each_tempalte_parm_r): Likewise.
1482         (tsubst_decl): Likewise.
1483         (tsubst_qualified_id): Handle template template parameters.
1484         (tsubst_copy): Remove support for LOOKUP_EXPR.
1485         (tsubst_copy_and_build): Likewise.
1486         (most_general_template): Likewise.
1487         (value_dependent_expression_p): Likewise.
1488         (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
1489         always dependent.
1490         * semantics.c (perform_koenig_lookup): Do not create
1491         IDENTIFIER_NODEs.
1492         (finish_fname): Likewise.
1493         (finish_id_expression): Likewise.
1494         * tree.c (is_aggr_type_2): Remove.
1495
1496 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1497
1498         PR c++/11531
1499         * typeck.c (check_return_expr): Fix thinko in diagnostic.
1500
1501 2003-07-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1502
1503         PR c++/10108
1504         * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
1505         error_mark_node.
1506
1507 2003-07-14  Mark Mitchell  <mark@codesourcery.com>
1508
1509         PR c++/11509
1510         * pt.c (dependent_scope_ref_p): New function.
1511         (value_dependent_expression_p): Use it.
1512         (type_dependent_expression_p): Likewise.
1513
1514         * pt.c (tsubst_friend_function): Use reregister_specialization.
1515
1516         PR c++/7019
1517         * cp-tree.h (lookup_qualified_name): Adjust prototype.
1518         * decl.c (lookup_qualified_name): Add complain parameter.  Adjust
1519         call to is_aggr_type.
1520         * parser.c (cp_parser_lookup_name): Adjust call to
1521         lookup_qualified_name.
1522         * pt.c (tsubst_qualified_id): Likewise.
1523         (tsubst_copy_and_build): Likewise.
1524         * semantics.c (finish_qualified_id_expr): Deal with erroneous
1525         expressions.
1526
1527 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
1528
1529         PR c++/11510
1530         * call.c (op_error): Properly format  REALPART_EXPR and
1531         IMAGPART_EXPR.
1532         * error.c (dump_expr): Likewise.
1533
1534 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
1535
1536         * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
1537
1538 2003-07-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1539
1540         PR c++/5293
1541         * call.c (initialize_reference): Improve diagnostic.
1542
1543 2003-07-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1544
1545         PR c++/11154
1546         * pt.c (more_specialized_class): Add full_args parameter.
1547         (most_specialized_class): Adjust calls to more_specialized_class.
1548         * cp-tree.h (more_specialized_class): Adjust declaration.
1549
1550 2003-07-14  Dan Nicolaescu  <dann@ics.uci.edu>
1551
1552         * lex.c (enum tree_node_kind): Delete.
1553
1554 2003-07-13  Mark Mitchell  <mark@codesourcery.com>
1555
1556         PR c++/11503
1557         * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
1558         (SET_DECL_SELF_REFERENCE_P): Likewise.
1559         * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
1560         * pt.c (tsubst_decl): Copy it.
1561         * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
1562
1563         * pt.c (reregister_specialization): Fix thinko in previous change.
1564
1565         * cp-tree.h (cp_id_kind): New type.
1566         (unqualified_name_lookup_error): Change prototype.
1567         (unqualified_fn_lookup_error): New function.
1568         (do_identifier): Remove.
1569         (do_scoped_id): Likewise.
1570         (tsubst_copy_and_build): Change prototype.
1571         (reregister_specialization): New function.
1572         (perform_koenig_lookup): Likewise.
1573         (finish_id_expression): Likewise.
1574         * call.c (build_method_call): Adjust call to
1575         unqualified_name_lookup_error.
1576         * decl.c (duplicate_decls): Use reregister_specialization.
1577         * lex.c (is_global): Remove.
1578         (unqualified_name_lookup_error): Return a value.
1579         (do_identifier): Remove.
1580         (do_scoped_id): Likewise.
1581         (identifier_typedecl_value): Remove.
1582         (unqualified_fn_lookup_error): New function.
1583         * parser.c (cp_parser_id_kind): Remove.
1584         (cp_parser_non_constant_id_expression): Remove.
1585         (cp_parser_primary_expression): Use finish_id_expression.
1586         (cp_parser_class_or_namespace_name): Use cp_id_kind, not
1587         cp_parser_id_kind.
1588         (cp_parser_postfix_expression): Use perform_koenig_lookup.
1589         (cp_parser_template_argument): Use cp_id_kind.
1590         (cp_parser_fold_non_dependent_expr): Adjust call to
1591         tsubst_copy_and_build.
1592         * pt.c (unregister_specialization): Rename to ...
1593         (reregister_specialization): This.
1594         (tsubst_friend_function): Use it.
1595         (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
1596         (tsubst_qualified_id): Likewise.
1597         (tsubst_expr): Likewise.
1598         (tsubst_copy_and_build): Add function_p parameter.  Use
1599         finish_id_expression.  Introduce RECUR macro.
1600         (tsubst_non_call_postfix_expression): New function.
1601         (regenerate_decl_from_template): Use reregister_specialization.
1602         * semantics.c (perform_koenig_lookup): New function.
1603         (finish_id_expression): Likewise.
1604
1605 2003-07-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1606
1607         * pt.c (push_access_scope_real): Remove.
1608         (push_access_scope): Move code from push_access_scope_real.
1609         (pop_access_scope): Don't check for TEMPLATE_DECL.
1610         (instantiate_template): Defer access checking during template
1611         substitution.
1612         (regenerate_decl_from_template): Tidy.
1613
1614 2003-07-11  Nathanael Nerode  <neroden@gcc.gnu.org>
1615
1616         PR c++/11437
1617         * operators.def: Add definitions for __imag__, __real__.
1618
1619 2003-07-11  Nathan Sidwell  <nathan@codesourcery.com>
1620
1621         PR c++/11050
1622         * parser.c (cp_parser_expression_list): Rename to ...
1623         (cp_parser_parenthesized_expression_list): ... here. Add attribute
1624         parameter, parse the surounding parentheses.
1625         (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
1626         parameters. Return int.
1627         (cp_parser_skip_to_closing_parenthesis or comma): Remove.
1628         (cp_parser_postfix_expression): Adjust function call parsing.
1629         (cp_parser_new_placement): Adjust.
1630         (cp_parser_new_initializer): Likewise.
1631         (cp_parser_cast_expression): Likewise.
1632         (cp_parser_selection_statement): Likewise.
1633         (cp_parser_mem_initializer): Likewise.
1634         (cp_parser_asm_definition): Likewise.
1635         (cp_parser_init_declarator): Likewise.
1636         (cp_parser_declarator): Make
1637         cdtor_or_conv_p an int ptr.
1638         (cp_parser_direct_declarator): Likewise. Check for a parameter
1639         list on cdtors & conv functions.
1640         (cp_parser_initializer): Adjust.
1641         (cp_parser_member_declaration): Adjust.
1642         (cp_parser_attribute_list): Move code into
1643         cp_parser_parens_expression_list.
1644         (cp_parser_functional_cast): Adjust.
1645         * pt.c (type_dependent_expression_p): Erroneous expressions are
1646         non-dependent.
1647
1648 2003-07-11  Geoffrey Keating  <geoffk@apple.com>
1649
1650         * decl.c (cp_finish_decl): Handle 'used' attribute.
1651
1652         * cp-lang.c (c_reset_state): New dummy routine.
1653         * cp-tree.h (finish_file): Move prototype to c-common.h.
1654         * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
1655
1656 2003-07-11  Mark Mitchell  <mark@codesourcery.com>
1657
1658         PR c++/8327
1659         * pt.c (tsubst_qualified_id): Implement suggested resolution for
1660         Core Issue 2.
1661         (type_dependent_expression_p): Likewise.
1662
1663 2003-07-10  Mark Mitchell  <mark@codesourcery.com>
1664
1665         * typeck.c (build_binary_op): Do not warn about signed
1666         vs. unsigned comparisons in the bodies of templates.
1667
1668         PR c++/9411
1669         * parser.c (cp_parser_postfix_expression): Check dependency of
1670         functions.
1671
1672 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
1673
1674         PR c++/10032
1675         * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
1676         still errors.
1677
1678         PR c++/10527
1679         * error.c (decl_to_string): Do not print default argument
1680         expressions.
1681
1682         * cp-tree.h (break_out_calls): Remove declaration.
1683         * tree.c (break_out_calls): Remove.
1684         * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
1685
1686 2003-07-09  Nathan Sidwell  <nathan@codesourcery.com>
1687
1688         PR c++ 9483
1689         * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
1690         * decl2.c (constructor_name_p): Avoid repeated constructor_name
1691         calls.
1692         * decl.c (grokdeclarator): Refactor ctor/dtor detection.
1693
1694 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
1695
1696         * typeck.c (build_x_unary_op): Take note of the fact that
1697         PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
1698         trees.
1699
1700         * parser.c (cp_parser_primary_expression): Preserve the form of
1701         qualified expressions in templates, even if they are not
1702         dependent.
1703         * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
1704         (tsubst_qualified_id): Likewise.
1705         * search.c (accessible_p): Treat everything in the body of a
1706         template as accessible.
1707
1708 2003-07-08  Mark Mitchell  <mark@codesourcery.com>
1709
1710         * cp-tree.def (NON_DEPENDENT_EXPR): New node.
1711         * cp-tree.h (build_call_from_tree): Remove.
1712         (build_member_call): Likewise.
1713         (dependent_template_arg_p): Remove.
1714         (any_dependent_template_arguments_p): New function.
1715         (dependent_template_id_p): Likewise.
1716         (any_type_dependent_arguments_p): Likewise.
1717         (build_non_dependent_expr): Likewise.
1718         (build_non_dependent_args): Likewise.
1719         (build_x_compound_expr): Adjust prototype.
1720         * call.c (build_new_method_call): Handle non-dependent expressions
1721         correctly.
1722         * decl2.c (grok_array_decl): Likewise.
1723         (build_offset_ref_call_from_tree): Likewise.
1724         (build_call_from_tree): Remove.
1725         * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
1726         (dump_expr): Likewise.
1727         * init.c (build_member_call): Remove.
1728         * mangle.c (write_expression): Update handling for template-ids.
1729         * parser.c (cp_parser_primary_expression): Use
1730         any_dependent_template_arguments_p.  Update constant-expression
1731         handling.
1732         (cp_parser_postfix_expression): Use
1733         any_type_dependent_arguments_p.  Simplify call processing.
1734         (cp_parser_unary_expression): Simplify.
1735         (cp_parser_expression): Adjust for changes to
1736         build_x_compound_expr.
1737         (cp_parser_template_argument): Implement standard-conforming
1738         parsing of non-type template arguments.
1739         (cp_parser_direct_declarator): Use
1740         cp_parser_fold_non_dependent_expr.
1741         (cp_parser_fold_non_dependent_expr): New function.
1742         (cp_parser_next_token_ends_template_argument_p): Likewise.
1743         * pt.c (convert_template_argument): Do not call
1744         maybe_fold_nontype_arg.
1745         (tsubst_baselink): Likewise.
1746         (tsubst_copy_and_build): Share common code.  Make sizeof/alignof
1747         processing work correctly for non-dependent expressions.  Adjust
1748         handling of COMPOUND_EXPR.  Simplify call processing.
1749         (value_dependent_expression_p): Deal with functional casts and
1750         sizeof/alignof correctly.
1751         (type_dependent_expression_p): Handle overloaded functions.
1752         (any_type_dependent_arguments_p): New function.
1753         (any_dependent_template_arguments_p): Likewise.
1754         (dependent_template_p): Treat SCOPE_REFs as dependent.
1755         (dependent_template_id_p): Simplify.
1756         (build_non_dependent_expr): New function.
1757         (build_non_dependent_args): Likewise.
1758         * semantics.c (finish_stmt_expr): Don't make dependent
1759         statement-expresions have void type.
1760         (finish_call_expr): Handle non-dependent expressions
1761         correctly.
1762         * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
1763         * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
1764         type size_t, even in templates.
1765         (expr_sizeof): Likewise.
1766         (finish_class_member_access_expr): Handle non-dependent expressions
1767         correctly.
1768         (build_x_indirect_ref): Likewise.
1769         (build_x_binary_op): Likewise.
1770         (build_x_unary_op): Likewise.
1771         (build_x_conditional_expr): Likewise.
1772         (build_x_compound_expr): Likewise.
1773         * typeck2.c (build_x_arrow): Likewise.
1774
1775 Wed Jul  9 02:28:39 CEST 2003  Jan Hubicka  <jh@suse.cz>
1776
1777         * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
1778         * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
1779         (start_function): Use DECL_ESTIMATED_INSNS.
1780         * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
1781
1782         * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
1783         unit-at-a-time
1784
1785 2003-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1786
1787         PR c++/11030
1788         * pt.c (instantiate_class_template): Don't call xref_tag to
1789         inject name when the friend class is a specialization.
1790
1791 2003-07-07  Mark Mitchell  <mark@codesourcery.com>
1792
1793         * cp-tree.h (build_scoped_method_call): Remove.
1794         (lookup_qualified_name): Remove parameter.
1795         (tsubst_copy_and_build): Declare.
1796         (finish_qualified_object_call_expr): Remove.
1797         (check_accessibility_of_qualified_id): New function.
1798         (finish_qualified_id_expr): Likewise.
1799         (non_reference): Likewise.
1800         (build_expr_from-tree): Remove.
1801         * call.c (non_reference): Remove.
1802         (build_scoped_method_call): Likewise.
1803         (build_method_call): Use error_operand_p.  Assert that we are not
1804         processing a template.
1805         (standard_conversion): Use non_reference.
1806         * class.c (build_vtbl_entry_ref): Likewise.
1807         (build_vtbl_ref_1): Likewise.
1808         * cvt.c (build_expr_type_conversion): Use non_reference.
1809         * decl.c (lookup_qualified_name): Remove flags parameter.
1810         (grok_op_properties): Use non_reference.
1811         * decl2.c (grok_array_decl): Likewise.
1812         (build_expr_from_tree): Remove.
1813         (build_offset_ref_call_from_tree): Update comment.
1814         * error.c (parm_to_string): Call reinit_global_formatting_buffer.
1815         * except.c (prepare_eh_types): Use non_reference.
1816         (can_convert_eh): Likewise.
1817         * init.c (build_dtor_call): Avoid using build_method_call.
1818         * mangle.c (write_template_param): Remove misleading comment.
1819         * method.c (locate_copy): Use non_reference.
1820         * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
1821         (cp_parser_primary_expression): Do not create SCOPE_REFs is
1822         non-dependent contexts.
1823         (cp_parser_postfix_expression): Use finish_qualified_id_expr.
1824         (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
1825         build_expr_from_tree.
1826         (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
1827         Use check_accessibility_of_qualified_id.
1828         * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
1829         build_expr_from_tree.
1830         (tsubst_baselink): New function.
1831         (tsubst_qualified_id): Likewise.
1832         (tsubst_copy): Use them.  Remove support for METHOD_CALL_EXPR.
1833         (tsubst_expr): Adjust call to lookup_qualified_name.
1834         (tsubst_copy_and_build): Handle SCOPE_REFs specially.  Adjust
1835         handling of CALL_EXPRs.
1836         (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
1837         * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
1838         * search.c (check_final_overrider): Likewise.
1839         * semantics.c (check_accessibility_of_qualified_id): New function.
1840         (finish_qualified_object_call_expr): Remove.
1841         * typeck.c (target_type): Use non_reference.
1842         (cxx_sizeof_or_alignof_type): Likewise.
1843         (dubious_conversion_warnings): Likewise.
1844         (convert_for_initialization): Likewise.
1845         (non_reference): New function.
1846
1847 2003-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1848
1849         * decl.c (print_binding_level, print_other_binding_stack,
1850         print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
1851         stdio calls.
1852         * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
1853
1854 2003-07-07  Andreas Jaeger  <aj@suse.de>
1855
1856         * friend.c: Convert to ISO C90 prototypes.
1857
1858         * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
1859         language.
1860         * cfns.h: Regenerate.
1861
1862         * typeck.c: Convert remaining prototypes to ISO C90.
1863         * search.c: Likewise.
1864
1865         * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
1866         * semantics.c (expand_or_defer_fn): Likewise
1867         * mangle.c (discriminator_for_string_literal): Likewise.
1868         * g++spec.c (lang_specific_driver): Likewise.
1869
1870         * search.c (lookup_base_r): Remove unused variable.
1871
1872 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
1873
1874         * semantics.c: (genrtl_try_block) Adjust emit_line_note
1875         calls.
1876
1877 2003-07-07  Andreas Jaeger  <aj@suse.de>
1878
1879         * search.c (lookup_base_r): Remove unused variable.
1880
1881 2003-07-06  Michael Chastain  <mec@shout.net>
1882
1883         PR debug/10055
1884         * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
1885         assigning to input_filename directly.
1886
1887 2003-07-06  Kazu Hirata  <kazu@cs.umass.edu>
1888
1889         * call.c: Fix comment formatting.
1890         * class.c: Likewise.
1891         * cp-tree.h: Likewise.
1892         * decl.c: Likewise.
1893         * decl2.c: Likewise.
1894         * error.c: Likewise.
1895         * method.c: Likewise.
1896         * name-lookup.c: Likewise.
1897         * parser.c: Likewise.
1898         * pt.c: Likewise.
1899         * rtti.c: Likewise.
1900         * search.c: Likewise.
1901         * typeck.c: Likewise.
1902
1903 2003-07-06  Mark Mitchell  <mark@codesourcery.com>
1904
1905         PR c++/11345
1906         * search.c (lookup_base_r): Remove is_non_public and
1907         within_current_scope parameters.  Remove other dead code.
1908         (lookup_base): Adjust call to lookup_base_r.
1909         (adjust_result_of_qualified_name_lookup): Improve comment.
1910         * semantics.c (finish_call_expr): Use maybe_dummy_object.
1911
1912 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
1913
1914         * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
1915         LANG_HOOKS_MISSING_ARGUMENT): Override.
1916
1917 2003-07-05  Mark Mitchell  <mark@codesourcery.com>
1918
1919         PR c++/11431
1920         * typeck.c (build_static_cast): Check for reference conversions
1921         earlier.
1922
1923 2003-07-04  Mark Mitchell  <mark@codesourcery.com>
1924
1925         * cp-tree.h (perform_integral_promotions): Declare.
1926         * call.c (build_addr_func): Use decay_conversion.
1927         (convert_arg_to_ellipsis): Likewise.  Remove misleading comment.
1928         (convert_for_arg_passing): Use perform_integral_promotions.
1929         * cvt.c (build_expr_type_conversion): Use decay_conversion.
1930         (type_promotes_to): Do not return a cv-qualified type.
1931         * decl.c (grok_reference_init): Fix formatting.
1932         (get_atexit_node): Use decay_conversion.
1933         (build_enumerator): Use perform_integral_promotions.
1934         * init.c (build_vec_init): Use decay_conversion.
1935         * semantics.c (finish_expr_stmt): Likewise.
1936         (finish_switch_cond): Use perform_integral_promotions.
1937         * typeck.c (default_conversion): Likewise.
1938         (perform_integral_promotions): New function.
1939         (build_indirect_ref): Use decay_conversion.
1940         (build_array_ref): Use perform_integral_promotions.
1941         (convert_arguments): Use decay_conversion.
1942         (build_unary_op): Use perform_integral_promotions.
1943         (build_c_cast): Use decay_conversion.
1944         (build_modify_expr): Likewise.
1945         (convert_for_initialization): Likewise.
1946         * typeck2.c (build_x_arrow): Likewise.
1947
1948 2003-07-04  Kazu Hirata  <kazu@cs.umass.edu>
1949
1950         * call.c: Fix comment typos.
1951         * class.c: Likewise.
1952         * cp-tree.h: Likewise.
1953         * cvt.c: Likewise.
1954         * decl2.c: Likewise.
1955         * decl.c: Likewise.
1956         * init.c: Likewise.
1957         * mangle.c: Likewise.
1958         * parser.c: Likewise.
1959         * pt.c: Likewise.
1960         * search.c: Likewise.
1961         * semantics.c: Likewise.
1962         * tree.c: Likewise.
1963         * typeck.c: Likewise.
1964
1965 2003-07-04  Zack Weinberg  <zack@codesourcery.com>
1966
1967         * parser.c (cp_lexer_read_token): No need to handle string
1968         constant concatenation.
1969
1970 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1971
1972         * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
1973         (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
1974         ATTRIBUTE_GCC_CXXDIAG.
1975
1976 2003-07-03  Mark Mitchell  <mark@codesourcery.com>
1977
1978         * call.c (build_addr_func): Handle bound pointers-to-members.
1979         (build_method_call): Do not call resolve_offset_ref.
1980         (implicit_conversion): Likewise.
1981         (resolve_scoped_fn_name): Use finish_non_static_data_member, not
1982         resolve_offset_ref.
1983         (resolve_args): Do not call resolve_offset_ref.
1984         (build_conditional_expr): Likewise.
1985         (build_new_method_call): Likewise.
1986         * cp-tree.def (OFFSET_REF): Update documentation.
1987         * cvt.c (cp_convert_to_pointer): Update handling of conversions from
1988         pointers to members to pointers.
1989         (ocp_convert): Do not call resolve_offset_ref.
1990         (convert_to_void): Likewise.
1991         (build_expr_type_conversion): Likewise.
1992         * decl2.c (delete_sanity): Likewise.
1993         * init.c (resolve_offset_ref): Simplify greatly.
1994         (build_vec_delete): Do not call resolve_offset_ref.
1995         * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
1996         if appropriate.
1997         (cp_parser_unary_expression): Use
1998         cp_parser_simple_cast_expression.
1999         (cp_parser_delete_expression): Likewise.
2000         (cp_parser_cast_expression): Likewise.
2001         (cp_parser_pm_expression): Use cp_parser_binary_op.
2002         (cp_parser_simple_cast_expression): New function.
2003         * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
2004         * semantics.c (finish_increment_expr): Likewise.
2005         (finish_typeof): Likewise.
2006         * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
2007         * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
2008         (decay_conversion): Do not call resolve_offset_ref.
2009         (finish_class_member_access_expr): Likewise.
2010         (convert_arguments): Likewise.
2011         (build_x_binary_op): Handle DOTSTAR_EXPR.
2012         (condition_conversion): Do not call resolve_offset_ref.
2013         (unary_complex_lvalue): Likewise.
2014         (build_static_cast): Likewise.
2015         (build_reinterpret_cast): Likewise.
2016         (build_const_cast): Likewise.
2017         (build_c_cast): Likewise.
2018         (build_modify_expr): Likewise.
2019         (convert_for_assignment): Likewise.
2020         (convert_for_initialization): Likewise.
2021         * typeck2.c (build_x_arrow): Likewise.
2022         (build_m_component_ref): Simplify.
2023
2024         * call.c (build_scoped_method_call): Use convert_to_void.
2025         (build_method_call): Likewise.
2026         * class.c (check_field_decls): Remove dead code.
2027         * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
2028         * decl2.c (grok_array_decl): Remove dead code.
2029         (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2030         as pointer-to-member representation.
2031         * init.c (build_offset_ref): Tidy.
2032         (build_vec_delete_1): Use convert_to_void.
2033         * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2034         as pointer-to-member representation.
2035
2036 2003-07-03  Nathan Sidwell  <nathan@codesourcery.com>
2037
2038         PR c++/9162
2039         * decl.c (grokdeclarator): Return friend decls, not
2040         void_type_node.
2041         * decl2.c (grokfield): Alter friend decl check.
2042         * parser.c (struct cp_parser): Document default_arg chain on
2043         unparsed_functions_queue.
2044         (cp_parser_save_default_args): New.
2045         (cp_parser_init_declarator, cp_parser_function_definition,
2046         cp_parser_member_declaration): Call it.
2047         (cp_parser_class_specifier): Remove unused variable. Alter
2048         processing of unparsed_functions_queue.
2049
2050 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2051
2052         * class.c (add_method, check_field_decl): Fix format specifier.
2053         * decl.c (duplicate_decls, pushdecl, check_goto,
2054         fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
2055         start_enum): Likewise.
2056         * decl2.c (ambiguous_decl): Likewise.
2057         * pt.c (redeclare_class_template): Likewise.
2058
2059 2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
2060
2061         PR c++/10219
2062         * pt.c (type_unification_real): Don't unify exprs of error type.
2063         * tree.c (error_type): Don't die on error_type.
2064
2065         PR c++/9779
2066         * decl2.c (arg_assoc_class): Don't die on NULL type.
2067         * typeck.c (type_unknown_p): Don't die on untyped expressions.
2068
2069 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2070
2071         PR c++/6949
2072         * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
2073         classes.
2074
2075 2003-07-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2076
2077         * error.c (locate_error): %P takes an `int', not a `tree'.
2078
2079 Wed Jul  2 00:36:48 CEST 2003  Jan Hubicka  <jh@suse.cz>
2080
2081         * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
2082         (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
2083         clear DECL_DEFER_OUTPUT once function is processed; avoid flags
2084         massaging.
2085
2086         * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
2087         (expand_or_defer_fn): Declare.
2088         (lower_function): Declare.
2089         * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
2090         * decl2.c: Include cgraph.h and varpool.h
2091         (maybe_emit_vtables):  Make explicit instantations as needed.
2092         (mark_member_pointers, lower_function): New functions.
2093         (finish_file): Do unit-at-a-time.
2094         * method.c (synthesize_method): Use expand_or_defer_fn.
2095         * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
2096         * parser.c (cp_parser_function_definition_after_decl): Use
2097         expand_or_defer_fn.
2098         * pt.c (instantiate_decl): Likewise.
2099         * semantics.c: Include cgraph.h
2100         (expand_or_defer_fn): Break out from ...
2101         (expand_body): ... here; deal with unit-at-a-time.
2102         * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
2103         LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
2104
2105 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2106
2107         * call.c (resolve_scoped_fn_name): Return error_mark_node for
2108         erroneous cases.
2109
2110 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2111
2112         PR c++/11149
2113         * call.c (resolve_scoped_fn_name): Check that the qualifying scope
2114         is a class type.
2115
2116 2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
2117
2118         PR c++/8046
2119         * error.c (dump_decl): Handle BIT_NOT_EXPR as
2120         pseudo destructor calls.
2121
2122 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
2123
2124         * cp-tree.h (define_label): Replace filename and lineno
2125         arguments with a location_t.
2126         * decl.c (pop_label): Adjust define_label call.
2127         (define_label): Replace filename and lineno arguments with a
2128         location_t.
2129         * semantics.c (finish_label): Adjust define_label call.
2130
2131 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2132
2133         PR c++/9559
2134         * decl2.c (grokfield): Do not build NOP_EXPRs around the
2135         error_mark_node.
2136
2137 2003-06-30  Neil Booth  <neil@daikokuya.co.uk>
2138
2139         * Make-lang.in: Update.
2140         * cp-lang.c (c_language): Define.
2141         (LANG_HOOKS_INIT_OPTIONS): Use common hook.
2142         * cp-tree.h (cxx_init_options): Remove.
2143         * lex.c: Don't include diagnostic.h.
2144         (cxx_init_options): Remove.
2145
2146 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2147
2148         PR c++/4933
2149         * error.c (dump_expr): Support correctly the COMPOUND_EXPR
2150         tree generated within a template. Use dump_expr to dump an
2151         expression sizeof.
2152
2153 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2154
2155         * mangle.c (write_expression): Exit gracefully when trying to
2156         mangle a CALL_EXPR.
2157
2158 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2159
2160         PR c++/10750
2161         * parser.c (cp_parser_primary_expression): A VAR_DECL with a
2162         (value- or type-) dependent expression as DECL_INITIAL is a
2163         valid constant-expression (at parser time).
2164
2165 2003-06-30  Giovanni Bajo <giovannibajo@libero.it>
2166
2167         PR c++/11106
2168         * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
2169         USING_DECL, instead of print_tree_identifier.
2170
2171 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2172
2173         * cp-tree.h (language_to_string): Adjust declaration.
2174         * dump.c (cp_dump_tree): Adjust usage.
2175         * error.c (dump_char): Use output_formatted_scalar. Tidy.
2176         (parm_to_string): Lose unused parameter.  Tidy.
2177         (expr_to_string): Likewise.
2178         (code_to_string): Likewise.
2179         (language_to_string): Likewise.
2180         (op_to_string): Likewise.
2181         (assop_to_string): Likewise.
2182         (digit_buffer): Remove.
2183         (dump_type): Format builtin vector type as __vector__.
2184
2185 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2186
2187         * error.c (print_integer): Remove.
2188         (dump_type_suffix): Adjust.
2189         (dump_expr): Likewise.
2190
2191 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2192
2193         * error.c (print_instantiation_partial_context): Take a
2194         location_t.
2195         (print_instantiation_full_context): Adjust.
2196         (print_instantiation_context): Adjust.
2197
2198         * cp-tree.h (cp_line_of, cp_file_of): Remove.
2199         * error.c (cp_line_of, cp_file_of): Merge into ...
2200         (location_of): ... here. Make static, return a location_t.
2201         (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
2202
2203 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2204
2205         PR c++/10784
2206         * call.c (joust): Move warn_conversion check outwards.
2207
2208 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
2209
2210         * decl.c (build_typename_type)
2211         * mangle.c (write_template_template_arg)
2212         * parser.c (cp_parser_scope_through_which_access_occurs)
2213         * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
2214         * repo.c (get_base_filename)
2215         * semantics.c (maybe_convert_cond):
2216         Mark the definition static, matching the forward declaration.
2217
2218 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
2219
2220         PR c++/10468
2221         * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
2222
2223 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
2224
2225         PR c++/10796
2226         * decl.c (finish_enum): Implement DR377.
2227
2228         * decl.c (cp_finish_decl): Don't make variables with reference
2229         type readonly while they are being initialized.
2230
2231 2003-06-26  Mark Mitchell  <mark@codesourcery.com>
2232
2233         PR c++/11332
2234         * typeck.c (build_static_cast): Avoid returning expressions with
2235         reference type.
2236
2237 2003-06-26  Nathan Sidwell  <nathan@codesourcery.com>
2238
2239         * call.c (build_op_delete_call): Use strip_array_call. Correct
2240         error message to say 'delete' or 'delete[]'.
2241
2242 2003-06-26  Giovanni Bajo  <giovannibajo@libero.it>
2243
2244         PR c++/8266
2245         * pt.c (check_explicit_specialization): When looking up a
2246         template function from an identifier outside class-scope, bind
2247         it to CP_DECL_CONTEXT.
2248
2249 2003-06-25  Mark Mitchell  <mark@codesourcery.com>
2250
2251         PR c++/10990
2252         * search.c (lookup_base_r): Rely on accessible_p, rather than
2253         trying to emulate that logic here.
2254
2255         PR c++/10931
2256         * call.c (convert_like): Pass issue_conversion_warnings.
2257         (convert_like_with_context): Likewise.
2258         (convert_like_real): Add issue_conversion_warnings parameter.
2259         (perform_direct_initialization_if_possible): New function.
2260         * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
2261         * typeck.c (check_for_casting_away_constness): New function.
2262         (build_static_cast): Rewrite.
2263
2264 2003-06-24  Nathan Sidwell  <nathan@codesourcery.com>
2265
2266         * call.c (enforce_access): Assert we get a binfo.
2267         (build_op_delete_call): Pass a binfo to
2268         perform_or_defer_access_check.
2269         * class.c (alter_access): Likewise.
2270         * decl.c (make_typename_type): Likewise.
2271         (make_unbound_class_template): Likewise.
2272         * lex.c (do_identifier): Likewise.
2273         * method.c (hack_identifier): Likewise.
2274         * parser.c (cp_parser_lookup_name): Likewise.
2275         * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
2276         test.
2277         * semantics.c (finish_non_static_data_member): Likewise.
2278         (perform_or_defer_access_check): Expect a binfo.
2279         * typeck.c (comptypes): Expect types.
2280
2281         * mangle.c (find_substitution): Don't pass a non-type to same_type_p
2282         * friend.c (make_friend_class): Likewise.
2283         * pt.c (check_default_tmpl_args): Likewise.
2284         (lookup_template_class): Likewise.
2285
2286 Tue Jun 24 15:30:05 CEST 2003  Jan Hubicka  <jh@suse.cz>
2287
2288         * method.c (thunk_labelno): Move outside ifdef block to make garbage
2289         collector happy.
2290
2291 Tue Jun 24 13:52:34 CEST 2003  Jan Hubicka  <jh@suse.cz>
2292
2293         * class.c (build_vtable): Make vtables.
2294         * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
2295         * decl2.c (output_vtable_inherit): Rename to ...
2296         (prepare_assemble_variable): ... this one; change interface.
2297         (maybe_emit_vtables): Do not call output_vtable_inherit.
2298         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
2299         * cp-tree.h (prepare_assemble_variable): New.
2300
2301 2003-06-23  Andrew Pinski <pinskia@physics.uc.edu>
2302
2303         * method.c: add prototype for make_alias_for_thunk.
2304         (thunk_labelno, make_alias_for_thunk): only define
2305         if ASM_OUTPUT_DEF is defined.
2306
2307 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
2308
2309         * method.c (thunk_labelno): New variable.
2310         (make_alias_for_thunk): New function.
2311         (use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
2312         into the same section as the function it is calling.
2313         Include gt-cp-method.h.
2314         * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
2315         (cp/method.o): Depend on gt-cp-method.h.
2316         * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
2317
2318 Mon Jun 23 19:41:27 CEST 2003  Jan Hubicka  <jh@suse.cz>
2319
2320         * decl.c (register_dtor_fn): Mark cleanup as used.
2321         * decl2.c (mark_vtable_entries): Skip nops.
2322         * rtti.c (get_tinfo_ptr): Mark tinfo as used.
2323         (build_dynamic_cast_1): Likewise.
2324         (tinfo_base_init): Likewise.
2325         (emit_tinfo_decl): Likewise.
2326
2327 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
2328
2329         * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
2330         to it.
2331
2332 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
2333
2334         PR c++/10784
2335         * call.c (joust): Warn about choosing conversion sequence only if
2336         -Wconversion.
2337
2338 2003-06-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2339
2340         PR c++/10864
2341         * call.c (op_error): Tidy.
2342         * error.c (dump_expr): Properly format 'T()' when T is an
2343         aggregate type.
2344
2345 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
2346
2347         PR c++/10915
2348         * decl.c (grok_op_properties): Warn possible confusing conversion
2349         only if -Wconversion.
2350
2351 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
2352
2353         PR c++/10749
2354         * parser.c (cp_parser_class_head): See through dependent names
2355         when parsing a class-head.
2356
2357         PR c++/10845
2358         * pt.c (try_class_unification): Correct handling of member class
2359         templates.
2360
2361 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
2362
2363         * semantics.c (genrtl_finish_function): Adjust
2364         expand_function_end call.
2365
2366 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
2367
2368         PR c++/10939
2369         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
2370         functions.
2371         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
2372
2373         PR c++/9649
2374         * cp-tree.h (pushdecl_class_level): Change prototype.
2375         (push_class_level_binding): Likewise.
2376         * decl.c (add_binding): Reject duplicate static data members.
2377         (pushdecl_class_level): Return a value indicating whether or not
2378         the binding was valid.
2379         (push_class_level_binding): Likewise.
2380         * semantics.c (finish_member_declaration): Don't keep invalid
2381         declarations.
2382
2383         PR c++/11041
2384         * call.c (initialize_reference): Do not use cp_finish_decl to emit
2385         temporary variables.
2386         * cp-tree.h (static_aggregates): Declare.
2387         (pushdecl_top_level_and_finish): Likewise.
2388         * decl.c (pushdecl_top_level_1): New function.
2389         (pushdecl_top_level): Use it.
2390         (pushdecl_top_level_and_finish): New function.
2391         (initialize_local_var): Remove redundant code.
2392         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
2393         building_stmt_tree.
2394         * decl.h (static_aggregates): Remove.
2395         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
2396         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
2397         (tinfo_base_init): Likewise.
2398
2399 2003-06-19  Matt Austern  <austern@apple.com>
2400
2401         PR c++/11228
2402         * init.c (build_zero_init): Assert that number of array elements
2403         is an integer constant.
2404         (build_default_init) Don't use build_zero_init for arrays with
2405         variable number of elements.
2406
2407 2003-06-19  Andreas Jaeger  <aj@suse.de>
2408
2409         * cp-tree.h: Remove duplicated declarations.
2410
2411 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
2412
2413         * pt.c: Convert to ISO C.
2414         * semantics.c: Convert to ISO C.
2415
2416 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
2417
2418         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
2419         at_least_as_qualified_p, more_qualified_p): Return bool.
2420         * typeck.c: ANSIFY function definitions.
2421         (comp_array_types): Take redeclaration bool parameter.
2422         (comptypes): Rearrange STRICT handling.
2423         (at_least_as_qualified_p, more_qualified_p,
2424         comp_cv_qualification): Cache cv quals.
2425         (compparms): Rearrange loop.
2426
2427 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
2428
2429         * cp-tree.h (COMPARE_RELAXED): Rename to ...
2430         (COMPARE_DERIVED): ... here. Adjust comment.
2431         (resolve_typename_type_in_current_instantiation): Remove.
2432         (cp_tree_equal, comptypes): Return a bool.
2433         * cvt.c (convert_to_reference): Adjust comptypes call.
2434         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
2435         (resolve_typename_type_in_current_instantiation): Remove.
2436         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
2437         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
2438         calls. Refactor code.
2439         * typeck.c (comp_array_types): Return bool. Lose callback.
2440         parameter. Adjust cp_tree_equal calls.
2441         (comptypes): Return bool. Adjust strict handling. Remove relaxed
2442         enumeration and java type handling. Deal with typename types here.
2443         Adjust recursive and cp_tree_equals calls. Adjust base and derived
2444         checking.
2445         (comp_target_types): Remove unreachable code. Adjust
2446         same_or_base_type_p calls.
2447         (ptr_reasonably_similar): Adjust base and derived check.
2448
2449         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
2450         unused calculation.
2451         (check_return_expr): Adjust error messages.
2452         * cp-tree.def (SCOPE_REF): Correct comment.
2453
2454 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
2455
2456         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2457         string again.
2458
2459 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
2460
2461         * optimize.c (dump_function): Form complete flag name by
2462         prefixing 'fdump-' to string returned by dump_flag_name().
2463
2464 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
2465
2466         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2467         string.
2468
2469 2003-06-17  Jason Merrill  <jason@redhat.com>
2470
2471         PR c++/10929
2472         * decl.c (grokfndecl): Don't mark a function inline for
2473         -finline-functions if it isn't defined.
2474
2475 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
2476
2477         PR c++/10712
2478         * class.c (handle_using_decl): Robustify.
2479
2480         PR c++/11105
2481         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
2482         * mangle.c (struct globals): Remove internal_mangling_p.
2483         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
2484         (write_template_parm): Don't write out the level number.
2485         (conv_type_names): New variable.
2486         (hash_type): New function.
2487         (compare_type): Likewise.
2488         (mangle_conv_op_name_for_type): Don't try to mangle conversion
2489         operator names.
2490         * search.c (lookup_conversion_operator): New function.
2491         (lookup_fnfields_1): Use it.
2492
2493 2003-06-17  Andreas Jaeger  <aj@suse.de>
2494
2495         * except.c: Remove duplicate declaration of push_eh_cleanup.
2496
2497         * call.c: Remove extra declaration of inhibit_warnings.
2498
2499 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
2500
2501         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
2502         * mangle.c: Convert to ISO C.
2503
2504 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2505
2506         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
2507         macro.
2508
2509 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
2510
2511         * tree.c: Convert to ISO C.
2512
2513 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
2514
2515         * cp-tree.h: Follow spelling conventions.
2516         * mangle.c: Likewise.
2517         * method.c: Likewise.
2518         * parser.c: Likewise.
2519
2520 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
2521
2522         * decl.c (start_function): Adjust init_function_start call.
2523         * method.c (use_thunk): Likewise.
2524         * semantics.c (genrtl_start_function): Likewise.
2525
2526 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
2527
2528         * Make-lang.in: Remove c-options.o.
2529
2530 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
2531
2532         * lex.c: Convert to ISO C.
2533
2534         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
2535         * init.c: removes use of PARAMS macro.  Use ISO style function
2536         declarations.  (Not copyright-significant change.)
2537
2538         * rtti.c: Remove PARAMS.
2539
2540         * typeck2.c: Convert to ISO C.
2541
2542 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
2543
2544         PR c++/10635
2545         * typeck.c (build_c_cast): Check that the destination type is
2546         complete.
2547
2548 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
2549
2550         PR c++/10432
2551         * cp-tree.h (finish_declarator): Remove.
2552         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
2553         erroneous declarations.
2554         * semantics.c (finish_declarator): Remove.
2555
2556 2003-06-11  Roger Sayle  <roger@eyesopen.com>
2557
2558         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
2559         global static constructor/destructor if it will be empty, i.e.
2560         either doesn't call any ctors/dtors or only calls pure or const
2561         ctors/dtors.
2562
2563 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
2564
2565         * mangle.c (tm_p.h): Include it.
2566         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
2567
2568         PR c++/11131
2569         * tree.c (cp_cannot_inline_fn): Check for "inline" before
2570         instantiation.
2571
2572 2003-06-10  Jason Merrill  <jason@redhat.com>
2573
2574         PR c++/10968
2575         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
2576
2577 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
2578
2579         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
2580         (start_cleanup_cnt): New.
2581
2582 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
2583
2584         PR c++/11131
2585         * cp-tree.h (template_for_substitution): Declare.
2586         * decl2.c (mark_used): Use it when figuring out whether or not a
2587         function is inline.
2588         * pt.c (template_for_substitution): Give it external linkage.
2589         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
2590         possible.
2591
2592 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
2593
2594         PR 8861
2595         * mangle.c (write_real_cst): New function.  Implement
2596         ABI-compliant mangling of floating-point literals when
2597         -fabi-version>=2; provide backward compatibility with 3.3 when
2598         -fabi-version=1 (with warning).  Clarify commentary.
2599         (write_template_arg_literal): Use write_real_cst.
2600
2601 2003-06-07  Andreas Jaeger  <aj@suse.de>
2602
2603         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
2604
2605 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
2606
2607         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
2608         (LANG_HOOKS_HANDLE_OPTION): Override.
2609         * cp-tree.h (cxx_init_options): Update.
2610         * lex.c (cxx_init_options): Update.
2611
2612 Thu Jun  5 18:33:40 CEST 2003  Jan Hubicka  <jh@suse.cz>
2613
2614         * Make-lang.in:  Add support for stageprofile and stagefeedback
2615
2616 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
2617
2618         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
2619
2620 2003-06-04  Andreas Jaeger  <aj@suse.de>
2621
2622         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
2623
2624 2003-06-03  Jason Merrill  <jason@redhat.com>
2625
2626         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
2627
2628         * cp/decl.c (reshape_init): Handle vectors.
2629
2630         * testsuite/g++.dg/init/array10.C: New.
2631
2632 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2633
2634         PR c++/10940
2635         * pt.c (check_explicit_specialization): Check for 'static'
2636         earlier.
2637
2638 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
2639
2640         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
2641         the operand of a CONSTRUCTOR node.
2642
2643 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
2644
2645         * decl.c (cp_binding_level::this_entity): Rename from this_class.
2646         (cxx_scope_descriptor): New function.
2647         (cxx_scope_debug): Likewise.
2648         (push_binding_level): Use it.
2649         (pop_binding_level): Likewise.
2650         (suspend_binding_level): Likewise.
2651         (resume_binding_level): Likewise.
2652         (pushlevel_class): Adjust use of this_class.
2653         (pushtag): Likewise.
2654         (lookup_name_real): Likewise.
2655         (global_scope_name): New variable.
2656         (initialize_predefined_identifiers): Initialize it.
2657         (push_namespace): Use it.
2658         (make_cxx_scope): New function.
2659         (pushlevel): Use it.
2660         (pushlevel_class): Likewise.
2661         (push_binding_level): Simplify.  Loose the last two arguments.
2662         (make_binding_level): Remove.
2663         (initial_push__namespace_scope): New function.
2664         (push_namespace): Use it.  Simplify.
2665         (cxx_init_decl_processing): Likewise.
2666         (declare_namespace_level): Remove.
2667
2668 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2669
2670         PR c++/10956
2671         * pt.c (instantiate_decl): Don't use full template arguments if
2672         we are dealing with specializations.
2673
2674 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2675
2676         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
2677         (binding_depth): Unconditionally define.
2678         (is_class_level): Likewise.
2679         (indent): Likewise.  Take an indenting parameter.
2680         (push_binding_level): Remove conditional definittion.
2681         (pop_binding_level): Likewise.
2682         (suspend_binding_level): Likewise.
2683         (resume_binding_level): Likewise.
2684         (pushlevel): Likewise.
2685         (pushlevel_class): Likewise.
2686         (poplevel_class): Likewise.
2687         (pop_everything): Likewise.
2688
2689 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
2690
2691         * name-lookup.h (global_scope_p): New macro.
2692         * decl.c (pop_binding_level): Use it.  Don't refer directly to
2693         global_binding_level.
2694         (suspend_binding_level): Likewise.
2695         (global_bindings_p): Likewise.
2696         (print_other_binding_stack): Likewise.
2697         (print_binding_stack): Likewise.
2698         (maybe_push_to_top_level): Likewise.
2699         (pushdecl_namespace_level): Likewise.
2700         (cxx_init_decl_processing): Likewise.
2701         (start_decl): Likewise.
2702         (cp_finish_decl): Likewise.
2703         (start_function): Likewise.
2704         (global_binding_level): Remove.
2705
2706 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2707
2708         * parser.c (cp_parser_explicit_instantiation): Restore old
2709         access before template instantiation.
2710
2711 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
2712
2713         * lang-specs.h: Use -o to specify preprocessor's output file.
2714         Make -no-integrated-cpp work when building PCH files.
2715
2716 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2717
2718         PR c++/10682
2719         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
2720         check for implicitly created typedef to an enum.
2721
2722 2003-05-21  Jason Merrill  <jason@redhat.com>
2723
2724         * init.c (build_vec_delete): Copy the address into a temporary
2725         variable before calling build_vec_delete_1.
2726         * decl2.c (delete_sanity): Don't call stabilize_reference.
2727
2728 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
2729
2730         * pt.c (register_specialization): Update the decl's location,
2731         if necessary.
2732         (check_explicit_specialization): Likewise.
2733
2734 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2735
2736         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
2737
2738 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
2739
2740         PR c++/9738
2741         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
2742         if the old decl had instantiated DECL_RTL.
2743         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
2744
2745 2003-05-19  Matt Austern  <austern@apple.com>
2746
2747         * lang-options.h: Document -Wno-invalid-offsetof
2748         * typeck.c (build_class_member_access_expr): Don't complain about
2749         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
2750
2751 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
2752
2753         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
2754         (binding_entry_make): Make entry->chain NULL after getting an entry.
2755         fix the spelling of chain in a comment.
2756         (binding_table_free): speed up by having temporary variable.
2757         (binding_table_new): set table->chain to be NULL after allocating
2758         a table.
2759         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
2760         binding->previous to NULL after getting an binding for speed.
2761
2762 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2763
2764         * cp-tree.h (struct lang_type_class): Replace data member tags
2765         with hash-table nested_udts.
2766         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
2767         * class.c (unreverse_member_declarations): Don't touch
2768         CLASSTYPE_TAGS.
2769         (pushclass): Use cxx_remember_type_decls.
2770         * decl.c (struct cp_binding_level): Replace data member tags with
2771         hash-table type_decls.
2772         (pop_binding_level): Handle level->type_decls.
2773         (kept_level_p): Adjust.
2774         (poplevel): Remove unused local variable.
2775         (bt_print_entry): New function.
2776         (print_binding_level): Use it.
2777         (push_namespace): Build current_binding_level->type_decls.
2778         (maybe_process_template_type_declaration): Adjust.
2779         (pushtag): Likewise.
2780         (clear_anon_tags): Use binding_table_remove_anonymous_types.
2781         (gettags): Remove.
2782         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
2783         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
2784         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
2785         (cxx_init_decl_processing): Build global_binding_level->type_decls.
2786         (store_parm_decls): Remove pointless code.
2787         * name-lookup.c (free_binding_entry): New variable.
2788         (ENTRY_INDEX): New macro.
2789         (struct binding_table_s): New datatype.
2790         (binding_entry_make): New function.
2791         (binding_entry_free): Likewise.
2792         (binding_table_construct): Likewise.
2793         (binding_table_free): Likewise.
2794         (binding_table_new): Likewise.
2795         (binding_table_expand): Likewise.
2796         (binding_table_insert): Likewise.
2797         (binding_table_find): Likewise.
2798         (binding_table_find_anon_type): Likewise.
2799         (binding_table_reverse_maybe_remap): Likewise.
2800         (binding_table_remove_anonymous_types): Likewise.
2801         (binding_table_foreach): Likewise.
2802         * name-lookup.h (binding_table): New type.
2803         (binding_entry): Likewise.
2804         (bt_foreach_proc): Likewise.
2805         (struct binding_entry_s): New datatype.
2806         (SCOPE_DEFAULT_HT_SIZE): New macro.
2807         (CLASS_SCOPE_HT_SIZE): Likewise.
2808         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
2809         (NAMESPACE_STD_HT_SIZE): Likewise.
2810         (GLOBAL_SCOPE_HT_SIZE): Likewise.
2811         (binding_table_new): Declare.
2812         (binding_table_free): Likewise.
2813         (binding_table_insert): Likewise.
2814         (binding_table_find_anon_type): Likewise.
2815         (binding_table_reverse_maybe_remap): Likewise.
2816         (binding_table_remove_anonymous_types): Likewise.
2817         (binding_table_foreach): Likewise.
2818         (binding_table_find): Likewise.
2819         (cxx_remember_type_decls): Likewise.
2820         * pt.c (bt_instantiate_type_proc): New function.
2821         (do_type_instantiation): Use it.
2822         * search.c (lookup_field_r): Use binding_table_find.
2823
2824 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2825
2826         * semantics.c (perform_deferred_access_checks): Don't discard
2827         checked access.
2828
2829 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2830
2831         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
2832         libiberty VA_ macros, always use stdarg.
2833         * rtti.c (create_pseudo_type_info): Likewise.
2834         * tree.c (build_min_nt, build_min): Likewise.
2835
2836 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2837
2838         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
2839         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
2840         collapse multiple function calls into one.
2841         * tree.c (debug_binfo): Likewise.
2842
2843 2003-05-15  Jason Merrill  <jason@redhat.com>
2844
2845         PR c++/5388
2846         * call.c (conditional_conversion): Don't consider implicit
2847         conversions if T2 is a base of T1.
2848         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
2849         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
2850
2851         * parser.c (cp_parser_primary_expression): Convert a static data
2852         member from reference.
2853
2854 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
2855
2856         * call.c (build_op_delete_call): Avoid creating unnecessary types.
2857         * class.c (instantiate_type): Remove tests for tf_no_attributes.
2858         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
2859         (COMPARE_NO_ATTRIBUTES): Remove.
2860         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
2861
2862         PR c++/8385
2863         * semantics.c (finish_typeof): Refine type-dependency check.
2864
2865 2003-05-13  Jason Merrill  <jason@redhat.com>
2866
2867         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
2868         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
2869
2870 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2871
2872         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
2873
2874 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2875
2876         PR c++/10230, c++/10481
2877         * semantics.c (finish_non_static_data_member): Handle when the
2878         non-static member is not from a base of the current class type.
2879
2880 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2881
2882         PR c++/10552
2883         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
2884         template and has dependent context.
2885
2886 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2887
2888         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
2889
2890 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2891
2892         PR c++/9252
2893         * cp-tree.h (saved_scope): Remove check_access field.
2894         (tsubst_flags_t): Remove tf_parsing.
2895         * decl.c (maybe_push_to_top_level): Don't initialize
2896         scope_chain->check_access.
2897         (make_typename_type, make_unbound_class_template): Don't use
2898         tf_parsing.
2899         (register_dtor_fn): Use push/pop_deferring_access_checks
2900         instead of scope_chain->check_access.
2901         * method.c (use_thunk): Likewise.
2902         * parser.c (cp_parser_explicit_instantiation
2903         (cp_parser_constructor_declarator_p): Don't call
2904         push/pop_deferring_access_checks here.
2905         (cp_parser_template_argument, cp_parser_class_name): Don't use
2906         tf_parsing.
2907         (yyparse): Check flag_access_control.
2908         * pt.c (instantiate_class_template): Call
2909         push/pop_deferring_access_checks.
2910         * semantics.c (push_deferring_access_checks): Propagate
2911         dk_no_check.
2912         (perform_or_defer_access_check): Make sure basetype_path is
2913         a type before comparison.
2914         * call.c (build_op_delete_call, build_over_call): Use
2915         perform_or_defer_access_check.
2916         * class.c (alter_access): Likewise.
2917         * init.c (build_offset_ref): Likewise.
2918         * lex.c (do_identifier): Likewise.
2919         * method.c (hack_identifier): Likewise.
2920         * search.c (lookup_member): Likewise.
2921         * semantics.c (finish_non_static_data_member): Likewise.
2922         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
2923         instead of flag_access_control.
2924
2925 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2926
2927         PR c++/9554
2928         * parser.c (cp_parser_class_name): Remove check_access parameter.
2929         All caller adjusted.  Update declaration.
2930         (cp_parser_lookup_name): Likewise.
2931         * semantics.c (push_deferring_access_checks): Change parameter type
2932         to enum deferring_kind.  All caller adjusted.
2933         (resume_deferring_access_checks): Adjust to use new enum.
2934         (stop_deferring_access_checks): Likewise.
2935         (perform_or_defer_access_check): Likewise.
2936         * cp-tree.h (deferring_kind): New enum.
2937         (deferred_access): Adjust field type.
2938         (push_deferring_access_checks): Update declaration.
2939
2940 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2941
2942         PR c++/10555, c++/10576
2943         * pt.c (lookup_template_class): Handle class template with
2944         multiple levels of parameters when one of the levels contain
2945         errors.
2946
2947 2003-05-08  Jason Merrill  <jason@redhat.com>
2948
2949         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
2950         expression.  Undo some of the recent reorg.
2951
2952 2003-05-07  Richard Henderson  <rth@redhat.com>
2953
2954         PR c++/10570
2955         * cfns.gperf: Comment out POSIX thread cancellation points,
2956         plus abort and raise.
2957         * cfns.h: Regenerate.
2958
2959 2003-05-07  Jason Merrill  <jason@redhat.com>
2960
2961         * call.c (build_conditional_expr): Don't assume that the folded
2962         expression has result_type.
2963
2964 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2965
2966         * typeck.c (build_unary_op): Deal with const qualifier in
2967         invalid pointer-to-member earlier.
2968
2969 2003-05-05  Jason Merrill  <jason@redhat.com>
2970
2971         PR c++/9537
2972         * call.c (conditional_conversion): Build an RVALUE_CONV if
2973         we're just changing the cv-quals.
2974         (build_conditional_expr): Don't call convert to change
2975         cv-quals.
2976
2977 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2978
2979         PR c++/10496
2980         * typeck.c (build_unary_op): Don't output const qualifier when
2981         output invalid pointer-to-member diagnostics.
2982
2983 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2984
2985         * decl.c: Fix typos.
2986
2987 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2988
2989         PR c++/4494
2990         * decl.c (start_function): Use same_type_p to check return type
2991         of main.
2992
2993 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
2994
2995         PR c/10604
2996         * cp/typeck.c (build_x_compound_expr): No need to check
2997         extra_warnings as well as warn_unused_value.
2998
2999 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3000
3001         PR c++/9364, c++/10553, c++/10586
3002         * decl.c (make_typename_type): Don't crash on illegal code.
3003
3004 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
3005
3006         * class.c (finish_struct): Use location_t and input_location
3007         directly.
3008         * decl.c (make_label_decl): Likewise.
3009         (use_label): Likewise.
3010         * decl2.c (warn_if_unknown_interface): Likewise.
3011         (start_static_initialization_or_destruction): Likewise.
3012         (generate_ctor_or_dtor_function): Likewise.
3013         (finish_file): Likewise.
3014         * error.c (print_instantiation_full_context): Likewise.
3015         * init.c (create_temporary_var): Likewise.
3016         * method.c (synthesize_method): Likewise.
3017         * parser.c (cp_token): Likewise.
3018         (cp_lexer_set_source_position_from_token): Likewise.
3019         (cp_lexer_get_preprocessor_token): Likewise.
3020         (cp_parser_statement): Likewise.
3021         * pt.c (tsubst_friend_function): Likewise.
3022         (instantiate_class_template): Likewise.
3023         (tsubst_decl): Likewise.
3024         (tsubst): Likewise.
3025         (instantiate_decl): Likewise.
3026         * semantics.c (begin_class_definition): Likewise.
3027         (expand_body): Likewise.
3028
3029 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3030
3031         * class.c (finish_struct): Rename lineno to input_line.
3032         * decl.c (push_binding_level, pop_binding_level,
3033         suspend_binding_level, resume_binding_level, make_label_decl,
3034         use_label, start_function): Likewise.
3035         * decl2.c (warn_if_unknown_interface,
3036         start_static_initialization_or_destruction,
3037         generate_ctor_or_dtor_function, finish_file): Likewise.
3038         * error.c (cp_line_of, print_instantiation_full_context,
3039         print_instantiation_context): Likewise.
3040         * except.c (check_handlers_1, check_handlers): Likewise.
3041         * init.c (create_temporary_var): Likewise.
3042         * method.c (use_thunk, synthesize_method): Likewise.
3043         * parser.c (cp_lexer_set_source_position_from_token,
3044         cp_lexer_get_preprocessor_token): Likewise.
3045         * pt.c (push_tinst_level, pop_tinst_level,
3046         tsubst_friend_function, instantiate_class_template, tsubst_decl,
3047         tsubst, tsubst_expr, instantiate_decl): Likewise.
3048         * semantics.c (genrtl_try_block, finish_label_stmt,
3049         begin_class_definition, expand_body,
3050         genrtl_finish_function): Likewise.
3051         * tree.c (build_min_nt, build_min): Likewise.
3052
3053 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
3054
3055         * decl2.c (comdat_linkage): Don't externalize explicit
3056         instantiations.
3057
3058 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3059
3060         PR c++/10554
3061         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
3062         is not NULL.
3063
3064 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
3065
3066         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
3067         (struct lang_identifier): ... to here.
3068         (LANG_ID_FIELD): Remove.
3069         (SET_LANG_ID): Remove.
3070         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
3071         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
3072         (IDENTIFIER_IMPLICIT_DECL): Likewise.
3073         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
3074         (IDENTIFIER_ERROR_LOCUS): Likewise.
3075         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3076
3077 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3078
3079         PR c++/8772
3080         * pt.c (convert_template_argument): Correct diagnostic.
3081
3082 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3083
3084         PR c++/9432, c++/9528
3085         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
3086
3087 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
3088
3089         * decl.c (check_previous_goto_1): Adjust prototype.
3090         (check_previous_goto): Adjust use.
3091         (check_switch_goto): Likewise.
3092         (use_label): Adjust.
3093         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
3094         (struct named_label_use_list): Use location_t datatype.
3095
3096 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3097
3098         PR c++/10551
3099         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
3100         that have not yet been written out.
3101
3102 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3103
3104         PR c++/10549
3105         * class.c (layout_class_type): Mark overlong bitfields as having
3106         the maximum size permitted by their type, after layout.
3107
3108         PR c++/10527
3109         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
3110
3111 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3112
3113         * call.c (build_operator_new_call): Fix typo.
3114         * lang-options.h: Likewise.
3115
3116 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3117
3118         PR c++/10515
3119         * cp-tree.h (lookup_field_1): Declare it.
3120         * search.c (lookup_field_1): Make it public.
3121         * decl.c (reshape_init): Handle designated initializers.
3122
3123         * decl.c (maybe_commonize_var): Further tweak support for systems
3124         without weak symbols.
3125
3126 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
3127
3128         * decl.c (maybe_commonize_var): Fix thinko in last patch.
3129
3130 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
3131
3132         PR c++/10506
3133         * method.c (use_thunk): Decrement immediate_size_expand.
3134
3135         PR c++/10503
3136         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
3137         (DECL_MAYBE_TEMPLATE): Remove.
3138         * class.c (fixed_type_or_null): Avoid infinite recursion.
3139
3140         * decl.c (maybe_commonize_var): Make the code match the comments.
3141         * pt.c (instantiate_decl): Move call to import_export_decl.
3142
3143 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
3144
3145         * decl2.c (finish_file): Fix merge botch.
3146
3147 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
3148
3149         * decl2.c (finish_file): Don't call import_export_decl for
3150         functions that are not defined.
3151         (handle_class_head): Robustify.
3152         * pt.c (instantiate_decl): Do not call cp_finish_decl for
3153         variables that are not defined.
3154
3155 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
3156
3157         * call.c (print_z_candidates): Fix off by one error.
3158
3159 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
3160
3161         PR c++/10337
3162         * call.c (joust): Don't warn about conversion ops that are exact
3163         or cv-conversions. Rearrange to avoid multiple type comparisons.
3164
3165 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
3166
3167         PR c++/10471
3168         * call.c (build_cxx_call): Robustify.
3169
3170 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
3171
3172         * Make-lang.in (lex.o): Remove mbchar.h.
3173         * lex.c (MULTIBYTE_CHARS): Lose.
3174         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
3175         in c-lex.c.
3176
3177 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
3178
3179         PR c++/9847
3180         * cp-tree.h (duplicate_tag_error): Remove.
3181         * class.c (duplicate_tag_error): Remove.
3182         * semantics.c (begin_class_definition): Return immediately for a
3183         duplicate class definition.
3184
3185         PR c++/10451
3186         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
3187
3188 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
3189
3190         PR c++/10446
3191         * search.c (lookup_fnfields_1): Handle empty slots in the method
3192         vector.
3193
3194         PR c++/10428
3195         * decl.c (check_elaborated_type_specifier): New function, split
3196         out from ...
3197         (xref_tag): ... here.  Use the new function in more places.
3198
3199         * rtti.c (throw_bad_typeid): Use build_cxx_call.
3200
3201 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
3202
3203         * call.c (build_over_call): Use build_cxx_call.
3204         (build_cxx_call): New method, split out of build_over_call.
3205         * cp-tree.h (language_function): Add can_throw.
3206         (build_cxx_call): Declare it.
3207         * decl.c (finish_function): If a function does not contain any
3208         calls to functions that can throw an exception, indicate that
3209         fact.
3210         * decl2.c (mark_used): Do not defer the instantiation of
3211         functions, if the current function does not throw.
3212         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
3213         * pt.c (instantiate_decl): Make sure import_export_decl is called
3214         before emitting things.
3215         * rtti.c (throw_bad_cast): Use build_cxx_call.
3216         (build_dynamic_cast_1): Likewise.
3217         * typeck.c (build_function_call): Likewise.
3218
3219 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
3220
3221         PR c++/9881
3222         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
3223         expressions. Reverts my 2002-08-08 patch.
3224
3225         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
3226         cheaper early exit.
3227
3228 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3229
3230         * cp/decl2.c (start_static_storage_duration_function): Take count
3231         arg, don't check if it wraps round.
3232         (generate_ctor_or_dtor_function): Add locus arg, use it.
3233         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
3234         locus.
3235         (finish_file): Set line numbers to past EOF for synthesized
3236         functions.
3237
3238 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3239
3240         PR c++/10405
3241         * search.c (lookup_field_1): Final scan goes backwards for
3242         types, forwards for non-types.
3243
3244 2003-04-17  Roger Sayle  <roger@eyesopen.com>
3245
3246         PR c/10375
3247         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
3248         "nothrow" function attributes.
3249
3250 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3251
3252         PR c++/10347
3253         * pt.c (type_dependent_expression_p): Handle array new.
3254
3255 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
3256
3257         PR c++/10381
3258         * parser.c (cp_parser_primary_expression): Reorganize logic for
3259         dealing with name lookup failures.
3260
3261 2003-04-15  Jason Merrill  <jason@redhat.com>
3262
3263         * decl2.c (mark_used): Don't instantiate anything if
3264         skip_evaluation.
3265
3266 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
3267
3268         * tree.c (build_cplus_array_type_1): Do not call
3269         uses_template_parms() on a NULL index_type.
3270
3271 2003-04-13  Roger Sayle  <roger@eyesopen.com>
3272
3273         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
3274
3275 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
3276
3277         PR c++/10300
3278         * init.c (build_new_1): Reorganize.
3279
3280 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3281
3282         * class.c (initialize_array)
3283         * decl.c (reshape_init)
3284         * decl2.c (build_expr_from_tree)
3285         * init.c (build_zero_init)
3286         * pt.c (tsubst_copy, tsubst_copy_and_build)
3287         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
3288         (ptm_initializer, class_initializer, get_pseudo_ti_init)
3289         * semantics.c (finish_compound_literal)
3290         * typeck.c (build_ptrmemfunc1)
3291         * typeck2.c (store_init_value, process_init_constructor)
3292         (build_functional_cast): Use build_constructor.
3293
3294 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3295
3296         * call.c (print_z_candidates): Use gcc_gettext_width, not
3297         strlen, to determine how much padding to use.
3298
3299 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
3300
3301         * decl.c: Update all calls to shadow_warning.
3302
3303 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
3304
3305         * class.c (layout_class_type): Correct handling for overlong
3306         bit-fields whose width is the same as an integer type.
3307
3308 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
3309
3310         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
3311         * cp-lang.c (cp_tree_size): New function.
3312         (LANG_HOOKS_TREE_SIZE): Override.
3313
3314         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
3315         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
3316         (union lang_tree_node): Remove common and srcloc members.
3317         (build_srcloc_here): Don't prototype.
3318         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
3319         * pt.c (pending_templates): Correct comment.
3320         * tree.c (build_srcloc, build_srcloc_here): Kill.
3321
3322 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
3323
3324         * call.c: Include intl.h.
3325         (print_z_candidate): Always use inform; get rid of errfn
3326         argument. Reorganize so that all the strings get picked up
3327         by xgettext.  Note obligation of caller to pass first argument
3328         through gettext.
3329         (print_z_candidates): Update to match.  Indent second and
3330         successive candidates by strlen() of translated message.
3331         (joust): Restructure ambiguous-conversion pedwarn so that
3332         translators see a complete sentence.  Update calls to
3333         print_z_candidate.
3334
3335         * Make-lang.in (cp/call.o): Update dependencies.
3336
3337 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3338
3339         * decl.c (set_current_binding_level): Delete, revert last change.
3340         (current_binding_level): Modify to allow it as as lvalue.
3341
3342 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3343
3344         * name-lookup.c (find_binding): Pass appropriate pointer type to
3345         POP_TIMEVAR_AND_RETURN.
3346
3347 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3348
3349         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
3350         * cp-tree.h: Don't insist on having GNUC.
3351
3352 2003-04-03  Jason Merrill  <jason@redhat.com>
3353
3354         * cvt.c (ocp_convert): Only abort if we try to convert an object
3355         of TREE_ADDRESSABLE type.
3356
3357         * class.c (build_vtable): Set DECL_ALIGN here.
3358         (get_vtable_decl): Not here.
3359         (layout_vtable_decl): Or here.
3360         (create_vtable_ptr): Or here.
3361         (layout_class_type): Or here.
3362         (check_bitfield_decl): Don't mess with field alignment.
3363
3364 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3365
3366         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
3367         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
3368         * rtti.c (dfs_class_hint_mark): Likewise.
3369
3370         * decl.c (push_local_name, push_class_level_binding,
3371         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
3372         functions returning void.
3373         * decl2.c (add_using_namespace): Likewise.
3374
3375         * decl.c (print_binding_level, print_other_binding_stack,
3376         print_binding_stack): Cast argument of %p specifier to void*.
3377         * ptree.c (cxx_print_decl): Likewise.
3378
3379         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3380         VAR_FUNCTION_OR_PARM_DECL_CHECK,
3381         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3382         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
3383         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
3384
3385         * decl.c (set_current_binding_level): New macro.  Use throughout
3386         when setting the current binding level.
3387
3388         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
3389         in enum.
3390         * method.c (mangling_flags): Likewise.
3391
3392         * cp-tree.h (lang_type_header): Add __extension__ and use
3393         CHAR_BITFIELD for members.
3394
3395 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
3396
3397         PR other/9274
3398         * mangle.c: Include gt-cp-mangle.h.
3399         (subst_identifiers): Mark with GTY.
3400         * config-lang.in (gtfiles): Add cp/mangle.c.
3401         * Make-lang.in: (gt-cp-mangle.h): New rule.
3402         (cp/mangle.o): Depends on gt-cp-mangle.h.
3403
3404 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
3405
3406         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
3407         after \$(srcdir)/cp/name-lookup.h.
3408         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
3409         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
3410         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
3411         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
3412
3413 2003-03-31  Jason Merrill  <jason@redhat.com>
3414
3415         PR java/10145
3416         * class.c (check_field_decl): Don't set DECL_ALIGN.
3417
3418 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
3419
3420         PR c++/7647
3421         * decl.c (grokdeclarator): Tidy, slightly.
3422         * search.c (lookup_field_1): Add want_type parameter.
3423         (lookup_field_r): Adjust call to lookup_field_1.
3424
3425 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3426
3427         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
3428
3429 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
3430
3431         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
3432         prototype.
3433         (cxx_scope_find_binding_for_name): Likewise.
3434         * decl.c (find_binding: Move to name-lookup.c.
3435         (binding_for_name): Likewise.
3436         (cxx_scope_find_binding_for_name): Likewise.
3437         (BINDING_LEVEL):  Remove.
3438         (push_binding): Tidy.
3439         (push_class_binding): Likewise.
3440         (pop_binding): Likewise.
3441         (poplevel): Likewise.
3442         (poplevel_class): Likewise.
3443         (set_identifier_type_value_with_scope): Likewise.
3444         (push_overloaded_decl): Likewise.
3445         (lookup_tag): Likewise.
3446         (unqualified_namespace_lookup): Likewise.
3447         (lookup_name_current_level): Likewise.
3448         (maybe_inject_for_scope_var): Likewise.
3449         (namespace_binding): Move to name-lookup.c.
3450         (set_namespace_binding): Likewise.
3451         * decl2.c (lookup_using_namespace): Tidy.
3452         (qualified_lookup_using_namespace): Likewise.
3453         (do_toplevel_using_decl): Likewise.
3454         * name-lookup.c: Include "timevar.h"
3455         * name-lookup.h (cxx_scope):  Declare.
3456         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
3457         member declaration.
3458         (BINDING_SCOPE): Adjust definition.
3459         (BINDING_HAS_LEVEL_P): Remove.
3460
3461 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3462
3463         * name-lookup.c: New file.
3464         * name-lookup.h: Likewise..
3465         * decl.c (push_binding): Adjust use cxx_binding_make.
3466         (free_bindings): Move to name-lookup.c
3467         (pop_binding): Use cxx_binding_free.
3468         (binding_for_name): Tidy.
3469         * cp-tree.h: Include "name-lookup.h"
3470         (cxx_binding_make): Move to name-lookup.h
3471         (cxx_binding_clear): Likewise.
3472         (struct cxx_binding): Likewise.
3473         (LOCAL_BINDING_P): Likewise.
3474         (INHERITED_VALUE_BINDING_P): Likewise.
3475         (BINDING_SCOPE): Likewise.
3476         (BINDING_HAS_LEVEL_P): Likewise.
3477         (BINDING_VALUE): Likewise.
3478         (BINDING_TYPE): Likewise.
3479         * config-lang.in (gtfiles): Add cp/name-lookup.h
3480         * Make-lang.in (cp/name-lookup.o): New rule.
3481         (CXX_OBJS): Add cp/name-lookup.o
3482         (CXX_TREE_H): Add cp/name-lookup.h
3483
3484 2003-03-28  Jason Merrill  <jason@redhat.com>
3485
3486         PR c++/10245
3487         * cvt.c (force_rvalue): New fn.
3488         * call.c (build_conditional_expr): Use it.
3489         * cp-tree.h: Declare it.
3490
3491 2003-03-28  Mike Stump  <mrs@apple.com>
3492
3493         * error.c (dump_expr): Add 0x to printed hex numbers to make
3494         output match source code better.
3495
3496 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
3497
3498         PR c++/10218
3499         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
3500         definitions.
3501
3502         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
3503         non-existant ssdf_decls array.
3504         (finish_file): Call generator_ctor_or_dtor_function when there are
3505         static constructors or destructors and no other static
3506         initializations.
3507
3508 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
3509
3510         PR c++/10047
3511         * decl2.c (finish_file): Don't warn about explicitly instantiated
3512         inline decls.
3513
3514 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
3515
3516         PR c++/10224
3517         * pt.c (lookup_template_class): Only check instantiated args if
3518         they do not contain template parameters.
3519
3520 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
3521
3522         PR c++/10158
3523         * parser.c (cp_parser_function_definition): Set
3524         DECL_INITIALIZED_IN_CLASS for members.
3525         * pt.c (instantiate_decl): Only reduce the template args for
3526         friends that are not defined in class.
3527
3528 2003-03-25  Jason Merrill  <jason@redhat.com>
3529
3530         * call.c (print_z_candidate): Change name of first arg to msgid.
3531         (joust): Add comment for translators.
3532
3533 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
3534
3535         PR c++/9898, PR c++/383, DR 322
3536         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
3537         through reference types on both PARM and ARG.
3538
3539 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
3540
3541         PR c++/10119
3542         * error.c (dump_expr) <BASELINK>: Use dump_expr.
3543         * pt.c (maybe_fold_nontype_args): New function.
3544         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
3545         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
3546         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
3547         maybe_fold_nontype_args.
3548
3549 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
3550
3551         PR c++/10026
3552         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
3553
3554 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
3555
3556         PR c++/7086
3557         * typeck.c (cxx_mark_addressable):  Adjust call to
3558         gen_mem_addressof or put_var_into_stack.
3559
3560 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
3561
3562         PR c++/9978, c++/9708
3563         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
3564         * call.c (add_template_candidate_real): Adjust
3565         instantiate_template call.
3566         * class.c (resolve_address_of_overloaded_function): Likewise.
3567         * decl.c (build_enumerator): Set TREE_CONSTANT.
3568         * pt.c (check_instantiated_args): New.
3569         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
3570         TREE_READONLY.
3571         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
3572         (reduce_template_parm_level): Likewise.
3573         (process_template_parm): Likewise.
3574         (check_explicit_specialization): Adjust instantiate_template call.
3575         (convert_template_argument): Don't check non-type argument here.
3576         (lookup_template_class): Check them here.
3577         (tsubst_friend_function): Adjust instantiate_template call.
3578         (instantiate_template): Add tsubst_flags parameter, use it. Check
3579         instantiated args.
3580
3581 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
3582
3583         * decl.c: Update calls to shadow_warning.
3584
3585 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
3586
3587         PR c++/9898
3588         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
3589         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
3590
3591 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
3592
3593         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
3594         friends.
3595         * cp/pt.c (instantiate_class_template): Fix formatting.
3596
3597 2003-03-14  Matt Austern  <austern@apple.com>
3598
3599         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
3600         (unemitted_tinfo_decl_p): Remove.
3601         (emit_tinfo_decl): Change declaration to remove unused parameter.
3602         * decl2.c (finish_file): Change tinfo emission to loop through
3603         unemitted_tinfo_decls array instead of looping through all decls.
3604         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
3605         unused second parameter.
3606         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
3607         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
3608         (emit_tinfo_decl): remove unused second parameter, add assertion
3609         that decl hasn't already been emitted.
3610
3611 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
3612
3613         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
3614         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
3615         return statements.
3616
3617 2003-03-19  Jason Merrill  <jason@redhat.com>
3618
3619         PR c++/8316, c++/9315, c++/10136
3620         * call.c (print_z_candidate): Split out from...
3621         (print_z_candidiates): ...here.
3622         (joust): Use it.
3623
3624 2003-03-17  Roger Sayle  <roger@eyesopen.com>
3625
3626         PR c++/10031
3627         * decl.c (duplicate_decls): Use the new type when prototyping
3628         anticipated decls, even when the types match.  This defines the
3629         exception list for the built-in function.
3630
3631 2003-03-17  Jason Merrill  <jason@redhat.com>
3632
3633         PR c++/10091
3634         * typeck.c (build_class_member_access_expr): Compare
3635         TYPE_MAIN_VARIANTs.
3636
3637 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
3638
3639         PR c++/9639
3640         * parser.c (cp_parser_declarator_id): Clear parser->scope.
3641
3642 2003-03-16  Jason Merrill  <jason@redhat.com>
3643
3644         PR c++/9993
3645         * decl.c (finish_function): Only allow the NRVO to use variables
3646         declared at function scope.
3647
3648 2003-03-17  Andreas Jaeger  <aj@suse.de>
3649
3650         * Make-lang.in (cp/TAGS): Remove.
3651
3652 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
3653
3654         PR c++/9629
3655         * cp-tree.h (struct language_function): Add in_base_initializer.
3656         (in_base_initializer): define it.
3657         (expand_member_init): Remove INIT param.
3658         * init.c (expand_member_init): Remove INIT param, return the member.
3659         (emit_mem_initializers): Set in_base_initializer.
3660         * class.c (build_base_path): Check in_base_initializer.
3661         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
3662         * pt.c (tsubst_initializer_list): Likewise.
3663
3664 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
3665
3666         * decl.c (binding_for_name): Fix initialization thinko.
3667
3668 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
3669
3670         Compile-time improvement: 2/n.
3671         * cp-tree.h (struct cxx_binding): New datatype;
3672         (struct lang_identifier): Use it.
3673         (LOCAL_BINDING_P): Adjust definition.
3674         (INHERITED_VALUE_BINDING_P): Likewise.
3675         (BINDING_SCOPE): Likewise.
3676         (BINDING_HAS_LEVEL_P): Likewise.
3677         (BINDING_VALUE): Likewise.
3678         (BINDING_TYPE): Likewise.
3679         (IDENTIFIER_VALUE): Likewise.
3680         (struct tree_binding): Remove.
3681         (TS_CP_BINDING): Likewise.
3682         ((union lang_tree_node): Remove field "binding".
3683         (cxx_binding_clear): New macro.
3684         (binding_for_name): Adjust return type.
3685         (qualified_lookup_using_namespace): Adjust prototype.
3686         (lookup_using_namespace): Adjust prototype.
3687         (cxx_scope_find_binding_for_name): Declare.
3688         * cp-tree.def: Remove CPLUS_BINDING definition.
3689         * decl.c (push_binding): Adjust local variable type.
3690         (add_binding): Likewise.
3691         (push_class_binding): Likewise.
3692         (pop_binding): Likewise.
3693         (poplevel): Likewise.
3694         (poplevel_class): Likewise.
3695         (free_bindings):  Adjust type.
3696         (find_binding): Adjust return type, add a third parameter. Remove
3697         non-useful assertion now that we use static typing.
3698         (cxx_scope_find_binding_for_name): New function.
3699         (binding_for_name): Use it.  Adjust local variable type. Simplify.
3700         (namespace_binding):  Simplify.
3701         (set_namespace_binding): Likewise.
3702         (set_identifier_type_value_with_scope): Adjust local variable type.
3703         (lookup_tag): Don't type-abuse of local variable 'old'.
3704         (lookup_namespace_name): Likewise.  Allocate binding on stack.
3705         (select_decl): Adjust prototype.
3706         (unqualified_namespace_lookup):  Allocate binding on stack.
3707         Don't type-abuse of local variable 'val'.
3708         (lookup_name_real): Likewise.
3709         (maybe_inject_for_scope_var): Adjust local variable type.
3710         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
3711         (namespace_binding): Adjust logic, simplify.
3712         (BINDING_LEVEL): Adjust definition.
3713         (push_class_level_binding): Adjust local variable type.
3714         (struct cxx_saved_binding): Adjust field 'binding' type.
3715         * decl2.c (ambiguous_decl): Adjust prototype.
3716         (lookup_using_namespace): Adjust local variable type.
3717         (qualified_lookup_using_namespace): Catch type error and correct
3718         ensueing logic error.
3719         (do_nonmember_using_decl): Adjust local variable type.  Allocate
3720         temporary cxx_binding on stack.
3721         (do_toplevel_using_decl): Adjust local variable type.
3722         * ptree.c (cxx_print_cxx_binding): New function.
3723         (cxx_print_identifier): Use it.
3724         (cxx_print_xnode): Delete CPLUS_BINDING case label.
3725
3726 2003-03-15  Roger Sayle  <roger@eyesopen.com>
3727
3728         * tree.c (count_functions): Fix whitespace.
3729
3730 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
3731
3732         * Make-lang.in: Update.
3733
3734 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3735
3736         PR c++/6440
3737         * pt.c (maybe_process_partial_specialization): Handle
3738         member class template when enclosing class template is
3739         explicit specialized.
3740         (most_general_template): Stop looking when DECL is already
3741         specialized.
3742
3743 2003-03-13  Jason Merrill  <jason@redhat.com>
3744
3745         PR c++/9420
3746         * search.c (lookup_conversions): Call complete_type here.
3747         * call.c (implicit_conversion): Not here.
3748
3749 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
3750
3751         * decl2.c (do_nonmember_using_decl): Correct handling of
3752         simultaneous type/non-type bindings.
3753
3754         * call.c (initialize_reference): Remove bogus assertion.
3755         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
3756
3757 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
3758
3759         PR c++/7050
3760         * expr.c (cxx_expand_expr): Return const0_rtx for throw
3761         expressions.
3762
3763 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
3764
3765         PR c++/9474
3766         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3767         to merge old and new declarations.
3768
3769 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
3770
3771         * g++.1: Remove.
3772         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
3773         (cp/g++.1): Build it from scratch in the build tree.
3774         (c++.install-man): Depend on it.  Install it from the build tree.
3775         (c++.mostlyclean): Clean it.
3776
3777 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
3778
3779         PR c++/9474
3780         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3781         to merge old and new declarations.
3782
3783         PR c++/9924
3784         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
3785
3786 2003-03-11  Jason Merrill  <jason@redhat.com>
3787
3788         PR c++/9820
3789         * search.c (lookup_member): Fix handling of functions in a class
3790         being defined.
3791
3792 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
3793
3794         PR c++/8700
3795         * call.c (convert_class_to_reference): Adjust usage of
3796         splice_viable.
3797         (any_viable): Remove.
3798         (splice_viable): Combine with any_viable.
3799         (print_z_candidates): Avoid printing duplicates.
3800         (build_user_type_conversion_1): Adjust usage of splice_viable.
3801         (build_new_function_call): Likewise.
3802         (build_operator_new_call): Likewise.
3803         (build_object_call): Likewise.
3804         (build_conditional_expr): Likewise.
3805         (build_new_op): Likewise.
3806         (build_new_method_call): Likewise.
3807         (joust): Remove spurious comment.
3808         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
3809         * decl2.c (arg_assoc_class): Simplify.
3810         * friend.c (add_friend): Likewise.
3811
3812 2003-03-11  Jason Merrill  <jason@redhat.com>
3813
3814         PR c++/8660
3815         * decl2.c (check_classfn): A member template only matches a
3816         member template.
3817
3818 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
3819
3820         * Make-lang.in (CXX_C_OBJS): Update.
3821         * lang-specs.h: Don't define __GNUG__ here.
3822
3823 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
3824
3825         * call.c (perform_overload_resolution): New function.
3826         (build_new_function_call): Use it.
3827         (build_operator_new_call): Likewise.
3828         (add_candidates): Add explicit_targs and template_only parameters.
3829         (build_new_op): Adjust accordingly.
3830         * cp-tree.h (build_operator_new_call): New function.
3831         (build_function_call_real): Remove.
3832         (build_function_call_maybe): Likewise.
3833         * init.c (build_new_1): Use build_operator_new_call.
3834         * typeck.c (build_function_call_real): Rename to ...
3835         (build_function_call): ... this.
3836
3837 2003-03-10  Devang Patel  <dpatel@apple.com>
3838
3839         PR c++/9394
3840         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
3841
3842 2003-03-10  Jason Merrill  <jason@redhat.com>
3843
3844         PR c++/9798
3845         * decl.c (push_using_directive): Push before recursing.
3846
3847         PR c++/9868, c++/9524
3848         * call.c (resolve_scoped_fn_name): Handle the case of a function
3849         pointer member.
3850
3851         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
3852         argument in the pointer-to-member case.
3853
3854 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
3855
3856         PR c++/9373
3857         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
3858         pointers to member functions.
3859
3860         PR c++/8534
3861         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
3862         in pointer-to-member-function types.
3863
3864 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3865
3866         * expr.c (cplus_expand_constant): Use C90 prototype style.
3867         (cxx_expand_expr): Likewise.
3868
3869 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3870
3871         PR c++/9970
3872         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
3873         functions.
3874
3875 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
3876
3877         * lang-specs.h (c++-header): Change .pch to .gch.
3878
3879 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
3880
3881         * cp-tree.h (cxx_init): Update prototype.
3882         * lex.c (cxx_init): Similarly.
3883
3884 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
3885
3886         PR c++/9823
3887         * cp-tree.h (begin_mem_initializers): Remove.
3888         * parser.c (cp_parser_mem_initializer_list): Inline it here.
3889         Do not call finish_mem_initializers if not in a constructor.
3890         (cp_parser_class_head): Fix typo in error message.
3891         * semantics.c (begin_mem_initializers): Remove.
3892         * testsuite/g++.dg/parser/constructor1.C: New test.
3893
3894         PR c++/9809
3895         * call.c (add_function_candidate): Skip builtin fuctions that have
3896         not yet been declared.
3897
3898         PR c++/9982
3899         * init.c (build_new_1): Correct logic for determining whether or
3900         not to use an array cookie.
3901
3902         PR c++/9524
3903         * parser.c (cp_parser_postfix_expression): Call
3904         finish_non_static_data_member, even when processing_template_decl.
3905
3906         PR c++/9912
3907         * cp-tree.h (is_ancestor): New function.
3908         (handle_class_head): Change prototype.
3909         * decl2.c (is_namespace_ancestor): Rename to ...
3910         (namespace_anecestor): ... this.
3911         (set_decl_namespace): Adjust accordingly.
3912         (handle_class_head): Remove unncessary parameters.
3913         * parser.c (cp_parser_class_head): Check that
3914         nested-name-specifiers are used appropriately.
3915
3916 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
3917
3918         * call.c (reference_binding): Remove REF_IS_VAR parameter.
3919         (implicit_conversion): Adjust call to reference_binding.
3920         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
3921         (initialize_reference): Adjust handling for references bound to
3922         rvalues.
3923         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
3924         prototype.
3925         (real_non_cast_lvalue_p): New method.
3926         * cvt.c (build_up_reference): Adjust use of
3927         make_temporary_var_for_ref_to_temp.
3928         * tree.c (real_non_cast_lvalue_p): New method.
3929
3930 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3931
3932         * except.c (init_exception_processing): Use C90 prototype style.
3933         (cp_protect_cleanup_actions): Likewise.
3934         (prepare_eh_type): Likewise.
3935         (build_eh_type_type): Likewise.
3936         (build_exc_ptr): Likewise.
3937         (do_begin_catch): Likewise.
3938         (dtor_nothrow): Likewise.
3939         (do_end_catch): Likewise.
3940         (push_eh_cleanup): Likewise.
3941         (decl_is_java_type): Likewise.
3942         (choose_personality_routine): Likewise.
3943         (initialize_handler_parm): Likewise.
3944         (expand_start_catch_block): Likewise.
3945         (expand_end_catch_block): Likewise.
3946         (begin_eh_spec_block): Likewise.
3947         (finish_eh_spec_block): Likewise.
3948         (do_allocate_exception): Likewise.
3949         (do_free_exception): Likewise.
3950         (wrap_cleanups_r): Likewise.
3951         (stabilize_throw_expr): Likewise.
3952         (build_throw): Likewise.
3953         (complete_ptr_ref_or_void_ptr_p): Likewise.
3954         (is_admissible_throw_operand): Likewise.
3955         (nothrow_libfn_p): Likewise.
3956         (can_convert_eh): Likewise.
3957         (check_handlers_1): Likewise.
3958         (check_handlers): Likewise.
3959
3960 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
3961
3962         * call.c (merge_conversion_sequences): New function.
3963         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
3964         (convert_class_to_reference): Correct handling of second
3965         standard conversion sequence in a user-defined conversion
3966         sequence.
3967         (build_user_type_conversion_1): Use merge_conversion_sequences.
3968         * cp-tree.def: Add comments for CONV nodes.
3969         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
3970
3971 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3972
3973         * error.c (init_error): Use C90 prototype style.
3974         (dump_scope): Likewise.
3975         (dump_qualifiers): Likewise.
3976         (dump_template_argument): Likewise.
3977         (dump_template_argument_list): Likewise.
3978         (dump_template_parameter): Likewise.
3979         (dump_template_bindings): Likewise.
3980         (dump_type): Likewise.
3981         (dump_typename): Likewise.
3982         (class_key_or_enum): Likewise.
3983         (dump_aggr_type): Likewise.
3984         (dump_type_prefix): Likewise.
3985         (dump_type_suffix): Likewise.
3986         (dump_global_iord): Likewise.
3987         (dump_simple_decl): Likewise.
3988         (dump_decl): Likewise.
3989         (dump_template_decl): Likewise.
3990         (dump_function_decl): Likewise.
3991         (dump_parameters): Likewise.
3992         (dump_exception_spec): Likewise.
3993         (dump_function_name): Likewise.
3994         (dump_template_parms): Likewise.
3995         (dump_char): Likewise.
3996         (dump_expr_list): Likewise.
3997         (dump_expr): Likewise.
3998         (dump_binary_op): Likewise.
3999         (dump_unary_op): Likewise.
4000         (type_as_string): Likewise.
4001         (expr_as_string): Likewise.
4002         (decl_as_string): Likewise.
4003         (context_as_string): Likewise.
4004         (lang_decl_name): Likewise.
4005         (cp_file_of): Likewise.
4006         (cp_line_of): Likewise.
4007         (decl_to_string): Likewise.
4008         (expr_to_string): Likewise.
4009         (fndecl_to_string): Likewise.
4010         (code_to_string): Likewise.
4011         (language_to_string): Likewise.
4012         (parm_to_string): Likewise.
4013         (op_to_string): Likewise.
4014         (type_to_string): Likewise.
4015         (assop_to_string): Likewise.
4016         (args_to_string): Likewise.
4017         (cv_to_string): Likewise.
4018         (cxx_print_error_function): Likewise.
4019         (cp_diagnostic_starter): Likewise.
4020         (cp_diagnostic_finalizer): Likewise.
4021         (cp_print_error_function): Likewise.
4022         (function_category): Likewise.
4023         (print_instantiation_full_context): Likewise.
4024         (print_instantiation_partial_context): Likewise.
4025         (maybe_print_instantiation_context): Likewise.
4026         (print_instantiation_context): Likewise.
4027         (cp_printer): Likewise.
4028         (print_integer): Likewise.
4029         (print_non_consecutive_character): Likewise.
4030         (locate_error): Likewise.
4031
4032 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
4033
4034         PR c++/9965
4035         * call.c (reference_binding): Add ref_is_var parameter.
4036         (implicit_conversion): Adjust call to reference_binding.
4037         (initialize_reference): Likewise.
4038
4039         PR c++/9400
4040         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
4041         PARM_DECLs.
4042
4043         PR c++/9791
4044         * class.c (get_basefndecls): Use lookup_fnfields_1.
4045
4046 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4047
4048         PR c++/9188
4049         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
4050         in error message.
4051         (cp_parser_single_declaration): Likewise.
4052
4053 2003-03-05  Jason Merrill  <jason@redhat.com>
4054
4055         PR c++/9440
4056         * call.c (build_conditional_expr): Use convert rather than an
4057         explicit NOP_EXPR.
4058
4059 2003-03-02  Matt Austern  <austern@apple.com>
4060
4061         * decl.c (cp_binding_level): Add static_decls varray member.
4062         (add_decl_to_level): Add static/inline namespace scope
4063         declarations to static_decls array.
4064         (wrapup_global_for_namespace): Pass static_decls only, instead of
4065         all decls, to wrapup_global_declarations/check_global_declarations.
4066         (push_namespace): Initialize static_decls for ordinary namespaces.
4067         (cxx_init_decl_processing): Initialize static_decls for global
4068         namespace.
4069
4070 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
4071
4072         * class.c (end_of_class): Correct thinko.
4073
4074 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
4075
4076         * config-lang.in: Replace ${libstdcxx_version} by its value.
4077
4078 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
4079
4080         * cp-tree.h (cxx_saved_binding): Declare.
4081         (struct saved_scope): Adjust type of field 'old_binding'.
4082         * decl.c (cxx_saved_binding_make): New macro.
4083         (struct cxx_saved_binding): Define.
4084         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
4085         C++ bindings.
4086         (maybe_push_to_top_level): Adjust local variable type.
4087         (pop_from_top_level): Likewise.
4088
4089 2003-03-04  Tom Tromey  <tromey@redhat.com>
4090
4091         * Make-lang.in (c++.tags): New target.
4092
4093 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
4094
4095         * Make-lang.in: Update.
4096
4097 2003-03-03  Jason Merrill  <jason@redhat.com>
4098
4099         * decl.c (finish_enum): Do set the type in a template. Simplify.
4100         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
4101
4102 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
4103
4104         PR c++/9878
4105         * call.c (convert_class_to_reference): Correct conversion
4106         sequences.
4107         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
4108         (implicit_conversion): Adjust call to reference_binding.
4109         (add_candidate): Change type of candidates parameter.
4110         (add_function_candidate): Likewise.
4111         (add_conv_candidate): Likewise.
4112         (build_builtin_candidate): Likewise.
4113         (add_builtin_candidate): Likewise.
4114         (add_builtin_candidates): Likewise.
4115         (add_template_candidate_real): Likewise.
4116         (add_template_candidate): Likewise.
4117         (add_template_conv_candidate): Likewise.
4118         (build_user_type_conversion_1): Adjust accordingly.
4119         (build_object_call): Likewise.
4120         (build_conditional_expr): Likewise.
4121         (add_candidates): Likewise.
4122         (build_new_op): Likewise.
4123         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
4124         (build_new_method_call): Adjust calls to add_function_candidate.
4125         (make_temporary_var_for_ref_to_temp): New function.
4126         (initialize_reference): Add decl parameter.
4127         * class.c (build_rtti_vtbl_entries): Use build_address and
4128         build_nop.
4129         * cp-tree.h (initialize_reference): Change prototype.
4130         (make_temporary_var_for_ref_to_temp): New function.
4131         (build_type_conversion): Change prototype.
4132         (build_address): New function.
4133         (build_nop): Likewise.
4134         * cvt.c (cp_convert_to_pointer): Adjust call to
4135         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
4136         Use build_nop.
4137         (convert_to_pointer_force): Use build_nop.
4138         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
4139         (convert_to_reference): Adjust call to build_type_conversion.
4140         (ocp_convert): Likewise.
4141         (build_type_conversion): Remove for_sure parameter.
4142         * decl.c (grok_reference_init): Use initialize_reference.
4143         * typeck.c (build_address): New function.
4144         (build_nop): Likewise.
4145         (build_unary_op): Use them.
4146         (build_ptrmemfunc): Tidy slightly.
4147         (convert_for_initialization): Adjust call to
4148         initialize_reference.
4149         * typeck2.c (store_init_value): Remove #if 0'd code.
4150
4151 2003-03-03  Jason Merrill  <jason@redhat.com>
4152
4153         * decl.c (start_function): Clear DECL_NUM_STMTS.
4154
4155         * class.c (get_vtable_decl): Use vtbl_type_node.
4156         (build_primary_vtable): Check for it.
4157
4158 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
4159
4160         * decl.c (check_initializer): Check for vector_opaque_p.
4161
4162 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
4163
4164         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
4165           invoke an external cpp during compilation.
4166
4167 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4168
4169         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
4170         that of warning().
4171         (start_decl): Likewise.
4172         (start_function): Likewise.
4173
4174 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
4175
4176         * Make-lang.in (CXX_C_OBJS): Update.
4177
4178 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
4179
4180         PR c++/9892
4181         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
4182         instantiating it.
4183
4184 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
4185
4186         * parser.c (cp_parser_init_declarator): Revert opaque
4187         vector_opaque_p change.
4188         Do not include target.h.
4189
4190 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
4191
4192         PR c++/9879
4193         * cp-tree.h (build_zero_init): Add parameter.
4194         * decl.c (cp_finish_decl): Adjust call.
4195         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
4196         calls.
4197         (build_default_init): Add nelts parameter.  Adjust calls to
4198         build_zero_init.
4199         (build_new_1): Adjust call to build_default_init.
4200         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
4201
4202 2003-02-26  Devang Patel  <dpatel@apple.com>
4203
4204         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
4205         required.  Postpone enum setting for template decls.
4206         (build_enumerator): Delay copying value node until finish_enum
4207         (). Remove #if 0'ed code.
4208         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
4209         (tsubst_copy): Add check for enum type.
4210
4211 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
4212
4213         PR c++/9683
4214         * decl2.c (prune_vars_needing_no_initialization): Do not throw
4215         away initializations for DECL_EXTERNAL VAR_DECLs.
4216         (finish_file): Adjust accordingly.
4217         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
4218
4219 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
4220
4221         * decl.c (add_binding): Time TV_NAME_LOOKUP.
4222         (push_class_binding): Likewise.
4223         (set_namespace_binding): Likewise.
4224
4225 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
4226
4227         PR c++/9836
4228         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
4229         specializations back to the main template.
4230         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
4231         * pt.c (resolve_typename_type): Likewise.
4232
4233 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
4234
4235         PR c++/9778
4236         * pt.c (tsubst_copy_and_build): For a templated function inside a
4237         scope, process template arguments.
4238
4239 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4240
4241         PR c++/9602
4242         * typeck2.c (abstract_virtuals_error): Don't check when
4243         TYPE is still template parameter dependent.
4244
4245 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
4246
4247         PR c++/5333
4248         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
4249         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
4250         * pt.c (instantiate_class_template): Don't try to instantiate
4251         dependent types.
4252         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
4253
4254 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
4255
4256         PR c++/9749
4257         * decl.c (grokdeclarator): Do not allow parameters with variably
4258         modified types.
4259
4260 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
4261
4262         * search.c (grow_bfs_bases): Remove. Fold into ...
4263         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
4264         in previous patch.
4265
4266 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
4267
4268         PR c++/9729
4269         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
4270         when the G++ 3.2 ABI prevents correct compilation.
4271
4272 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
4273
4274         Change base class access representation. Share virtual base
4275         binfos.
4276         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
4277         call.
4278         * cp/class.c (build_base_path): Likewise.
4279         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
4280         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
4281         (make_new_vtable): Adjust.
4282         (force_canonical_binfo_r): Delete.
4283         (force_canonical_binfo): Delete.
4284         (mark_primary_virtual_base): Delete.
4285         (dfs_unshared_virtual_bases): Delete.
4286         (mark_primary_bases): Adjust.
4287         (maybe_warn_about_overly_private_class): Adjust.
4288         (dfs_base_derived_from): Delete.
4289         (base_derived_from): Follow the inheritance chain.
4290         (struct find_final_overrider_data): Add vpath member.
4291         (dfs_find_final_overrider): Adjust.
4292         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
4293         (find_final_overrider): Adjust.
4294         (update_vtable_entry_for_fn): Adjust.
4295         (modify_all_vtables): Adjust.
4296         (walk_subobject_offsets): Adjust.
4297         (layout_nonempty_base_or_field): Adjust.
4298         (layout_empty_base): Remove last parameter. Adjust.
4299         (build_base_field): Adjust.
4300         (build_base_fields): Adjust.
4301         (propagate_binfo_offsets): Remove last parameter. Adjust.
4302         (dfs_set_offset_for_unshared_vbases): Delete.
4303         (layout_virtual_bases): Adjust.
4304         (finish_struct_1): Adjust.
4305         (init_class_processing): Don't init access nodes.
4306         (dfs_get_primary_binfo): Delete.
4307         (get_primary_binfo): Adjust.
4308         (dump_class_hierarchy_r): Remove most derived arg, add IGO
4309         parameter. Adjust.
4310         (dump_class_hierarchy): Adjust.
4311         (finish_vtbls): Adjust.
4312         (get_original_base): Delete.
4313         (build_vtt_inits): Adjust.
4314         (dfs_build_secondary_vptr_vtt_inits): Adjust.
4315         (dfs_ctor_vtable_bases_queue_p): Adjust.
4316         (build_ctor_vtbl_group): Adjust.
4317         (dfs_accumulate_vtbl_inits): Adjust.
4318         (build_vtbl_initializer): Adjust.
4319         (build_vbase_offset_vtbl_entries): Adjust.
4320         (add_vcall_offset_vtbl_entries_1): Adjust.
4321         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
4322         (access_*_node): Remove.
4323         (CANONICAL_BINFO): Delete.
4324         (BINFO_UNSHARED_MARKED): Remove.
4325         (BINFO_MARKED): Set LANG_FLAG_0 directly.
4326         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
4327         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
4328         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
4329         Delete.
4330         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
4331         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4332         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
4333         Delete.
4334         (BINFO_DEPENDENT_BASE_P): New.
4335         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
4336         index.
4337         (markedp, unmarkedp): Adjust.
4338         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
4339         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
4340         find_vbase_instance, binfo_for_vbase): Delete.
4341         (copied_binfo, original_binfo): Declare.
4342         (finish_base_specifier): Add virtual_p arg.
4343         (unshare_base_binfos): Delete.
4344         (copy_base_binfos): Declare.
4345         (reverse_path): Delete.
4346         * cp/decl.c (xref_basetypes): Access and virtuality passed
4347         differently. Don't copy direct base binfos here. Call
4348         copy_base_binfos.
4349         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
4350         (initialize_vtbl_ptrs): Adjust.
4351         (expand_member_init): Adjust.
4352         * cp/parser.c (cp_parser_base_specifier): Adjust.
4353         * cp/pt.c (instantiate_class_template): Adjust.
4354         (get_template_base_recursive): Adjust.
4355         * cp/rtti.c (get_pseudo_ti_init): Adjust.
4356         (get_pseudo_ti_desc): Adjust.
4357         * cp/tree.c (unshare_base_binfos): Rename to ...
4358         (copy_base_binfos): ... here, reimplement.
4359         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
4360         (reverse_path): Remove.
4361         * cp/typeck.c (get_delta_difference): Adjust error messages.
4362         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
4363         * cp/search.c (lookup_base_r): Adjust.
4364         (dynamic_cast_base_recurse): Adjust.
4365         (canonical_binfo): Remove.
4366         (dfs_canonical_queue): Remove.
4367         (dfs_assert_unmarked_p): Remove.
4368         (assert_canonical_unmarked): Remove.
4369         (shared_marked_p, shared_unmarked_p): Remove.
4370         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
4371         (dfs_access_in_type): Adjust.
4372         (access_in_type): Adjust.
4373         (dfs_accessible_queue_p): Adjust.
4374         (dfs_accessible_p): Adjust.
4375         (is_subobject_of_p_1, is_subobject_of_p): Remove.
4376         (struct lookup_field_info): Remove from_dep_base_p field.
4377         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
4378         (lookup_field_r): Remove dependent base code.
4379         (lookup_member): Likewise.
4380         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
4381         (dfs_unmarked_real_bases_queue_p): Remove.
4382         (dfs_marked_real_bases_queue_p): Remove.
4383         (dfs_skip_vbases): Remove.
4384         (dfs_get_pure_virtuals): Adjust.
4385         (markedp, unmarkedp): Adjust.
4386         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
4387         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
4388         (dfs_unmark): Adjust.
4389         (dfs_get_vbase_types):Remove.
4390         (dfs_build_inheritance_graph_order): Remove.
4391         (get_vbase_types): Remove
4392         (dfs_find_vbase_instance): Remove.
4393         (find_vbase_instance): Remove.
4394         (dfs_debug_unmarkedp): Adjust.
4395         (dependent_base_p): Remove.
4396         (dfs_push_type_decls): Adjust.
4397         (dfs_push_decls): Adjust.
4398         (dfs_no_overlap_yet): Adjust.
4399         (copied_binfo): New function.
4400         (original_binfo): New function.
4401         (binfo_for_vbase): Remove.
4402
4403 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
4404
4405         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
4406         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
4407         vectors, for speed.
4408
4409 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
4410
4411         PR c++/9704
4412         * class.c (layout_class_type): In the 3.2 ABI, take into account
4413         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
4414
4415 2003-02-18  Matt Austern <austern@apple.com>
4416
4417         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
4418         nothing for C++.
4419         * cp/decl.c (wrapup_globals_for_namespace): Remove special
4420         handling of global namespace.
4421
4422 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
4423
4424         * cp-tree.h (rid_to_yy): Delete.
4425         (C_RID_YYCODE): Delete.
4426         (finish_file): Delete redundant declaration.
4427
4428 2003-02-18  Jason Merrill  <jason@redhat.com>
4429
4430         PR c++/9623
4431         * decl.c (reshape_init): Don't mess with initializer labels.
4432
4433         PR c++/9485
4434         * parser.c (cp_parser_postfix_expression): Set idk properly for
4435         object->scope::member.
4436
4437 2003-02-18  Ben Elliston  <bje@redhat.com>
4438
4439         PR other/7350
4440         * decl.c (duplicate_decls): Fix typo in comment.
4441
4442 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
4443
4444         PR debug/9717
4445         * class.c (build_base_field): Mark fields for base classes with
4446         DECL_IGNORED_P.
4447
4448 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4449
4450         PR c++/9457
4451         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
4452         CONSTRUCTOR_ELTS only once.
4453
4454 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4455
4456         PR c++/9459
4457         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
4458         (dump_type_suffix): Likewise.
4459
4460 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4461
4462         * search.c: ANSIfy function declarations and definitions.
4463         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
4464         * call.c (build_method_call, resolve_scoped_fn_name,
4465         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
4466         calls.
4467         * class.c (handle_using_decl): Likewise.
4468         * decl.c (make_typename_type, make_unmound_class_template,
4469         start_decl, compute_array_index_type): Likewise.
4470         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
4471         * init.c (expand_member_init, build_member_call): Likewise.
4472         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
4473         resolve_typename_type): Likewise.
4474         * typeck.c (lookup_destructor, finish_class_member_access_exprm
4475         build_prememfunc_access_expr): Likewise.
4476
4477 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
4478
4479         * decl2.c: Include "timevar.h".
4480         (namespace_ancestor): Time name lookup.
4481         (add_using_namespace): Likewise.
4482         (lookup_using_namespace): Likewise.
4483         (qualified_lookup_using_namespace): Likewise.
4484         (decl_namespace): Likewise.
4485         (lookup_arg_dependent): Likewise.
4486         * lex.c (do_identifier): Likewise.
4487         (do_scoped_id): Likewise.
4488         * pt.c (lookup_template_class): Likewise.
4489
4490 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
4491
4492         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
4493
4494 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4495
4496         * decl.c: Include "timevar.h".
4497         (poplevel): Time name lookup.
4498         (find_binding): Likewise.
4499         (push_namespace): Likewise.
4500         (pop_nested_namespace): Likewise.
4501         (store_bindings): Likewise.
4502         (maybe_push_to_top_level): Likewise.
4503         (pop_from_top_level): Likewise.
4504         (push_local_name): Likewise.
4505         (pushtag): Likewise.
4506         (pushdecl): Likewise.
4507         (pushdecl_with_scope): Likewise.
4508         (pushdecl_namespace_level): Likewise.
4509         (pushdecl_top_level): Likewise.
4510         (pushdecl_class_level): Likewise.
4511         (push_class_level_binding): Likewise.
4512         (push_using_decl): Likewise.
4513         (push_using_directive): Likewise.
4514         (push_overloaded_decl): Likewise.
4515         (lookup_label): Likewise.
4516         (define_label): Likewise.
4517         (lookup_tag): Likewise.
4518         (lookup_tag_reverse): Likewise.
4519         (lookup_namespace_name): Likewise.
4520         (select_decl): Likewise.
4521         (unqualified_namespace_lookup): Likewise.
4522         (lookup_name_real): Likewise.
4523         (lookup_name_current_level): Likewise.
4524         (lookup_type_current_level): Likewise.
4525         (maybe_inject_for_scope_var): Likewise.
4526         (xref_tag): Likewise.
4527
4528         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
4529
4530 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
4531
4532         * decl.c (build_enumerator):  Remove unneeded test.
4533
4534 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
4535
4536         * cp-tree.h (struct lang_type_header): Make all fields unsigned
4537         char.
4538
4539 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
4540
4541         PR c++/7129
4542         * call.c (z_candidate): Add args.
4543         (convert_class_to_reference): Set it.
4544         (implicit_conversion): Tidy.
4545         (add_candidate): Add args parameter.
4546         (add_function_candidate): Adjust call to add_candidate.
4547         (add_conv_candidate): Likewise.
4548         (build_builtin_candidate): Likewise.
4549         (build_user_type_conversion_1): Eliminate wasteful tree_cons
4550         usage.
4551         (build_new_function_call): Likewise.
4552         (build_object_call): Likewise.
4553         (add_candidates): New function.
4554         (build_new_op): Use it.
4555         (covert_like_real): Adjust call to build_over_call.
4556         (build_over_call): Remove args parameter.
4557         * operators.def: Add <?= and >?=.
4558
4559 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
4560
4561         * typeck.c (build_indirect_ref): Don't check flag_volatile.
4562
4563 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4564
4565         PR c++/8849
4566         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
4567
4568 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
4569
4570         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
4571         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
4572         (BINFO_LANG_ELTS): New #define.
4573         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
4574
4575 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
4576
4577         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
4578
4579 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
4580
4581         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
4582         for class types.
4583         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
4584         rather than TYPE_LANG_FLAG_0.
4585         (TYPE_BUILT_IN): Remove.
4586         (TYPE_DEPENDENT_P): New macro.
4587         (TYPE_DEPENDENT_P_VALID): Likewise.
4588         (lang_type_class): Add fields_readonly.
4589         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
4590         * pt.c (dependent_type_p_r): New function, split out from ...
4591         (dependent_type_p): ... here.  Memoize results.
4592         * search.c (dependent_base_p): Use dependent_type_p, not
4593         uses_template_parms.
4594         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
4595         for class types.
4596
4597 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
4598
4599         * call.c (build_field_call): Use build_new_op, not build_opfncall.
4600         (prep_operand): New function.
4601         (build_new_op): Use it.  Remove dead code.
4602         * class.c (pushclass): Change "modify" parameter type from int to
4603         bool.
4604         (currently_open_class): Use same_type_p, not pointer equality.
4605         (push_nested_class): Adjust calls to pushclass, remove modify
4606         parameter.
4607         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
4608         (pushclass): Change prototype.
4609         (push_nested_class): Likewise.
4610         (grokoptypename): Remove.
4611         (build_opfncall): Remove.
4612         (value_dependent_expression_p): Declare.
4613         (resolve_typename_type): Likewise.
4614         (resolve_typename_type_in_current_instantiation): Likewise.
4615         (enter_scope_of): Remove.
4616         (tsubst): Remove.
4617         (tsubst_expr): Likewise.
4618         (tsubst_copy): Likewise.
4619         (tsubst_copy_and_build): Likewise.
4620         * decl.c (warn_about_implicit_typename_lookup): Remove.
4621         (finish_case_label): Return error_mark_node for erroneous labels.
4622         (start_decl): Adjust calls to push_nested_class.
4623         (grokfndecl): Call push_scope/pop_scope around call to
4624         duplicate_decls.
4625         (grokdeclarator): Do not call tsubst.
4626         (start_function): Adjust calls to push_nested_class.
4627         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
4628         (check_classfn): Use push_scope/pop_scope around type comparisions.
4629         (grokoptypename): Remove.
4630         (push_sscope): Adjust call to push_nested_class.
4631         * error.c (dump_type): Show cv-qualification of typename types.
4632         * init.c (build_member_call): Use build_new_op, not
4633         build_opfncall.
4634         * method.c (build_opfncall): Remove.
4635         * parser.c (cp_parser): Add allow_non_constant_expression_p and
4636         non_constant_expression_p.
4637         (cp_parser_constant_expression): Adjust prototype.
4638         (cp_parser_resolve_typename_type): Remove.
4639         (cp_parser_non_constant_expression): New function.
4640         (cp_parser_non_constant_id_expression): Likewise.
4641         (cp_parser_new): Set allow_non_constant_expression_p and
4642         non_constant_expression_p.
4643         (cp_parser_primary_expression): Reject `this' and `va_arg' in
4644         constant-expressions.  Note that dependent names aren't really
4645         constant.
4646         (cp_parser_postfix_expression): Reject conversions to non-integral
4647         types in constant-expressions.  Neither are increments or
4648         decrements.
4649         (cp_parser_unary_expression): Reject increments and decrements in
4650         constant-expressions.
4651         (cp_parser_direct_new_declarator): Adjust call to
4652         cp_parser_constant_expression.
4653         (cp_parser_cast_expression): Reject conversions to non-integral
4654         types in constant-expressions.
4655         (cp_parser_assignment_expression): Rejects assignments in
4656         constant-expressions.
4657         (cp_parser_expression): Reject commas in constant-expressions.
4658         (cp_parser_labeled_statement): Adjust call to
4659         cp_parser_constant_expression.
4660         (cp_parser_direct_declarator): Simplify array bounds, even in
4661         templates, when they are non-dependent.  Use
4662         resolve_typename_type, not cp_parser_resolve_typename_type.
4663         (cp_parser_class_head): Use resolve_typename_type, not
4664         cp_parser_resolve_typename_type.
4665         (cp_parser_member_declaration): Adjust call to
4666         cp_parser_constant_expression.
4667         (cp_parser_constant_initializer): Likewise.
4668         (cp_parser_constructor_declarator): Use resolve_typename_type, not
4669         cp_parser_resolve_typename_type.
4670         (cp_parser_late_parsing_default_args): Adjust call to
4671         push_nested_class.
4672         * pt.c (tsubst): Give it internal linkage.
4673         (tsubst_expr): Likewise.
4674         (tsubst_copy): Likewise.
4675         (tsubst_copy_and_build): Likewise.
4676         (push_access_scope_real): Likewise.
4677         (tsubst_friend_class): Likewise.
4678         (instantiate_class_template): Adjust call to pushclass.
4679         (value_dependent_expression_p): Give it external linkage.
4680         Robustify.
4681         (resolve_typename_type): New function.
4682         * semantics.c (finish_call_expr): Use build_new_op, not
4683         build_opfncall.
4684         (begin_constructor_declarator): Remove.
4685         (begin_class_definition): Adjust call to pushclass.
4686         (enter_scope_of): Remove.
4687         * typeck.c (comptypes): Resolve typename types as appropriate.
4688         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
4689         (build_x_compound_expr): Likewise.
4690         (build_modify_expr): Likewise.
4691         (build_x_modify_expr): Likewise.
4692         * typeck2.c (build_x_arrow): Likewise.
4693
4694 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
4695
4696         * pt.c (last_pending_template) Declare GTY().
4697
4698 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4699
4700         PR c++/8591
4701         * parser.c (cp_parser_elaborated_type_specifier): Convert
4702         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
4703         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
4704
4705 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
4706
4707         PR c++/9437
4708         * pt.c (unify): Don't unify '*T' with 'U C::*'.
4709
4710         PR c++/3902
4711         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
4712         inside a declarator.
4713
4714 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
4715
4716         * class.c (update_vtable_entry_for_fn): Add index parameter.
4717         Generate vcall thunk for covariant overriding from a virtual
4718         primary base.
4719         (dfs_modify_vtables): Adjust.
4720
4721 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
4722
4723         PR c++/9403
4724         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
4725         template keyword.
4726         (cp_parser_base_specifier): Look for and consume a
4727         TEMPLATE keyword. Replace switch with array index.
4728
4729         PR c++/795
4730         * semantics.c (finish_non_static_data_member): Remember the
4731         field's type even in a template.
4732
4733         PR c++/9415
4734         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
4735         already scoped.
4736
4737         PR c++/8545
4738         * parser.c (cp_parser_cast_expression): Be more tentative.
4739
4740 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4741
4742         * cp-tree.h (flagged_type_tree_s): Remove.
4743         (check_for_new_type): Likewise.
4744         * typeck2.c (check_for_new_type): Likewise.
4745
4746 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
4747
4748         * dump.c: ANSIfy function declarations and definitions.
4749
4750         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
4751
4752 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
4753
4754         PR c++/9354
4755         * init.c (build_new): Set the type of the new-expression, even
4756         when processing_templte_decl.
4757
4758         PR c++/9216
4759         * parser.c (cp_parser_primary_expression): Improve error message
4760         for templates used in an expression context.
4761
4762         PR c++/8696
4763         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
4764         parse when encountering "typedef".
4765
4766 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
4767
4768         * class.c, parser.c: ANSIfy function definitions and declarations.
4769
4770 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
4771
4772         PR c++/9328
4773         * error.c (dump_decl): For an OVERLOAD, just print the name of the
4774         function; it doesn't make sense to try to print its type.
4775         * semantics.c (finish_typeof): Issue errors about invalid uses.
4776
4777         PR c++/9298
4778         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
4779         function.
4780         (cp_parser_expression_statement): Use it.
4781         (cp_parser_explicit_instantiation): Likewise.
4782         * pt.c (do_decl_instantiation): Improve error handling logic.
4783
4784 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
4785
4786         PR c++/9384
4787         * parser.c (cp_parser_using_declaration): Issue error messages
4788         about name resolution failures here.
4789
4790         PR c++/9388
4791         * class.c (currently_open_derived_class): Use dependent_type_p.
4792         * cp-tree.h (dependent_type_p): New function.
4793         (dependent_template_arg_p): Likewise.
4794         (dependent_template_p): Likewise.
4795         (type_dependent_expression_p): Likewise.
4796         * parser.c (cp_parser_dependent_type_p): Remove.
4797         (cp_parser_value_dependent_type_p): Likewise.
4798         (cp_parser_type_dependent_expression_p): Likewise.
4799         (cp_parser_dependent_template_arg_p): Likewise.
4800         (cp_parser_dependent_template_id_p): Likewise.
4801         (cp_parser_dependent_template_p): Likewise.
4802         (cp_parser_diagnose_invalid_type_name): Replace
4803         cp_parser_dependent_type_p with dependent_type_p, etc.
4804         (cp_parser_primary_expresion): Likewise.
4805         (cp_parser_nested_name_specifier_opt): Likewise.
4806         (cp_parser_postfix_expression): Likewise.
4807         (cp_parser_unary_expression): Likewise.
4808         (cp_parser_template_name): Likewise.
4809         (cp_parser_class_name): Likewise.
4810         (cp_parser_lookup_name): Likewise.
4811         * pt.c (dependent_type_p): New function.
4812         (value_dependent_expression_p): Likewise.
4813         (type_dependent_expression_p): Likewise.
4814         (dependent_template_arg_p): Likewise.
4815         (dependent_template_id_p): Likewise.
4816         (dependent_template_p): Likewise.
4817
4818         PR c++/9285
4819         PR c++/9294
4820         * parser.c (cp_parser_simple_declaration): Return quickly when
4821         encountering errors.
4822
4823 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4824
4825         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
4826
4827 2003-01-17  Jason Merrill  <jason@redhat.com>
4828
4829         PR c++/9167, c++/9358
4830         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
4831
4832 2003-01-17  Jason Merrill  <jason@redhat.com>
4833
4834         PR c++/9342
4835         * call.c (build_conditional_expr): Always do lvalue-rvalue
4836         conversion.
4837
4838 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
4839
4840         PR c++/9294
4841         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
4842         * cp-tree.h (BASELINK_BINFO): Adjust.
4843         (BASELINK_FUNCTIONS): Likewise.
4844         (BASELINK_ACCESS_BINFO): Likewise.
4845         (tree_baselink): New structure.
4846         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
4847         (lang_tree_node): Add baselink.
4848         * decl.c (cp_tree_node_structure): Add BASELINK case.
4849         * search.c (build_baselink): Adjust.
4850         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
4851         test from TREE_LIST case.
4852
4853         PR c++/9272
4854         * parser.c (cp_parser_constructor_declarator_p): Do not assume
4855         that a constructor cannot be declared outside of its own class.
4856
4857         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
4858         be resolved, neither can the qualified name.
4859
4860         * rtti.c (get_pseudo_ti_desc): Fix thinko.
4861
4862 2003-01-16  Jason Merrill  <jason@redhat.com>
4863
4864         PR c++/8564
4865         * init.c (build_vec_init): Re-add maxindex parm.
4866         (perform_member_init, build_aggr_init): Pass it.
4867         (build_new_1): Pass it. Use an incomplete array type for full_type.
4868         * typeck.c (build_modify_expr): Pass it.
4869         * cp-tree.h: Adjust.
4870
4871 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
4872
4873         * cp-tree.h (tsubst_copy_and_build): New declaration.
4874         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
4875         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
4876         (tsubst_copy_and_build): New function.
4877
4878 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
4879
4880         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
4881         (PARTIAL_INSTANTIATION_P): Remove.
4882         (IMPLICIT_TYPENAME_P): Likewise.
4883         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
4884         (build_typename_type): Remove declaration.
4885         (parmlist_is_exprlist): Likewise.
4886         * decl.c (build_typename_type): Make it static, remove third
4887         parameter.
4888         (push_class_binding): Don't do implicit typename stuff.
4889         (make_typename_type): Likewise.
4890         (lookup_name_real): Likewise.
4891         (grokdeclarator): Don't try to convert declarations into
4892         initializations.  Don't do implicit typename stuff.
4893         (parmlist_is_exprlist): Remove.
4894         (xref_basetypes): Simplify.
4895         * decl2.c (grokfield): Don't try to convert declarations into
4896         initializations.
4897         (build_anon_union_vars): Do this while processing templates, too.
4898         (finish_anon_union): Likewise.
4899         * error.c (dump_type): Remove implicit typename handling.
4900         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
4901         (cp_parser_primary_expression): Correct handling of names not
4902         found by unqualified name lookup in templates.
4903         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
4904         of types when possible.
4905         (cp_parser_simple_declaration): Complain intelligently about some
4906         invalid declarations.
4907         (cp_parser_member_declaration): Likewise.
4908         (cp_parser_constructor_declarator_p): Don't check when we're in a
4909         function scope.
4910         * pt.c (instantiate_class_template): Remove
4911         PARTIAL_INSTANTIATION_P gunk.
4912         * search.c (lookup_field_r): Don't build implicit typenames.
4913         (marked_pushdecls_p): Don't enter dependent base types.
4914         (unmarked_pushdecls_p): Likewise.
4915         * semantics.c (begin_class_definition): Remove implicit typename
4916         stuff.
4917
4918 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
4919
4920         PR c++/9212
4921         * parser.c (cp_parser_direct_declarator): If accepting either
4922         abstract or named, the name must be an unqualified-id.
4923
4924 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4925
4926         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
4927
4928 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4929
4930         * decl2.c (check_classfn): Fix uninitialized warning.
4931         (build_anon_union_vars): Likewise.
4932         * pt.c (tsubst_copy): Likewise.
4933
4934 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
4935
4936         Further conform g++'s __vmi_class_type_info to the C++ ABI
4937         specification.
4938         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
4939         the specification.
4940         (class_hint_flags): Likewise.
4941
4942 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4943
4944         * config-lang.in: Add semantics.c to gtfiles.
4945         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
4946         (saved_scope): Likewise.
4947         (type_lookups): Remove.
4948         (deferred_access): New structure.
4949         (type_access_control): Remove.
4950         (save_type_access_control): Likewise.
4951         (reset_type_access_control): Likewise.
4952         (decl_type_access_control): Likewise.
4953         (push_deferring_access_checks): Declare.
4954         (resume_deferring_access_checks): Likewise.
4955         (stop_deferring_access_checks): Likewise.
4956         (pop_deferring_access_checks): Likewise.
4957         (get_deferred_access_checks): Likewise.
4958         (pop_to_parent_deferring_access_checks): Likewise.
4959         (perform_deferred_access_checks): Likewise.
4960         (perform_or_defer_access_check): Likewise.
4961         * decl.c (make_typename_type): Use perform_or_defer_access_check.
4962         (make_unbound_class_template): Likewise.
4963         (grokdeclarator): Don't call decl_type_access_control.
4964         * parser.c (cp_parser_context): Remove deferred_access_checks
4965         and deferring_access_checks_p fields.
4966         (cp_parser_context_new): Adjust.
4967         (cp_parser): Remove access_checks_lists.
4968         (cp_parser_defer_access_check): Remove.
4969         (cp_parser_start_deferring_access_checks): Remove.
4970         (cp_parser_stop_deferring_access_checks): Remove.
4971         (cp_parser_perform_deferred_access_checks): Remove.
4972         (cp_parser_nested_name_specifier_opt): Use new deferred access
4973         functions.
4974         (cp_parser_simple_declaration): Likewise.
4975         (cp_parser_template_id): Likewise.
4976         (cp_parser_function_definition): Likewise.
4977         (cp_parser_class_specifier): Likewise.
4978         (cp_parser_lookup_name): Likewise.
4979         (cp_parser_single_declaration): Likewise.
4980         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
4981         (cp_parser_parse_tentatively): Likewise.
4982         (cp_parser_parse_definitely): Likewise.
4983         (yyparse): Likewise.
4984         (cp_parser_init_declarator): Remove access_checks parameter.
4985         Use new deferred access functions.
4986         (cp_parser_function_definition_from_specifiers_and_declarator):
4987         Likewise.
4988         (cp_parser_class_head): Remove deferring_access_checks_p and
4989         saved_access_checks parameters.  Use new deferred access functions.
4990         (cp_parser_member_specification_opt): Don't call
4991         reset_type_access_control.
4992         * search.c (type_access_control): Remove.
4993         * semantics.c: Include "gt-cp-semantics.h".
4994         (deferred_type_access_control): Remove.
4995         (deferred_access_stack): New variable.
4996         (deferred_access_free_list): Likewise.
4997         (push_deferring_access_checks): New function.
4998         (resume_deferring_access_checks): Likewise.
4999         (stop_deferring_access_checks): Likewise.
5000         (pop_deferring_access_checks): Likewise.
5001         (get_deferred_access_checks): Likewise.
5002         (pop_to_parent_deferring_access_checks): Likewise.
5003         (perform_deferred_access_checks): New function, adapted from
5004         cp_parser_perform_deferred_access_checks.
5005         (perform_or_defer_access_check): New function, adapted from
5006         cp_parser_defer_access_check.
5007         (current_type_lookups): Remove.
5008         (deferred_type_access_control): Likewise.
5009         (decl_type_access_control): Likewise.
5010         (save_type_access_control): Likewise.
5011         (reset_type_access_control): Likewise.
5012         (begin_function_definition): Adjust.
5013         (begin_class_definiton): Likewise.
5014
5015 2003-01-13  Jason Merrill  <jason@redhat.com>
5016
5017         PR c++/8748
5018         * class.c (build_base_path): Take the address before calling save_expr.
5019
5020         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
5021         all the ambiguous conversions are bad.
5022
5023         * class.c (maybe_warn_about_overly_private_class): Don't stop
5024         searching when we find a nonprivate method.
5025
5026         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
5027
5028 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
5029
5030         * cp-tree.h (get_arglist_len_in_bytes): Remove.
5031
5032         PR c++/9264
5033         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
5034         typeame types more robustly.
5035
5036 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
5037
5038         * parser.c:  Fix comment typos.
5039
5040 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
5041
5042         PR c++/9099
5043         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
5044         an object_type which is not a class type.
5045
5046 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
5047
5048         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
5049         (cp_parser_late_parsing_default_args): Likewise.
5050
5051 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
5052
5053         * cfns.gperf: ANSIfy function declarations.
5054         * cfns.h: Regenerate.
5055         * cp-tree.h: ANSIfy function declarations.
5056
5057 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
5058
5059         * cp-tree.h (reparse_absdcl_as_expr): Remove.
5060         (reparse_absdcl_as_casts): Likewise.
5061         (reparse_decl_as_expr): Likewise.
5062         (finish_decl_parsing): Likewise.
5063         * decl2.c (reparse_absdcl_as_expr): Remove.
5064         (reparse_absdcl_as_casts): Likewise.
5065         (repase_decl_as_expr): Likewise.
5066         (finish_decl_parsing): Likewise.
5067
5068         PR c++/9128
5069         PR c++/9153
5070         PR c++/9171
5071         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
5072         function.
5073         (cp_parser_nested_name_specifier_opt): Correct the
5074         check_dependency_p false.
5075         (cp_parser_postfix_expression): Fix formatting.
5076         (cp_parser_decl_specifier_seq): Avoid looking for constructor
5077         declarators when possible.
5078         (cp_parser_template_id): Avoid performing name-lookup when
5079         possible.
5080         (cp_parser_class_head): Do not count specializations when counting
5081         levels of templates.
5082         (cp_parser_constructor_declarator_p): Return immediately if
5083         there's no chance that the tokens form a constructor declarator.
5084         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
5085         expression with reference type.
5086         (get_tinfo_decl_dynamic): Do not return an expression with
5087         reference type.
5088         (build_typeid): Add comment.  Do not return an expression with
5089         reference type.
5090         * typeck.c (build_class_member_access_expr): Improve handling of
5091         conditionals and comma-expressions as objects.
5092
5093 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
5094
5095         * cfns.gperf: ANSIfy function declarations.
5096         * cfns.h: Regenerate.
5097         * cp-tree.h: ANSIfy function declarations.
5098         * parser.c: ANSIfy function declarations & definitions.
5099
5100         * decl.c (bad_specifiers): Fix parameter order error I introduced.
5101
5102 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
5103
5104         Merge from pch-branch:
5105
5106         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
5107
5108         Merge to tag pch-merge-20030102:
5109
5110         * semantics.c (finish_translation_unit): Don't call finish_file.
5111         * parser.c: Don't include ggc.h.
5112         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
5113         read first token here.  Don't allow PCH files after the first
5114         token is read.
5115         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
5116         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
5117         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
5118         (cp_parser_late_parsing_for_member): Don't duplicate call to
5119         cp_lexer_set_source_position_from_token.
5120         (cp_parser_late_parsing_default_args): Likewise.
5121         (yyparse): Call finish_file after clearing the_parser.
5122
5123         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
5124
5125         * Make-lang.in: Remove $(GGC_H) from all dependencies.
5126         (CXX_TREE_H): Add $(GGC_H).
5127         * class.c: Don't include ggc.h.
5128         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
5129         (method_name_cmp): Likewise.
5130         (resort_data): New variable.
5131         (resort_field_decl_cmp): New.
5132         (resort_method_name_cmp): New.
5133         (resort_sorted_fields): New.
5134         (resort_type_method_vec): New.
5135         (finish_struct_methods): Delete cast.
5136         (finish_struct_1): Delete cast.
5137         * cp-tree.h: Include ggc.h.
5138         (struct lang_type_class): Add reorder attribute to field `methods'.
5139         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
5140         (resort_sorted_fields): New prototype.
5141         (resort_type_method_vec): New prototype.
5142         * call.c: Don't include ggc.h.
5143         * decl.c: Likewise.
5144         * decl2.c: Likewise.
5145         * init.c: Likewise.
5146         * lex.c: Likewise.
5147         * method.c: Likewise.
5148         * optimize.c: Likewise.
5149         * parse.y: Likewise.
5150         * pt.c: Likewise.
5151         * repo.c: Likewise.
5152         * search.c: Likewise.
5153         * semantics.c: Likewise.
5154         * spew.c: Likewise.
5155         * tree.c: Likewise.
5156
5157         * lang-specs.h: Remove comment.
5158
5159         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
5160
5161         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
5162         (operator_name_info): Mark to be saved for PCH, specify size.
5163         (assignment_operator_name_info): Likewise.
5164
5165         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
5166
5167         * decl.c (anon_cnt): Mark to be saved for PCH.
5168
5169         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
5170
5171         * lex.c  (init_reswords): Delete now-untrue comment.
5172         Allocate ridpointers using GGC.
5173
5174         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
5175
5176         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
5177
5178         * g++spec.c (lang_specific_driver): Don't include standard
5179         libraries in `added'.
5180
5181         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
5182
5183         * decl2.c (finish_file): Call c_common_write_pch.
5184         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
5185
5186         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
5187
5188         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
5189         files when using g++.
5190         * lang-specs.h: Handle compiling C++ header files.
5191
5192 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
5193
5194         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
5195
5196 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5197
5198         * pt.c (push_access_scope_real): Call push_to_top_level for
5199         function in namespace scope.
5200         (pop_access_scope): Call pop_from_top_level for function in
5201         namespace scope.
5202
5203 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
5204
5205         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
5206
5207 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
5208
5209         * Make-lang.in (c++.install-common, c++.install-man,
5210         c++.uninstall): Prepend $(DESTDIR) to destination paths in
5211         all (un)installation commands.
5212         (c++.install-common): Rewrite $(LN) commands to support
5213         DESTDIR with "ln" as well as with "ln -s".
5214
5215 2003-01-08  Jason Merrill  <jason@redhat.com>
5216
5217         * parser.c (cp_parser_primary_expression): See through explicitly
5218         scoped ALIAS_DECLs, too.
5219
5220 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
5221
5222         * decl.c: Remove some #if 0 code.
5223
5224         * decl.c: ANSIfy function declarations.
5225
5226 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
5227
5228         * parser.c (cp_parser_asm_definition): Correct handling of omitted
5229         operands.
5230
5231 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5232
5233         PR c++/9030
5234         * decl.c (make_typename_type): Check access only when tf_error.
5235         (make_unbound_class_template): Likewise.
5236         * pt.c (saved_access_scope): New variable.
5237         (push_access_scope_real): New function.
5238         (push_access_scope): Likewise.
5239         (pop_access_scope): Likewise.
5240         (tsubst_default_argument): Use them.
5241         (instantiate_template): Likewise.
5242         (regenerate_decl_from_template): Likewise.
5243         (instantiate_decl): Likewise.
5244         (get_mostly_instantiated_function_type): Likewise.
5245
5246 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
5247
5248         * tree.c: Delete bogus #if 0 code.
5249
5250 2003-01-07  Andreas Schwab  <schwab@suse.de>
5251
5252         * class.c (layout_class_type): Don't use
5253         PCC_BITFIELD_TYPE_MATTERS if not defined.
5254
5255 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
5256
5257         PR c++/9165
5258         * decl2.c (build_cleanup): Mark the object as used.
5259
5260         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
5261         (hash_local_specialization): New function.
5262         (register_local_specialization): Revert 2003-01-05 change.
5263         (instantiate_decl): Use hash_local_specialization when creating
5264         the local_specializations table.
5265
5266         * decl2.c (mark_used): Do not synthesize thunks.
5267
5268         * class.c (layout_class_type): Correct handling of unnamed
5269         bitfields wider than their types.
5270
5271         PR c++/9189
5272         * parser.c (cp_parser): Remove default_arg_types.  Update
5273         documentation for unparsed_functions_queues.
5274         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
5275         parameter.
5276         (cp_parser_new): Don't set parser->default_arg_types.
5277         (cp_parser_function_definition): Adjust usage of
5278         unparsed_funtions_queues.
5279         (cp_parser_class_specifier): Don't mess with
5280         parser->default_arg_types.  Handle default argument processing in
5281         a separate phase from function body processing.
5282         (cp_parser_template_declaration_after_export): Adjust usage of
5283         unparsed_functions_queues.
5284         (cp_parser_late_parsing_for_member): Do not handle default
5285         arguments.
5286
5287 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
5288
5289         PR c++/9109
5290         * parser.c (cp_parser_declarator_kind): New enum.
5291         (cp_parser_declarator): Adjust.
5292         (cp_parser_direct_declarator): Adjust. Allow for either named or
5293         abstract declarator. Prefer abstract, if possible. Allow
5294         parenthesized function name.
5295         (cp_parser_condition): Adjust cp_parser_declarator call.
5296         (cp_parser_explicit_instantiation): Likewise.
5297         (cp_parser_init_declarator): Likewise.
5298         (cp_parser_type_id): Likewise.
5299         (cp_parser_function_definition): Likewise.
5300         (cp_parser_member_declaration): Likewise.
5301         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
5302         the tentative parsing.
5303         (cp_parser_exception_declaration): Likewise.
5304
5305 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
5306
5307         * parser.c (cp_parser_template_parameter): Adjust call to
5308         cp_parser_parameter_declaration.
5309         (cp_parser_parameter_declaration_list): Likewise.
5310         (cp_parser_parameter_declaration): Replace
5311         greater_than_is_operator_p with template_parm_p parameter.  Do not
5312         cache tokens for template default arguments.
5313
5314         * pt.c (retrieve_local_specialization): Use htab_find, not
5315         htab_find_with_hash.
5316         (register_local_specialization): Use htab_find_slot, not
5317         htab_find_slot_with_hash.
5318         (instantiate_decl): Pass a hash function to htab_create.
5319
5320 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5321
5322         * parser.c (cp_parser_binary_expression,
5323         cp_parser_multiplicative_expression,
5324         cp_parser_additive_expression, cp_parser_shift_expression,
5325         cp_parser_relational_expression, cp_parser_equality_expression,
5326         cp_parser_and_expression, cp_parser_exclusive_or_expression,
5327         cp_parser_inclusive_or_expression,
5328         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
5329         cp_parser_binary_expression): Const-ify.
5330
5331 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
5332
5333         * method.c (use_thunk): Disable access control while building the
5334         body of the thunk.
5335
5336 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
5337
5338         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
5339         front end.
5340
5341 2003-01-03  Matt Austern  <austern@apple.com>
5342
5343         * cp-tree.h (struct lang_type_class): add field for key method
5344         (cp_global_trees): rename dynamic_classes to keyed_classes
5345         (key_method): add definition
5346         * class.c (finish_struct_1): compute class's key method, and add
5347         the class to keyed_classes list if there is no key method.
5348         * decl.c (finish_function): add class to keyed_classes list if we
5349         see a definition of the class's key method.
5350         * pt.c (instantiate_class_template): add template specialization
5351         of a dynamic class to keyed_classes list.
5352         * decl2.c (key_method): remove
5353         (finish_file): iterate only through keyed_classes list when
5354         deciding whether to emit vtables, remove class from its list after
5355         we do the emission.
5356
5357 2003-01-02  Jason Merrill  <jason@redhat.com>
5358
5359         * call.c (build_conditional_expr): Stabilize lvalues properly.
5360         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
5361         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
5362         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
5363
5364         * call.c (convert_like_real): Call decl_constant_value for an
5365         IDENTITY_CONV even if there are no more conversions.
5366
5367         * cvt.c (build_up_reference): Don't push unnamed temps.
5368
5369         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
5370
5371         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
5372         for a backend struct.
5373
5374         * except.c (wrap_cleanups_r, build_throw): Make
5375         MUST_NOT_THROW_EXPRs void.
5376         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
5377
5378         * init.c (build_vec_delete_1): Pre-evaluate the base address.
5379
5380         * init.c (get_temp_regvar): Simplify logic.
5381
5382         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
5383         our replacement is a decl.
5384
5385         * decl.c (cp_make_fname_decl): Push the decls inside the
5386         outermost scope.
5387
5388 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
5389
5390         PR c++/45, c++/3784
5391         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
5392         the same too.
5393
5394 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
5395
5396         * parser.c (struct cp_parser): Add access_checks_lists field
5397         (cp_parser_simple_declaration): Use.
5398         (cp_parser_init_declarator): Likewise.
5399
5400 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
5401
5402         * parser.c (cp_parser_declaration): Accept the __extension__
5403         keyword before the declaration.
5404
5405         PR c++/2843
5406         * parser.c (cp_parser_parameter_declaration): Allow attributes to
5407         appear after the declarator.
5408
5409         * call.c (build_new_method_call): Fix typo in message format
5410         string.
5411
5412 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
5413
5414         * parser.c (cp_lexer_next_token_is): Declare it inline.
5415         (cp_lexer_set_source_position_from_token): Likewise.
5416         (cp_lexer_debugging_p): Likewise.
5417         (cp_parser_parsing_tentatively): Likewise.
5418         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
5419         to the cp_lexer_peek_token.
5420
5421         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
5422         expression.
5423
5424 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
5425
5426         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
5427         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
5428         cp/repo.c: Fix copyright years.
5429
5430 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
5431
5432         * lex.c: Remove superfluous include of cpplib.h.
5433         (CONSTRAINT): Define without conditions.
5434         (init_cp_pragma): Use c_register_pragma.
5435
5436 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
5437
5438         * .cvsignore: Remove.
5439
5440 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5441
5442         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
5443           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
5444           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
5445           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
5446           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
5447           copyright header.
5448         * lex.h: parse.y is dead, so don't mention it.  Also replace the
5449           copyright header with the default GNU copyright header.
5450
5451 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
5452
5453         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
5454         (lookup_name_namespace_only): Likewise.
5455         (begin_only_namespace_names): Likewise.
5456         (end_only_namespace_names): Likewise.
5457         * decl.c (only_namespace_names): Remove.
5458         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
5459         (lookup_name_real): Do not check only_namespace_names.
5460         (lookup_name_namespace_only): Remove.
5461         (begin_only_namespace_names): Likewise.
5462         (end_only_namespace_names): Likewise.
5463         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
5464         nested-name-specifiers more gracefully.
5465         (cp_parser_class_or_namespace_name): Avoid looking up namespace
5466         names when they cannot possibly appear.
5467         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
5468         (cp_parser_elaborated_type_specifier): Likewise.
5469         (cp_parser_namespace_name): Only look for namespace names.
5470         (cp_parser_lookup_name): Add is_namespace parameter.
5471         (cp_parser_lookup_name_simple): Adjust call to
5472         cp_parser_lookup_name.
5473
5474         * parser.c (cp_parser_dependent_type_p): Fix thinko.
5475
5476 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
5477
5478         * .cvsignore: Update.
5479
5480 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
5481
5482         * class.c (modify_vtable_entry): Remove unused variable.
5483         (get_vcall_index): Always expect a non-thunk.
5484         (update_vtable_entry_for_fn): Combine covariant adjustments, when
5485         overriding a thunk. Pass get_vcall_index a non-thunk.
5486
5487         * decl2.c (finish_file): Mark undefined inlines as extern.
5488
5489 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
5490
5491         * cp-tree.def (RETURN_INIT): Remove.
5492         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
5493         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
5494         (note_level_for_for): Remove.
5495         (note_level_for_try): Likewise.
5496         (note_level_for_catch): Likewise.
5497         (finish_named_return_value): Likewise.
5498         (do_pushlevel): Change prototype.
5499         (pending_lang_change): Remove.
5500         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
5501         sk_for.
5502         (note_level_for_for): Remove.
5503         (note_level_for_try): Likewise.
5504         (note_level_for_catch): Likewise.
5505         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
5506         * parser.c (cp_parser_context_free_list): Make it "deletable".
5507         (cp_parser_template_argument): Remove misleading comment.
5508         * pt.c (tsubst_expr): Remove RETURN_INIT code.
5509         * semantics.c (genrtl_named_return_value): Remove.
5510         (do_pushlevel): Take a scope kind as an argument.
5511         (begin_if_stmt): Adjust.
5512         (begin_while_stmt): Likewise.
5513         (begin_for_stmt): Likewise.
5514         (finish_for_init_stmt): Likewise.
5515         (begin_switch_stmt): Likewise.
5516         (begin_handler): Likewise.
5517         (begin_compound_stmt): Likewise.
5518         (finish_named_return_value): Remove.
5519         (cp_expand_stmt): Remove RETURN_INIT case.
5520         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
5521
5522 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
5523
5524         PR c++/9112
5525         * parser.c (cp_parser_direct_declarator): Handle erroneous
5526         parenthesized declarators correctly.
5527
5528 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5529
5530         * cp-tree.h (pending_lang_change): Declare.
5531
5532 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
5533
5534         * parser.c (cp_parser_context_free_list): New variable.
5535         (cp_parser_context_new): Use it.
5536         (cp_parser_error): Check return code from
5537         cp_parser_simulate_error.
5538         (cp_parser_simulate_error): Return a value.
5539         (cp_parser_id_expression): Optimize common case.
5540         (cp_parser_class_name): Likewise.
5541         (cp_parser_class_specifier): Adjust call to
5542         cp_parser_late_parsing_default_args.
5543         (cp_parser_lookup_name): Optimize common case.
5544         (cp_parser_late_parsing_for_member): Adjust call to
5545         cp_parser_late_parsing_default_args.
5546         (cp_parser_late_parsing_default_args): Add scope parameter.
5547         (cp_parser_require): Avoid creating the error message unless it's
5548         needed.
5549         (cp_parser_parse_definitely): Place free'd contexts on the free
5550         list.
5551
5552         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
5553
5554 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
5555
5556         * parser.c (cp_parser_parameter_declaration_clause): Treat system
5557         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
5558
5559 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
5560
5561         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
5562         GCC, not GNU CC.
5563
5564 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
5565
5566         * parse.y: Remove.
5567         * spew.c: Likewise.
5568         * Make-lang.in (gt-cp-spew.h): Remove.
5569         * cp-tree.h (do_pending_lang_change): Remove.
5570         (do_identifier): Change prototype.
5571         (finish_id_expr): Remove.
5572         * decl.c (lookup_name_real): Remove yylex variable.
5573         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
5574         * lex.c (init_cpp_parse): Remove.
5575         (reduce_cmp): Likewise.
5576         (token_cmp): Likewise.
5577         (yychar): Likewise.
5578         (lastiddecl): Likewise.
5579         (token_count): Likewise.
5580         (reduce_count): Likewise.
5581         (yyhook): Likewise.
5582         (print_parse_statistics): Likewise.
5583         (do_pending_lang_change): Likewise.
5584         (do_identifier): Remove parsing parameter.
5585         * lex.h (lastiddecl): Remove.
5586         (looking_for_typename): Remove.
5587         (looking_for_template): Likewise.
5588         (pending_lang_change): Likewise.
5589         (yylex): Likewise.
5590         * semantics.c (finish_id_expr): Remove.
5591
5592         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
5593         thread" correctly.
5594
5595 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
5596
5597         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
5598         end, not the C front end.
5599
5600 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
5601
5602         * cp-tree.h (THUNK_TARGET): New macro.
5603         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
5604         (finish_thunk): Remove offset parms.
5605         * class.c (find_final_overrider): Look through thunks.
5606         (get_vcall_index): Use THUNK_TARGET.
5607         (update_vtable_entry_for_fn): Look through thunks. Set covariant
5608         fixed offset here. Adjust finish_thunk call.
5609         (build_vtbl_initializer): Adjust finish_thunk calls.
5610         * mangle.c (mangle_call_offset): Remove superfluous if.
5611         (mangle_thunk): Adjust.
5612         * method.c (make_thunk): Adjust.
5613         (finish_thunk): Adjust.
5614         (thunk_adjust): Remove assert.
5615         (use_thunk): Use THUNK_TARGET
5616         * dump1.c (cp_dump_tree): Adjust thunk dumping.
5617
5618         PR c++/9054
5619         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
5620         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
5621
5622 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5623
5624         Remove traditional C constructs 4/n.
5625         * decl2.c (grok_method_quals, warn_if_unknown_interface,
5626         grok_x_components, cp_build_parm_decl, build_artificial_parm,
5627         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
5628         delete_sanity, check_member_template, check_java_method,
5629         check_classfn, finish_static_data_member_decl, grokfield,
5630         grokbitfield, grokoptypename, grok_function_init,
5631         cplus_decl_attributes, constructor_name, defer_fn,
5632         build_anon_union_vars, finish_anon_union, coerce_new_type,
5633         coerce_delete_type, comdat_linkage, maybe_make_one_only,
5634         key_method, import_export_vtable, import_export_class,
5635         output_vtable_inherit, import_export_decl, import_export_tinfo,
5636         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
5637         set_guard, start_objects, finish_objects,
5638         start_static_storage_duration_function,
5639         finish_static_storage_duration_function, get_priority_info,
5640         start_static_initialization_or_destruction,
5641         finish_static_initialization_or_destruction,
5642         do_static_initialization, do_static_destruction,
5643         prune_vars_needing_no_initialization, write_out_vars,
5644         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
5645         add_using_namespace, merge_functions, ambiguous_decl,
5646         lookup_using_namespace, lookup_using_namespace,
5647         qualified_lookup_using_namespace, set_decl_namespace,
5648         decl_namespace, current_decl_namespace, push_decl_namespace,
5649         pop_decl_namespace, push_scope, pop_scope, add_function,
5650         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
5651         lookup_arg_dependent, do_namespace_alias,
5652         validate_nonmember_using_decl, do_nonmember_using_decl,
5653         do_toplevel_using_decl, do_local_using_decl,
5654         do_class_using_decl, do_using_directive, check_default_args,
5655         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
5656         * parser.c (cp_parser_class_head): Use booleanss.
5657         * decl.c (walk_globals, walk_vtables): Likewise.
5658         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
5659         walk_globals): Change return type from 'int' to 'bool'.
5660         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
5661         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
5662         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
5663         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
5664         qualifier_flags, tinfo_base_init, generic_initializer,
5665         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
5666         dfs_class_hint_unmark, class_hint_flags, class_initializer,
5667         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
5668         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
5669         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
5670         * repo.c (repo_compile_flags, repo_template_declared,
5671         repo_template_defined, repo_class_defined, repo_get_id,
5672         repo_template_used, repo_vtable_used, repo_inline_used,
5673         repo_tinfo_used, repo_template_instantiated, extract_string,
5674         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
5675         finish_repo): Likewise.
5676         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
5677         cxx_print_xnode): Likewise..
5678         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
5679         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
5680         * cxxfilt.c (demangle_it, print_demangler_list, usage,
5681         standard_symbol_characters, hp_symbol_characters, main, fatal):
5682         Likewise.
5683         (strip_underscore):  Change type from 'int' to 'bool'.
5684         (main): Use boolean constants.
5685
5686 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5687
5688         Remove traditional C constructs 3/n.
5689         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
5690         build_up_reference, warn_ref_binding, convert_to_reference,
5691         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
5692         convert_to_void, convert, convert_force, build_type_conversion,
5693         build_expr_type_conversion, type_promotes_to,
5694         perform_qualification_conversions): Use C90 prototyping style.
5695         * decl2.c (grok_array_decl): Use boolean constant.
5696         (delete_sanity): Likewise.
5697         * typeck.c (build_unary_op): Likewise.
5698         * semantics.c (finish_switch_cond): Likewise.
5699         * parser.c (cp_parser_direct_new_declarator): Likewise.
5700         * init.c (build_new): Likewise.
5701
5702 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
5703
5704         * Make-lang.in (po-generated): Remove parse.c.
5705         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
5706         ($(srcdir)/cp/parse.h): Remove target.
5707         ($(srcdir)/cp/parse.c): Likewise.
5708         (gt-cp-parse.h): Likewise.
5709         (gt-cp-parser.h): New target.
5710         (c++.distclean): Do not remove parse.output.
5711         (c++.maintainer-clean): Do not remove parse.c or parse.h.
5712         (cp/spew.o): Remove target.
5713         (cp/lex.o): Adjust dependencies.
5714         (cp/pt.o): Likewise.
5715         (cp/parse.o): Likewise.
5716         (cp/TAGS): Do not mention parse.c.
5717         (cp/parser.o): New target.
5718         * NEWS: Mention the new parser.
5719         * call.c (build_scoped_method_call): Simplify.
5720         (build_method_call): Likewise.
5721         (build_new_function_call): Adjust calls to add_function_candidate
5722         and add_template_candidate.
5723         (build_new_op): Improve handling of erroroneous operands.
5724         (convert_default_arg): Remove circular argument processing.
5725         (name_as_c_string): New function.
5726         (build_new_method_call): Use it.
5727         (perform_implicit_conversion): Use error_operand_p.
5728         * class.c (finish_struct_anon): Use constructor_name_p.
5729         (check_field_decls): Likewise.
5730         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
5731         (resolve_address_of_overloaded_function): Likewise.
5732         (instantiate_type): Tweak pointer-to-member handling.
5733         (get_primary_binfo): Remove incorrect assertion.
5734         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
5735         * cp-tree.h (DEFARG_TOKENS): New macro.
5736         (default_arg): New structure.
5737         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
5738         (lang_tree_node): Add default_arg.
5739         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
5740         (type_info_ref_type): New macro.
5741         (saved_scope): Make processing_explicit_instantiation a boolean.
5742         (check_access): New field.
5743         (unparsed_text): Remove.
5744         (language_function): Remove unparsed_inlines.
5745         (error_operand_p): New macro.
5746         (lang_decl): Adjust pending_inline_info.
5747         (DEFARG_POINTER): Remove.
5748         (tag_types): Add typenames.
5749         (lookup_ualified_name): Declare.
5750         (lookup_name_real): Likewise.
5751         (shadow_tag): Adjust prototype.
5752         (get_scope_of_declarator): Declare it.
5753         (process_next_inline): Remove it.
5754         (check_for_missing_semicolon): Likewise.
5755         (maybe_get_template_decl_from_type_decl): Declare it.
5756         (finish_label_stmt): Adjust prototype.
5757         (finish_non_static_data_meber): Declare it.
5758         (finish_pseudo_destructor_call_expr): Rename to ...
5759         (finish_pseudo_destructor_expr): ... this.
5760         (finish_compound_literal): Declare it.
5761         (begin_inline_definitions): Remove it.
5762         (init_spew): Remove.
5763         (peekyylex): Likewise.
5764         (arbitrate_lookup): Likewise.
5765         (frob_opname): Likewise.
5766         (maybe_snarf_defarg): Likewise.
5767         (add_defarg_fn): Likewise.
5768         (do_pending_defargs): Likewise.
5769         (done_pending_defargs): Likewise.
5770         (unprocessed_defarg_fn): Likewise.
5771         (replace_defarg): Likewise.
5772         (end_input): Likewise.
5773         (get_overloaded_fn): Likewise.
5774         * cvt.c (convert_to_reference): Improve error handling.
5775         * decl.c (lookup_name_real): Do not declare it static.
5776         (maybe_push_to_top_level): Set check_access.
5777         (identifier_type_value): Adjust call to lookup_name_real.
5778         (lookup_qualified_name): New method.
5779         (lookup_name_real): Remove special-case parsing code.
5780         (lookup_name-nonclass): Adjust call to lookup_name_real.
5781         (lookup_name_namespace_only): Likewise.
5782         (lookup_name): Likewise.
5783         (check_tag_decl): Return the type declared.
5784         (shadow_tag): Likewise.
5785         (register_dtor_fn): Tweak check_access.
5786         (grokfndecl): Use constructor_name_p.
5787         (get_scope_of_declarator): New function.
5788         (grokdeclarator): Obscure tweaks for slightly different declarator
5789         representations.
5790         (start_method): Return error_mark_node to indicate failure.
5791         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
5792         * decl2.c (constructor_name_full): Simplify.
5793         (constructor_name): Use it.
5794         (build_expr_from_tree): Adjust for changes to do new parser.
5795         (push_scope): Improve robustness.
5796         (validate_nonmember_using_decl): Process declarations, not names.
5797         (do_class_using_decl): Likewise.
5798         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
5799         here.
5800         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
5801         * expr.c (cxx_expand_expr): Handle BASELINKs.
5802         * init.c (member_init_ok_or_else): Issue more errors.
5803         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
5804         * lex.c: Do not include parse.h.
5805         (yypring): Do not declare.
5806         (yylval): Likewise.
5807         (make_reference_declarator): Remove error-generating code.
5808         (rid_to_yy): Remove.
5809         (cxx_init): Do not call init_spew.
5810         (yypring): Remove.
5811         (check_for_missing_semicolon): Remove.
5812         * lex.h (got_scope): Remove.
5813         (got_object): Remove.
5814         * method.c (hack_identifier): Use finish_non_static_data_member.
5815         (implicitly_declare_fn): Adjust use of constructor_name.
5816         * parser.c: New file.
5817         * pt.c (parse.h): Do not include it.
5818         (maybe_get_template_decl_from_template): Do not declare it.
5819         (finish_member_template_decl): Tweak.
5820         (begin_explicit_instantiation): Adjust for
5821         processing_explicit_instantiation being boolean.
5822         (end_explicit_instantiation): Likewise.
5823         (maybe_process_partial_specialization): Tighten specialization
5824         test.
5825         (retrieve_local_specialization): Adjust ue of hash table.
5826         (eq_local_specializations): New function.
5827         (register_local_specialization): Likewise.
5828         (push_template_decl_real): Remove unnecessary test.
5829         (maybe_get_template_decl_from_type_decl): Don't make it static.
5830         (for_each_template_parm_r): Handle TYPEOF_TYPE.
5831         (tsubst_copy): Use retrieive_local_specialization to handle
5832         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
5833         Handle COMPONENT_REFs with pseudo-destructor-expressions.
5834         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
5835         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
5836         (unify): Tweak handling of CONST_DECLs.
5837         (regenerate_decl_from_template): Use push_nested_class.
5838         (template_for_substitution): New funciton.
5839         (instantiate_decl): Use it.  Register parameters as local
5840         specializations.
5841         * rtti.c (init_rtti_processing): Set type_info_ref_type.
5842         (build_typeid): Use it.
5843         (get_typeid): Likeise.
5844         * search.c (accessible_p): Use check_access, not
5845         flag_access_control.
5846         (adjust_result_of_qualified_name_lookup): Pay attention to the
5847         context_class.
5848         * semantics.c (finish_asm_stmt): Adjust error handling.
5849         (finish_label_stmt): Return the statement.
5850         (finish_non_static_data_member): New function.
5851         (finish_class_expr): Handle BASELINKs.
5852         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
5853         (finish_object_call_expr): Simplify handling during templates.
5854         (finish_pseudo_destructor_call_expr): Rename to ...
5855         (finish_pseudo_dtor_expr): ... this.
5856         (finish_compound_literal): New function.
5857         (begin_inline_definitions): Remove.
5858         (finish_sizeof): Remove special template handling.
5859         * spew.c: Do not include parse.h.
5860         * tree.c (get_overloaded_fn): Remove.
5861         * typeck.c (build_class_member_access_expr): Handle
5862         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
5863         (lookup_destructor): New function.
5864         (finish_class_member_access_expr): Use it.
5865         (convert_arguments): Simplify.
5866         (build_unary_op): Handle BASELINKs.
5867
5868 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
5869
5870         PR c++/4803
5871         * decl2.c (mark_used): Defer inline functions.
5872         (finish_file): Merge deferred_fns loops. Check all used
5873         inline functions have a definition.
5874         * method.c (make_thunk): Thunks are not inline.
5875
5876         PR c++/5116, c++/764
5877         * call.c (build_new_op): Make sure template class operands are
5878         instantiated.
5879
5880 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
5881
5882         PR C++/7964
5883         * cp-tree.h (resolve_scoped_fn_name): Prototype.
5884         * call.c (resolve_scoped_fn_name): New function. Deal with
5885         more template expansion. Broken out of ...
5886         * parse.y (parse_finish_call_expr): ... here. Call it.
5887         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
5888         resolve_scoped_fn_name and build_call_from_tree.
5889
5890         PR c++/9053
5891         * decl.c (duplicate_decls): Templates may be disambiguated by
5892         return type.
5893
5894         PR c++/8702
5895         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
5896         conversion operators on failure.
5897
5898 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5899
5900         Remove traditional C constructs 2/n.
5901         * call.c (tourney, build_field_call, equal_functions, joust,
5902         compare_ics, build_over_call, build_java_interface_fn_ref,
5903         convert_like_real, op_error, build_object_call, resolve_args,
5904         build_vfield_ref, check_dtor_name, build_scoped_method_call,
5905         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
5906         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
5907         standard_conversion, reference_related_p,
5908         reference_compatible_p, convert_class_to_reference,
5909         direct_reference_binding, reference_binding,
5910         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
5911         add_template_conv_candidate, any_viable, any_strictly_viable,
5912         build_this, splice_viable, print_z_candidates,
5913         build_user_type_conversion, build_new_function_call,
5914         conditional_conversion, build_conditional_expr, build_new_op,
5915         build_op_delete_call, enforce_access, call_builtin_trap,
5916         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
5917         convert_default_arg, type_passed_as, convert_for_arg_passing,
5918         in_charge_arg_for_name, is_properly_derived_from,
5919         maybe_handle_implicit_object, maybe_handle_ref_bind,
5920         source_type, add_warning, can_convert, can_convert_arg,
5921         perform_implicit_conversion, can_convert_arg_bad,
5922         initialize_reference, add_conv_candidate,
5923         add_template_candidate_real, add_template_candidate): Ansify.
5924
5925 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
5926
5927         PR c++/8572
5928         * cp-tree.h (grokoptypename): Add SCOPE parameter.
5929         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
5930         if in a template scope.
5931         * parse.y (unoperator): Return the scope.
5932         (operator_name): Adjust grokoptypename call.
5933
5934 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5935
5936         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
5937         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
5938         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
5939
5940 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
5941
5942         * ChangeLog: Fix a typo.
5943         * class.c: Fix comment typos.
5944         * cp-tree.h: Likewise.
5945
5946 2002-12-18  Jason Merrill  <jason@redhat.com>
5947
5948         Handle anonymous unions at the tree level.
5949         C++ ABI change: Mangle anonymous unions using the name of their
5950         first named field (by depth-first search).  Should not cause
5951         binary compatibility problems, though, as the compiler previously
5952         didn't emit anything for affected unions.
5953         * cp-tree.def (ALIAS_DECL): New tree code.
5954         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
5955         first field, not the largest.
5956         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
5957         push the decl, and write it out at namespace scope.
5958         * decl.c (lookup_name_real): See through an ALIAS_DECL.
5959         (pushdecl): Add namespace bindings for ALIAS_DECLs.
5960         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
5961         of a decl which doesn't have one.
5962         * typeck.c (build_class_member_access_expr): Don't recurse if
5963         we already have the type we want.
5964
5965 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5966
5967         PR c++/8099
5968         * friend.c (make_friend_class): Allow partial specialization
5969         when declaration is not a template friend.
5970
5971 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5972
5973         PR c++/3663
5974         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
5975         TREE_PROTECTED to created decl nodes.
5976
5977 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
5978
5979         * class.c (build_base_field): Do not set DECL_PACKED on the
5980         FIELD_DECL.
5981
5982 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5983
5984         * cp-tree.h (struct tree_srcloc): Use location_t.
5985         (SOURCE_LOCUS): New.
5986         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
5987
5988 2002-12-17  Jason Merrill  <jason@redhat.com>
5989
5990         * decl.c (finish_function): Also complain about no return in
5991         templates.
5992         * semantics.c (finish_return_stmt): Also call check_return_expr in
5993         templates.
5994         * typeck.c (check_return_expr): In a template, just remember that we
5995         saw a return.
5996
5997 2002-12-16  Jason Merrill  <jason@redhat.com>
5998
5999         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
6000         of the CALL_EXPR.
6001
6002         * semantics.c (do_pushlevel): Call pushlevel after adding the
6003         SCOPE_STMT.
6004         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
6005         * parse.y (function_body): Go back to using compstmt.
6006         * decl.c (pushdecl): Skip another level to get to the parms level.
6007
6008         * call.c (build_new_method_call): Use is_dummy_object to determine
6009         whether or not to evaluate the object parameter to a static member
6010         function.
6011
6012 2002-12-14  Jason Merrill  <jason@redhat.com>
6013
6014         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
6015         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
6016         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
6017         don't bother with an AGGR_INIT_EXPR.
6018         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
6019         just generate a new decl normally.  Take return slot parm.
6020         * cp-tree.h: Adjust prototype.
6021
6022 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6023
6024         PR C++/8031
6025         * cvt.c (convert_to_pointer_force): Don't try comparing against
6026         erronous type.
6027
6028 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
6029
6030         * cp-tree.h: Have the multiple-include guards around
6031         the entire file.
6032
6033 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
6034
6035         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
6036         for SPEW_DEBUG.
6037         (snarf_method): Same.
6038         (snarf_defarg): Same.
6039
6040 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
6041
6042         PR c++/8372
6043         * pt.c (tsubst_copy): Handle destructor names more correctly.
6044
6045 2002-12-10  Matt Austern   <austern@apple.com>
6046
6047         * cp-tree.h: get rid of needs_virtual_reinit bit.
6048
6049 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
6050
6051         * NEWS: Document removal of in-class initialization extension for
6052         static data members of non-arithmetic, non-enumeration type.
6053         * decl.c (check_static_variable_definition): Do not allow that
6054         extension.
6055         * decl2.c (grokfield): Do not call digest_init when processing
6056         templates.
6057
6058 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6059
6060         * error.c (dump_expr): Fix format specifier warning.
6061
6062 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
6063
6064         * class.c (finish_struct_1): Correct comment.
6065         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
6066
6067 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6068
6069         PR C++/8799
6070         * error.c (dump_expr): Don't ever try to dump a non-existent
6071         expression.
6072
6073 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
6074
6075         Implement covariant returns.
6076         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
6077         (struct lang_decl_flags): Add this_thunk_p flag.
6078         Rename vcall_offset to virtual_offset.
6079         (struct lang_decl): Rename delta to fixed_offset.
6080         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
6081         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
6082         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
6083         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
6084         (make_thunk): Add this_adjusting arg.
6085         (finish_thunk): Declare.
6086         (mangle_thunk): Add this_adjusting arg.
6087         * class.c (get_vcall_index): Use base function for lookup.
6088         (update_vtable_entry_for_fn): Generate covariant thunk.
6089         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
6090         (build_vtbl_initializer): Use base function for lookup.
6091         Finish covariant thunk here. Adjust thunk generation.
6092         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
6093         Adjust thunk dumping.
6094         * mangle.c (mangle_call_offset): New function.
6095         (mangle_thunk): Adjust for covariant thunks.
6096         * method.c (make_thunk): Adjust. Do not set name here.
6097         (finish_thunk): New function. Set name here.
6098         (use_thunk): Generate covariant thunks too.
6099         (thunk_adjust): New function.
6100         * search.c (covariant_return_p): Remove. Fold into ...
6101         (check_final_overrider): ... here. Simplify.
6102         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
6103
6104 2002-12-03  Jason Merrill  <jason@redhat.com>
6105
6106         PR c++/8674
6107         * call.c (build_over_call): Check specifically for TARGET_EXPR
6108         when eliding.
6109
6110         PR c++/8461, c++/8625
6111         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
6112         (cp_convert_parm_for_inlining): Remove.
6113         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6114         Remove.
6115         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
6116         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
6117
6118         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
6119         an ambiguous conversion.
6120
6121 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
6122
6123         PR c++/8688
6124         * decl.c (reshape_init): Handle erroneous initializers.
6125
6126 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
6127
6128         PR c++/8720
6129         * spew.c (remove_last_token): Make sure that last_chunk is set
6130         correctly.
6131
6132         PR c++/8615
6133         * error.c (dump_expr): Handle character constants with
6134         TREE_OVERFLOW set.
6135
6136 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6137
6138         DR 180
6139         * decl.c (grokdeclarator): Require class-key for all friend class.
6140         Output the correct type and context in the error message.
6141
6142 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
6143
6144         PR c++/5919
6145         * pt.c (unify): Use variably_modified_type_p to test validity of
6146         template argument types.
6147
6148         PR c++/8727
6149         * cp-tree.h (lang_type_class): Add typeinfo_var.
6150         (CLASSTYPE_TYPEINFO_VAR): New macro.
6151         * rtti.c (get_tinfo_decl): Use it.
6152
6153         PR c++/8663
6154         * init.c (expand_member_init): Always get the main variant of a
6155         base class.
6156
6157 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
6158
6159         PR c++/8332
6160         PR c++/8493
6161         * decl.c (cxx_init_decl_processing): Use size_type_node, not
6162         c_size_type_node.
6163         * decl2.c (coerce_new_type): Likewise.
6164         * except.c (do_allocate_exception): Likewise.
6165
6166 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
6167
6168         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
6169         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
6170         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
6171         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6172         typeck2.c: Include coretypes.h and tm.h.
6173         * Make-lang.in: Update dependencies.
6174
6175 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
6176
6177         PR c++/8227
6178         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
6179         (check_initializer): Validate the type of the initialized
6180         variable, even if the initializer is absent.
6181         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
6182
6183         PR c++/8214
6184         * typeck.c (convert_for_assignment): Do not use
6185         decl_constant_value on the operand.
6186
6187         PR c++/8511
6188         * pt.c (instantiate_decl): Handle template friends defined outside
6189         of the class correctly.
6190
6191 2002-11-29  Joe Buck <jbuck@synopsys.com>
6192
6193         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
6194         anonymous structs.
6195
6196 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
6197
6198         * class.c (walk_subobject_offsets): Recur on binfos as well as on
6199         types.
6200         (layout_nonempty_base_or_field): Pass it a binfo when processing a
6201         base class.
6202         (layout_empty_base): Likewise.
6203         (build_base_field): Likewise.
6204
6205 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
6206
6207         * class.c (build_base_field): Make sure we get the canonical base
6208         when descending through primary bases.
6209
6210 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
6211
6212         * decl.c (check_initializer): Don't error on initialisation of
6213         a scalar with a brace-enclosed expression.
6214
6215 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
6216
6217         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
6218         (template_parms_equal): Remove prototype.
6219         * typeck.c (buuld_indirect_ref): Reformat.
6220
6221 2002-11-25  Jason Merrill  <jason@redhat.com>
6222
6223         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
6224         and a DO_STMT.
6225
6226 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
6227
6228         * tree.c (cp_build_qualified_type_real): Correct handling of
6229         array types.
6230         * class.c (walk_subobject_offsets): Fix thinko.
6231         (build_base_field): Record offsets of empty bases in primary
6232         virtual bases.
6233         (layout_class_type): Record offsets of empty bases in fields.
6234
6235         * search.c (is_subobject_of_p_1): Fix thinko.
6236         (lookup_field_queue_p): Likewise.
6237
6238 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
6239
6240         * class.c (layout_class_type): Reuse tail padding when laying out
6241         virtual bases.
6242
6243 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
6244
6245         * rtti.c (qualifier_flags): Fix thinko.
6246
6247 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6248
6249         Remove traditional C constructs 1/n.
6250         * cp-tree.h (init_method, set_mangled_name_for_decl,
6251         build_opfncall, hack_identifier, make_thunk, use_thunk,
6252         synthesize_method, implicitly_declare_fn,
6253         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
6254         maybe_clone_body): Remove use of PARAMS.
6255
6256         * method.c (do_build_assign_ref, do_build_copy_constructor,
6257         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
6258         Likewise.
6259         (synthesize_method): Use 'bool' type and constants instead of
6260         'int'.
6261         (locate_copy): Likewise.
6262         (implicitly_declare_fn): Likewise.
6263
6264         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
6265         Remove old-style declaration.
6266         (maybe_clone_body): Use 'bool' type and constants.
6267
6268 2002-11-21  Glen Nakamura  <glen@imodulo.com>
6269
6270         PR c++/8342
6271         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
6272         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
6273         of the branches of a COND_EXPR.
6274
6275 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
6276
6277         * pt.c (for_each_template_parm): Free allocated memory.
6278         * search.c (is_subobject_of_p_1): New function.
6279         (is_subobject_of_p): Avoid walking virtual bases multiple times.
6280
6281 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
6282
6283         * g++spec.c (lang_specific_spec_functions): New.
6284
6285 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
6286
6287         * ChangeLog: Follow spelling conventions.
6288         * class.c: Likewise.
6289         * decl2.c: Likewise.
6290
6291 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
6292
6293         * search.c (dfs_push_decls): Do not try to reorder elements
6294         3..n of method_vec if method_vec has only two elements.
6295         Reverse order of two tests to avoid accessing unallocated
6296         memory.
6297
6298 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
6299
6300         * class.c (dfs_find_final_overrider): Adjust so that the most
6301         derived object is a binfo, rather than a class type.
6302         (find_final_overrider): Likewise.
6303         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
6304         (add_vcall_offset): Likewise.
6305
6306 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6307
6308         PR c++/8389
6309         * pt.c (instantiate_template): Push class scope for member
6310         functions.
6311         (get_mostly_instantiated_function_type): Likewise.  Don't call
6312         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
6313         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
6314         * mangle.c (write_encoding, write_unqualified_name): Adjust.
6315
6316 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
6317
6318         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
6319         vcall offfsets.  Split out ...
6320         (add_vcall_offset): ... new function.
6321
6322         PR c++/8338
6323         * pt.c (for_each_template_parm): Add htab parameter.
6324         (process_partial_specialization): Adjust call.
6325         (push_template_decl_real): Likewise.
6326         (pair_fn_data): Add visited.
6327         (for_each_template_parm_r): Avoid walking duplicates more than
6328         once.
6329         (uses_template_parms): Adjust call to for_each_template_parm.
6330
6331 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
6332
6333         * class.c (add_implicitly_declared_members): Put implicitly
6334         declared functions at the end of TYPE_METHODs when -fabi-version
6335         is at least 2.
6336
6337 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
6338
6339         * decl2.c (finish_file): Correct spelling.
6340
6341 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
6342
6343         * call.c (build_special_member_call): Do not try to lookup VTTs by
6344         name.
6345         * class.c (vtbl_init_data): Add generate_vcall_entries.
6346         (get_vtable_decl): Do not look up virtual tables by name.
6347         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
6348         (set_primary_base): Do not set CLASSTYPE_RTTI.
6349         (determine_primary_base): Likewise.
6350         (get_matching_virtual): Remove.
6351         (get_vcall_index): New function.
6352         (update_vtable_entry_for_fn): Do not try to use virtual thunks
6353         when they are not required.  Assign vcall indices at this point.
6354         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
6355         Do update dynamic_classes.
6356         (build_vtt): Do not add VTTs to the symbol table.
6357         (build_ctor_vtbl_group): Likewise.
6358         (build_vtbl_initializer): Simplify handling of vcall indices.
6359         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
6360         for the most derived class.
6361         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
6362         the vtable.
6363         * cp-tree.h (dynamic_classes): New macro.
6364         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
6365         (CLASSTYPE_RTTI): Remove.
6366         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
6367         (CLASSTYPE_VCALL_INDICES): New macro.
6368         (CLASSTYPE_VTABLES): Likewise.
6369         (BV_USE_VCALL_INDEX_P): Remove.
6370         (build_vtable_path): Remove.
6371         * decl2.c (finish_vtable_vardecl): Remove.
6372         (key_method): Remove #if 0'd code.
6373         (finish_vtable_vardecl): Rename to ...
6374         (maybe_emit_vtables): ... this.
6375         (finish_file): Use it.
6376         * search.c (look_for_overrides_here): Update comment.
6377
6378 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
6379
6380         PR c/7353 redux
6381         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
6382
6383 2002-10-30  Jason Merrill  <jason@redhat.com>
6384
6385         PR c++/8186
6386         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
6387         * call.c (convert_for_arg_passing): Set it.
6388         * except.c (stabilize_throw_expr): Recurse for such an arg.
6389
6390 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
6391
6392         * cp-tree.h (lang_decl_flags): Remove init_priority.
6393         (lang_decl): Add delta.
6394         (GLOBAL_INIT_PRIORITY): Remove.
6395         (THUNK_DELTA): Revise definition.
6396         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
6397         * dump.c (cp_dump_tree): Don't dump it.
6398
6399 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
6400
6401         PR c++/8160
6402         * typeck2.c (process_init_constructor): Call complete_array_type.
6403
6404         PR c++/8149
6405         * decl.c (make_typename_type): Issue errors about invalid results.
6406
6407 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6408
6409         Core issue 287, PR c++/7639
6410         * cp-tree.h (lang_type_class): Add decl_list field.
6411         (CLASSTYPE_DECL_LIST): New macro.
6412         (maybe_add_class_template_decl_list): Add declaration.
6413         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
6414         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
6415         (maybe_add_class_template_decl_list): New function.
6416         (add_implicitly_declared_members): Use it.
6417         * decl.c (maybe_process_template_type_declaration): Likewise.
6418         (pushtag): Likewise.
6419         * friend.c (add_friend): Likewise.
6420         (make_friend_class): Likewise.
6421         * semantics.c (finish_member_declaration): Likewise.
6422         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
6423         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
6424         to process members and friends in the order of declaration.
6425
6426 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
6427
6428         PR c++/8287
6429         * decl.c (finish_destructor_body): Create the label to jump to
6430         when returning from a destructor here.
6431         (finish_function_body): Rather than here.
6432
6433 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
6434
6435         PR c++/7266
6436         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
6437         SCOPE_REF is not null before dereferencing it.
6438
6439 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
6440
6441         * call.c (build_over_call): Use DECL_CONTEXT, not
6442         DECL_VIRTUAL_CONTEXT.
6443         * class.c (modify_vtable_entry): Don't mess with
6444         DECL_VIRTUAL_CONTEXT.
6445         (set_vindex): Remove.
6446         (set_primary_base): Remove vfuns_p parameter.
6447         (determine_primary_base): Likewise.
6448         (modify_all_vtables): Likewise.
6449         (layout_class_type): Likewise.  Adjust calls to other functions
6450         accordingly.
6451         (finish_struct_1): Adjust calls to modified functions.  Set
6452         DECL_VINDEX here.
6453         * cp-tree.h (lang_type_class): Remove vsize.
6454         (CLASSTYPE_VSIZE): Remove.
6455         (lang_decl): Remove thunks.
6456         (DECL_THUNKS): Adjust.
6457         (DECL_VIRTUAL_CONTEXT): Remove.
6458         (duplicate_decls): Don't copy it.
6459         * pt.c (build_template_decl): Don't set it.
6460         (tsubst_decl): Likewise.
6461         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
6462
6463         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
6464         (build_vtable_entry): Remove.
6465         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
6466         (lang_decl): Add thunks.
6467         (DECL_THUNKS): New macro.
6468         * decl.c (duplicate_decls): Copy it.
6469         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
6470         * semantics.c (emit_associated_thunks): Simplify.
6471
6472 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
6473
6474         PR c++/7228
6475         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
6476         lang_type structure exists before accessing field.
6477         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
6478         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
6479         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
6480         * class.c (check_field_decls): Use new macros.
6481         * typeck2.c (process_init_constructor): Remove redundant check for
6482         existence of lang_type structure.
6483
6484 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
6485
6486         * class.c (end_of_base): New method.
6487         (end_of_class): Use it.  Check indirect virtual bases.
6488
6489         * class.c (check_field_decls): Fix typo.
6490
6491 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
6492
6493         PR c++/8067
6494         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
6495         related variables.
6496
6497         PR c++/7679
6498         * spew.c (next_token): Do not return an endless stream of
6499         END_OF_SAVED_INPUT tokens.
6500         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
6501         the cached token stream.
6502         (snarf_defarg): Likewise.
6503
6504 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
6505
6506         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
6507         variably_modified_type_p.
6508         * cp-tree.h: Remove prototype of variably_modified_type_p.
6509         * tree.c (variably_modified_type_p): Remove; now implemented
6510         in language-independent code.
6511
6512 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
6513
6514         PR c++/6579
6515         * spew.c (snarf_parenthesized_expression): New function.
6516         (snarf_block): Use it.
6517
6518 2002-10-22  Richard Henderson  <rth@redhat.com>
6519
6520         * method.c (use_thunk): Always compute vcall_value; assert that
6521         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
6522         for vcall thunks as well.
6523
6524 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
6525
6526         * class.c (empty_base_at_nonzero_offset_p): New function.
6527         (layout_nonempty_base_or_field): Do not check for conflicts when
6528         laying out a virtual base using the GCC 3.2 ABI.
6529         (build_base_field): Correct checking for presence of empty classes
6530         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
6531
6532         * class.c (include_empty_classes): Use normalize_rli.
6533         (layout_class_type): Likewise.
6534
6535         * decl.c (reshape_init): Tweak handling of character arrays.
6536
6537         PR c++/8218
6538         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
6539         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
6540         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
6541         (check_field_decls): Likewise.
6542         (layout_class_type): Likewise.
6543         (finish_struct_1): Initialize it.
6544         (walk_subobject_offsets): Use it to prune searches.
6545
6546 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
6547
6548         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
6549         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
6550         TARGET_ASM_OUTPUT_MI_THUNK in comments.
6551
6552 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
6553
6554         * decl.c (start_decl): Point users of the old initialized-
6555         typedef extension at __typeof__.
6556
6557 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
6558
6559         * Make-lang.in (method.o): Depend on TARGET_H.
6560         * method.c (target.h): Include it.
6561         (use_thunk): Use target hooks.  Use vcall thunks, if available.
6562
6563 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
6564
6565         * class.c (base_derived_from): Make sure return value is a bool.
6566
6567 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
6568
6569         * class.c (find_final_overrider_data_s): Remove overriding_fn and
6570         overriding_base.
6571         (dfs_base_derived_from): New function.
6572         (base_derived_from): Likewise.
6573         (dfs_find_final_overrider): Use base_derived_from.
6574         (find_final_overrider): Adjust.
6575
6576 2002-10-18  Jason Merrill  <jason@redhat.com>
6577
6578         PR c++/8080
6579         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
6580         with condition decls in a template.
6581
6582 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
6583
6584         * class.c (add_method): Compare template parms too.
6585
6586 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
6587
6588         PR c++/7584
6589         * class.c (handle_using_decl): Allow the declaration used to be
6590         from an ambiguous base.
6591
6592         * pt.c (convert_template_argument): Revert this change:
6593                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
6594                 * pt.c (convert_template_argument): Do not fold non-type
6595                 template rguments when inside a template.
6596
6597         * init.c (expand_default_init): Handle brace-enclosed initializers
6598         correctly.
6599
6600 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
6601
6602         * mangle.c (write_expression): Correct handling of enumeration
6603         constants.
6604         (write_template_arg): Likewise.
6605         * pt.c (convert_template_argument): Do not fold non-type template
6606         arguments when inside a template.
6607
6608         PR c++/7478
6609         * cvt.c (convert_to_reference): Allow references as the incoming
6610         type.
6611
6612 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
6613
6614         PR c++/7524
6615         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
6616         build_qualified_type.
6617
6618 2002-10-15  Richard Henderson  <rth@redhat.com>
6619
6620         * error.c (dump_expr): Use real_to_decimal directly, and with
6621         the new arguments.
6622
6623 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
6624
6625         * decl.c (reshape_init): Fix typo.
6626
6627         * cp-tree.h (operator_name_info_t): Add arity.
6628         * lex.c (init_operators): Initialize it.
6629         * mangle.c (write_conversion_operator_name): New function.
6630         (write_unqualified_name): Use it.
6631         (write_template_args): Accept template arguments as a TREE_LIST.
6632         (write_expression): Adjust handling of qualified names to match
6633         specification.
6634
6635 2002-10-15  Jason Merrill  <jason@redhat.com>
6636
6637         * call.c (call_builtin_trap): New fn.
6638         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
6639         (build_call): Don't set current_function_returns_abnormally outside
6640         a function.
6641
6642 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
6643
6644         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
6645         clear CLASSTYPE_EMPTY_P.
6646         (build_base_field): Likewise.
6647         (build_base_fields): Likewise.
6648         (check_bases_and_members): Likewise.
6649         (create_vtbl_ptr): Likewise.
6650         (layout_class_type): Likewise.  Ensure that empty classes have
6651         size zero when used as base classes in the 3.2 ABI.
6652         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
6653         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
6654         parameter.
6655         (is_empty_class): Correct definition when using post-3.2 ABI.
6656         * cp-tree.h (lang_type_class): Add empty_p.
6657         (CLASSTYPE_EMPTY_P): New macro.
6658
6659 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
6660
6661         * init.c (build_delete): Do not apply save_expr for arrays.
6662         (build_vec_delete): Likewise.
6663
6664 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
6665
6666         * decl.c (layout_var_decl): Call layout_decl even for variables
6667         whose type is an array with unspecified bounds.
6668
6669         PR c++/7176
6670         * lex.c (do_identifier): Add another option for the parsing
6671         parameter.
6672         * parse.y (do_id): Use it.
6673
6674 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6675
6676         PRs C++/6803, C++/7721 and C++/7803
6677         * decl.c (grokdeclarator): Gracefully handle template-name as
6678         decl-specifier.
6679
6680 2002-10-11  Jason Molenda  <jmolenda@apple.com>
6681
6682         * init.c (build_field_list): Provide uses_unions_p with a default
6683         value.
6684
6685 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
6686
6687         PR c++/5661
6688         * cp-tree.h (variably_modified_type_p): New function.
6689         (grokdeclarator) Tighten check for variably modified types as
6690         fields.
6691         * pt.c (convert_template_argument): Do not allow variably modified
6692         types as template arguments.
6693         * tree.c (variably_modified_type_p): New function.
6694
6695         * NEWS: Document removal of "new X = ..." extension.
6696         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
6697         brace-enclosed initializers.
6698         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
6699         (initialize_local_var): Remove declaration.
6700         (expand_static_init): Likewise.
6701         * decl.c (next_initializable_field): New function.
6702         (reshape_init): Likewise.
6703         (check_initializer): Use them.  Build dynamic initializer for
6704         aggregates here too.
6705         (initialize_local_var): Simplify, and incorporate cleanup
6706         insertion code as well.
6707         (destroy_local_var): Remove.
6708         (cp_finish_decl): Tidy.
6709         (expand_static_init): Fold checks for whether or not a variable
6710         needs initialization into this function.  Simplify.
6711         * decl2.c (do_static_initialization): Simplify.
6712         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
6713         be done for us automatically.
6714         (expand_default_init): Handle brace-enclosed initializers
6715         correctly.
6716         (expand_aggr_init_1): Remove RTL-generation code.
6717         (build_vec_init): Remove "new X = ..." support.
6718         * parse.y (new_initializer): Likewise.
6719         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
6720         brace-enclosed initializer.
6721         (create_pseudo_type_info): Likewise.
6722         * typeck2.c (store_init_value): Don't try to handle digest_init
6723         being called more than once.
6724         (digest_init): Tidy handling of brace-enclosed initializers.
6725
6726 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6727
6728         * decl.c (typename_hash): Use htab_hash_pointer.
6729
6730 2002-10-10  Jim Wilson  <wilson@redhat.com>
6731
6732         * decl.c (duplicate_decls): Don't call decl_attributes.
6733
6734 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
6735
6736         PR c/7353
6737         * decl.c (start_decl): Unconditionally issue error for
6738         'typedef foo = bar'.
6739         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
6740         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
6741
6742 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6743
6744         * decl2.c (prune_vtable_vardecl): Delete unused function.
6745
6746 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
6747
6748         PR c++/7754
6749         * decl2.c (finish_anon_union): Do not expand anonymous unions when
6750         procesing template functions.
6751         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6752         type. Call layout_decl.
6753         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6754
6755 2002-10-07  Richard Henderson  <rth@redhat.com>
6756
6757         * decl2.c, pt.c: Revert c++/7754 fix.
6758
6759 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6760
6761         PR c++/7804
6762         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
6763
6764 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
6765
6766         PR c++/7931
6767         * pt.c (for_each_template_parm_r): Handle BASELINKs.
6768
6769         PR c++/7754
6770         * decl2.c (finish_anon_union): Do not expand anonymous unions when
6771         procesing template functions.
6772         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6773         type. Call layout_decl.
6774         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6775
6776 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
6777
6778         PR c++/8006
6779         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
6780         template parameters.
6781         (globals): Add entity and need_abi_warning.
6782         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
6783         CLASSTYPE_TEMPLATE_INFO.
6784         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
6785         TYPE_TI_TEMPLATE.
6786         (write_prefix): Handle typename types correctly.
6787         (write_template_prefix): Handle template template parameters
6788         correctly.
6789         (start_mangling): Add entity parameter.
6790         (finish_mangling): Warn about names whose mangling will change.
6791         (mangle_decl_string): Adjust.
6792         (mangle_type_string): Likewise.
6793         (mangle_special_for_type): Likewise.
6794         (mangle_ctor_vtbl_for_type): Likewise.
6795         (mangle_thunk): Likewise.
6796         (mangle_guard_variable): Likewise.
6797         (mangle_ref_init_variable): Likewise.
6798
6799 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
6800
6801         PR c++/7188.
6802         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
6803         * cp-tree.h (emit_base_init): Rename to ....
6804         (emit_mem_initializers): ... this.
6805         (expand_member_init): Change prototype.
6806         * init.c (perform_member_init): Compute explicit, rather than
6807         requiring it as a parameter.
6808         (sort_member_init): Rename to ...
6809         (sort_mem_initializers): ... this.  Process bases and data members
6810         together.
6811         (sort_base_init): Remove.
6812         (emit_base_init): Rename to ...
6813         (emit_mem_initializers): ... this.
6814         (expand_aggr_vbase_init_1): Remove.
6815         (construct_virtual_bases): Rename to ...
6816         (construct_virtual_base): ... this.
6817         (expand_member_init): Rework handling of base initializers.
6818         * method.c (do_build_copy_constructor): Use
6819         finish_mem_initializers.
6820         * parse.y (member_init): Adjust calls to expand_member_init.
6821         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
6822         (tsubst_initializer_list): Use expand_member_init.
6823         * semantics.c (finish_mem_intiailizers): Simplify.
6824
6825 2002-10-02  Matt Austern  <austern@apple.com>
6826         * decl.c (walk_vtables_r): Fixed typo that caused result to
6827         never get a nonzero value.
6828
6829 2002-10-02  Roger Sayle  <roger@eyesopen.com>
6830
6831         PR optimization/6627
6832         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
6833         from here, and move it to tree.h.
6834         * decl.c (cxx_init_decl_processing): If storing the vbit
6835         in function pointers, ensure that force_align_functions_log
6836         is atleast one.
6837
6838 2002-10-02  Matt Austern  <austern@apple.com>
6839
6840         * class.c (check_field_decls): Changed warning about const member
6841         variables so that it doesn't get issued for a class aggregate.
6842
6843 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
6844
6845         * decl.c (cp_finish_decl): Make sure array types are laid out,
6846         even if the array bounds are unknown.
6847
6848 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
6849
6850         * class.c (build_vtbl_initializer): Change build_c_cast
6851         to build1.
6852
6853 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
6854
6855         * decl.c (cp_finish_decl): Make sure array types are laid out,
6856         even if the array bounds are unknown.
6857
6858         * decl.c (cp_finish_decl): Correct check for dynamic
6859         initialization of thread-local storage.
6860
6861 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
6862
6863         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
6864         overloaded.
6865
6866 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
6867
6868         * class.c (build_vtbl_initializer): Add cast.
6869         (add_vcall_offset_vtbl_entries_1):
6870         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
6871
6872 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
6873
6874         * class.c (walk_subobject_offsets): Correct the calculation of
6875         offsets for virtual bases.  Correct the counting of array
6876         elements.
6877         (layout_nonempty_base_or_field): Simplify.  Correct the
6878         calculation of offsets to be propagated through the binfo
6879         hierarchy.
6880         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
6881         Add the FIELD_DECL to TYPE_FIELDS.
6882         (build_base_fields): Adjust accordingly.
6883         (layout_virtual_bases): Use build_base_field.
6884         (end_of_class): Return a tree, not an integer.
6885         (warn_about_ambiguous_direct_bases): Rename to ...
6886         (warn_about_ambiguous_bases): ... this.
6887         (include_empty_classes): New function.
6888         (layout_class_type): Create an alternative version of the type to
6889         be used when as a base class type.  Do not call
6890         finish_record_layout until we are done laying out the class.
6891         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
6892         as_base.
6893         (CLASSTYPE_SIZE): Reimplement.
6894         (CLASSTYPE_SIZE_UNIT): Likewise.
6895         (CLASSTYPE_ALIGN): Likweise.
6896         (CLASSTYPE_USER_ALIGN): Likewise.
6897         (CLASSTYPE_AS_BASE): New macro.
6898         (DECL_INITIALIZED_P): Likewise.
6899         (extract_init): Remove prototype.
6900         (build_forced_zero_init): Rename to ...
6901         (build_zero_init): ... this.
6902         (force_store_init_value): Remove.
6903         * decl.c (obscure_complex_init): Remove.
6904         (duplicate_decls): Copy DECL_INITIALIZED_P.
6905         (check_initializer): Do not leave junk in DECL_INITIAL.
6906         (cp_finish_decl): Handle zero-initialization of entities with
6907         static storage duration.
6908         * expr.c (extract_init): Remove.
6909         * init.c (build_forced_zero_init): Remove.
6910         (build_zero_init): New function.
6911         (build_default_init): Use it.
6912         (build_field_list): Skip FIELD_DECLs for base subobjects.
6913         (push_base_cleanups): Likewise.
6914         * method.c (do_build_assign_ref): Likewise.
6915         (synthesize_exception_spec): Likewise.
6916         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
6917         (regenerate_decl_from_template): To not set DECL_INITIAL for a
6918         static data member whose initialization took place in its class.
6919         (instantiate_decl): Do not pass an initializer to cp_finish_decl
6920         in that situation.
6921         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
6922         (dfs_unuse_fields): Likewise.
6923         * tree.c (pod_type_p): Handle error_mark_node.
6924         (zero_init_p): Likewise.
6925         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
6926         subobjects.
6927         * typeck2.c (store_init_value): Remove #if 0'd code.
6928         (force_store_init_value): Remove.
6929         (process_init_constructor): Use build_zero_init.
6930
6931 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
6932
6933         PR c++/7788
6934         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
6935
6936 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
6937
6938         * cp-tree.h: Fix comment typos.
6939         * decl.c: Likewise.
6940         * pt.c: Likewise.
6941
6942 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
6943
6944         * cp/class.c (contains_empty_class_p): New method.
6945         (walk_subobject_offsets): Correct computation of field offset.
6946         (layout_empty_base): Correct placement of emtpy base classes.
6947         (layout_class_type): Warn about ABI changes.
6948
6949 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
6950
6951         * cp/class.c (layout_virtual_bases): Do not round the size of the
6952         type to a multiple of the alignment before laying out virtual bases.
6953         (layout_class_type): Correct handling of bit-fields that are wider
6954         than their type inside unions.  Round the size of the type to a
6955         even number of bytes when computing the size without virtual
6956         bases.
6957         * cp/cp-tree.h (abi_version_at_least): New macro.
6958
6959 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
6960
6961         * ChangeLog: Follow spelling conventions.
6962         * ChangeLog.2: Likewise.
6963         * call.c: Likewise.
6964         * class.c: Likewise.
6965         * cp-tree.h: Likewise.
6966         * cvt.c: Likewise.
6967         * decl.c: Likewise.
6968         * decl2.c: Likewise.
6969         * except.c: Likewise.
6970         * friend.c: Likewise.
6971         * g++spec.c: Likewise.
6972         * init.c: Likewise.
6973         * lex.c: Likewise.
6974         * mangle.c: Likewise.
6975         * method.c: Likewise.
6976         * operators.def: Likewise.
6977         * optimize.c: Likewise.
6978         * pt.c: Likewise.
6979         * rtti.c: Likewise.
6980         * search.c: Likewise.
6981         * semantics.c: Likewise.
6982         * spew.c: Likewise.
6983         * tree.c: Likewise.
6984         * typeck.c: Likewise.
6985
6986 2002-09-18  Devang Patel  <dpatel@apple.com>
6987
6988         * cp/cp-tree.h: New prototype for walk_vtabls().
6989         * cp/decl.c (walk_vtables_r): New function.
6990         (struct cp_binding_level): Add new members, namespaces,
6991         names_size and vtables.
6992         (add_decl_to_level): Add decl in namespaces or vtables
6993         chain, if conditions match.
6994         (walk_vtables): New function.
6995         (walk_namespaces_r): Travers separate namespace chain
6996         for namespace decls.
6997         (wrapup_globals_for_namespace): Use names_size instead
6998         of list_length().
6999         * cp/decl2.c (finish_file): Use walk_vtables() instead of
7000         walk_globals() to walk vtable decls.
7001
7002 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
7003
7004         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
7005         ICE with invalid pointers & references.
7006
7007 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
7008
7009         * Make-lang.in: Remove all references to the demangler.
7010         * cxxfilt.c: Moved to binutils.
7011
7012 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
7013
7014         PR c++/7718
7015         * pt.c (tsubst_decl): Remove assert.
7016
7017         Remove DR 295 implementation.
7018         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
7019         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
7020         about ignoring volatile qualifiers.
7021
7022         * search.c (lookup_member): Correct documentation.
7023
7024 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
7025
7026         * cp-tree.h (union lang_tree_node): Add chain_next option.
7027
7028 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
7029
7030         * parse.y (parse_finish_call_expr): Check lookup_member result.
7031
7032         PR c++/7015
7033         * semantic.c (finish_asm_stmt): Fix operand/output_operands
7034         thinko.
7035         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
7036
7037 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
7038
7039         PR c++/7919
7040         * call.c (build_over_call): Convert this pointer for fns found by
7041         using decls.
7042
7043 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
7044
7045         * ChangeLog: Follow spelling conventions.
7046         * ChangeLog.1: Likewise.
7047
7048 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
7049
7050         PR c++/7768
7051         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
7052
7053 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
7054
7055         * error.c: Fix comment formatting.
7056         * except.c: Likewise.
7057         * expr.c: Likewise.
7058         * friend.c: Likewise.
7059         * g++spec.c: Likewise.
7060         * init.c: Likewise.
7061         * lex.c: Likewise.
7062         * mangle.c: Likewise.
7063         * method.c: Likewise.
7064         * optimize.c: Likewise.
7065         * pt.c: Likewise.
7066         * rtti.c: Likewise.
7067         * search.c: Likewise.
7068         * semantics.c: Likewise.
7069         * spew.c: Likewise.
7070         * tree.c: Likewise.
7071         * typeck.c: Likewise.
7072         * typeck2.c: Likewise.
7073
7074 2002-09-13  Matt Austern  <austern@apple.com>
7075
7076         PR C++/7828
7077         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
7078         * cp/call.c: Change call-by-const-reference mechanism to use
7079         non_cast_lvalue_p when deciding whether the create a temporary.
7080         We need a temporary when passing, e.g. (long) x by const ref.
7081
7082 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
7083
7084         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
7085
7086 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
7087
7088         * decl.c: Fix comment formatting.
7089         * decl2.c: Likewise.
7090
7091 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
7092
7093         * call.c: Fix comment formatting.
7094         * class.c: Likewise.
7095         * cp-lang.c: Likewise.
7096         * cp-tree.h: Likewise.
7097         * cvt.c: Likewise.
7098
7099 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
7100
7101         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
7102         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
7103         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
7104         minor adjustments (use version_string, eliminate yet another
7105         duplicate of xmalloc)
7106
7107 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7108
7109         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
7110
7111 2002-09-05  Jason Merrill  <jason@redhat.com>
7112
7113         * typeck2.c (add_exception_specifier): Only pedwarn for an
7114         incomplete type.
7115         (require_complete_eh_spec_types): New fn.
7116         (cxx_incomplete_type_diagnostic): Also support pedwarning.
7117         * typeck.c (complete_type_or_diagnostic): Likewise.
7118         * call.c (build_call): Call require_complete_eh_spec_types.
7119         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
7120         on an incomplete type.
7121
7122 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
7123
7124         * decl.c (start_cleanup_fn): Clear interface_only before
7125         start_function, restore it afterwards.
7126
7127 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
7128
7129         * cp-tree.h (finish_builtin_type): Remove.
7130         * decl2.c (finish_builtin_type): Move to common code.
7131         * decl.c (build_ptrmemfunc_type): Adjust.
7132         * rtti.c (create_pseudo_type_info): Adjust.
7133         (create_tinfo_types): Adjust.
7134
7135 2002-08-31  Jason Merrill  <jason@redhat.com>
7136
7137         * cp-lang.c (cp_expr_size): Allow initialization from a
7138         CONSTRUCTOR.
7139
7140 2002-08-30  Richard Henderson  <rth@redhat.com>
7141
7142         PR opt/7515
7143         * tree.c: Include target.h.
7144         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
7145         don't bind locally.
7146         * Makefile.in (tree.o): Update.
7147
7148 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
7149
7150         * class.c (layout_virtual_bases): Warn about bugs in G++ that
7151         result in incorrect object layouts.
7152         (layout_class_type): Likewise.
7153
7154 2002-08-24  Matt Austern  <austern@apple.com>
7155
7156         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
7157         are allowable.
7158         (real_lvalue_p): Update caller.
7159         (lvalue_p): Ditto.
7160         (non_cast_lvalue_or_else): New.
7161         * tree.h: Declare it.
7162         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
7163
7164 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
7165
7166         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
7167         and COND_EXPR specially; fix error message output.
7168
7169 2002-08-22  Jason Merrill  <jason@redhat.com>
7170
7171         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
7172         * semantics.c (nullify_returns_r): Likewise.
7173
7174 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7175
7176         Fix PR/7621
7177         * typeck.c (finish_class_member_access_expr): Diagnose cases where
7178         name lookup finds nothing.
7179
7180 2002-08-15  Jason Merrill  <jason@redhat.com>
7181
7182         * semantics.c (finish_then_clause): Remove redundant assignment.
7183         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
7184         extra binding level outside the if/switch statement.
7185         (finish_while_cond, finish_for_cond): Rewrite complex condition
7186         into the loop body.
7187
7188 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
7189
7190         * parse.y (sizeof, alignof, typeof): New non-terminals to
7191         increment skip_evaluation.  Replace terminals with them and
7192         decrement skip_evaluation at the end of rules using them.
7193         * decl2.c (mark_used): Don't assemble_external if
7194         skipping evaluation.
7195
7196 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
7197
7198         Fix PR/7504
7199         * parse.y (parse_finish_call_expr): Handle incomplete
7200         type used to name a scope.
7201
7202 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
7203
7204         PR c++/7598
7205         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
7206         regression caused by my 2002-08-08 patch.
7207
7208 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
7209
7210         * decl.c (pushdecl_class_level): Honor requests to bind names to
7211         OVERLOADs.
7212
7213 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7214
7215         * decl2.c (build_call_from_tree): Fix uninitialized variable.
7216         * parse.y (parse_finish_call_expr): Likewise.
7217         * repo.c (old_args, old_dir, old_main): Const-ify.
7218
7219 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
7220
7221         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
7222         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
7223         * optimize.c (maybe_clone_body): Likewise.
7224         * pt.c (tsubst_enum): Likewise.
7225         (lookup_template_class): Likewise.
7226         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
7227
7228 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
7229
7230         * lang-specs.h: Remove -ansi.
7231
7232 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
7233
7234         * tree.c (maybe_dummy_object): Replace // with /* */
7235
7236 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
7237
7238         * call.c (standard_conversion): Use build_ptrmem_type.
7239         * cp-tree.h (build_ptrmem_type): New function.
7240         (adjust_result_of_qualified_name_lookup): Likewise.
7241         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
7242         static data members.
7243         (build_ptrmem_type): New function.
7244         (grokdeclarator): Do not use build_offset_type when encountering a
7245         qualified name.
7246         * parse.y (parse_finish_call_expr): Use
7247         adjust_result_of_qualified_name_lookup.
7248         * search.c (adjust_result_of_qualified_name_lookup): New function.
7249         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
7250         accessing OFFSET_TYPEs directly.
7251
7252 2002-08-08  Mike Stump  <mrs@apple.com>
7253
7254         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
7255         (type_decays_to): Likewise.
7256         * class.c (find_final_overrider): Likewise.
7257         (maybe_note_name_used_in_class): Likewise.
7258         * decl.c (current_tmpl_spec_kind): Likewise.
7259         (add_binding): Likewise.
7260         (push_class_binding): Likewise.
7261         (duplicate_decls): Likewise.
7262         (layout_var_decl): Likewise.
7263         (grokfndecl): Likewise.
7264         (grokdeclarator): Likewise.
7265         (check_default_argument): Likewise.
7266         * decl2.c (handle_class_head): Likewise.
7267         * error.c (dump_template_decl): Likewise.
7268         * init.c (build_offset_ref): Likewise.
7269         * pt.c (check_specialization_scope): Likewise.
7270         (determine_specialization): Likewise.
7271         (check_explicit_specialization): Likewise.
7272         (maybe_check_template_type): Likewise.
7273         (process_partial_specialization): Likewise.
7274         (check_default_tmpl_args): Likewise.
7275         (push_template_decl_real): Likewise.
7276         (convert_template_argument): Likewise.
7277         (try_class_unification): Likewise.
7278         (get_bindings_real): Likewise.
7279         (do_decl_instantiation): Likewise.
7280         * semantics.c (begin_function_definition): Likewise.
7281         (finish_member_declaration): Likewise.
7282         (check_multiple_declarators): Likewise.
7283         * typeck.c (comp_array_types): Likewise.
7284         (comptypes): Likewise.
7285         (expr_sizeof): Likewise.
7286         (build_binary_op): Likewise.
7287         (dubious_conversion_warnings): Likewise.
7288         (check_return_expr): Likewise.
7289
7290 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
7291
7292         * typeck.c (build_class_member_access_expr): Do not return
7293         error_mark_node when no error has occurred.
7294
7295 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7296
7297         * typeck.c (build_component_addr): Remove.
7298         (build_unary_op): Just check it's not a bitfield, and then build
7299         an ADDR_EXPR.
7300
7301 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7302
7303         * class.c (convert_to_base): Correct check for error_mark_node.
7304         (create_vtable_ptr): Remove unused VFUNS_P parm.
7305
7306 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7307
7308         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
7309
7310 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
7311
7312         Rework build_component_ref.
7313         * call.c (build_vfield_ref): Do not go through build_component_ref.
7314         (build_field_call): Use build_class_member_access_expr.
7315         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
7316         (build_object_call): Likewise.
7317         * class.c (convert_to_base): New function.
7318         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
7319         (instantiate_type): Handle BASELINKs.
7320         * cp-tree.def (BASELINK): New tree code.
7321         * cp-tree.h (BASELINK_P): Reimplement.
7322         (SET_BASELINK_P): Remove.
7323         (BASELINK_BINFO): Reimplement.
7324         (BASELINK_FUNCTIONS): Likewise.
7325         (BASELINK_ACCESS_BINFO): Likewise.
7326         (BASELINK_OPTYPE): Likewise.
7327         (convert_to_base): New function.
7328         (name_p): Likewise.
7329         (build_object_ref): Remove.
7330         (build_component_ref_1): Likewise.
7331         (build_component_ref): Likewise.
7332         (build_x_component_ref): Likewise.
7333         (build_class_member_access_expr): New function.
7334         (finish_class_member_access_expr): Likewise.
7335         (build_ptrmemfunc_access_expr): Likewise.
7336         * decl.c (grokdeclarator): Handle BASELINKs.
7337         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
7338         finish_class_member_access_expr.
7339         (arg_assoc): Handle BASELINKs.
7340         (do_class_using_decl): Likewise.
7341         * error.c (dump_decl): Likewise.
7342         (dump_expr): Use build_ptrmemfunc_access_expr.
7343         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
7344         destructors.
7345         (build_throw): Use BASELINK_FUNCTIONS.
7346         * init.c (perform_member_init): Use
7347         build_class_member_access_expr.
7348         (build_offset_ref): Handle BASELINKs.  Use
7349         build_class_member_access_expr.
7350         * method.c (hack_identifier): Likewise.
7351         * parse.y (do_id): Use BASELINK, not TREE_LIST.
7352         (primary): Remove uses of build_object_ref.
7353         * pt.c (lookup_template_function): Handle BASELINKs.
7354         (resolve_overloaded_unification): Likewise.
7355         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
7356         (lookup_field): Use BASELINK, not TREE_LIST.
7357         (lookup_fnfiels): Likewise.
7358         (setup_class_bindings): Likewise.
7359         * semantics.c (finish_object_call_expr): Do not use
7360         build_method_call when we already know what function is being
7361         called.
7362         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
7363         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
7364         TREE_CHAIN.
7365         (name_p): New function.
7366         * typeck.c (build_object_ref): Remove.
7367         (build_component_ref_1): Likewise.
7368         (build_x_component_ref): Likewise.
7369         (build_class_member_access_expr): New function.
7370         (finish_class_member_access_expr): Likewise.
7371         (build_ptrmemfunc_access_expr): Likewise.
7372         (get_member_function_from_ptrfunc): Use
7373         build_ptrmemfunc_access_expr.
7374         (build_binary_op): Likewise.
7375         (build_unary_op): Likewise.
7376         (build_ptrmemfunc): Likewise.
7377         (pfn_from_ptrmemfunc): Likewise.
7378         * typeck2.c (build_m_component_ref): Adjust comment.
7379
7380 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
7381
7382         * Make-lang.in (CXX_C_OBJS): Update.
7383         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
7384         * cp-tree.h (cxx_decode_option): Remove.
7385         * decl2.c (compare_options, lang_f_options, unsupported_options,
7386         cxx_decode_option): Remove.
7387
7388 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
7389
7390         * typeck.c (build_x_unary_op): Handle pointer-to-member.
7391
7392 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
7393
7394         * class.c: Don't include obstack.h.
7395         (popclass):
7396         * decl2.c: Delete bogus comment.
7397         * error.c: Don't include obstack.h.
7398         * except.c: Likewise.
7399         (dump_type): Correct comment.
7400         * method.c: Don't include obstack.h.
7401         * tree.c: Likewise.
7402
7403 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
7404
7405         Fix PR/2213
7406         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
7407         expressions to pointer-to-data-member of pointer-to-member-functions.
7408
7409 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
7410
7411         * cvt.c (ocp_convert): Delete obsolete code.
7412         * parse.y (permanent_obstack): Delete declaration.
7413         * pt.c (permanent_obstack): Delete declaration.
7414         * repo.c (permanent_obstack): Delete declaration.
7415         (open_repo_file): Use xmalloc instead of permanent_obstack.
7416         (init_repo): Use xstrdup instead of permanent_obstack.
7417
7418 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
7419
7420         * cp-tree.h (VF_DERIVED_VALUE): Remove.
7421         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
7422
7423 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
7424
7425         PR 7470.
7426         C++ ABI change - vfunc ordering.
7427         * class.c (add_virtual_function): Remove.
7428         (dfs_modify_all_vtables): Take list of all declared
7429         virtuals. Assign all that are not in primary base.
7430         (check_for_override): Adjust comments.
7431         (create_vtable_ptr): Take single list of virtuals. Build chain
7432         of declared virtuals here.
7433         (layout_class_type): Take single list of virtuals. Adjust.
7434         (finish_struct_1): Keep virtuals on single list. Adjust.
7435
7436 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
7437
7438         * init.c (build_member_call): Use build_new_method_call, not
7439         build_method_call.
7440
7441 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
7442
7443         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
7444
7445 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
7446
7447         * call.c (build_method_call): Issue a more helpful error message
7448         about ambiguous method names.
7449
7450 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
7451
7452         * tree.c (build_shared_int_cst): Make cache file scope, and
7453         GTY it.
7454
7455 2002-08-02  Jason Merrill  <jason@redhat.com>
7456
7457         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
7458         (cp_expr_size): New fn.
7459         * call.c (build_over_call): Lose empty class hackery.
7460         (convert_arg_to_ellipsis): Promote non-POD warning to error.
7461         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
7462
7463         * semantics.c (expand_body): Do tree optimization in the function
7464         context, too.
7465
7466 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
7467
7468         * cp-tree.h: Move all warning and flag declarations to c-common.h.
7469         * decl.c: Move all warning and flag variables to c-common.c.
7470         * decl2.c: Move all warning and flag variables to c-common.c.
7471         * lex.c (flag_digraphs): Remove.
7472         (warn_traditional): Now in c-common.c.
7473
7474 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
7475
7476         * call.c (build_field_call): Do not look up the field by name.
7477         (build_method_call): Simplify.
7478         (struct z_candidate): Add access_path and conversion_path.  Remove
7479         basetype_path.
7480         (convert_class_to_reference): Adjust use of
7481         add_function_candidate.
7482         (add_candidate): Add conversion_path argument.
7483         (add_function_candidate): Use it.
7484         (add_conv_dndidate): Likewise.
7485         (build_builtin_candidate): Likewise.
7486         (add_template_candidate_real): Add conversion_path argument.
7487         (add_template_conv_candidate): Likewise.
7488         (add_template_candidate): Likewise.
7489         (build_user_type_conversion_1): Use it.
7490         (build_new_function_call): Remove name lookup code.  Adjust use of
7491         add_template_candidate and add_function_candidate.
7492         (build_new_op): Likewise.
7493         (convert_like_real): Use build_special_member_call.
7494         (build_over_call): Use cand->conversion_path.
7495         (build_special_member_call): New method.
7496         (build_new_method_call): Remove name lookup code.
7497         * cp-tree.def (OFFSET_REF): Update documentation.
7498         (TEMPLATE_ID_EXPR): Likewise.
7499         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
7500         (BASELINK_OPTYPE): Likewise.
7501         (build_new_method_call): Adjust prototype.
7502         (build_special_member_call): New method.
7503         (build_baselink): New method.
7504         (build_offset_ref_call_from_tree): Likewise.
7505         (build_call_from_tree): Likewise.
7506         (finish_qualified_call_expr): Remove.
7507         (finish_call_expr): Adjust prototype.
7508         (build_x_function_call): Remove.
7509         * cvt.c (ocp_convert): Use build_special_member_call.
7510         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
7511         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
7512         CALL_EXPR.
7513         (build_offset_ref_call_from_tree): New function.
7514         (build_call_from_tree): Likewise.
7515         * init.c (expand_cleanup): Use build_special_member_call.
7516         (expand_default_init): Likewise.
7517         (build_member_call): Use finish_call_expr.
7518         (build_new_1): Use build_special_member_call.
7519         (push_base_cleanups): Likewise.
7520         * method.c (do_build_assign_ref): Likewise.
7521         * parse.y (template_id): Do not pass a COMPONENT_REF to
7522         lookup_template_function.
7523         (primary): Use parse_finish_call_epxr, not finish_call_expr.
7524         (parse_finish_call_expr): New function.
7525         * pt.c (lookup_template_function): Add assertions.
7526         * search.c (lookup_base): Allow T to be a binfo.
7527         (build_baselink): New function.
7528         (lookup_member): Use it.
7529         * semantics.c (finish_call_expr): Do not do name lookup.
7530         (finish_object_call_expr): Remove #if 0'd code.
7531         (finish_qualified_call_expr): Remove.
7532         * typeck.c (build_x_function_call): Remove.
7533         (build_static_case): Use build_special_member_call.
7534         * typeck2.c (build_functional_cast): Likewise.
7535
7536 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
7537
7538         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
7539
7540 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
7541
7542         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
7543
7544 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
7545
7546         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
7547         documentation.
7548
7549 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
7550
7551         * cp-tree.h: Comment typo fix.
7552
7553 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
7554
7555         * spew.c (space_for_token): Allocate zeroed memory for a new token
7556         chunk.
7557
7558 2002-07-27  Roger Sayle  <roger@eyesopen.com>
7559
7560         * decl.c (builtin_function_1): No need to explicitly mark
7561         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
7562
7563 2002-07-27  Roger Sayle  <roger@eyesopen.com>
7564
7565         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
7566
7567 2002-07-26  Jason Merrill  <jason@redhat.com>
7568
7569         * call.c (build_over_call): Likewise.
7570         (cp_convert_parm_for_inlining): New fn.
7571         (convert_for_arg_passing): New fn.
7572         (convert_default_arg, build_over_call): Use it.
7573         (type_passed_as): New fn.
7574         * pt.c (tsubst_decl): Use it.
7575         * decl2.c (cp_build_parm_decl): New fn.
7576         (build_artificial_parm): Use it.
7577         (start_static_storage_duration_function): Likewise.
7578         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
7579         (grokparms): Don't mess with DECL_ARG_TYPE.
7580         * typeck.c (convert_arguments): Use convert_for_arg_passing.
7581         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7582         Define.
7583         * cp-tree.h: Declare new fns.
7584
7585 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
7586
7587         * cp-tree.h (flag_operator_names): Remove.
7588         * decl2.c (flag_operator_names): Remove.
7589         (lang_f_options): Remove operator-names.
7590         * lex.c (D_OPNAME): Remove.
7591         (reswords): Remove operator names.
7592         (rid_to_yy): Remove operator names.
7593         (init_reswords): No need to handle D_OPNAME.
7594         * spew.c (read_process_identifier): There are no operator
7595         names.
7596
7597 2002-07-26  Jason Merrill  <jason@redhat.com>
7598
7599         * dump.c (cp_dump_tree): Call c_dump_tree.
7600         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
7601
7602 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
7603
7604         * error.c (print_whitespace): Remove.
7605         * g++spec.c (LIBUNWIND): Move.
7606         * mangle.c (mangled_position, write_signed_number): Remove.
7607
7608 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
7609
7610         * decl2.c (cxx_decode_option): Similarly.
7611
7612 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
7613
7614         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
7615         (cxx_sizeof_or_alignof_type): Take a third argument.
7616         (cxx_sizeof): Adjust definition.
7617         (cxx_alignof): Likewise.
7618         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
7619         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
7620         complaining.
7621         (c_sizeof_nowarn): Remove definition.
7622         (build_unary_op): Use cxx_sizeof_nowarn.
7623
7624 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
7625
7626         * tree.c (cp_build_qualified_type_real): When copying
7627         pointer-to-method types, unshare the record that holds
7628         the cached pointer-to-member-function type.
7629
7630 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
7631
7632         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
7633
7634 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
7635
7636         Fix PR/7363:
7637         * typeck.c (cxx_sizeof_or_alignof_type): New function.
7638         (c_sizeof): Remove definition.
7639         (expr_sizeof): Use cxx_sizeof.
7640         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
7641         * decl.c (finish_destructor_body): Use cxx_sizeof.
7642         * semantics.c (finish_alignof): Likewise.
7643         (finish_alignof): Use cxx_alignof.
7644         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
7645         (cxx_sizeof_or_alignof_type): Declare.
7646         (my_friendly_assert): Move to ../c-common.h.
7647
7648 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
7649
7650         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
7651
7652 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7653
7654         PR c++/7347, c++/7348
7655         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
7656         * decl.c (make_typename_type): Use it.
7657         (make_unbound_class_template): Likewise.
7658         (lookup_name_real): Don't call type_access_control if scope is
7659         template parameter dependent.
7660         * parse.y (template_arg): Call make_unbound_class_template with
7661         tf_parsing set.
7662         (nest_name_specifier): Call make_typename_type with tf_parsing set.
7663         (typename_sub0): Likewise.
7664         (typename_sub1): Likewise.
7665         (instantiate_decl): Push class scope.
7666         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
7667         for both static variable and member function template.
7668         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
7669         and arguments.
7670         * search.c (type_access_control): Do type access for TEMPLATE_DECL
7671         too.
7672
7673 2002-07-20  Roger Sayle  <roger@eyesopen.com>
7674
7675         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
7676         test by using positive_option.  Make whitespace consistent.
7677
7678 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
7679
7680         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
7681         members with 'locus'.  Adjust use throughout.
7682         (struct feed):  Likewise.
7683         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
7684         Adjust use.
7685         (snarf_defarg): Use error(), not error_with_file_and_line().
7686
7687 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
7688
7689         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
7690         cpp_options is included.
7691
7692 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7693
7694         PR c++/2862, c++/2863
7695         * pt.c (determine_specialization): Compare the length of
7696         TYPE_ARG_TYPES.  Tidy.
7697
7698 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7699
7700         PR c++/3797
7701         * decl.c (duplicate_decls): Don't propagate inlining parameters from
7702         olddecl to newdecl when newdecl is a specialization of the
7703         instantiation olddecl.
7704
7705 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7706
7707         PR c++/4802, c++/5387
7708         * decl.c (make_typename_type): Use enforce_access.
7709
7710 2002-07-17  Scott Snyder <snyder@fnal.gov>
7711
7712         PR c++/7320
7713         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
7714
7715 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
7716
7717         * class.c (add_method): Correct handling of conversion operators.
7718
7719 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
7720
7721         PR c++/7224
7722         * class.c (add_method): Simplify.
7723
7724 2002-07-11  Jason Merrill  <jason@redhat.com>
7725
7726         PR c++/7279
7727         * tree.c (cp_copy_res_decl_for_inlining): Also copy
7728         TREE_ADDRESSABLE.
7729
7730 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
7731
7732         * pt.c (template_parm_this_level_p, push_template_decl_real):
7733         Pass depth as int pointer.
7734
7735 2002-07-11  Tim Josling  <tej@melbpc.org.au>
7736
7737         Remove front end hard coding from gengtype.c.
7738
7739         * config-lang.in (gtfiles): Add files needed for this front end.
7740
7741 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
7742
7743         * cp-tree.h (unqualified_name_lookup_error): Declare it.
7744         (begin_function_definition): Adjust prototype.
7745         * lex.c (unqualified_name_lookup_error): New function, split out
7746         from ...
7747         (do_identifier): ... here.
7748         * parse.y (parse_begin_function_definition): New function.
7749         (fn.def1): Use it.
7750         * semantics.c (begin_function_definition): Accept decl-specifiers
7751         and attributes as separate parameters.
7752
7753 2002-07-10  Jason Merrill  <jason@redhat.com>
7754
7755         PR c++/6255
7756         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
7757         modifying the old one.
7758
7759 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
7760
7761         * cp-tree.h (constructor_name_p): Declare it.
7762         (check_template_template_default_arg): Likewise.
7763         * class.c (handle_using_decl): Use constructor_name_p.
7764         * decl.c (grokdeclarator): Likewise.
7765         * decl2.c (constructor_name_p): Define it.
7766         * init.c (build_member_call): Use constructor_name_p.
7767         * parse.y (template_parm): Use check_template_template_default_arg.
7768         * pt.c (check_explicit_specialization): Use constructor_name_p.
7769         * semantics.c (check_template_template_default_arg): New function.
7770
7771 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7772
7773         * pt.c (can_complete_type_without_circularity): Add static to
7774         function definition.
7775
7776 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
7777
7778         * cp-tree.h (have_extern_spec): Declare it
7779         * decl.c (have_extern_spec): Define it.
7780         (start_decl): Eliminate use of used_extern_spec.
7781         (start_function): Likewise.
7782         * parse.y (have_extern_spec): Remove declaration.
7783         (used_extern_spec): Likewise.
7784         (frob_specs): Eliminate use of used_extern_spec.
7785         (.hush_warning): Likewise.
7786
7787 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
7788
7789         * Make-lang.in (cp/parse.o): Depend on decl.h.
7790         * cp-tree.h (do_decl_instantiation): Change prototype.
7791         * parse.y: Include decl.h.
7792         (parse_decl_instantiation): New function.
7793         (explicit_instantiation): Use it.
7794         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
7795         and DECLSPECS.
7796
7797 2002-07-07  Roger Sayle  <roger@eyesopen.com>
7798
7799         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
7800         constructor and destructor tests when passed a TEMPLATE_DECL.
7801
7802 2002-07-05  Jason Merrill  <jason@redhat.com>
7803
7804         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
7805         pointers.
7806
7807         PR optimization/7145
7808         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
7809
7810 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
7811
7812         Repair damage on weak-impared targets caused by my previous patch.
7813         * cp-tree.h (import_export_tinfo): Add parameter.
7814         * decl2.c (import_export_tinfo): Add parameter, post adjust
7815         DECL_COMDAT.
7816         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
7817         import_export_tinfo.
7818
7819 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7820
7821         PR c++/6944
7822         * init.c (build_aggr_init): Remove qualifiers of init before calling
7823         build_vec_init.
7824         (build_vec_init): Flatten multi-dimensional array during cleanup.
7825         (build_vec_delete_1): Abort if the type of each element is array.
7826
7827 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
7828
7829         * pt.c (instantiate_class_template): Fix typo.
7830
7831 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7832
7833         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
7834         by CVS conflict in my last patch.
7835
7836 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7837
7838         PR c++/6716
7839         * pt.c (can_complete_type_without_circularity): New function.
7840         (instantiate_class_template): Use it.
7841         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
7842         message due to incomplete fields.
7843
7844 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
7845
7846         PR c++/7112
7847         * mangle.c (write_expression): Add mangling for sizeof when
7848         applied to a type.
7849         * operators.def: Remove stale comment.
7850
7851 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
7852
7853         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
7854         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
7855         (tinfo_decl_type): Replace with ...
7856         (type_info_ptr_type): ... this.
7857         (import_export_tinfo): Declare.
7858         (tinfo_decl_p): Rename to ...
7859         (unemitted_tinfo_decl_p): ... this.
7860         * decl2.c (import_export_decl): Break out tinfo handling into ...
7861         (import_export_tinfo): ... here. New function.
7862         (finish_file): Adjust.
7863         * rtti.c (TINFO_REAL_NAME): New macro.
7864         (init_rtti_processing): Create the tinfo types.
7865         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
7866         (get_tinfo_decl): Adjust.
7867         (get_tinfo_ptr): New function.
7868         (get_type_id): Use it.
7869         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
7870         (ptr_initializer): Use get_tinfo_ptr.
7871         (ptm_initializer): Likewise.
7872         (synthesize_tinfo_var): Break into ...
7873         (get_pseudo_ti_init): ... this. Just create the initializer.
7874         (get_pseudo_ti_desc): .. and this.
7875         (create_real_tinfo_var): Remove.
7876         (create_pseudo_type_info): Don't create the vtable decl here.
7877         (get_vmi_pseudo_type_info): Remove.
7878         (create_tinfo_types): Adjust.
7879         (tinfo_decl_p): Rename to ...
7880         (unemitted_tinfo_decl_p): ... here. Adjust.
7881         (emit_tinfo_decl): Adjust. Create the initializer.
7882
7883 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
7884
7885         PR c++/6695
7886         * pt.c (tsubst_friend_class): Substitute into the context of the
7887         friend before using it.
7888
7889 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
7890
7891         * cp-tree.h (xref_tag): Change prototype.
7892         (handle_class_head): Likewise.
7893         (build_x_component_ref): Likewise.
7894         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
7895         (xref_tag): Take attributes as a separate parameter.
7896         (xref_tag_from_type): Adjust call to xref_tag.
7897         * decl2.c (build_expr_from_tree): Adjust call to
7898         build_x_component_ref.
7899         (handle_class_head): Take attributes as a separate parameter.
7900         * parse.y (parse_xref_tag): New function.
7901         (parse_handle_class_head): Likewise.
7902         (primary): Use parse_xref_tag.
7903         (class_head_decl): Use parse_handle_class_head.
7904         (class_head_defn): Likewise.
7905         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
7906         (build_dynamic_cast_1): Likewise.
7907         (create_pseudo_type_info): Likewise.
7908         (emit_support_tinfos): Likewise.
7909         * typeck.c (build_object_ref): Adjust call to
7910         build_x_component_ref.
7911         (build_x_component_ref): Remove protect parameter.
7912
7913 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
7914
7915         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
7916         * class.c (handle_using_decl): Likewise.
7917         (instantiate_type): Likewise.
7918         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
7919         (xref_basetypes): Change prototype.
7920         (begin_mem_initializers): New function.
7921         (get_overloaded_fn): Likewise.
7922         * decl.c (xref_basetypes): Simplify.
7923         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
7924         * init.c (build_offset_ref): Likewise.
7925         * parse.y (base_init): Use begin_mem_initializers().
7926         (structsp): Adjust call to xref_basetypes.
7927         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
7928         (instantiate_class_template): Adjust call to xref_basetypes.
7929         * semantics.c (begin_mem_initializers): New function.
7930         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
7931         (really_overlaoded_fn): Likewise.
7932         (get_overloaded_fn): New function.'
7933         (get_first_fn): USe BASELINK_FUNCTIONS.
7934
7935 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
7936
7937         * cp-tree.h (SCALAR_TYPE_P): New macro.
7938         (check_for_out_of_scope_variable): New function.
7939         (at_class_scope_p): Likewise.
7940         (finish_fname): Likewise.
7941         * class.c (finish_struct): Use at_function_scope_p.
7942         * decl.c (check_for_out_of_scope_variable): New function, split
7943         out from do_identifier.
7944         (finish_enum): Use at_function_scope_p.
7945         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
7946         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
7947         (primary): Use at_function_scope_p.
7948         * search.c (at_class_scope_p): New function.
7949         * semantics.c (finish_fname): Likewise.
7950         (check_multiple_declarators): Use at_function_scope_p.
7951
7952 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
7953
7954         * parse.y (parse_scoped_id): New function.
7955         (primary): Use it.
7956         * cp-tree.h (do_scoped_id): Adjust declaration.
7957         * lex.c (do_scoped_id): Remove call to yylex.
7958         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
7959         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
7960         expanding it inline.
7961
7962 2002-06-23  Matt Thomas  <matt@3am-software.com>
7963
7964         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
7965         "#if VMS_TARGET".
7966
7967 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7968
7969         * mangle.c (integer_type_codes): Const-ify.
7970
7971 2002-06-20  Richard Henderson  <rth@redhat.com>
7972
7973         PR c++/6747
7974         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
7975         Call put_var_into_stack.
7976
7977 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7978
7979         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
7980         array size calculation.
7981
7982 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7983
7984         PR c++/6892
7985         * pt.c (tsubst_expr): Handle FILE_STMT.
7986
7987 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7988
7989         PR c++/6723
7990         * pt.c (lookup_template_class): Don't build complete argument of
7991         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
7992         argument.
7993
7994 2002-06-19  Akim Demaille  <akim@epita.fr>
7995
7996         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
7997         decl.h's TYPENAME.
7998         * spew.c, lex.c: Adjust.
7999         * parse.y (explicit_instantiation): Add empty action to override
8000         the default $$ = $1 where it introduces a type clash.
8001
8002 2002-06-14  Jason Merrill  <jason@redhat.com>
8003
8004         * semantics.c (begin_for_stmt): Push the 'for' scope before
8005         adding the FOR_STMT.
8006
8007         C++ ABI changes.
8008         * class.c (build_base_field): Set DECL_PACKED.
8009         (layout_class_type): Don't use tail padding of PODs.
8010         * mangle.c (write_unqualified_name): Fix template conversion op
8011         mangling.
8012
8013 2002-06-16  Richard Henderson  <rth@redhat.com>
8014
8015         PR opt/6793
8016         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
8017         after template instantiation.
8018
8019 2002-06-16  Richard Henderson  <rth@redhat.com>
8020
8021         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
8022
8023 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
8024
8025         * cp-tree.h (compiler_error): Remove declaration.
8026         * lex.c (compiler_error): Remove definition.
8027
8028 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
8029
8030         * g++spec.c (LIBUNWIND): New.
8031         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
8032
8033 2002-06-13  Jessica Han  <jessica@cup.hp.com>
8034
8035         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
8036         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
8037         (build_vbase_offset_vtbl_entries): Likewise.
8038         * rtti.c (build_headof): Likewise.
8039         (get_tinfo_decl_dynamic): Likewise.
8040         (create_pseudo_type_info): Likewise.
8041
8042 2002-06-12  Stan Shebs  <shebs@apple.com>
8043
8044         * mpw-config.in: Remove file, no longer used.
8045         * mpw-make.sed: Ditto.
8046
8047 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
8048
8049         * decl2.c: Update call to cpp_handle_option.
8050
8051 2002-06-07  H.J. Lu  (hjl@gnu.org)
8052
8053         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
8054
8055 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
8056
8057         * error.c (cp_error_at): Fix typo.
8058
8059 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
8060
8061         * error.c (cp_diagnostic_starter): Adjust call.
8062         (maybe_print_instantiation_context): Change prototype to take a
8063         'diagnostic_info *'.
8064         (print_instantiation_full_context): Likewise.
8065         (print_instantiation_partial_context): Likewise.
8066         (cp_diagnostic_starter): Likewise.
8067         (cp_diagnostic_finalizer): Likewise.
8068         (cp_print_error_function): Likewise.
8069         (cp_printer): Take a secondary parameter as a 'text_info *'.
8070         Remove output_state savings.  Adjust calls.
8071
8072 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
8073
8074         * pt.c (inline_parm_levels): Mark for GC.
8075
8076         * mangle.c (start_mangling): Allocate G.substitutions here...
8077         (init_mangle): ... rather than here.
8078         (finish_mangling): Clear the varray pointer when done with it.
8079         * spew.c (yylexstring): Don't use VARRAY_FREE.
8080         * search.c (bfs_walk): Don't use VARRAY_FREE.
8081         * decl2.c (pending_statics): Use gengtype to mark.
8082         (deferred_fns): Likewise.
8083         (ssdf_decls): Likewise.
8084         (init_decl2): Delete.
8085         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
8086         (cxx_init_decl_processing): Don't call init_decl2.
8087         (cxx_pop_function_context): Don't use VARRAY_FREE.
8088         * cp-tree.h (struct saved_scope): No need for special marking
8089         of varrays.
8090         (struct language_function): Likewise.
8091         (local_classes): Use gengtype to mark.
8092         (init_decl2): Delete prototype.
8093         * class.c (init_class_processing): Don't use
8094         ggc_add_tree_varray_root.
8095         (build_vtbl_initializer): Don't use VARRAY_FREE.
8096
8097         * decl.c (typename_compare): Don't use same_type_p.
8098
8099         * decl.c: Include hashtab.h instead of hash.h.
8100         (typename_hash): Update to use htab_h.
8101         (typename_compare): Likewise.
8102         (typename_htab): Use gengtype to mark.
8103         (build_typename_type): Update to use htab_h.
8104         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
8105
8106         * Make-lang.in (gt-cp-tree.h): New rule.
8107         (cp/tree.o): Depend on gt-cp-tree.h.
8108         * config-lang.in (gtfiles): Add cp/tree.c.
8109         * tree.c: Include gt-cp-tree.h.
8110         (list_hash_table): Use gengtype to mark.
8111         (init_tree): Use gengtype to mark trees.
8112
8113         * Make-lang.in (cp/decl.o): Add debug.h dependency.
8114         * call.c (struct z_candidate): Use gengtype.
8115         (USER_CONV_CAND): Use WRAPPER_ZC.
8116         (convert_class_to_reference): Use build_zc_wrapper.
8117         (build_type_conversion_1): Likewise.
8118         (build_over_call): Use WRAPPER_ZC.
8119         (add_warning): Use build_zc_wrapper.
8120         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
8121         * cp-tree.h (struct lang_identifier): Use gengtype.
8122         (struct template_parm_index_s): Likewise.
8123         (struct ptrmem_cst): Likewise.
8124         (struct tree_binding): Likewise.
8125         (struct tree_overload): Likewise.
8126         (struct tree_srcloc): Likewise.
8127         (struct tree_wrapper): Likewise.  Also modify to have a pointer
8128         to struct z_candidate rather than void.
8129         (enum cp_tree_node_structure_enum): New.
8130         (union lang_tree_node): New.
8131         (cxx_mark_tree): Delete prototype.
8132         (cp_tree_node_structure): New prototype.
8133         (build_ptr_wrapper): Delete prototype.
8134         (build_int_wrapper): Delete prototype.
8135         (build_zc_wrapper): New prototype.
8136         * decl.c: Include debug.h
8137         (cxx_mark_tree): Delete.
8138         (cp_tree_node_structure): New.
8139         * tree.c (build_ptr_wrapper): Delete.
8140         (build_int_wrapper): Delete.
8141         (build_zc_wrapper): New.
8142
8143         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
8144         Correct typo.  Patch from k_fukui@highway.ne.jp.
8145
8146         * semantics.c (current_stmt_tree): Update for change to
8147         struct language_function.
8148         (finish_mem_initializers): Likewise.
8149         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
8150         * cp-tree.h (struct language_function): Rename from
8151         cp_language_function.  Change all uses.
8152         (cp_function_chain): Don't need to cast.
8153
8154         * class.c (duplicate_tag_error): Reset discriminator.
8155         (check_bases_and_members): Update for data structure changes.
8156         * cp-tree.h (struct lang_id2): Use gengtype.
8157         (flagged_type_tree): Likewise.
8158         (SET_LANG_ID): Use GGC on struct lang_id2.
8159         (struct cp_language_function): Use gengtype.  Remove field
8160         'x_vcalls_possible_p'.
8161         (current_vcalls_possible_p): Delete.
8162         (struct lang_type_header): New.
8163         (struct lang_type_class): Rename from struct lang_type.  Include
8164         struct lang_type_header.
8165         (struct lang_type_ptrmem): New.
8166         (struct lang_type): New.
8167         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
8168         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
8169         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
8170         (struct lang_decl_flags): Use gengtype.  Add discriminators.
8171         (struct lang_decl): Use gengtype.  Add and use discriminators.
8172         Update the macros that reference moved fields.
8173         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
8174         (SET_DECL_THUNK_P): Set discriminator too.
8175         (clear_inline_text_obstack): Delete prototype.
8176         (finish_inline_definitions): Delete prototype.
8177         (mark_pending_inlines): Delete prototype.
8178         (lang_check_failed): New prototype.
8179         * decl.c (struct named_label_use_list): Use gengtype.
8180         (struct named_label_list): Likewise.
8181         (mark_binding_level): Delete.
8182         (mark_named_label_lists): Delete.
8183         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
8184         (cxx_init_decl_processing): Use generated marker routine.
8185         (begin_destructor_body): Delete dead set to
8186         current_vcalls_possible_p.
8187         (mark_lang_function): Delete.
8188         (mark_cp_function_context): Delete.
8189         (lang_mark_tree): Use generated marker routines.
8190         * decl2.c (start_objects): Set discriminator when setting
8191         GLOBAL_INIT_PRIORITY.
8192         * lex.c (retrofit_lang_decl): Set discriminators.
8193         (copy_lang_type): Update for changes to lang_type structure.
8194         (cp_make_lang_type): Set discriminator.
8195         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
8196         * search.c: Include ggc.h.
8197         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
8198         (finish_inline_definitions): Delete.
8199         * spew.c (struct token): Use gengtype.
8200         (struct token_chunk): New.
8201         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
8202         (struct feed): Use gengtype.
8203         (feed_obstack): Delete.
8204         (feed): Mark as GC root.
8205         (pending_inlines): Mark as GC root.
8206         (pending_inlines_tail): Likewise.
8207         (processing_these_inlines): Likewise.
8208         (token_obstack): Make static.
8209         (first_token): Likewise.
8210         (init_spew): Don't initialize deleted things; use gengtype for roots.
8211         (clear_inline_text_obstack): Delete.
8212         (feed_input): Use GC for struct feed.  Update for changes to
8213         struct unparsed_text.
8214         (mark_pending_inlines): Delete.
8215         (next_token): Rename from add_token.  Change all callers.  Update
8216         for changes to struct unparsed_text.
8217         (space_for_token): New.
8218         (remove_last_token): New.
8219         (alloc_unparsed_text): New.
8220         (snarf_block): Take an unparsed_text.  Update for changes to struct
8221         unparsed_text.
8222         (snarf_method): Update for changes to struct unparsed_text.
8223         (snarf_defarg): Update for changes to struct unparsed_text.
8224         * tree.c (lang_check_failed): New.
8225
8226         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
8227         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
8228         (cp/spew.o): Add dependency on gt-<filename>.h.
8229         (cp/decl2.o): Add dependency on gt-<filename>.h.
8230         (cp/call.o): Add dependency on gt-<filename>.h.
8231         (cp/pt.o): Add dependency on gt-<filename>.h.
8232         (cp/repo.o): Add dependency on gt-<filename>.h.
8233         (cp/parse.o): Add dependency on gt-<filename>.h.
8234         * call.c: Use gengtype for roots.
8235         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
8236         decl2.c parse.y pt.c repo.c spew.c.
8237         * cp-tree.h: Use gengtype for roots.
8238         (struct saved_scope): Use GGC, gengtype.
8239         (cp_parse_init): Delete prototype.
8240         (init_pt): Delete prototype.
8241         * decl.c: Use gengtype for roots.
8242         (mark_saved_scope): Delete.
8243         (cxx_init_decl_processing): Don't call deleted initilisation
8244         routines.
8245         (signed_size_zero_node): Delete, unused.
8246         * decl.h: Use gengtype for roots.
8247         * decl2.c: Use gengtype for roots.
8248         * lex.h: Use gengtype for roots.
8249         * parse.y: Use gengtype for roots.
8250         (cp_parse_init): Delete.
8251         * pt.c: Use gengtype for roots.
8252         (init_pt): Delete.
8253         * repo.c: Use gengtype for roots.
8254         * spew.c: Use gengtype for roots.
8255
8256         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
8257         (cp/decl.o): Add dependency on gtype-cp.h.
8258         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
8259         Include gtype-cp.h.  Allow for filename changes.
8260
8261         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
8262         (cp/decl.o): Add cp/gt-decl.h dependency.
8263         * config-lang.in (gtfiles): New.
8264         * tree.h: Rename struct binding_level to struct cp_binding_level.
8265         * decl.c: Rename struct binding_level to struct cp_binding_level.
8266         Include cp/gt-decl.h.
8267         (struct cp_binding_level): Use gengtype.
8268         (make_binding_level): Use GGC on struct cp_binding_level.
8269         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
8270         (cxx_init_decl_processing): Mark free_binding_level as
8271         deletable.
8272
8273         * decl.c (mark_cp_function_context): Update calling sequence.
8274
8275         * decl.c (start_function): Don't free 'struct
8276         cp_language_function'.
8277         (pop_cp_function_context): Likewise.
8278         (save_function_data): Allocate it using GC.
8279         * semantics.c (genrtl_start_function): Don't free 'struct
8280         cp_language_function'.
8281
8282 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
8283
8284         * lang-specs.h: Use cpp_debug_options.
8285
8286 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
8287
8288         * mangle.c, tree.c: Include real.h.
8289         * Make-lang.in: Update dependency lists.
8290
8291 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8292
8293         * lex.c: Don't include c-lex.h.
8294         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
8295
8296 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
8297
8298         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
8299
8300 2002-05-22  Richard Henderson  <rth@redhat.com>
8301
8302         * decl.c (obscure_complex_init): Check for VAR_DECL
8303         before using DECL_THREAD_LOCAL.
8304
8305 2002-05-22  Richard Henderson  <rth@redhat.com>
8306
8307         * decl.c (check_tag_decl): Handle RID_THREAD.
8308         (obscure_complex_init): Reject run-time init of tls.
8309         (grokvardecl, grokdeclarator): Handle RID_THREAD.
8310         * lex.c (reswords): Add __thread.
8311         (rid_to_yy): Map RID_THREAD to SCSPEC.
8312
8313 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
8314
8315         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
8316         * cp-tree.h (cxx_post_options): Kill.
8317         * cp-lex.c (cxx_post_options): Kill.
8318
8319 2002-05-21  Richard Henderson  <rth@redhat.com>
8320
8321         * lex.c (rid_to_yy): Add RID_THREAD.
8322
8323 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
8324
8325         * init.c (build_vec_init): Test for trivial copy-assignment when
8326         copy-assigning arrays.
8327
8328 2002-05-20  Andreas Jaeger  <aj@suse.de>
8329
8330         * init.c (build_default_init): Remove unused variable.
8331
8332 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
8333
8334         * call.c (any_strictly_viable): New.
8335         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
8336
8337 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8338
8339         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
8340
8341 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8342
8343         PR c++/186, DR 259
8344         * pt.c (do_decl_instantiation): Don't complain explicit
8345         instantiation after explicit specialization.
8346         (do_type_instantiation): Likewise.
8347
8348 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
8349
8350         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
8351         renamed from...
8352         (complete_type_or_else): ... this.  Redefined as macro.
8353         (cxx_incomplete_type_diagnostic): Declare.
8354         (cxx_incomplete_type_error): Define as macro.
8355         * init.c (build_delete): Warn about incomplete types other than
8356         void, and use the built-in operator delete for them.
8357         * typeck.c (complete_type_or_diagnostic): Renamed from
8358         complete_type_or_else.  Added warn_only argument, passed to...
8359         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
8360         warnings or errors depending on new warn_only argument.  Renamed
8361         from...
8362         (cxx_incomplete_type_error): ... this.  New implementation in
8363         terms of cxx_incomplete_type_diagnostic.
8364
8365 2002-05-18  Jason Merrill  <jason@redhat.com>
8366
8367         PR c++/6611
8368         * decl2.c (import_export_decl): If we clear
8369         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
8370
8371 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8372
8373         PR c++/6620
8374         * pt.c (verify_class_unification): Don't check if PARM is template
8375         parameter dependent.  Simplify.
8376         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
8377         parameter dependent expression.
8378
8379 2002-05-14  Jason Merrill  <jason@redhat.com>
8380
8381         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
8382         Do set DECL_COMDAT.
8383         (synthesize_tinfo_var): Take the public decl.
8384         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
8385         (emit_tinfo_decl): Adjust.  Call import_export_decl.
8386         * decl2.c (import_export_decl): Simplify tinfo decl handling.
8387
8388 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
8389
8390         * cp-tree.h (struct lang_type): Added non_zero_init.
8391         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
8392         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
8393         * class.c (check_field_decls): Test non_zero_init.
8394         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
8395         zero-to-NULL conversions.
8396         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
8397         type that needs zero-initialization without zeros.
8398         (check_initializer_decl): Compute zero-initializer for types
8399         that require a non-trivial one.
8400         * init.c (build_forced_zero_init): New function.
8401         (build_default_init): Use it.
8402         * tree.c (zero_init_p): New function.
8403         * typeck2.c (force_store_init_value): New function.
8404         (process_init_constructor): Create non-trivial zero-initializers
8405         for array members and class fields.
8406
8407 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
8408
8409         * lang-specs.h: Remove redundant -lang-c++.
8410
8411 2002-05-13  Jason Merrill  <jason@redhat.com>
8412
8413         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
8414         (fixed_type_or_null): See through reference vars.
8415         (build_base_path): Vtable contents are constant.
8416         * typeck.c (get_member_function_from_ptrfunc): Likewise.
8417
8418 2002-05-12  Jason Merrill  <jason@redhat.com>
8419
8420         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
8421         structs are safe.
8422
8423 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8424
8425         * cp-tree.h (flag_ansi): Remove.
8426         * decl2.c (flag_ansi): Remove.
8427         (cxx_decode_option): Set flag_iso and flag_undef.
8428
8429 2002-05-09  Jason Merrill  <jason@redhat.com>
8430
8431         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
8432         Use subtraction rather than a bitmask to get the index.
8433         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
8434
8435         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
8436
8437 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
8438
8439         * Make-lang.in (decl2.o): Update.
8440         * cp-tree.h (warn_multichar): Remove.
8441         * decl2.c: Include c-common.h.
8442         (warn_multichar): Remove.
8443
8444 2002-05-03  Jason Merrill  <jason@redhat.com>
8445
8446         * tree.c (build_cplus_array_type): Only const and volatile get
8447         special handling.
8448
8449         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
8450
8451 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
8452
8453         ABI change, returning simple classes from functions.
8454         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
8455         TYPE_HAS_TRIVIAL_INIT_REF is false or
8456         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
8457
8458 2002-04-30  Jason Merrill  <jason@redhat.com>
8459
8460         PR debug/6436
8461         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
8462         anonymous class with a typedef if there are attributes.
8463
8464 2002-04-29  Paul Eggert  <eggert@twinsun.com>
8465
8466         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
8467
8468 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
8469
8470         PR c++/6477
8471         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
8472         non-NULL first.
8473
8474 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
8475
8476         PR c++/6492
8477         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
8478         enter that scope before name lookup.
8479
8480         PR c++/6486
8481         * method.c (do_build_copy_constructor): Avoid building
8482         cv-qualified reference types.
8483
8484 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
8485
8486         PR c++/5719
8487         * decl.c (grok_op_properties): Assignment ops don't have to return
8488         by value. operator% should.
8489
8490 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
8491
8492         PR c/6343
8493         * decl.c (duplicate_decls): Call merge_weak.
8494
8495 2002-04-26  Richard Henderson  <rth@redhat.com>
8496
8497         * parse.y (malloced_yyss, malloced_yyvs): New.
8498         (yyoverflow): Re-add.  Set them.
8499         (free_parser_stacks): New.
8500
8501 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
8502
8503         PR c++/6497
8504         * method.c (do_build_assign_ref): Pass a derivation to
8505         build_method_call when calling base class assignment operators.
8506
8507 2002-04-26  Richard Henderson  <rth@redhat.com>
8508
8509         * parse.y (yyoverflow): Revert.
8510
8511 2002-04-26  Richard Henderson  <rth@redhat.com>
8512
8513         PR c/3581
8514         * parse.y (string): Remove.  Update all uses to use STRING
8515         instead, and not call combine_strings.
8516         * rtti.c (tinfo_name): Use fix_string_type.
8517         * semantics.c (finish_asm_stmt): Don't call combine_strings.
8518         * spew.c (yylexstring): New.
8519         (read_token): Use it.
8520
8521 2002-04-25  Richard Henderson  <rth@redhat.com>
8522
8523         PR c/2161
8524         * parse.y (yyoverflow): New.
8525
8526 2002-04-25  Jason Merrill  <jason@redhat.com>
8527
8528         PR c++/5607
8529         * search.c (check_final_overrider): No longer static.
8530         * class.c (update_vtable_entry_for_fn): Call it.
8531         * cp-tree.h: Adjust.
8532
8533 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8534
8535         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8536         * cp-tree.h (cxx_set_yydebug): Die.
8537         * lex.c (YYDEBUG): Get from c-lex.h.
8538         (cxx_set_yydebug): Remove.
8539         * parse.y: Include c-lex.h.
8540         (YYDEBUG): Get from c-lex.h.
8541
8542 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
8543
8544         PR c++/6438.
8545         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
8546         void.
8547
8548 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
8549
8550         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
8551         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
8552         Redefine.
8553         * cp-tree.h (cp_attribute_table): Rename.
8554         * decl.c (lang_attribute_table): Remove declaration.
8555         (cxx_init_decl_processing): Don't set it.
8556         * tree.c (cp_attribute_table): Rename.
8557
8558 2002-04-24  Jason Merrill  <jason@redhat.com>
8559
8560         PR c++/6331
8561         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
8562         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
8563         The pedwarn for array assignment is now unconditional.
8564         * tree.c (build_cplus_array_type_1): Still process simple array types
8565         normally in templates.
8566
8567         PR c++/6395
8568         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
8569         stuff for comdats.
8570
8571 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
8572
8573         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
8574         node with attributes.
8575
8576 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
8577
8578         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
8579         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
8580
8581 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
8582
8583         PR c++/6256:
8584         * pt.c (tsubst_friend_class): Handle templates with explicit
8585         nested names.
8586
8587         PR c++/6331:
8588         * typeck.c (merge_types): Remember the cv-qualification of pointer
8589         types when merging them.
8590
8591 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8592
8593         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
8594         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
8595         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
8596         cxx_mark_function_context): New.
8597         * decl.c (push_cp_function_context, pop_cp_function_context,
8598         mark_cp_function_context): Rename for consistency.
8599         (cxx_init_decl_processing): Don't set old hooks.
8600
8601 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8602
8603         * call.c (convert_type_from_ellipsis): Rename, update.
8604         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
8605         * cp-tree.h (convert_type_from_ellipsis): Rename.
8606         * decl.c (cxx_init_decl_processing): Don't set hook.
8607
8608 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8609
8610         * call.c (build_new_method_call): Update.
8611         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
8612         * cp-tree.h (cxx_incomplete_type_error): New.
8613         * decl.c (grokdeclarator, grokparms): Update.
8614         * decl2.c (check_classfn): Update.
8615         * pt.c (tsubst): Update.
8616         * typeck.c (complete_type_or_else, expr_sizeof,
8617         decay_conversion): Update.
8618         * typeck2.c (incomplete_type_error): Rename.
8619         (add_exception_specifier): Update.
8620
8621 2002-04-18  Jason Merrill  <jason@redhat.com>
8622
8623         PR c++/5658
8624         * search.c (setup_class_bindings): A class template qualifies as a
8625         type binding.
8626
8627 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
8628
8629         PR c++/6316
8630         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
8631         before expanding.
8632
8633 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
8634
8635         * init.c (begin_init_stmts): Remove commented out code.
8636         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
8637         * semantics.c (begin_gobal_stmt_expr): Adjust call to
8638         expand_start_stmt_expr.
8639
8640 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
8641
8642         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
8643         dso_handle itself, to __cxa_atexit.
8644
8645 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8646
8647         * error.c (cxx_print_error_function): Adjust call to macros.
8648
8649 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
8650
8651         * class.c (layout_virtual_bases): Do all dsize computation on trees.
8652
8653 2002-04-14  Jason Merrill  <jason@redhat.com>
8654
8655         * typeck.c (get_member_function_from_ptrfunc): Don't do
8656         gratuitious division and multiplication on
8657         ptrmemfunc_vbit_in_delta targets.
8658
8659 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
8660
8661         PR c++/5373.
8662         * semantics.c (finish_expr_stmt): Remember the type of the
8663         expression before any conversions are performed.
8664
8665 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
8666
8667         PR c++/5189.
8668         * call.c (add_template_candidate_real): Do not treat member
8669         templates as copy constructors.
8670
8671 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
8672
8673         * decl.c (duplicate_decls): Do not copy the RTL for a variable
8674         declaration if the old variable had an incomplete type and the new
8675         variable does not.
8676         (complete_vars): Do not call layout_decl for completed variables.
8677
8678 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
8679
8680         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
8681         with an explicit one.
8682         (follow_tag_typedef): New.
8683         (lookup_tag): Use it to extract the tag of an explicit typedef.
8684         (xref_tag): Likewise.
8685
8686 2002-04-11  Andrew Haley  <aph@redhat.com>
8687
8688         * typeck.c (type_after_usual_arithmetic_conversions):
8689         If two types have the same variant, return immediately.
8690         When two floating-point operands are the same precision:
8691           convert to float if one of the operands is float;
8692           if neither operand is one of the standard types, return the type
8693           of the first operand.
8694
8695 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
8696
8697         PR c++/5507
8698         * decl.c (make_typename_type): Remove implicit typenameness.
8699
8700 2002-04-09  Jason Merrill  <jason@redhat.com>
8701
8702         PR optimization/6189
8703         * semantics.c (genrtl_start_function): Don't free
8704         DECL_SAVED_FUNCTION_DATA for inline functions.
8705
8706         * init.c (build_member_call): For now, don't convert to
8707         intermediate base if it would cause an error.
8708
8709 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
8710
8711         * parse.y (namespace_qualifier, maybe_identifier,
8712         begin_explicit_instantiation, end_explicit_instantiation,
8713         apparent_template_type, .finish_template_type,
8714         do_id, maybe_init, defarg_again, component_decl_1):
8715         Add ending ';', in accordance with POSIX.
8716
8717 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
8718
8719         PR c++/5571
8720         * class.c (layout_class_type): Remember incomplete static
8721         variables.
8722         (finish_struct_1): Call complete_vars, not
8723         hack_incomplete_structures.
8724         * cp-tree.h (hack_incomplete_structures): Rename to ...
8725         (complete_vars): ... this.
8726         (struct saved_scope): Remove incomplete.
8727         (namespace_scope_incomplete): Remove.
8728         * decl.c (struct binding_level): Remove incomplete.
8729         (incomplete_vars): New variable.
8730         (mark_binding_level): Don't mark incomplete.
8731         (print_binding_level): Don't print it.
8732         (mark_saved_scope): Don't mark incomplete.
8733         (pushdecl): Use maybe_register_incopmlete_var.
8734         (cxx_init_decl_processing): Register incomplete_vars for GC.
8735         (start_decl_1): Clarify error message.
8736         (hack_incomplete_vars): Remove.
8737         (maybe_register_incomplete_var): New function.
8738         (complete_vars): Likewise.
8739
8740 2002-04-06  Jason Merrill  <jason@redhat.com>
8741
8742         PR c++/4934
8743         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
8744         set before checking it.
8745
8746         PR c++/525
8747         * init.c (build_member_call): Use build_scoped_ref.
8748         (resolve_offset_ref): Likewise.
8749         * call.c (build_scoped_method_call): Likewise.
8750         * tree.c (maybe_dummy_object): Kludge around current_class_type being
8751         wrong.
8752         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
8753         * cp-tree.h: Adjust.
8754
8755         * init.c (push_base_cleanups): Just use build_scoped_method_call.
8756
8757         PR c++/6179
8758         * method.c (implicitly_declare_fn): Pass unqualified type to
8759         synthesize_exception_spec.
8760
8761 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
8762
8763         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8764         * cvt.c: Update comment.
8765         * init.c (expand_cleanup_for_base): Update.
8766         * semantics.c (finish_parenthesized_expr): Update.
8767         * typeck.c (cp_truthvalue_conversion): Update.
8768
8769 2002-04-04  Jason Merrill  <jason@redhat.com>
8770
8771         * semantics.c (finish_eh_cleanup): New fn.
8772         * cp-tree.h: Add prototype.
8773         * init.c (perform_member_init, expand_cleanup_for_base): Use
8774         finish_eh_cleanup.
8775         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
8776         * cp-tree.h: Remove references.
8777         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
8778         * dump.c (cp_dump_tree): Likewise.
8779         * pt.c (tsubst_expr): Likewise.
8780         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
8781         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
8782         * tree.c (cp_statement_code_p): Likewise.
8783
8784         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
8785
8786         PR c++/5636
8787         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
8788         cleanup for nrv.
8789
8790         PR c++/5104
8791         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
8792         specifiers.
8793         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
8794
8795 2002-04-03  Richard Henderson  <rth@redhat.com>
8796
8797         * cp-lang.c (cxx_warn_unused_global_decl): New.
8798         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
8799
8800 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
8801
8802         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
8803         * tree.c (init_tree): Don't set hook.
8804
8805 2002-04-03  Roger Sayle  <roger@eyesopen.com>
8806
8807         PR c++/5998:
8808         * decl.c (duplicate_decls): Don't mess with assembler names when
8809         redeclaring builtin functions as static.
8810
8811 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8812
8813         * call.c (build_addr_func): Update.
8814         * class.c (resolve_address_of_overloaded_function): Update.
8815         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8816         * cp-tree.h (cxx_mark_addressable): New.
8817         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
8818         * decl2.c (build_cleanup): Update.
8819         * except.c (build_throw): Update.
8820         * init.c (resolve_offset_ref): Update.
8821         * pt.c (convert_nontype_argument): Update.
8822         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
8823         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
8824         unary_complex_lvalue): Update.
8825         (mark_addressable): Rename.
8826
8827 2002-04-01  Roger Sayle  <roger@eyesopen.com>
8828
8829         PR c++/5998:
8830         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
8831         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
8832         but follow the SET_DECL_RTL idiom used elsewhere in the function.
8833
8834 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8835
8836         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8837         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8838         * decl.c (grokdeclarator): Update.
8839         * mangle.c (write_integer_cst): Update.
8840         * typeck.c (build_binary_op): Update.
8841
8842 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
8843
8844         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
8845         * lex.c (cxx_init): Don't set hook.
8846
8847 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
8848
8849         * Make-lang.in (error.o): Update.
8850         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8851         * cp-tree.h (struct diagnostic_context): Predeclare.
8852         (cxx_print_error_function): New.
8853         * error.c: Include langhooks-def.h.
8854         (lang_print_error_function): Rename.  Update.
8855         (init_error): Don't set hook.
8856
8857 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
8858
8859         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
8860         Redefine.
8861         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
8862         * decl.c (finish_enum): Similarly.
8863         * error.c (dump_type): Similarly.
8864         * lex.c (cxx_init): Similarly.
8865         * mangle.c (write_builtin_type): Similarly.
8866         * typeck.c (comptypes): Similarly.
8867
8868 2002-03-28  Roger Sayle  <roger@eyesopen.com>
8869
8870         PR c++/5998:
8871         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
8872         in the g++ front-end.
8873         (duplicate_decl): Allow redefinition of anticipated built-ins.
8874         Fix inlining problem by over-writing the old DECL_RTL.
8875         (lookup_namespace_name): Fail to find an identifier in the
8876         specified namespace if its still anticipated.
8877         (builtin_function_1): New function split out from builtin_function
8878         to create a builtin in the current namespace with given context.
8879         (builtin_function): Call builtin_function_1 to define the
8880         appropriate builtins in both the std and global namespaces.
8881         (select_decl): Don't test for anticipated decls here.
8882         (unqualified_namespace_lookup): Instead ignore them whilst
8883         searching through scopes and namespaces.
8884         * decl2.c (do_nonmember_using_decl): If a using declaration
8885         specifies an anticipated built-in function, mark it as no longer
8886         anticipated in that scope.
8887         (ambiguous_decl):  Avoid resolving to an anticipated decl.
8888         * lex.c (do_scoped_id): Fail to find an identifier in the global
8889         namespace if its still anticipated.
8890
8891 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
8892
8893         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
8894         * cp-tree.h (cp_make_lang_type): Rename.
8895         * lex.c (cp_make_lang_type): Rename.
8896         (make_aggr_type): Update.
8897         * tree.c (init_tree): Don't set make_lang_type_fn.
8898
8899 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
8900
8901         PR c++/6073
8902         * class.c (finish_struct_1): Update static field's DECL_MODE even
8903         if its type is a variant of t.
8904
8905 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
8906
8907         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
8908         * cp-tree.h (cxx_insert_default_attributes): New.
8909         * decl.c (insert_default_attributes): Rename.
8910
8911 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
8912
8913         PR c++/4884
8914         * call.c (build_op_delete_call): Allow for the fact the placement
8915         may be a COMPOUND_EXPR.
8916
8917 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
8918
8919         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8920         * cp-tree.h (init_cplus_expand): Remove.
8921         (cxx_expand_expr): New.
8922         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
8923         fix prototype.
8924         (init_cplus_expand): Remove.
8925         * lex.c (cxx_init): Don't call init_cplus_expand.
8926
8927 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
8928
8929         PR c++/4884.
8930         * init.c (build_new_1): Allow for the fact the result of
8931         build_function_call may be a COMPOUND_EXPR.
8932
8933 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
8934
8935         PR c++/5682
8936         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
8937         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8938         (dfs_skip_nonprimary_vbases_markedp): Remove.
8939         * search.c (get_shared_vbase_if_not_primary): Remove.
8940         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8941         (dfs_skip_nonprimary_vbases_markedp): Remove.
8942         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
8943         (dfs_marked_real_bases_queue_p): Likewise.
8944
8945 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
8946
8947         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8948         * cp-tree.h (cxx_mark_tree): New.
8949         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
8950
8951 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8952
8953         * cp-tree.h (cxx_maybe_build_cleanup): New.
8954         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
8955         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
8956         * tree.c (build_target_expr): Update.
8957         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
8958
8959 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
8960
8961         * decl2.c (cxx_decode_option): Handle -E.
8962         * lang-specs.h (default_compilers): Preprocess with cc1plus.
8963         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
8964
8965 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
8966
8967         PR c++/6037
8968         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
8969
8970 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8971
8972         * error.c (dump_type): Be careful about implicit typenames.
8973
8974 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8975
8976         PR C++/3656
8977         * semantics.c (finish_base_specifier): Handle erronous base
8978         classes.
8979
8980 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
8981
8982         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
8983         REAL_IS_NOT_DOUBLE.
8984
8985 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
8986
8987         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
8988         an index into the vtable_entry array regardless of
8989         TARGET_PTRMEMFUNC_VBIT_LOCATION.
8990
8991 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
8992
8993         * tree.c (cp_cannot_inline_tree_fn): Same.
8994
8995 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
8996
8997         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8998         insert_block, getdecls, global_bindings_p): New.
8999
9000 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
9001
9002         PR c++/4361
9003         * mangle.c (struct globals) Add internal_mangling_p member.
9004         (write_template_param): Do internal mangling, if needed.
9005         (mangle_conv_op_name_for_type): Request internal mangling.
9006
9007 2002-03-20  Jason Merrill  <jason@redhat.com>
9008
9009         PR c++/2136
9010         * init.c (build_delete): Check access for a member op delete here.
9011         * decl2.c (delete_sanity): Not here.
9012
9013 2002-03-19  Jason Merrill  <jason@redhat.com>
9014
9015         PR c++/5118
9016         * class.c (get_vfield_name): Use the constructor_name.
9017
9018 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9019
9020         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9021         * cp-tree.h (lang_printable_name): Rename.
9022         * error.c (lang_decl_name): Use new hook.
9023         * lex.c (cxx_init): Remove old hook.
9024         * pt.c (tsubst_decl): Use new hook.
9025         * tree.c (lang_printable_name): Rename.
9026
9027 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
9028
9029         PR c++/3882
9030         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
9031         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
9032         only after recording the declaration.
9033
9034 2002-03-18  Jason Merrill  <jason@redhat.com>
9035
9036         PR c++/2039
9037         * init.c (resolve_offset_ref): Hand off to build_component_ref.
9038
9039         PR c++/4222, c++/5995
9040         * call.c (build_over_call): Fix empty class logic.
9041
9042         PR c++/3870
9043         * cp-tree.h (struct saved_scope): Add last_parms field.
9044         * decl.c (maybe_push_to_top_level): Save last_function_parms.
9045         (pop_from_top_level): Restore it.
9046
9047         PR c++/4377
9048         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
9049         NON_LVALUE_EXPRs.
9050
9051         PR c++/4003
9052         * pt.c (tsubst_friend_function): Use decl_namespace_context.
9053
9054         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
9055         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
9056         type with a nontrivial destructor.
9057
9058 2002-03-17  Jason Merrill  <jason@redhat.com>
9059
9060         PR c++/4460
9061         * class.c (build_base_path): Virtual base layout is fixed in
9062         in-charge [cd]tors.
9063
9064 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
9065
9066         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9067         * parse.y (yyparse): Remove macro.
9068
9069 2002-03-17  Jason Merrill  <jason@redhat.com>
9070
9071         PR c++/5757
9072         * init.c (build_new_1): Pass the right pointer to op delete.
9073
9074 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
9075
9076         PR c++/4361
9077         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
9078         conversion operators go.
9079         (struct lang_decl_flags): Add template_conv_p and unused
9080         bitfields.
9081         (DECL_TEMPLATE_CONV_FN_P): New macro.
9082         * call.c (build_user_type_conversion_1): Don't check second type
9083         conversion of overload set first.
9084         * class.c (add_method): Make sure templated conversion operators
9085         all end up on slot 2.
9086         * lex.c (do_identifier): A conversion operator token might be
9087         satisfied by a templated conversion operator.
9088         * pt.c (check_explicit_specialization): Use
9089         CLASSTYPE_FIRST_CONVERSION_SLOT.
9090         (template_parm_this_level_p): New function.
9091         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
9092         * search.c (lookup_fnfields_1): Template conversions will be on
9093         the first slot.
9094         * typeck.c (build_component_ref): Preserve the type of an
9095         conversion operator name on the overload type.
9096         (build_x_function_call): Retrieve the conversion operator name.
9097
9098 2002-03-15  Richard Henderson  <rth@redhat.com>
9099
9100         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
9101
9102 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
9103
9104         * cp-tree.h (CLEANUP_DECL): Remove.
9105         (CLEANUP_EXPR): Likewise.
9106         * decl.c (destroy_local_var): Simplify.
9107         (maybe_build_cleanup): Tidy.
9108         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
9109         * semantics.c (cp_expand_stmt): Likewise.
9110         * cp/tree.c (cp_statement_code_p): Likewise.
9111
9112 2002-03-15  Jason Merrill  <jason@redhat.com>
9113
9114         PR c++/5857
9115         * decl.c (duplicate_decls): Use merge_types instead of common_type.
9116         * typeck.c (common_type): Just hand off to
9117         type_after_usual_arithmetic_conversions and
9118         composite_pointer_type.
9119         (merge_types): New fn.
9120         (commonparms): Use it instead of common_type.
9121         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
9122         (composite_pointer_type): Also handle attributes.
9123         * cp-tree.h: Declare merge_types.
9124
9125         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
9126         variables.
9127         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
9128
9129 2002-03-14  Richard Henderson  <rth@redhat.com>
9130
9131         * decl.c: Include c-pragma.h.
9132         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
9133         * Make-lang.in: Update dependencies.
9134
9135 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
9136
9137         PR c++/5908
9138         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
9139         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
9140
9141 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
9142
9143         * mangle.c (write_builtin_type): Handle 128-bit integers even if
9144         they are not a standard integer type.
9145
9146 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
9147
9148         * cp-tree.h (init_init_processing): Remove declaration.
9149         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
9150         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
9151
9152 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9153
9154         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
9155         Define.
9156         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
9157         tree_code_length.
9158         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
9159         cplus_tree_code_name): Delete.
9160         (cxx_init): Don't call add_c_tree_codes, instead set
9161         lang_unsafe_for_reeval.  Don't try to copy into the various
9162         tree_code arrays.
9163
9164 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
9165
9166         PR c++/5659
9167         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
9168         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
9169         definitions.
9170
9171 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
9172
9173         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
9174         DR209 is now not a defect.
9175         * cp-tree.h (skip_type_access_control): Remove.
9176         * decl.c (grokdeclarator): Do type access control for friend
9177         declarations.
9178         * semantics.c (decl_type_access_control): Don't reset
9179         current_type_lookups.
9180         (save_type_access_control): Always save the lookups.
9181         (skip_type_access_control): Remove.
9182         (finish_class_definition): Don't change type_lookups.
9183
9184 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
9185
9186         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
9187         It is incorrect.
9188         * typeck.c (build_static_cast): Compare non-qualified types
9189         with pointer to member conversions.
9190
9191 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
9192             Daniel Berlin  <dan@dberlin.org>
9193
9194         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
9195         (cxx_get_alias_set): Use it.
9196
9197 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9198
9199         * cp-tree.h (stabilize_expr): Prototype.
9200
9201 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9202
9203         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
9204         conditional return void.
9205
9206 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
9207
9208         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
9209         * cp-tree.h (cxx_unsave): New.
9210         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
9211         (init_tree): Update.
9212
9213 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9214
9215         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
9216         explicit sizeof/sizeof.
9217         * decl2.c (cxx_decode_option): Likewise.
9218         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
9219
9220 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9221
9222         PR c++/775
9223         * decl.c (lookup_tag): Only reject enum/class mismatch, not
9224         class/union mismatch.
9225         * parse.y (check_class_key): New function.
9226         (structsp): Call it.
9227
9228 2002-03-01  Michael Matz  <matz@suse.de>
9229
9230         * typeck.c (cp_pointer_int_sum): Complete inner type which is
9231         used later by size_in_bytes().
9232
9233 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
9234
9235         * cp-tree.h:  Require __GNUC__ to be #defined.
9236         (build_init):  Add missing prototype.
9237
9238 2002-03-01  Jason Merrill  <jason@redhat.com>
9239
9240         * except.c: Don't include decl.h or obstack.h.  Do include
9241         tree-inline.h.
9242         (build_throw): Destroy temporaries from the thrown
9243         expression before calling __cxa_throw.  Construct a thrown
9244         temporary directly into the exception object.
9245         (stabilize_throw_expr): New function.
9246         (wrap_cleanups_r): New function.
9247         * tree.c (stabilize_expr): New function.
9248         * init.c (build_init): New function.
9249         * Make-lang.in (cp/except.o): Adjust .h deps.
9250
9251 2002-02-28  Jason Merrill  <jason@redhat.com>
9252
9253         * search.c (lookup_base_r): Don't clear is_non_public just because
9254         we found a friendly scope.
9255
9256         * decl.c (finish_function): Only warn about missing return
9257         statement with -Wreturn-type.
9258
9259 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
9260
9261         * class.c (build_clone): Update.
9262         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9263         * cp-tree.h (cxx_dup_lang_specific_decl): New.
9264         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
9265         (copy_decl): Update.
9266         * method.c (make_thunk): Update.
9267
9268 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
9269
9270         * decl2.c: Delete traditional-mode-related code copied from
9271         the C front end but not used, or used only to permit the
9272         compiler to link.
9273
9274 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
9275
9276         PR c++/4093
9277         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
9278         to void.
9279
9280 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
9281
9282         PR other/5746
9283         * semantics.c (finish_switch_cond): Don't call get_unwidened
9284         if error_mark_node.
9285
9286 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
9287
9288         PR c++/2645, DR 295
9289         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
9290         tf_keep_type_decl.
9291         (make_typename_type): Use tsubst_flags_t.
9292         * decl.c (make_typename_type): Adjust. Return non-artificial
9293         TYPE_DECLs, if required.
9294         (grokdeclarator): Simplify CVR qualification handling. Allow bad
9295         qualifiers on typedef types.
9296         * decl2.c (handle_class_head): Adjust make_typename_type call.
9297         * parse.y (nested_name_specifier): Likewise.
9298         (typename_sub0): Likewise.
9299         (typename_sub1): Likewise.
9300         * pt.c (convert_template_argument): Adjust make_typename_type
9301         return value.
9302         (tsubst): Adjust cp_build_qualified_type_real calls.
9303         (check_cv_quals_for_unify): Cope with allowing bad qualifications
9304         on template type parms.
9305         (instantiate_decl): Recheck substitutions to give warnings on bad
9306         qualifications.
9307         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
9308
9309 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
9310
9311         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
9312
9313         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
9314         unless DECL_ALWAYS_INLINE.
9315
9316 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
9317
9318         * typeck.c (cp_pointer_int_sum): Renamed from
9319         pointer_int_sum, call pointer_int_sum.
9320
9321 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
9322
9323         * decl.c (duplicate_decls): Return 0 if issued error about
9324         redeclaration.
9325
9326 2002-02-19  Jason Merrill  <jason@redhat.com>
9327
9328         ABI change: Mangle `void (A::*)() const' as
9329         M1AKFvvE, not MK1AFvvE.
9330         * mangle.c (write_function_type): Write cv-quals for member
9331         function type here.
9332         (write_pointer_to_member_type): Not here.
9333
9334 2002-02-18  Jason Merrill  <jason@redhat.com>
9335
9336         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
9337         (do_decl_instantiation): Likewise.
9338
9339 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9340
9341         PR c++/5685
9342         * decl.c (duplicate_decls): Make warning unconditional
9343         if duplicate default argument declarations are present.
9344
9345 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
9346
9347         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
9348         shortening.
9349
9350 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
9351
9352         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
9353         remove incorrect comment. Move #if 0'd code to common path. Use
9354         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
9355
9356 2002-02-13  Jason Merrill  <jason@redhat.com>
9357
9358         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
9359         (finish_function): Don't warn if current_function_returns_null.
9360
9361         * typeck2.c (digest_init): Do handle values of vector type.
9362
9363         * typeck2.c (digest_init, process_init_constructor): Treat vectors
9364         like arrays.
9365
9366 2002-02-11  Jason Merrill  <jason@redhat.com>
9367
9368         * parse.y (reserved_declspecs): Don't handle attributes.
9369         (reserved_typespecquals): Handle them here.
9370         * Make-lang.in (parse.c): Adjust expected conflicts.
9371
9372 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
9373
9374         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
9375         instead of compstmt.
9376         (compstmt_or_stmtexpr): Renamed from compstmt.
9377         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
9378
9379 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
9380
9381         Rename instantiate_type_flags to tsubst_flags_t & expand use.
9382         * cp-tree.h (instantiate_type_flags): Rename to ...
9383         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
9384         add tf_warning flag.
9385         (instantiate_type): Adjust prototype.
9386         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
9387         do_type_instantiation, cp_build_qualified_type_real): Likewise.
9388         cp_build_qualified_type: Adjust.
9389         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
9390         tf_*.
9391         * call.c (standard_conversion): Rename itf_* to tf_*.
9392         (reference_binding): Likewise.
9393         (convert_like_real): Likewise.
9394         * cvt.c (cp_convert_to_pointer): Likewise.
9395         (convert_to_reference): Likewise.
9396         * decl.c (lookup_namespace_name): Use tf_* flags.
9397         (make_typename_type): Likewise.
9398         (grokdeclarator): Likewise.
9399         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
9400         (coerce_template_template_parms, convert_template_argument,
9401         coerce_template_parms, maybe_get_template_decl_from_type_decl,
9402         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
9403         instantiate_class_template, tsubst_template_arg_vector,
9404         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
9405         tsubst_decl, tsubst_arg_types, tsubst_function_type,
9406         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
9407         instantiate_template, fn_type_unification,
9408         resolve_overloaded_unification, verify_class_unification,
9409         unify, get_bindings_real, do_type_instantiation,
9410         regenerate_decl_from_template, instantiate_decl,
9411         tsubst_initializer_list, tsubst_enum,
9412         get_mostly_instantiated_function_type,
9413         invalid_nontype_parm_type_p): Likewise.
9414         * tree.c (cp_build_qualified_type_real): Likewise.
9415         * typeck.c (build_binary_op): Rename itf_* to tf_*.
9416         (build_ptrmemfunc): Likewise.
9417         (convert_for_assignment): Likewise.
9418
9419 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
9420
9421         PR c++/109
9422         * decl.c (grokdeclarator): Allow friend declarations from
9423         dependent types.
9424         * decl2.c (handle_class_head): Don't push into template parm contexts.
9425         * pt.c (push_template_decl_real): Template parm contexts are never
9426         being defined.
9427
9428 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
9429
9430         * class.c: Include target.h.
9431         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
9432         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
9433         bit-field layout.
9434         * Make-lang.in: Adjust deps.
9435
9436 2002-02-05  Jason Merrill  <jason@redhat.com>
9437
9438         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
9439
9440 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
9441
9442         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
9443         (finish_switch_cond): Set SWITCH_TYPE.
9444
9445 2002-02-04  Richard Henderson  <rth@redhat.com>
9446
9447         * method.c (use_thunk): Always initialize the block tree.  Reindent.
9448         * semantics.c (expand_body): Emit thunks after function, not before.
9449
9450 2002-02-04  Jason Merrill  <jason@redhat.com>
9451
9452         * decl.c (start_function): Call cplus_decl_attributes immediately
9453         after grokdeclarator.
9454
9455         * decl.c (start_function): Combine DECL_RESULT handling code.
9456
9457 2002-02-03  Jason Merrill  <jason@redhat.com>
9458
9459         * xref.c: Remove.
9460         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
9461         (cp/xref.o): Remove dependencies.
9462         * class.c (finish_struct_1, check_methods): Don't call xref fns.
9463         (finish_struct_1): Likewise.
9464         * friend.c (make_friend_class): Likewise.
9465         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
9466         * spew.c (read_process_identifier): Likewise.
9467
9468 2002-02-01  Jason Merrill  <jason@redhat.com>
9469
9470         PR c++/4872
9471         * decl.c (finish_function): Warn about a non-void function with
9472         no return statement and no abnormal exit.
9473         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
9474         (current_function_returns_abnormally): New macro.
9475         * call.c (build_call): Set it.
9476
9477         * typeck.c (build_component_ref): Always complain about offsetof
9478         constructs on non-PODs.  Only make it an error for members of
9479         virtual bases.
9480
9481         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
9482         (dump_function_decl): Always dump parms.
9483
9484         * decl2.c (finish_static_data_member_decl): Complain about a local
9485         class with a static data member.
9486
9487         PR c++/4286
9488         * search.c (lookup_field_1): Don't xref a static data member
9489         just because we looked it up.
9490
9491 2002-01-31  Jason Merrill  <jason@redhat.com>
9492
9493         * Make-lang.in (parse.c): Handle .output file.
9494
9495         PR c++/3395
9496         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
9497         not TREE_TYPE.
9498         * semantics.c (finish_class_definition): Adjust.
9499
9500         Allow attributes in parms and casts.
9501         * parse.y (named_parm): Don't strip attrs.
9502         (declmods): Remove 'attributes' production.
9503         (nonempty_cv_qualifiers): Accept attributes.
9504         (ATTRIBUTE): Give precedence.
9505         * decl.c (groktypename): Handle attributes.
9506         (grokparms): Likewise.
9507
9508 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
9509
9510         * decl2.c (cxx_decode_option): Pass 0 as last argument to
9511         cpp_handle_option.
9512         * lang-specs.h: Use cpp_unique_options instead of cpp_options
9513         when used together with cc1_options.
9514
9515 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
9516
9517         PR c++/5132
9518         * typeck2.c (digest_init): Make sure non-array core type is
9519         instantiated.
9520         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
9521         constructor, rather than build a new one.
9522         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
9523         PURPOSE of constructor elts.
9524
9525 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
9526
9527         * Make-lang.in (parse.c): Adjust expected number of
9528         shift-reduce conflicts.
9529         (decl.o): Depend on diagnostic.h.
9530         * decl.c: Include diagnostic.h.
9531         (grokdeclarator): Check for null pointer.
9532         (finish_function): Don't abort when
9533         current_binding_level->parm_flag != 1, if errors have
9534         occurred; throw away the statement tree and extra binding
9535         levels, and continue.
9536         * lex.c (note_list_got_semicolon): Check for null pointer.
9537         * method.c (hack_identifier): Just return error_mark_node if
9538         value is error_mark_node.
9539         * parse.y (primary: TYPEID(type_id)): No need to use
9540         TYPE_MAIN_VARIANT here.
9541         (handler_seq): Accept an empty list of catch clauses and
9542         generate a fake handler block to avoid later crashes.
9543         (ansi_raise_identifier): Accept the error token too.
9544         * semantics.c (begin_class_definition,
9545         finish_class_definition): Check for error_mark_node.
9546
9547 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
9548
9549         * typeck2.c (friendly_abort): Delete definition.
9550         * cp-tree.h (friendly_abort): Don't prototype.
9551         (my_friendly_assert): Use fancy_abort.
9552
9553 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9554
9555         * cp-tree.h (my_friendly_abort): Remove.
9556
9557 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
9558
9559         * spew.c (pending_inlines, pending_inlines_tail,
9560         processing_these_inlines): Make static.
9561         (mark_pending_inlines): Remove static.
9562         (begin_parsing_inclass_inline): If in function, save pi
9563         for GC to cp_function_chain->unparsed_inlines instead.
9564         (process_next_inline): Likewise.
9565         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
9566         (mark_pending_inlines): Add prototype.
9567         * decl.c (spew_debug): Remove unused extern.
9568         (mark_lang_function): Call mark_pending_inlines.
9569
9570 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9571
9572         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
9573         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
9574         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
9575         Change my_fancy_abort() to abort().
9576
9577 2002-01-23  Jason Merrill  <jason@redhat.com>
9578
9579         PR c++/5453
9580         * class.c (fixed_type_or_null): Fix thinko.
9581
9582         PR c++/3331
9583         * init.c (resolve_offset_ref): Use build_indirect_ref.
9584
9585         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
9586
9587 2002-01-22  Jason Merrill  <jason@redhat.com>
9588
9589         * parse.y (function_body): Suppress the block for the outermost
9590         curly braces.
9591         * decl.c (pushdecl): Don't try to skip it.
9592         (begin_function_body): Keep the block we create, not the next one.
9593         * init.c (emit_base_init): Don't mess with keep_next_level.
9594
9595         * class.c (build_base_path): Tweak formatting.
9596
9597 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9598
9599         Fix regression introduced with patch for c++/775
9600         * parse.y (class_head_defn): Check for template specializations
9601         with a different class-key.
9602
9603 2002-01-17  Jason Merrill  <jason@redhat.com>
9604
9605         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
9606         (begin_function_body): Call them and keep_next_level.
9607         * init.c (emit_base_init): Call keep_next_level.
9608         * semantics.c (setup_vtbl_ptr): Lose.
9609         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
9610         (vtbls_set_up_p): Lose.
9611         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
9612         * method.c (do_build_copy_constructor): Likewise.
9613         (synthesize_method): Call finish_mem_initializers.
9614         * parse.y (nodecls): Likewise.
9615
9616         * error.c (dump_type_suffix): Print the exception specs before
9617         recursing.
9618         (dump_function_decl): Here, too.
9619
9620         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
9621
9622 2002-01-10  Ira Ruben   <ira@apple.com>
9623
9624         PR c++/907
9625         * decl.c (start_method): Handle attrlist.
9626
9627 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
9628
9629         * decl2.c (max_tinst_depth): Increase default limit to 500.
9630
9631 2002-01-10  Graham Stott  <grahams@redhat.com>
9632
9633         * spew.c (YYCHAR): Uppercase macro parameter and add
9634         parenthesis.
9635         (YYCODE): Likewise.
9636         (NAME): Uppercase macro parameter.
9637
9638 2002-01-09  Graham Stott  <grahams@redhat.com>
9639
9640         * decl.h (grokdeclarator): Wrap long line.
9641
9642         * semantics.c (FINISH_COND): Uppercase macro paramaters and
9643         add parenthesis.
9644
9645 2002-01-08  Graham Stott  <grahams@redhat.com>
9646
9647         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
9648         (PALLOC): Uppercase macro parameter and whitespace.
9649         (SALLOC): Uppercase macro parameter.
9650         (SFREE): Uppercase macros parameter, add parenthese and
9651         whitespace.
9652         (STREQL): Uppercase macro parameter and whitespace.
9653         (STRNEQ): Likewise.
9654         (STRLSS): Likewise.
9655         (STRLEQ): Likewise.
9656         (STRGTR): Likewise.
9657         (STRGEQ): Likewise.
9658
9659         * call.c (convert_like): Add parenthesis and wrap.
9660         (convert_like_with_context): Likewise.
9661         (ICS_RANK): Whitespace.
9662         (NEED_TEMPORARY_P): Remove parenthesis.
9663
9664         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
9665         whitespace.
9666         (VTT_MARKED_BINFO_P): Likewise.
9667
9668         * decl.c (BINDING_LEVEL): Add parenthesis.
9669         (DEF_OPERATOR): Likewise.
9670
9671         * mangle.c (MANGLE_TRACE): Add parenthesis.
9672         (MANGLE_TRACE_TREE): Likewise.
9673         (write_signed_number): Likewise.
9674         (write_unsigned_number): Likewise.
9675
9676         * pt.c (ccat): Uppercase macro parameter.
9677         (cat): Likewise
9678
9679         * search.c (SET_BINFO_ACCESS): Add parenthesis.
9680
9681 2002-01-07  Jason Merrill  <jason@redhat.com>
9682
9683         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
9684         to pedwarn.
9685
9686         PR c++/3536
9687         * method.c (make_thunk): If !flag_weak, give the thunk the
9688         function's linkage.
9689         (use_thunk): Here, too.
9690
9691 2002-01-07  Graham Stott  <grahams@redhat.com>
9692
9693         * error.c: Update copyright date.
9694         (print_scope_operator): Add parenthesis.
9695         (print_left_paren): Likewise.
9696         (print_right_paren): Likewise.
9697         (print_left_bracket): Likewise.
9698         (print_right_bracket): Likewise.
9699         (print_template_argument_list_start): Likewise.
9700         (print_template_argument_list_end): Likewise.
9701         (print_non_consecutive_character): Likewise.
9702         (print_tree_identifier): Likewise.
9703         (print_identifier): Likewise.
9704         (NEXT_CODE): Uppercase macro parameter.
9705         (ident_fndecl): Delete unused.
9706         (GLOBAL_THING): Likewise.
9707
9708 2002-01-06  Graham Stott  <grahams@redhat.com>
9709
9710         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
9711         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
9712         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
9713         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
9714         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
9715         (C_IS_RESERVED_WORD): Uppercase macro parameter.
9716         (C_RID_YYCODE) Likewise.
9717         (ptrmem_cst): Use rtx.
9718         (LOCAL_BINDING_P): Add whitespace.
9719         (INHERITED_VALUE_BINDING_P): Likewise.
9720         (BINDING_SCOPE): Wrap long line.
9721         (BINDING_HAS_LEVEL_P): Remove parenthesis.
9722         (BINDING_VALUE): Wrap long line.
9723         (BINDING_TYPE): Whitespace.
9724         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
9725         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
9726         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
9727         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
9728         (same_type_p): Uppercase macro parameters.
9729         (same_type_ignoring_top_level_qualifiers_p): Likewise.
9730         (OVL_FUNCTION): Wrap long line.
9731         (OVL_CHAIN): Whitespace.
9732         (OVL_CURRENT): Add parenthesis and whitespace.
9733         (OVL_NEXT): Whitespace.
9734         (OVL_USED): Likewise.
9735         (IDENTIFIER_TYPE_VALUE): Likewise.
9736         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
9737         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
9738         (LANG_ID_FIELD): Whitespace.
9739         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
9740         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
9741         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
9742         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
9743         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
9744         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
9745         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
9746         (IDENTIFIER_VIRTUAL_P): Likewise.
9747         (IDENTIFIER_OPNAME_P): Likewise.
9748         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
9749         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
9750         (C_SET_EXP_ORIGINAL_CODE): Likewise.
9751         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
9752         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
9753         (IS_AGGR_TYPE): Uppercase macro parameter.
9754         (CLASS_TYPE_P): Likewise.
9755         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
9756         (IS_AGGR_TYPE_2): Whitespace.
9757         (TAGGED_TYPE_P): Uppercase macro parameter.
9758         (TYPE_BUILT_IN): Whitespace.
9759         (TYPE_FOR_JAVA): Likewise.
9760         (FUNCTION_ARG_CHAIN): Remove parenthesis.
9761         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
9762         (FUNCTION_FIRST_USER_PARAM): Likewise.
9763         (PROMOTES_TO_AGGR_TYPE): Whitespace.
9764         (DERIVED_FROM_P): Add parenthesis and wrap.
9765         (UNIQUELY_DERIVED_FROM_P): Likewise.
9766         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
9767         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
9768         (CLASSTYPE_USE_TEMPLATE): Whitespace.
9769         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
9770         (TYPE_GETS_DELETE): Add parenthesis.
9771         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
9772         (TYPE_HAS_ASSIGN_REF): Likewise,
9773         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
9774         (TYPE_HAS_INIT_REF): Likewise.
9775         (TYPE_HAS_CONST_INIT_REF): Likewise.
9776         (TYPE_BEING_DEFINED): Likewise.
9777         (TYPE_LANG_SPECIFIC): Likewise.
9778         (CLASSTYPE_RTTI): Likewise.
9779         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
9780         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
9781         (TYPE_OVERLOADS_ARROW): Likewise.
9782         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
9783         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
9784         (CLASSTYPE_METHOD_VEC): Likewise.
9785         (CLASSTYPE_MARKED_N): Likewise.
9786         (CLASSTYPE_MARKED): Likewise.
9787         (CLASSTYPE_MARKED2): Likewise.
9788         (CLASSTYPE_MARKED3): Likewise.
9789         (CLASSTYPE_MARKED4): Likewise.
9790         (CLASSTYPE_MARKED5): Likewise.
9791         (CLASSTYPE_MARKED6): Likewise.
9792         (SET_CLASSTYPE_MARKED): Whitespace.
9793         (CLEAR_CLASSTYPE_MARKED): Likewise.
9794         (SET_CLASSTYPE_MARKED2): Likewise.
9795         (CLEAR_CLASSTYPE_MARKED2): Likewise.
9796         (SET_CLASSTYPE_MARKED3): Likewise.
9797         (CLEAR_CLASSTYPE_MARKED3): Likewise.
9798         (SET_CLASSTYPE_MARKED4): Likewise.
9799         (CLEAR_CLASSTYPE_MARKED4): Likewise.
9800         (SET_CLASSTYPE_MARKED5): Likewise.
9801         (CLEAR_CLASSTYPE_MARKED5): Likewise.
9802         (SET_CLASSTYPE_MARKED6): Likewise.
9803         (CLEAR_CLASSTYPE_MARKED6): Likewise.
9804         (CLASSTYPE_TAGS): Likewise.
9805         (CLASSTYPE_VSIZE): Likewise.
9806         (CLASSTYPE_VBASECLASSES): Likewise.
9807         (CANONICAL_BINFO): Add parenthesis.
9808         (CLASSTYPE_SIZE(NODE): Likewise.
9809         (CLASSTYPE_SIZE_UNIT): Likewise.
9810         (CLASSTYPE_ALIGN(NODE): Likewise.
9811         (CLASSTYPE_USER_ALIGN): Likewise.
9812         (TYPE_JAVA_INTERFACE): Likewise.
9813         (CLASSTYPE_PURE_VIRTUALS): Likewise.
9814         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
9815         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
9816         (CLASSTYPE_HAS_MUTABLE): Likewise.
9817         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
9818         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
9819         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
9820         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
9821         (CLASSTYPE_INTERFACE_ONLY): Likewise.
9822         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
9823         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9824         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
9825         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9826         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
9827         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
9828         (BINFO_UNSHARED_MARKED): Whitespace.
9829         (BINFO_MARKED): Whitespace and wrap.
9830         (SET_BINFO_MARKED): Likewise.
9831         (CLEAR_BINFO_MARKED): Likewise.
9832         (BINFO_VTABLE_PATH_MARKED): Likewise.
9833         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
9834         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
9835         (BINFO_SUBVTT_INDEX): Remove parenthesis.
9836         (BINFO_VPTR_INDEX): Likewise.
9837         (BINFO_PRIMARY_BASE_OF): Likewise,
9838         (CLASSTYPE_VFIELDS): Whitespace.
9839         (VF_DERIVED_VALUE): Wrap long line.
9840         (NAMESPACE_LEVEL): Whitespace.
9841         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
9842         (DEFARG_POINTER): Whitespace.
9843         (DECL_NEEDED_P): Remove parenthesis.
9844         (DECL_LANGUAGE): Whitespace.
9845         (SET_DECL_LANGUAGE): Add parenthesis.
9846         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
9847         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
9848         (DECL_IN_AGGR_P): Whitespace.
9849         (DECL_FRIEND_P): Likewise.
9850         (DECL_BEFRIENDING_CLASSES): Likewise.
9851         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
9852         (DECL_NONCONVERTING_P): Whitespace.
9853         (DECL_PURE_VIRTUAL_P): Likewise.
9854         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
9855         (DECL_PENDING_INLINE_INFO): Whitespace.
9856         (DECL_SORTED_FIELDS): Likewise.
9857         (DECL_DEFERRED_FN): Likewise.
9858         (DECL_TEMPLATE_INFO): Likewise.
9859         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
9860         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
9861         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
9862         (TMPL_ARGS_LEVEL): Likewise.
9863         (SET_TMPL_ARGS_LEVEL): Likewise.
9864         (INNERMOST_TEMPLATE_PARMS): Whitespace.
9865         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
9866         (INTEGRAL_CODE_P(CODE): Add parenthesis.
9867         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
9868         (TYPE_HAS_CONSTRUCTOR): Whitespace.
9869         (TREE_HAS_CONSTRUCTOR): Likewise.
9870         (TYPE_HAS_DESTRUCTOR): Likewise.
9871         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
9872         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
9873         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
9874         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
9875         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
9876         (TYPE_PTRMEMFUNC_P): Likewise.
9877         (TYPE_PTRMEMFUNC_FLAG): Likewise.
9878         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
9879         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
9880         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
9881         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
9882         (DECL_ACCESS): Whitespace.
9883         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
9884         (DECL_GLOBAL_DTOR_P): Likewise.
9885         (GLOBAL_INIT_PRIORITY): Likewise.
9886         (DECL_TEMPLATE_PARMS): Likewise.
9887         (DECL_TEMPLATE_RESULT): Likewise.
9888         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
9889         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
9890         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
9891         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
9892         (PRIMARY_TEMPLATE_P): Add parenthesis.
9893         (DECL_USE_TEMPLATE): Whitespace.
9894         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
9895         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
9896         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
9897         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
9898         (CALL_DECLARATOR_PARMS): Remove parenthesis.
9899         (CALL_DECLARATOR_QUALS): Likewise.
9900         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
9901         (TEMP_NAME_P): Wrap.
9902         (VFIELD_NAME_P): Likewise.
9903         (B_SET): Uppercase macro parameters and add parenthesis.
9904         (B_CLR): Likewise.
9905         (B_TST): Likewise.
9906         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
9907         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
9908         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
9909         (same_or_base_type_p): Likewise.
9910         (cp_deprecated): Likewise.
9911
9912 2002-01-05  Richard Henderson  <rth@redhat.com>
9913
9914         * semantics.c (expand_body): Revert last change.
9915
9916 2002-01-04  Jason Merrill  <jason@redhat.com>
9917
9918         PR c++/4122
9919         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
9920         lost primary.
9921
9922         * class.c (build_vtbl_initializer): Check for a lost primary
9923         before calculating the vtable entry to throw away.
9924
9925 2002-01-02  Jason Merrill  <jason@redhat.com>
9926
9927         * semantics.c (expand_body): Call outlining_inline_function when
9928         emitting an inline function out of line.
9929
9930 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9931
9932         PR c++/5116, c++/764 reversion
9933         * call.c (build_new_op): Revert the instantiations. They are
9934         incorrect.
9935
9936 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9937
9938         PR c++/5089
9939         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
9940
9941 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9942
9943         PR c++/3716
9944         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
9945         (tsubst, case POINTER_TYPE): Handle pmfs here.
9946         (tsubst, case OFFSET_TYPE): Check it is not an offset to
9947         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
9948
9949 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9950
9951         PR c++/35
9952         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
9953         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
9954         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
9955         PARM_DECL.
9956         (tsubst_template_parms): Break up loop statements.
9957         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
9958         parm PARM_DECLs don't get promoted.
9959
9960 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9961
9962         PR c++/5123
9963         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
9964         (build_x_function_call): Cope with a COMPONENT_REF containing a
9965         TEMPLATE_ID_EXPR.
9966
9967 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9968
9969         PR c++/5213
9970         * pt.c (convert_template_argument): Be more careful determining
9971         when RECORD_TYPE templates are or are not templates.
9972
9973 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9974
9975         PR c++/775
9976         * cp-tree.h (handle_class_head): Adjust prototype.
9977         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
9978         parameters. Use for all class heads.
9979         * parse.y (named_class_head_sans_basetype, named_class_head,
9980         named_complex_class_head_sans_basetype,
9981         named_class_head_sans_basetype_defn,
9982         unnamed_class_head): Remove.
9983         (class_head, class_head_apparent_template): Recognize class heads
9984         (class_head_decl, class_head_defn): New reductions. Process class
9985         heads.
9986         (structsp): Adjust class definition and class declaration
9987         reductions.
9988         (maybe_base_class_list): Give diagnostic on empty list.
9989
9990 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9991
9992         PR c++/4379
9993         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
9994         single non-static member.
9995         (unary_complex_lvalue): If it cannot be a pointer to member, don't
9996         make it so. Check it is not pointer to reference.
9997
9998 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9999
10000         PR c++/5132
10001         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
10002         are processing a template decl.
10003
10004 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10005
10006         PR c++/5116, c++/764
10007         * call.c (build_new_op): Make sure template class operands are
10008         instantiated. Simplify arglist construction.
10009
10010 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10011
10012         * call.c (build_user_type_conversion_1): Use my_friendly_assert
10013         rather than if ... abort.
10014         * cvt.c (convert_to_reference): Likewise.
10015         * semantics.c (setup_vtbl_ptr): Likewise.
10016         * pt.c (lookup_template_class): Comment typo.
10017
10018 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10019
10020         PR c++/5125
10021         * pt.c (push_template_decl_real): Make sure DECL has
10022         DECL_LANG_SPECIFIC.
10023
10024 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10025
10026         PR c++/335
10027         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
10028         for non-reference fields.
10029         * typeck.c (require_complete_type): Use resolve_offset_ref).
10030
10031 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
10032
10033         PR c++/196
10034         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
10035
10036 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
10037
10038         PR c++/160
10039         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
10040         up. Don't stabilize_references when initializing a reference.
10041
10042 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10043
10044         * decl2.c (lang_f_options): Const-ify.
10045
10046 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
10047
10048         * config-lang.in (diff_excludes): Remove.
10049
10050 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
10051
10052         PR c++/90
10053         * typeck.c (build_function_call_real): Use original function
10054         expression for errors.
10055
10056 2001-12-18  Jason Merrill  <jason@redhat.com>
10057
10058         PR c++/3242
10059         * class.c (add_method): Do compare 'this' quals when trying to match a
10060         used function.  Don't defer to another used function.
10061
10062 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
10063
10064         * pt.c (instantiate_clone): Remove, fold into ...
10065         (instantiate_template): ... here. Simplify by removing mutual
10066         recursion.
10067         * typeck2.c (build_m_component_ref): Don't cv qualify the function
10068         pointed to by a pointer to function.
10069         * class.c (delete_duplicate_fields_1): Typo.
10070
10071 2001-12-18  Jason Merrill  <jason@redhat.com>
10072
10073         C++ ABI change: destroy value arguments in caller.
10074         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
10075         create an extra binding level for the parameters.
10076         * decl.c (store_parm_decls): Don't do parameter cleanups.
10077
10078 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
10079
10080         * call.c (build_new_method_call): Use '%#V'.
10081         * error.c (cv_to_string): Use V parameter to determine padding.
10082
10083 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
10084
10085         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
10086         spellings in messages.
10087
10088 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
10089
10090         * cp-tree.h: Delete #defines for cp_error, cp_warning,
10091         cp_pedwarn, and cp_compiler_error.
10092         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
10093         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
10094         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
10095         typeck2.c: Change calls to the above macros to use their
10096         language-independent equivalents: error, warning, pedwarn, and
10097         internal_error respectively.
10098
10099 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
10100
10101         * decl2.c (finish_file): Remove back_end_hook.
10102
10103 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
10104
10105         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
10106         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
10107         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
10108
10109 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
10110
10111         * lang-options.h: Use American spelling in messages.
10112
10113 2001-12-13  Jason Merrill  <jason@redhat.com>
10114
10115         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
10116
10117         Use cleanups to run base and member destructors.
10118         * init.c (push_base_cleanups): New function, split out from...
10119         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
10120         * decl.c (finish_destructor_body): Move vbase destruction code to
10121         push_base_cleanups.
10122         (begin_function_body, finish_function_body): New fns.
10123         (finish_function): Move [cd]tor handling and call_poplevel to
10124         finish_function_body.
10125         (pushdecl): Skip the new level.
10126         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
10127         (setup_vtbl_ptr): Call push_base_cleanups.
10128         * method.c (synthesize_method): Call {begin,end}_function_body.
10129         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
10130         * cp-tree.h: Declare new fns.
10131         * parse.y (function_body, .begin_function_body): New nonterminals.
10132         (fndef, pending_inline, function_try_block): Use function_body.
10133         (ctor_initializer_opt, function_try_block): No longer has a value.
10134         (base_init): Remove .set_base_init token.
10135         (.set_base_init, compstmt_or_error): Remove.
10136         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
10137
10138         * optimize.c (maybe_clone_body): Fix parameter updating.
10139
10140 2001-12-12  Jason Merrill  <jason@redhat.com>
10141
10142         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
10143         * semantics.c (genrtl_start_function): Don't pass
10144         parms_have_cleanups or push an extra binding level.
10145         (genrtl_finish_function): Lose cleanup_label cruft.
10146
10147         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
10148         (ctor_label): Remove.
10149         * semantics.c (finish_return_stmt): Lose ctor_label support.
10150         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
10151         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
10152         dtor_label.
10153
10154         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
10155         check for [cd]tors.
10156         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
10157
10158         * decl.c (finish_function): Check VMS_TARGET, not VMS.
10159
10160         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
10161         (end_cleanup_fn): And poplevel.
10162
10163         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
10164         if we're in a template.
10165
10166 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
10167
10168         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
10169         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
10170         THIS_NAME_P): Delete.
10171         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
10172         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
10173         with internal naming scheme.
10174         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
10175
10176 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
10177
10178         * decl.c (grokdeclarator): Deprecated implicit typename use.
10179
10180 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
10181
10182         PR g++/51
10183         * parse.y (frob_specs): Indicate it is a language linkage which
10184         contained the extern.
10185         * decl.c (grokdeclarator): Allow extern language linkage with
10186         other specifiers.
10187
10188 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
10189
10190         PR g++/72
10191         * decl.c (add_binding): Don't reject duplicate typedefs involving
10192         template parameters.
10193
10194 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
10195
10196         * parse.y, semantics.c: Similarly.
10197
10198 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
10199
10200         PR g++/87
10201         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
10202         (copy_args_p): Rename to ...
10203         (copy_fn_p): ... here.
10204         (grok_special_member_properties): New function.
10205         (grok_op_properties): Lose VIRTUALP parameter.
10206         (copy_assignment_arg_p): Remove.
10207         * call.c (build_over_call): Use copy_fn_p.
10208         * decl.c (grokfndecl): Reformat. Adjust call to
10209         grok_op_properties.
10210         (copy_args_p): Rename to ...
10211         (copy_fn_p): ... here. Reject template functions. Check for pass
10212         by value.
10213         (grok_special_member_properties): Remember special functions.
10214         (grok_ctor_properties): Don't remember them here, just check.
10215         (grok_op_properties): Likewise.
10216         (start_method): Call grok_special_member_properties.
10217         * decl2.c (grokfield): Likewise.
10218         (copy_assignment_arg_p): Remove.
10219         (grok_function_init): Don't remember abstract assignment here.
10220         * pt.c (instantiate_class_template): Call
10221         grok_special_member_properties.
10222         (tsubst_decl): Adjust grok_op_properties call.
10223
10224 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
10225
10226         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
10227         RID_TYPES_COMPATIBLE_P.
10228
10229 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10230
10231         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
10232         call to build_aggr_init.
10233         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
10234
10235 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
10236
10237         * parse.y: Replace uses of the string non-terminal with STRING.
10238         Don't perform string concatentaion here.
10239         (string): Remove non-terminal.
10240         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
10241
10242 2001-12-05  Jason Merrill  <jason@redhat.com>
10243
10244         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
10245         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
10246         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
10247         * pt.c (push_tinst_level): No longer static.
10248         * cp-tree.h: Declare them.
10249
10250         * init.c (resolve_offset_ref): Don't check access for the base
10251         conversion to access a FIELD_DECL.
10252
10253         * cp-tree.h (TYPE_REFFN_P): New macro.
10254         * decl.c (bad_specifiers): Check it, too.
10255
10256         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
10257         on the __*_type_info type if we haven't seen a definition.
10258
10259 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
10260
10261         * decl.c: Include c-common.h.
10262         (shadow_warning): Move to c-common.c.
10263
10264 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10265
10266         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
10267
10268 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10269
10270         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
10271
10272 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10273
10274         PR g++/164
10275         * init.c (sort_base_init): Allow binfos to be directly specified.
10276         * method.c (do_build_copy_constructor): Explicitly convert to the
10277         base instance.
10278         (do_build_assign_ref): Likewise.
10279
10280 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
10281
10282         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
10283         declaration and initialization.
10284
10285 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
10286
10287         * typeck2.c: Remove leading capital from diagnostic messages, as
10288         per GNU coding standards.
10289
10290 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
10291
10292         PR c++/3394
10293         * decl.c (xref_basetypes): Handle attributes between
10294         'class' and name.
10295
10296 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
10297
10298         PR g++/3381
10299         * parse.y (named_complex_class_head_sans_basetype): Add new
10300         reduction.
10301         * Make-lang.in (parse.c): Adjust expected conflict count.
10302
10303 2001-12-03  Jason Merrill  <jason@redhat.com>
10304
10305         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
10306         immediate binfos for our virtual bases.
10307
10308 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
10309
10310         * call.c (build_java_interface_fn_ref): Similarly.
10311         * except.c (is_admissible_throw_operand): Similarly.
10312         * init.c (build_java_class_ref): Similarly.
10313         * xref.c (open_xref_file): Similarly.
10314
10315 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
10316
10317         * class.c (finish_struct): Remove trailing periods from messages.
10318         * decl.c (check_tag_decl): Similarly.
10319         * lex.c (cxx_set_yydebug): Similarly.
10320         * typeck2.c (friendly_abort): Similarly.
10321
10322 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10323
10324         PR c++/3048
10325         * cp-tree.h (ovl_member): Remove.
10326         * decl2.c (merge_functions): Handle extern "C" functions
10327         specially.
10328         * tree.c (ovl_member): Remove.
10329
10330 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10331
10332         PR c++/4842
10333         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
10334         FUNCTION_DECL, as input.
10335         (mark_overriders): Remove.
10336         (warn_hidden): Rework for the new ABI.
10337
10338 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10339
10340         PR c++/3471
10341         * call.c (convert_like_real): Do not build additional temporaries
10342         for rvalues of class type.
10343
10344 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10345
10346         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
10347         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
10348         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
10349         (DERIVED_FROM_P): Likewise.
10350         (enum base_access): Renumber, add ba_quiet bit mask.
10351         (get_binfo): Remove.
10352         (get_base_distance): Remove.
10353         (binfo_value): Remove.
10354         (ACCESSIBLY_DERIVED_FROM_P): Remove.
10355         * call.c (standard_conversion): Use lookup_base.
10356         * class.c (strictly_overrides): Likewise.
10357         (layout_virtual_bases): Likewise.
10358         (warn_about_ambiguous_direct_bases): Likewise.
10359         (is_base_of_enclosing_class): Likewise.
10360         (add_vcall_offset_vtbl_entries_1): Likewise.
10361         * cvt.c (build_up_reference): Adjust comment.
10362         * init.c (build_member_call): Reformat.
10363         * search.c (get_binfo): Remove.
10364         (get_base_distance_recursive): Remove.
10365         (get_base_distance): Remove.
10366         (lookup_base_r): Tweak.
10367         (lookup_base): Add ba_quiet control. Complete the types here.
10368         (covariant_return_p): Use lookup_base.
10369         * tree.c (binfo_value): Remove.
10370         (maybe_dummy_object): Use lookup_base.
10371         * typeck.c (build_static_cast): Use lookup_base.
10372         (get_delta_difference): Likewise.
10373         * typeck2.c (binfo_or_else): Use lookup_base.
10374         (build_scoped_ref): Add back error_mark_check.
10375         (build_m_component_ref): Use lookup_base.
10376
10377 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10378
10379         * Make-lang.in (c++.generated-manpages): New dummy target.
10380
10381 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10382
10383         * Make-lang.in (cp-lang.o): Depends on c-common.h.
10384         * cp-lang.c (c-common.h): Include.
10385         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
10386         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
10387         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
10388
10389 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
10390
10391         * decl2.c (c_language): Move to c-common.c.
10392         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
10393         functions.
10394         (cxx_init): Update.
10395
10396 2001-11-26  Jason Merrill  <jason@redhat.com>
10397
10398         * call.c (joust): Remove COND_EXPR hack.
10399
10400 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
10401
10402         * search.c (lookup_base_r): Declare bk in variable declaration
10403         space.
10404
10405 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
10406
10407         PR g++/3145
10408         * class.c (build_vbase_pointer): Remove.
10409         (build_vbase_path): Remove.
10410         (build_base_path): New function.
10411         * cp-tree.h (base_access, base_kind): New enumerations.
10412         (build_base_path): Declare.
10413         (convert_pointer_to_real): Remove.
10414         (convert_pointer_to): Remove.
10415         (lookup_base): Declare.
10416         (convert_pointer_to_vbase): Remove.
10417         * call.c (build_scoped_method_call): Use lookup_base &
10418         build_base_path instead of convert_pointer_to_real,
10419         get_base_distance & get_binfo.
10420         (build_over_call): Likewise.
10421         * cvt.c (cp_convert_to_pointer): Likewise.
10422         (convert_to_pointer_force): Likewise.
10423         (build_up_reference): Likewise.
10424         (convert_pointer_to_real): Remove.
10425         (convert_pointer_to): Remove.
10426         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
10427         instead of convert_pointer_to_vbase & build_vbase_path.
10428         (emit_base_init): Use build_base_path instead of
10429         convert_pointer_to_real.
10430         (expand_virtual_init): Lose unrequired conversions.
10431         (resolve_offset_ref): Use lookup_base and build_base_path
10432         instead of convert_pointer_to.
10433         * rtti.c (build_dynamic_cast_1): Use lookup_base &
10434         build_base_path instead of get_base_distance & build_vbase_path.
10435         * search.c (get_vbase_1): Remove.
10436         (get_vbase): Remove.
10437         (convert_pointer_to_vbase): Remove.
10438         (lookup_base_r): New function.
10439         (lookup_base): New function.
10440         * typeck.c (require_complete_type): Use lookup_base &
10441         build_base_path instead of convert_pointer_to.
10442         (build_component_ref): Likewise.
10443         (build_x_function_call): Likewise.
10444         (get_member_function_from_ptrfunc): Likewise.
10445         (build_component_addr): Likewise.
10446         * typeck2.c (build_scoped_ref): Likewise.
10447
10448 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10449
10450         * cp-tree.h (CP_TYPE_QUALS): Removed.
10451         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
10452         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
10453         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
10454         * dump.c (cp_dump_tree): Use void* dump_info argument to match
10455         lang-hooks prototype.
10456         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
10457         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
10458         CP_TYPE_QUALS changed to cp_type_quals.
10459         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
10460         (CXX_C_OBJS): Remove c-dump.o.
10461
10462 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
10463
10464         PR c++/3637
10465         * pt.c (lookup_template_class): Ensure that all specializations
10466         are registered on the list corresponding to the most general
10467         template.
10468
10469 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
10470
10471         * call.c (non_reference): Add documentation.
10472         (convert_class_to_reference): Do not strip reference types
10473         from conversion operators.
10474         (maybe_handle_ref_bind): Simplify.
10475         (compare_ics): Correct handling of references.
10476
10477 2001-11-19  John Wilkinson <johnw@research.att.com>
10478
10479         * dump.c (dump_op): New function.
10480         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
10481         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
10482         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
10483
10484 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
10485
10486         PR4629
10487         * semantics.c (finish_sizeof): Make sure that expression created
10488         while processing a template do not have a type.
10489         (finish_alignof): Likewise.
10490         * typeck.c (c_sizeof): Likewise.
10491         (expr_sizeof): Likewise.
10492
10493 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
10494
10495         * lex.c (cxx_finish): Call c_common_finish.
10496         (finish_parse): Remove.
10497
10498 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10499
10500         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
10501         when displaying error message about missing array bounds.
10502
10503 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10504
10505         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
10506         CONST_CAST_EXPR.
10507         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
10508
10509 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
10510
10511         * cp-tree.h (print_class_statistics): Restore.
10512
10513 2001-11-15  Jason Merrill  <jason@redhat.com>
10514
10515         * method.c (use_thunk): Don't emit debugging information for thunks.
10516
10517         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
10518         * decl.c (make_typename_type): Handle getting a class template.
10519         * search.c (lookup_field_r): A class template is good enough for
10520         want_type.
10521
10522         * call.c (convert_like_real): Only use cp_convert for the bad part.
10523         (standard_conversion): Also allow bad int->enum.
10524         * typeck.c (ptr_reasonably_similar): Also allow functions to
10525         interconvert.  Pointers to same-size integers are reasonably
10526         similar.
10527
10528         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
10529         give it void type.
10530
10531 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
10532
10533         PR g++/3154
10534         * init.c (sort_base_init): Remove unreachable code.
10535         (expand_member_init): Adjust comment to reflect reality. Simplify
10536         and remove unreachable code.
10537
10538 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
10539
10540         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
10541         (cxx_init): Update prototype.
10542         * decl.c (init_decl_processing): Rename.  Move null node init
10543         to its creation time.
10544         * lex.c (cxx_init_options): Update.
10545         (cxx_init): Combine with old init_parse; also call
10546         cxx_init_decl_processing.
10547
10548 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
10549
10550         * decl.c (check_initializer): Try to complete the type of an
10551         array element before checking whether it's complete.  Don't
10552         complain about arrays with complete element types but an
10553         unknown size.
10554         (cp_finish_decl): Build the hierarchical constructor before
10555         calling maybe_deduce_size_from_array_init.
10556
10557 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
10558
10559         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
10560
10561 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
10562
10563         PR g++/4206
10564         * parse.y (already_scoped_stmt): Remove.
10565         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
10566
10567 2001-11-12  H.J. Lu <hjl@gnu.org>
10568
10569         * cvt.c (ocp_convert): Don't warn the address of a weak
10570         function is always `true'.
10571
10572 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
10573
10574         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
10575         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
10576         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
10577         * cp-tree.h (print_class_statistics): Remove.
10578         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
10579         cxx_print_identifier, cxx_set_yydebug): New.
10580         * lex.c (set_yydebug): Rename c_set_yydebug.
10581         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
10582         lang_print_xnode): Rename.
10583         * tree.c (print_lang_statistics): Rename.
10584
10585 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10586
10587         * class.c (dump_array): Fix format specifier warning.
10588
10589 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
10590
10591         * cp-lang.c (LANG_HOOKS_NAME): Override.
10592         (struct lang_hooks): Constify.
10593         * lex.c (cxx_init_options): Update.
10594         (lang_identify): Remove.
10595         * parse.y (language_string): Remove.
10596
10597 2001-11-08  Andreas Franck  <afranck@gmx.de>
10598
10599         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
10600         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
10601         suggested by autoconf.
10602         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
10603         (c++.install-common): Use the transformed target alias names.
10604
10605 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10606
10607         * Make-lang.in: Update.
10608         * cp-lang.c: Include langhooks-def.h.
10609
10610 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10611
10612         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
10613
10614 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10615
10616         * lex.c (copy_lang_type): Add static prototype.
10617
10618 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10619
10620         * pt.c (unify): Handle SCOPE_REF.
10621
10622 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
10623
10624         * tree.c (cp_copy_res_decl_for_inlining): Adjust
10625         DECL_ABSTRACT_ORIGIN for the return variable.
10626
10627 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
10628
10629         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10630
10631 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
10632
10633         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
10634         semantics.c, spew.c: Fix spelling errors.
10635
10636 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10637
10638         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
10639
10640 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
10641
10642         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
10643         pop_everything.
10644
10645 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10646
10647         * cp-lang.c (cxx_get_alias_set): New function.
10648         Point LANG_HOOKS_GET_ALIAS_SET to it.
10649
10650 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10651
10652         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
10653         * cp-tree.h (make_unbound_class_template): Prototype new function.
10654         * decl.c (make_unbound_class_template): New function.
10655         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
10656         * error.c (dump_type): Likewise.
10657         * mangle.c (write_type): Likewise.
10658         * parse.y (template_parm): Likewise.
10659         (template_argument): Use make_unbound_class_template.
10660         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
10661         (tsubst): Likewise.
10662         (tsubst_copy): Likewise.
10663         (unify): Likewise.
10664         * tree.c (walk_tree): Likewise.
10665         * typeck.c (comptypes): Likewise.
10666
10667 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10668
10669         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
10670         extra calls into fewer ones.
10671
10672 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
10673
10674         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
10675         Warn when merging inline with attribute noinline.
10676         (start_decl, start_function): Warn if inline and attribute
10677         noinline appear in the same declaration.
10678
10679 2001-10-16  H.J. Lu <hjl@gnu.org>
10680
10681         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
10682         for tree checking disabled.
10683
10684 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
10685
10686         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
10687         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
10688
10689 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
10690
10691         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
10692         (unify): Only handle MINUS_EXPR specially if the above flag is set
10693         and the subtracted constant is 1.  Clear the flag on recursive calls.
10694         Set it when unifying the maximum value in an INTEGER_TYPE's range.
10695
10696 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
10697
10698         * decl.c (bad_specifiers): Don't allow exception specifications
10699         on any typedefs.
10700
10701 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
10702
10703         * cp/lex.c (init_cp_pragma): Similarly.
10704
10705 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10706
10707         * pt.c (lookup_template_class): Build complete template arguments
10708         for BOUND_TEMPLATE_TEMPLATE_PARM.
10709
10710 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10711
10712         * cp-tree.h (TYPE_BINFO): Update comment.
10713         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
10714         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
10715         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
10716         (copy_type): Prototype new function.
10717         * lex.c (copy_lang_decl): Gather tree node statistics.
10718         (copy_lang_type): New function.
10719         (copy_type): Likewise.
10720         (cp_make_lang_type): Create lang_type for
10721         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
10722         and BOUND_TEMPLATE_TEMPLATE_PARM.
10723         * pt.c (tsubst): Use copy_type instead of copy_node.
10724         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
10725
10726 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10727
10728         * pt.c (determine_specialization): Ignore functions without
10729         DECL_TEMPLATE_INFO.
10730
10731 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
10732
10733         PR g++/4476
10734         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
10735
10736 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
10737
10738         * typeck2.c (store_init_value): Don't re-digest a bracketed
10739         initializer.
10740
10741         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
10742         ANON_AGGR_TYPE_P.
10743
10744 2001-10-11  Richard Henderson  <rth@redhat.com>
10745
10746         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
10747         of an asm statement.
10748         (build_vtbl_ref_1): Split out from build_vtbl_ref.
10749         (build_vfn_ref): Use it to handle vtable descriptors before
10750         calling build_vtable_entry_ref.
10751         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
10752
10753 2001-10-10  Richard Henderson  <rth@redhat.com>
10754
10755         * parse.y (asm_operand): Allow named operands.
10756         * semantics.c (finish_asm_stmt): Tweek for changed location
10757         of the operand constraint.
10758
10759 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
10760
10761         * call.c (standard_conversion): Add bad conversion between
10762         integers and pointers.
10763         (convert_like_real): Don't use convert_for_initialization for bad
10764         conversions; complain here and use cp_convert.
10765         (build_over_call): Don't handle bad conversions specially.
10766         (perform_implicit_conversion): Allow bad conversions.
10767         (can_convert_arg_bad): New fn.
10768         * cp-tree.h: Declare it.
10769         * typeck.c (convert_for_assignment): Use it.
10770         (ptr_reasonably_similar): Any target type is similar to void.
10771
10772 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
10773
10774         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
10775         (cp/cp-lang.o): New rule.
10776         * cp-tree.h: Declare hooks.
10777         * tree.c: Make hooks non-static.
10778         (init_tree): Don't initialize hooks here.
10779         * lex.c: Likewise.  Move definition of lang_hooks to...
10780         * cp-lang.c: ... new file.
10781
10782 2001-10-08  Richard Henderson  <rth@redhat.com>
10783
10784         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
10785         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
10786
10787 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10788
10789         * class.c (build_vtable_entry_ref): Const-ify.
10790         * decl.c (predefined_identifier,
10791         initialize_predefined_identifiers): Likewise.
10792         * init.c (build_new_1): Likewise.
10793         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
10794         Likewise.
10795
10796 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
10797
10798         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
10799         (INSNS_PER_STMT): Likewise.
10800         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
10801         (copy_body, initialize_inlined_parameters): Likewise.
10802         (declare_return_variable, inlinable_function_p): Likewise.
10803         (expand_call_inline, expand_calls_inline): Likewise.
10804         (optimize_inline_calls, clone_body): Likewise.
10805         * tree.c (walk_tree): Moved to ../tree-inline.c.
10806         (walk_tree_without_duplicates): Likewise.
10807         (copy_tree_r, remap_save_expr): Likewise.
10808
10809 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
10810
10811         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
10812         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
10813         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
10814         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
10815         (flag_inline_trees): Moved declaration to ../tree-inline.h.
10816         (walk_tree): Moved declaration to ../tree-inline.h.
10817         (walk_tree_without_duplicates, copy_tree_r): Likewise.
10818         (remap_save_expr): Likewise.
10819         * decl.c: Include tree-inline.h.
10820         (lang_mark_tree): Don't mark inlined_fns.
10821         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
10822         * optimize.c: Include tree-inline.h.
10823         (optimize_inline_calls): Move declaration to ../tree.h, as
10824         non-static.
10825         (remap_decl): Use language-independent constructs and hooks.
10826         (remap_block, copy_body_r, declare_return_variable): Likewise.
10827         (inlinable_function_p): Likewise.  Don't test for
10828         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
10829         no longer language-specific.
10830         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
10831         call of dump_function to...
10832         (optimize_function): Here...
10833         (clone_body): New function, extracted from...
10834         (maybe_clone_body): ... here.  Build decl_map locally and pass
10835         it on to clone_body.
10836         * pt.c, semantics.c: Include tree-inline.h.
10837         * tree.c: Likewise.
10838         (cp_walk_subtrees): New language-specific hook for tree inlining.
10839         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
10840         cp_is_overload_p, cp_auto_var_in_fn_p,
10841         cp_copy_res_decl_for_inlining): Likewise.
10842         (walk_tree): Move language-specific constructs into...
10843         (cp_walk_subtrees): this new function.
10844         (copy_tree_r): Use language-independent constructs and hooks.
10845         (init_tree): Initialize tree inlining hooks.
10846         (remap_save_expr): Adjust prototype so that the declaration
10847         does not require the definition of splay_tree.
10848
10849 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10850
10851         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
10852         to build the declaration instead of the declaration itself.
10853
10854 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
10855
10856         * decl2.c (cxx_decode_option): Add 'else'.
10857
10858         * spew.c (end_input): No longer static.
10859         * cp-tree.h: Declare it.
10860         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
10861
10862 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10863
10864         * call.c (build_over_call), typeck.c (build_function_call_real):
10865         Pass type attributes to check_function_format rather than name or
10866         assembler name.  Don't require there to be a name or assembler
10867         name to check formats.
10868
10869 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10870
10871         * decl.c (init_decl_processing): Don't call
10872         init_function_format_info.  Initialize lang_attribute_table
10873         earlier.
10874         (builtin_function): Call decl_attributes.
10875         (insert_default_attributes): New.
10876
10877 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
10878
10879         * decl.c (grokdeclarator): Copy array typedef handling from C
10880         frontend.
10881
10882         * decl.c (grokdeclarator): Copy too-large array handling from C
10883         frontend.
10884
10885 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
10886
10887         * config-lang.in (target_libs): Added target-gperf, so that we
10888         don't try to build it if C++ is disabled.
10889
10890 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
10891
10892         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
10893         (cp/errfn.o): Delete rule.
10894         (cp/error.o): Depend on flags.h.
10895         * errfn.c: Delete file.
10896         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
10897         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
10898         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
10899         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
10900         internal_error respectively.  Make cp_deprecated into a macro.
10901         Don't define cp_printer typedef or declare cp_printers.
10902         * error.c: Include flags.h.
10903         Delete: struct tree_formatting_info, print_function_argument_list,
10904         print_declaration, print_expression, print_function_declaration,
10905         print_function_parameter, print_type_id, print_cv_qualifier_seq,
10906         print_type_specifier_seq, print_simple_type_specifier,
10907         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
10908         print_parameter_declaration_clause, print_exception_specification,
10909         print_nested_name_specifier, and definition of cp_printers.
10910         (locate_error): New function.
10911         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
10912         rewritten in terms of locate_error and diagnostic.c.
10913         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
10914         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
10915         (init_error): Adjust to match.
10916
10917 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10918
10919         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
10920
10921 2001-09-21  Richard Henderson  <rth@redhat.com>
10922
10923         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
10924         (build_vtbl_initializer): Likewise.
10925         (build_vfn_ref): New.
10926         * cp-tree.h: Declare it.
10927         * call.c (build_over_call): Use it.
10928         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
10929         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
10930
10931 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
10932
10933         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
10934
10935 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
10936
10937         Table-driven attributes.
10938         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
10939         * decl2.c (cplus_decl_attributes): Only take one attributes
10940         parameter.
10941         * cp-tree.c (cplus_decl_attributes): Update prototype.
10942         * class.c (finish_struct), decl.c (start_decl, start_function),
10943         decl2.c (grokfield), friend.c (do_friend), parse.y
10944         (parse_bitfield): Update calls to cplus_decl_attributes.
10945         * decl.c (grokdeclarator): Take a pointer to a single ordinary
10946         attribute list.
10947         * decl.h (grokdeclarator): Update prototype.
10948         * decl2.c (grokfield): Take a single ordinary attribute list.
10949         * friend.c (do_friend): Likewise.
10950         * decl.c (shadow_tag, groktypename, start_decl,
10951         start_handler_parms, grokdeclarator, grokparms, start_function,
10952         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
10953         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
10954         (process_template_parm, do_decl_instantiation): Pass single
10955         ordinary attribute lists around.
10956         * decl.c (grokdeclarator): Correct handling of nested attributes.
10957         Revert the patch
10958         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
10959                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
10960                 not the left.
10961         .
10962         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
10963         (cp_attribute_table): Declare.
10964         * decl.c (valid_lang_attribute): Don't define.
10965         (lang_attribute_table): Define.
10966         (init_decl_processing): Initialize lang_attribute_table instead of
10967         valid_lang_attribute.
10968         * tree.c (cp_valid_lang_attribute): Remove.
10969         (handle_java_interface_attribute, handle_com_interface_attribute,
10970         handle_init_priority_attribute): New functions.
10971         (cp_attribute_table): New array.
10972         * decl2.c (import_export_class): Don't use
10973         targetm.valid_type_attribute.
10974
10975 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
10976
10977         * Make-lang.in (cp/error.o): Depend on real.h
10978         * error.c: #include "real.h"
10979
10980 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10981
10982         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
10983         xmalloc/strcpy/strcat.
10984
10985 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10986
10987         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
10988         Const-ification.
10989         * pt.c (tsubst_decl): Likewise.
10990
10991 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10992
10993         * decl2.c (lang_f_options): Const-ification.
10994         * lex.c (cplus_tree_code_name): Likewise.
10995         * spew.c (yyerror): Likewise.
10996
10997 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10998
10999         PR c++/3986
11000         * class.c (force_canonical_binfo_r): Check & move an indirect
11001         primary base first.
11002         (force_canonical_binfo): Check that it's not already
11003         canonical.
11004         (mark_primary_virtual_base): Remove BINFO parameter.
11005         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
11006
11007 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11008
11009         Remove TYPE_NONCOPIED_PARTS.
11010         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
11011         CLASSTYPE_PURE_VIRTUALS.
11012         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
11013         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
11014         (layout_class_type): Don't call fixup_inline_methods here ...
11015         (finish_struct_1): ... call it here.
11016
11017 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
11018
11019         * decl.c (duplicate_decls): Remove code deadling with
11020         DECL_SAVED_INSNS.
11021         * decl2.c (finish_file): Likewise.
11022         * pt.c (instantiate_decl): Likewise.
11023         * semantics.c (expand_body): Don't defer local functions if
11024         they wouldn't be deferred for some other reason.  Don't
11025         generate RTL for functions that will not be emitted.
11026         (genrtl_start_function): Remove code deadling with
11027         DECL_SAVED_INSNS.
11028         (genrtl_finish_function): Likewise.
11029
11030 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11031
11032         PR c++/4203
11033         * call.c (build_over_call): Do not optimize any empty base
11034         construction.
11035
11036 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11037
11038         * error.c (dump_template_decl): Output template parameters
11039         together with their specifiers.
11040         Output `class' prefix for template template parameter.
11041         (dump_decl): Fix formatting.
11042
11043 2001-08-30  Kurt Garloff  <garloff@suse.de>
11044
11045         * optimize.c (inlinable_function_p): Allow only smaller single
11046         functions. Halve inline limit after reaching recursive limit.
11047
11048 2001-08-30  Joern Rennecke <amylaar@redhat.com>
11049             Jason Merrill  <jason_merrill@redhat.com>
11050
11051         * class.c (build_vtable_entry_ref): Subtract in char*, not
11052         ptrdiff_t.
11053
11054 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
11055
11056         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
11057         (build_cplus_array_type): Use cp_build_qualified_type, not
11058         TYPE_MAIN_VARIANT, to get an unqualified version.
11059
11060         * decl2.c (grok_alignof): Lose.
11061         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
11062         * typeck.c (c_alignof): Lose.
11063         * semantics.c (finish_sizeof, finish_alignof): New.
11064         * parse.y: Use them.
11065         * cp-tree.h: Declare them.
11066
11067 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
11068
11069         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
11070         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
11071         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
11072
11073 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
11074
11075         * typeck2.c (add_exception_specifier): Only require complete type if
11076         not in processing template declaration.
11077
11078 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11079
11080         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
11081         GNU_xref_start_scope and GNU_xref_end_scope.
11082
11083         * tree.c (TYPE_HASH): Moved to ../tree.h.
11084
11085 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
11086
11087         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
11088         on COMPOUND_EXPRs.
11089
11090 2001-08-14  Richard Henderson  <rth@redhat.com>
11091
11092         * class.c, cp-tree.h (build_vfn_ref): Remove.
11093         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
11094
11095 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
11096
11097         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
11098         empty class assignment as having side-effects to avoid
11099         spurious warnings.
11100
11101 2001-08-13  Zack Weinberg  <zackw@panix.com>
11102
11103         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
11104         * except.c: Include libfuncs.h.
11105
11106 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11107
11108         * decl.c (grokdeclarator): Clarify diagnostic message.
11109
11110 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11111
11112         * decl2.c (do_nonmember_using_decl): Replace using directive
11113         with using declaration in the error message.
11114
11115 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11116
11117         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
11118         criterion to avoid rebuilding expression tree instead of
11119         processing_template_decl.
11120
11121 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
11122
11123         Support named return value optimization for inlines, too.
11124         * decl.c (finish_function): Nullify returns here.
11125         * semantics.c (genrtl_start_function): Not here.
11126         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
11127         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
11128         Also nullify the CLEANUP_STMT for the nrv.
11129         * cp-tree.h: Declare it.
11130         * optimize.c (declare_return_variable): Replace the nrv with the
11131         return variable.
11132         * typeck.c (check_return_expr): Be more flexible on alignment check.
11133         Ignore cv-quals when checking for a matching type.
11134
11135 2001-08-09  Richard Henderson  <rth@redhat.com>
11136
11137         * decl2.c (finish_objects): Use target hooks instead of
11138         assemble_constructor and assemble_destructor.
11139
11140 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11141
11142         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
11143
11144 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
11145
11146         PR c++/3820
11147         Stop using TYPE_NONCOPIED_PARTS.
11148         * call.c (build_over_call): Be careful when copy constructing
11149         or assigning to an empty class.
11150         * class.c (check_bases_and_members): It has a
11151         COMPLEX_ASSIGN_REF if it has a vptr.
11152         (layout_class_type): Don't add empty class padding to
11153         TYPE_NONCOPIED_PARTS.
11154         (finish_struct_1): Don't add the VFIELD either.
11155         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
11156         initialization.
11157
11158 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
11159
11160         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
11161
11162 2001-08-06  Richard Henderson  <rth@redhat.com>
11163
11164         * decl2.c (finish_objects): Pass a symbol_ref and priority to
11165         assemble_{constructor,destructor}.  Remove priority handling.
11166
11167 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11168
11169         Don't allow template-id in using-declaration.
11170         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
11171         (do_class_using_decl): Likewise.
11172
11173 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11174
11175         * cp/spew.c (read_token): No need to pop buffers.
11176
11177 2001-08-02  Stan Shebs  <shebs@apple.com>
11178
11179         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
11180         (fnaddr_from_vtable_entry): Remove decl.
11181         * method.c (use_thunk): Update comment.
11182
11183 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
11184
11185         * repo.c (get_base_filename): Change return value to const char
11186         pointer.
11187
11188 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
11189
11190         Kill -fhonor-std.
11191         * NEWS: Document.
11192         * cp-tree.h (flag_honor_std): Remove.
11193         (CPTI_FAKE_STD): Remove.
11194         (std_node): Remove comment about it being NULL.
11195         (fake_std_node): Remove.
11196         * decl.c (in_fake_std): Remove.
11197         (walk_namespaces_r): Remove fake_std_node check.
11198         (push_namespace): Remove in_fake_std code.
11199         (pop_namespace): Likewise.
11200         (lookup_name_real): Remove fake_std_node check.
11201         (init_decl_processing): Always create std_node. Always add
11202         std:: things there.
11203         (builtin_function): Always put non '_' fns in std.
11204         * decl2.c (flag_honor_std): Remove.
11205         (lang_f_options): Remove honor-std.
11206         (unsupported_options): Add honor-std.
11207         (set_decl_namespace): Remove fake_std_node check.
11208         (validate_nonmember_using_decl): Likewise.
11209         (do_using_directive): Likewise.
11210         (handle_class_head): Likewise.
11211         * dump.c (cp_dump_tree): Likewise.
11212         * except.c (init_exception_processing): Adjust.
11213         * init.c (build_member_call): Remove fake_std_node check.
11214         (build_offset_ref): Likewise.
11215         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
11216         * rtti.c (init_rtti_processing): Adjust.
11217
11218 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
11219
11220         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
11221         operand while calling cp_tree_equal.
11222
11223 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11224
11225         The 3.0 ABI no longer has vbase pointer fields.
11226         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
11227         FORMAT_VBASE_NAME): Remove.
11228         * method.c (do_build_copy_constructor): Adjust.
11229         (do_build_assign_ref): Adjust.
11230         * search.c (lookup_field_r): Adjust.
11231         * typeck.c (build_component_ref): Adjust.
11232
11233         The 3.0 ABI always has a vtable pointer at the start of every
11234         polymorphic class.
11235         * rtti.c (build_headof_sub): Remove.
11236         (build_headof): Adjust.
11237         (get_tinfo_decl_dynamic): No need to check flag_rtti
11238         here. Adjust.
11239         (create_real_tinfo_var): Explain why we need a hidden name.
11240
11241 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11242
11243         PR c++/3631
11244         * class.c (update_vtable_entry_for_fn): The fixed adjustment
11245         of a virtual thunk should be from declaring base.
11246
11247 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11248
11249         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
11250         the shared virtual base, so preserving inheritance graph order.
11251
11252 2001-07-30  Andreas Jaeger  <aj@suse.de>
11253
11254         * decl2.c: Remove unused var global_temp_name_counter.
11255
11256 2001-07-28  Richard Henderson  <rth@redhat.com>
11257
11258         * method.c (pending_inlines): Remove.
11259
11260 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
11261
11262         * class.c (mark_primary_virtual_base): Don't adjust base
11263         offsets here.
11264         (dfs_unshared_virtual_bases): Adjust them here.
11265         (mark_primary_bases): Explain why we adjust at the end.
11266
11267 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
11268
11269         * class.c (finish_struct_1): When copying the primary base's
11270         VFIELD, make sure we find it is at offset zero.
11271
11272 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11273
11274         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
11275         tsubst_expr for default template arguments.
11276
11277 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11278
11279         PR c++/3621
11280         * spew.c (yylex): Only copy the token's lineno, if it is
11281         nonzero.
11282
11283 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11284
11285         PR c++/3624
11286         * call.c (resolve_args): Simplify, call
11287         convert_from_reference.
11288         (build_new_op): Resolve and convert from reference ARG1
11289         earlier. Adjust ARG2 & ARG3 resolve and conversion.
11290
11291 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11292
11293         * decl.c (last_function_parm_tags): Remove.
11294         (current_function_parm_tags): Remove.
11295         (init_decl_processing): Adjust.
11296         (start_function): Adjust.
11297         (store_parm_decls): Adjust.
11298
11299         PR c++/3152
11300         * decl.c (grokdeclarator): Detect when a function typedef is
11301         declaring a function, and create last_function_parms correctly.
11302
11303 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
11304
11305         * call.c (joust): Only prefer a non-builtin candidate to a builtin
11306         one if they have the same signature.
11307
11308         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
11309         it rather than toplevel_bindings_p.  Give it a mangled name if static.
11310         (convert_to_reference): Adjust.
11311         * decl2.c (get_temp_name): Lose.
11312         * mangle.c (mangle_ref_init_variable): New fn.
11313         (mangle_guard_variable): Strip the ref-init header.
11314         * cp-tree.h: Adjust.
11315         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
11316         initializer.
11317         (grok_reference_init): Always use DECL_INITIAL.
11318
11319 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11320
11321         PR c++/3416
11322         * call.c (build_conditional_expr): Recheck args after
11323         conversions.
11324         * cp-tree.h (build_conditional_expr): Move to correct file.
11325         * typeck.c (decay_conversion): Diagnose any unknown types
11326         reaching here.
11327         (build_binary_op): Don't do initial decay or default
11328         conversions on overloaded functions.
11329         (build_static_cast): Don't do a decay conversion here.
11330
11331 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11332
11333         PR c++/3543
11334         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
11335         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
11336
11337 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11338
11339         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
11340         (create_vtbl_ptr): ... here.
11341
11342 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11343
11344         * class.c (build_vbase_offset_vbtl_entries): Look for
11345         non-primary base of which we are a sub vtable.
11346
11347 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
11348
11349         * semantics.c (finish_this_expr):  Remove unused code.
11350
11351 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
11352
11353         Simplify rtti, now we've only one ABI.
11354         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
11355         CPTI_TINFO_VAR_ID.
11356         (tinfo_decl_id, tinfo_var_id): Remove.
11357         (get_typeid_1): Remove.
11358         * rtti.c
11359         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
11360         (typeid_ok_p): New function.
11361         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
11362         (get_tinfo_decl): Remove old abi documentation.
11363         (tinfo_from_decl): Remove.
11364         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
11365         (get_typeid_1): Remove.
11366         (get_base_offset): Remove.
11367         (synthesize_tinfo_var): Absorb get_base_offset.
11368         (create_real_tinfo_var): Don't use tinfo_decl_id.
11369
11370 2001-07-23  Graham Stott  <grahams@redhat.com>
11371
11372         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
11373         variable has_two_argument_delete_p.
11374
11375 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
11376
11377         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
11378         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
11379         (CPTI_INDEX_IDENTIFIER): Remove.
11380         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
11381         (delta2_identifier): Remove.
11382         (index_identifier): Remove.
11383         (pfn_or_delta2_identifier): Remove.
11384         (flag_vtable_thunks): Remove.
11385         (VTABLE_DELTA2_NAME): Remove.
11386         (VTABLE_INDEX_NAME): Remove.
11387         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
11388         (vfunc_ptr_type_node): Adjust.
11389         (VTABLE_NAME_PREFIX): Adjust.
11390         (build_vfn_ref): Lose first parameter.
11391         (fixup_all_virtual_upcast_offsets): Remove.
11392         * decl.c (initialize_predefined_identifiers): Remove
11393         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
11394         (init_decl_processing): Remove no-vtable-thunk code.
11395         * decl2.c (flag_vtable_thunks): Remove.
11396         (mark_vtable_entries): Remove no-vtable-thunk code.
11397         * error.c (dump_decl): Remove no-vtable-thunk code.
11398         (dump_expr): Adjust ptr to member function code.
11399         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
11400         code.
11401         * rtti.c (build_headof): Remove no-vtable-thunk code.
11402         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
11403         * search.c (get_base_distance): Remove expand_upcast_fixups case.
11404         (virtual_context) Remove.
11405         (expand_upcast_fixups): Remove.
11406         (fixup_virtual_upcast_offsets): Remove.
11407         (fixup_all_virtual_upcast_offsets): Remove.
11408         * typeck.c (get_member_function_from_ptrfunc): Remove
11409         no-vtable-thunk code.
11410         * call.c (build_over_call): Adjust call to build_vfn_ref.
11411         * class.c (build_vfn_ref): Lose first parameter. Remove
11412         no-vtable-thunk code.
11413         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
11414         (build_vtable_entry): Remove no-vtable-thunk code.
11415
11416 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
11417
11418         Remove old-abi remnants. Remove comments about old abi
11419         behavior. Remove references to 'new-abi' in comments.
11420         * cp-tree.h: Adjust comments.
11421         (vbase_offsets_in_vtable_p): Delete.
11422         (vcall_offsets_in_vtable_p): Delete.
11423         (vptrs_present_everywhere_p): Delete.
11424         (all_overridden_vfuns_in_vtables_p): Delete.
11425         (merge_primary_and_secondary_vtables_p): Delete.
11426         (TYPE_CONTAINS_VPTR_P): Adjust.
11427         (VTT_NAME_PREFIX): Remove.
11428         (CTOR_VTBL_NAME_PREFIX): Remove.
11429         (init_vbase_pointers): Remove.
11430         * class.c: Adjust coments.
11431         (build_vbase_pointer_fields): Delete.
11432         (build_vbase_pointer): Remove old-abi code.
11433         (build_secondary_vtable): Likewise.
11434         (modify_all_vtables): Likewise.
11435         (create_vtable_ptr): Likewise.
11436         (layout_class_type): Likewise.
11437         (finish_struct_1): Likewise.
11438         (finish_vtbls): Likewise.
11439         (dfs_finish_vtbls): Delete.
11440         (build_vbase_offset_vtbl_entries): Remove old-abi code.
11441         * cvt.c: Adjust comments.
11442         * decl.c: Adjust comments.
11443         * decl2.c: Adjust comments.
11444         * init.c: Adjust comments.
11445         (construct_virtual_bases): Remove old-abi code.
11446         * lang-specs.h: Remove -fno-new-abi.
11447         * mangle.c: Adjust comments.
11448         * rtti.c: Adjust comments.
11449         (get_base_offset): Remove old-abi-code.
11450         * search.c: Adjust comments.
11451         (dfs_init_vbase_pointers): Remove.
11452         (dfs_vtable_path_unmark): Remove.
11453         (init_vbase_pointers): Remove.
11454         * semantics.c: Adjust comments.
11455         (emit_associated_thunks): Remove old-abi code.
11456         * typeck.c: Adjust comments.
11457
11458 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
11459
11460         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
11461         params.h.
11462
11463 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
11464
11465         * class.c (finish_struct_anon): Forbid nested classes.
11466
11467 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
11468
11469         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
11470         * optimize.c: Include debug.h.
11471         (maybe_clone_body): Use debug hook.
11472         * semantics.c: Include debug.h.
11473         (expand_body): Use debug hook.
11474
11475 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
11476
11477         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
11478
11479 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
11480
11481         * class.c (type_requires_array_cookie): New function.
11482         (check_methods): Don't try to figure out whether the type needs a
11483         cookie here.
11484         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
11485         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
11486         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
11487         * pt.c (instantiate_class_template): Don't set
11488         TYPE_VEC_DELETE_TAKES_SIZE.
11489         * NEWS: Document ABI changes from GCC 3.0.
11490
11491 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
11492             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
11493
11494         * NEWS (Changes in GCC 3.0): Fix typo.
11495
11496 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11497
11498         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
11499         which attributes are to be attached, and a flags argument.  Update
11500         call to decl_attributes.
11501         (grokfield): Update call to decl_attributes.
11502         * class.c (finish_struct): Update call to cplus_decl_attributes.
11503         * cp-tree.h (cplus_decl_attributes): Update prototype.
11504         * decl.c (start_decl, grokdeclarator, start_function): Update
11505         calls to decl_attributes and cplus_decl_attributes.
11506         * friend.c (do_friend): Update call to cplus_decl_attributes.
11507         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
11508
11509 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
11510
11511         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
11512         for `register' variables with an asm-specification.
11513
11514 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
11515
11516         * semantics.c (finish_asm_stmt): Mark the output operands
11517         to an asm addressable, if necessary.
11518
11519 2001-07-11  Ben Elliston  <bje@redhat.com>
11520
11521         * Revert this change -- there is a subtle bug.
11522
11523         PR c++/80
11524         * decl.c (finish_enum): New "attributes" argument; pass it to
11525         cplus_decl_attributes.  Use a narrower type if the enum is packed.
11526         * cp-tree.h (finish_enum): Adjust prototype.
11527         * parse.y (enum_head): New non-terminal.
11528         (structsp): Use it. Enums now may be preceded or followed by
11529         optional attributes -- pass their chained tree to finish_enum().
11530         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
11531
11532 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
11533
11534         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
11535         variables.
11536
11537 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
11538
11539         * semantics.c (cp_expand_stmt): Fix for null
11540         current_function_return_value.
11541
11542 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
11543
11544         * call.c (build_op_delete_call): Initialize fn.
11545         (convert_like_real): Delete conditional.
11546         (joust): Initialize *w and *l.
11547         * class.c: Add prototype for binfo_ctor_vtable.
11548         (get_primary_binfo): Initialize result.
11549         * init.c (build_java_class_ref): Initialize name.
11550
11551 2001-07-09  Erik Rozendaal  <dlr@acm.org>
11552
11553         * typeck.c (unary_complex_lvalue): Do not duplicate the
11554         argument to modify, pre-, or post-increment when used as an
11555         lvalue and when the argument has side-effects.
11556
11557 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11558
11559         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11560         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
11561         cplus_decl_attributes even if attrs is NULL.
11562         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11563
11564 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11565
11566         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
11567         calls to decl_attributes.
11568
11569 2001-07-06  Ira Ruben   <ira@apple.com>
11570
11571         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
11572         be DECL_TEMPLATE_RESULT.
11573
11574 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11575
11576         * cp-tree.h (copy_template_template_parm): Rename to ...
11577         (bind_template_template_parm): ... here.
11578         * tree.c (copy_template_template_parm): Rename to ...
11579         (bind_template_template_parm): ... here.  Remove the case when
11580         NEWARGS is NULL_TREE.
11581         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
11582         BOUND_TEMPLATE_TEMPLATE_PARM.
11583         * pt.c (lookup_template_class): Adjust.
11584
11585 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
11586
11587         * cvt.c (convert_lvalue): New fn.
11588         * cp-tree.h: Declare it.
11589         * method.c (do_build_assign_ref): Use it.
11590         (do_build_copy_constructor): Convert parm to base types
11591         before calling base constructors.
11592
11593         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
11594         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
11595         optimize.
11596         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
11597
11598 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
11599
11600         * optimize.c (optimize_inline_calls): New function, broken out
11601         of ...
11602         (optimize_function): ... here. Call it. Don't inline if it is
11603         a thunk.
11604         (dump_function): Print name of dump flag causing this dump.
11605         * semantics.c (expand_body): Move thunk inline check to
11606         optimize_function.
11607
11608 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
11609
11610         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
11611         (comptypes): Use target.comp_type_attributes.
11612
11613 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
11614
11615         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
11616
11617 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11618
11619         * error.c (lang_print_error_function): Add a `diagnostic_context *'
11620         parameter. Tweak.
11621
11622 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11623
11624         * decl2.c (import_export_class): Update.
11625
11626 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11627
11628         * error.c (init_error): Adjust settings.
11629
11630 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11631
11632         * error.c (init_error): Adjust settings.
11633
11634 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
11635
11636         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
11637         return pointers to data members by reference rather than by value.
11638
11639 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
11640
11641         Implement the Named Return Value optimization.
11642         * cp-tree.h (struct cp_language_function): Add x_return_value.
11643         (current_function_return_value): Now a macro.
11644         * decl.c: Don't define it.
11645         (define_label, finish_case_label): Don't clear it.
11646         (init_decl_processing): Don't register it with GC.
11647         * semantics.c (genrtl_finish_function): Don't check it for
11648         no_return_label.  Copy the RTL from the return value to
11649         current_function_return_value and walk, calling...
11650         (nullify_returns_r): ...this new fn.
11651         * typeck.c (check_return_expr): Set current_function_return_value.
11652
11653 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
11654
11655         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
11656         sharing a ctor vtable with.  Merge code for cases 1 and 2.
11657         (binfo_ctor_vtable): New fn.
11658         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
11659
11660 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
11661
11662         * class.c (dfs_find_final_overrider): Fix logic.
11663
11664         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
11665         virtual thunk instead of non-virtual.
11666         (get_matching_virtual): Uncomment.
11667
11668         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
11669         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
11670         PARM, not ARG.
11671
11672 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
11673
11674         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
11675         we've not emerged from the hierarchy of RTTI_BINFO on reaching
11676         a non-virtual base.
11677
11678 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
11679
11680         * NEWS: Update release number.
11681
11682 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
11683
11684         PR c++/3130, c++/3131, c++/3132
11685         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
11686         * class.c (force_canonical_binfo_r): Move
11687         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
11688         virtual bases unless they're primary and what they're primary
11689         too has been moved.
11690         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
11691         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
11692         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
11693         derived binfo.
11694         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
11695         (layout_nonempty_base_or_field): Add most derived type
11696         parameter. Adjust.
11697         (layout_empty_base): Likewise.
11698         (build_base_field): Likewise.
11699         (build_base_fields): Likewise.
11700         (propagate_binfo_offsets): Add most derived type
11701         parameter. Skip non canonical virtual bases too.
11702         (dfs_set_offset_for_unshared_vbases): Don't skip primary
11703         bases. Do skip canonical bases.
11704         (layout_virtual_bases): Adjust.
11705         (layout_class_type): Adjust.
11706         (dfs_get_primary_binfo): Build list of virtual primary base
11707         candidates.
11708         (get_primary_binfo): Check that the shared virtual primary
11709         base candidate was found first.
11710         (accumulate_vtbl_inits): Don't do anything for non-vptr
11711         containing binfos. For case 1 primary virtual bases, keep
11712         checking that we've not emerged from the hierarchy of RTTI_BINFO.
11713
11714 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
11715
11716         PR c++/3089
11717         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
11718         hierarchy looking for primary bases for a ctor
11719         vtable. Recursively call oneself, if we meet our primary via
11720         this route and haven't met it yet via inheritance graph order.
11721
11722 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
11723
11724         * lang-options.h: Emit documentation for -fno-honor-std, not
11725         -fhonor-std.
11726
11727 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
11728
11729         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
11730         Don't clobber delta.
11731         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
11732
11733 2001-06-10  Mark Mitchell <mark@codesourcery.com>
11734             Gabriel Dos Reis  <gdr@codesourcery.com>
11735
11736         * Make-lang.in (cp/call.o): Depend on diagnostic.h
11737         (cp/typeck.o): Depend on diagnostic.h
11738         (cp/typeck2.o): Depend on diagnostic.h
11739         (cp/repo.o): Depend on dignostic.h
11740         * typeck.c: #include diagnostic.h
11741         (convert_for_initialization): Remove extern declaration for
11742         warningcount and errorcount.
11743
11744         * call.c: #include diagnostic.h
11745         (convert_like_real): Remove extern declaration for warnincount and
11746         errorcount.
11747
11748         * repo.c: #include diagnostic.h
11749         * typeck2.c: #include diagnostic.h
11750
11751 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
11752
11753         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
11754         in previous change.
11755
11756 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
11757
11758         PR c++/2929
11759         * friend.c (do_friend): Use push_decl_namespace for classes at
11760         namespace scope.
11761
11762 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
11763             Jason Merrill <jason_merrill@redhat.com>
11764
11765         PR c++/3061
11766         * class.c (build_secondary_vtable): Use assert, rather than an error
11767         message.
11768         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
11769         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
11770         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
11771         Don't set BINFO_VTABLE for a primary virtual base.
11772
11773 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
11774
11775         * decl.c (duplicate_decls): Update source position information
11776         when a template function is defined.
11777
11778 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
11779
11780         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
11781
11782 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
11783
11784         PR c++/2914
11785         * decl.c (pushtag): Don't push into a complete type's scope.
11786
11787 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
11788
11789         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
11790         (struct lang_decl_flags): Lose generate_with_vtable_p.
11791         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
11792         * class.c (copy_virtuals): Adjust.
11793         * decl2.c (mark_vtable_entries): Adjust.
11794         * method.c (make_thunk, build_vtable_entry): Adjust.
11795         * class.c (update_vtable_entry_for_fn): Only look as far as the
11796         first defining class.
11797         (build_vtbl_initializer): Put nothing in the slot for a function only
11798         defined in a lost primary virtual base.
11799         (add_vcall_offset_vtbl_entries_1): Use the same code for
11800         the lost primary case and the normal case.
11801         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
11802         (get_vfield_offset, get_derived_offset): Lose.
11803         (dfs_find_final_overrider): Use look_for_overrides_here.
11804         (get_matching_virtual): New fn.
11805         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
11806         not BV_VCALL_INDEX.
11807         * search.c (look_for_overrides_here): Split out from...
11808         (look_for_overrides_r): Here.
11809
11810         * class.c (find_final_overrider): Return error_mark_node on error.
11811
11812         * decl2.c (key_method): #if 0 accidental change.
11813
11814 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11815
11816         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
11817         (build_over_call): Likewise.
11818         * decl.c (grokparms): Likewise.
11819         * pt.c (tsubst_decl): Likewise.
11820         * typeck.c (convert_arguments): Likewise.
11821
11822 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
11823
11824         * semantics.c (begin_class_definition): Robustify.
11825
11826         * pt.c (instantiate_decl): Tell the repository code about the
11827         clones, not the cloned functions.
11828         * repo.c (repo_template_used): Explicitly instantiate the cloned
11829         function, not the clones.
11830
11831 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
11832
11833         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
11834         ICS_BAD_FLAG on created conversion.
11835         (compare_ics): Break out rank.
11836
11837 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
11838
11839         * decl.c (xref_tag): Remove extraneous %s on dependent name
11840         lookup warning.
11841
11842 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
11843
11844         * class.c (layout_vtable_decl): Fix off by one error on
11845         build_index_type.
11846         (build_vtt): Likewise.
11847         (build_ctor_vtbl_group): Likewise.
11848
11849 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
11850
11851         * class.c (maybe_indent_hierarchy): New function.
11852         (dump_class_hierarchy_r): Add flags. Dump extra binfo
11853         information, if enabled. Use maybe_indent_hierarchy. Adjust
11854         output format.
11855         (dump_class_hierarchy): Adjust prototype. Adjust output format.
11856         (dump_array, dump_vtable, dump_vtt): New functions.
11857         (finish_struct_1): Adjust hierarchy dumping.
11858         (initialize_vtable): Call dump_vtable.
11859         (build_vtt): Call dump_vtt.
11860         (build_ctor_vtbl_group): Call dump_vtable.
11861         * decl2.c (flag_dump_class_layout): Remove.
11862         (cxx_decode_option): Remove dump translation unit
11863         and dump class hierarchy check. Call dump_switch_p.
11864         (finish_file): Adjust dumping.
11865         (dump.c): Only dump base classes if not TDF_SLIM.
11866         Only dump namespace members if not TDF_SLIM.
11867         * optimize.c (dump_function): New function.
11868         (optimize_function): Call dump_function.
11869         * semantics.c (expand_body): Use dump_enabled_p.
11870
11871 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
11872
11873         PR g++/2936
11874         Part missed from first commit
11875         * decl2.c (finish_anon_union): Copy context.
11876
11877 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
11878
11879         PR g++/2936
11880         * optimize.c (remap_decl): Remap anonymous aggregate members too.
11881
11882 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
11883
11884         PR g++/2823
11885         * semantics.c (expand_body): Don't optimize thunks.
11886
11887 2001-05-25  Sam TH  <sam@uchicago.edu>
11888
11889         * cp-tree.h lex.h: Fix header include guards.
11890
11891 2001-05-25  Mark Mitchell <mark@codesourcery.com>
11892
11893         * decl.c (init_decl_processing): Tweak.
11894
11895 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
11896
11897         * decl.c (duplicate_decls): Tidy.
11898         (init_decl_processing): Always set flag_no_builtin.
11899
11900 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
11901
11902         PR c++/2184
11903         * decl2.c (do_local_using_decl): Push the decls, even in a
11904         template.
11905
11906 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
11907
11908         * optimize.c (initialize_inlined_parameters): Don't set
11909         TREE_READONLY for a VAR_DECL taking the place of an inlined
11910         PARM_DECL.
11911
11912 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
11913
11914         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
11915         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
11916         attribute.
11917
11918 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
11919
11920         * parse.y: Refer to compound literals as such, not as
11921         constructor-expressions.
11922
11923 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
11924
11925         * call.c (build_op_delete_call): Ignore exception-specifications
11926         when looking for matching delete operators.
11927         * init.c (build_new_1): Compute whether or not the allocation
11928         function used is a placement allocation function or not, and
11929         communicate this information to build_op_delete_call.
11930
11931 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
11932
11933         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
11934         (build_vtbl_ref): Adjust.
11935         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
11936         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
11937         Re-add vtable-gc.
11938         (unsupported_options): Correspondingly.
11939
11940         * decl2.c (maybe_make_one_only): Check flag_weak, not
11941         supports_one_only().
11942
11943         * cp-tree.def (START_CATCH_STMT): Lose.
11944         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
11945         * tree.c (cp_statement_code_p): Don't case it.
11946         * semantics.c (cp_expand_stmt): Likewise.
11947         * cp-tree.h (START_CATCH_TYPE): Lose.
11948         (HANDLER_TYPE): New.
11949         * except.c (expand_start_catch_block): Don't start any blocks.
11950         Return the type.
11951         (expand_end_catch_block): Don't end any blocks.
11952         * parse.y (handler): Don't pass anything from finish_handler_parms
11953         to finish_handler.
11954         * pt.c (tsubst_expr): Likewise.
11955         * semantics.c (begin_handler): Call note_level_for_catch here.
11956         (finish_handler_parms): Don't return anything.
11957         (genrtl_catch_block, begin_catch_block): Lose.
11958         (genrtl_handler): Call expand_start_catch here.
11959
11960 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
11961
11962         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
11963         (get_vtable_decl, build_vtt): Not here.
11964
11965 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
11966
11967         PR c++/2781
11968         * optimize.c (update_cloned_parm): Copy addressability and other
11969         flags.
11970
11971 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11972
11973         * pt.c (determine_specialization): Ignore artificial functions.
11974
11975 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
11976
11977         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
11978         (C_RID_CODE): Remove.
11979         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
11980         (init_parse): Don't do it here.
11981
11982 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
11983
11984         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
11985         function declaration to avoid stripping the symbol's attributes.
11986
11987 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
11988
11989         * decl.c (pushdecl): Adjust error string.
11990         (xref_tag): Adjust friend class injection warning. Remove the
11991         inherited name from the class shadowed scope.
11992
11993 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
11994
11995         * except.c (cp_protect_cleanup_actions): New function.
11996         (init_exception_processing): Don't set protect_cleanup_actions
11997         here.  Do set lang_protect_cleanup_actions.
11998
11999 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
12000
12001         * spew.c (read_token): Call yyerror on all unexpected tokens.
12002
12003 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
12004
12005         * init.c (member_init_ok_or_else): Take a tree rather than
12006         string for name.
12007         (expand_member_init): Adjust.
12008
12009 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
12010
12011         * decl.c (duplicate_decls): Suppress warning about duplicate
12012         decls if the first decl is a friend.
12013
12014 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
12015
12016         * except.c (choose_personality_routine): Export.  Add
12017         explanatory comment.  Take an enum languages, not a boolean.
12018         (initialize_handler_parm): Adjust to match.
12019         * cp-tree.h: Prototype choose_personality_routine.
12020         * lex.c (handle_pragma_java_exceptions): New function.
12021         (init_cp_pragma): Register #pragma GCC java_exceptions.
12022
12023 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12024
12025         * method.c (build_mangled_C99_name): Remove unused prototype.
12026
12027 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
12028
12029         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
12030         * typeck.c (get_member_function_from_ptrfunc,
12031         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
12032         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
12033
12034         Reverted Geoff Keating's 2001-05-03's patch.
12035
12036 2001-05-11  Ira Ruben   <ira@apple.com>
12037
12038         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
12039
12040 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
12041
12042         * cp-tree.h (finish_label_expr, lookup_label): Delete.
12043         * parse.y: Update for '&&'; don't issue warning here.
12044         * semantics.c (finish_label_expr): Delete.
12045
12046 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
12047
12048         * splay-tree.h (splay_tree_max): New function.
12049         (splay_tree_min): Likewise.
12050
12051 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
12052
12053         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
12054         (pfn_vflag_identifier): Define.
12055         Update comment about layout of pointer functions.
12056         (build_ptrmemfunc1): Update prototype.
12057         (expand_ptrmemfunc_cst): Update prototype.
12058         * decl.c (initialize_predefined_identifiers): Initialize
12059         pfn_vflag_identifier.
12060         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
12061         an extra field to the type.
12062         * expr.c (cplus_expand_constant): Pass 'flag' between
12063         expand_ptrmemfunc_cst and build_ptrmemfunc1.
12064         * typeck.c (get_member_function_from_ptrfunc): When
12065         FUNCTION_BOUNDARY < 16, look at additional field to determine
12066         if a pointer-to-member is a real pointer or a vtable offset.
12067         (build_ptrmemfunc1): Add new parameter to contain extra field.
12068         (build_ptrmemfunc): Pass the extra field around.
12069         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
12070         (pfn_from_ptrmemfunc): Ignore the extra field.
12071
12072 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
12073
12074         * cp-tree.h (flag_inline_trees): Update documentation.
12075         * decl.c (init_decl_processing): Adjust handling of
12076         flag_inline_functions and flag_inline_trees to support -O3.
12077         (grokfndecl): Set DECL_INLINE on all functions if that's what
12078         the user requested.
12079         (save_function_data): Clear DECL_INLINE in
12080         current_function_cannot_inline is non-NULL.
12081         * decl2.c (flag_inline_trees): Update documentation.
12082
12083 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
12084
12085         * dump.c (cp_dump_tree, USING_STMT case): New case.
12086         * tree.c (cp_statement_code_p): Add USING_STMT.
12087         * decl2.c (do_using_directive): Add the using directive statement.
12088
12089         * tree.c (walk_tree): Reformat an if block.
12090
12091 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
12092
12093         * decl.c (compute_array_index_type): Don't try to do anything with
12094         the indices when processing a template.
12095
12096 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12097
12098         * call.c: NULL_PTR -> NULL.
12099         * class.c: Likewise.
12100         * cvt.c: Likewise.
12101         * decl.c: Likewise.
12102         * decl2.c: Likewise.
12103         * except.c: Likewise.
12104         * init.c: Likewise.
12105         * rtti.c: Likewise.
12106         * search.c: Likewise.
12107         * tree.c: Likewise.
12108         * typeck.c: Likewise.
12109         * typeck2.c: Likewise.
12110
12111 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
12112
12113         * decl2.c (do_using_directive): Revert previous patch.
12114
12115 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12116
12117         * cp-tree.def (USING_STMT): New statement node.
12118         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
12119         * decl2.c (do_using_directive): Add USING_STMT to statement
12120         tree. Don't emit errors when processing template decl.
12121         * pt.c (tsubst_expr, USING_STMT case): New case.
12122         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
12123
12124 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12125
12126         * call.c (build_new_op): Convert args from reference here.
12127         (build_conditional_expr): Don't convert here.
12128
12129 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12130
12131         * spew.c (last_token_id): New static variable.
12132         (read_token): Set it here.
12133         (yyerror): Use it here.
12134
12135 2001-04-30  Richard Henderson  <rth@redhat.com>
12136
12137         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
12138         * decl.c: Likewise.
12139
12140 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
12141
12142         * gxxint.texi: Remove.
12143         * Make-lang.in: Remove all traces of gxxint.texi.
12144
12145 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
12146
12147         * decl2.c (start_static_initialization_or_destruction): Correct
12148         logic to handle the -fno-use-cxa-atexit case.
12149
12150 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
12151
12152         * optimize.c (update_cloned_parm): New function.
12153         (maybe_clone_body): Use it.  Update the `this' parameter too.
12154
12155 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
12156
12157         * decl2.c (unsupported_options): Add new-abi.
12158         * lang-options.h: Remove no longer supported options.
12159
12160 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12161
12162         * except.c (can_convert_eh): Don't check template parms,
12163         typename types etc.
12164
12165 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12166
12167         * optimize.c (maybe_clone_body): Copy parameter names and locations.
12168
12169 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12170
12171         * cp-tree.h (adjust_clone_args): Prototype new function.
12172         * class.c (adjust_clone_args): New function.
12173         * decl.c (start_function): Call it for in charge ctors.
12174
12175 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
12176
12177         * method.c (use_thunk): Make sure that thunks really are emitted
12178         when requested.
12179
12180 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
12181
12182         * mangle.c (write_chars): New macro.
12183         (hwint_to_ascii): New function
12184         (write_number): Use it.
12185         (write_integer_cst): Deal with really big numbers.
12186
12187 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
12188
12189         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
12190         the clone.
12191
12192 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
12193
12194         * decl.c (grokdeclarator): Set context of namespace scope
12195         TYPE_DECLS.
12196
12197 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
12198
12199         * cp/optimize.c: Include hashtab.h.
12200         (struct inline_data): Add tree_pruner.
12201         (expand_call_inline, expand_calls_inline): Use it when calling
12202         walk_tree.
12203         (optimize_function): Initialize and free tree_pruner.
12204
12205 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
12206
12207         Lazy __FUNCTION__ generation.
12208         * cp-tree.def (FUNCTION_NAME): Remove.
12209         * cp-tree.h (function_name_declared_p): Remove.
12210         (cp_fname_init): Prototype.
12211         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
12212         don't call declare_function_name. Call start_fname_decls.
12213         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
12214         clobber the line number.
12215         (cp_fname_init): New function.
12216         (start_function): Call start_fname_decls.
12217         (finish_function): Call finish_fname_decls.
12218         * lex.c (reswords): Add slots for __FUNCTION__ et al.
12219         (rid_to_yy): Add mappings for __FUNCTION__ et al.
12220         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
12221         * parse.y (VAR_FUNC_NAME): New token.
12222         (primary): Add VAR_FUNC_NAME.
12223         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
12224         generation.
12225         (tsubst, FUNCTION_NAME case): Remove.
12226         (tsubst_copy, FUNCTION_NAME case): Remove.
12227         (tsubst_expr, DECL_STMT case): Be careful with a
12228         DECL_PRETTY_FUNCTION_P.
12229         (instantiate_decl): Remove function_name_declared_p.
12230         * semantics.c (begin_compound_statement): Don't call
12231         declare_function_name here.
12232         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
12233         (finish_translation_unit): Call finish_fname_decls.
12234         (expand_body): Remove function_name_declared_p.
12235         * typeck2.c (digest_init): Allow any ERROR_MARK.
12236
12237 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
12238
12239         * pt.c (tsubst_decl): Use VOID_TYPE_P.
12240         * semantics.c: Fix some typos.
12241
12242 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
12243
12244         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
12245
12246 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12247
12248         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
12249
12250 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
12251
12252         * except.c (build_throw): Wrap the initialization of the exception
12253         object in a MUST_NOT_THROW_EXPR.
12254         (do_free_exception): #if 0.
12255
12256 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
12257
12258         * cp-tree.h (finish_enum): Change prototype.
12259         * decl.c (finish_enum): Reorganize.
12260         * parse.y (structsp): Adjust calls to finish_enum.
12261
12262 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12263
12264         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
12265         't' case.
12266
12267 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12268
12269         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
12270         (layout_empty_base): Return at end flag.
12271         (build_base_field): Likewise.
12272         (build_base_fields): Likewise.
12273         (layout_virtual_bases): Don't add 1 to eoc value.
12274         (end_of_class): Use full size for empty bases.
12275         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
12276         empty bases. Don't add 1 to eoc value. Only add trailing padding
12277         if we're an empty class with no empty bases.
12278         (dump_class_hierarchy): Dump size and alignment.
12279
12280 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
12281
12282         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
12283         ICS_BAD_FLAG.
12284
12285 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
12286
12287         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
12288         is found, look first if name does not match the structure name.
12289
12290 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
12291
12292         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
12293         set.
12294         (SET_DECL_LANGUAGE): New macro.
12295         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
12296         (pushdecl): Likewise.
12297         (build_library_fn_1): Likewise.
12298         (build_cp_library_fn): Likewise.
12299         (grokfndecl): Likewise.
12300         (grokvardecl): Mark `extern "C"' variables as having C linkage.
12301         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
12302         * lex.c (retrofit_lang_decl): Likewise.
12303         * mangle.c (mangle_decl_string): Don't mangle the names of
12304         variables declared with C language linkage.
12305         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
12306
12307 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12308
12309         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
12310         flag_access_control from uninitialized storage.
12311
12312 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
12313
12314         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
12315         * mangle.c (write_pointer_to_member_type): Fix mangling of
12316         pointers to cv-qualified member function types.
12317
12318         * init.c (build_delete): Create a SAVE_EXPR for the address if
12319         we're going to use it more than once.
12320
12321 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
12322
12323         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
12324         (expand_ptremfunc_cst): Change prototype.
12325         (delta2_from_ptrmemfunc): Remove.
12326         * expr.c (cplus_expand_constant): Adjust call to
12327         expand_ptrmemfunc_cst.
12328         * typeck.c (build_ptrmemfunc1): Simplify.
12329         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
12330         results in a constant.
12331         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
12332         (delta2_from_ptrmemfunc): Remove.
12333         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
12334
12335 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
12336
12337         * cp-tree.h (decl_namespace_list): New macro.
12338         (struct saved_scope): Add decl_ns_list.
12339         * decl.c (mark_saved_scope): Mark it.
12340         * decl2.c: Lose static decl_namespace_list.
12341         (init_decl2): Don't save it.
12342
12343 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12344
12345         * cp-tree.h (warn_return_type, yylex): Delete redundant
12346         declarations.
12347
12348         * decl.c (current_class_depth, global_namespace): Likewise.
12349
12350         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
12351
12352         * repo.c (flag_use_repository): Likewise.
12353
12354 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12355
12356         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
12357         set_block, pushdecl, getdecls, gettags, init_decl_processing,
12358         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
12359         lvalue_or_else, print_lang_statistics, comp_target_types,
12360         unsigned_type, signed_type, signed_or_unsigned_type,
12361         build_function_call, mark_addressable, incomplete_type_error):
12362         Delete redundant declarations.
12363
12364 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
12365
12366         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
12367         (TYPE_ANONYMOUS_P): New macro.
12368         (TAGGED_TYPE_P): New macro.
12369         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
12370         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
12371         * tree.c (no_linkage_helper): Likewise.
12372         * semantics.c (begin_class_definition): Likewise.
12373         * pt.c (convert_template_argument): Likewise.
12374         * lex.c (check_for_missing_semicolon): Likewise.
12375
12376 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
12377
12378         * class.c (dfs_unshared_virtual_bases): New function.
12379         (mark_primary_bases): Call it.
12380         (check_bases): Ignore virtual bases when determining
12381         nearly-emptiness.
12382
12383 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
12384
12385         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
12386
12387 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
12388
12389         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
12390         cloned function to the clone.
12391
12392 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12393
12394         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
12395
12396         * semantics.c: Include expr.h.
12397
12398 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
12399
12400         * method.c (implicitly_declare_fn): Commonize code for copy ctor
12401         and assignment op. Set TREE_USED for parameter.
12402
12403 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
12404
12405         * class.c (find_final_overrider_data): Add `candidates'.
12406         (dfs_find_final_overrider): Don't issue error messages
12407         prematurely.
12408         (find_final_overrider): Issue error messages here.
12409         (build_base_field): Don't warn about amgibuous direct bases here.
12410         (warn_about_ambiguous_direct_bases): New function.
12411         (layout_class_type): Use it.
12412
12413 2001-04-10  Richard Henderson  <rth@redhat.com>
12414
12415         * typeck.c (build_array_ref): Push the array reference inside
12416         COMPOUND_EXPR and COND_EXPR.
12417
12418 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
12419
12420         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
12421         * decl.c (duplicate_decls): Adjust accordingly.
12422         (maybe_commonize_var): Likewise.
12423         (grokfndecl): Likewise.
12424         (start_function): Likewise.
12425         (start_method): Likewise.
12426         * decl2.c (key_method): Likewise.
12427         (import_export_decl): Likewise.
12428         * method.c (implicitly_declare_fn): Likewise.
12429         * optimize.c (maybe_clone_body): Likewise.
12430
12431 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
12432
12433         * lang-specs.h: Add __DEPRECATED.
12434
12435 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
12436
12437         * search.c (get_dynamic_cast_base_type): When building a new
12438         constant, set its type to ssizetype.
12439
12440 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
12441
12442         * optimize.c (expand_call_inline): Only add newly inlined statements
12443         into inlined_stmts.
12444
12445 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
12446
12447         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
12448         (OPERATOR_FORMAT): Likewise.
12449         (OPERATOR_TYPENAME_FORMAT): Likewise.
12450         * operators.def: Remove old name-mangling information.
12451         * decl.c (grok_op_properties): Adjust accordingly.
12452         * lex.c (init_operators): Likewise.
12453         * rtti.c (get_tinfo_decl): Issue error messages about types that
12454         have variable size.
12455
12456 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
12457
12458         * decl2.c (import_export_decl): Don't call import_export_class
12459         when processing an inline member function.
12460         * semantics.c (expand_body): Call import_export_decl before
12461         emitting inline functions.
12462
12463 2001-03-28  Richard Henderson  <rth@redhat.com>
12464
12465         IA-64 ABI Exception Handling:
12466         * cp-tree.def (EH_SPEC_BLOCK): New.
12467         (MUST_NOT_THROW_EXPR): New.
12468         * cp-tree.h: Update changed function declarations.
12469         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
12470         (CPTI_CALL_UNEXPECTED): New.
12471         (struct cp_language_function): Rename x_eh_spec_try_block
12472         to x_eh_spec_block.
12473         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
12474         * decl.c (current_binding_level): If no current function
12475         bindings, revert to scope_chain.
12476         (initialize_predefined_identifiers): Remove __cp_push_exception.
12477         (store_parm_decls): Use begin_eh_spec_block.
12478         (finish_function): Use finish_eh_spec_block.
12479         (mark_lang_function): Update for name changes.
12480         * decl2.c (finish_file): No mark_all_runtime_matches.
12481         * dump.c (cp_dump_tree): Handle new tree codes.
12482         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
12483         * except.c (catch_language_init, catch_language): Remove.
12484         (init_exception_processing): Don't set language code.
12485         Initialize call_unexpected_node, protect_cleanup_actions,
12486         eh_personality_libfunc, lang_eh_runtime_type.
12487         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
12488         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
12489         (prepare_eh_type): Split out type canonicalizations ...
12490         (build_eh_type_type): ... from here.
12491         (build_eh_type_type_ref): Remove.
12492         (mark_all_runtime_matches): Remove.
12493         (build_exc_ptr): New.
12494         (do_begin_catch, do_end_catch): New.
12495         (do_pop_exception): Remove.
12496         (build_terminate_handler): Remove.
12497         (choose_personality_routine): Split out language choice from ...
12498         (initialize_handler_parm): ... here.
12499         Use MUST_NOT_THROW_EXPR.
12500         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
12501         exception object handling.
12502         (expand_start_eh_spec, expand_end_eh_spec): Remove.
12503         (expand_exception_blocks, alloc_eh_object): Remove.
12504         (begin_eh_spec_block, finish_eh_spec_block): New.
12505         (do_allocate_exception, do_free_exception): New.
12506         (expand_throw): Merge into ...
12507         (build_throw): ... here.  Update for abi.
12508         * expr.c (cplus_expand_expr): No expand_internal_throw.
12509         Handle MUST_NOT_THROW_EXPR.
12510         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
12511         * semantics.c (*) Update for except.h name changes.
12512         (genrtl_try_block): No protect_with_terminate.
12513         (genrtl_eh_spec_block): New.
12514         (genrtl_handler): Don't emit the goto here.
12515         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
12516         (genrtl_finish_function): Don't expand_exception_blocks.
12517         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
12518
12519 2001-03-28  Richard Henderson  <rth@redhat.com>
12520
12521         * decl.c (struct named_label_list): Rename eh_region to
12522         in_try_scope, add in_catch_scope.
12523         (struct binding_level): Rename eh_region to is_try_scope,
12524         add is_catch_scope.
12525         (note_level_for_try): Rename from note_level_for_eh.
12526         (note_level_for_catch): New.
12527         (poplevel): Copy both is_try_scope and is_catch_scope to
12528         the named_label_list struct.
12529         (check_previous_goto_1): Don't check for catch block via
12530         DECL_ARTIFICIAL; use in_try_scope instead.
12531         (check_goto): Likewise.
12532         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
12533         * except.c (expand_start_catch_block): Call note_level_for_catch.
12534         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
12535
12536 2001-03-27  Richard Henderson  <rth@redhat.com>
12537
12538         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
12539         exceptions_via_longjmp.
12540
12541 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
12542
12543         * pt.c (check_default_tmpl_args):  Make error messages clearer.
12544
12545 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
12546
12547         * error.c:  Also undefine 'A' macro used for cp_printers definition.
12548
12549 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12550
12551         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
12552
12553 2001-03-26  Mike Yang <yang@research.att.com>
12554             Mark Mitchell  <mark@codesourcery.com>
12555
12556         * dump.c (dump_access): New function.
12557         (cp_dump_tree): Use it.  Dump basetype information for class
12558         types.
12559
12560 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
12561
12562         * Makefile.in (optimize.o): Depend on params.h.
12563         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
12564         (init_decl_processing): Set flag_no_inline when doing
12565         inlining-on-trees.
12566         * optimize.c: Include params.h.
12567         (struct inline_data): Improve documentation of FNS.  Add
12568         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
12569         (INSNS_PER_STMT): New macro.
12570         (remap_block): Use CLONING_P.
12571         (inlinable_function_p): Don't inline big functions.
12572         (expand_call_inline): Keep track of how much inlining we've done.
12573         (optimize_function): Set FIRST_INLINED_FN.
12574         (maybe_clone_body): Set CLONING_P.
12575         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
12576         tree nodes.
12577         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
12578         rest_of_compilation.  Clear DECL_RTL for local variables
12579         afterwards.
12580         (clear_decl_rtl): New function.
12581
12582 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
12583
12584         Implement DR 209
12585         * cp-tree.h (skip_type_access_control,
12586         reset_type_access_control): Prototype.
12587         * decl.c (grokdeclarator): Access of friends is not checked.
12588         * parse.y (component_decl_list): Reset type access control.
12589         * semantics.c (decl_type_access_control): Clear
12590         current_type_lookups.
12591         (save_type_access_control): Don't save if not deferring.
12592         (skip_type_access_control, reset_type_access_control): New
12593         functions.
12594         (begin_class_definition): Do type access control for basetypes.
12595         Start deferred access control.
12596         (finish_class_definition): Resume immediate access control if
12597         this is a local class.
12598
12599 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12600
12601         * class.c (add_method): Use memcpy/memmove, not bcopy.
12602
12603         * decl.c (duplicate_decls): Likewise.
12604
12605 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
12606
12607         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
12608         not `_'.
12609
12610 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
12611
12612         * decl.c (local_names): Define.
12613         (push_local_name): New.
12614         (grok_reference_init): Return init if initializing static reference
12615         variable with non-constant instead of emitting it.
12616         Move expand_static_init call to cp_finish_decl.
12617         (layout_var_decl): Call push_local_name.
12618         (maybe_commonize_var): Allow inlining functions even if they have
12619         static local variables, use comdat_linkage for them if flag_weak.
12620         (check_initializer): Call obscure_complex_init if
12621         grok_reference_init returned nonzero.
12622         (save_function_data): Clear x_local_names.
12623         (pop_cp_function_context): Free x_local_names.
12624         (mark_inlined_fns): Remove.
12625         (mark_lang_function): Mark x_local_names.
12626         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
12627         Mark inlined_fns as tree, remove call to mark_inlined_fns.
12628         * class.c (alter_access): Ensure DECL_ACCESS is never set if
12629         DECL_DISCRIMINATOR_P.
12630         * cp-tree.h (cp_language_function): Add x_local_names.
12631         (lang_decl_flags): Add discriminator into u2.
12632         (lang_decl_inlined_fns): Remove.
12633         (lang_decl): inlined_fns is now a TREE_VEC.
12634         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
12635         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
12636         TREE_VEC, not a custom structure.
12637         (optimize_function): Likewise.
12638         * mangle.c (discriminator_for_local_entity): Discriminate among
12639         VAR_DECL local entities.
12640         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
12641         is not valid.
12642
12643 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
12644
12645         Add support for Java interface method calls.
12646         * cp-tree.h (struct lang_type): Add java_interface flag.
12647         (TYPE_JAVA_INTERFACE): New macro.
12648         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
12649         by setting TYPE_JAVA_INTERFACE.
12650         * call.c (java_iface_lookup_fn): New static.
12651         (build_over_call): If calling a method declared in a
12652         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
12653         expression which resolves the function address.
12654         (build_java_interface_fn_ref): New function.
12655
12656 2001-03-22  Richard Henderson  <rth@redhat.com>
12657
12658         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
12659         * except.c: Don't include it.
12660
12661 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
12662             based on an idea from Joe Buck <jbuck@synopsys.com>
12663
12664         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
12665         New nonterminals.
12666         (data_def, component_decl): Add reductions to bad_decl.
12667
12668 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
12669
12670         * method.c (do_build_assign_ref): Don't use build_modify_expr for
12671         anonymous aggregates, since they don't have assignment operator
12672         method.
12673         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
12674         assignment operators for anonymous structure fields.
12675
12676 2001-03-21  Jason Merrill  <jason@redhat.com>
12677
12678         * pt.c (instantiate_decl): Abort if we see a member constant
12679         instantiation that doesn't already have its initializer.
12680         Downgrade explicit instantiation without definition to pedwarn.
12681
12682         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
12683         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
12684         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
12685
12686         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
12687         (pending_vtables): Remove.
12688         * decl2.c (pending_vtables): Remove.
12689         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
12690         CLASSTYPE_VTABLE_NEEDS_WRITING.
12691         (import_export_class): Likewise.
12692         (init_decl2): Don't mark pending_vtables.
12693         * lex.c (handle_pragma_vtable): Just sorry.
12694         * pt.c (instantiate_class_template): Don't mess with
12695         CLASSTYPE_VTABLE_NEEDS_WRITING.
12696         (mark_class_instantiated): Likewise.
12697         * ptree.c (print_lang_type): Don't print it.
12698         * semantics.c (begin_class_definition): Don't set it.
12699
12700         * pt.c (template_tail): Replace with last_pending_template.
12701         (maybe_templates, maybe_template_tail): Remove.
12702         (add_pending_template): Adjust.
12703         (instantiate_pending_templates): Adjust.
12704
12705         * cp-tree.h (struct saved_scope): Remove lang_stack field.
12706         (current_lang_stack): Remove.
12707         * decl.c (maybe_push_to_top_level): Don't initialize it.
12708         (duplicate_decls): Use current_lang_depth.
12709         (xref_basetypes): Likewise.
12710         * class.c (current_lang_depth): New fn.
12711         (push_lang_context): Use more varray functionality.
12712         (pop_lang_context): Likewise.
12713
12714         * error.c (GLOBAL_THING): Always use '__'.
12715
12716 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
12717
12718         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
12719
12720         * mangle.c (mangle_decl_string): Mangle the names of overloaded
12721         operators, even when they have `extern "C"' linkage.
12722
12723 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
12724
12725         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
12726         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12727         where it's not necessary.
12728         (add_method): Remove optimization involving comparison of
12729         DECL_ASSEMBLER_NAME.
12730         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
12731         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12732         where it's not necessary.
12733         (check_methods): Likewise.
12734         (build_clone): Likewise.
12735         (built_vtt): Likewise.
12736         * cp-tree.h (DECL_NEEDED_P): Likewise.
12737         * decl.c (pushtag): Likewise.
12738         (duplicate_decls): Likewise.
12739         (pushdecl): Likewise.
12740         (builtin_function): Likewise.
12741         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
12742         (build_cp_library_fn): Likewise.
12743         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
12744         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12745         where it's not necessary.
12746         (make_rtl_for_nonlocal_decl): Likewise.
12747         (cp_finish_decl): Likewise.
12748         (grokfndecl): Likewise.
12749         (grokvardecl): Likewise.
12750         (grokdeclarator): Likewise.
12751         (start_function): Likewise.
12752         (cp_missing_return_ok_p): Likewise.
12753         * decl2.c (grokclassfn): Likewise.
12754         (check_classfn): Likewise.
12755         (finish_static_data_member_decl): Likewise.
12756         (grokfield): Likewise.
12757         * error.c (GLOBAL_IORD_P): Remove.
12758         (dump_global_iord): Improve output.
12759         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
12760         * except.c (nothrow_libfn_p): Summarily reject any function not in
12761         namespace-scope.
12762         * init.c (build_java_class_ref): Don't explicitly set
12763         DECL_ASSEMBLER_NAME after calling mangle_decl.
12764         * mangle.c (mangle_decl_string): Handle extern "C" functions.
12765         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
12766         * method.c (set_mangled_name_for_decl): Don't explicitly set
12767         DECL_ASSEMBLER_NAME after calling mangle_decl.
12768         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
12769         IDENTIFIER_GLOBAL_VALUE for the thunk.
12770         * pt.c (set_mangled_name_for_template_decl): Remove.
12771         (check_explicit_specialization): Don't use it.
12772         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
12773         (tsubst_friend_function): Likewise.
12774         (tsubst_decl): Likewise.
12775         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
12776         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
12777         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12778         where it's not necessary.
12779         (tinfo_base_init): Likewise.
12780         (create_real_tinfo_var): Likewise.
12781         * search.c (looup_field_1): Likewise.
12782         * semantics.c (finish_named_return_value): Likewise.
12783         * tree.c (init_tree): Set lang_set_decl_assembler_name.
12784
12785 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
12786
12787         Correct semantics restrictions checking in throw-expression.
12788         * except.c (is_admissible_throw_operand): New function.
12789         (build_throw): Use it.
12790
12791 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
12792
12793         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
12794         and its ilk.
12795
12796 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
12797
12798         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12799         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
12800         * decl.c (duplicate_decls): Likewise.
12801         (builtin_function): Likewise.
12802         (build_library_fn): Likewise.
12803         (build_cp_library_fn): Likewise.
12804         (check_initializer): Likewise.
12805         (cp_finish_decl): Likewise.
12806         * decl2.c (grokfield): Likewise.
12807         (grok_function_init): Remove #if 0'd code.
12808         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12809         * friend.c (do_friend): Likewise.
12810         * init.c (get_temp_regvar): Likewise.
12811         * method.c (make_thunk): Likewise.
12812         * pt.c (tsubst_friend_function): Likewise.
12813         (tsubst_decl): Likewise.
12814         (regenerate_decl_from_template): Likewise.
12815         * semantics.c (genrtl_named_return_value): Likewise.
12816         (expand_body): Likewise.
12817         (genrtl_finish_function): Likewise.
12818         * tree.c (cp_tree_equal): Likewise.
12819
12820 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
12821
12822         * call.c (convert_like_real): Add extra semantics to INNER
12823         parameter. Don't convert to temporary if a user conversion
12824         gives us an lvalue that we're about to bind to a reference.
12825         Set INNER to indicate pending reference binding on recursive
12826         calls.
12827
12828 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
12829
12830         * cp/lex.c: Delete duplicate pending_lang_change.
12831
12832 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
12833
12834         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
12835         Similarly.
12836         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
12837         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
12838
12839 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
12840
12841         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
12842
12843 2001-03-08  Stan Shebs  <shebs@apple.com>
12844
12845         * cp-tree.h (set_identifier_local_value): Remove unused decl.
12846
12847 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
12848
12849         * spew.c: Remove references to CPP_OSTRING.
12850
12851 2001-03-06  Andrew Haley  <aph@redhat.com>
12852
12853         * typeck.c (convert_arguments): Check that we have an fndecl.
12854
12855 2001-03-05  Andrew Haley  <aph@redhat.com>
12856
12857         * typeck.c (convert_arguments): Don't do ellipsis conversion for
12858         __built_in_constant_p.
12859
12860 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
12861
12862         * typeck.c (build_static_cast): Allow enum to enum conversions
12863         as per DR 128.
12864
12865 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
12866
12867         * class.c (check_field_decls): Pointers to member do not a
12868         non-pod struct make, as per DR 148.
12869
12870 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
12871
12872         * call.c (joust): cp_pedwarn when using gnu extension concerning
12873         worst conversion sequences.
12874
12875 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
12876
12877         * decl.c: Replace all uses of 'boolean' with 'bool'.
12878
12879 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
12880
12881         * lang-specs.h: Add zero initializer for cpp_spec field to
12882         all array elements that need one.  Don't put an #ifdef inside
12883         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
12884         use it.
12885
12886 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
12887
12888         Implement using decls inside template functions.
12889         * decl2.c (validate_nonmember_using_decl): Don't special case
12890         fake_std_node in the global namespace. Don't reject early when
12891         processing a template.
12892         (do_local_using_decl): Add to statement tree. Don't do further
12893         processing when building a template.
12894         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
12895
12896 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
12897
12898         * decl2.c (do_nonmember_using_decl): Don't complain if we find
12899         same function. Do complain about ambiguating extern "C"
12900         declarations.
12901
12902 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
12903
12904         Remove floating point and complex type template constant parms.
12905         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
12906         COMPLEX_TYPE extensions.
12907         (invalid_nontype_parm_type_p): Likewise.
12908
12909 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
12910
12911         * except.c (call_eh_info): Revert "match_function"'s type.
12912
12913 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
12914
12915         Fix ctor vtable vcall offsets.
12916         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
12917         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
12918         (get_matching_base): Remove.
12919         (get_original_base): New function.
12920         (build_vtbl_initializer): Initialize vid.rtti_binfo.
12921         Use a virtual thunk for a ctor vtable with an index
12922         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
12923         primary base within a constructor vtable. Only set
12924         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
12925         when primary base has been lost.
12926         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
12927
12928 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
12929
12930         * call.c (joust): Ensure more_specialized()'s argument length
12931         parameter has correct value for constructors.
12932
12933 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
12934
12935         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
12936
12937         * decl.c (mark_inlined_fns): Prototype.
12938
12939 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
12940
12941         * spew.c (yylex): Correct handling of friends.
12942
12943 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
12944
12945         * mangle.c (write_encoding): Pass write_function_type the
12946         FUNCTION_DECL for the function being encoded.
12947         (write_function_type): Pass it along to write_bare_function_type.
12948         (write_bare_function_type): Pass it along to write_method_parms.
12949         (write_method_parms): Don't mangle the compiler-generated
12950         parameters to a constructor or destructor.
12951
12952 2001-02-22  Andreas Jaeger  <aj@suse.de>
12953
12954         * optimize.c: Include toplev.h for
12955         note_deferral_of_defined_inline_function prototype.
12956
12957 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
12958
12959         * cp-tree.h (struct lang_decl_inlined_fns): New.
12960         (struct lang_decls): Add inlined_fns.
12961         (DECL_INLINED_FNS): New macro.
12962         * optimize.c (struct inline_data): Add inlined_fns.
12963         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
12964         (inlinable_function_p): Likewise, fix typo in comment,
12965         function is not inlinable if it already inlined function currently
12966         being optimized.
12967         (expand_call_inline): Add fn to inlined_fns if necessary.
12968         (optimize_function): Initialize inlined_fns.
12969         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
12970         * decl.c (mark_inlined_fns): New function.
12971         (lang_mark_tree): Call it.
12972
12973 2001-02-21  Jason Merrill  <jason@redhat.com>
12974
12975         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
12976         (DECL_UNINLINABLE): Move to middle-end.
12977
12978         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
12979         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
12980         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
12981         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
12982         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
12983
12984         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
12985         second parm of op=.
12986
12987 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
12988
12989         * decl2.c (set_decl_namespace): Allow explicit instantiations in
12990         any namespace.
12991
12992 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12993
12994         * optimize.c (expand_call_inline): Don't walk subtrees of type
12995         nodes.
12996
12997 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
12998
12999         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
13000         for a destructor.
13001
13002 2001-02-18  Jason Merrill  <jason@redhat.com>
13003
13004         Do put the VTT parameter in DECL_ARGUMENTS.
13005         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
13006         (current_vtt_parm): New macro.
13007         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
13008         (DECL_HAS_VTT_PARM_P): New macro.
13009         (DECL_VTT_PARM): Remove.
13010         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
13011         * decl.c (duplicate_decls): Only copy the operator code if
13012         appropriate.
13013         (start_function): Set current_vtt_parm.
13014         (lang_mark_tree): Don't mark vtt_parm.
13015         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
13016         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
13017         * class.c (build_clone): Maybe remove the VTT parm.
13018         * optimize.c (maybe_clone_body): Set up the VTT parm.
13019         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
13020         * call.c (build_over_call): Just allow the VTT arg.
13021         * method.c (make_thunk): Don't set DECL_VTT_PARM.
13022         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
13023         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
13024         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
13025         * error.c (dump_function_decl): Likewise.
13026         * call.c (build_user_type_conversion_1, convert_like_real): Abort
13027         if we try to call a constructor with in-charge or VTT parms.
13028         * method.c (skip_artificial_parms_for): New fn.
13029         * call.c (add_function_candidate, build_over_call): Call it.
13030         * call.c (build_new_method_call): Use current_vtt_parm.
13031         * init.c (expand_virtual_init): Likewise.
13032         * class.c (same_signature_p): No longer static.
13033         * cp-tree.h: Declare it.
13034         * search.c (look_for_overrides_r): Use it.
13035
13036 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
13037
13038         * cp-tree.h (new_abi_rtti_p): Remove.
13039         (name_mangling_version): Likewise.
13040         (flag_do_squangling): Likewise.
13041         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
13042         * decl.c (grokfndecl): Likewise.
13043         * decl2.c (name_mangling_version): Remove.
13044         (flag_do_squangling): Likewise.
13045         (lang_f_options): Remove `squangle'.
13046         (unsupported_options): Add `squangle'.
13047         (cxx_decode_option): Issue a warning about uses of
13048         -fname-mangling-version.
13049         (finish_file): Remove old ABI support.
13050         * pt.c (check_explicit_specialization): Likewise.
13051         (tsubst_decl): Likewise.
13052         * rtti.c (init_rtti_processing): Likewise.
13053         (build_headof): Likewise.
13054         (get_tinfo_decl_dynamic): Likewise.
13055         (tinfo_from_decl): Likewise.
13056         (build_dynamic_cast_1): Likewise.
13057         (synthesize_tinfo_var): Likewise.
13058         * init.c (build_new): Allow enumeration types for the array-bounds
13059         in a direct-new-declarator.
13060
13061         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
13062
13063         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
13064         TREE_PROTECTED from the template being specialized.
13065
13066 2001-02-17  Jason Merrill  <jason@redhat.com>
13067
13068         * decl2.c (build_artificial_parm): Set TREE_READONLY.
13069
13070         * decl.c (bad_specifiers): Allow throw specs on things with
13071         pointer-to-function or -member-function type.
13072         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
13073         a pmf.
13074
13075 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
13076
13077         * call.c (check_dtor_name): Handle template names correctly.
13078
13079 2001-02-16  Jason Merrill  <jason@redhat.com>
13080
13081         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
13082         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
13083         * optimize.c (maybe_clone_body): Don't substitute it.
13084         * call.c (build_new_method_call): Check in_chrg instead.
13085         * init.c (expand_virtual_init): Likewise.
13086
13087 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
13088
13089         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
13090         class-type introduces at least a type-name.
13091
13092 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
13093
13094         * call.c (convert_like_real): Create a temporary for non-lvalue.
13095
13096 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
13097
13098         * cp-tree.h: Fix typos in comments.
13099
13100 2001-02-16  Jason Merrill  <jason@redhat.com>
13101
13102         * optimize.c (remap_block): If we're compiling a clone, pass the
13103         new block to insert_block.
13104
13105 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
13106
13107         * semantics.c (finish_asm_stmt): Robustify.
13108
13109 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
13110
13111         * pt.c (push_template_decl_real): Don't remangle the name of a
13112         class template.
13113
13114 2001-02-15  Jim Meyering  <meyering@lucent.com>
13115
13116         * Make-lang.in (c++.install-common): Depend on installdirs.
13117         (c++.install-info): Likewise.
13118         (c++.install-man): Likewise.
13119
13120 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
13121
13122         * typeck2.c (build_m_component_ref): Robustify.
13123
13124 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
13125
13126         * friend.c (do_friend): Don't take the nested [template] class
13127         into account when deciding whether to warn about the friend
13128         function not referring to a template function.
13129
13130 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
13131
13132         * typeck.c (build_unary_op): Clarify error message.
13133
13134 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
13135
13136         * parse.y (component_constructor_declarator): allow optional
13137         parentheses around constructor class name.
13138
13139 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13140
13141         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
13142         section.
13143         * init.c (emit_base_init): Remove incorrect comment about
13144         virtual bases.
13145         * method.c (make_thunk): Fix comment alignment.
13146
13147 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13148
13149         Kill remnants of this is variable.
13150         * cp-tree.h (flag_this_is_variable): Remove.
13151         * decl2.c (flag_this_is_variable): Remove.
13152         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
13153         (build_vbase_path): The path is non-static, even in a cdtor.
13154         (resolves_to_fixed_type_p): Add additional return value.
13155         * search.c (init_vbase_pointers): Adjust.
13156         * tree.c (lvalue_p_1): Adjust.
13157         * typeck.c (mark_addressable): Adjust.
13158
13159 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13160
13161         * pt.c (unify): Don't check cv quals of array types.
13162
13163 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13164
13165         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
13166         check whether we already have the type.
13167
13168 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
13169
13170         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
13171         * call.c (build_op_delete_call): Simplify to remove duplicate
13172         code.
13173         * class.c (clone_function_decl): Don't build the deleting variant
13174         of a non-virtual destructor.
13175         * decl.c (finish_destructor_body): Don't call delete if this is a
13176         non-virtual destructor.
13177         * init.c (build_delete): Explicitly call `operator delete' when
13178         deleting an object with a non-virtual destructor.
13179
13180 2001-02-13  Jason Merrill  <jason@redhat.com>
13181
13182         * lang-specs.h: Add more __EXCEPTIONS.
13183
13184 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13185
13186         * typeck2.c (process_init_constructor): Check
13187         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
13188
13189 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13190
13191         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
13192         Remove spurious information in comment. Allow further
13193         adjustments of REFERENCE_TYPE args.
13194
13195 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13196
13197         * errfn.c (cp_deprecated): Tweak diagnostic text.
13198         * parse.y (new_initializer): Deprecate initializer lists
13199         extension.
13200
13201 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
13202
13203         Remove old ABI support.
13204
13205 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
13206
13207         * decl2.c (flag_vtable_thunks): Always set it to 1.
13208         (flag_new_abi): Likewise.
13209         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
13210
13211         * Makefile.in (g++spec.o): Fix typo.
13212
13213 2001-02-09  Jason Merrill  <jason@redhat.com>
13214
13215         * lang-specs.h: Restore definition of __EXCEPTIONS.
13216
13217 2001-02-08  Jason Merrill  <jason@redhat.com>
13218
13219         * search.c (shared_member_p): New function.
13220         (lookup_field_r): Use it.
13221         * cp-tree.h (SHARED_MEMBER_P): Remove.
13222
13223         * method.c (process_overload_item): Handle template-dependent array
13224         bounds.
13225         * pt.c (type_unification_real): If we end up with undeduced nontype
13226         parms, try again.
13227
13228         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
13229         types.
13230
13231         * typeck2.c (friendly_abort): Don't say anything if we have
13232         earlier errors or sorries.
13233
13234         * decl.c (check_tag_decl): Notice attempts to redefine bool and
13235         wchar_t.  Ignore if in_system_header.
13236
13237         * decl.c (maybe_push_cleanup_level): New fn...
13238         (start_decl_1): ...split out from here.
13239         * cvt.c (build_up_reference): Use it.
13240         * cp-tree.h: Declare it.
13241
13242 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
13243
13244         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
13245         spec.
13246
13247 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
13248
13249         * pt.c (lookup_template_class): Make sure it's a primary
13250         template or template_template_parm when called from the parser.
13251         (instantiate_template_class): Add assertion.
13252
13253 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
13254
13255         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
13256         from error_mark_node.
13257
13258 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
13259
13260         Fix specification and implementation bugs in V3 ABI
13261         construction vtables.
13262         * cp-tree.h (flag_dump_class_layout): New flag.
13263         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
13264         (BINFO_LOST_PRIMARY_P): New flag.
13265         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
13266         (BINFO_PRIMARY_MARKED_P): Rename to ...
13267         (BINFO_PRIMARY_P): ... here.
13268         (binfo_via_virtual): New prototype.
13269         * decl2.c (flag_dump_class_layout): New flag.
13270         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
13271         use `=' as a file name separator.
13272         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
13273         bases.
13274         (build_vtbl_address): If this is a virtual primary base, then
13275         get the vtbl of what it is ultimately primary for.
13276         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
13277         for BINFO_PRIMARY_P.
13278         (dfs_skip_nonprimary_vbases_markedp): Likewise.
13279         (get_shared_vbase_if_not_primary): Likewise.
13280         (dfs_get_pure_virtuals): Likewise.
13281         (expand_upcast_fixups): Likewise.
13282         (fixup_virtual_upcast_offsets): Likewise.
13283         (dfs_find_vbase_instance): Likewise.
13284         (find_vbase_instance): Likewise.
13285         (binfo_from_vbase): Adjust comment to reflect reality.
13286         (binfo_via_virtual): New function.
13287         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
13288         for binfo walking during VTT construction.
13289         (dfs_mark_primary_bases): Remove.
13290         (force_canonical_binfo_r): New function.
13291         (force_canonical_binfo): New function.
13292         (mark_primary_virtual_base): New function.
13293         (mark_primary_bases): Walk in inheritance graph order, use
13294         mark_primary_virtual_base.
13295         (determine_primary_base): Use some more intermediate variables.
13296         (dfs_find_final_overrider): Don't check for overriding along a
13297         virtual path.
13298         (dfs_modify_vtables): Walk into primary virtual bases too.
13299         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
13300         (build_base_fields): Likewise.
13301         (dfs_set_offset_for_unshared_vbases): Likewise.
13302         (layout_virtual_bases): Likewise.
13303         (end_of_class): Likewise.
13304         (finish_struct_1): Call dump_class_hierarchy, if requested.
13305         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
13306         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
13307         (dump_class_hierarchy): Add file parameter. Append to file, if
13308         required.
13309         (finish_vtbls): Adjust accumulate_vtbl_inits call.
13310         Use canonical base for virtual bases.
13311         (build_vtt): Add more comments. Adjust build_vtt_inits call.
13312         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
13313         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
13314         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
13315         virtual VTTs.
13316         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
13317         from DATA.  We want virtual primary bases and all bases via virtual.
13318         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
13319         virtual base when not a construction vtable.
13320         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
13321         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
13322         Use canonical bases when processing virtual bases.
13323         (accumulate_vtbl_inits): We're interested in any base via a
13324         virtual path.
13325         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
13326         within a construction vtable, determine what is being overridden.
13327         (build_vtbl_initializer): Add more comments
13328         (add_vcall_offset_vtbl_entries_1): Adjust comment.
13329         (build_rtti_vtbl_entries): Check if the base has lost its
13330         primary.
13331
13332 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
13333
13334         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
13335
13336 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13337
13338         * decl.c (pushdecl): Call abort instead of fatal.
13339         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
13340         * init.c (build_new_1): Likewise.
13341         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
13342         * decl.c (build_typename_type): hash_table_init now returns void.
13343         decl.c (init_decl_processing): Make an error non-fatal.
13344
13345 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
13346
13347         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
13348         Document.
13349         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
13350         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
13351         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
13352         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
13353         * decl.c (maybe_commonize_var): Use the new name-mangling where
13354         appropriate.
13355         * decl2.c (comdat_linkage): Enhance comments.  Make all
13356         compiler-generated things static, if COMDAT is not available.
13357         (get_tinfo_decl): Do not make typeinfo objects that belong in the
13358         library COMDAT.
13359         (tinfo_base_init): Use the correct mangled name for typeinfo
13360         strings, and push them into the global scope.
13361         (typeinfo_in_lib_p): New function.
13362         (synthesize_tinfo_var): Use it.
13363         (create_real_tinfo_var): Likewise.
13364
13365 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
13366
13367         * decl.c (push_class_binding): Use context_for_name_lookup instead
13368         of CP_DECL_CONTEXT.
13369         * search.c (context_for_name_lookup): Remove static.  Check for NULL
13370         context in the loop.
13371         * cp-tree.h (context_for_name_lookup): Add prototype.
13372
13373 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
13374
13375         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
13376         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
13377         Remove.
13378         * call.c (convert_class_to_reference, build_user_type_conversion_1,
13379         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
13380
13381 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
13382
13383         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
13384         of macros used when compiling g++spec.c.
13385         * g++spec.c (lang_specific_driver): Link with the shared
13386         libgcc by default.
13387
13388 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
13389
13390         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
13391         make_reference_declarator, make_call_declarator), method.c
13392         (implicitly_declare_fn), parse.y (namespace_using_decl,
13393         notype_unqualified_id, expr_or_declarator, new_type_id,
13394         after_type_declarator, direct_after_type_declarator,
13395         notype_declarator, complex_notype_declarator,
13396         complex_direct_notype_declarator, qualified_id,
13397         notype_qualified_id, overqualified_id, direct_new_declarator,
13398         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
13399         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
13400         instead of build_parse_node.
13401
13402 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13403
13404         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
13405         (minus_one_node): Moved to top level gcc directory.  Renamed
13406         to integer_minus_one_node.
13407
13408         * init.c (init_init_processing): Don't set minus_one_node.
13409         (build_vec_init): Use integer_minus_one_node.
13410
13411         * rtti.c (get_tinfo_decl_dynamic): Likewise.
13412
13413 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
13414
13415         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
13416         identical and they would be replaced with constant, remove
13417         MODIFY_EXPR from the tree.
13418
13419 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13420
13421         * Make-lang.in: Remove all dependencies on defaults.h.
13422         * call.c: Don't include defaults.h.
13423         * decl.c: Likewise.
13424         * decl2.c: Likewise.
13425         * except.c: Likewise.
13426         * pt.c: Likewise.
13427         * rtti.c: Likewise.
13428         * tree.c: Likewise.
13429         * typeck.c: Likewise.
13430
13431 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
13432
13433         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
13434         operators even in "C" linkage.
13435         * method.c (set_mangled_name_for_decl): Likewise.
13436         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
13437         overloaded operators in "C" linkage.
13438
13439 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
13440
13441         * pt.c (tsubst_decl): Remove IN_DECL parameter.
13442         (tsubst_arg_types): Check parameter is not void.
13443         (tsubst): Adjust tsubst_decl call.
13444
13445 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
13446
13447         * call.c (add_builtin_candidate): Quote std properly, from
13448         previous change.
13449
13450 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13451
13452         * pt.c (check_explicit_specialization): Clone constructors and
13453         destructors.
13454
13455 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
13456
13457         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
13458         indicates anything special about template depth. Make sure we
13459         only count the user visible template classes.
13460
13461 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
13462
13463         * call.c (build_conv): Typo in comment.
13464         (add_builtin_candidate): Add more explanation.
13465         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
13466         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
13467         when we have enumeral types.
13468         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
13469         candidates for relops and eqops.
13470         (joust): Simplify control flow. Allow a non-template user
13471         function to hide a builtin.
13472
13473 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
13474
13475         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
13476         (more_specialized): Add deduction parameter.
13477         * call.c (joust): Adjust more_specialized call.
13478         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
13479         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
13480         (get_bindings_order): Remove.
13481         (get_bindings_real): Add DEDUCE parameter.
13482         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
13483         REFERENCE_TYPE jig for DEDUCE_ORDER.
13484         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
13485         maybe_adjust_types_for_deduction.
13486         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
13487         directly.
13488         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
13489         (check_cv_quals_for_unify): Use new unify qualifier flags.
13490         (unify): Clear new unify qualifier flags.
13491         (get_bindings_real): Add DEDUCE parameter.
13492         (get_bindings): Adjust call to get_bindings_real.
13493         (get_bindings_overload): Likewise.
13494         (most_specialized_instantiation): Adjust call to
13495         more_specialized.
13496
13497 2001-01-19  Jason Merrill  <jason@redhat.com>
13498
13499         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
13500
13501         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
13502         -fnew-abi.
13503
13504 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
13505
13506         * decl2.c (arg_assoc_class): Fix double iteration logic.
13507
13508 2001-01-19  Jason Merrill  <jason@redhat.com>
13509
13510         * init.c (build_delete): Always call convert_force to strip cv-quals.
13511
13512         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
13513         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
13514         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
13515
13516 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13517
13518         * search.c (get_vbase_1): Count only virtual bases.
13519
13520 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13521
13522         * class.c (duplicate_tag_error): Robustify flag clearing.
13523
13524 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13525
13526         * cp-tree.h (lookup_template_class): Add complain parm.
13527         * decl.c (lookup_namespace_name): Adjust call to
13528         lookup_template_class.
13529         (make_typename_type): Likewise.
13530         * semantics.c (finish_template_type): Likewise.
13531         * pt.c (lookup_template_class): Add complain parm. Adjust.
13532         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
13533         (tsubst): Likewise.
13534
13535 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13536
13537         * pt.c (copy_default_args_to_explicit_spec): Preserve
13538         object's CV quals. Reorganize.
13539
13540 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13541
13542         * typeck.c (build_modify_expr): Say `initialization' for
13543         INIT_EXPRs.
13544         * init.c (build_default_init): Convert to enumeral type, if
13545         needed.
13546
13547 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
13548
13549         * parse.y (nomods_initdcl0): Properly set things up for
13550         initdcl0_innards.
13551
13552 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13553
13554         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
13555         (type_unification_real): Set it.
13556         (unify): Use it.
13557
13558 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13559
13560         * decl.c (finish_destructor_body): Convert to vbase pointer here.
13561
13562 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13563
13564         * semantics.c (begin_class_definition): Check we're not inside a
13565         template parm list.
13566
13567 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13568
13569         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
13570         BASELINK_P.
13571
13572 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13573
13574         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
13575         * call.c (build_over_call): Add comment.
13576
13577 2001-01-16 Daniel Berlin <dberlin@redhat.com>
13578
13579         * cvt.c (ocp_convert): Handle vector type conversion
13580         * typeck2.c (digest_init): Handle vector type initializations
13581
13582 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
13583
13584         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
13585           was given.
13586
13587 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
13588
13589         * pt.c (check_nontype_parm): Rename to ...
13590         (invalid_nontype_parm_type_p): ... here.
13591         (process_template_parm): Adjust.
13592         (convert_template_argument): Adjust.
13593
13594 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
13595
13596         * pt.c (check_nontype_parm): New function.
13597         (process_template_parm): Use it.
13598         (convert_template_argument): Use it.
13599         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
13600         member.
13601
13602 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
13603
13604         * tree.c: Add defaults.h
13605         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
13606         * Make-lang.in (cp/tree.o): Add defaults.h.
13607
13608 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
13609
13610         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
13611
13612 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
13613
13614         * g++.1: Change to be ".so man1/gcc.1".
13615
13616 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
13617
13618         * Make-lang.in (c++.info, c++.install-info): Build and install g++
13619         internals info.
13620         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
13621         ($(srcdir)/cp/g++int.info): New target.
13622         * gxxint.texi: Add info directory entry.  Use @@ in email address.
13623         * .cvsignore: Update.
13624
13625 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
13626
13627         * typeck.c (build_c_cast): Do template processing earlier.
13628         Always pedwarn on array casts.
13629
13630 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
13631
13632         * friend.c (make_friend_class): Make sure a templated class is
13633         actually a template.
13634
13635 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13636
13637         * decl2.c (get_guard): Set linkage from guarded decl.
13638
13639 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13640
13641         * call.c (convert_default_arg): Check for unprocessed
13642         DEFAULT_ARG.
13643         * cp-tree.h (replace_defarg): Move to spew.c.
13644         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
13645         spew.c, which is where they really are.
13646         (done_pending_defargs): Declare.
13647         (unprocessed_defarg_fn): Declare.
13648         * decl.c (replace_defarg): Move to spew.c
13649         * parse.y (structsp): Call done_pending_defargs.
13650         * spew.c (defarg_fns): Rearrange list structure.
13651         (defarg_fnsdone): New static variable.
13652         (defarg_depfns): New static variable.
13653         (init_spew): Adjust.
13654         (add_defarg_fn): Store the type in TREE_TYPE.
13655         (do_pending_defargs): Detect and deal with ordering constraints
13656         and circularity.
13657         (done_pending_defargs): New function.
13658         (unprocessed_defarg_fn): New function.
13659         (replace_defarg): Moved from decl.c. Robustify. Don't save
13660         if circularity detected.
13661
13662 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13663
13664         * pt.c (unify): Check array has a domain, before checking
13665         whether it is variable sized.
13666
13667 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13668
13669         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
13670         parameters with pointers to arrays of unknown bound.
13671
13672 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13673
13674         * parse.y (template_parm_header, template_spec_header): New
13675         reductions. Split out from ...
13676         (template_header): ... here. Use them.
13677         (template_template_parm): Use template_parm_header.
13678         * semantics.c (finish_template_template_parm): Add assert.
13679
13680 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
13681
13682         * mangle.c (write_builtin_type): Fix thinko.
13683
13684         * pt.c (copy_default_args_to_explicit_spec_1): New function.
13685         (copy_default_args_to_explicit_spec): Likewise.
13686         (check_explicit_specialization): Use it.
13687
13688         * class.c (finish_struct_1):  Remove last argument in call to
13689         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
13690         * decl.c (builtin_function): Likewise.
13691         (build_cp_library_fn): Likewise.
13692         (check_initializer): Likewise.
13693         (make_rtl_for_nonlocal_decl): Likewise.
13694         (cp_finish_decl): Likewise.
13695         (start_function): Likewise.
13696         * decl2.c (finish_anon_union): Likewise.
13697         * friend.c (do_friend): Likewise.
13698         * init.c (build_java_class_ref): Likewise.
13699         * method.c (make_thunk): Likewise.
13700         * pt.c (tsubst_friend_function): Likewise.
13701         * semantics.c (expand_body): Likewise.
13702
13703 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
13704
13705         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
13706         looking at DECL_CLONED_FUNCTION for non-functions.
13707
13708 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
13709
13710         * error.c (dump_template_parameter): Use parm to determine how
13711         to print default value.
13712
13713 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
13714
13715         * class.c (duplicate_tag_error): Clear more flags.
13716
13717 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
13718
13719         * call.c (build_new_method_call): Use binfo_for_vbase.
13720
13721 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
13722
13723         * cp-tree.h (flag_cond_mismatch): Don't declare.
13724         * decl2.c (flag_cond_mismatch): Don't define.
13725         (lang_f_options): Remove cond-mismatch.
13726         (unsupported_options): Add cond-mismatch.
13727
13728 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
13729
13730         * class.c (handle_using_decl): Reject using of constructor name
13731         of sourcing class. Allow injecting of a method with same name as
13732         nested class. Fixup error messages.
13733
13734 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
13735
13736         * decl2.c (lang_decode_option): Handle -Wformat=2.
13737
13738 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
13739
13740         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
13741         initialized_in_class.
13742         (DECL_DEFINED_IN_CLASS_P): Rename to ...
13743         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
13744         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
13745         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
13746         * pt.c (check_default_tmpl_args): Adjust for
13747         DECL_INITIALIZED_IN_CLASS_P.
13748         (instantiate_class_template): Likewise.
13749         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
13750
13751         * class.c (finish_struct): Constify saved_filename.
13752
13753 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
13754
13755         * class.c (duplicate_tag_error): Adjust diagnostic.
13756         (finish_struct): Locally set location to start of struct.
13757         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
13758
13759 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
13760
13761         * decl.c (struct binding_level): Adjust class_shadowed comments
13762         to reflect reality.
13763         (push_class_level_binding): Adjust comments to reflect reality.
13764         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
13765         Don't set TREE_VALUE on the class_shadowed list.
13766
13767 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13768
13769         * decl2.c (acceptable_java_type): Allow references too.
13770         * init.c (build_java_class_ref): When using the new ABI, search
13771         `class$' and have it mangled with `mangle_decl.'
13772         * mangle.c (write_java_integer_type_codes): New function.
13773         (write_builtin_type): Detect and mangle Java integer and real
13774         types.
13775
13776 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
13777
13778         * decl2.c (grokfield): Don't accept `asm' specifiers for
13779         non-static data members.
13780
13781 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13782
13783         * expr.c (cplus_expand_expr): Don't reset `target'.
13784
13785 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
13786
13787         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
13788
13789 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
13790
13791         * parse.y (template_datadef): Check for error_mark_node.
13792
13793 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
13794
13795         * cp-tree.def (DEFAULT_ARG): Make `x' class.
13796
13797 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
13798
13799         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
13800         (record_builtin_type): Make non-static.
13801         (flag_short_double): Don't declare.
13802         (init_decl_processing): Remove the creation of many tree nodes now
13803         in c_common_nodes_and_builtins.
13804         (build_void_list_node): New function.
13805         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
13806         * cp-tree.h (flag_short_wchar): Don't declare.
13807
13808 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
13809
13810         * call.c (build_conv): Don't use build1 for USER_CONV.
13811         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
13812
13813 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
13814
13815         * lex.c (lang_init): Call c_common_lang_init.
13816
13817 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
13818
13819         * search.c (lookup_fnfields_here): Remove.
13820         (look_for_overrides_r): Use lookup_fnfields_1.
13821         Ignore functions from using declarations.
13822
13823 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
13824
13825         Implement exceptions specifiers for implicit member functions.
13826         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
13827         * method.c (synthesize_exception_spec): New function.
13828         (locate_dtor, locate_ctor, locate_copy): New functions.
13829         (implicitly_declare_fn): Generate the exception spec too.
13830         * search.c (check_final_overrider): Check artificial functions
13831         too.
13832         * typeck2.c (merge_exception_specifiers): New function.
13833
13834 2001-01-03  Jason Merrill  <jason@redhat.com>
13835
13836         * init.c (build_default_init): New fn.
13837         (perform_member_init): Split out from here.
13838         (build_new_1): Use it.  Simplify initialization logic.
13839         (build_vec_init): Take an array, rather than a pointer and maxindex.
13840         Speed up simple initializations.  Don't clean up if we're assigning.
13841         * cp-tree.h: Adjust.
13842         * decl2.c (do_static_initialization): Remove TREE_VEC case.
13843         * parse.y (new_initializer): Return void_zero_node for ().
13844         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
13845         * typeck2.c (digest_init): Only complain about user-written
13846         CONSTRUCTORs.
13847
13848 2000-12-22  Mike Stump  <mrs@wrs.com>
13849
13850         * decl2.c: (max_tinst_depth): Increase to 50.
13851
13852 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
13853
13854         * class.c (invalidate_class_lookup_cache): Zero the
13855         previous_class_values.
13856         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
13857         TREE_INT_CST_HIGH.
13858         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
13859         * decl.c (free_bindings): New variable.
13860         (push_binding): Don't create a new binding if we have one on the
13861         free list.
13862         (pop_binding): Put old bindings on the free list.
13863         (init_decl_processing): Use size_int, not build_int_2.
13864         Register free_bindings as a GC root.
13865         (cp_make_fname_decl): Use size_int, not build_int_2.
13866         (push_inline_template_parms_recursive): Likewise.
13867         (end_template_parm_list): Likewise.
13868         (for_each_template_parm): Do not use walk_tree_without_duplicates.
13869         (tsubst_template_parms): Use size_int, not build_int_2.
13870         (tsubst): Likewise.
13871         * rtti.c (get_vmi_pseudo_type_info): Likewise.
13872
13873 2001-01-02  Richard Henderson  <rth@redhat.com>
13874
13875         * parse.y (asm): Set ASM_INPUT_P.
13876
13877 2001-01-02  Jason Merrill  <jason@redhat.com>
13878
13879         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
13880         for v3 ABI.
13881
13882         * typeck.c (cp_truthvalue_conversion): New fn.
13883         * cvt.c (ocp_convert): Use it.
13884
13885         * cp-tree.h: Lose c-common.c decls.
13886
13887         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
13888         * cvt.c (convert_to_void): Use type_unknown_p.
13889
13890         * typeck.c (strip_all_pointer_quals): Also strip quals from
13891         pointer-to-member types.
13892
13893         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
13894         parse.y as C.
13895
13896         * call.c (build_new_method_call): Do evaluate the object parameter
13897         when accessing a static member.
13898         * typeck.c (build_component_ref): Likewise.
13899
13900 2001-01-02  Andreas Jaeger  <aj@suse.de>
13901
13902         * decl.c (cp_missing_noreturn_ok_p): New.
13903         (init_decl_processing): Set lang_missing_noreturn_ok_p.
13904
13905 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
13906
13907         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
13908
13909 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
13910
13911         * class.c (pushclass): Remove #if 0'd code.
13912         * cp-tree.h (overload_template_name): Remove.
13913         * decl.c (store_bindings): Simplify.
13914         (pop_from_top_level): Likewise.
13915         * pt.c (overload_template_name): Remove.
13916         (instantiate_decl): Don't call push_to_top_level if it's not
13917         needed.
13918
13919 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
13920
13921         * pt.c (register_local_specialization): Don't return a value.
13922         (lookup_template_class): Use move-to-front heuristic when looking
13923         up template instantiations.
13924         (instantiate_decl): Only push_to_top_level when we're actually
13925         going to instantiate the template.
13926
13927 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
13928
13929         * search.c (binfo_for_vtable): Return least derived class, not
13930         most.  Handle secondary vtables.
13931
13932 2000-12-22  Jason Merrill  <jason@redhat.com>
13933
13934         * pt.c (more_specialized): Don't optimize len==0.
13935         (fn_type_unification): If we're adding the return type, increase len.
13936
13937         * typeck.c (build_binary_op): Fix pmf comparison logic.
13938
13939         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
13940         DECL_STATIC_FUNCTION_P.
13941
13942         * semantics.c (genrtl_finish_function): Don't try to jump to
13943         return_label unless it exists.
13944
13945         In partial ordering for a call, ignore parms for which we don't have
13946         a real argument.
13947         * call.c (joust): Pass len to more_specialized.
13948         (add_template_candidate_real): Strip 'this', pass len.
13949         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
13950         (get_bindings_order): New fn.  Pass len down.
13951         (get_bindings_real): Strip 'this', pass len.
13952         (fn_type_unification): Likewise.
13953         (type_unification_real): Succeed after checking 'len' args.
13954         (most_specialized_instantiation): Lose explicit_args parm.
13955         * class.c (resolve_address_of_overloaded_function): Strip 'this',
13956         pass len.
13957
13958 2000-12-21  Jason Merrill  <jason@redhat.com>
13959
13960         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
13961         DECL_TEMPLATE_RESULT.
13962
13963         * search.c (lookup_field_r): Call lookup_fnfields_1, not
13964         lookup_fnfields_here.
13965
13966         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
13967
13968         * call.c (build_object_call): Also allow conversions that return
13969         reference to pointer to function.
13970         (add_conv_candidate): Handle totype being ref to ptr to fn.
13971         (build_field_call): Also allow members of type reference to function.
13972         Lose support for calling pointer to METHOD_TYPE fields.
13973
13974         * error.c (dump_expr): Handle *_CAST_EXPR.
13975
13976         * typeck2.c (build_scoped_ref): Always convert to the naming class.
13977
13978         * tree.c (break_out_cleanups): Lose.
13979         * cp-tree.h: Remove prototype.
13980         * typeck.c (build_component_ref): Don't break_out_cleanups.
13981         (build_compound_expr): Likewise.
13982         * semantics.c (finish_expr_stmt): Likewise.
13983
13984 2000-12-20  Richard Henderson  <rth@redhat.com>
13985
13986         * cp-tree.h: Update declarations.
13987         * decl.c (finish_case_label): Return the new stmt node.
13988         * semantics.c (finish_goto_stmt): Likewise.
13989         (finish_expr_stmt, finish_return_stmt): Likewise.
13990         (finish_break_stmt, finish_continue_stmt): Likewise.
13991         (finish_asm_stmt): Likewise.
13992         * parse.y (already_scoped_stmt): Set STMT_LINENO.
13993         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
13994         (simple_if, simple_stmt): Return the new stmt node.
13995         (save_lineno): New.
13996
13997 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
13998
13999         * cp-tree.h: Don't declare warn_long_long.
14000
14001 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14002
14003         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
14004         IS_AGGR_TYPE.
14005
14006 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14007
14008         * pt.c (unify): Handle when both ARG and PARM are
14009         BOUND_TEMPLATE_TEMPLATE_PARM.
14010
14011 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14012
14013         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
14014         DECL_TEMPLATE_PARM_P.
14015
14016 2000-12-15  Jason Merrill  <jason@redhat.com>
14017
14018         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
14019
14020         * init.c (build_new_1): Don't strip quals from type.
14021
14022         * decl.c (pushdecl): Don't check for linkage on a non-decl.
14023
14024         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
14025
14026         * call.c (build_new_function_call): Lose space before paren in
14027         error message.
14028         (build_new_method_call): Likewise.
14029
14030         * typeck2.c (build_m_component_ref): Propagate quals from datum.
14031
14032 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14033
14034         * pt.c (check_explicit_specialization): Propagate default
14035         function arguments to explicit specializations.
14036
14037 2000-12-13  DJ Delorie  <dj@redhat.com>
14038
14039         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
14040         and <? operators.
14041
14042 2000-12-08  Jason Merrill  <jason@redhat.com>
14043
14044         * error.c (dump_function_name): Don't let the user see __comp_ctor.
14045
14046         Clean up copy-initialization in overloading code.
14047         * call.c (build_user_type_conversion_1): Die if we are asked to
14048         convert to the same or a base type.
14049         (implicit_conversion): Avoid doing so.  Lose reference binding code.
14050         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
14051         direct-initialization.  Also do direct-init part of copy-init.
14052         (build_user_type_conversion): Don't provide context to convert_like.
14053         * cvt.c (ocp_convert): build_user_type_conversion will now provide
14054         the constructor call for copy-init.
14055
14056         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
14057         instantiation of a member template.
14058         (do_decl_instantiation): Not here.
14059
14060 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
14061
14062         * class.c (check_field_decls): Don't special case anonymous
14063         fields in error messages.
14064         (note_name_declared_in_class): Use %D on diagnostic.
14065
14066         * tree.c (pod_type_p): Use strip_array_types.
14067         (cp_valid_lang_attribute): Likewise.
14068         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
14069         multiple evaluations.
14070         (cp_has_mutable_p): Use strip_array_types.
14071
14072 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
14073
14074         * cp-tree.h (sufficient_parms_p): Declare new function.
14075         * call.c (sufficient_parms_p): New function, broken out of ...
14076         (add_function_candidate): ... here. Use it.
14077         (add_conv_candidate): Use it.
14078         * decl.c (grok_ctor_properties): Use it.
14079
14080 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
14081
14082         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
14083
14084 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
14085
14086         * decl2.c (lang_decode_option): Handle -Wformat-security.
14087
14088 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14089
14090         * pt.c (verify_class_unification): New function.
14091         (get_class_bindings): Use it.
14092         (try_class_unification): Tidy.
14093         (unify): Handle when argument of a template-id is not
14094         template parameter dependent.
14095         (template_args_equal): Handle when TREE_CODE's do not match.
14096
14097 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
14098
14099         * lang-specs.h (c++): When invoking the stand-alone preprocessor
14100         for -save-temps, pass all relevant -Defines to it, and then don't
14101         pass them to cc1plus.
14102
14103 2000-12-05  Will Cohen  <wcohen@redhat.com>
14104
14105         * decl.c (finish_case_label): Cleared
14106         more_cleanups_ok in surrounding function scopes.
14107         (define_label): Likewise.
14108
14109 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
14110
14111         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
14112         (get_matching_virtual): Remove.
14113         (look_for_overrides): Declare new function.
14114         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
14115         DECL_VINDEX here.
14116         * class.c (check_for_override): Move base class iteration code
14117         to look_for_overrides.
14118         * search.c (next_baselink): Remove.
14119         (get_virtuals_named_this): Remove.
14120         (get_virtual_destructor): Remove.
14121         (tree_has_any_destructors_p): Remove.
14122         (struct gvnt_info): Remove.
14123         (check_final_overrider): Remove `virtual' from error messages.
14124         (get_matching_virtuals): Remove. Move functionality to ...
14125         (look_for_overrides): ... here, and ...
14126         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
14127         to be overriding.
14128
14129 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
14130
14131         * typeck.c (get_delta_difference): If via a virtual base,
14132         return zero.
14133         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
14134         adjustment.
14135
14136 2000-12-04  Richard Henderson  <rth@redhat.com>
14137
14138         * error.c (dump_tree): Use output_add_string not OB_PUTS.
14139
14140 2000-12-04  Jason Merrill  <jason@redhat.com>
14141
14142         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
14143         (write_builtin_type): Pass intSI_type_node and the like through
14144         type_for_mode.
14145         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
14146         Pass intSI_type_node and the like through type_for_mode.
14147         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
14148         * pt.c (tsubst, unify): Likewise.
14149         * tree.c (walk_tree): Likewise.
14150         * error.c (dump_type): Likewise.
14151         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
14152
14153         * Make-lang.in: Tweak top comment for emacs.
14154         (cp/TAGS): Restore.
14155
14156         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
14157
14158         * class.c (clone_function_decl): Robustify.
14159
14160 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
14161
14162         * decl.c (store_bindings): Only search in the non modified
14163         old_bindings for duplicates.
14164
14165 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
14166
14167         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
14168         TYPE_POLYMORPHIC_P.
14169
14170         * typeck.c (build_static_cast): Remove unused variable.
14171
14172 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14173
14174         * pt.c: Fix typo in comment.
14175
14176 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
14177
14178         * decl2.c (warn_format): Remove definition.
14179         (lang_decode_option): Handle -Wformat-nonliteral,
14180         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
14181
14182 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
14183
14184         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
14185         (init_decl_processing): Don't create string_type_node,
14186         const_string_type_node, wint_type_node, intmax_type_node,
14187         uintmax_type_node, default_function_type, ptrdiff_type_node and
14188         unsigned_ptrdiff_type_node.  Adjust position of call to
14189         c_common_nodes_and_builtins.
14190         (identifier_global_value): New function.
14191
14192 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
14193
14194         * call.c (standard_conversion): Reject pointer to member
14195         conversions from ambiguous, inaccessible or virtual bases.
14196         * typeck.c (build_static_cast): Don't check pointers to members
14197         specially.
14198
14199 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14200
14201         * method.c (do_build_copy_constructor): Preserve cv
14202         qualifications when accessing source object members.
14203         (do_build_assign_ref): Likewise. Remove separate diagnostics for
14204         unnamed fields.
14205
14206 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14207
14208         * method.c (do_build_assign_ref): Construct appropriately
14209         CV-qualified base reference. Don't allow const casts in base
14210         conversion.
14211
14212 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14213
14214         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
14215         incomplete return type.
14216
14217 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14218
14219         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
14220         * semantics.c (finish_base_specifier): Accept a _TYPE not a
14221         _DECL.
14222
14223 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14224
14225         * spew.c (yyerror): Cope if yylval.ttype is NULL.
14226
14227 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14228
14229         * decl.c (grokdeclarator): Diagnose undefined template contexts.
14230
14231 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14232
14233         * decl.c (grokdeclarator): Do type access control on friend
14234         class.
14235
14236 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
14237
14238         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
14239         bison parser ickiness.
14240         * pt.c (tsubst_friend_function): Enter namespace scope when
14241         tsubsting the function name.
14242         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
14243
14244 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
14245
14246         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
14247         * cvt.c (cp_convert_to_pointer): Add force parameter.
14248         Allow conversions via virtual base if forced.
14249         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
14250         (ocp_convert): Likewise.
14251         * search.c (binfo_from_vbase): Return the virtual base's binfo.
14252         * typeck.c (get_delta_difference): Adjust handling of virtual
14253         bases.
14254
14255 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
14256
14257         * tree.c (struct list_hash): Remove.
14258         (list_hash_table): Make it be an htab.
14259         (struct list_proxy): New type.
14260         (list_hash_eq): New function.
14261         (list_hash_pieces): Renamed from ...
14262         (list_hash): ... this.
14263         (list_hash_lookup): Remove.
14264         (list_hash_add): Remove.
14265         (hash_tree_cons): Use the generic hashtable.
14266         (mark_list_hash): Remove.
14267         (init_tree): Create the hashtable.
14268
14269 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
14270
14271         * method.c (build_mangled_C9x_name): Rename to
14272         build_mangled_C99_name.  Change C9X references in comments to
14273         refer to C99.
14274
14275 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
14276
14277         * parse.y (unary_expr): Move VA_ARG from here ...
14278         (primary): ... to here.
14279
14280 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
14281
14282         * semantics.c (finish_id_expr): If type is error_mark, return
14283         error_mark.
14284
14285 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
14286
14287         * pt.c (lookup_template_class): Simplify loop exit constructs.
14288         Cope when there is no partial instantiation of a template
14289         template member.
14290
14291 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
14292
14293         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
14294
14295 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
14296
14297         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
14298         prefix.
14299
14300         * pt.c (do_decl_instantiate): Explicitly clone constructors and
14301         destructors that haven't already been cloned.
14302
14303 2000-11-20  Richard Henderson  <rth@redhat.com>
14304
14305         * parse.y (yyparse_1): Rename the parser entry point.
14306
14307 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
14308
14309         * mangle.c (write_name): Use <unscoped-name> for names directly in
14310         function scope.
14311         (write_unscoped_name): Accept names directly in function scope.
14312
14313 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
14314
14315         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
14316         * parse.y (extdef): Add EXPORT reduction.
14317         * spew.c (yylex): Don't skip export here.
14318
14319 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
14320
14321         * decl.c (init_decl_processing): Correct name of pure virtual
14322         function under the new ABI.
14323         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
14324         (throw_bad_typeid): Likewise for bad typeid function.
14325
14326 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
14327
14328         * decl.c (grokparms): Don't even function types of `void' type,
14329         either.
14330         * mangle.c (write_type): Don't crash when confronted with the
14331         error_mark_node.
14332
14333         * decl.c (grokparms): Don't create parameters of `void' type.
14334
14335 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
14336
14337         * lex.c (mark_impl_file_chain): Delete.
14338         (init_parse): Remove call to ggc_add_string_root.  No need to
14339         ggc_strdup a string constant.  Do not add impl_file_chain to GC
14340         roots.
14341         (handle_pragma_implementation): No need to ggc_strdup main_filename.
14342
14343 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14344
14345         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
14346
14347 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14348
14349         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
14350         * decl.c (grokdeclarator): Don't reject void parms here.
14351         (require_complete_types_for_parms): Simplify, use
14352         complete_type_or_else.
14353         (grokparms): Remove bitrot. Remove funcdef parm.
14354         Deal with ellipsis parm lists here.
14355         * semantics.c (finish_parmlist): Don't append void_list_node
14356         here. Set PARMLIST_ELLIPSIS_P.
14357
14358 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14359
14360         * typeck2.c (incomplete_type_error): Reorganize to avoid
14361         excessive diagnostics.
14362
14363 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
14364
14365         * lex.c (struct impl_files, internal_filename): Constify a char *.
14366
14367 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
14368
14369         * mangle.c (write_special_name_constructor): Don't generate
14370         assembler junk when confronted with an old-style constructor.
14371         (write_special_name_destructor): Likewise.
14372         (mangle_decl_string): Do it here instead.
14373
14374 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
14375
14376         * call.c (op_error): Make error messages clearer.
14377
14378 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
14379
14380         * decl.c (wrapup_globals_for_namespace): Don't mark things
14381         TREE_ASM_WRITTEN when they're not.
14382
14383 2000-11-15  Jason Merrill  <jason@redhat.com>
14384
14385         * typeck2.c (friendly_abort): Uncount the error before handing
14386         off to fancy_abort.
14387
14388 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
14389
14390         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
14391
14392 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
14393
14394         * class.c (build_vtbl_initializer): Fix typo in comment.
14395         * typeck.c (expr_sizeof): Don't crash on errors.
14396
14397 2000-11-14  Jim Wilson  <wilson@redhat.com>
14398
14399         * lang-specs.h: Add %2 after %(cc1_options).
14400
14401 2000-11-14  Richard Henderson  <rth@redhat.com>
14402
14403         * typeck.c (c_sizeof): Be strict about casting result value
14404         back to c_size_type_node.
14405         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
14406
14407 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14408
14409         * typeck.c (build_unary_op): Use boolean_increment from
14410         c-common.c, moving the relevant code there.
14411
14412 2000-11-11  Jason Merrill  <jason@redhat.com>
14413
14414         * typeck.c (mark_addressable): Don't call put_var_into_stack.
14415
14416         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
14417         in inlines.
14418
14419 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14420
14421         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
14422         * lex.c (copy_lang_decl): Likewise.
14423
14424 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
14425
14426         * dump.c (cp_dump_tree): Don't dump function bodies here.
14427
14428         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
14429         (dump.o): Update dependency list.
14430         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
14431         (flag_dump_translation_unit): Likewise.
14432         (CP_TYPE_QUALS): Adjust definition.
14433         (DECL_C_BIT_FIELD): Remove.
14434         (SET_DECL_C_BIT_FIELD): Likewise.
14435         (CLEAR_DECL_C_BIT_FIELD): Likewise.
14436         (add_maybe_template): Likewise.
14437         (strip_array_types): Likewise.
14438         (dump_node_to_file): Likewise.
14439         (cp_dump_tree): New function.
14440         * decl.c (init_decl_processing): Set lang_dump_tree.
14441         * decl2.c (flag_dump_translation_unit): Remove.
14442         * dump.c: Move most of it to ../c-dump.c.
14443         (cp_dump_tree): New function.
14444         * pt.c (add_maybe_template): Remove.
14445         * typeck.c (strip_array_types): Likewise.
14446
14447 2000-11-07  Eric Christopher  <echristo@redhat.com>
14448
14449         * decl.c (init_decl_processing): Change definition of
14450         __wchar_t to wchar_t.  Remove artificial declaration of
14451         wchar_t.
14452         * lex.c: Change instances of __wchar_t to wchar_t.
14453
14454 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
14455
14456         * lex.c (do_identifier): Don't lookup_name for operators.
14457         * parse.y (operator): Save looking_for_typename.
14458         (unoperator): Restore it.
14459         * spew.c (frob_opname): Use nth_token for lookahead.
14460
14461 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
14462
14463         * decl.c (grok_op_properties): Always use coerce_new_type and
14464         coerce_delete_type.
14465         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
14466         exception specification. Tidy up.
14467         (coerce_delete_type): Preserve exception specification. Tidy up.
14468
14469 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
14470
14471         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
14472         (push_binding_level), error.c (cp_tree_printer), pt.c
14473         (process_partial_specialization, tsubst_template_arg_vector),
14474         search.c (lookup_member): Use memset () instead of bzero ().
14475
14476 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
14477
14478         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
14479
14480 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
14481
14482         * Make-lang.in (c++.distdir): Remove.
14483
14484 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
14485
14486         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
14487         declarations from different namespaces to be combined.
14488
14489 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
14490
14491         * decl.c: Include tm_p.h.
14492
14493 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
14494
14495         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
14496
14497 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
14498
14499         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
14500         (build_overload_value), repo.c (open_repo_file), xref.c
14501         (open_xref_file): Use strchr () and strrchr () instead of index ()
14502         and rindex ().
14503
14504 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
14505
14506         * call.c (build_over_call): Call fold on the CALL_EXPR.
14507
14508 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
14509
14510         * error.c (dump_template_decl): Separate template hearders with
14511         space not comma.
14512
14513 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
14514
14515         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
14516         TS_* flags with corresponding TFF_*.  Adjust prototypes of
14517         functions (which used to take a tree_string_flags) to take an int.
14518
14519         * cp-tree.h (enum tree_string_flags): Remove
14520         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
14521         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
14522         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14523         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14524         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
14525         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
14526         (type_as_string, decl_as_string, expr_as_string,
14527         context_as_string): Adjust prototype.
14528
14529         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
14530         instead of TS_PLAIN.
14531
14532         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
14533         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
14534         plain `0'.
14535
14536 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
14537
14538         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
14539         (linkage_kind): New enumeration.
14540         (decl_linkage): New function.
14541         * decl2.c (comdat_linkage): Extend comment.
14542         * error.c (dump_function_decl): Print the arguments used to
14543         instantiate a template, even when not printing the type of the
14544         function.
14545         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
14546         not TREE_PUBLIC, to test for external linkage.
14547         * tree.c (decl_linkage): New function.
14548
14549 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
14550
14551         * pt.c (instantiate_decl): Always instantiate static data members
14552         initialized in-class.
14553
14554 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
14555
14556         * Make-lang.in: Move all build rules here from Makefile.in,
14557         adapt to new context.  Wrap all rules that change the current
14558         directory in parentheses.  Expunge all references to $(P).
14559         When one command depends on another and they're run all at
14560         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
14561         all object-file generation rules.  Delete obsolete variables.
14562
14563         * Makefile.in: Delete.
14564         * config-lang.in: Delete outputs= line.
14565
14566 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
14567
14568         * error.c (dump_function_decl): Print no space between
14569         `ptr-operator' the `type-specifier' of the return type.
14570         (dump_type_prefix): Make sure we put space at the appropriate
14571         place.
14572
14573 2000-10-23  Jason Merrill  <jason@redhat.com>
14574
14575         * call.c (equal_functions): Also call decls_match for extern "C" fns.
14576
14577 2000-10-22  Jason Merrill  <jason@redhat.com>
14578
14579         * call.c (build_conditional_expr): Use ocp_convert to force
14580         rvalue conversion.
14581
14582 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
14583
14584         * call.c (standard_conversion): Use RVALUE_CONVs for all
14585         expressions that satisfy lvalue_p, not just those that satisfy
14586         real_lvalue_p.
14587
14588         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
14589
14590         * typeck.c (c_sizeof): Return an expression of `size_t' type,
14591         not one with TYPE_IS_SIZETYPE set.
14592         (dubious_conversion_warnings): Remove special-case code.
14593
14594 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
14595
14596         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
14597         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
14598         (dump_type_prefix): Print vector-of-int as 'int vector'.
14599         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
14600         * tree.c (walk_tree): Handle VECTOR_TYPE.
14601
14602         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
14603
14604 2000-10-21  Jason Merrill  <jason@redhat.com>
14605
14606         * parse.y (operator): Set got_object from got_scope.
14607         Set looking_for_typename.
14608         * decl.c (lookup_name_real): Clear val after setting from_obj.
14609         Reorganize diagnostic.
14610
14611 2000-10-20  Jason Merrill  <jason@redhat.com>
14612
14613         * tree.c (walk_tree): Don't walk into default args.
14614
14615         * error.c (dump_expr): Use host_integerp.
14616
14617 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
14618
14619         * typeck2.c (abstract_virtuals_error): Use "because" instead of
14620         "since" in error message.
14621
14622 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14623
14624         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
14625
14626 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
14627
14628         * decl.c (revert_static_member_fn): Fixed typo.
14629
14630 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
14631
14632         * class.c (subobject_offset_fn): New type.
14633         (dfs_record_base_offsets): Remove.
14634         (record_base_offsets): Likewise.
14635         (dfs_search_base_offsets): Likewise.
14636         (record_subobject_offset): New function.
14637         (check_subobject_offset): Likewise.
14638         (walk_subobject_offsets): Likewise.
14639         (record_subobject_offsets): Likewise.
14640         (layout_conflict_p): Reimplement.
14641         (layout_nonempty_base_or_field): Correct handling of type
14642         conflicts during layout.
14643         (layout_empty_base): Likewise.
14644         (build_base_field): Adjust to handle new representation of empty
14645         base offset table.
14646         (build_base_fields): Likewise.
14647         (layout_virtual_bases): Likewise.
14648         (splay_tree_compare_integer_csts): New function.
14649         (layout_class_type): Use a splay_tree, rather than a varray, to
14650         represent the offsets of empty bases.
14651
14652         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
14653         * decl.c (select_decl): Don't return declarations that are
14654         DECL_ANTICIPATED.
14655
14656 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
14657
14658         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
14659         (fake_std_node): New macro.
14660         * decl.c (in_std): Rename to ...
14661         (in_fake_std): ... this.
14662         (flag_no_builtin): Remove.
14663         (flag_no_nonansi_builtin): Likewise.
14664         (walk_namespaces_r): Use fake_std_node.
14665         (push_namespace): Use std_identifier.
14666         (pop_namespace): Use in_fake_std.
14667         (lookup_name_real): Use fake_std_node.
14668         (init_decl_processing): When -fhonor-std, create the `std'
14669         namespace.  Don't create a dummy fake_std_node in that case.
14670         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
14671         (builtin_function): Put builtins whose names don't begin
14672         with `_' in the std namespace.
14673         * decl2.c (flag_no_builtin): Remove.
14674         (flag_no_nonansi_builtin): Likewise.
14675         (set_decl_namespace): Use fake_std_node.
14676         (validate_nonmember_using_decl): Likewise.
14677         (do_using_directive): Likewise.
14678         (handle_class_head): Likewise.
14679         * dump.c (dequeue_and_dump): Likewise.
14680         * except.c (init_exception_processing): Use std_identifier.
14681         * init.c (build_member_call): Use fake_std_node.
14682         * rtti.c (init_rtti_processing): Use std_identifier.
14683
14684 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
14685
14686         * cp-tree.h (back_end_hook): Remove declaration.
14687         * decl2.c (back_end_hook): Remove definition.
14688
14689         * dump.c (dequeue_and_dump): Dump TREE_USED.
14690
14691 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
14692
14693         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
14694
14695 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
14696
14697         * decl.c (WINT_TYPE): Define.
14698         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
14699         c_size_type_node, signed_size_type_node and wint_type_node.
14700
14701 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
14702
14703         * decl2.c (warn_missing_format_attribute): New variable.
14704         (lang_decode_option): Decode -Wmissing-format-attribute.
14705
14706 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
14707
14708         * typeck.c (qualify_type): Remove.
14709         (composite_pointer_type): Fix handling of conversions to `cv void*'.
14710
14711 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14712
14713         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
14714
14715 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14716
14717         * Makefile.in (parse.c, parse.h): Create atomically.
14718
14719 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
14720
14721         * class.c (current_obstack): Remove.
14722         * decl.c (ggc_p): Remove.
14723         (start_decl): Don't use decl_tree_cons.
14724         (grokdeclarator): Don't use build_decl_list.
14725         (start_function): Don't use decl_tree_cons.
14726         (finish_function): Don't mess with obstacks.
14727         * decl2.c (grok_x_components): Don't use build_decl_list.
14728         * lex.c (make_call_declarator): Don't call decl_tree_cons.
14729         (implicitly_declare_fn): Don't call build_decl_list.
14730         * parse.y (frob_specs): Don't call build_decl_list or
14731         decl_tree_cons.
14732         (expr_or_declarator_intern): Don't call decl_tree_cons.
14733         (primary): Don't call build_decl_list.
14734         (fcast_or_absdcl): Likewise.
14735         (typed_declspecs): Don't call decl_tree_cons.
14736         (reserved_declspecs): Don't call build_decl_list.
14737         (declmods): Likewise.
14738         (reserved_typespecquals): Likewise.
14739         (aggr): Likewise.
14740         (new_type_id): Likewise.
14741         (cv_qualifiers): Likewise.
14742         (after_type_declarator_intern): Likewise.
14743         (notype_declarator_intern): Likewise.
14744         (absdcl_intern): Likewise.
14745         (named_parm): Likewise.
14746         * pt.c (most_specialized_class): Likewise.
14747         * repo.c (temporary_obstack): Make it a structure, not a pointer.
14748         (init_repo): Initialize it.
14749         * search.c (current_obstack): Remove.
14750         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
14751
14752 2000-10-09  Richard Henderson  <rth@cygnus.com>
14753
14754         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
14755         (c++ language support bits for libgcc): Remove.
14756         (c++.clean): Remove cplib2.txt cleanup.
14757         * config-lang.in (headers, lib2funcs): Remove.
14758
14759         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
14760         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
14761         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
14762         * inc/new.h, inc/typeinfo: Remove files.
14763
14764 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
14765
14766         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
14767         defined.
14768         (init_decl_processing): Initialize intmax_type_node and
14769         uintmax_type_node.
14770
14771 2000-10-06  Richard Henderson  <rth@cygnus.com>
14772
14773         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
14774         (original_result_rtx): Remove.
14775         * decl.c (save_function_data): Don't clear x_result_rtx.
14776         (mark_lang_function): Don't mark it either.
14777         * expr.c (fixup_result_decl): Remove.
14778         * semantics.c (genrtl_named_return_value): Frob the return decl
14779         before calling emit_local_var.
14780         (genrtl_finish_function): Don't call fixup_result_decl.
14781         Always emit the jump to return_label.
14782
14783 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
14784
14785         * pt.c (lookup_template_class): Set current access for enum.
14786         (tsubst_enum): Set file & line for enum decl.
14787
14788         * spew.c (yylex): Remove unused variable.
14789
14790 2000-10-05  Richard Henderson  <rth@cygnus.com>
14791
14792         * semantics.c (genrtl_finish_function): Don't init or check
14793         can_reach_end; remove noreturn and return value checks.
14794
14795 2000-10-05  Tom Tromey  <tromey@cygnus.com>
14796
14797         * init.c (build_java_class_ref): Use `build_static_name' with a
14798         suffix, not a prefix, to build the class object's name.
14799
14800 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
14801
14802         * cp-tree.h (access_kind): Fix comment typo.
14803         * decl2.c (grokfield): Fix diagnostic typo.
14804         * semantics.c (finish_template_type): Fix comment typo.
14805         (finish_qualified_object_call_expr): Likewise.
14806
14807 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
14808
14809         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
14810         tsubsting fails.
14811
14812 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
14813
14814         * spew.c (frob_id): New static function.
14815         (frob_opname): Use it.
14816         (yylex): Use it.
14817
14818 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
14819
14820         * decl.c (lang_mark_false_label_stack): Remove.
14821         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
14822
14823 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
14824
14825         * gxxint.texi: Use @email for formatting email addresses.
14826
14827 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
14828
14829         * error.c: Remove direct obstack manipulation.  Replace with
14830         output_buffer-based formatting.  Adjust calls to removed macros.
14831         (obstack_chunk_alloc, obstack_chunk_free): Remove.
14832         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
14833         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
14834
14835 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
14836
14837         * ir.texi: Move to ../c-tree.texi.
14838
14839 2000-09-20  Jason Merrill  <jason@redhat.com>
14840
14841         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
14842
14843 2000-09-21  Andreas Jaeger  <aj@suse.de>
14844
14845         * errfn.c: Move declaration of cp_printer and cp_printers to ...
14846         * cp-tree.h: ... here.
14847
14848         * error.c: Remove declaration of cp_printer.
14849
14850 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
14851
14852         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
14853
14854 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
14855
14856         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
14857         users.
14858
14859 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
14860
14861         * decl.c (start_function): Robustify.
14862
14863 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14864
14865         * cp-tree.h (check_function_format): Accept a `status' parameter.
14866
14867         * call.c, typeck.c: Updates calls to `check_function_format'.
14868
14869 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
14870
14871         * decl2.c (handle_class_head): Always push some scope even
14872         in the error case.
14873
14874 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
14875
14876         * cp-tree.h (struct cp_language_function): Remove
14877         x_scope_stmt_stack and name_declared.
14878         (current_scope_stmt_stack): Remove.
14879         (function_name_declared_p): New macro.
14880         (struct lang_decl_flags): Use c_lang_decl as a base class.
14881         (context): Remove.
14882         (struct lang_decl): Replace saved_tree with context.
14883         (DECL_FRIEND_CONTEXT): Adjust accordingly.
14884         (SET_DECL_FRIEND_CONTEXT): Likewise.
14885         (DECL_VIRTUAL_CONTEXT): Likewise.
14886         (DECL_SAVED_TREE): Remove.
14887         (C_DECLARED_LABEL_FLAG): Likewise.
14888         (cplus_expand_expr_stmt): Don't declare.
14889         (add_decl_stmt): Likewise.
14890         (add_scope_stmt): Likewise.
14891         * decl.c (mark_stmt_tree): Remove.
14892         (case_compare): Likewise.
14893         (finish_case_label): Use c_add_case_label.
14894         (init_decl_processing): Set more language-specific hooks.
14895         (build_enumerator): Fix typo in comment.
14896         (cplus_expand_expr_stmt): Remove.
14897         (mark_lang_function): Use mark_c_language_function.
14898         (lang_mark_tree): Use c_mark_lang_decl.
14899         * decl2.c: Change order of inclusion.
14900         * except.c: Likewise.
14901         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
14902         back on c_expand_expr.
14903         * friend.c: Include expr.h.
14904         * init.c: Change order of inclusion.
14905         * Makefile.in: Update dependencies.
14906         * lex.h (free_lang_decl_chain): Remove.
14907         * optimize.c (maybe_clone_body): Use function_name_declared_p.
14908         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
14909         it doesn't exist.
14910         (instantiate_decl): Use function_name_declared_p.
14911         * semantics.c (lang_expand_expr_stmt): Remove.
14912         (set_current_function_name_declared): Likewise.
14913         (current_function_name_declared): Likewise.
14914         (begin_compound_stmt): Use function_name_declared_p.
14915         (add_decl_stmt): Remove.
14916         (setup_vtbl_ptr): Use function_name_declared_p.
14917         (add_scope_stmt): Remove.
14918         (current_scope_stmt_stack): New function.
14919         (cp_expand_stmt): Don't handle SCOPE_STMTs.
14920         (expand_body): Use function_name_declared_p.
14921         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
14922         * typeck.c: Change order of includes.
14923         (convert_sequence): Remove.
14924
14925 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
14926
14927         * lex.c (reswords): Add _Complex.
14928
14929 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14930
14931         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
14932
14933 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
14934
14935         * init.c (begin_init_stmts): Don't use // comments.
14936
14937 2000-09-12  Jason Merrill  <jason@redhat.com>
14938
14939         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
14940         all non-extern arrays.
14941
14942         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
14943         typenames, too.  Downgrade complaint to pedwarn.
14944         (xref_tag): Warn about surprising behavior of 'friend struct T'.
14945         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
14946         'class This::Inherited'.
14947
14948 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
14949
14950         * decl.c (finish_case_label): Given the LABEL_DECL a
14951         DECL_CONTEXT.
14952
14953 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
14954
14955         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
14956         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
14957         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14958         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14959         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
14960         New macros.
14961         (sorry_for_unsupported_tree, print_scope_operator,
14962         print_left_paren, print_right_paren, print_left_bracket,
14963         print_right_bracket, print_whitespace): Likewise.
14964         (aggr_variety): Rename to class_key_or_enum.
14965         (print_type): Rename to print_type_id.
14966         (print_type_specifier_seq, print_simple_type_specifier,
14967         print_elaborated_type_specifier,
14968         print_rest_of_abstract_declarator,
14969         print_parameter_declaration_clause, print_exception_specification,
14970         print_nested_name_specifier, print_template_id,
14971         typedef_original_name,  print_template_argument_list_start,
14972         print_template_argument_list_end): New functions.
14973
14974 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
14975
14976         * ir.texi: Add more documentation.
14977
14978 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
14979
14980         * cp-tree.h (struct saved_scope): Remove x_function_parms.
14981         (current_function_parms): Don't define.
14982         (struct cp_language_function): Remove parms_stored.
14983         (current_function_just_assigned_this): Don't define.
14984         (current_function_parms_stored): Likewise.
14985         (static_ctors): Declare.
14986         (static_dtors): Likewise.
14987         (SF_EXPAND): Don't define.
14988         (expand_start_early_try_stmts): Remove declaration.
14989         (store_parm_decls): Likewise.
14990         * decl.c (static_ctors): Don't declare.
14991         (static_dtors): Likewise.
14992         (struct binding_level): Remove this_block.
14993         (poplevel): Remove dead code.
14994         (set_block): Likewise.
14995         (mark_binding_level): Don't mark this_block.
14996         (mark_saved_scope): Don't mark x_function_parms.
14997         (init_decl_processing): Don't add current_function_parms as a GC
14998         root.
14999         (check_function_type): Change prototype.
15000         (start_function): Remove RTL-generation code.
15001         (expand_start_early_try_stmts): Remove.
15002         (store_parm_decls): Give it internal linkage.  Remove
15003         RTL-generation code.
15004         (finish_function): Remove RTL-generation code.
15005         * decl2.c (static_ctors): Fix formatting.
15006         (static_dtors): Likewise.
15007         * method.c (use_thunk): Don't call store_parm_decls.
15008         (synthesize_method): Likewise.
15009         * optimize.c (maybe_clone_body): Likewise.
15010         * parse.y (fn.def2): Likewise.
15011         (.set_base_init): Likewise.
15012         (nodecls): Likewise.
15013         * pt.c (instantiate_decl): Likewise.
15014         * rtti.c (synthesize_tinfo_fn): Likewise.
15015         * semantics.c (genrtl_try_block): Simplify.
15016         (expand_body): Use genrtl_start_function and
15017         genrtl_finish_function.
15018         (genrtl_start_function): New function.
15019         (genrtl_finish_function): Likewise.
15020
15021 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
15022
15023         * error.c (cp_tree_printer, case 'P'): Append break.
15024
15025 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
15026
15027         * cp-tree.h (frob_opname): Declare.
15028         * parse.y (saved_scopes): New static variable.
15029         (cp_parse_init): Adjust.
15030         (do_id): If lastiddecl is NULL, do do_identifier.
15031         (operator): Save scope information.
15032         (unoperator): New reduction. Restore scope information.
15033         (operator_name): Append unoperator. Call frob_opname.
15034         * spew.c (frob_opname): Define.
15035
15036 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
15037
15038         * decl.c, rtti.c: Include defaults.h if not already included.
15039         Don't define the *_TYPE_SIZE macros.
15040
15041 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
15042
15043         * cp-tree.h (push_switch): Change prototype.
15044         (check_cp_case_value): Remove declaration.
15045         (decl_constant_value): Likewise.
15046         * decl.c (struct cp_switch): Add switch_stmt and cases.
15047         (case_compare): New function.
15048         (push_switch): Set switch_stmt.  Initialize cases.
15049         (pop_switch): Clean up cases.
15050         (define_case_label): Rename to ...
15051         (finish_case_label): ... this.  Do semantic analysis for case
15052         labels here.
15053         (start_function): Correct comment.
15054         * decl2.c (check_cp_case_value): Remove.
15055         * expr.c (do_case): Remove.
15056         * pt.c (tsubst_expr): Adjust call to finish_case_label.
15057         * semantics.c (genrtl_do_poplevel): Remove declaration.
15058         (RECHAIN_STMTS): Remove.
15059         (finish_break_stmt): Use build_break_stmt.
15060         (finish_continue_stmt): Use build_continue_stmt.
15061         (finish_switch_cond): Adjust condition here, rater than in
15062         c_expand_start_case.
15063         (finish_case_label): Remove.
15064         * typeck.c (c_expand_return): Remove.
15065         (c_expand_start_case): Likewise.
15066
15067 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
15068
15069         * ir.texi: Document type nodes.
15070
15071 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
15072
15073         * cp-tree.h (init_cp_semantics): Declare.
15074         (genrtl_try_block): Don't declare.
15075         (genrtl_handler): Likewise.
15076         (genrtl_catch_block): Likewise.
15077         (genrtl_ctor_stmt): Likewise.
15078         (genrtl_subobject): Likewise.
15079         (genrtl_do_poplevel): Likewise.
15080         (genrtl_named_return_value): Likewise.
15081         * lex.c (init_parse): Call init_cp_semantics.
15082         * semantics.c (genrtl_try_block): Give it internal linkage.
15083         (genrtl_handler): Likewise.
15084         (genrtl_catch_block): Likewise.
15085         (genrtl_ctor_stmt): Likewise.
15086         (genrtl_subobject): Likewise.
15087         (genrtl_do_poplevel): Likewise.
15088         (genrtl_named_return_value): Likewise.
15089         (lang_expand_stmt): Rename to ...
15090         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
15091         (init_cp_semantics): Define.
15092
15093         * decl.c (initialize_local_var): Remove RTL-generating code.
15094         * semantics.c (genrtl_try_block): Fix formatting.
15095
15096         Move statement-tree facilities from C++ to C front-end.
15097         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
15098         (void_zero_node): Remove.
15099         (stmt_tree): Likewise.
15100         (scope_chain): Adjust.
15101         (language_function): Rename to cp_language_function.
15102         (cp_function_chain): Adjust.
15103         (current_stmt_tree): Remove.
15104         (last_tree): Likewise.
15105         (last_expr_type): Likewise.
15106         (struct lang_decl): Adjust.
15107         (STMT_IS_FULL_EXPR_P): Remove.
15108         (add_tree): Remove.
15109         (begin_stmt_tree): Likewise.
15110         (finish_stmt_tree): Likewise.
15111         (walk_tree_fn): Likewise.
15112         (walk_stmt_tree): Likewise.
15113         * class.c (finish_struct): Replace use of add_tree with add_stmt.
15114         * decl.c (mark_stmt_tree): Adjust type.
15115         (init_decl_processing): Don't build void_zero_node.
15116         (initialize_local_var): Adjust usage of current_stmt_tree.
15117         (finish_enum): Use add_stmt, not add_tree.
15118         (save_function_data): Adjust use of language_function.
15119         (finish_constructor_body): Use add_stmt, not add_tree.
15120         (finish_destructor_body): Likewise.
15121         (push_cp_function_context): Adjust use of language_function.
15122         (pop_cp_function_context): Likewise.
15123         (mark_lang_function): Likewise.
15124         (mark_cp_function_context): Likewise.
15125         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
15126         (build_vec_init): Likewise.
15127         * semantics.c (SET_LAST_STMT): Remove.
15128         (RECHAIN_STMTS): Don't use it.
15129         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
15130         (current_stmt_tree): Define.
15131         (add_tree): Remove.
15132         (finish_goto_stmt): Use add_stmt, not add_tree.
15133         (finish_expr_stmt): Likewise.
15134         (begin_if_stmt): Likewise.
15135         (finish_then_clause): Likewise.
15136         (begin_while_stmt): Likewise.
15137         (begin_do_stmt): Likewise.
15138         (finish_return_stmt): Likewise.
15139         (begin_for_stmt): Likewise.
15140         (finish_break_stmt): Likewise.
15141         (finish_continue_stmt): Likewise.
15142         (begin_switch_stmt): Likewise.
15143         (finish_case_label): Likewise.
15144         (begin_try_block): Likewise.
15145         (begin_function_try_block): Likewise.
15146         (begin_handler): Likewise.
15147         (begin_catch_block): Likewise.
15148         (begin_compound_stmt): Likewise.
15149         (begin_asm_stmt): Likewise.
15150         (finish_asm_stmt): Likewise.
15151         (finish_label_stmt): Likewise.
15152         (add_decl_stmt): Likewise.
15153         (finish_subobject): Likewise.
15154         (finish_decl_cleanup): Likewise.
15155         (finish_named_return_value): Likewise.
15156         (setup_vtbl_ptr): Likewise.
15157         (add_scope_stmt): Likewise.
15158         (finish_stmt_expr): Likewise.
15159         (prune_unused_decls): Remove.
15160         (begin_stmt_tree): Likewise.
15161         (finish_stmt_tree): Likewise.
15162         (prep_stmt): Adjust use of current_stmt_tree.
15163         (lang_expand_stmt): Likewise.
15164         * tree.c (statement_code_p): Remove.
15165         (cp_statement_code_p): New function.
15166         (walk_stmt_tree): Remove.
15167         (init_tree): Set lang_statement_code_p.
15168
15169 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
15170
15171         Integrated preprocessor.
15172
15173         * Make-lang.in, Makefile.in: Remove all references to input.c,
15174         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
15175         * gxx.gperf, hash.h, input.c: Delete.
15176         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
15177         initialized properly.
15178
15179         * class.c (fixup_pending_inline): Take a tree, not a
15180         struct pending_inline *.  All callers changed.
15181         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
15182         RID_PROTECTED entries in ridpointers[] array here.
15183         * decl.c (duplicate_decls): Do not refer to struct
15184         pending_inline.
15185         (record_builtin_type, init_decl_processing): Use RID_MAX not
15186         CP_RID_MAX.
15187         (grokdeclarator): Use C_IS_RESERVED_WORD.
15188         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
15189         cpplib.
15190         (grok_x_components): Do not inspect pending_inlines chain.
15191
15192         * cp-tree.h (struct lang_identifier): Add rid_code entry.
15193         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
15194         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
15195         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
15196         TIME_IDENTIFIER_FILEINFO): Kill.
15197         Update prototypes.
15198         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
15199         single 32-bit word.
15200         * parse.y: Call do_pending_inlines unconditionally.
15201         reinit_parse_for_method is now snarf_method.  fn.defpen is no
15202         longer necessary.  Remove unnecessary <itype> annotation on
15203         SCOPE.  Do not refer to end_of_file or struct pending_inline.
15204         * semantics.c (begin_inline_definitions): Call
15205         do_pending_inlines unconditionally.
15206
15207         * lex.c: Remove all code now shared with C front end.
15208         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
15209         into the get_identifier table.  Rewrite pragma handling to
15210         work with the registry.  Move code to save tokens for later
15211         processing to spew.c.
15212
15213         * spew.c: Rewrite everything in terms of token streams instead
15214         of text.  Move routines here from lex.c / input.c as
15215         appropriate.  GC-mark trees hanging off the pending inlines
15216         chain.
15217
15218 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
15219
15220         * NEWS: Mention that the named return value extension has been
15221         deprecated.
15222         * cp-tree.h (original_result_rtx): Define.
15223         (TREE_REFERENCE_EXPR): Remove.
15224         (DECL_VPARENT): Likewise.
15225         (pushdecl_nonclass_level): Likewise.
15226         (store_return_init): Likewise.
15227         (reinit_lang_specific): Likewise.
15228         (genrtl_named_return_value): Change prototype.
15229         * decl.c (original_result_rtx): Remove.
15230         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
15231         Do not generate RTL for local variables here.
15232         (store_return_init): Remove.
15233         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
15234         store_return_init.
15235         (finish_named_return_value): Adjust accordingly.  Warn that this
15236         extension is deprecated.
15237         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
15238
15239 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15240
15241         * pt.c (type_unification_real): Replace switch with if.
15242         (unify): Tsubst non-type parms before comparing.
15243
15244 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15245
15246         * error.c (dump_typename): New function, broken out of ...
15247         (dump_type): ... here. Use it.
15248         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
15249
15250 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15251
15252         * init.c (build_offset_ref): Deal with namespace scoped
15253         TEMPLATE_ID_EXPRs.
15254
15255 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15256
15257         * class.c (resolve_address_of_overloaded_function): Add
15258         explanation message.
15259         * decl.c (define_case_label): Reformat explanation.
15260         * decl2.c (finish_static_data_member_decl): Likewise.
15261         (grokfield): Likewise.
15262         * friend.c (do_friend): Likewise.
15263
15264 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
15265
15266         * tree.c (walk_tree): Expose tail recursion.
15267         (walk_stmt_tree): New function.
15268         * cp-tree.h: Prototype walk_stmt_tree.
15269         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
15270         the BLOCKs directly.  If a BLOCK has no variables after
15271         pruning, discard it.
15272         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
15273         restore the line number.
15274
15275 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
15276
15277         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
15278         (pt.o): Remove dependency on HTAB_H.
15279         * cp-tree.h: Include hashtab.h.
15280         (walk_tree): Change prototype.
15281         (walk_tree_without_duplicates): New function.
15282         * decl.c (check_default_argument): Use it.
15283         * optimize.c (remap_decl): Adjust calls to walk_tree.
15284         (copy_body): Likewise.
15285         (expand_calls_inline): Likewise.
15286         (calls_setjmp_p): Use walk_tree_without_duplicates.
15287         * pt.c: Don't include hashtab.h.
15288         (for_each_template_parm): Use walk_tree_without_duplicates.
15289         * semantics.c (finish-stmt_tree): Likewise.
15290         (expand_body): Likewise.
15291         * tree.c (walk_tree): Add additional parameter.
15292         (walk_tree_without_duplicates): New function.
15293         (count_trees): Use it.
15294         (verify_stmt_tree): Adjust call to walk_tree.
15295         (find_tree): Use walk_tree_without_duplicates.
15296         (no_linkage_check): Likewise.
15297         (break_out_target_exprs): Adjust call to walk_tree.
15298         (cp_unsave): Likewise.
15299
15300 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15301
15302         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
15303         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15304         * cp-tree.h (TYPE_BINFO): Adjust comment.
15305         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
15306         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
15307         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15308         (TYPE_TEMPLATE_INFO): Likewise.
15309         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
15310         * class.c (push_nested_class): Likewise.
15311         * decl.c (lookup_name_real): Likewise.
15312         (grokdeclarator): Likewise.
15313         (grok_op_properties): Likewise.
15314         (xref_tag): Likewise.
15315         (xref_basetypes): Likewise.
15316         * decl2.c (constructor_name_full): Likewise.
15317         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
15318         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15319         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
15320         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15321         (dump_type_suffix): Likewise.
15322         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
15323         instead.
15324         (get_aggr_from_typedef): Likewise.
15325         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
15326         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15327         (write_template_parm): Likewise.
15328         (write_template_template_parm): Check tree code instead of
15329         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15330         * method.c (build_overload_nested_name): Add
15331         BOUND_TEMPLATE_TEMPLATE_PARM.
15332         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
15333         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15334         * pt.c (convert_template_argument): Check tree code instead of
15335         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15336         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
15337         (for_each_template_parm): Adjust comment.
15338         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
15339         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15340         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
15341         template_args_equal to compare template template parameter cases.
15342         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15343         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
15344         instead.
15345         * tree.c (copy_template_template_parm): Decide whether to create
15346         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
15347         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15348         (copy_tree_r): Likewise.
15349         * typeck.c (comptypes): Likewise.  Check tree code instead of
15350         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15351
15352 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
15353
15354         * decl.c (finish_function): Move the code for handling functions
15355         marked with the constructor and destructor attributes inside the
15356         expand_p block.
15357
15358 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15359
15360         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
15361
15362 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15363
15364         * pt.c (lookup_template_class): Remove abort.
15365         * tree.c (get_type_decl): Allow error_mark_node.
15366
15367 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15368
15369         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
15370         TEMPLATE_ID_EXPRs.
15371
15372 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
15373
15374         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
15375         new ABI mangling.
15376
15377 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
15378
15379         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
15380         union tag mismatch error reporting.
15381
15382 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
15383
15384         * call.c (build_scoped_method_call): Check it is not a namespace.
15385
15386 2000-08-30  Jason Merrill  <jason@redhat.com>
15387
15388         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
15389
15390         * tree.c (bot_manip): Check TREE_CONSTANT rather than
15391         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
15392         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
15393
15394         * decl.c (start_function): Always call make_function_rtl.
15395
15396 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
15397
15398         * semantics.c (prune_unused_decls): New function.
15399         (finish_stmt_tree): Call it via walk_tree.
15400
15401 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
15402
15403         * class.c (build_secondary_vtable): Constify a char *.
15404         * decl.c (init_decl_processing): Initialize function_id_node,
15405         pretty_function_id_node, and func_id_node.
15406         * input.c (struct input_source): Constify 'str'.
15407         (feed_input): Constify first argument.
15408         * mangle.c (write_identifier): Constify argument.
15409         * pt.c (mangle_class_name_for_template): Constify argument.
15410
15411 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
15412
15413         * typeck.c (mark_addressable): Remove code that pokes around in
15414         RTL.
15415
15416 2000-08-28  Jason Merrill  <jason@redhat.com>
15417
15418         * lex.c (file_name_nondirectory): Move to toplev.c.
15419
15420         * cp-tree.h (LOCAL_CLASS_P): New macro.
15421         * class.c (finish_struct_1): Use it.
15422
15423 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
15424
15425         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
15426         (write_encoding): Pass another argument to write_name.
15427         (write_name): Add ignore_local_scope parameter.  Fix handling of
15428         local names.
15429         (write_nested_name): Use write_unqualified_name.
15430         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
15431         (write_template_prefix): Use write_unqualified_name.
15432         (write_component): Remove.
15433         (write_local_name): Add parameter.  Use direct local entity to
15434         discriminator calculation.
15435         (write_class_enum_type): Pass another argument to write_name.
15436         (write_template_template_arg): Likewise.
15437         (make_guard_variable): Likewise.
15438
15439 2000-08-27  Jason Merrill  <jason@redhat.com>
15440
15441         * decl.c (pushdecl): Matching decls for local externs are found in
15442         the current level.  Propagate linkage information from previous
15443         declarations.
15444
15445 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
15446
15447         * ir.texi (Expressions): Fix typo.
15448
15449 2000-08-25  Greg McGary  <greg@mcgary.org>
15450
15451         * tree.c (init_tree): Use ARRAY_SIZE.
15452
15453 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15454
15455         * error.c (cp_tree_printer): Rework.
15456
15457 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
15458
15459         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
15460         dyn-string.o.
15461         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
15462         (cp-demangle.o): Remove target.
15463         (dyn-string.o): Likewise.
15464
15465         * decl.c (grokfndecl): Require that `main' return an `int'.
15466         * mangle.c (write_encoding): Don't mangle return types for
15467         conversion functions.
15468
15469 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15470
15471         * error.c (tree_formatting_info): New data type.
15472         (tree_being_formatted): New macro.
15473         (tree_formatting_flags): Likewise.
15474         (put_whitespace): Likewise.
15475         (print_tree_identifier): Likewise.
15476         (print_identifier): Likewise.
15477         (cp_tree_printer, print_function_argument_list, print_declaration,
15478         print_expression, print_function_declaration,
15479         print_function_parameter, print_type, print_cv_qualifier): New
15480         functions.
15481         (init_error): Initialize lang_printer.
15482
15483 2000-08-24  Jason Merrill  <jason@redhat.com>
15484
15485         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
15486         adjustment necessary.
15487
15488 2000-08-24  Greg McGary  <greg@mcgary.org>
15489
15490         * cp-tree.h (MAIN_NAME_P): Remove macro.
15491
15492 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
15493
15494         * error.c (print_instantiation_context): Don't forget to flush the
15495         buffer.
15496
15497 2000-08-23  Jason Merrill  <jason@redhat.com>
15498
15499         * typeck.c (build_ptrmemfunc): Save the input pmf.
15500
15501         * method.c (process_modifiers): Use same_type_p.
15502
15503 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
15504
15505         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
15506         * mangle.c (write_function_type): Change prototype.
15507         (write_encoding): Don't mangle return types for
15508         constructors or destructors.
15509         (write_type): Adjust call to write_function_type.
15510         * pt.c (instantiate_template): Instantiate alternate entry points
15511         when instantiating the main function.
15512
15513 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
15514
15515         * error.c (cp_print_error_function): Don't use embedded '\n' in
15516         output_printf.
15517
15518 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
15519
15520         * decl.c (init_decl_processing): Remove bogus initialization.
15521         * error.c (lang_print_error_function): Restore here.
15522         (init_error): Initialize print_error_function.
15523
15524 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
15525
15526         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
15527
15528 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
15529
15530         * Makefile.in (error.o): Depends on diagnostic.h
15531
15532         * cp-tree.h (problematic_instantiation_changed,
15533         record_last_problematic_instantiation, current_instantiation,
15534         print_instantiation_context): Declare.
15535         (maybe_print_template_context): Remove.
15536
15537         * decl.c (init_decl_processing): Set print_error_function to NULL.
15538         (lang_print_error_function): Remove, since we're using a new
15539         machinery.
15540
15541         * error.c: #include diagnostic.h
15542         (function_category): New function.
15543         (cp_diagnostic_starter): Likewise.
15544         (cp_diagnostic_finalizer): Likewise.
15545         (cp_print_error_function): Likewise.
15546         (maybe_print_instantiation_context): Likewise.
15547         (print_instantiation_full_context): Likewise.
15548         (print_instantiation_partial_context): Likewise.
15549         (print_instantiation_context): Define.
15550         (init_error): Initialize diagnostic pager and finalizer.
15551
15552         * pt.c (problematic_instantiation_changed): Define.
15553         (record_last_problematic_instantiation): Likewise.
15554         (current_instantiation): Likewise.
15555         (maybe_print_template_context): Remove.
15556         (print_template_context): Likewise.
15557         (current_tinst_level): Make static to reflect Brendan Kehoe's
15558         change of 1995-04-13.
15559         (push_tinst_level): Call print_instantiation_context.
15560
15561 2000-08-21  Nix  <nix@esperi.demon.co.uk>
15562
15563         * lang-specs.h: Do not process -o or run the assembler if
15564         -fsyntax-only.
15565
15566 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
15567
15568         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
15569         variables.
15570         * decl2.c (lang_decode_option): Disable gettext attributes for
15571         -ansi.
15572
15573 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
15574
15575         * lex.c (lang_init_options): Default diagnostic message maximum
15576         length to 80, when line-wrapping.
15577
15578 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
15579
15580         * class.c (build_vtbl_initializer): Clear the entire
15581         vtbl_init_data.  Start keeping track of the functions for which we
15582         have created vcall offsets here.
15583         (dfs_build_vcall_offset_vtbl_entries): Remove.
15584         (build_vcall_offset_vtbl_entries): Reimplement.
15585         (add_vcall_offset_vtbl_entries_r): New function.
15586         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
15587         computing when vcall offsets are necessary.
15588
15589 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15590
15591         * decl.c (member_function_or_else): Use cp_error ... %T.
15592         (grokdeclarator): Likewise.
15593         (start_method): Likewise.
15594         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
15595
15596 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15597
15598         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
15599         TYPE_DECLs.
15600
15601 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15602
15603         * cp-tree.h (PTRMEM_OK_P): New macro.
15604         (itf_ptrmem_ok): New enumeration value.
15605         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
15606         argument. Diagnose implicit pointer to member.
15607         (instantiate_type): Don't diagnose implicit pointer to member
15608         here. Pass itf_ptrmem_ok if ok. Adjust calls to
15609         resolve_address_of_overloaded_function.
15610         * init.c (build_offset_ref): Set PTRMEM_OK_P.
15611         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
15612         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
15613         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
15614         (build_unary_op): Deal with single non-static member in
15615         microsoft-land.
15616
15617 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15618
15619         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
15620
15621 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15622
15623         * cp-tree.h (enum_name_string): Remove prototype.
15624         (report_case_error): Remove prototype.
15625         * cp/typeck2.c (enum_name_string): Remove.
15626         (report_case_error): Remove.
15627         * error.c (dump_expr): Deal with enum values directly.
15628         Correctly negate integer constant.
15629
15630 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15631
15632         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
15633         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
15634         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
15635         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
15636         (__cxa_vec_new): Use __cxa_vec_new2.
15637         (__cxa_vec_delete): Use __cxa_vec_delete2.
15638
15639 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15640
15641         * vec.cc (__cxa_vec_new): Set "C" linkage.
15642         (__cxa_vec_ctor): Likewise.
15643         (__cxa_vec_cctor): Likewise.
15644         (__cxa_vec_dtor): Likewise.
15645         (__cxa_vec_delete): Likewise.
15646         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
15647         (__cxa_vec_ctor): Likewise.
15648         (__cxa_vec_cctor): Likewise.
15649         (__cxa_vec_dtor): Likewise.
15650         (__cxa_vec_delete): Likewise.
15651
15652 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15653
15654         * class.c (instantiate_type): Reinstate local variable
15655         deleted in previous change.
15656
15657         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
15658         itf_no_attributes.
15659
15660 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15661
15662         * cp-tree.h (instantiate_type_flags): New enumeration.
15663         (instantiate_type): Change parameter.
15664         * class.c (instantiate_type): Adjust prototype. Adjust.
15665         * call.c (standard_conversion): Adjust instantiate_type call.
15666         (reference_binding): Likewise.
15667         (build_op_delete_call): Likewise.
15668         (convert_like_real): Likewise.
15669         * cvt.c (cp_convert_to_pointer): Likewise.
15670         (convert_to_reference): Likewise.
15671         * pt.c (convert_nontype_argument): Likewise.
15672         * typeck.c (build_binary_op): Likewise.
15673         (build_ptrmemfunc): Likewise.
15674         (convert_for_assignment): Likewise.
15675
15676 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15677
15678         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
15679         (current_aggr): Define.
15680         * decl.c (grokdeclarator): Make sure a friend class is an
15681         elaborated type specifier.
15682         * parse.y (current_aggr): Remove static definition.
15683         (cp_parse_init): Adjust.
15684         (structsp): Clear and restore current_aggr.
15685         (component_decl_list): Clear current_aggr.
15686
15687         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
15688         aggregate tag on the typename's context.
15689
15690         * pt.c (tsubst_friend_class): Return error_mark_node, if
15691         parms becomes NULL.
15692         (instantiate_class_template): Ignore error_mark_node friend types.
15693
15694 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
15695
15696         * cvt.c (warn_ref_binding): New static function, broken out of ...
15697         (convert_to_reference): ... here. Use it.
15698
15699 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
15700
15701         * parse.y (template_arg): Add rule for template qualified with
15702         global scope.
15703
15704 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15705
15706         * decl2.c (add_function): Reorganize.
15707         (arg_assoc): Do not consider function template decls.
15708
15709 2000-08-11  Jason Merrill  <jason@redhat.com>
15710
15711         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
15712         looking inside.
15713
15714 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15715
15716         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
15717         (lookup_nested_tag): Likewise.
15718
15719         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
15720         can be produced.
15721
15722 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15723
15724         * parse.y (named_complex_class_head_sans_basetype): Remove
15725         always true if.
15726
15727 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15728
15729         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
15730         explicit TEMPLATE_ID_EXPR args.
15731         (build_expr_from_tree, case CALL_EXPR): Likewise.
15732
15733 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15734
15735         * decl.c (check_tag_decl): Diagnose typename's which don't
15736         declare anything.
15737
15738 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
15739
15740         * init.c (build_aggr_init): Reject bogus array initializers
15741         early.
15742
15743 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
15744
15745         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
15746         runtime.
15747         * cp/tinfo.cc (__dynamic_cast): Likewise.
15748         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
15749
15750 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
15751
15752         * cvt.c (convert_to_pointer_force): Fix error message when
15753         attempting to cast from ambiguous base.
15754
15755 2000-08-08  Jason Merrill  <jason@redhat.com>
15756
15757         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
15758         (tsubst_template_arg_vector): Likewise.
15759
15760         * decl2.c (build_anon_union_vars): Choose the largest field; don't
15761         assume that one will be as large as the union.
15762
15763 2000-08-07  Kazu Hirata  <kazu@hxi.com>
15764
15765         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
15766         * decl.c (pop_labels): Likewise.
15767
15768 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
15769
15770         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
15771         specifications.
15772         (__pointer_to_member_type_info): Likewise.
15773         (__base_class_info): Likewise.
15774         (__class_type_info): Likewise.
15775         (__si_class_type_info): Likewise.
15776         (__vmi_class_type_info): Likewise.
15777         * tinfo.cc (__si_class_type_info::__do_find_public_src):
15778         Changed member names to match specifications.
15779         (__vmi_class_type_info::__do_find_public_src): Likewise.
15780         (__si_class_type_info::__do_dyncast): Likewise.
15781         (__vmi_class_type_info::__do_dyncast): Likewise.
15782         (__si_class_type_info::__do_upcast): Likewise.
15783         (__vmi_class_type_info::__do_upcast): Likewise.
15784         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
15785         (__pbase_type_info::__pointer_catch): Likewise.
15786         (__pointer_type_info::__pointer_catch): Likewise.
15787         (__pointer_to_member_type_info::__pointer_catch): Likewise.
15788
15789 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
15790
15791         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
15792         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
15793         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
15794
15795 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
15796
15797         * cp-tree.h (add_method): Change prototype.
15798         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
15799         Don't double the size of the method vector in the error case.
15800         (handle_using_decl): Adjust call to add_method.
15801         (add_implicitly_declared_members): Likewise.
15802         (clone_function_decl): Likewise.
15803         * decl2.c (check_classfn): Likewise.
15804         * semantics.c (finish_member_declaration): Likewise.
15805
15806 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
15807
15808         * decl.c (flag_isoc94): New variable.
15809
15810 2000-08-02  Jason Merrill  <jason@redhat.com>
15811
15812         * pt.c (do_type_instantiation): Add complain parm; don't complain
15813         if called recursively.
15814         * cp-tree.h, parse.y: Adjust.
15815
15816 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
15817
15818         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
15819         -Wno-strict-prototypes.
15820
15821         * g++spec.c: Adjust type of second argument to
15822         lang_specific_driver, and update code as necessary.
15823
15824         * cp-tree.h: Don't prototype min_precision here.
15825         (my_friendly_assert): Cast expression to void.
15826         * semantics.c (do_poplevel): Initialize scope_stmts.
15827
15828 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
15829
15830         * cp-tree.h (DECL_NEEDED_P): Tweak.
15831
15832 2000-07-28  Jason Merrill  <jason@redhat.com>
15833
15834         * lang-specs.h: Use %i in rule for .ii files.
15835
15836 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
15837
15838         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
15839
15840 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
15841
15842         Allow indirect primary bases.
15843         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
15844         primary_base.
15845         (CLASSTYPE_VFIELD_PARENT): Remove.
15846         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
15847         (BINFO_PRIMARY_BINFO): Remove.
15848         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
15849         (BINFO_VBASE_PRIMARY_P): Likewise.
15850         (BINFO_PRIMARY_BASE_OF): New macro.
15851         (BINFO_INDIRECT_PRIMARY_P): Likewise.
15852         (get_primary_binfo): New function.
15853         * decl.c (lang_mark_tree): Make lang_type::primary_base.
15854         * class.c (vcall_offset_data_s): Rename to ...
15855         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
15856         and add ctor_vtbl_p.
15857         (get_derived_offset): Use get_primary_binfo.
15858         (dfs_mark_primary_bases): Adjust handling of virtual primary
15859         bases.
15860         (mark_primary_bases): Likewise.
15861         (set_primary_base): Take a binfo, not an integer, as a
15862         representation of the primary base.
15863         (indirect_primary_base_p): Remove.
15864         (determine_primary_base): Adjust for indirect primary bases.
15865         (dfs_find_final_overrider): Fix typo in coment.
15866         (update_vtable_entry_for_fn): Use get_primary_binfo.
15867         (layout_nonempty_base_or_field): Tweak.
15868         (build_base_fields): Adjust for new primary base semantics.
15869         (dfs_propagate_binfo_offsets): Remove.
15870         (propagate_binfo_offsets): Rewrite.
15871         (dfs_set_offset_for_shared_vbases): Remove.
15872         (layout_virtual_bases): Don't use it.
15873         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
15874         ABI.
15875         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
15876         CLASSTYPE_VFIELD_PARENT.
15877         (dfs_get_primary_binfo): New function.
15878         (get_primary_binfo): Likewise.
15879         (dump_class_hierarchy_r): Tweak printing of primary bases.
15880         (build_vtbl_initializer): Fix typo in comments.  Use
15881         vtbl_init_data.
15882         (build_vcall_and_vbase_vtbl_entries): Likewise.
15883         (build_vbaes_offset_vtbl_entries): Likewise.
15884         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
15885         BV_VCALL_INDEX to handle indirect primary bases.
15886         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
15887         (build_rtti_vtbl_entries): Likewise.
15888         * search.c (get_shared_vbase_if_not_primary): Tweak.
15889         (find_vbase_instance): Likewise.
15890         (binfo_for_vtable): Simplify.
15891         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
15892         (make_binfo): Make it have 11 entries.
15893
15894 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
15895
15896         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
15897         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
15898         ascertaining primaryness.
15899         (G): Remove template_args.
15900         (decl_is_template_id): New function.
15901         (write_encoding): Use decl_is_template_id.
15902         (write_name): Likewise.  Handle type_decls.  Get main variant of
15903         type decls.
15904         (write_nested_name): Likewise.
15905         (write_prefix): Likewise.
15906         (write_template_prefix): Likewise.
15907         (write_special_name_constructor): Remove defunct production from
15908         comment.
15909         (write_bare_function_type): Remove comment about absent parameter.
15910         (write_template_template_arg): Add missing grammar production to
15911         comment.
15912
15913 2000-07-27  Jason Merrill  <jason@redhat.com>
15914
15915         * decl.c (duplicate_decls): If common_type produces a non-typedef
15916         type for a typedef, just use the old type.
15917
15918 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
15919
15920         * cp-tree.h (function_depth): Declare.
15921         (verify_stmt_tree): Likewise.
15922         (find_tree): Likewise.
15923         * decl.c (function_depth): Give it external linkage.
15924         * optimize.c (optimize_function): Increment and decrement it.
15925         * tree.c (verify_stmt_tree_r): New function.
15926         (verify_stmt_tree): Likewise.
15927         (find_tree_r): Likewise.
15928         (find_tree): Likewise.
15929
15930 2000-07-27  Jason Merrill  <jason@redhat.com>
15931
15932         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
15933         TYPE_PTRMEMFUNC_P.
15934         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
15935
15936 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
15937
15938         * decl.c (start_cleanup_fn): Mark the function as `inline'.
15939         * decl2.c (get_guard): Call cp_finish_decl, not
15940         rest_of_decl_compilation, for local guards.
15941         * lex.c (do_identifier): Remove unused variable.
15942
15943 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
15944
15945         * parse.y:  Add missing ';'.
15946
15947 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
15948
15949         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
15950         of `extern "C++"'.
15951
15952 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
15953
15954         Kill strict_prototype. Backwards compatibility only for
15955         non NO_IMPLICIT_EXTERN_C systems.
15956         * cp-tree.h (flag_strict_prototype): Remove.
15957         (strict_prototype): Remove.
15958         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15959         * decl.c (maybe_push_to_top_level): Adjust.
15960         (pop_from_top_level): Adjust.
15961         (decls_match): Only allow sloppy parm matching for ancient
15962         system headers.
15963         (init_decl_processing): Adjust.
15964         (grokdeclarator): Adjust.
15965         * decl2.c (flag_strict_prototype): Remove.
15966         (strict_prototype): Remove.
15967         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15968         (lang_f_options): Remove "strict-prototype".
15969         (unsupported-options): Add "strict-prototype".
15970         * lex.c (do_identifier): Adjust.
15971         (do_scoped_id): Adjust.
15972         * parse.y (empty_parms): Adjust.
15973         * class.c (push_lang_context): Adjust.
15974         (pop_lang_context): Adjust.
15975         * typeck.c (comp_target_parms): Adjust.
15976
15977 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
15978
15979         * decl.c (poplevel): Deal with anonymous variables at for scope.
15980         (maybe_inject_for_scope_var): Likewise.
15981
15982 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
15983
15984         * decl.c: Remove all signal handling code, now done in toplev.c.
15985
15986 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
15987
15988         * decl.c (make_rtl_for_nonlocal_decl): Rework.
15989
15990         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
15991         correctly.
15992
15993 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
15994
15995         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
15996         Define my_friendly_assert and my_friendly_abort as macros
15997         which may call friendly_abort.  Prototype friendly abort, not
15998         my_friendly_abort or my_friendly_assert.
15999         * decl.c (signal_catch): Report the signal caught in the error
16000         message.  Call fatal directly.
16001         * typeck2.c (ack, my_friendly_assert): Delete.
16002         (my_friendly_abort): Rename to friendly_abort.  Expect file,
16003         line, and function parameters.  Report the abort code, then
16004         call fancy_abort.  Do not mask an abort if errors have
16005         already occurred.
16006
16007 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
16008
16009         * typeck.c (comp_target_parms): Remove obsolete parameter.
16010         (comp_target_types): Adjust.
16011
16012 2000-07-17  Jason Merrill  <jason@redhat.com>
16013
16014         * typeck.c (mark_addressable): Never set TREE_USED.
16015         * call.c (build_call): Don't abort on calls to library functions
16016         that have been declared normally.
16017
16018         * typeck.c (build_binary_op): Fix grammar in warning.
16019
16020         * exception.cc (__eh_free): Fix prototype.
16021
16022         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
16023
16024         * decl.c (pushdecl): Handle seeing an OVERLOAD in
16025         IDENTIFIER_NAMESPACE_VALUE.
16026
16027 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
16028
16029         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
16030         * method.c (use_thunk): Correct handling of vcall offsets.
16031
16032 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
16033
16034         * .cvsignore: parse.h and parse.c have no cp- prefix.
16035
16036 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
16037
16038         * .cvsignore: New file.
16039
16040 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
16041
16042         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
16043
16044 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
16045
16046         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
16047         * parse.c: Remove.
16048         * parse.h: Likewise.
16049
16050 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
16051
16052         * class.c (layout_class_type): Add pointers to virtual bases after
16053         base classes under the old ABI.
16054
16055 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
16056
16057         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
16058         (finish_continue_stmt): Likewise.
16059         (begin_for_stmt): Remove call to note_level_for_for.
16060         (finish_goto_stmt): Change call from build_min_nt
16061         to build_stmt.
16062         (finish_expr_stmt): Likewise.
16063         (begin_if_stmt): Likewise.
16064         (begin_while_stmt): Likewise.
16065         (finish_while_stmt): Likewise.
16066         (finish_return_stmt): Likewise.
16067         (begin_for_stmt): Likewise.
16068         (finish_for_stmt): Likewise.
16069         (finish_break_stmt): Likewise.
16070         (begin_switch_stmt): Likewise.
16071         (finish_case_label): Likewise.
16072         (genrtl_try_block): Likewise.
16073         (begin_try_block): Likewise.
16074         (begin_handler): Likewise.
16075         (begin_compound_stmt): Likewise.
16076         (finish_asm_stmt): Likewise.
16077         (finish_label_stmt): Likewise.
16078         (add_decl_stmt): Likewise.
16079         (finish_subobject): Likewise.
16080         (finish_decl_cleanup): Likewise.
16081         (finish_named_return_value): Likewise.
16082         (setup_vtbl_ptr): Likewise.
16083         (add_scope_stmt): Likewise.
16084         * decl.c (finish_constructor_body): Likewise.
16085         (finish_destructor_body): Likewise.
16086         * optimize.c (copy_body_r): Likewise.
16087         (initialize_inlined_parameters): Likewise.
16088         (declare_return_variable): Likewise.
16089         (expand_call_inline): Likewise.
16090
16091 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
16092
16093         * semantics.c (expand_body): Sync interface information
16094         at the end of function body expansion.
16095
16096 2000-07-09  Jason Merrill  <jason@redhat.com>
16097
16098         * init.c (build_new_1): Bail early if the call to new fails.
16099
16100         * decl.c (compute_array_index_type): Check specifically for
16101         an INTEGER_CST, not just TREE_CONSTANT.
16102
16103         * decl.c (duplicate_decls): Don't call duplicate_decls on
16104         the DECL_TEMPLATE_RESULT.
16105         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
16106         codes.
16107
16108         * error.c (dump_template_bindings): Don't crash if we had an
16109         invalid argument list.
16110
16111         * typeck.c (c_expand_start_case): Do narrowing here.
16112         * semantics.c (finish_switch_cond): Not here.
16113
16114 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
16115
16116         * parse.y (asm_clobbers): Do string concatenation.
16117
16118 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
16119
16120         * decl.c (pushtag): Don't put local classes in template functions
16121         on the local_classes list.
16122
16123 2000-07-04  Scott Snyder  <snyder@fnal.gov>
16124
16125         * decl2.c (get_guard): Add missing return for old ABI local
16126         variable case.
16127
16128 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
16129
16130         * cp-tree.h (char_type_p): New function.
16131         * decl.c (init_decl_processing): Don't initialize
16132         signed_wchar_type_node or unsigned_wchar_type_node.
16133         (complete_array_type): Handle brace-enclosed string-constants.
16134         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
16135         * tree.c (char_type_p): New function.
16136         * typeck2.c (digest_init): Use char_type_p.
16137
16138 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
16139
16140         * pt.c (tsubst): Don't layout type, if it's error_mark.
16141
16142 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
16143
16144         * pt.c (instantiate_pending_templates): Reset template level.
16145
16146 2000-07-05  Jason Merrill  <jason@redhat.com>
16147
16148         * call.c (joust): Don't complain about `operator char *()' beating
16149         `operator const char *() const'.
16150
16151 2000-07-04  scott snyder  <snyder@fnal.gov>
16152             Jason Merrill  <jason@redhat.com>
16153
16154         * repo.c (repo_get_id): Handle the case where a class with virtual
16155         bases has a null TYPE_BINFO_VTABLE.
16156
16157 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
16158             Jason Merrill  <jason@redhat.com>
16159
16160         * parse.y (member_init): Just pass in the type.
16161         * init.c (expand_member_init): Handle getting a type.
16162
16163 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16164             Jason Merrill  <jason@redhat.com>
16165
16166         * decl.c (finish_function): Warn if a function has no return
16167         statement.
16168         Suggested by Andrew Koenig.
16169         * typeck.c (check_return_expr): Do set current_function_returns_value
16170         if we got an error_mark_node.
16171
16172 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
16173
16174         * decl2.c (push_decl_namespace): Push the original namespace.
16175
16176 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
16177
16178         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
16179         * semantics.c (begin_class_definition): Clear it.
16180
16181 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
16182
16183         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
16184         (genrtl_expr_stmt): Likewise.
16185         (genrtl_decl_stmt): Likewise.
16186         (genrtl_if_stmt): Likewise.
16187         (genrtl_while_stmt): Likewise.
16188         (genrtl_do_stmt): Likewise.
16189         (genrtl_return_stmt): Likewise.
16190         (genrtl_for_stmt): Likewise.
16191         (genrtl_break_stmt): Likewise.
16192         (genrtl_continue_stmt): Likewise.
16193         (genrtl_scope_stmt): Likewise.
16194         (genrtl_switch_stmt): Likewise.
16195         (genrtl_case_label): Likewise.
16196         (genrtl_begin_compound_stmt): Likewise.
16197         (genrtl_finish_compound_stmt): Likewise.
16198         (genrtl_compound_stmt): Likewise.
16199         (genrtl_asm_stmt): Likewise.
16200
16201         * init.c (begin_init_stmts): Remove call to
16202         genrtl_begin_compound_stmt.
16203         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
16204
16205         * semantics.c (lang_expand_stmt): Changed call to
16206         genrtl_compound_stmt to ignore return value.
16207
16208 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
16209
16210         * mangle.c (canonicalize_for_substitution): Return the canonical
16211         variant of a type.
16212
16213         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
16214         TYPE_DECL.
16215         * typeck.c (commonparms): Remove obstack manipulations.
16216
16217 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
16218
16219         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
16220
16221         * Makefile.in (OBJS): Added ../c-semantics.o.
16222         (OBJDEPS): Likewise.
16223
16224         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
16225         ../c-common.h.
16226         (struct stmt_tree): Added comment.
16227         (current_function_name_declared): Removed.
16228         (stmts_are_full_exprs_p): Likewise.
16229         (genrtl_do_pushlevel): Likewise.
16230         (genrtl_clear_out_block): Likewise.
16231         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
16232         (DECL_ANON_UNION_ELEMS): Likewise.
16233         (emit_local_var): Likewise.
16234         (make_rtl_for_local_static): Likewise.
16235         (do_case): Likewise.
16236         (expand_stmt): Likewise.
16237         (genrtl_decl_cleanup): Likewise.
16238         (c_expand_asm_operands): Likewise.
16239         (c_expand_return): Likewise.
16240         (c_expand_start_case): Likewise.
16241
16242         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
16243         (emit_local_var): Likewise.
16244         (initialize_local_var): Change reference to
16245         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16246         Change reference to stmts_are_full_exprs_p to
16247         current_stmt_tree->stmts_are_full_exprs_p.
16248         (push_cp_function_context): Likewise.
16249
16250         * expect.c (expand_throw): Change reference to
16251         stmts_are_full_exprs_p.
16252
16253         * init.c (build_aggr_init): Change reference to
16254         stmts_are_full_exprs_p.
16255         (build_vec_init): Likewise.
16256
16257         * optimize.c (maybe_clone_body): Change reference to
16258         current_function_name_declared to
16259         cp_function_chain->name_declared.
16260
16261         * pt.c (instantiate_decl): Change reference to
16262         current_function_name_declared to
16263         cp_function_chain->name_declared.
16264
16265         * semantics.c (expand_cond): Moved declaration to c-common.h.
16266         (genrtl_do_pushlevel): Moved to c-semantics.c.
16267         (genrtl_clear_out_block): Likewise.
16268         (genrtl_goto_stmt): Likewise.
16269         (genrtl_expr_stmt): Likewise.
16270         (genrtl_decl_stmt): Likewise.
16271         (gerntl_if_stmt): Likewise.
16272         (genrtl_while_stmt): Likewise.
16273         (genrtl_do_stmt): Likewise.
16274         (genrtl_return_stmt): Likewise.
16275         (genrtl_for_stmt): Likewise.
16276         (genrtl_break_stmt): Likewise.
16277         (genrtl_continue_stmt): Likewise.
16278         (genrtl_scope_stmt): Likewise.
16279         (genrtl_switch_stmt): Likewise.
16280         (genrtl_case_label): Likewise.
16281         (genrtl_begin_compound_stmt): Likewise.
16282         (genrtl_finish_compound_stmt): Likewise.
16283         (genrtl_compound_stmt): Likewise.
16284         (genrtl_asm_stmt): Likewise.
16285         (genrtl_decl_cleanup): Likewise.
16286         (expand_cond): Likewise.
16287         (expand_stmt): Renamed to ...
16288         (lang_expand_stmt): ... this.
16289         (lang_expand_expr_stmt): Initialize.
16290         (set_current_function_name_declared): Likewise.
16291         (stmts_are_full_exprs_p): Likewise.
16292         (current_function_name_declared): Likewise.
16293         (anon_aggr_type_p): Likewise.
16294         (do_poplevel): Change reference to
16295         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16296         Change reference to stmts_are_full_exprs_p to
16297         current_stmt_tree->stmts_are_full_exprs_p.
16298         (add_tree): Likewise.
16299         (finish_expr_stmt): Likewise.
16300         (prep_stmt): Likewise.
16301         (lang_expand_stmt): Likewise.
16302         (begin_compound_stmt): Change reference to
16303         current_function_name_declared to
16304         cp_function_chain->name_declared and call to
16305         current_function_name_declared().
16306         (setup_vtbl_ptr): Likewise.
16307         (genrtl_do_poplevel): Removed.
16308
16309 2000-06-30  Jason Merrill  <jason@redhat.com>
16310
16311         * init.c (init_init_processing): Go back to aligning like
16312         double_type_node for old ABI.
16313         (get_cookie_size): Make cookie larger if we get a type that needs
16314         more alignment.
16315         (build_vec_delete): Call it.
16316
16317         * typeck.c (qualify_type_recursive): New fn.
16318         (composite_pointer_type): Use it.
16319         (build_binary_op): Use composite_pointer_type.
16320
16321 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
16322             Jason Merrill  <jason@redhat.com>
16323
16324         * typeck.c (check_return_expr): Don't complain about returning
16325         NULL from operator new if -fcheck-new.
16326         * cp-tree.h: Declare flag_check_new here.
16327         * init.c: Not here.
16328
16329 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
16330
16331         * mangle.c (find_substitution): Use same_type_p.
16332         (write_encoding): Don't check for substitutions.
16333
16334 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
16335
16336         * parse.y (expr_no_comma_rangle): New non-terminal.
16337         (template_parm): Use it for default parameter case.
16338         (template_arg): Use it.
16339         (expr_no_commas): Remove commented out undefined extensions.
16340         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16341         * parse.h, parse.c: Rebuilt.
16342
16343 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
16344
16345         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
16346         (finish_asm_stmt): Do it here, instead.
16347
16348         * cp-tree.h (ridpointers): Don't declare.
16349         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
16350         (record_builtin_java_type): Likewise.
16351         (init_decl_processing): Likewise.
16352         * lex.c: Move inclusion of lex.h.
16353         (ridpointers): Don't define.
16354         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
16355         RID_MAX.
16356         * lex.h (enum rid): Rename to ...
16357         (enum cp_rid): ... this.
16358         (ridpointers): Don't declare.
16359         * parse.y: Move inclusion of lex.h.
16360         * parse.c: Regenerated.
16361         * spew.c: Move inclusion of lex.h.
16362
16363         * cp-tree.h (struct language_function): Remove temp_name_counter.
16364         (temp_name_counter): Remove.
16365         (get_temp_name): Change prototype.
16366         (get_guard): New function.
16367         (get_guard_cond): Likewise.
16368         (set_guard): Likewise.
16369         * cvt.c (build_up_reference): Adjust call to get_temp_name.
16370         * decl.c (expand_static_init): Use get_guard and friends to
16371         implement guard variables.
16372         * decl2.c (get_temp_name): Assume that the variables created are
16373         always static.
16374         (get_sentry): Rename to ...
16375         (get_guard): ... this.  Implement new ABI guard variables.
16376         (get_guard_bits): New function.
16377         (get_guard_cond): Likewise.
16378         (set_guard): Likewise.
16379         (start_static_initialization_or_destruction): Use them.
16380         (do_static_initialization): Replace sentry with guard throughout.
16381         (do_static_destruction): Likewise.
16382         * init.c (create_temporary_var): Add comment.
16383
16384 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
16385
16386         * mangle.c (find_substitution): Use same_type_p.
16387         (write_encoding): Don't check for substitutions.
16388
16389 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
16390
16391         * parse.y (expr_no_comma_rangle): New non-terminal.
16392         (template_parm): Use it for default parameter case.
16393         (template_arg): Use it.
16394         (expr_no_commas): Remove commented out undefined extensions.
16395         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16396         * parse.h, parse.c: Rebuilt.
16397
16398 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
16399
16400         * cp-tree.h (flag_const_strings): Remove.
16401         (warn_parentheses): Likewise.
16402         (warn_format): Likewise.
16403         (common_type): Likewise.
16404         (default_conversion): Likewise.
16405         (build_binary_op): Likewise.
16406         (cp_build_binary_op): New macro.
16407         * call.c (build_new_op): Use cp_build_binary_op instead of
16408         build_binary_op.
16409         * class.c (build_vtable_entry_ref): Likewise.
16410         * decl.c (expand_static_init): Likewise.
16411         (compute_array_index_type): Likewise.
16412         (build_enumerator): Likewise.
16413         * decl2.c (delete_sanity): Likewise.
16414         (start_static_initialization_or_destruction): Likewise.
16415         * error.c (dump_type_suffix): Likewise.
16416         * init.c (resolve_offset_ref): Likewise.
16417         (build_new): Likewise.
16418         (build_new_1): Likewise.
16419         (build_vec_delete_1): Likewise.
16420         (build_vec_init): Likewise.
16421         (build_delete): Likewise.
16422         * rtti.c (synthesize_tinfo_fn): Likewise.
16423         (synthesize_tinfo_var): Likewise.
16424         * search.c (expand_upcast_fixups): Likewise.
16425         (fixup_all_virtual_upcast_offsets): Likewise.
16426         * typeck.c (build_array_ref): Likewise.
16427         (get_member_function_from_ptrfunc): Likewise.
16428         (build_binary_op): Add parameter.
16429         (pointer_int_sum): Use cp_build_binary_op.
16430         (pointer_diff): Likewise.
16431         (build_modify_expr): Likewise.
16432         (get_delta_difference): Likewise.
16433         (build_ptrmemfunc): Likewise.
16434
16435 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
16436
16437         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
16438         * decl.c (create_implicit_typedef): Adjust.
16439         * decl2.c (build_artificial_parm): Adjust.
16440         * method.c (implicitly_declare_fn): Adjust.
16441         * pt.c (push_inline_template_parms_recursive): Adjust.
16442         (process_template_parm): Adjust.
16443         (overloaded_template_name): Adjust.
16444         * semantics.c (finish_template_template_parm): Adjust.
16445
16446 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
16447
16448         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
16449         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
16450         where to emit thunks.
16451         (build_vtt): Adjust call to build_vtt_inits.
16452         (build_vtt_inits): Add parameter to indicate whether or not
16453         sub-VTTs for virtual bases should be included.  Adjust handling of
16454         construction vtables.
16455         (get_matching_base): New function.
16456         (dfs_build_vtt_inits): Rename to ...
16457         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
16458         construction vtables.
16459         (dfs_fixup_binfo_vtbls): Likewise.
16460         (build_ctor_vtbl_groups): Build construction vtables for virtual
16461         bases, too.
16462         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
16463         to build construction vtbls.
16464         (dfs_accumulate_vtbl_inits): Adjust handling of
16465         construction vtables.
16466
16467         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
16468         types correctly.
16469
16470 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
16471
16472         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
16473
16474 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
16475
16476         * search.c (hides): Remove.
16477         (is_subobject_of_p): Add most_derived parameter. Use
16478         CANONICAL_BINFO.
16479         (lookup_field_queue_p): Adjust.
16480         (lookup_field_r): Adjust.
16481
16482 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
16483
16484         * decl2.c (handle_class_head): Bash typedefs to the type's main
16485         decl.
16486
16487 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
16488
16489         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
16490         (begin_global_stmt_expr): ... this.
16491         (genrtl_finish_stmt_expr): Rename to ...
16492         (finish_global_stmt_expr): ... this.
16493         * init.c (begin_init_stmts): Adjust calls.
16494         (finish_init_stmts): Likewise.
16495         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
16496         (begin_global_stmt_expr): ... this.
16497         (genrtl_finish_stmt_expr): Rename to ...
16498         (finish_global_stmt_expr): ... this.
16499
16500 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16501
16502         * search.c (lookup_member): Fix typo in comment.
16503
16504 2000-06-24  Jason Merrill  <jason@redhat.com>
16505
16506         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
16507         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
16508
16509 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16510
16511         * parse.y (complex_direct_notype_declarator): Support global_scope.
16512         * Makefile.in: Adjust conflict count.
16513
16514 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16515
16516         * parse.y (template_arg): Convert TEMPLATE_DECL
16517         that is a template template parameter to
16518         TEMPLATE_TEMPLATE_PARM here.
16519
16520         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16521         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
16522         (copy_template_template_parm): Adjust prototype.
16523         * decl.c (grokdeclarator): Remove dead code.
16524         * pt.c (process_template_parm): Tidy.
16525         (lookup_template_class): Construct nodes in
16526         copy_template_template_parm.
16527         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
16528         lookup_template_class.  Use TYPE_TI_TEMPLATE.
16529         * tree.c (copy_template_template_parm): Add NEWARGS
16530         parameter.
16531         (mapcar): Adjust call to copy_template_template_parm.
16532         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
16533         * method.c (build_template_template_parm_names): Change error
16534         code to avoid compilation warning.
16535
16536         * gxxint.texi: Document template template parameter
16537         name mangling.
16538
16539 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
16540
16541         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
16542         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
16543         (cp-demangle.o): New rule.
16544         (dyn-string.o): Likewise.
16545         * inc/cxxabi.h (__cxa_demangle): New declaration.
16546
16547 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
16548
16549         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
16550         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
16551         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
16552         a tree, not an int.
16553         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
16554         (make_thunk): Change prototype.
16555         (emit_thunk): Rename to use_thunk.
16556         (mangle_thunk): Change prototype.
16557         * class.c (get_derived_offset): Simplify.
16558         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
16559         BV_GENERATE_THUNK_WITH_VTABLE_P.
16560         (build_primary_vtable): Simplify.
16561         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
16562         (dfs_find_base): Remove.
16563         (update_vtable_entry_for_fn): Correct bug in finding the base
16564         where a virtual function was first declared.  Figure out whether
16565         or not to emit a vcall-thunk with the vtables in which it appears.
16566         Correct logic for deciding whether to use an ordinary thunk, or a
16567         vcall thunk.
16568         (finish_struct_1): Remove unnecssary code.
16569         (build_vtbl_initializer): Use ssize_int for the running counter of
16570         negative indices.
16571         (build_vtbl_initializer): Only use vcall thunks where necessary.
16572         Mark thunks as needing to be emitted with their vtables, or not.
16573         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
16574         indices.  Use size_binop.
16575         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
16576         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
16577         size_binop.
16578         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
16579         (build_vtable_entry): Mark thunks as needing to be emitted with
16580         their vtables, or not.
16581         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
16582         * decl2.c (mark_vtable_entries): Use use_thunk instead of
16583         emit_thunk.
16584         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
16585         information.
16586         * error.c (dump_expr): Use BV_FN.
16587         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
16588         not an int.
16589         * method.c (make_thunk): Likewise.
16590         (emit_thunk): Rename to use_thunk.  Allow callers to decide
16591         whether or not to actually emit the thunk.  Adjust for changes in
16592         representation of vcall offsets.
16593         * search.c (dfs_get_pure_virtuals): Use BV_FN.
16594         * semantics.c (emit_associated_thunks): New function.
16595         (expand_body): Use it.
16596         * ir.texi: Adjust decriptions of thunks.
16597
16598 2000-06-22  Jason Merrill  <jason@redhat.com>
16599
16600         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
16601         (tsubst_friend_function): Copy it here.
16602
16603         * decl.c (grok_op_properties): Fix typo.
16604
16605         * decl2.c (delete_sanity): Clarify warning, avoid failure on
16606         deleting void*.
16607
16608         * pt.c (check_explicit_specialization): Clarify error.
16609
16610         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
16611         an old OVERLOAD when we're declaring a non-function.
16612         (pushdecl, destroy_local_var): Check for error_mark_node.
16613         (warn_extern_redeclared_static): Also bail early if
16614         we're a CONST_DECL.
16615         (push_overloaded_decl): Ignore an old error_mark_node.
16616
16617 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
16618
16619         * call.c (build_x_va_arg): Check if in a template decl.
16620         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
16621
16622 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16623
16624         * class.c (push_lang_context): TYPE_NAME gets you to the Java
16625         types DECLs.
16626         * decl.c (check_goto): Computed gotos assumed OK.
16627
16628 2000-06-20  Jason Merrill  <jason@redhat.com>
16629
16630         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
16631         for which we don't need to look for instantiations.
16632
16633 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
16634
16635         * parse.y (program): Always call finish_translation_unit.
16636         * parse.c, parse.h: Rebuilt.
16637
16638 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
16639
16640         * method.c: Don't include hard-reg-set.h.
16641
16642 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
16643
16644         * rtti.c (get_base_offset): Cope when vbase field is in a base.
16645
16646 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
16647
16648         * call.c (build_conditional_expr): Use VOID_TYPE_P.
16649         * cvt.c (cp_convert_to_pointer): Likewise.
16650         (convert_to_void): Likewise.
16651         * error.c (dump_expr): Likewise.
16652         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
16653         * init.c (build_delete): Likewise.
16654         * method.c (emit_thunk): Likewise.
16655         * optmize.c (declare_return_variable): Likewise.
16656         * rtti.c (get_tinfo_decl_dynamic): Likewise.
16657         (get_typeid): Likewise.
16658         (build_dynamic_cast_1): Likewise.
16659         * typeck.c (composite_pointer_type): Likewise.
16660         (common_type): Likewise.
16661         (build_indirect_ref): Likewise.
16662         (build_binary_op): Likewise.
16663         (build_x_compound_expr): Likewise.
16664         (check_return_expr): Likewise.
16665         * typeck2.c (add_exception_specifier): Likewise.
16666
16667         * mangle.c (write_method_parms): Use direct comparison for end
16668         of parmlist.
16669
16670 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
16671
16672         * cp-tree.h (genrtl_try_block): Declare function.
16673         (genrtl_handler): Likewise.
16674         (genrtl_catch_block): Likewise.
16675         (genrtl_ctor_stmt): Likewise.
16676         (genrtl_subobject): Likewise.
16677         (genrtl_decl_cleanup): Likewise.
16678         (genrtl_do_poplevel): Likewise.
16679         (genrtl_do_pushlevel): Likewise.
16680         (genrtl_clear_out_block): Likewise.
16681         (genrtl_goto_stmt): Likewise.
16682         (genrtl_expr_stmt): Likewise.
16683         (genrtl_decl_stmt): Likewise.
16684         (genrtl_if_stmt): Likewise.
16685         (genrtl_while_stmt): Likewise.
16686         (genrtl_do_stmt): Likewise.
16687         (genrtl_return_stmt): Likewise.
16688         (genrtl_for_stmt): Likewise.
16689         (genrtl_break_stmt): Likewise.
16690         (genrtl_continue_stmt): Likewise.
16691         (genrtl_scope_stmt): Likewise.
16692         (genrtl_switch_stmt): Likewise.
16693         (genrtl_case_label): Likewise.
16694         (genrtl_begin_compound_stmt): Likewise.
16695         (genrtl_finish_compound_stmt): Likewise.
16696         (genrtl_compound_stmt): Likewise.
16697         (genrtl_asm_stmt): Likewise.
16698         (genrtl_named_return_value): Likewise.
16699         (genrtl_begin_stmt_expr): Likewise.
16700         (genrtl_finish_stmt_expr): Likewise.
16701         (finish_for_stmt): Removed first argument.
16702         (finish_switch_stmt): Likewise.
16703
16704         * semantics.c (genrtl_try_block): Define function.
16705         (genrtl_handler): Likewise.
16706         (genrtl_catch_block): Likewise.
16707         (genrtl_ctor_stmt): Likewise.
16708         (genrtl_subobject): Likewise.
16709         (genrtl_decl_cleanup): Likewise.
16710         (genrtl_do_poplevel): Likewise.
16711         (genrtl_do_pushlevel): Likewise.
16712         (genrtl_clear_out_block): Likewise.
16713         (genrtl_goto_stmt): Likewise.
16714         (genrtl_expr_stmt): Likewise.
16715         (genrtl_decl_stmt): Likewise.
16716         (genrtl_if_stmt): Likewise.
16717         (genrtl_while_stmt): Likewise.
16718         (genrtl_do_stmt): Likewise.
16719         (genrtl_return_stmt): Likewise.
16720         (genrtl_for_stmt): Likewise.
16721         (genrtl_break_stmt): Likewise.
16722         (genrtl_continue_stmt): Likewise.
16723         (genrtl_scope_stmt): Likewise.
16724         (genrtl_switch_stmt): Likewise.
16725         (genrtl_case_label): Likewise.
16726         (genrtl_begin_compound_stmt): Likewise.
16727         (genrtl_finish_compound_stmt): Likewise.
16728         (genrtl_compound_stmt): Likewise.
16729         (genrtl_asm_stmt): Likewise.
16730         (genrtl_named_return_value): Likewise.
16731         (genrtl_begin_stmt_expr): Likewise.
16732         (genrtl_finish_stmt_expr): Likewise.
16733         (finish_for_stmt): Removed first argument and generate rtl
16734         specific code.
16735         (finish_switch_stmt): Likewise.
16736         (do_poplevel): Removed generate rtl specific code.
16737         (do_pushlevel): Likewise.
16738         (add_tree): Likewise.
16739         (finish_goto_stmt): Likewise.
16740         (finish_expr_stmt): Likewise.
16741         (begin_if_stmt): Likewise.
16742         (finish_if_stmt_cond): Likewise.
16743         (finish_then_clause): Likewise.
16744         (begin_else_clause): Likewise.
16745         (finish_else_clause): Likewise.
16746         (finish_if_stmt): Likewise.
16747         (clear_out_block): Likewise.
16748         (begin_while_stmt): Likewise.
16749         (finish_while_stmt_cond): Likewise.
16750         (finish_while_stmt): Likewise.
16751         (begin_do_stmt): Likewise.
16752         (finish_do_body): Likewise.
16753         (finish_do_stmt): Likewise.
16754         (finish_return_stmt): Likewise.
16755         (begin_for_stmt): Likewise.
16756         (finish_for_init_stmt): Likewise.
16757         (finish_for_cond): Likewise.
16758         (finish_for_expr): Likewise.
16759         (finish_break_stmt): Likewise.
16760         (finish_continue_stmt): Likewise.
16761         (begin_switch_stmt): Likewise.
16762         (finish_switch_cond): Likewise.
16763         (finish_case_label): Likewise.
16764         (begin_try_block): Likewise.
16765         (begin_function_try_block): Likewise.
16766         (finish_try_block): Likewise.
16767         (finish_cleanup_try_block): Likewise.
16768         (finish_cleanup): Likewise.
16769         (finish_function_try_block): Likewise.
16770         (finish_handler_sequence): Likewise.
16771         (finish_function_handler_sequence): Likewise.
16772         (begin_handler): Likewise.
16773         (finish_handler_parms): Likewise.
16774         (begin_catch_block): Likewise.
16775         (finish_handler): Likewise.
16776         (begin_compound_stmt): Likewise.
16777         (finish_compound_stmt): Likewise.
16778         (finish_asm_stmt): Likewise.
16779         (finish_label_stmt): Likewise.
16780         (finish_label_decl): Likewise.
16781         (finish_subobject): Likewise.
16782         (finish_decl_cleanup): Likewise.
16783         (finish_named_return_value): Likewise.
16784         (begin_stmt_expr): Likewise.
16785         (finish_stmt_expr): Likewise.
16786
16787         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
16788         to call genrtl_expr_stmt when appropriate.
16789
16790         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
16791         begin_compound_expr to call genrtl_begin_stmt_expr and
16792         genrtl_begin_compound_expr when appropriate.
16793         (finish_init_stmts): Changed calls to finish_compound_expr and
16794         finish_stmt_expr to call genrtl_finish_compound_expr and
16795         genrtl_finish_stmt_expr when appropriate.
16796         (expand_default_init): Changed call to finish_expr_stmt to call
16797         genrtl_expr_stmt when appropriate.
16798         (build_vec_init): Likewise.
16799
16800         * parse.y (simple_stmt): Removed first argument from call to
16801         finish_for_stmt. Removed first argument from call to
16802         finish_switch_stmt.
16803
16804         * parse.c: Regenerated.
16805
16806         * pt.c (tsubst_expr): Removed first argument from call to
16807         finish_for_stmt. Removed first argument from call to
16808         finish_switch_stmt.
16809
16810 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
16811
16812         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
16813         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
16814
16815         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
16816         (cplus_tree_code_length[]): Likewise.
16817         (cplus_tree_code_name[]): Likewise.
16818         (init_parse): Added call to add_c_tree_codes. Changed
16819         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
16820
16821 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
16822
16823         * cp-tree.h (finish_mem_initializers): Declare.
16824         (count_trees): Likewise.
16825         * parse.y (base_init): Use finish_mem_initializers.
16826         * semantics.c (finish_mem_initializers): New function.
16827
16828         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
16829         the number of trees.
16830         (n_trees): Remove.
16831         (count_trees): Don't use it.
16832
16833 2000-06-15  Jason Merrill  <jason@redhat.com>
16834
16835         * tree.c (count_trees): New debugging function.
16836
16837         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
16838         * init.c (build_member_call): Pull out the name of a DECL.
16839
16840         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
16841         * semantics.c (expand_body): Push to TV_INTEGRATION here.
16842         * optimize.c (optimize_function): Not here.
16843         * pt.c (instantiate_decl): Push to TV_PARSE.
16844
16845 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
16846
16847         * cp-tree.h (struct language_function): Remove x_base_init_list
16848         and x_member_init_list.
16849         (current_base_init_list): Remove.
16850         (current_member_init_list): Likewise.
16851         (setup_vtbl_ptr): Change prototype.
16852         (emit_base_init): Likewise.
16853         (expand_member_init): Likewise.
16854         (reinit_parse_for_function): Remove.
16855         * decl.c (save_function_data): Don't clear x_base_init_list and
16856         x_member_init_list.
16857         (mark_language_function): Don't mark them.
16858         * init.c (perform_member_init): Tweak comment.
16859         (sort_member_init): Take the list of initializers as an argument.
16860         (sort_base_init): Likewise.
16861         (emit_base_init): Likewise.
16862         (expand_member_init): Return the initializer.  Don't use global
16863         variables.
16864         * lex.c (reinit_parse_for_function): Remove.
16865         * method.c (build_template_parm_names): Correct substitution.
16866         (do_build_copy_constructor): Don't use current_member_init_list
16867         and current_base_init_list.
16868         (synthesize_method): Likewise.
16869         * parse.y (base_init): Split mem-initializers into
16870         base-initializers and field-initializers.
16871         (member_init_list): Build up the list here.
16872         (member_init): Return the initializer.
16873         (fn.depfn): Don't use reinit_parse_for_function.
16874         * parse.c: Regenerated.
16875         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
16876         ERROR_MARK.
16877         (tsubst_expr): Don't use current_member_init_list
16878         and current_base_init_list.
16879         (tsubst_expr_values): Rename to ...
16880         (tsubst_initializer_list): ... this.  Use convert_from_reference.
16881         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
16882         and current_base_init_list.
16883         (begin_function_definition): Don't call reinit_parse_for_function.
16884
16885         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
16886
16887         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
16888         correctly.
16889
16890         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
16891
16892 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
16893
16894         * cp-tree.h (IF_COND): Move to c-common.h.
16895         (THEN_CLAUSE): Likewise.
16896         (ELSE_CLAUSE): Likewise.
16897         (WHILE_COND): Likewise.
16898         (WHILE_BODY): Likewise.
16899         (DO_COND): Likewise.
16900         (DO_BODY): Likewise.
16901         (RETURN_EXPR): Likewise.
16902         (EXPR_STMT_EXPR): Likewise.
16903         (FOR_INIT_STMT): Likewise.
16904         (FOR_COND): Likewise.
16905         (FOR_EXPR): Likewise.
16906         (FOR_BODY): Likewise.
16907         (SWITCH_COND): Likewise.
16908         (SWITCH_BODY): Likewise.
16909         (CASE_LOW): Likewise.
16910         (CASE_HIGH): Likewise.
16911         (GOTO_DESTINATION): Likewise.
16912         (COMPOUND_BODY): Likewise.
16913         (ASM_CV_QUAL): Likewise.
16914         (ASM_STRING): Likewise.
16915         (ASM_OUTPUTS): Likewise.
16916         (ASM_INPUTS): Likewise.
16917         (ASM_CLOBBERS): Likewise.
16918         (DECL_STMT_DECL): Likewise.
16919         (STMT_EXPR_STMT): Likewise.
16920         (LABEL_STMT_LABEL): Likewise.
16921         (SCOPE_BEGIN_P): Likewise.
16922         (SCOPE_END_P): Likewise.
16923         (SCOPE_STMT_BLOCK): Likewise.
16924         (SCOPE_NULLIFIED_P): Likewise.
16925         (SCOPE_NO_CLEANUPS_P): Likewise.
16926         (SCOPE_PARTIAL_P): Likewise.
16927         (ASM_VOLATILE_P): Likewise.
16928         (STMT_LINENO): Likewise.
16929         (STMT_LINENO_FOR_FN_P): Likewise.
16930
16931         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
16932         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
16933         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
16934         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
16935         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
16936
16937         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
16938
16939         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
16940         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
16941
16942         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
16943         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
16944         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
16945
16946 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
16947
16948         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
16949         * class.c (dfs_find_final_overrider): Set it appropriately.
16950         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
16951         avoid unneeded secondary vptrs.
16952
16953 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
16954
16955         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
16956         (check_bitfield_decl, check_field_decl): Likewise.
16957         (build_vtbl_or_vbase_field, build_base_field): Likewise.
16958         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
16959         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
16960         (xfer_tag, finish_enum): Likewise.
16961         * decl2.c (finish_builtin_type): Likewise.
16962         * init.c (init_init_processing): Likewise.
16963         * pt.c (instantiate_class_template): Likewise.
16964         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
16965         * cp-tree.h (struct lang_type): Add user_align member.
16966         (CLASSTYPE_USER_ALIGN): Define.
16967
16968 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
16969
16970         * Make-lang.in (c++.install-common): Install g++-cross in
16971         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
16972         $(target_alias)-g++ and $(target_alias)-c++.
16973
16974 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
16975
16976         * class.c (vcall_offset_data_s): Add last_init and fns.
16977         (overrides): Rename to same_signature_p.
16978         (dfs_find_final_overrider): Adjust accordingly.
16979         (mark_overriders): Likewise.
16980         (warn_hidden): Likewise.
16981         (build_vtbl_initializer): Reorganize machinery for building things
16982         at negative offsets.
16983         (build_vcall_and_vbase_vtbl_entries): Likewise.
16984         (build_vbase_offset_vtbl_entries): Likewise.
16985         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
16986         offset entries.  Do not create two entries for functions with the
16987         same signature.
16988         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
16989         (build_rtti_vtbl_entries): Reorganize machinery for building things
16990         at negative offsets.
16991
16992         * optimize.c (expand_call_inline): Don't recurse into the code
16993         used to initialize the parameters more than once.
16994
16995 2000-06-11  Mark Mitchell <mark@codesourcery.com>
16996
16997         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
16998         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
16999         (find_substitution): Only use the `Sa' substitution for
17000         std::allocator, not instantiations of it.
17001         (write_template_prefix): Move comment.  Only use a TREE_LIST to
17002         represent substitutions for a member template.
17003         (write_array_type): Mangle array dimensions correctly.
17004         * optimize.c (maybe_clone_body): Copy more information from the
17005         cloned function.
17006         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
17007         on the regenerated declaration.
17008
17009 2000-06-11  Chip Salzenberg  <chip@valinux.com>
17010             Mark Mitchell <mark@codesourcery.com>
17011
17012         * class.c (build_vtable): Clarify comment.
17013         (build_ctor_vtbl_group): Pass the most derived type to
17014         build_vtable.
17015
17016 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17017
17018         * decl2.c (compare_options): Don't needlessly cast away const-ness.
17019
17020 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
17021
17022         * decl.c (add_binding): Handle duplicate declarations of external
17023         variables.
17024
17025 2000-06-09  Chip Salzenberg  <chip@valinux.com>
17026             Mark Mitchell <mark@codesourcery.com>
17027
17028         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
17029         argument.
17030         (write_signed_number): New macro.
17031         (write_unsigned_number): Likewise.
17032         (write_source_name): Use them.
17033         (write_number): Handle signed and unsigned values.
17034         (write_integer_cst): Use tree_int_cst_sgn, and use
17035         write_unsigned_number or write_signed_number as appropriate.
17036         (write_discriminator): Use write_unsigned_number or
17037         write_signed_number as appropriate.
17038         (write_template_arg_literal): Likewise.
17039         (write_array_type): Use tree_low_cst.
17040         (write_template_parm):  Use write_unsigned_number or
17041         write_signed_number as appropriate.
17042         (write_substitution): Adjust call to write_number.
17043         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
17044         (write_expression): Handle non-type template arguments of
17045         reference type correctly.
17046         (mangle_thunk): Use write_signed_number.
17047
17048 2000-06-09  Chip Salzenberg  <chip@valinux.com>
17049
17050         * mangle.c (find_substition): Don't mangle objects with typename
17051         substitutions (e.g. "cin" as "Si").
17052
17053 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
17054
17055         * call.c (add_candidate): Use ggc_alloc_cleared.
17056         * decl.c (lookup_label): Likewise.
17057         * lex.c (retrofit_lang_decl): Likewise.
17058
17059 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
17060
17061         * semantics.c (expand_body): Push to TV_EXPAND.
17062         * optimize.c (optimize_function): Push to TV_INTEGRATION.
17063         * decl.c (start_function): Always call announce_function.
17064
17065         * tinfo2.cc: Just declare abort.
17066
17067 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
17068
17069         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
17070         whenever @ is a symbolic name.
17071
17072 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
17073
17074         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
17075
17076 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
17077
17078         * decl.c (pushdecl): Look up functions by DECL_NAME, not
17079         DECL_ASSEMBLER_NAME.
17080
17081 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
17082
17083         * decl2.c (c_language): Define.
17084
17085 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
17086
17087         * lex.c (lang_init_options): Tweak.
17088
17089         * decl2.c: Remove #inclusion of diagnostic.h
17090         (lang_decode_option): Move diagnostic formatting options to
17091         toplevel.
17092
17093         * lang-options.h: Remove documentation for diagnostic options.
17094
17095         * Makefile.in (lex.o): Depends upon diagnostic.h
17096
17097 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
17098
17099         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
17100         the same DECL_RESULT, it's not a redefinition.
17101         * pt.c (tsubst_decl): Remove code to handle illegal
17102         specializations.
17103
17104 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
17105
17106         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
17107
17108 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
17109
17110         * search.c (maybe_suppress_debug_info): Don't check
17111         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
17112
17113         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
17114         here if extern_p.
17115
17116         Remember instantiation context in deferred instantiations.
17117         * cp-tree.h (struct tinst_level): Remove.
17118         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
17119         * pt.c (current_tinst_level): Now a tree.
17120         (print_template_context, push_tinst_level, pop_tinst_level,
17121         tinst_for_decl): Adjust.
17122         (reopen_tinst_level): New fn.
17123         (init_pt): Register current_tinst_level as a root.
17124         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
17125         of the pending templates list.
17126         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
17127         * lex.c (extract_interface_info): Adjust.
17128         * decl2.c (warn_if_unknown_interface): Adjust.
17129
17130 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
17131
17132         * class.c (indirect_primary_base_p): New function.
17133         (determine_primary_base): Use it.
17134
17135 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
17136
17137         Update new-abi dynamic cast algorithm.
17138         * tinfo.cc (__class_type_info::__dyncast_result): Add
17139         whole_details. Adjust constructor.
17140         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
17141         Avoid unnecessary searching.
17142         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
17143
17144 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17145
17146         * decl.c (init_decl_processing): Don't call record_component_aliases.
17147         * tree.c (build_cplus_array_type_1): Likewise.
17148
17149 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
17150
17151         * ir.texi: Correct typo.
17152         * mangle.c (write_expression): Handle non-type template arguments
17153         with reference type.
17154         * method.c (build_overload_value): Likewise.
17155         * pt.c (convert_nontype_argument): Explicitly represent conversion
17156         to a reference with an ADDR_EXPR.
17157         (unify): Always unify arguments in left-to-right order.
17158
17159 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
17160             Mark Mitchell  <mark@codesourcery.com>
17161
17162         * Make-lang.in (CXX_SRCS): Add mangle.c.
17163         * Makefile.in (CXX_OBJS): Add mangle.o.
17164         (mangle.o): New rule.
17165
17166         * class.c (local_classes): New variable.
17167         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
17168         (get_vtt_name): Use mangle_vtt_name for new ABI.
17169         (init_class_processing): Initialize local_classes.
17170         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
17171         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
17172         (std_identifier): New macro.
17173         (DECL_VOLATILE_MEMFUNC_P): New macro.
17174         (DECL_NAMESPACE_STD_P): Likewise.
17175         (local_classes): Declare.
17176         (get_mostly_instantiated_function_type): Declare.
17177         (init_mangle): Declare.
17178         (mangle_decl): Likewise.
17179         (mangle_type_string): Likewise.
17180         (mangle_type): Likewise.
17181         (mangle_typeinfo_for_type): Likewise.
17182         (mangle_typeinfo_string_for_type): Likewise.
17183         (mangle_vtbl_for_type): Likewise.
17184         (mangle_vtt_for_type): Likewise.
17185         (mangle_ctor_vtbl_for_type): Likewise.
17186         (mangle_thunk): Likewise.
17187         (mangle_conv_op_name_for_type): Likewise.
17188         (mangle_guard_variable): Likewise.
17189         * decl.c (pushtag): Keep track of local classes.
17190         (initialize_predefined_identifiers): Initialize std_identifier.
17191         (init_decl_processing): Use std_identifier.
17192         (start_decl): Don't treat instantiations as specializations.
17193         (grokdeclarator): Likewise.
17194         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
17195         name for fully-instantiated templates.
17196         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
17197         destructors with the new ABI.
17198         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
17199         (grokfield): Use mangle_type for new ABI.
17200         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
17201         (get_sentry): Use mangle_guard_variable for new ABI.
17202         (start_static_initialization_or_destruction): Likewise.
17203         * expr.c (extract_aggr_init): Remove.
17204         (extract_scalar_init): Likewise.
17205         (extract_init): Remove #if 0'd code.
17206         * mangle.c: New function.
17207         * method.c (build_mangled_name): Assert not flag_new_abi.
17208         (build_static_name): Likewise.
17209         (build_decl_overload_real): Likewise.
17210         (build_typename_overload): Likewise.
17211         (build_overload_with_type): Likewise.
17212         (build_overload_name): Likewise.
17213         (get_ctor_vtbl_name): Likewise.
17214         (start_squangling): Likewise.
17215         (get_id_2): Likewise.
17216         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
17217         (init_method): Call init_mangle for new ABI.
17218         (make_thunk): Call mangle_thunk for new ABI.
17219         * operators.def: Correct new ABI manglings for the `%' operator.
17220         Add `::' operator.
17221         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
17222         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
17223         (lookup_template_class): Call mangle_decl for new ABI.
17224         (get_mostly_instantiated_function_type): New function.
17225         (set_mangled_name_for_template_decl): Use it.
17226         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
17227         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
17228         conversion op names.
17229         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
17230         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
17231         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
17232         mangle_typeinfo_string_for_type.
17233
17234 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
17235
17236         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
17237         (INNERMOST_TEMPLATE_ARGS): New macro.
17238         (innermost_args): Remove.
17239         (get_innermost_template_args): New function.
17240         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
17241         * error.c (dump_function_decl): Be caution when using
17242         most_general_template.
17243         * method.c (build_template_parm_names):  Use
17244         INNERMOST_TEMPLATE_ARGS.
17245         * pt.c (add_to_template_args): Tidy comment
17246         (get_innermost_template_args): New function.
17247         (check_explicit_specialization): Clear DECL_INITIAL for a new
17248         specialization.
17249         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
17250         Tidy.
17251         (push_template_decl): Always register specializations of the most
17252         general template.
17253         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
17254         (coerce_template_parms): Likewise.
17255         (lookup_template_class): Likewise.
17256         (innermost_args): Remove.
17257         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
17258         (tsubst_decl): Handle tricky specializations.  Use
17259         get_innermost_template_args.
17260         (instantiate_template): Simplify handling of partial
17261         instantiations.
17262         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
17263         (most_general_template): Reimplement, in a more straightforward
17264         manner.
17265         (regenerate_decl_from_template): Tweak formatting.  Use
17266         TMPL_ARGS_DEPTH for clarity.
17267         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
17268
17269         * dump.c (dequeue_and_dump): Dump information about thunks.
17270
17271 2000-06-01  Richard Henderson  <rth@cygnus.com>
17272
17273         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
17274
17275 2000-06-01  Richard Henderson  <rth@cygnus.com>
17276
17277         * decl2.c (unsupported_options): Fix typo, make const.
17278         (lang_decode_option): Fix bsearch argument order.
17279
17280 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
17281
17282         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
17283         on FIELD_DECLs.
17284
17285 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17286
17287         * cp-tree.h (c_get_alias_set): Deleted.
17288         * Makefile.in (decl.o): Include ../expr.h.
17289         * decl.c (expr.h): Include.
17290         (init_decl_processing): Call record_component_aliases for arrays.
17291         (grokdeclarator): Likewise.
17292         Set TREE_ADDRESSABLE for fields that aren't bitfields.
17293         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
17294
17295 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
17296
17297         Remove guiding declaration support.
17298         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
17299         (flag_guiding_decls): Remove.
17300         * call.c (build_user_type_conversion_1): Remove support for
17301         guiding decls.
17302         (build_new_function_call): Likewise.
17303         (build_new_op): Likewise.
17304         (build_new_method_call): Likewise.
17305         * decl.c (start_function): Likewise.
17306         * friend.c (is_friend): Likewise.
17307         (do_friend): Likewise.
17308         * decl2.c ((flag_dump_translation_unit): Make it const.
17309         (flag_guiding_decls): Remove.
17310         (unsupported_options): New variable
17311         (compare_options): New function.
17312         (lang_decode_option): Use them.
17313
17314         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
17315
17316         * method.c (mangle_expression): Adjust test for legal expression
17317         operators.
17318
17319         * pt.c (instantiate_decl): Save and restore the local
17320         specializations list.
17321
17322 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
17323
17324         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
17325
17326 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
17327
17328         * call.c (add_template_candidate_real): Handle member template
17329         constructors for classes with virtual bases.
17330         (build_user_type_conversion_1): Use in_charge_arg_for_name.
17331         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
17332
17333         * ir.texi: Update thunk documentation.
17334
17335         * call.c (joust): Fix handling of overloaded builtin operators.
17336
17337 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
17338
17339         * cp-tree.h (DECL_ANTICIPATED): New macro.
17340         Document new use of DECL_LANG_FLAG_7.
17341         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
17342         in the user namespace.
17343         * lex.c (do_identifier): If the identifier's declaration has
17344         DECL_ANTICIPATED on, it has not yet been declared.  But do not
17345         replace it with an ordinary implicit declaration.
17346
17347         * tinfo2.cc: Include stdlib.h.
17348
17349 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
17350
17351         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
17352         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
17353         CLASSTYPE_ALIGN.
17354
17355 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
17356
17357         * decl2.c (lang_decode_option): Use skip_leading_substring instead
17358         of plain strncmp.
17359
17360 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
17361
17362         * operators.def (<?): Duplicated, should have been...
17363         (>?): this.  Fixed.
17364
17365 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
17366             Mark Mitchell  <mark@codesourcery.com>
17367
17368         * cp-tree.h (ansi_opname): Make it a macro.
17369         (ansi_assopname): Likewise.
17370         (struct lang_decl_flags): Add assignment_operator_p.
17371         (struct lang_decl): Add operator_code.
17372         (DECL_VTT_PARM): Adjust.
17373         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
17374         overloaded operator.
17375         (SET_OVERLOADED_OPERATOR_CODE): New macro.
17376         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
17377         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
17378         (opname_tab): Remove.
17379         (assignop_tab): Likewise.
17380         (operator_name_info_t): New type.
17381         (operator_name_info): New variable.
17382         (assignment_operator_name_info): Likewise.
17383         (build_cp_library_fn): Remove declaration.
17384         (push_cp_library_fn): Likewise.
17385         (operator_name_string): Likewise.
17386         (build_decl_overload): Likewise.
17387         * call.c (print_z_candidates): Simplify.
17388         (build_object_call): Adjust usage of ansi_opname.  Use
17389         DECL_OVERLOADED_OPERATOR_P.
17390         (op_error): Adjust operator name lookup.
17391         (build_conditional_expr): Adjust usage of ansi_opname.
17392         (build_new_op): Likewise.
17393         (build_op_delete_call): Likewise.
17394         (build_over_call): Likewise.
17395         (joust): Use DECL_OVERLOADED_OPERATOR_P.
17396         * decl.c (duplicate_decls): Copy operator_code.
17397         (init_decl_processing): Adjust parameters to push_cp_library_fn.
17398         (builtin_function): Adjust parameters to build_library_fn_1.
17399         (build_library_fn_1): Accept an overloaded operator code.
17400         (build_library_fn): Pass ERROR_MARK.
17401         (build_cp_library_fn): Accept an overloaded operator code.
17402         (push_cp_library_fn): Likewise.
17403         (grokfndecl): Tweak.
17404         (grokdeclarator): Simplify code to compute names of overloaded
17405         operators.  Adjust use of ansi_opname.
17406         (ambi_op_p): Work on tree_codes, not identifiers.
17407         (unary_op_p): Likewise.
17408         (grok_op_properties): Likewise.
17409         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
17410         (lang_mark_tree): Don't try to mark the operator_code.
17411         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
17412         * error.c (dump_decl): Remove special handling for operator
17413         names.
17414         (dump_function_name): Likewise.
17415         (dump_expr): Adjust name lookup of operators.
17416         (op_to_string): Simplify.
17417         (assop_to_string): Likewise.
17418         * init.c (build_new_1): Adjust use of ansi_opname.
17419         * lex.c (opname_tab): Remove.
17420         (assignop_tab): Likewise.
17421         (ansi_opname): Likewise.
17422         (ansi_assopname): Likewise.
17423         (operator_name_string): Likewise.
17424         (reinit_lang_specific): Likewise.
17425         (operator_name_info): New variable.
17426         (assignment_operator_name_info): Likewise.
17427         (init_operators): New function.
17428         (init_parse): Use it.
17429         (do_identifier): Adjust use of ansi_opname.
17430         * method.c (mangle_expression): Don't use ansi_opname for
17431         mangling.
17432         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
17433         (build_decl_overload): Remove.
17434         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
17435         (do_build_assign_ref): Adjust use of ansi_opname.
17436         (synthesize_method): Likewise.
17437         (implicitly_declare_fn): Likewise.
17438         * operators.def: New file.
17439         * parse.y (operator): Adjust use of ansi_opname.
17440         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
17441         (set_mangled_name_for_template_decl): Don't play games with
17442         current_namespace.
17443         (special_function_p): Adjust use of ansi_opname.
17444         * typeck.c (check_return_expr): Likewise.
17445         * Make-lang.in (cc1plus): Depend on operators.def.
17446         * Makefile.in (lex.o): Likewise.
17447         (decl.o): Likewise.
17448
17449 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
17450
17451         * Make-lang.in (cplib2.ready): Eradicate.
17452
17453 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17454
17455         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
17456         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
17457         (built_min, cp_tree_equal): Likewise.
17458
17459 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
17460
17461         * class.c (layout_nonempty_base_or_field): Replace
17462         `record_layout_info' with `record_layout_info_s'.
17463
17464 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
17465
17466         Fix goto checking.
17467         * cp-tree.h (struct language_function): x_named_labels is now
17468         a struct named_label_list*.
17469         * decl.c (struct named_label_use_list): Renamed from...
17470         (struct named_label_list): ...this.  New struct.
17471         (push_binding_level): Don't set eh_region.
17472         (note_level_for_eh): New fn.
17473         (pop_label): Take label and old value directly.
17474         (pop_labels): Adjust for new named_labels format.
17475         (lookup_label): Likewise.
17476         (poplevel): Note characteristics of a binding level containing a
17477         named label.  Mess with named label lists earlier.
17478         (mark_named_label_lists): New fn.
17479         (mark_lang_function): Call it.
17480         (use_label): New fn, split out from...
17481         (make_label_decl): ...here.  Don't call it.
17482         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
17483         check_previous_gotos): New fns, split out from...
17484         (define_label): ...here.
17485         (check_switch_goto): New fn.
17486         (define_case_label): Call it.
17487         (check_goto): New fn.
17488         * semantics.c (finish_goto_stmt): Call it and use_label.
17489         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
17490         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
17491
17492 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
17493
17494         * class.c (build_vtable_entry_ref): Correct usage of
17495         get_vtbl_decl_for_binfo.
17496
17497         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
17498         * method.c (implicitly_declare_fn): Not here.
17499
17500 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
17501
17502         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
17503         (CPTI_PTMD_DESC_TYPE): ... here.
17504         (ptmd_desc_type_node): Rename to ...
17505         (ptm_desc_type_node): ... here.
17506         * decl.c: Likewise.
17507         * rtti.c (ptmd_initializer): Rename to ...
17508         (ptm_initializer): ... here.
17509         (sythesize_tinfo_var): Adjust. Deal with pointer to member
17510         function.
17511         (create_tinfo_types): Adjust.
17512
17513 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
17514
17515         Finish implementation of VTTs.
17516         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
17517         CPTI_VTT_PARM_IDENTIFIER.
17518         (vtt_parm_identifier): New macro.
17519         (vtt_parm_type): Likewise.
17520         (BINFO_SUBVTT_INDEX): Likewise.
17521         (BINFO_VPTR_INDEX): Likewise.
17522         (struct lang_decl): Add vtt_parm.
17523         (DECL_VTT_PARM): New macro.
17524         (DECL_USE_VTT_PARM): Likewise.
17525         (DECL_NEEDS_VTT_PARM_P): Likewise.
17526         (get_vtt_name): Declare.
17527         (build_artificial_parm): Likewise.
17528         (fixup_all_virtual_upcast_offsets): Likewise.
17529         (expand_indirect_vtbls_init): Remove.
17530         * call.c (build_new_method_call): Pass the vtt to subobject
17531         constructors and destructors.
17532         * class.c (get_vtt_name): Give it external linkage.
17533         (build_clone): Handle the magic VTT parameters for clones.
17534         (clone_function_decl): Fix typo in comment.
17535         (build_vtt): Keep track of the indices in the VTTs where various
17536         entities are stored.
17537         (build_vtt_inits): Likewise.
17538         (dfs_build_vtt_inits): Likewise.
17539         (build_ctor_vtbl_group): Tweak type of construction vtables.
17540         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
17541         primary bases, when building construction vtables.
17542         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
17543         (initialize_predefined_identifiers): Add vtt_parm_identifier.
17544         (init_decl_processing): Initialize vtt_parm_type.
17545         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
17546         (lang_mark_tree): Make vtt_parm.
17547         * decl2.c (build_artificial_parm): New function.
17548         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
17549         (grokclassfn): Use build_artificial_parm.
17550         * init.c (initialize_vtbl_ptrs): Call
17551         fixup_all_virtual_upcast_offsets directly.
17552         (perform_member_init): Use the complete subobject destructor for
17553         member cleanups.
17554         (build_vtbl_address): New function.
17555         (expand_virtual_init): Handle VTTs.
17556         * optimize (maybe_clone_body): Likewise.
17557         * search.c (fixup_all_virtual_upcast_offsets): Give it external
17558         linkage.
17559         (expand_indirect_vtbls_init): Remove.
17560         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
17561         * tree.c (make_binfo): Make them bigger.
17562
17563 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
17564
17565         * inc/cxxabi.h (__pbase_type_info): Define, based on
17566         __pointer_type_info.
17567         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
17568         (__pointer_to_member_type_info): Likewise.
17569         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
17570         (__pointer_to_member_type_info::__is_pointer_p): Remove.
17571         (__pointer_type_info::__do_catch): Rename to ...
17572         (__pbase_type_info::__do_catch): ... here. Adjust.
17573         (__pbase_type_info::__pointer_catch): Implement.
17574         (__pointer_type_info::__pointer_catch): Adjust.
17575         (__pointer_to_member_type_info::__pointer_catch): Adjust.
17576
17577 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
17578
17579         * tinfo.h (__user_type_info::contained_virtual_p): New
17580         predicate.
17581         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
17582         shaped hierarchy.
17583         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
17584         diamond shaped hierarchy. Add early out for mixed diamond and
17585         duplicate shaped hierarchy.
17586
17587 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
17588
17589         * cp-tree.h (build_delete): Change prototype.
17590         (build_vec_delete): Likewise.
17591         * call.c (build_scoped_method_call): Use special_function_kind
17592         values to indicate the kind of destruction to be done.
17593         (build_method_call): Likewise.
17594         * decl.c (finish_destructor_body): Likewise.
17595         (maybe_build_cleanup_1): Likewise.  Rename to ...
17596         (maybe_build_cleanup): ... this.
17597         * decl2.c (delete_sanity): Use special_function_kind
17598         values to indicate the kind of destruction to be done.
17599         (build_cleanup): Likewise.
17600         * init.c (perform_member_init): Likewise.
17601         (build_vec_delete_1): Likewise.
17602         (build_dtor_call): Simplify.
17603         (build_delete): Use special_function_kind
17604         values to indicate the kind of destruction to be done.
17605         (build_vbase_delete): Likewise.
17606         (build_vec_delete): Likewise.
17607
17608         * init.c (sort_member_init): Fix typo in error message generation
17609         code.
17610
17611 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
17612
17613         * semantics.c (begin_class_definition): make the packed
17614         attribute be sensitive to the "-fpack-struct" command line flag
17615
17616 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
17617
17618         Update new-abi upcast algorithm.
17619         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
17620         prototype and meaning of return value.
17621         (__si_class_type_info::__do_upcast): Likewise.
17622         (__vmi_class_type_info::__do_upcast): Likewise.
17623         * tinfo.cc (__class_type_info::__upcast_result): Replace
17624         whole2dst with part2dst. Adjust ctor.
17625         (__class_type_info::__do_upcast): Adjust call of worker function.
17626         (__class_type_info::__do_upcast): Adjust.
17627         (__si_class_type_info::__do_upcast): Adjust. Use parent's
17628         __do_upcast.
17629         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
17630         virtual base in diamond hierarchy bug.
17631
17632 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
17633
17634         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
17635         and bitfield to tinfo_fn_p.
17636         (DECL_TINFO_FN_P): Adjust.
17637         (SET_DECL_TINFO_FN_P): Likewise.
17638         (DECL_MUTABLE_P): Likewise.
17639         (DECL_C_BIT_FIELD): Likewise.
17640         (SET_DECL_C_BIT_FIELD): Likewise.
17641         (CLEAR_DECL_C_BIT_FIELD): Likewise.
17642         (DECL_UNINLINABLE): Likewise.
17643         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
17644         (handle_using_decl): Remove assertion.
17645         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
17646         to build FIELD_DECLs.
17647         (build_base_field): Likewise.
17648         (layout_class_type): Likewise.
17649         * decl.c (init_decl_processing): Likewise.
17650         (build_ptrmemfunc_type): Likewise.
17651         (grokdeclarator): Likewise.
17652         * decl2.c (grok_x_components): Likewise.
17653         * except.c (call_eh_info): Likewise.
17654         * init.c (init_init_processing): Likewise.
17655         * rtti.c (expand_class_desc): Likewise.
17656         (create_pseudo_type_info): Likewise.
17657         (get_vmi_pseudo_type_info): Likewise.
17658         (create_tinfo_types): Likewise.
17659         * ptree.c (print_lang_decl): Adjust.
17660         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
17661         before checking DECL_MUTABLE_P.
17662
17663         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
17664         parameters for template functions.
17665         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
17666         destructors as well as constructors.
17667
17668 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
17669
17670         * class.c (build_ctor_vtbl_group): Set inits.
17671         * optimize.c (maybe_clone_body): Set DECL_INLINE and
17672         DECL_THIS_INLINE appropriately for clones.
17673
17674         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
17675         (DECL_CONV_FN_P): Simplify.
17676         (DECL_OPERATOR): Remove.
17677         (language_to_string): Declare.
17678         * decl.c (duplicate_decls): Fix typo in comment.
17679         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
17680         (grok_op_properties): Use DECL_CONV_FN_P instead of
17681         IDENTIFIER_TYPENAME_P.
17682         * dump.c (dequeue_and_dump): Dump the language linkage of
17683         declarations.
17684         * error.c (language_to_string): Give it external linkage.
17685         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
17686         (implicitly_declare_fn): Set DECL_LANGUAGE.
17687         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
17688         IDENTIFIER_TYPENAME_P.
17689         (tsubst_decl): Likewise.
17690         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
17691         * semantics.c (finish_member_declaration): Don't mark members of
17692         classes declared in an extern "C" region as extern "C".
17693
17694 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17695
17696         * decl2.c (qualified_lookup_using_namespace): Look through
17697         namespace aliases.
17698
17699         * decl.c (push_using_decl): Return the old decl on namespace level.
17700
17701 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
17702
17703         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
17704         (VTT_NAME_PREFIX): New macro.
17705         (CTOR_VTBL_NAME_PREFIX): Likewise.
17706         (get_ctor_vtbl_name): New function.
17707         * class.c (get_vtable_name): Simplify.
17708         (get_vtt_name): New function.
17709         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
17710         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
17711         when a virtual base becomes primary.
17712         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
17713         VTTs.
17714         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
17715         additional parameters.
17716         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
17717         (initialize_array): New function.
17718         (build_vtt): Likewise.
17719         (build_vtt_inits): Likewise.
17720         (dfs_build_vtt_inits): Likewise.
17721         (dfs_fixup_binfo_vtbls): Likewise.
17722         (build_ctor_vtbl_group): Likewise.
17723         (initialize_vtable): Use initialize_array.
17724         (accumulate_vtbl_inits): Reimplement to handle construction
17725         vtables.
17726         (dfs_accumulate_vtbl_inits): Likewise.
17727         (bulid_vtbl_initializer): Adjust parameter name.
17728         * method.c (build_typename_overload): Remove #if 0'd code.
17729         (get_ctor_vtbl_name): New function.
17730         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
17731         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
17732
17733         * cp-tree.h (struct lang_type): Remove search_slot.
17734         (CLASSTYPE_SEARCH_SLOT): Remove.
17735         (emit_base_init): Change prototype.
17736         (initialize_vtbl_ptrs): Likewise.
17737         (expand_indirect_vtbls_init): Likewise.
17738         (clear_search_slots): Remove.
17739         * decl.c (lang_mark_tree): Don't mark search_slot.
17740         * init.c (initialize_vtbl_ptrs): Simplify.
17741         (emit_base_init): Likewise.
17742         * search.c (struct vbase_info): Document decl_ptr.
17743         (convert_pointer_to_single_level): Remove.
17744         (dfs_find_vbases): Remove.
17745         (dfs_init_base_pointers): Simplify.
17746         (dfs_clear_vbase_slots): Remove.
17747         (dfs_vtable_path_unmark): New function.
17748         (init_vbase_pointers): Simplify.
17749         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
17750         (expand_indirect_vtbls_init): Simplify.  Don't call
17751         mark_all_temps_used.
17752         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
17753         initialize_vtbl_ptrs.
17754
17755 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
17756
17757         * except.c: Add static prototypes.
17758
17759 2000-05-20  H.J. Lu  <hjl@gnu.org>
17760
17761         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
17762
17763 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
17764
17765         Don't create a separate copy of virtual bases for the
17766         CLASSTYPE_VBASECLASSES list.
17767         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
17768         (BINFO_FOR_VBASE): Remove.
17769         (CANONICAL_BINFO): Adjust.
17770         (binfo_for_vbase): New function.
17771         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
17772         instead of BINFO_FOR_VBASE.
17773         (build_vbase_pointer): Likewise.
17774         (build_secondary_vtable): Likewise.
17775         (dfs_mark_primary_bases): Likewise.
17776         (mark_primary_bases): Likewise.
17777         (layout_nonempty_base_or_field): Likewise.
17778         (dfs_set_offset_for_shared_vbases): Likewise.
17779         (dfs_set_offset_for_unshared_vbases): Likewise.
17780         (layout_virtual_bases): Likewise.  Adjust for changes to the
17781         CLASSTYPE_VBASECLASSES list.
17782         (dump_class_hierarchy_r): Use binfo_for_vbase
17783         instead of BINFO_FOR_VBASE.
17784         (dump_class_hierarchy): Likewise.
17785         (finish_vtbls): Likewise.
17786         (build_vtbl_initializer): Adjust for changes to the
17787         CLASSTYPE_VBASECLASSES list.
17788         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
17789         * decl.c (finish_destructor_body): Adjust for changes to the
17790         CLASSTYPE_VBASECLASSES list.
17791         * init.c (sort_base_init): Use binfo_for_vbase.
17792         (construct_virtual_bases): Adjust for changes to the
17793         CLASSTYPE_VBASECLASSES list.
17794         (expand_member_init): Use binfo_for_vbase.
17795         (build_vbase_delete):  Adjust for changes to the
17796         CLASSTYPE_VBASECLASSES list.
17797         * method.c (do_build_copy_constructor): Likewise.
17798         * rtti.c (get_base_offset): Use binfo_for_vbase.
17799         (expand_class_desc): Remove #if 0'd code.
17800         * search.c (struct vbase_info): Remove vbase_types.
17801         (get_base_distance):  Use binfo_for_vbase.
17802         (lookup_field_queue_p): Use CANONICAL_BINFO.
17803         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
17804         (get_pure_virtuals): Adjust for changes to the
17805         CLASSTYPE_VBASECLASSES list.
17806         (dfs_find_vbases): Use binfo_for_vbase.
17807         (dfs_init_vbase_pointers): Likewise.
17808         (init_vbase_pointers): Don't initialize vi.vbase_types.
17809         (virtual_context): Use binfo_for_vbase.
17810         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
17811         CLASSTYPE_VBASECLASSES list.
17812         (expand_indirect_vtbls_init): Simplify.
17813         (dfs_get_vbase_types): Don't replicate virtual bases.
17814         (find_vbase_instance): Use binfo_for_vbase.
17815         (binfo_for_vbase): New function.
17816         * typeck.c (get_delta_difference): Use binfo_for_vbase.
17817
17818 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
17819
17820         * decl2.c (finish_anon_union): Generalize error messages to handle
17821         anonymous structures.
17822         * init.c (perform_member_init): Remove `name' parameter.
17823         (build_field_list): New function.
17824         (sort_member_init): Handle anonymous union initialization order
17825         correctly.  Check for multiple initializations of the same union.
17826         (emit_base_init): Don't look up fields by name here.
17827         (expand_member_init): Record the result of name lookup for future
17828         reference.
17829         * typeck.c (build_component_ref): Fix formatting.
17830
17831 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
17832
17833         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
17834         * typeck.c (build_x_compound_expr): Replace warn_unused with
17835         warn_unused_value.
17836
17837         * decl2.c (lang_decode_option): Update -Wall unused flags by
17838         calling set_Wunused.
17839
17840 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
17841
17842         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
17843         * init.c (dfs_vtable_path_unmark): Remove.
17844         * search.c (marked_new_vtable_p): Likewise.
17845         (unmarked_new_vtable_p): Likewise.
17846         (dfs_search_slot_nonempty_p): Likewise.
17847         (dfs_mark): Likewise.
17848         (dfs_vtable_path_unmark): Likewise.
17849         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
17850         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
17851         (dfs_init_vbase_pointers): Remove special-case new ABI code.
17852         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
17853         (init_vbase_pointers): Simplify.
17854         (expand_indirect_vtbls_init): Likewise.
17855
17856         * class.c (copy_virtuals): New function.
17857         (build_primary_table): Use it.
17858         (build_secondary_vtable): Likewise.
17859         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
17860         indicate that no vcall offset is required.
17861         (add_virtual_function): Likewise.
17862         (modify_all_vtables): Likewise.
17863         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
17864         (dfs_accumulate_vtbl_inits): Likewise.
17865         (build_vtbl_initializer): Make changes to handle construction
17866         vtables.
17867         (dfs_build_vcall_offset_vtbl_entries): Likewise.
17868         (build_rtti_vtbl_entries): Likewise.
17869         (build_vtable_entries): Handle a NULL vcall_index.
17870
17871 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
17872
17873         * decl2.c (lang_decode_option): Fix thinko.
17874
17875 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
17876
17877         * except.c (check_handlers): New fn.
17878         * cp-tree.h: Declare it.
17879         * semantics.c (finish_handler_sequence): Call it.
17880         (finish_function_handler_sequence): Likewise.
17881         (finish_handler_parms): Set TREE_TYPE on the handler.
17882         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
17883         * search.c (get_base_distance_recursive): If protect>1, ignore
17884         special access.
17885         (get_base_distance): Don't reduce watch_access.
17886
17887 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
17888
17889         * lex.c: #include diagnostic.h.
17890         (lang_init_options): Set default prefixing rules.
17891
17892         * lang-options.h: Add -fdiagnostics-show-location=.
17893
17894         * decl2.c: #include diagnostic.h.
17895         (lang_decode_option): Handle -fdiagnostics-show-location=.
17896
17897 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
17898
17899         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
17900         * vec.cc: Revert my 2000-05-07 change.
17901
17902 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
17903
17904         * class.c (check_field_decls): Complain about non-static data
17905         members with same name as class in class with constructor.
17906
17907 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
17908
17909         * decl.c (grokdeclarator): Allow non-static data members with
17910         same name as class.
17911
17912 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
17913
17914         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
17915         and pending_inline.filename.  Update prototypes.
17916         * decl.c (define_label): Constify filename parameter.
17917         * decl2.c (warn_if_unknown_interface): Constify local char *.
17918         * input.c Constify input_source.filename. Don't declare
17919         input_filename or lineno.  Constify filename parameter to feed_input.
17920         * lex.c (init_parse): Constify parameter and return value.
17921         (cp_pragma_interface, cp_pragma_implementation): Constify
17922         filename argument.
17923         (reinit_parse_for_method, reinit_parse_for_block,
17924         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
17925         Constify local char *.
17926         * pt.c: Don't declare lineno or input_filename.
17927         (print_template_context, tsubst_friend_function, tsubst_decl,
17928         tsubst, instantiate_decl): Constify local char *.
17929         * semantics.c (expand_body): Constify local char *.
17930         * tree.c (build_srcloc): Constify filename parameter.
17931         * typeck.c (c_expand_asm_operands): Constify filename
17932         parameter.
17933
17934 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
17935
17936         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
17937         offsetof expansion.
17938
17939 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
17940
17941         * inc/cxxabi.h:  Fix typos in comment.
17942         (__base_class_info::__offset): Use a static_cast.
17943
17944 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
17945
17946         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
17947         of std::size_t and std::ptrdiff_t respectively.
17948         * tinfo.cc: Likewise.
17949         * vec.cc: Likewise.
17950
17951 2000-05-06  Richard Henderson  <rth@cygnus.com>
17952
17953         * typeck.c (build_c_cast): Don't warn integer->pointer size
17954         mismatch for constants.
17955
17956 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
17957
17958         * rtti.c (ptmd_initializer): Set non-public, if class is
17959         incomplete.
17960
17961         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
17962         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17963         __cxa_vec_delete): Likewise.
17964         * tinfo.cc (__dynamic_cast): Likewise.
17965         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17966         __cxa_vec_delete): Likewise.
17967
17968 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
17969
17970         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
17971         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
17972         (lang_decl_flags): Add vcall_offset.
17973         (THUNK_VCALL_OFFSET): Use it.
17974         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
17975         * method.c (make_thunk): Create the lang_decl here, not in
17976         emit_thunk.
17977         (emit_thunk): Make generic thunks into ordinary functions once
17978         they have been fed to expand_body.
17979         * semantics.c (expand_body): Set current_function_is_thunk here.
17980
17981 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17982
17983         * class.c (update_vtable_entry_for_fn): Prototype.
17984
17985         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
17986         and `tmpl'.
17987
17988         * search.c (dfs_build_inheritance_graph_order): Prototype.
17989
17990 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
17991
17992         * cp-tree.h (special_function_kind): Add various kinds of
17993         destructors.
17994         (special_function_p): New function.
17995         * class.c (overrides): Don't let one kind of destructor override
17996         another.
17997         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
17998         whether or not to instantiate a template.
17999         * tree.c (special_function_p): Define.
18000
18001 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
18002
18003         * cp-tree.def (THUNK_DECL): Remove.
18004         * cp-tree.h (DECL_THUNK_P): New macro.
18005         (DECL_NON_THUNK_FUNCTION_P): Likewise.
18006         (DECL_EXTERN_C_FUNCTION_P): Likewise.
18007         (SET_DECL_THUNK_P): Likewise.
18008         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
18009         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
18010         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
18011         * decl.c (decls_match): Use DECL_EXTERN_C_P.
18012         (duplicate_decls): Likewise.
18013         (pushdecl): Likewise.  Adjust thunk handling.
18014         (grokfndecl): Use DECL_EXTERN_C_P.
18015         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
18016         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
18017         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
18018         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
18019         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
18020         DECL_NO_STATIC_CHAIN.
18021         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
18022         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
18023         * search.c (covariant_return_p): Remove THUNK_DECL handling.
18024         * ir.texi: Update.
18025
18026 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
18027
18028         * tree.c (walk_tree): Set lineno.
18029
18030 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
18031
18032         * exception.cc: Update license notice.
18033         * new.cc: Likewise.
18034         * new1.cc: Likewise.
18035         * new2.cc: Likewise.
18036         * tinfo.cc: Likewise.
18037         * tinfo2.cc: Likewise.
18038         * vec.cc: Likewise.
18039         * inc/cxxabi.h: Likewise.
18040         * inc/exception: Likewise.
18041         * inc/new: Likewise.
18042         * inc/new.h: Likewise.
18043         * inc/typeinfo: Likewise.
18044
18045 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
18046
18047         * tree.c (build_target_expr_with_type): If we already have a
18048         TARGET_EXPR, just return it.
18049
18050         * optimize.c (initialize_inlined_parameters): Don't generate an
18051         EXPR_STMT if we can just use DECL_INITIAL.
18052         * decl.c (emit_local_var): Only make the initialization a
18053         full-expression if stmts_are_full_exprs_p.
18054
18055 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
18056
18057         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
18058         macro.
18059         * call.c (standard_conversion): Use it.
18060         (direct_reference_binding): Likewise.
18061         (build_over_call): Likewise.
18062         (is_properly_derived_from): Likewise.
18063         (compare_ics): Likewise.
18064         * class.c (resolves_to_fixed_type_p): Likewise.
18065         * optimize.c (declare_return_variable): Likewise.
18066         * pt.c (is_specialization_of): Likewise.
18067         (unify): Likewise.
18068         * typeck.c (comp_target_parms): Likeiwse.
18069         (build_static_cast): Likewise.
18070         (build_reinterpret_cast): Likewise.
18071         (build_const_cast): Likewise.
18072         (comp_ptr_ttypes_real): Likewise.
18073         (comp_ptr_ttypes_const): Likewise.
18074         * typeck2.c (process_init_constructor): Likewise.
18075
18076 2000-04-30  Scott Snyder <snyder@fnal.gov>
18077
18078         * decl.c (finish_destructor_body): Use the base destructor when
18079         destroying virtual bases.
18080
18081 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
18082
18083         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
18084         STMT_EXPRs.
18085         * optimize.c (struct inline_data): Add target_exprs field.
18086         (declare_return_variable): When a function returns an aggregate,
18087         use the variable declared in the TARGET_EXPR as the remapped
18088         DECL_RESULT.
18089         (expand_call_inline): Update the pending target_exprs stack.
18090         (optimize_function): Initialize the stack.
18091
18092         * decl2.c (finish_file): Fix typo in comment.
18093
18094         * method.c (emit_thunk): Don't try to return a `void' value.
18095
18096         * optimize.c (initialize_inlined_parameters): If the parameter is
18097         addressable, we need to make a new VAR_DECL, even if the
18098         initializer is constant.
18099
18100 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
18101
18102         * decl.c (grok_op_properties): Add an extra check of argtypes.
18103
18104 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
18105
18106         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
18107         variables.
18108         (initialize_inlined_parameters): Try to avoid creating new
18109         VAR_DECLs.
18110
18111 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
18112
18113         * lex.c (my_get_run_time): Remove.
18114         (init_filename_times): Use get_run_time instead of my_get_run_time.
18115         (check_newline): Likewise.
18116         (dump_time_statistics): Likewise.
18117         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
18118         of computing elapsed time explicitly.
18119
18120 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
18121
18122         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
18123         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
18124         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
18125         before calling decl_constant_value.
18126         * class.c (check_bitfield_decl): Likewise.
18127         * cvt.c (ocp_convert): Likewise.
18128         (convert): Likewise.
18129         * decl.c (compute_array_index_type): Likewise.
18130         (build_enumerator): Likewise.
18131         * decl2.c (check_cp_case_value): Likewise.
18132         * pt.c (convert_nontype_argument): Likewise.
18133         (tsubst): Likewise.
18134         * typeck.c (decay_conversion): Likewise.
18135         (build_compound_expr): Likewise.
18136         (build_reinterpret_cast): Likewise.
18137         (build_c_cast): Likewise.
18138         (convert_for_assignment): Likewise.
18139
18140 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
18141
18142         * decl.c (finish_function): Don't play games with DECL_INLINE.
18143
18144 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
18145
18146         * ir.texi: Correct typo.
18147
18148 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18149
18150         * decl.c (grokdeclarator): Reject VLAs as members.
18151
18152 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
18153
18154         * call.c (standard_conversion): Accept conversion between
18155         COMPLEX_TYPEs.
18156
18157         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
18158
18159 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
18160
18161         * decl2.c (finish_file): Remove double setup for accounting
18162         compile time.
18163
18164 2000-04-24  Robert Lipe <robertlipe@usa.net>
18165
18166         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
18167
18168 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
18169
18170         * new.cc (set_new_handler): Needs to be in std::.
18171
18172 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
18173
18174         * cp-tree.h (lang_decl): Remove pretty_function_p.
18175         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
18176         language-specific node.
18177         * decl.c (cp_make_fname_decl): Use build_decl, not
18178         build_lang_decl, to build the variables.
18179         (grokvardecl): Don't call build_lang_decl for local variables in
18180         templates.
18181         (grokdeclarator): Don't call build_lang_decl for local type
18182         declarations in templates.
18183         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
18184         zero'd memory, rather than calling memset.
18185         * pt.c: Include hashtab.h.
18186         (local_specializations): New variable.
18187         (retrieve_local_specialization): Use it.
18188         (register_local_specialization): Likewise.
18189         (tsubst_decl): Don't assume local variables have
18190         DECL_LANG_SPECIFIC.
18191         (instantiate_decl): Set up local_specializations.
18192         * Makefile.in (HTAB_H): New variable.
18193
18194 2000-04-23  Richard Henderson  <rth@cygnus.com>
18195
18196         * typeck.c (c_expand_asm_operands): Restore the original
18197         contents of the output list.
18198
18199 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
18200
18201         * ir.texi:  Document complex number representation.
18202
18203 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
18204
18205         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
18206         (target_incomplete_p): New function.
18207         (tinfo_base_init): Create comdat NTBS name variable.
18208         (ptr_initializer): Add non_public parameter. Calculate it.
18209         (ptmd_initializer): Likewise.
18210         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
18211         (create_real_tinfo_var): Add non_public parameter. Use it.
18212         Push proxy into global namespace.
18213         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
18214         New enumeration.
18215         * inc/typeinfo (type_info::before, type_info::operator==):
18216         Compare __name addresses.
18217
18218         * tinfo2.cc: Remove new-abi builtins comment.
18219
18220 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
18221
18222         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
18223
18224         * call.c (joust): Exit early if we get the same function, too.
18225
18226         * decl2.c (key_method): Return NULL_TREE for template classes.
18227         (import_export_class): Don't need to check for template classes.
18228
18229 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
18230
18231         * lex.c: Remove references to cccp.c.
18232
18233 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
18234
18235         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
18236         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
18237         (DECL_DESTRUCTOR_P): Use destructor_attr.
18238         (DECL_CONST_MEMFUNC_P): Reimplement.
18239         (DECL_VOLATILE_MEMFUNC_P): Remove.
18240         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
18241         (overrides): Use DECL_DESTRUCTOR_P.
18242         (check_for_override): Likewise.
18243         * decl.c (start_function): Likewise.
18244         * decl2.c (grokfclassfn): Likewise.
18245         (check_classfn): Likewise.
18246         (grok_function_init): Likewise.
18247
18248 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
18249
18250         * decl2.c (grokfield): Issue error on illegal data member
18251         declaration.
18252
18253 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
18254
18255         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
18256
18257 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
18258
18259         * class.c (build_vtable_entry): Don't build thunks for type-info
18260         functions.
18261
18262 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
18263
18264         * decl.c (decls_match): Allow a redeclaration of a builtin to
18265         specify args while the builtin did not.
18266
18267 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
18268
18269         * cp-tree.def (THUNK_DECL): Add to documentation.
18270         * cp-tree.h (flag_huge_objects): Declare.
18271         * class.c (modify_vtable_entry): Tidy.
18272         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
18273         Calculate delta appropriately for the new ABI.
18274         (dfs_modify_vtables): Use it.
18275         (modify_all_vtables): Fix thinko in code to add overriding copies
18276         of functions to primary vtables.
18277         (build_clone): Fix typo in comment.
18278         (clone_function_decl): Correct order of destructors in vtable.
18279         (build_vbase_offset_vtbl_entries): Adjust comment.
18280         (dfs_vcall_offset_queue_p): Remove.
18281         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
18282         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
18283         (build_vtable_entry): Correct check for pure virtual functions.
18284         Don't declare flag_huge_objects.
18285         * decl.c (flag_huge_objects): Remove declaration.
18286         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
18287         Use int_size_in_bytes.
18288         (emit_thunk): Handle vcall offset thunks.
18289
18290 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18291
18292         * decl2.c (parse_time, varconst_time): Delete declarations.
18293         (finish_file): Delete LINENO declaration.
18294         START_TIME and THIS_TIME now long.
18295
18296 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
18297
18298         * class.c (build_base_field): Reformat comment.
18299
18300         * inc/cxxabi.h (stddef.h): Comment inclusion.
18301         (__base_class_info::__offset): Comment shift.
18302
18303 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
18304
18305         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
18306         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
18307         (cp_push_exception_identifier): New macro.
18308         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
18309         (DECL_BASE_DESTRUCTOR_P): Likewise.
18310         (DECL_DELETING_DESTRUCTOR_P): Likewise.
18311         (get_vtbl_decl_for_binfo): Fix formatting.
18312         (in_charge_arg_for_name): New macro.
18313         (maybe_build_cleanup_and_delete): Remove declaration.
18314         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
18315         (in_charge_arg_for_name): New function.
18316         (build_new_method_call): Use it.  Handle cloned destructors.
18317         (build_clone): Don't make the base constructor virtual.
18318         Automatically defer generated functions.
18319         (clone_function_decl): Handle destructors, too.
18320         (clone_constructors_and_destructors): Likewise.
18321         (create_vtable_ptr): Don't create a vtable entry for a cloned
18322         function.
18323         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
18324         (initialize_predefined_identifiers): Update appropriately.
18325         (finish_destructor_body): Simplify.
18326         (maybe_build_cleanup_and_delete): Remove.
18327         * except.c (expand_throw): Handle new-ABI destructors.
18328         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
18329         (build_dtor_call): New function.
18330         (build_delete): Use it.  Simplify.
18331         * optimize.c (maybe_clone_body): Handle destructors.
18332         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
18333
18334         * exception.cc (cleanup_fn): New typedef.
18335         (CALL_CLEANUP): New macro.
18336         (cp_eh_info): Use them.
18337         (__cp_push_exception): Likewise.
18338         (__cp_pop_exception): Likewise.
18339
18340 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
18341
18342         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
18343         (complete_dtor_identifier): New macro.
18344         (CLASSTYPE_FIRST_CONVERSION): Remove.
18345         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
18346         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
18347         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
18348         (CLASSTYPE_CONSTRUCTORS): Likewise.
18349         (CLASSTYPE_DESTRUCTORS): Likewise.
18350         (lang_decl): Add cloned_function.
18351         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
18352         (DECL_BASE_CONSTRUCTOR_P): Likewise.
18353         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
18354         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
18355         (DECL_CLONED_FUNCTION_P): Likewise.
18356         (DECL_CLONED_FUNCTION): Likewise.
18357         (clone_function_decl): Declare.
18358         (maybe_clone_body): Likewise.
18359         * call.c (build_user_type_conversion_1): Call complete object
18360         constructors in the new ABI.
18361         (build_new_method_call): Don't add in-charge parameters under the
18362         new ABI.
18363         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
18364         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
18365         CLASSTYPE_DESTRUCTOR_SLOT.
18366         (build_clone): New function.
18367         (clone_function_decl): Likewise.
18368         (clone_constructors_and_destructors): Likewise.
18369         (check_bases_and_members): Use it.
18370         * decl.c (iniitialize_predefined_identifiers): Initialize
18371         complete_dtor_identifier.
18372         (finish_function): Don't add extra code to a clone.
18373         (lang_mark_tree): Mark cloned_function.
18374         * decl2.c (mark_used): Don't bother trying to instantiate things
18375         we synthesized.
18376         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
18377         * method.c (set_mangled_name_for_decl): Don't treat clones as
18378         constructors.
18379         (synthesize_method): Sythesize cloned functions, not the clones.
18380         * optimize.c (inline_data): Update comment on ret_label.
18381         (remap_block): Don't assume DECL_INITIAL exists.
18382         (copy_body_r): Allow ret_label to be NULL.
18383         (maybe_clone_body): Define.
18384         * pt.c (tsubst_decl): Handle clones.
18385         (instantiate_clone): New function.
18386         (instantiate_template): Use it.
18387         (set_mangled_name_for_template_decl): Don't treat clones as
18388         constructors.
18389         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
18390         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
18391         * semantics.c (expand_body): Clone function bodies as necessary.
18392
18393         * optimize.c (remap_decl): Avoid sharing structure for arrays
18394         whose size is only known at run-time.
18395         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
18396
18397         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
18398         to has_in_charge_parm_p.
18399         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
18400         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
18401         (DECL_COPY_CONSTRUCTOR_P): New macro.
18402         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
18403         (build_user_type_conversion_1): Likewise.
18404         (convert_like_real): Likewise.
18405         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
18406         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
18407         (copy_args_p): Likewise.
18408         (grok_ctor_properties): Likewise.
18409         (start_function): Likewise.
18410         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
18411         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
18412         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
18413         * method.c (do_build_copy_constructor): Use
18414         DECL_HAS_IN_CHARGE_PARM_P.
18415         (synthesize_method): Likewise.
18416         * pt.c (instantiate_template): Remove goto.
18417         * tree.c (build_cplus_method_type): Remove mention of obstacks in
18418         comment.
18419
18420         * cp-tre.h (finish_function): Change prototype.
18421         * decl.c (end_cleanup_fn): Adjust caller.
18422         (finish_function): Take only one parameter.
18423         * decl2.c (finish_objects): Adjust caller.
18424         (finish_static_storage_duration_function): Likewise.
18425         * method.c (emit_thunk): Likewise.
18426         * parse.y: Likewise.
18427         * parse.c: Regenerated.
18428         * pt.c (instantiate_decl): Likewise.
18429         * rtti.c (synthesize_tinfo_fn): Likewise.
18430         * semantics.c (expand_body): Likewise.
18431
18432         * cp-tree.h (copy_decl): New function.
18433         * class.c (finish_struct_1): Use it.
18434         * lex.c (copy_decl): Define it.
18435         * pt.c (tsubst_decl): Likewise.
18436         * tree.c (copy_template_template_parm): Likewise.
18437
18438         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
18439         has_nonpublic_assign_ref.
18440         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
18441         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
18442         * class.c (finish_struct_methods): Don't set
18443         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
18444         (interface_only): Don't declare.
18445         (interface_unknown): Likewise.
18446
18447 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18448
18449         * tree.h (HAVE_TEMPLATES): Remove definition.
18450         * lang-options.h (-fthis-is-variable): Remove documentation.
18451
18452 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
18453
18454         * class.c (instantiate_type): Handle object-relative template-id.
18455
18456         * semantics.c (finish_expr_stmt): Call convert_to_void here.
18457         * decl.c (cplus_expand_expr_stmt): Not here.
18458
18459         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
18460         Initialize exprtype earlier.
18461
18462         * parse.y (fn.def1): Check for defining types in return types.
18463
18464         * decl.c (check_tag_decl): Notice extra fundamental types.
18465         Diagnose empty decls in classes, too.
18466
18467         * decl.c (grokdeclarator): Don't override an anonymous name if no
18468         declarator was given.
18469
18470         * cvt.c (convert_to_void): Call resolve_offset_ref.
18471
18472         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
18473
18474         * decl2.c (decl_namespace): Handle getting a type.
18475
18476         * typeck.c (build_c_cast): Re-enable warning for cast between
18477         pointer and integer of different size.
18478
18479 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
18480
18481         * inc/cxxabi.h (__pointer_type_info): Add restrict and
18482         incomplete flags.
18483         (__pointer_type_info::__pointer_catch): New virtual function.
18484         (__pointer_to_member_type_info): Derive from
18485         __pointer_type_info. Adjust.
18486         (__pointer_to_member_type_info::__do_catch): Remove.
18487         (__pointer_to_member_type_info::__is_pointer_p): Declare.
18488         (__pointer_to_member_type_info::__pointer_catch): Declare.
18489         * rtti.c (qualifier_flags): Add restrict flag.
18490         (ptmd_initializer): Reorder members.
18491         (create_tinfo_types): Expand comments. Reorder
18492         ptmd_desc_type_node members.
18493         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
18494         Implement.
18495         (__pointer_type_info::__do_catch): Move specific code into
18496         __pointer_catch. Call it.
18497         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
18498         specific catch checking. Fix void conversion check.
18499         (__pointer_to_member_type_info::__do_catch): Remove.
18500         (__pointer_to_member_type_info::__pointer_catch): Implement.
18501
18502 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18503
18504         * lex.c (init_parse): Remove traces of classof and headof.
18505         * decl2.c (flag_operator_names): Default to 1.
18506         (lang_decode_option): Do not set it for -ansi.
18507
18508 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
18509
18510         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
18511         (DECL_MAIN_VARIANT): Remove.
18512         * decl.c (duplicate_decls): Don't set it.
18513         (start_function): Likewise.
18514         (lang_mark_tree): Don't mark it.
18515         * decl2.c (defer_fn): Don't use it.
18516         * lex.c (retrofit_lang_decl): Don't set it.
18517         * pt.c (tsubst_decl): Likewise.
18518         * ptree.c (print_lang_decl): Don't print it.
18519         * typeck.c (mark_addressable): Don't use it.
18520
18521 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
18522
18523         * vec.cc: Include <new> and <exception>.
18524         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
18525         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
18526         terminate.
18527         (__cxa_vec_delete): Catch dtor exceptions.
18528
18529 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
18530
18531         Prepend __ to implementation defined names.
18532         * inc/typeinfo (type_info): Rename _name to __name.
18533         (type_info::type_info): Rename parameter.
18534         (type_info::operator==, type_info::operator!=,
18535         type_info::before): Likewise.
18536         (type_info::is_pointer_p, type_info::is_function_p,
18537         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
18538         parameters.
18539         * inc/cxxabi.h
18540         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
18541         (__pointer_type_info::__pointer_type_info): Likewise.
18542         (__pointer_type_info::is_pointer_p,
18543         __pointer_type_info::do_catch): Prepend __. Rename parameters.
18544         (__array_type_info::__array_type_info): Rename parameters.
18545         (__function_type_info::__function_type_info): Likewise.
18546         (__function_type_info::is_function_p): Prepend __.
18547         (__enum_type_info::__enum_type_info): Rename parameters.
18548         (__pointer_to_member_type_info::__pointer_to_member_type_info):
18549         Likewise.
18550         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
18551         parameters.
18552         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
18553         (__class_type_info::__class_type_info): Rename parameters.
18554         (__class_type_info::sub_kind): Prepend __. Adjust member names.
18555         (__class_type_info::upcast_result,
18556         __class_type_info::dyncast_result): Prepend __. Move definition
18557         into tinfo.cc.
18558         (__class_type_info::do_upcast, __class_type_info::do_catch,
18559         __class_type_info::find_public_src,
18560         __class_type_info::do_dyncast,
18561         __class_type_info::do_find_public_src): Prepend __. Rename
18562         parameters.
18563         (__si_class_type_info::__si_class_type_info): Rename parameters.
18564         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
18565         __si_class_type_info::do_find_public_src): Prepent __. Rename
18566         parameters.
18567         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
18568         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
18569         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
18570         parameters.
18571         (__dynamic_cast): Rename parameters.
18572         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
18573         type_info::do_catch, type_info::do_upcast): Prepend __.
18574         (contained_p, public_p, virtual_p, contained_public_p,
18575         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
18576         (__class_type_info::do_catch,
18577         __class_type_info::do_upcast): Prepend __. Adjust.
18578         (__class_type_info::__upcast_result,
18579         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
18580         Adjust.
18581         (__class_type_info::find_public_src): Prepend __. Adjust.
18582         (__class_type_info::do_find_public_src,
18583         __si_class_type_info::do_find_public_src,
18584         __vmi_class_type_info::do_find_public_src): Likewise.
18585         (__class_type_info::do_dyncast,
18586         __si_class_type_info::do_dyncast,
18587         __vmi_class_type_info::do_dyncast): Likewise.
18588         (__class_type_info::do_upcast,
18589         __si_class_type_info::do_upcast,
18590         __vmi_class_type_info::do_upcast): Likewise.
18591         (__dynamic_cast): Adjust.
18592         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
18593         (__function_type_info::is_function_p): Likewise.
18594         (__pointer_type_info::do_catch): Likewise. Adjust.
18595         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
18596         (__throw_type_match_rtti_2): Adjust.
18597         (__is_pointer): Adjust.
18598
18599 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
18600
18601         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
18602         (complete_ctor_identifier): New macro.
18603         (special_function_kind): Add sfk_copy_constructor and
18604         sfk_assignment_operator.
18605         (LOOKUP_HAS_IN_CHARGE): Remove.
18606         (cons_up_default_function): Rename to ...
18607         (implicitly_declare_fn): ... this.
18608         * call.c (build_new_method_call): Add in-charge parameters for
18609         constructors here.
18610         * class.c (add_implicitly_declared_members): Change parameter name
18611         from cant_have_assignment to cant_have_const_assignment.
18612         Replace calls to cons_up_default_function to implicitly_declare_fn.
18613         * cvt.c (ocp_convert): Use complete_ctor_identifier.
18614         * decl.c (initialize_predefined_identifiers): Initialize it.
18615         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
18616         complex expression.
18617         * init.c (expand_default_init): Don't calculate the in-charge
18618         parameter here.
18619         (build_new_1): Likewise.
18620         * lex.c (cons_up_default_function): Move to method.c.
18621         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
18622         (implicitly_declare_fn): New function.
18623         * typeck.c (build_static_cast): Use complete_ctor_identifier.
18624         (build_modify_expr): Likewise.
18625         * typeck2.c (build_functional_cast): Likewise.
18626
18627         Under the new ABI, constructors don't return `this'.
18628         * cp-tree.h (warn_reorder): Declare.
18629         (special_function_kind): New enum.
18630         (global_base_init_list): Remove declaration.
18631         (emit_base_init): Don't return a value.
18632         (check_base_init): Don't declare.
18633         (is_aggr_typedef): Likewise.
18634         * decl.c (check_special_function_return_type): New function.
18635         (return_types): Remove.
18636         (grokdeclarator): Use check_special_function_return_type.
18637         (start_function): Don't initialize ctor_label under the new ABI.
18638         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
18639         * init.c (begin_init_stmts): Move to top of file.
18640         (finish_init_stmts): Likewise.
18641         (warn_reorder): Don't declare.
18642         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
18643         value.
18644         (check_base_init): Remove.
18645         (is_aggr_typedef): Likewise.
18646         (build_new_1): Don't use the return value of a constructor.
18647         * semantics.c (setup_vtbl_ptr): Don't use the return value
18648         of emit_base_init.
18649         * typeck.c (check_return_expr): Don't magically convert return
18650         statements into `return this' in constructors under the new ABI.
18651
18652         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
18653         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
18654         (base_ctor_identifier): New macro.
18655         (base_dtor_identifier): Likewise.
18656         (deleting_dtor_identifier): Likewise.
18657         * decl.c: Don't include obstack.h.
18658         (obstack_chunk_alloc): Don't define.
18659         (obstack_chunk_free): Likewise.
18660         (struct predefined_identifier): New type.
18661         (initialize_predefined_identifiers): New function.
18662         (init_decl_processing): Use it.
18663         (debug_temp_inits): Remove.
18664         (start_method): Don't call preserve_data.
18665         (hack_incomplete_structures): Update comment.
18666         * init.c (init_init_processing): Don't initialize
18667         nelts_identifier.
18668         (build_offset_rf): Remove dead code.
18669         (build_delete): Use CLASSTYPE_N_BASECLASSES.
18670         * search.c (init_search_processing): Don't initialize
18671         vptr_identifier.
18672
18673 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18674
18675         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
18676         some sign_compare warnings.
18677
18678 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
18679
18680         Rename abi::__vmi_class_type_info members.
18681         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
18682         base_list, detail_masks members to vmi_flags, vmi_base_count,
18683         vmi_bases and vmi_flags_masks respectively.
18684         (__vmi_class_type_info::vmi_flags_masks): Rename
18685         details_unknown_mask to flags_unknown_mask.
18686         * tinfo.cc (__class_type_info::do_upcast): Adjust.
18687         (__vmi_class_type_info::do_find_public_src): Adjust.
18688         (__vmi_class_type_info::do_dyncast): Adjust.
18689         (__vmi_class_type_info::do_upcast): Adjust.
18690
18691 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
18692
18693         * tinfo.cc (convert_to_base): New function.
18694         (get_vbase_offset): Remove. Move into convert_to_base.
18695         (__vmi_class_type_info::do_find_public_src): Adjust.
18696         (__vmi_class_type_info::do_dyncast): Adjust.
18697         (__vmi_class_type_info::do_upcast): Adjust.
18698
18699 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
18700
18701         * tinfo.cc (operator=): Use __builtin_strcmp.
18702         * tinfo2.cc (before): Likewise.
18703
18704 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
18705
18706         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
18707         (DECL_SAVED_INLINE): Rename to ...
18708         (DECL_DEFERRED_FN): ... this.
18709         (in_function_p): Remove declaration.
18710         (mark_inline_for_output): Rename to ...
18711         (defer_fn): ... this.
18712         * decl.c (finish_function): Adjust call to mark_inline_for_output.
18713         (in_function_p): Remove definition.
18714         * decl2.c (saved_inlines): Rename to ...
18715         (deferred_fns): ... this.
18716         (saved_inlines_used): Rename to ...
18717         (deferred_fns_used): ... this.
18718         (mark_inline_for_output): Rename to ...
18719         (defer_fn): ... this.
18720         (finish_file): Adjust accordingly.
18721         (init_decl2): Likewise.
18722         * lex.c (cons_up_default_function): Likewise.
18723         * pt.c (mark_decl_instantiated): Likewise.
18724         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
18725         circumstances.
18726         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
18727         * semantics.c (expand_body): Defer more functions.
18728
18729 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
18730
18731         * vec.cc: New file.
18732         * Make-lang.in (CXX_LIB2FUNCS): Add it.
18733         (vec.o): Build it.
18734         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18735         __cxa_vec_delete): Declare.
18736
18737 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
18738
18739         * rtti.c (dfs_class_hint_mark): New static function.
18740         (dfs_class_hint_unmark): New static function.
18741         (class_hint_flags): Use them.
18742
18743 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
18744
18745         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
18746
18747 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
18748
18749         * cp-tree.h (instantiate_decl): Change prototype.
18750         * decl2.c (mark_used): Adjust call.
18751         * optimize.c (inlinable_function_p): Adjust handling of templates.
18752         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
18753         (do_type_instantiation): Likewise.
18754         (instantiate_decl): Defer more templates.
18755         (instantiate_pending_templates): Adjust logic to handle inline
18756         friend functions.
18757
18758         * Makefile.in (GGC_H): New variable.  Use it throughout in place
18759         of ggc.h.
18760
18761         * call.c: Don't include obstack.h.  Include ggc.h.
18762         (obstack_chunk_alloc): Don't define.
18763         (obstack_chunk_free): Likewise.
18764         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
18765         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
18766         (pop_switch): Free it.
18767
18768         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
18769
18770         * dump.c (dequeue_and_dump): Don't try to print the bit_position
18771         if we don't have a DECL_FIELD_OFFSET.
18772
18773 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
18774
18775         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
18776         special_function_p.
18777
18778 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18779
18780         * cfns.gperf (hash, libc_name_p): Prototype.
18781
18782         * rtti.c (build_dynamic_cast_1): Constification.
18783
18784         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
18785
18786         * semantics.c (deferred_type_access_control): Prototype.
18787
18788 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
18789
18790         Correct many new ABI issues regarding vbase and vcall offset
18791         layout.
18792         * cp-tree.h (BINFO_VTABLE): Document.
18793         (struct lang_type): Tweak formatting.
18794         (BINFO_PRIMARY_BINFO): Add to documentation.
18795         (CLASSTYPE_VSIZE): Fix typo in comment.
18796         (CLASSTYPE_VBASECLASSES): Update documentation.
18797         (BINFO_VBASE_MARKED): Remove.
18798         (SET_BINFO_VBASE_MARKED): Likewise.
18799         (CLEAR_BINFO_VBASE_MARKED): Likewise.
18800         (BINFO_FIELDS_MARKED): Remove.
18801         (SET_BINFO_FIELDS_MARKED): Likewise.
18802         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
18803         (enum access_kind): New enumeration.
18804         (num_extra_vtbl_entries): Remove declaration.
18805         (size_extra_vtbl_entries): Likewise.
18806         (get_vtbl_decl_for_binfo): New function.
18807         (dfs_vbase_unmark): Remove declaration.
18808         (mark_primary_bases): Likewise.
18809         * class.c (SAME_FN): Remove.
18810         (struct vcall_offset_data_s): Move definition.
18811         (build_vbase_pointer): Use `build', not `build_binary_op', to
18812         access the vbase pointer under the new ABI.
18813         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
18814         (build_primary_vtable): Likewise.
18815         (dfs_mark_primary_bases): Move here from search.c.
18816         (mark_primary_bases): Likewise.
18817         (determine_primary_bases): Under the new ABI, don't make a base
18818         class a primary base just because we don't yet have any virtual
18819         functions.
18820         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
18821         (num_vfun_entries): Remove.
18822         (dfs_count_virtuals): Likewise.
18823         (num_extra_vtbl_entries): Likewise.
18824         (size_extra_vtbl_entries): Likewise.
18825         (layout_virtual_bases): Iterate in inheritance graph order under
18826         the new ABI.
18827         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
18828         indicate that a vfield is present.
18829         (init_class_processing): Initialize access_public_node, etc., from
18830         ak_public, etc.
18831         (get_vtbl_decl_for_binfo): New function.
18832         (dump_class_hierarchy_r): Likewise.
18833         (dump_class_hierarchy): Use it.
18834         (finish_vtbls): Build the vtbls in inheritance graph order.
18835         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18836         (initialize_vtable): Use get_vtbl_decl_for_binfo.
18837         (accumulate_vtbl_inits): Add comments explaining why a pre-order
18838         walk is required.
18839         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
18840         where the vptr points, even for primary vtables.
18841         (build_vtbl_initializer): Adjust handling of vbase and vcall
18842         offsets.
18843         (build_vcall_and_vbase_vtable_entries): New function.
18844         (dfs_build_vbase_offset_vtbl_entries): Remove.
18845         (build_vbase_offset_vtbl_entries): Reimplement.
18846         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
18847         were already handled in a primary base class vtable.
18848         (build_vcall_offset_vtbl_entries): Adjust.
18849         (build_rtti_vtbl_entries): Adjust.
18850         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
18851         * init.c (expand_virtual_init): Simplify.
18852         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
18853         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
18854         * search.c (BINFO_ACCESS): New macro.
18855         (SET_BINFO_ACCESS): Likewise.
18856         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
18857         (access_in_type): Likewise.
18858         (dfs_accessible_p): Likewise.
18859         (protected_accessible_p): Likewise.
18860         (lookup_fnfields_1): Adjust documentation.
18861         (dfs_mark_primary_bases): Move to class.c
18862         (mark_primary_bases): Likewise.
18863         (dfs_vbase_unmark): Remove.
18864         (virtual_context): Use BINFO_FOR_VBASE.
18865         (dfs_get_vbase_types): Simplify.
18866         (dfs_build_inheritance_graph_order): New function.
18867         (get_vbase_types): Use it.
18868         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
18869
18870         * tinfo.cc (get_vbase_offset): New function.
18871         (__vmi_class_type_info::do_find_public_src): Use it.
18872         (__vmi_class_type_info::do_dyncast): Likewise.
18873         (__vmi_class_type_info::do_upcast): Likewise.
18874
18875 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
18876
18877         * lang-specs.h: Pass -fno-show-column to the preprocessor.
18878
18879 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
18880
18881         * rtti.c (class_hint_flags): Rename flags.
18882         (class_initializer): Remove flags.
18883         (synthesize_tinfo_var): Combine offset and flags. Add flags
18884         for __vmi_class_type_info.
18885         (create_tinfo_types): Remove flags from __class_type_info and
18886         __si_class_type_info. Merge flags and offset from
18887         base_class_type_info.
18888         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
18889         (__base_class_info::is_virtual_p): Adjust.
18890         (__base_class_info::is_public_p): Adjust.
18891         (__base_class_info::offset): New accessor.
18892         (__class_type_info::details): Remove member.
18893         (__class_type_info::__class_type_info): Lose details.
18894         (__class_type_info::detail_masks): Remove.
18895         (__si_class_type_info::__si_class_type_info): Lose details.
18896         (__vmi_class_type_info::details): New member.
18897         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
18898         (__vmi_class_type_info::detail_masks): New member.
18899         * tinfo.cc (__class_type_info::do_upcast): Initialize result
18900         with unknown_details_mask.
18901         (__vmi_class_type_info::do_find_public_src): Adjust
18902         (__vmi_class_type_info::do_dyncast): Adjust.
18903         (__vmi_class_type_info::do_upcast): Set result details, if
18904         needed. Adjust.
18905         (__dynamic_cast): Temporarily #if out optimization.
18906
18907 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
18908
18909         * rtti.c (get_tinfo_decl): Mark used.
18910         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
18911         mark as dealt with, if we output it.
18912
18913 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
18914
18915         * class.c: Reorganize to put virtual function table initialization
18916         machinery at the end of the file.
18917
18918 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
18919
18920         * class.c (finish_struct): Use bitsize_zero_node.
18921         * pt.c (instantiate_class_template): Likewise.
18922
18923 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
18924
18925         Put RTTI entries at negative offsets in new ABI.
18926         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
18927         vbase offset at index -3, not -1.
18928         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
18929         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
18930         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
18931         (build_rtti_vtbl_entries): New function.
18932         (set_rtti_entry): Remove.
18933         (build_primary_vtable): Don't use it.
18934         (build_secondary_vtable): Likewise.
18935         (start_vtable): Remove.
18936         (first_vfun_index): New function.
18937         (set_vindex): Likewise.
18938         (add_virtual_function): Don't call start_vtable.  Do call
18939         set_vindex.
18940         (set_primary_base): Rename parameter.
18941         (determine_primary_base): Likewise.
18942         (num_vfun_entries): Don't use skip_rtti_stuff.
18943         (num_extra_vtbl_entries): Include RTTI information.
18944         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
18945         (skip_rtti_stuff): Remove.
18946         (dfs_modify_vtables): Don't use it.
18947         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
18948         (layout_nonempty_base_or_field): Update size handling.
18949         (create_vtable_ptr): Tweak.
18950         (layout_class_type): Adjust parameter names.
18951         (finish_struct_1): Simplify.
18952         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
18953         (skip_rtti_stuff): Remove.
18954         (first_vfun_index): New function.
18955         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18956         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
18957         (marked_vtable_pathp): Declare.
18958         (unmarked_vtable_pathp): Likewise.
18959         * error.c (dump_expr): Use first_vfun_index to calculate vtable
18960         offsets.
18961         * rtti.c (build_headof): Look for RTTI at negative offsets.
18962         (get_tinfo_decl_dynamic): Likewise.
18963         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
18964         here.
18965         (create_pseudo_type_info): Do it here instead.  Adjust so that
18966         vptr points at first virtual function.
18967         * search.c (marked_vtable_pathp): Make it global.
18968         (unmarked_vtable_pathp): Likewise.
18969         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18970         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
18971         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
18972         (get_pure_virtuals): Likewise.
18973         (expand_upcast_fixups): Likewise.
18974         * tree.c (debug_binfo): Likewise.
18975         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
18976         negative offset.
18977
18978 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18979
18980         * class.c (check_field_decl): Fix typo.
18981         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
18982         (check_methods): Likewise.
18983         (check_field_decls): Likewise.
18984         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
18985         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
18986         Use DECL_RESULT_FLD, not DECL_RESULT.
18987         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
18988         * lex.c (identifier_type): Likewise.
18989         * pt.c (determine_specialization, lookup_template_class): Likewise.
18990         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
18991         (resolve_overloaded_unification, more_specialized): Likewise.
18992         * semantics.c (finish_member_declaration): Likewise.
18993         * typeck.c (build_x_function_call): Likewise.
18994
18995 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
18996
18997         * class.c (layout_empty_base): Handle empty bases with non-byte
18998         alignment.
18999         (build_base_field): Likewise.
19000         (layout_virtual_bases): Likewise.
19001
19002         * class.c (finish_struct_1): Fix typo in this change:
19003
19004         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19005
19006 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
19007
19008         * decl.c (grokdeclarator): Count partial specializations when
19009         keeping track of how many template classes have been seen.
19010
19011         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
19012
19013 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19014
19015         * class.c (build_vbase_pointer_fields): layout_field now place_field.
19016         (get_vfield_offset): Use byte_position.
19017         (set_rtti_entry): Set OFFSET to ssizetype zero.
19018         (get_binfo_offset_as_int): Deleted.
19019         (dfs_record_base_offsets): Use tree_low_cst.
19020         (dfs_search_base_offsets): Likewise.
19021         (layout_nonempty_base_or_field): Reflect changes in RLI format
19022         and call byte_position.
19023         (layout_empty_base): Convert offset to ssizetype.
19024         (build_base_field): use rli_size_unit_so_far.
19025         (dfs_propagate_binfo_offsets): Do computation in proper type.
19026         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
19027         (layout_class_type): Reflect changes in RLI names and fields.
19028         (finish_struct_1): Set DECL_FIELD_OFFSET.
19029         * dump.c (dequeue_and_dump): Call bit_position.
19030         * expr.c (cplus_expand_constant): Use byte_position.
19031         * rtti.c (expand_class_desc): Use bitsize_one_node.
19032         * typeck.c (build_component_addr): Use byte_position and don't
19033         special case for zero offset.
19034
19035 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
19036
19037         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
19038
19039         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
19040         tinfo object.
19041         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
19042         vtable.
19043
19044 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19045
19046         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
19047         DECL_P macros.
19048         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
19049         make_typename_type, check_initializer, cp_finish_decl,
19050         xref_tag): Likewise.
19051         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
19052         decl_namespace, arg_assoc_template_arg, arg_assoc,
19053         validate_nonmember_using_decl, do_class_using_decl): Likewise.
19054         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
19055         args_to_string): Likewise.
19056         * friend.c (is_friend): Likewise.
19057         * lex.c (note_got_semicolon, note_list_got_semicolon,
19058         is_global): Likewise.
19059         * method.c (build_overload_nested_name, build_overload_value,
19060         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
19061         * parse.y (typename_sub, typename_sub1): Likewise.
19062         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
19063         process_partial_specialization, convert_template_argument,
19064         template_args_equal, add_pending_template, lookup_template_class,
19065         for_each_template_parm_r, maybe_fold_nontype_arg,
19066         tsubst, instantiate_template, type_unification_real, unify,
19067         instantiate_pending_templates, set_mangled_name_for_template_decl):
19068         Likewise.
19069         * repo.c (repo_get_id, repo_template_used): Likewise.
19070         * search.c (lookup_field_1): Likewise.
19071         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
19072         * xref.c (classname): Likewise.
19073
19074 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
19075
19076         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
19077         (CANONICAL_BINFO): New macro.
19078         (BINFO_NEW_VTABLE_MARKED): Use it.
19079         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
19080         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
19081         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
19082         not TREE_TYPE.
19083         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19084         (build_secondary_vtable): Likewise.
19085         (dfs_finish_vtbls): Likewise.
19086         (dfs_accumulate_vtbl_inits): Likewise.
19087         (accumulate_vtbl_inits): New function.
19088         (finish_vtbls): Make sure that virtual bases come after
19089         non-virtual bases in the vtable group.
19090         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
19091         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19092         * search.c (struct vbase_info): Move definition.
19093         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19094         (unmarked_new_vtable_p): Likewise.
19095         (dfs_mark_vtable_path): Remove.
19096         (dfs_mark_new_vtable): Remove.
19097         (dfs_unmark_new_vtable): Likewise.
19098         (dfs_clear_search_slot): Likewise.
19099         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
19100         (dfs_clear_vbase_slots): Likewise.
19101         (init_vbase_pointers): LIkewise.
19102
19103 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
19104
19105         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
19106         SIZETYPE to a non-SIZETYPE.
19107
19108 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
19109
19110         * class.c (layout_virtual_bases): Adjust names in conditionally
19111         compiled code.
19112
19113         * class.c (record_base_offsets): New function.
19114         (layout_conflict_p): Likewise.
19115         (layout_nonempty_base_or_field): Use it.
19116         (layout_empty_base): New function.
19117         (build_base_field): Use it.
19118         (build_base_fields): Update comment.
19119         (layout_virtual_bases): Fold in a little code form
19120         layout_basetypes.  Use layout_empty_base.
19121         (layout_basetypes): Remove.
19122         (end_of_class): New function.
19123         (layout_class_type): Use it.  Adjust.
19124
19125         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
19126         (fntype_p): Remove.
19127         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
19128         comment.
19129         (dfs_skip_nonprimary_vbases_markedp): Likewise.
19130         * typeck.c (fntype_p): Remove.
19131
19132         * cp-tree.h (TI_SPEC_INFO): Remove.
19133         (CLASSTYPE_TI_SPEC_INFO): Likewise.
19134         * pt.c (process_partial_specialization): Likewise.
19135
19136         * class.c (build_base_field): Fix thinko in computation of binfo
19137         offsets.
19138
19139         * tree.c (mark_local_for_remap_p): Mark variables declared in
19140         TARGET_EXPRs as well.
19141
19142 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
19143
19144         * typeck.c (require_complete_type, complete_type,
19145         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
19146         build_array_ref, convert_arguments, pointer_diff,
19147         build_x_unary_op, build_unary_op, build_c_cast,
19148         build_modify_expr): Use COMPLETE_TYPE_P etc.
19149         * call.c (is_complete, convert_like_real,
19150         build_new_method_call): Likewise.
19151         * class.c (build_vbase_pointer_fields, check_bases,
19152         build_base_field, finish_struct_1, pushclass): Likewise.
19153         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
19154         * decl.c (maybe_process_template_type_declaration, pushtag,
19155         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
19156         layout_var_decl, check_initializer, cp_finish_decl,
19157         grokdeclarator, require_complete_types_for_parms,
19158         grok_op_properties, xref_tag, xref_basetypes,
19159         check_function_type): Likewise.
19160         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
19161         * friend.c (do_friend): Likewise.
19162         * init.c (build_offset_ref): Likewise.
19163         * parse.y (structsp): Likewise.
19164         * pt.c (maybe_process_partial_specialization,
19165         tsubst_friend_function, instantiate_class_template, tsubst,
19166         do_type_instantiation, instantiate_pending_templates): Likewise.
19167         * repo.c (repo_get_id): Likewise.
19168         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
19169         synthesize_tinfo_var, emit_support_tinfos): Likewise.
19170         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
19171         * semantics.c (begin_class_definition): Likewise.
19172         * tree.c (build_cplus_method_type): Likewise.
19173         * typeck2.c (digest_init, build_functional_cast,
19174         add_exception_specifier): Likewise.
19175         * parse.h, parse.c: Regenerated.
19176
19177 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
19178
19179         * inc/cxxabi.h: New header file. Define new-abi entry points.
19180         (__pointer_type_info::target): Rename member to ...
19181         (__pointer_type_info::type): ... here.
19182         (__base_class_info::type): Rename member to ...
19183         (__base_class_info::base): ... here.
19184         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
19185         * cp-tree.h (CPTI_ABI): New global tree enumeration.
19186         (abi_node): New global tree node.
19187         * decl.c (abi_node): Document.
19188         (init_decl_processing): Initialize abi_node.
19189         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
19190         (get_vmi_pseudo_type_info): Likewise.
19191         (create_tinfo_types): Likewise.
19192         (emit_support_tinfos): Likewise.
19193         * tinfo.h (cxxabi.h): Include for new-abi.
19194         Move rtti class definitions to new header file.
19195         * tinfo.cc (abi): Use the namespace.
19196         (std): Move new abi rtti classes from here ...
19197         (__cxxabiv1): ... to here.
19198         * tinfo2.cc (cxxabi.h): Include for new-abi.
19199         Move rtti class definitions to new header file.
19200         (std): Move new abi rtti classes from here ...
19201         (__cxxabiv1): ... to here.
19202         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
19203         namespace.
19204
19205 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
19206             Jason Merrill  <jason@casey.cygnus.com>
19207
19208         * method.c (build_overload_int): Use host_integerp.
19209
19210 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19211
19212         * init.c (build_offset_ref): Handle the case of a templated member
19213         function.
19214
19215 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19216
19217         * except.c (expand_exception_blocks): Clear catch_clauses_last.
19218
19219 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
19220
19221         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
19222         * class.c (check_bitfield_decl): Turn illegal bitfields into
19223         non-bitfields.
19224         (dfs_propagate_binfo_offsets): Adjust for new size_binop
19225         semantics.
19226         (dfs_offset_for_unshared_vbases): Likewise.
19227         * cvt.c (cp_convert_to_pointer): Convert NULL to a
19228         pointer-to-member correctly under the new ABI.
19229         * expr.c (cplus_expand_constant): Don't use cp_convert when
19230         turning an offset into a pointer-to-member.
19231         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
19232         when dereferencing them under the new ABI.
19233         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
19234         of pointers-to-members under the new ABI.
19235
19236         * class.c (check_bitfield_decl): Remove restriction on really long
19237         bitfields.
19238         (layout_class_type): Implement new ABI handling of bitfields
19239         longer than their types.
19240
19241 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19242
19243         * parse.y (extdefs): Call ggc_collect.
19244         * parse.c: Regenerated.
19245
19246 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
19247
19248         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
19249         (note_name_declared_in_class): Use OVL_CURRENT to get at a
19250         potential overload.
19251
19252 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19253
19254         * class.c (build_vbase_path): Use integer_zerop.
19255         (build_vtable_entry): Use tree_low_cst.
19256         (get_vfield_offset): Use bit_position.
19257         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
19258         Use tree_low_cst.
19259         (check_bitfield_decl): Set DECL_SIZE using convert.
19260         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
19261         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
19262         Use tree_low_cst.
19263         (finish_struct_1): Use bit_position.
19264         (dump_class_hierarchy): Use tree_low_cst.
19265         * cp-tree.h (min_precision): Add declaration.
19266         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
19267         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
19268         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
19269         * expr.c (cplus_expand_constant): Use bit_position.
19270         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
19271         * rtti.c (get_base_offset): Use bit_position.
19272         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
19273         host_integerp, and tree_low_cst.
19274         (pointer_int_sum): Use integer_zerop.
19275         (build_component_addr): Use bit_position.
19276
19277 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
19278
19279         * typeck.c (require_complete_type): Don't assume size_zero_node.
19280         (complete_type_or_else): Likewise.
19281
19282 2000-03-16  Steven Grady <grady@digitaldeck.com>
19283             Jason Merrill  <jason@casey.cygnus.com>
19284
19285         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
19286
19287 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
19288
19289         * decl2.c (grokfield): Bail out if type is error_mark_node.
19290
19291 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19292
19293         * tinfo2.cc (__ptr_to_member_data): Rename to ...
19294         (__pointer_to_member_data): ... here. Adjust.
19295         * rtti.c (create_tinfo_types): Adjust.
19296
19297 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19298
19299         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
19300         * decl.c (ref_desc_type_node): Undocument.
19301         * rtti.c (ptr_ref_initializer): Rename to ...
19302         (ptr_initializer): ... here. Adjust comments.
19303         (ptmd_initializer): Fix comment thinko.
19304         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
19305         (create_tinfo_types): Remove ref_desc_type_node init.
19306         * tinfo2.cc (__reference_type_info): Remove.
19307
19308 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19309
19310         * decl.c (cp_finish_decl): Remove obsolete comment.
19311
19312         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
19313
19314 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
19315
19316         * cp-tree.h: Tweak documentation.
19317         * class.c (build_vbase_pointer_fields): Layout the fields, too.
19318         (avoid_overlap): Remove.
19319         (get_binfo_offset_as_int): New function.
19320         (dfs_serach_base_offsets): Likewise.
19321         (layout_nonempty_base_or_field): Likewise.
19322         (build_base_field): Layout fields here.  Avoid placing two objects
19323         of the same type at the same address, under the new ABI.
19324         (build_base_fields): Adjust accordingly.
19325         (create_vtable_ptr): Return the new field, but don't attach it to
19326         TYPE_FIELDS.
19327         (remove_base_field): Remove.
19328         (remove_base_fields): Remove.
19329         (layout_basetypes): Adjust accordingly.
19330         (layout_class_type): Call layout_field for each field, rather than
19331         just making a wholesale call to layout_type.
19332
19333 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
19334
19335         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
19336
19337 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
19338
19339         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
19340
19341         * except.c (dtor_nothrow): New fn.
19342         (do_pop_exception): Use it.  Take type parm.
19343         (push_eh_cleanup): Take type parm.
19344         (expand_start_catch_block): Pass it.
19345         (build_eh_type_type_ref): Accept null type.
19346
19347 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
19348
19349         * cp-tree.h (revert_static_member_fn): Change prototype.
19350         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
19351         (grok_op_properties): Likewise.
19352         (start_function): Likewise.
19353         (revert_static_member_fn): Simplify.
19354         * pt.c (check_explicit_specialization): Adjust call to
19355         revert_static_member_fn.
19356
19357 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
19358
19359         * cp-tree.h (scope_kind): New type.
19360         (tmpl_spec_kind): Likewise.
19361         (declare_pseudo_global_level): Remove.
19362         (pseudo_global_level_p): Rename to template_parm_scope_p.
19363         (pushlevel): Remove declaration.
19364         (begin_scope): New function.
19365         (finish_scope): Likewise.
19366         (current_tmpl_spec_kind): Likewise.
19367         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
19368         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
19369         Add template_spec_p.
19370         (toplevel_bindings_p): Adjust.
19371         (declare_pseudo_global_level): Remove.
19372         (pseudo_global_level_p): Rename to template_parm_scope_p.
19373         (current_tmpl_spec_kind): New function.
19374         (begin_scope): Likewise.
19375         (finish_scope): Likewise.
19376         (maybe_push_to_top_level): Adjust.
19377         (maybe_process_template_type_declaration): Likewise.
19378         (pushtag): Likewise.
19379         (pushdecl_nonclass_level): Likewise.
19380         (lookup_tag): Likewise.
19381         (grokfndecl): Handle member template specializations.  Share
19382         constructor and non-constructor code.
19383         * decl2.c (check_classfn): Handle member template specializations.
19384         * pt.c (begin_template_parm_list): Use begin_scope.
19385         (begin_specialization): Likewise.
19386         (end_specialization): Likewise.
19387         (check_explicit_specialization): Use current_tmpl_spec_kind.
19388         Handle member template specializations.
19389         (end_template_decl): Use finish_scope.  Remove call to
19390         get_pending_sizes.
19391         (push_template_decl_real): Remove bogus error message.
19392         (tsubst_decl): Fix typo in code contained in comment.
19393         (instantiate_template): Handle member template specializations.
19394         (most_general_template): Likewise.
19395
19396 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
19397
19398         * lex.c (whitespace_cr): Compress consecutive calls to warning().
19399         (do_identifier): Ditto for error().
19400
19401         * pt.c (convert_nontype_argument): Ditto for cp_error().
19402         (convert_template_argument): Ditto for cp_pedwarn().
19403
19404 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
19405
19406         * exception.cc (__check_null_eh_spec): New fn.
19407         * except.c (expand_end_eh_spec): Call it if the spec is throw().
19408
19409 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
19410
19411         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
19412         * except.c (expand_end_eh_spec): Add the return type.
19413         * rtti.c (throw_bad_cast): Add the parmtypes.
19414         (throw_bad_typeid): Likewise.
19415
19416         * semantics.c (expand_stmt): Only leave out rtl for unused
19417         artificials, and set DECL_IGNORED_P on them as well.
19418         * decl.c (wrapup_globals_for_namespace): Likewise.
19419
19420 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
19421
19422         * decl.c (maybe_commonize_var): Skip all artificial decls.
19423         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
19424
19425 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
19426
19427         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
19428         * cp-tree.h: Declare flag_enforce_eh_specs.
19429         * decl.c (store_parm_decls, finish_function): Check it.
19430
19431         C library functions don't throw.
19432         * Makefile.in (cfns.h): New target.
19433         (except.o): Depend on it.
19434         * Make-lang.in (cc1plus): Depend on cfns.gperf.
19435         * cfns.gperf: New file.
19436         * cfns.h: Generated.
19437         * except.c: Include it.
19438         (nothrow_libfn_p): New fn.
19439         * decl.c (grokfndecl): Use it.
19440         * cp-tree.h: Declare it.
19441
19442         * decl.c (push_overloaded_decl_1, auto_function,
19443         define_function): Lose.
19444         (build_library_fn_1): New static fn.
19445         (builtin_function): Use it.
19446         (get_atexit_node): Use build_library_fn_ptr.
19447         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
19448         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
19449         push_void_library_fn, push_throw_library_fn): New fns.
19450         * cp-tree.h: Declare them.
19451         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
19452         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
19453         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
19454         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
19455         * rtti.c (build_runtime_decl): Lose.
19456         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
19457         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
19458         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
19459
19460         * call.c (build_call): Remove result_type parm.
19461         Call mark_used on unused artificial fns.
19462         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
19463
19464 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
19465
19466         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
19467         appropriate.
19468         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
19469         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
19470         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
19471         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
19472         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
19473         expand_generic_desc): Likewise.
19474
19475 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19476
19477         * exception.cc (__cp_pop_exception): Cleanup the original object.
19478
19479 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19480
19481         * decl.c (grok_op_properties): Merge conversion to void warning
19482         with other silly op warnings.
19483
19484 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
19485
19486         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
19487         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
19488
19489 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19490
19491         * decl.c (cp_make_fname_decl): New function.
19492         (wrapup_globals_for_namespace): Don't emit unused static vars.
19493         (init_decl_processing): Remove comment about use of
19494         array_domain_type. Set make_fname_decl.
19495         (cp_finish_decl): Remove __FUNCTION__ nadgering.
19496         * semantics.c (begin_compound_stmt): Remove
19497         current_function_name_declared flagging.
19498         (expand_stmt): Don't emit unused local statics.
19499         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
19500         specially.
19501
19502 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19503
19504         * typeck.c (convert_for_assignment): Don't look at array
19505         initializer.
19506         * call.c (convert_like_real): Likewise.
19507
19508 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
19509
19510         Add initial support for '\uNNNN' specifier.
19511         * lex.c (read_ucs): New fn.
19512         (readescape, skip_white_space): Call it.
19513         (is_extended_char, is_extended_char_1): New fns.
19514         (utf8_extend_token): New fn, #if 0'd out.
19515         (real_yylex): Treat extended chars like letters.
19516
19517         * search.c (note_debug_info_needed): Walk the bases even if we
19518         weren't deferring the type itself.
19519
19520 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19521
19522         * decl2.c (finish_objects): Constify a char*.
19523
19524         * method.c (emit_thunk): Likewise.
19525
19526 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
19527
19528         * typeck.c (dubious_conversion_warnings): Look through
19529         REFERENCE_TYPE.
19530
19531 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19532
19533         * class.c (dfs_modify_vtables): I is now unsigned.
19534         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
19535         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
19536         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
19537         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
19538         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
19539         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
19540         Call integer_all_onesp.
19541         * typeck2.c (process_init_constructor): Use compare_tree_int.
19542
19543         * lang-specs.h (as): Don't call if -syntax-only.
19544
19545 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
19546
19547         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
19548         RTL_EXPR_HAS_NO_SCOPE after all.
19549
19550 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
19551
19552         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
19553         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
19554         RTL_EXPR_HAS_NO_SCOPE.
19555
19556         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
19557         later.
19558
19559         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
19560
19561 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
19562
19563         * call.c (convert_like): Macrofy.
19564         (convert_like_with_context): New macro.
19565         (convert_like_real): Renamed from convert_like.  Add calling
19566         context parameters, for diagnostics. Add recursive flag.  Call
19567         dubious_conversion_warnings for outer conversion.
19568         (build_user_type_conversion): Use convert_like_with_context.
19569         (build_over_call): Likewise. Don't warn about dubious
19570         conversions here. Adjust convert_default_arg calls.
19571         (convert_default_arg): Add context parameters for diagnostics.
19572         Pass through to convert_like_with_context.
19573         * cp-tree.h (convert_default_arg): Add context parameters.
19574         (dubious_conversion_warnings): Prototype new function.
19575         * typeck.c (convert_arguments): Adjust convert_default_arg call.
19576         (dubious_conversion_warnings): New function, broken
19577         out of convert_for_assignment.
19578         (convert_for_assignment): Adjust.
19579
19580 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
19581
19582         * decl2.c (key_method): Break out from...
19583         (import_export_vtable, import_export_class): ...here.
19584
19585         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
19586         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
19587
19588         * search.c (note_debug_info_needed, dfs_debug_mark,
19589         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
19590         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
19591
19592 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
19593
19594         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
19595         typos.
19596
19597 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
19598
19599         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
19600         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
19601         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
19602         (lang_type): Split gets_new into has_new and has_array_new.
19603         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19604         (TYPE_GETS_NEW): Split into ...
19605         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
19606         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
19607         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
19608         (build_op_new_call): Don't declare.
19609         (build_new_1): Likewise.
19610         * call.c (build_op_new_call): Remove.
19611         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19612         instead of TYPE_NEEDS_DESTRUCTOR.
19613         (finish_struct_bits): Likewise.
19614         (add_implicitly_declared_members): Likewise.
19615         (check_field_decl): Likewise.
19616         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
19617         correctly under the new ABI.
19618         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19619         instead of TYPE_NEEDS_DESTRUCTOR.
19620         (initialize_local_var): Likewise.
19621         (destroy_local_var): Likewise.
19622         (cp_finish_decl): Likewise.
19623         (register_dtor_fn): Likewise.
19624         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
19625         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
19626         TYPE_VEC_DELETE_TAKES_SIZE here.
19627         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
19628         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
19629         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19630         (finish_destructor_body): Likewise.
19631         (maybe_build_cleanup_1): Likewise.
19632         * decl2.c (do_static_destruction): Likewise.
19633         * init.c (build_new_1): Make it static.
19634         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19635         (expand_cleanup_for_base): Likewise.
19636         (get_cookie_size): New function.
19637         (build_new_1): Handle array-new cookies correctly under the new
19638         ABI.
19639         (build_vec_delete_1): Likewise.
19640         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19641         (build_delete): Likewise.
19642         (build_vec_delete): Handle array-new cookies correctly under the new
19643         ABI.
19644         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19645         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
19646         TYPE_HAS_ARRAY_NEW_OPERATOR.
19647         * ptree.c (print_lang_type): Check them.
19648         * search.c (context_for_name_lookup): Fix typo in comment.
19649         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19650         * tree.c (break_out_cleanups): Likewise.
19651         (build_cplus_array_test_1): Likewise.
19652         (cp_build_qualified_type_real): Likewise.
19653         * typeck.c (complete_type): Likewise.
19654
19655         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
19656         the command-line, not the end.
19657
19658 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
19659
19660         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
19661
19662 2000-03-02  Tom Tromey  <tromey@cygnus.com>
19663
19664         * cp-tree.h (build_java_class_ref): Declare.
19665         * init.c (build_java_class_ref): No longer static.
19666         * except.c (expand_throw): Generate a Java-style `throw' if the
19667         thrown object is a "Java" object.
19668         (initialize_handler_parm): Generate a Java-style lookup of
19669         exception info if the caught object is a "Java" object.
19670         (catch_language, catch_language_init): New globals.
19671         (decl_is_java_type): New function.
19672         (expand_start_catch_block): Don't call push_eh_info() or
19673         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
19674         class reference to build_catch_block.
19675
19676 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19677
19678         * typeck.c (comptypes): Treat sizetype like its language equivalent.
19679
19680 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
19681
19682         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
19683         to merge reference/pointer code and fix incorrect warnings.
19684
19685 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
19686
19687         * search.c (protected_accessible_p): Use context_for_name_lookup.
19688
19689         * init.c (construct_virtual_bases): Fix thinko.
19690         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
19691
19692 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
19693
19694         * decl.c (current_function_decl): Move to toplev.c.
19695
19696 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
19697
19698         * pt.c (fn_type_unification): Unify return type, whenever
19699         provided.
19700         (get_bindings_real): Only pass return type when necessary.
19701         Remove explicit return type check.
19702         * class.c (resolve_address_of_overloaded_function): Pass desired
19703         return type to fn_type_unification.
19704
19705 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19706
19707         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
19708         DECL_FIELD_SIZE.
19709         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
19710         DECL_FIELD_SIZE.
19711         * rtti.c (expand_class_desc): Likewise.
19712         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
19713         (THUNK_VCALL_OFFSET): Likewise.
19714         (THUNK_DELTA): Reflect changes in ../tree.h.
19715
19716 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
19717
19718         * search.c (protected_accessible_p): Also allow the access if
19719         the member is public in DERIVED.  Lose TYPE parm.
19720         (friend_accessible_p): Lose TYPE parm.
19721         (accessible_p): Adjust.
19722
19723 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19724
19725         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
19726         on things that are not sizes; ssize_binop deleted.
19727         Call size_diffop when appropriate.
19728         (dfs_build_vcall_offset_vtbl_entries): Likewise.
19729         (build_primary_vtable, build_secondary_vtable): Likewise.
19730         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
19731         Variable I is HOST_WIDE_INT.
19732         (get_vfield_offset): Pass proper types to size_binop.
19733         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
19734         (finish_struct_1): Likewise.
19735         (skip_rtti_stuff): Arg N is now pointer to signed.
19736         (layout_class_type): Use size_zero_node.
19737         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
19738         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
19739         * decl.c (complete_arry_type): Pass proper types to size_binop.
19740         (xref_basetypes): BINFO_OFFSET is sizetype.
19741         * error.c (dump_expr): Don't use size_binop non-sizes.
19742         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
19743         * init.c (construct_virtual_bases): Fix type error.
19744         (build_vec_delete_1): Pass proper type to size_binop and don't
19745         fold result.
19746         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
19747         * rtti.c (get_base_offset): Pass proper type to size_binop.
19748         * search.c (dfs_find_vbases): Fix type error.
19749         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
19750         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
19751         * tree.c (debug_binfo): Variable N is signed.
19752         Use HOST_WIDE_INT_PRINT_DEC.
19753         * typeck.c (comptypes): sizetype is same as equivalent integer type.
19754         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
19755         size_one_node and size_zero_node.
19756         (c_alignof): Use size_one_node.
19757         (build_component_addr): Pass proper types to size_binop.
19758         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
19759
19760 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
19761
19762         Implement class scope using-declarations for functions.
19763         * class.c (handle_using_decl): Call add_method for used functions.
19764         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
19765         (add_method): Used functions are hidden by local functions.
19766         (check_bases_and_members): Handle using-decls before finalizing
19767         CLASSTYPE_METHOD_VEC.
19768         * call.c (add_function_candidate): Add ctype parm; if nonzero,
19769         override the type of 'this' accordingly.
19770         (add_template_candidate, add_template_candidate_real): Add ctype parm.
19771         (convert_class_to_reference, build_user_type_conversion_1,
19772         build_new_function_call, build_object_call, build_new_op,
19773         build_new_method_call): Pass ctype parm.
19774
19775         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
19776         the baselink.
19777         * call.c (convert_class_to_reference, build_user_type_conversion_1,
19778         build_new_function_call, build_object_call, build_new_op,
19779         build_new_method_call, build_op_delete_call): Don't get basetype_path
19780         from a baselink.
19781         * typeck.c (build_component_ref): Likewise.
19782         * init.c (build_offset_ref): Likewise.
19783         (resolve_offset_ref): Don't call enforce_access.
19784         Call build_scoped_ref.
19785         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
19786         would cause an error or if -pedantic.
19787         * class.c (alter_access): Lose binfo parm.
19788
19789 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
19790
19791         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
19792         types.
19793
19794 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
19795
19796         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
19797         pseudo_type_info creation into the std namespace
19798
19799 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
19800
19801         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
19802         (import_export_class): Remove declaration.
19803         * decl2.c (import_export_class): Make it static.
19804         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
19805         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
19806         EXPR_WITH_FILE_LOCATION.
19807         * lex.c (check_newline): Tweak filename/lineno setting.
19808         * semantics.c (begin_while_stmt): Fix typo in comment.
19809
19810 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19811
19812         * lang-options.h (-fmessage-length=): Add missing option.
19813
19814         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
19815
19816 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
19817
19818         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
19819
19820 2000-02-25  Jim Wilson  <wilson@cygnus.com>
19821
19822         * optimize.c (expand_call_inline): Emit the return label before
19823         evaluating the return value.
19824
19825 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
19826
19827         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
19828         than duplicating functionality here.
19829         * optimize.c: Include input.h.
19830         (expand_call_inline): Use push_srcloc and pop_srcloc.
19831         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
19832         * parse.c: Regenerated.
19833         * Makefile.in (lex.o): Depend on input.h.
19834         (optimize.o): Likewise.
19835
19836 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
19837
19838         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
19839         function type, rather than ICE.
19840
19841 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
19842
19843         * decl.c (grokdeclarator): Call decl_type_access_control.
19844         * parse.y (parse_end_decl): Don't call decl_type_access_control if
19845         decl is null.
19846
19847 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
19848
19849         * decl.c (decls_match): Remove obsolete static member nadgering.
19850
19851 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19852
19853         * decl.c (grokdeclarator): Change ANSI to ISO.
19854         * lex.c (consume_string, readescape, do_identifier): Likewise.
19855         (parse_float, real_yylex): Likewise.
19856         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
19857         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
19858         new_type_id, maybe_label_decls, simple_stmt,
19859         for.init.statement): Likewise.
19860         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
19861         * semantics.c (finish_named_return_value): Likewise.
19862         * parse.c: Regenerate.
19863
19864 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
19865
19866         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
19867         (CPTI_CLASS_STAR_TYPE): Remove.
19868         (vtable_index_type): Likewise.
19869         (class_star_type_node): Remove.
19870         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
19871         (build_binary_op_nodefault): Remove.
19872         * call.c (build_new_op): Use build_binary_op instead of
19873         build_binary_op_nodefault.
19874         * decl.c (init_decl_processing): Remove class_star_type_node
19875         initialization.  Make delta_type_node ptrdiff_type_node under the
19876         new ABI.  Initialize vtable_index_type.
19877         (build_ptrmemfunc_type): Build different structures for the new
19878         ABI.
19879         (build_enumerator): Use build_binary_op instead of
19880         build_binary_op_nodefault.
19881         * method.c (build_overload_value): Mangle pointers-to-members
19882         appropriately under the new ABI.
19883         * typeck.c (build_array_ref): Use build_binary_op instead of
19884         build_binary_op_nodefault.
19885         (get_member_function_from_ptrfunc): Adjust for the new ABI.
19886         (build_binary_op_nodefault): Rename to ...
19887         (build_binary_op): ... this.  Remove old version.  Adjust for
19888         pointer-to-member comparisons under the new ABI.
19889         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
19890         (build_ptrmemfunc): Adjust for the new ABI.
19891         (expand_ptrmemfunc_cst): Likewise.
19892         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
19893         (pfn_from_ptrmemfunc): Adjust for the new ABI.
19894
19895 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
19896
19897         * call.c (build_object_call): Compress consecutive calls to
19898         cp_error.
19899         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
19900         (build_op_delete_call): Adjust message formatting.
19901
19902         * class.c (check_bases): Compress consecutive calls to
19903         cp_pedwarn.
19904         (finish_struct_anon): Say 'ISO C++'.
19905
19906         * decl.c (start_decl): Same here.
19907         (grok_reference_init): Likewise.
19908         (grokfndecl): Correct message formatting.
19909         (grokfndecl): Improve diagnostic.
19910         (check_static_variable_definition): Likewise. Say 'ISO C++'
19911         (compute_array_index_type): Say 'ISO C++'
19912         (create_array_type_for_decl): Compress consecutive calls to
19913         cp_error.
19914         (grokdeclarator): Say 'ISO C++'
19915         (grok_op_properties): Likewise.
19916
19917         * decl2.c (delete_sanity): Clairify diagnostic.
19918         (check_member_template): Same here.
19919         (grok_function_init): Use consistent terminology.
19920
19921         * expr.c (do_case): Say 'ISO C++'
19922
19923         * friend.c (do_friend): Compress consecutive calls to warning.
19924
19925 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
19926
19927         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
19928         * class.c (build_secondary_vtable): Reorganize.  Don't create a
19929         new vtable under the new ABI.
19930         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
19931         computing the size.
19932         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
19933         the initializing elements.
19934         (initialize_vtable): New function.
19935         (dfs_finish_vtbls): Use it.
19936         (dfs_accumulate_vtbl_inits): New function.
19937         (finish_vtbls): Merge primary and secondary vtables under the new
19938         ABI.
19939         (finish_struct_1): Remove redundant call to layout_vtable_decl.
19940         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
19941         aren't VAR_DECLs.
19942
19943         * class.c (build_vtable): New function, split out from ...
19944         (get_vtable_decl): ... here, and ...
19945         (build_secondary_vtable): ... here.
19946
19947         * pt.c (tsubst_decl): Fix formatting.
19948
19949 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19950
19951         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
19952         (avoid_overlap, build_base_field): Likewise.
19953         (build_base_field, build_base_fields, is_empty_class):
19954         Test DECL_SIZE with integer_zero.
19955         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
19956         * cp-tree.h (struct lang_type): New field size_unit.
19957         (CLASSTYPE_SIZE_UNIT): New macro.
19958         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
19959         (cp_finish_decl): Delete -Wlarger-than processing.
19960         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
19961         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
19962         * tree.c (make_binfo): binfo vector is one entry longer.
19963         (walk_tree): Walk DECL_SIZE_UNIT.
19964
19965 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
19966
19967         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
19968         comment.
19969         (build_vtable_entry): Don't assume all vtable entries are
19970         functions.
19971         (build_vtbl_initializer): Adjust accordingly.
19972         (get_vtable_decl): Fix formatting.
19973
19974 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
19975
19976         * semantics.c (deferred_type_access_control): Walk the entire
19977         type_lookups list.
19978         (save_type_access_control): Rename from
19979         initial_deferred_type_access_control.  Just remember the value.
19980         (decl_type_access_control): New fn.
19981         (begin_function_definition): Use deferred_type_access_control, after
19982         we've started the function.  Set type_lookups to error_mark_node.
19983         * parse.y (frob_specs, fn.def1): Adjust.
19984         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
19985         (parse_end_decl, parse_bitfield0, parse_method): New fns.
19986         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
19987         (after_type_component_declarator0): Likewise.
19988         (after_type_component_declarator): Likewise.
19989         (notype_component_declarator): Likewise.
19990         * cp-tree.h: Adjust.
19991
19992         * decl.c (redeclaration_error_message): Allow redeclaration of
19993         namespace-scope decls.
19994
19995 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
19996
19997         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
19998
19999 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
20000
20001         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
20002         * decl2.c (grokclassfn): Likewise.
20003
20004         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
20005
20006         * decl2.c (lang_decode_option): Don't set default message length
20007         here.
20008         * lex.c (lang_init_options): Set it here.
20009
20010 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
20011
20012         Make DECL_CONTEXT mean the class in which a member function was
20013         declared, even for a virtual function.
20014         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
20015         (DECL_FRIEND_CONTEXT): New macro.
20016         (DECL_REAL_CONTEXT): Remove.
20017         (SET_DECL_FRIEND_CONTEXT): Likewise.
20018         (DECL_VIRTUAL_CONTEXT): Adjust.
20019         (DECL_CLASS_SCOPE_P): Use TYPE_P.
20020         (add_friends): Remove.
20021         (hack_decl_function_context): Likewise.
20022         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
20023         CP_DECL_CONTEXT.
20024         (build_over_call): Fix indentation.  Use DECL_CONTEXT
20025         instead of DECL_CLASS_CONTEXT.
20026         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
20027         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20028         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20029         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
20030         (build_base_field): Likewise.
20031         (finish_struct_1): Likewise.
20032         (build_self_reference): Likewise.
20033         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
20034         DECL_REAL_CONTEXT.
20035         (pushtag): Use decl_function_context, not
20036         hack_decl_function_context.
20037         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20038         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
20039         (pushdecl): Remove bogus code.
20040         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
20041         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20042         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20043         Use decl_function_context, nothack_decl_function_context.
20044         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
20045         (grokdeclarator): Likewise.  Use decl_function_context, not
20046         hack_decl_function_context.
20047         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
20048         (start_function): Use DECL_FRIEND_CONTEXT, not
20049         DECL_CLASS_CONTEXT.  Use decl_function_context, not
20050         hack_decl_function_context.
20051         (finish_function): Use decl_function_context, not
20052         hack_decl_function_context.
20053         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
20054         DECL_CLASS_CONTEXT.
20055         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
20056         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
20057         (grokfield): Likewise.
20058         (finish_builtin_type): Likewise.
20059         (finish_vtable_vardec): Use decl_function_context, not
20060         hack_decl_function_context.
20061         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20062         (start_static_initialization_or_destruction): Likewise.
20063         (finish_static_initialization_or_destruction): Likewise.
20064         (mark_used): Adjust logic for deciding when to synthesize methods.
20065         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
20066         DECL_REAL_CONTEXT.
20067         * error.c (dump_function_decl): Use DECL_CONTEXT, not
20068         DECL_CLASS_CONTEXT.
20069         * friend.c (is_friend): Likewise.
20070         (add_friends): Remove.
20071         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
20072         * lex.c (begin_definition_of_inclass_inline): Use
20073         decl_function_context, not hack_decl_function_context.
20074         (process_next_inline): Likewise.
20075         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20076         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
20077         DECL_CLASSS_CONTEXT.
20078         (hack_identifier): Likewise.
20079         (synthesize_method):  Use decl_function_context, not
20080         hack_decl_function_context.
20081         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
20082         DECL_REAL_CONTEXT.
20083         (is_member_template): Use decl_function_context, not
20084         hack_decl_function_context.  Use DECL_CONTEXT, not
20085         DECL_CLASS_CONTEXT.
20086         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
20087         DECL_CLASS_CONTEXT.
20088         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
20089         DECL_REAL_CONTEXT.
20090         (push_template_decl_real): Likewise.
20091         (instantiate_class_template): Don't call add_friends.
20092         (tsubst_default_argument): Use DECL_CONTEXT, not
20093         DECL_REAL_CONTEXT.
20094         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20095         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20096         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
20097         DECL_CLASS_CONTEXT.
20098         * repo.c (repo_inline_used): Likewise.
20099         * search.c (current_scope): Adjust for new _CONTEXT macros.
20100         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
20101         DECL_REAL_CONTEXT.
20102         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20103         (lookup_fnfields_here):Likewise.
20104         (check_final_overrider): Likewise.
20105         (init_vbase_pointers): Likewise.
20106         (virtual_context): Likewise.
20107         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
20108         (expand_body): Use decl_function_context, not
20109         hack_decl_function_context.
20110         * tree.c (hack_decl_function_context): Remove.
20111         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
20112         DECL_CLASS_CONTEXT.
20113         * typeck2.c (error_not_base_type): Likewise.
20114
20115 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
20116
20117         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
20118
20119 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20120
20121         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
20122
20123 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
20124
20125         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
20126
20127 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
20128
20129         * decl2.c (lang_decode_option): Enable automatic line wrapping.
20130
20131 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
20132
20133         * parse.y (frob_specs): Split out...
20134         (parse_decl): From here.
20135         (fn.def2): Call initial_deferred_type_access_control.
20136         (after_type_component_declarator0): Call frob_specs.
20137         (notype_component_declarator0): Likewise.
20138         * search.c (friend_accessible_p): Nested classes are friends of their
20139         enclosing classes.
20140
20141 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
20142
20143         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
20144         used to create an implicit temporary.
20145
20146         * class.c (dfs_modify_vtables): Tweak calculation of functions to
20147         override.
20148
20149 2000-02-08  Nathan Sidwell  <nathan@acm.org>
20150
20151         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
20152         strip array element qualifiers too.
20153
20154 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
20155
20156         * decl.c (store_parm_decls): Don't build cleanups for parameters
20157         while processing_template_decl.
20158
20159 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
20160
20161         * cp-tree.h (struct saved_scope): Add incomplete field.
20162         (namespace_scope_incomplete): New macro.
20163         * decl.c (pushdecl): Use it.
20164         (hack_incomplete_structures): Use it.  See through artificial
20165         binding levels.
20166         (mark_saved_scope): Mark it.
20167
20168         Implement access control for nested types.
20169         * search.c (type_access_control): New fn.
20170         (accessible_p): Now we do perform access control for types.
20171         * semantics.c (deferred_type_access_control): New fn.
20172         (initial_deferred_type_access_control): New fn.
20173         (begin_function_definition): Call it.  Add lookups parm.
20174         * decl.c (struct binding_level): Add this_class field.
20175         (pushlevel_class): Set it.
20176         (mark_binding_level): Mark it.
20177         (lookup_name_real): Use it.  Call type_access_control.
20178         (mark_saved_scope): Mark lookups field.
20179         * cp-tree.h (flagged_type_tree): Add lookups field.
20180         (struct saved_scope): Add lookups field.
20181         (type_lookups): New macro.
20182         * parse.y (declmods): Now <ftype>.
20183         (parse_decl): Add lookups parm.  Call
20184         initial_deferred_type_access_control.
20185         (lang_extdef): Clear type_lookups.
20186         (typed_declspecs, declmods, typespec): Set lookups field.
20187         (initdcl): Call deferred_type_access_control.
20188         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
20189         component_decl_1, named_parm): Adjust.
20190         * friend.c (is_friend): Nested classes are friends of their
20191         enclosing classes.
20192
20193         * class.c (currently_open_derived_class): New fn.
20194         * method.c (hack_identifier): Use it.
20195
20196         * lex.c (do_identifier): Remove obsolete code.
20197
20198         * parse.y (typed_typespecs): Propagate new_type_flag properly.
20199
20200 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
20201
20202         * tinfo.h: Remove apostrophes from C++ comment (xgettext
20203         thinks this file is plain C).
20204
20205 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20206
20207         * Makefile.in (call.o): Depend on $(EXPR_H).
20208
20209         * call.c: Include "expr.h".
20210
20211         * class.c (dump_class_hierarchy): Add prototype.
20212
20213         * search.c (dfs_get_pure_virtuals): Likewise.
20214
20215 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
20216
20217         * parse.y (simple_stmt): Allow :: token in asm parameter list.
20218         * parse.c: Rebuilt.
20219
20220 2000-01-31  Jim Wilson  <wilson@cygnus.com>
20221
20222         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
20223         Store it in DECL_FCONTEXT.
20224         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
20225
20226 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
20227
20228         * tinfo.h (old abi): #include "tconfig.h".
20229         * tinfo.cc (convert_to_base): Move into old abi section.
20230
20231 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
20232
20233         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
20234         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
20235         (BINFO_PRIMARY_BINFO): New macro.
20236         (BF_DELTA): Rename to ...
20237         (BV_DELTA): ... this.
20238         (BF_VCALL_INDEX): Rename to ...
20239         (BV_VCALL_INDEX): ... this.
20240         (BF_FN): Rename to ...
20241         (BV_FN): ... this.
20242         * class.c (build_vbase_path): Adjust for changes to reverse_path.
20243         (set_rtti_entry): Rename BF_ macros to BV_ variants.
20244         (modify_vtable_entry): Simplify.
20245         (add_virtual_function): Rename BF_ macros to BV_ variants.
20246         (build_vtable_initializer): Likewise.
20247         (get_class_offset_1): Remove.
20248         (dfs_get_class_offset): Likewise.
20249         (get_class_offset): Likewise.
20250         (dfs_find_final_overrider): New function.
20251         (find_final_overrider): Likewise.
20252         (modify_one_vtable): Remove.
20253         (dfs_find_base): New function.
20254         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
20255         find_final_overrider.
20256         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
20257         virtuals.
20258         (dfs_fixup_vtable_deltas): Remove.
20259         (override_one_vtable): Remove.
20260         (merge_overrides): Likewise.
20261         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
20262         unreal chilren of virtual bases.
20263         (finish_struct_1): Don't use merge_overrides.  Don't use
20264         dfs_fixup_vtable_deltas.
20265         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
20266         BINFOs.
20267
20268 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
20269             Jason Merrill  <jason@yorick.cygnus.com>
20270
20271         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
20272
20273 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
20274
20275         * exception.cc (__throw_bad_typeid): Add missing std::.
20276
20277 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20278
20279         * cp-tree.h (make_thunk): PROTO -> PARAMS.
20280
20281 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
20282
20283         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
20284
20285         Runtime support for new-abi rtti.
20286         * inc/typeinfo (type_info::operator!=): Define in class.
20287         (type_info::before, type_info::name, type_info::operator==,
20288         type_info::operator!=): Define new ABI implementations.
20289         (type_info::is_pointer_p, type_info::is_function_p): Declare
20290         new virtual functions.
20291         (type_info::do_catch, type_info::do_upcast): Likewise.
20292
20293         * tinfo.h (__base_class_info): Define new class.
20294         (__class_type_info): Likewise.
20295         (__si_class_type_info): Likewise.
20296         (__vmi_class_type_info): Likewise.
20297         (__dynamic_cast): Prototype.
20298
20299         * tinfo.cc: Conditionalize old and new rtti mechanisms.
20300         (type_info::is_pointer_p): Define new function.
20301         (type_info::is_function_p): Likewise.
20302         (type_info::do_catch): Likewise.
20303         (type_info::do_upcast): Likewise.
20304         (vtable_prefix): New structure for vtable access.
20305         (adjust_pointer): Define new template function.
20306         (contained_p, public_p, virtual_p, contained_public_p,
20307         contained_nonpublic_p, contained_nonvirtual_p): Define new
20308         functions.
20309         (nonvirtual_base_type): New local variable.
20310         (__class_type_info::~__class_type_info): Define.
20311         (__si_class_type_info::~__si_class_type_info): Likewise.
20312         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
20313         (__class_type_info::do_catch): Define new function.
20314         (__class_type_info::do_upcast): Likewise.
20315         (__class_type_info::find_public_src): Likewise.
20316         (__class_type_info::do_find_public_src): Likewise.
20317         (__si_class_type_info::do_find_public_src): Likewise.
20318         (__vmi_class_type_info::do_find_public_src): Likewise.
20319         (__class_type_info::do_dyncast): Likewise.
20320         (__si_class_type_info::do_dyncast): Likewise.
20321         (__vmi_class_type_info::do_dyncast): Likewise.
20322         (__class_type_info::do_upcast): Likewise.
20323         (__si_class_type_info::do_upcast): Likewise.
20324         (__vmi_class_type_info::do_upcast): Likewise.
20325         (__dynamic_cast): Likewise.
20326
20327         * tinfo2.cc (__fundamental_type_info): Define new class.
20328         (__pointer_type_info): Likewise.
20329         (__reference_type_info): Likewise.
20330         (__array_type_info): Likewise.
20331         (__function_type_info): Likewise.
20332         (__enum_type_info): Likewise.
20333         (__ptr_to_member_type_info): Likewise.
20334         (__fundamental_type_info::~__fundamental_type_info): Define.
20335         (__pointer_type_info::~__pointer_type_info): Likewise.
20336         (__reference_type_info::~__reference_type_info): Likewise.
20337         (__array_type_info::~__array_type_info): Likewise.
20338         (__function_type_info::~__function_type_info): Likewise.
20339         (__enum_type_info::~__enum_type_info): Likewise.
20340         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
20341         (__pointer_type_info::do_catch): Define new function.
20342         (__ptr_to_member_type_info::do_catch): Define new function.
20343
20344         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
20345         (__is_pointer): Likewise.
20346
20347         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
20348
20349 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
20350
20351         * cp/class.c (build_vtable): Rename to build_primary_vtable.
20352         (prepare_fresh_vtable): Rename to build_secondary_vtable.
20353         (make_new_vtable): New function.
20354         (modify_vtable_entry): Handle generation of new vtables correctly.
20355         (modify_one_vtable): Remove unused parameter.
20356         (dfs_fixup_vtable_deltas): Likewise.
20357         (override_one_vtable): Use build_secondary_vtable.
20358         (finish_struct_1): Use build_primary_vtable and
20359         build_secondary_vtable.
20360
20361 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
20362
20363         * cp/decl.c: Adjust variable names, comments, help strings.
20364
20365 2000-01-29  Nathan Sidwell  <nathan@acm.org>
20366
20367         * new2.cc (operator delete[]): Use operator delete, don't assume
20368         implementation.
20369
20370 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
20371
20372         * class.c (build_vtbl_initializer): Add argument to
20373         build_vtable_entry call.
20374
20375 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
20376
20377         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
20378         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
20379         (BF_DELTA): New macro.
20380         (BF_VCALL_INDEX): Likewise.
20381         (BF_FN): Likewise.
20382         (THUNK_VCALL_OFFSET): Likewise.
20383         (make_thunk): Change prototype.
20384         * class.c (build_vtable_entry): Integrate
20385         build_vtable_entry_for_fn.  Handle vcall indices.
20386         (build_vtable_entry_for_fn): Remove.
20387         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
20388         BF_VCALL_INDEX, BF_FN.
20389         (modify_vtable_entry): Integrate common code from
20390         modify_one_vtable and dfs_fixup_vtable_deltas.
20391         (add_virtual_function): Set BF_VCALL_INDEX.
20392         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
20393         and BF_FN.
20394         (modify_one_vtable): Simplify.
20395         (dfs_fixup_vtable_deltas): Likewise.
20396         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
20397         * method.c (make_thunk): Handle vcall indices.
20398
20399 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
20400
20401         Compiler side new abi rtti (not enabled).
20402         * cp-tree.h (new_abi_rtti_p): New macro.
20403         (emit_support_tinfos): Prototype new function.
20404         (tinfo_decl_p): Likewise.
20405         (emit_tinfo_decl): Likwise.
20406         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
20407         macros.
20408         (doing_runtime): New local static.
20409         (init_rtti_processing): Add new-abi initializer.
20410         (get_tinfo_decl): Add new-abi logic.
20411         (tinfo_from_decl): Likewise.
20412         (build_dynamic_cast_1): Likewise.
20413         (qualifier_flags): New static function.
20414         (tinfo_base_init): Likewise.
20415         (generic_initializer): Likewise.
20416         (ptr_ref_initializer): Likewise.
20417         (ptmd_initializer): Likewise.
20418         (class_hint_flags): Likewise.
20419         (class_initializer): Likewise.
20420         (synthesize_tinfo_var): Likewise.
20421         (create_real_tinfo_var): Likewise.
20422         (create_pseudo_type_info): Likewise.
20423         (get_vmi_pseudo_type_info): Likewise.
20424         (create_tinfo_types): Likewise.
20425         (emit_support_tinfos): New global function.
20426         (tinfo_decl_p): New global predicate.
20427         (emit_tinfo_decl): New global function.
20428         * class.c (set_rtti_entry): Generalize for old and new rtti.
20429         (build_vtbl_initializer): Likewise.
20430         * decl2.c (finish_file): Likewise.
20431
20432 2000-01-27  Jim Wilson  <wilson@cygnus.com>
20433
20434         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
20435         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
20436
20437 2000-01-27  Mike Stump  <mrs@wrs.com>
20438
20439         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
20440         for scopes.
20441
20442 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
20443
20444         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
20445
20446 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
20447
20448         * optimize.c (calls_setjmp_r): Supply new argument
20449         to special_function_p.
20450
20451 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20452
20453         * call.c: PROTO -> PARAMS.
20454         * class.c: Likewise.
20455         * cp-tree.h: Likewise.
20456         * cvt.c: Likewise.
20457         * decl.c: Likewise.
20458         * decl.h: Likewise.
20459         * decl2.c: Likewise.
20460         * dump.c: Likewise.
20461         * errfn.c: Likewise.
20462         * error.c: Likewise.
20463         * except.c: Likewise.
20464         * expr.c: Likewise.
20465         * init.c: Likewise.
20466         * input.c: Likewise.
20467         * lex.c: Likewise.
20468         * lex.h: Likewise.
20469         * method.c: Likewise.
20470         * optimize.c: Likewise.
20471         * parse.y: Likewise.
20472         * pt.c: Likewise.
20473         * repo.c: Likewise.
20474         * rtti.c: Likewise.
20475         * search.c: Likewise.
20476         * semantics.c: Likewise.
20477         * spew.c: Likewise.
20478         * tree.c: Likewise.
20479         * typeck.c: Likewise.
20480         * typeck2.c: Likewise.
20481         * xref.c: Likewise.
20482
20483 2000-01-25  Richard Henderson  <rth@cygnus.com>
20484
20485         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
20486
20487 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
20488
20489         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
20490         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
20491         (struct vcall_offset_data_s): New type.
20492         (dfs_vcall_offset_queue_p): New function.
20493         (dfs_build_vcall_offset_vtbl_entries): Likewise.
20494         (build_vcall_offset_vtbl_entries): Likewise.
20495         (layout_vtable_decl): Likewise.
20496         (num_vfun_entries): Likewise.
20497         (num_extra_vtbl_entries): Add the entries for vcall offsets.
20498         (build_vtbl_initializer): Likewise.
20499         (dfs_finish_vtabls): Use layout_vtable_decl.
20500         (modify_one_vtables): Always duplicate vtables under the new ABI.
20501         (finish_struct_1): Use layout_vtable_decl.
20502
20503 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20504
20505         * decl.c (member_function_or_else): Change third arg from a format
20506         specifier to an `enum overload_flags'.  Callers changed.
20507
20508 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
20509
20510         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
20511         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
20512         build_const_cast, get_delta_difference, check_return_expr): Avoid
20513         ANSI string concatenation usage.
20514
20515 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
20516
20517         * class.c (layout_class_type): Put the fields required to make a
20518         class non-empty at the end, not the beginning, of the TYPE_FIELDs
20519         list.
20520
20521 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
20522
20523         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
20524         template.
20525
20526         * decl2.c (mark_used): Do instantiate inlines that have been
20527         explicitly instantiated.
20528
20529 2000-01-24  Richard Henderson  <rth@cygnus.com>
20530
20531         * call.c (build_over_call): Use expand_tree_builtin.
20532         * typeck.c (build_function_call_real): Likewise.
20533         (build_binary_op_nodefault): Handle unordered compares.
20534
20535 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
20536
20537         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
20538         cp_tree_index values.
20539         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
20540         New global node #defines for them.
20541         * rtti.c (call_void_fn): Replace with ...
20542         (build_runtime_decl): ... new static function.
20543         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
20544         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
20545         (build_dynamic_cast_1): Always produce correctly typed result.
20546         Explicitly produce type_info addresses. Use dynamic_cast_node.
20547         * exception.cc (__throw_bad_cast): Return `void *'.
20548         (__throw_bad_typeid): Return `const type_info &'.
20549
20550 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
20551
20552         * cp-tree.h (get_vtable_decl): Prototype new function.
20553         * class.c (get_vtable_decl): New function. Broken out from ...
20554         (build_vtable): ... here. Use it.
20555         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
20556         by get_vtable_decl.
20557
20558 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
20559
20560         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
20561         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
20562         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
20563         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
20564         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
20565         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
20566         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
20567         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
20568         (CPTI_TINFO_VAR_ID): New enumeration.
20569         (__tp_desc_type_node, __access_mode_type_node,
20570         __bltn_desc_type_node, __user_desc_type_node,
20571         __class_desc_type_node, __ptr_desc_type_node,
20572         __attr_desc_type_node, __func_desc_type_node,
20573         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
20574         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
20575         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
20576         enum_desc_type_node, class_desc_type_node,
20577         si_class_desc_type_node, vmi_class_desc_type_node,
20578         ptmd_desc_type_node, base_desc_type_node): New #defines.
20579         (tinfo_fn_id, tinfo_fn_type): Rename to ...
20580         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
20581         (tinfo_var_id): New enumeration.
20582         (DECL_TINFO_FN_P): Augment comment.
20583         * decl.c (cp_global_trees): Adjust documentation.
20584         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
20585         tinfo_decl_type and tinfo_var_id.
20586         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
20587         (build_typeid): Remove unused variable.
20588         (get_tinfo_var): Use tinfo_var_id.
20589         (tinfo_name): New static function.
20590         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
20591         (tinfo_from_decl): Likewise.
20592         (get_base_offset): New static function, broken out of
20593         expand_class_desc.
20594         (expand_si_desc): Use tinfo_name.
20595         (expand_class_desc): Likewise. Lose local static variable.
20596         Use base_desc_type_node. Use get_base_offset.
20597         (expand_ptr_desc): Use tinfo_name.
20598         (expand_attr_desc): Likewise.
20599         (expand_generic_desc): Likewise.
20600
20601         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
20602         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
20603
20604 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
20605
20606         * cp-tree.h (__eprintf): Remove declaration.
20607         * tree.c (__eprintf): Remove definition.
20608
20609 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
20610             Mark Mitchell  <mark@codesourcery.com>
20611
20612         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
20613         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
20614
20615 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
20616
20617         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
20618
20619 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
20620
20621         * cp-tree.h (register_dtor_fn): New function.
20622         * decl.c (destroy_local_static): Rename to ...
20623         (register_dtor_fn): ... this.  Give it external linkage.
20624         (expand_static_init): Use it.
20625         * decl2.c (do_static_initialization): Likewise, if using
20626         __cxa_atexit.
20627         (do_static_destruction): Check that __cxa_atexit is not in use.
20628         (finish_file): Don't call do_static_destruction if using
20629         __cxa_atexit.
20630
20631         * typeck.c (convert_arguments): Restore two-message error
20632         reporting.
20633
20634 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
20635
20636         Remap dynamic cast hint values to be consistent across ABIs.
20637         * search.c (dynamic_cast_base_recurse): Remap generated value.
20638         (get_dynamic_cast_base_type): Adjust documentation.
20639         * tinfo.h (__user_type_info::dyncast): Likewise.
20640         (__user_type_info::find_public_subobj): Remap BOFF meaning.
20641         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
20642         (__class_type_info::do_dyncast): Likewise.
20643         (__class_type_info::do_find_public_subobj): Likewise.
20644         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
20645
20646 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
20647
20648         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
20649
20650         * typeck2.c (incomplete_type_error): Restore previous
20651         cp_error and cp_error_at call sequence.
20652
20653 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
20654
20655         * class.c (dump_class_hierarchy): Make format agree with argument;
20656         cast pointer to unsigned long and print with %lx.
20657
20658 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
20659
20660         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
20661
20662         * typeck.c (composite_pointer_type, common_type,
20663         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
20664         build_function_call_real, convert_arguments,
20665         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
20666         build_unary_op, mark_addressable, build_compound_expr,
20667         build_static_cast, build_reinterpret_cast, build_const_cast,
20668         build_c_cast, build_modify_expr, get_delta_difference,
20669         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
20670         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
20671         into a single one.
20672         * typeck2.c (readonly_error, abstract_virtuals_error,
20673         process_init_constructor, check_for_new_type): Likewise.
20674
20675 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
20676
20677         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
20678         VAR_DECLs.
20679
20680 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
20681
20682         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
20683         (build_x_typeid): Likewise.
20684         (get_tinfo_fn): Likewise.
20685         (get_tinfo_fn_unused): Rename to ...
20686         (get_tinfo_decl): ... here.
20687         * rtti.c (build_headof): Replace logic error with assertion.
20688         (get_tinfo_fn_dynamic): Rename to ...
20689         (get_tinfo_decl_dynamic): ... here. Make static. Use
20690         complete_type_or_else.
20691         (build_x_typeid): Move into ...
20692         (build_typeid): ... here. Adjust call to
20693         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
20694         throw_bad_typeid expression.
20695         (get_tinfo_fn_unused): Rename to ...
20696         (get_tinfo_decl): ... here. Adjust comment.
20697         (get_tinfo_fn): Delete.
20698         (tinfo_from_decl): New static function.
20699         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
20700         (get_typeid): Use complete_type_or_else.
20701         (build_dynamic_cast_1): Adjust calls to
20702         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
20703         * parse.y (primary): Adjust call to build_typeid.
20704         * except.c (build_eh_type_type_ref): Adjust call to
20705         get_tinfo_decl. Mark as used.
20706         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
20707         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
20708         * parse.c: Regenerated.
20709
20710 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
20711
20712         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
20713         calling convention.
20714         (resolves_to_fixed_type_p): Document calling convention.
20715         * rtti.c (build_x_typeid): Initialize NONNULL.
20716
20717         * cp-tree.h (build_shared_int_cst): New function.
20718         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
20719         * class.c (modify_vtable_entry): Likewise.
20720         (add_virtual_function): Split out code to generated shared
20721         INTEGER_CSTs to build_share_int_cst.
20722         (modify_all_vtables): Handle all the overridden functions here.
20723         Add overridden functions from non-primary virtual bases to the
20724         primary vtable.
20725         (finish_struct_1): Adjust call to modify_all_vtables.  Add
20726         overridden functions from non-primary bases to the vtable.
20727         * tree.c (build_shared_int_cst): New function.
20728
20729         * cp-tree.h (scratchalloc): Remove.
20730         (build_scratch_list): Likewise.
20731         * call.c (convert_class_to_reference): Replace build_scratch_list
20732         and build_expr_list with build_tree_list.
20733         (add_candidate): Replace scratchalloc with expralloc.  Note memory
20734         leak.
20735         (build_user_type_conversion_1):  Replace build_scratch_list
20736         and build_expr_list with build_tree_list.
20737         (build_new_op): Likewise.
20738         (build_op_delete_call): Likewise.
20739         (convert_like): Likewise.
20740         * cvt.c (ocp_convert): Likewise.
20741         * decl.c (start_decl): Likewise.
20742         (start_function): Likewise.
20743         (finish_destructor_body): Likewise.
20744         (maybe_build_cleanup_1): Likewise.
20745         * decl2.c (reparse_decl_as_expr): Likewise.
20746         * init.c (perform_member_init): Likewise.
20747         (expand_cleanup_for_base): Likewise.
20748         (build_builtin_delete_call): Likewise.
20749         (build_new_1): Likewise.
20750         (build_delete): Likewise.
20751         * method.c (do_build_assign_ref): Likewise.
20752         * parse.y (already_scoped_stmt): Likewise.
20753         (nontrivial_exprlist): Likewise.
20754         (net_initializer): Likewise.
20755         (initlist): Likewise.
20756         * parse.c: Regenerated.
20757         * rtti.c (build_x_typeid): Likewise.
20758         (build_dynamic_cast_1): Likewise.
20759         * typeck.c (build_x_compound_expr): Likewise.
20760         (build_static_cast): Likewise.
20761         (build_modify_expr): Likewise.
20762
20763         * cp-tree.h (DECL_VINDEX): Add documentation.
20764         * class.c (build_vtable_entry): Likewise.
20765         (start_vtable): Add comment.
20766         (add_virtual_function): Replace pending_hard_virtuals with
20767         overridden_virtuals and pending_virtuals with new_virtuals.
20768         Replace redundant assignments with assertions.
20769         (check_for_override): Add comment.
20770         (check_bases_and_members): Replace pending_hard_virtuals with
20771         overridden_virtuals and pending_virtuals with new_virtuals.
20772         (create_vtbl_ptr): Likewise.
20773         (layout_class_type): Likewise.
20774         (finish_struct_1): Likewise.  Add comments.
20775
20776 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
20777
20778         * class.c (finish_struct_1): Replace redundant code with
20779         assertions.
20780
20781         * cp-tree.h (flag_new_abi): Move.
20782         (flag_use_cxa_atexit): Likewise.
20783         (flag_honor_std): Likewise.
20784         (flag_rtti): Likewise.
20785         (vbase_offsets_in_vtable_p): Define.
20786         (vptrs_present_everywhere_p): Likewise.
20787         (TYPE_CONTAINS_VPTR_P): Likewise.
20788         (dfs_walk_real): Declare.
20789         * class.c (build_vbase_pointer_fields): Check
20790         vbase_offsets_in_vtable_p.
20791         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
20792         BINFO_VPTR_FIELD.
20793         (build_vbase_offset_vtbl_entries): Simplify.
20794         (build_vbase_offset_vtbl_entries): Adjust.
20795         (build_vbase_pointer): Add ability to look up vbase offsets in
20796         vtable.
20797         (start_vtable): New function.
20798         (add_virtual_function): Use it.
20799         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
20800         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
20801         (build_vtbl_initializer): Take the type of the complete object as
20802         input.  Use it to correctly calculate vbase offsets.
20803         (dfs_finish_vtbls): Pass the complete type to
20804         build_vtbl_initializer.
20805         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
20806         (create_vtable_ptr): Create a vtable even if there are no
20807         new virtual functions, under the new ABI.
20808         (finish_struct_1): Likewise.
20809         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
20810         * decl.c (exapnd_static_init): Remove call to
20811         preserve_initializer.
20812         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
20813         vtables.
20814         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
20815         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
20816         (construct_virtual_bases): Don't initialize virtual base pointers
20817         under the new ABI.
20818         (build_aggr_init): Clean up comment.
20819         (expand_aggr_init_1): Likewise.
20820         * rtti.c (expand_class_desc): Store the virtual function table
20821         index where the vbase offset lives in the offset field.
20822         * search.c (dfs_walk_real): Make it global.
20823         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
20824         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
20825
20826         * tinfo.h (USItype): Make it signed under the new ABI.
20827         * tinfo.cc (convert_to_base): New function.  Encapsulate base
20828         conversion logic here.
20829         (__class_type_info::do_upcast): Use it.
20830         (__class_type_info::do_dyncast): Likewise.
20831         (__class_type_info::do_find_public_subobj): Likewise.
20832
20833         * init.c (construct_virtual_bases): Don't look up the addresses of
20834         virtual bases at run-time.
20835
20836         * class.c (build_vbase_pointer): Relocate.
20837         (build_vbase_pointer_fields): Likewise.
20838         (dfs_build_vbase_offset_vtbl_entries): Likewise.
20839         (build_vbase_offset_vtbl_entries): Likewise.
20840
20841         * decl.c (init_decl_processing): Complain if -fnew-abi
20842         -fno-vtable-thunks is used.
20843
20844         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
20845         flag_new_abi.
20846
20847 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
20848
20849         * cp-tree.h (num_extra_vtbl_entries): New function.
20850         (size_extra_vtbl_entries): Likewise.
20851         (dfs_vtable_path_unmark): Likewise.
20852         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
20853         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
20854         * class.c (num_extra_vtbl_entries): New function.
20855         (size_extra_vtbl_entries): Likewise.
20856         (dfs_build_vbase_offset_vtbl_entries): New function.
20857         (build_vbase_offset_vtbl_entries): Likewise.
20858         (build_vtbl_initializer): Use it.
20859         (finish_struct_1): Adjust vtable sizes (using
20860         num_extra_vtbl_entries).
20861         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
20862         THUNK_DECL is non-NULL before expanding it.
20863         * init.c (expand_virtual_init): Adjust the vtable pointer by
20864         size_extra_vtbl_entries before storing it.
20865         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
20866         Handle TREE_LIST parameters here, not in the dfs_* functions.
20867         (dfs_unmarked_real_bases_queue_p): Adjust.
20868         (dfs_marked_real_bases_queue_p): Likewise.
20869         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
20870         (dfs_vtable_path_marked_real_bases_queue_p): New function.
20871         (dfs_vtable_path_unmark): Likewise.
20872
20873 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
20874
20875         * optimize.c (copy_body_r): Clear the operand three of a
20876         TARGET_EXPR when copying it.
20877
20878 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20879
20880         * method.c (build_decl_overload_real): Check whether we are in ::
20881         before returning __builtin_new/delete.
20882
20883 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
20884
20885         * pt.c (tsubst_friend_function): Improve comment.
20886         (instantiate_decl): Avoid crashing when a "nested" function is
20887         instantiated from the top level.
20888
20889         * dump.c (dqeueue_and_dump): Dump
20890         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
20891
20892 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20893
20894         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
20895
20896 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
20897
20898         * g++spec.c (lang_specific_driver): Add -fnew-abi if
20899         ENABLE_NEW_GXX_ABI defined.
20900         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
20901         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
20902         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
20903
20904 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
20905
20906         * decl.c (start_cleanup_fn): Call pushdecl.
20907
20908         * call.c (convert_class_to_reference): Fix typos.
20909         (build_conditional_expr): Handle errors gracefully.
20910         * class.c (push_nested_class): Likewise.
20911         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
20912         (DECL_THIS_EXTERN): Use it.
20913         (DECL_THIS_STATIC): Likewise.
20914         * cvt.c (convert_to_void): Handle errors gracefully.
20915         (build_expr_type_conversion): Likewise.
20916         * decl.c (maybe_push_decl): Likewise.
20917         (start_decl_1): Likewise.
20918         (require_complete_types_for_parms): Likewise.
20919         * parse.y (structsp): Likewise.
20920         (base_class): Likewise.
20921         * parse.c: Regenerated.
20922         * pt.c (finish_member_template_decl): Likewise.
20923         * typeck.c (decay_conversion): Likewise.
20924
20925         * cp-tree.h (dfs_skip_vbases): New function.
20926         (find_vbase_instance): Likewise.
20927         * class.c (determine_primary_base): Allow a nearly empty base to
20928         serve as a primary base class under the new ABI.
20929         (get_class_offset_1): Rename to ...
20930         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
20931         messages here.
20932         (get_class_offset): Use it.  Issue error messages here.
20933         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
20934         find the right copies of virtual bases.
20935         (fixup_vtable_deltas1): Rename to ...
20936         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
20937         bases as primary bases.
20938         (fixup_vtable_deltas): Remove.
20939         (override_one_vtable): Handle virtual bases as primary bases.
20940         (merge_overrides): Likewise.
20941         (finish_struct_1): Likewise.
20942         (dump_class_hierarchy): Dump primary-ness of bases as well.
20943         * search.c (mark_primary_bases): Use a pre-order traversal to
20944         handle primary virtual bases.
20945         (dfs_skip_vbases): New fiunction.
20946         (expand_upcast_fixups): Adjust to handle primary virtual bases.
20947         (fixup_virtual_upcast_offsets): Likewise.
20948         (fixup_all_virtual_upcast_offsets): Likewise.
20949         (dfs_find_vbase_instances): New function.
20950         (find_vbase_instance): Likewise.
20951
20952 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
20953
20954         * lex.c (DIR_SEPARATOR): Delete macro.
20955
20956 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
20957
20958        * decl2.c (lang_decode_option): Handle automatic line wrapping
20959        option.
20960
20961 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
20962
20963         * friend.c (do_friend): Don't resolve scopes when processing
20964         template declarations, even if the qualifying scope doesn't
20965         involve template parameters.
20966
20967 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
20968
20969         * class.c (dfs_modify_vtables_queue_p): Remove.
20970         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
20971         and dfs_marked_real_bases_queue_p instead of
20972         dfs_modify_vtables_queue_p.
20973
20974         * class.c (build_vbase_path): Simplify.
20975         (dfs_propagate_binfo_offsets): New function.
20976         (propagate_binfo_offsets): Use it.
20977         (remove_base_field): Simplify.
20978         (dfs_set_offset_for_vbases): Remove.
20979         (dfs_set_offset_for_shared_vbases): New function.
20980         (dfs_set_offset_for_unshared_vbases): Likewise.
20981         (layout_virtual_bases): Use them.
20982         (layout_basetypes): Don't call propagate_binfo_offsets.
20983         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
20984         for the vbases.
20985
20986         * class.c (build_base_field): New function, split out from ...
20987         (build_base_fields): ... here.  Use it.  Allocate primary bases
20988         first, under the new ABI.
20989         (get_vtable_entry): Remove.
20990         (remove_base_field): New function, split out from ...
20991         (remove_base_fields): ... here.  Adjust since primary bases come
20992         first under the new ABI.
20993
20994         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
20995         (initialize_vtbl_ptrs): New function.
20996         (expand_indirect_vtbls_init): Change prototype.
20997         (convert_pointer_to_vbase): Declare.
20998         * init.c (expand_direct_vtbls_init): Remove.
20999         (dfs_initialize_vtbl_ptrs): New function.
21000         (initialize_vtbl_ptrs): Likewise.
21001         (emit_base_init): Use initialize_vtbl_ptrs.
21002         * search.c (convert_pointer_to_vbase): Make it global.
21003         (expand_indirect_vtbls_init): Remove vtable initialization code.
21004         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
21005
21006         * class.c (dfs_finish_vtbls): New function.
21007         (finish_vtbls): Use it.
21008         (dump_class_hierarchy): New function.
21009
21010         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
21011         (BINFO_VBASE_PRIMARY_P): New macro.
21012         (BINFO_VIRTUALS): Add to documentation.
21013         (SET_BINFO_PRIMARY_MARKED_P): Remove.
21014         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21015         (dfs_mark_primary_bases_queue_p): Likewise.
21016         (dfs_unmarked_real_bases_queue_p): New function.
21017         (dfs_marked_real_bases_queue_p): Likewise.
21018         * search.c (dfs_mark_primary_bases): Adjust.
21019         (mark_primary_bases): Likewise.
21020         (get_shared_vbase_if_not_primary): New function.
21021         (dfs_unmarked_real_bases_queue_p): Likewise.
21022         (dfs_marked_real_bases_queue_p): Likewise.
21023         (dfs_get_pure_virtuals): Simplify.
21024         (get_pure_virtuals): Likewise.
21025
21026 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21027
21028         * lex.c: Include tm_p.h.
21029
21030 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
21031
21032         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
21033
21034 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
21035
21036         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
21037         * pt.c (instantiate_decl): Defer comdat templates that might not be
21038         needed.
21039
21040         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
21041         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
21042         (finish_file): Likewise.
21043
21044         * decl2.c (import_export_class): Undo 12/14 change.
21045
21046         * error.c (dump_decl): operator new, not operatornew.
21047
21048         * class.c (field_decl_cmp): A nontype is "greater" than a type.
21049         * search.c (lookup_field_1): Look for the last field with the
21050         desired name.
21051
21052 2000-01-05  Nathan Sidwell  <nathan@acm.org>
21053
21054         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
21055         FUNCTION_DECL.
21056
21057 2000-01-05  Nathan Sidwell  <nathan@acm.org>
21058
21059         * typeck.c (build_static_cast): Don't strip target qualifiers
21060         when casting from a class.
21061
21062 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21063
21064         * class.c (warn_hidden): Initialize variable `fndecl'.
21065
21066 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
21067
21068         * decl.c (flag_isoc9x): New variable to be able to use code in
21069         c-common.c.  For now always zero.
21070
21071 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
21072
21073         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
21074         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
21075         or unshare_base_binfos for virtual bases here.
21076         * search.c (dfs_get_vbase_types): Do it here.
21077         (get_vbase_types): Adjust.
21078
21079 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
21080
21081         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
21082         (BINFO_PRIMARY_MARKED_P): Use flag 5.
21083         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21084         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21085         (unmark_primary_bases): Remove declaration.
21086         (unmarkedp): Declare.
21087         (dfs_vbase_unmark): Likewise.
21088         * class.c (determine_primary_base): Return immediately if there
21089         are no base classes.  Call mark_primary_bases here.
21090         (modify_all_direct_vtables): Remove.
21091         (modify_all_indirect_vtables): Remove.
21092         (dfs_modify_vtables_queue_p): New function.
21093         (dfs_modify_vtables): New function.
21094         (modify_all_vtables): Use them.
21095         (build_base_fields): Build FIELD_DECLs for primary virtual base
21096         classes.
21097         (create_vtable_ptr): Don't call determine_primary_base here.
21098         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
21099         (dfs_set_offset_for_vbases): ... this.
21100         (layout_virtual_bases): Use it.
21101         (layout_class_type): Call determine_primary_base here.
21102         * search.c (unmarkedp): Make it global.
21103         (shared_marked_p): Simplify.
21104         (shared_unmarked_p): Likewise.
21105         (dfs_primary_bases_queue_p): Remove.
21106         (dfs_unmark_primary_bases): Likewise.
21107         (unmark_primary_bases): Likewise.
21108         (mark_primary_bases): Simplify.
21109         (get_pure_virtuals): Don't call mark_primary_bases here.
21110         (dfs_vbase_unmark): New function.
21111         (get_vbase_types): Simplify.
21112
21113         * class.c (struct base_info): Remove.
21114         (determine_primary_base): Take has_virtual_p rather than a
21115         base_info as input.  Don't calculate max_has_virtual.
21116         (finish_struct_bits): Remove max_has_virtual argument.
21117         (create_vtable_ptr): Remove max_has_virtual_p argument.
21118         (layout_virtual_bases): Remove max argument.
21119         (layout_basetypes): Likewise.
21120         (layout_class_type): Remove max_has_virtual_p argument.
21121         (finish_struct_1): Remove max_has_virtual.
21122
21123         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
21124         (layout_basetypes): Remove.
21125         * class.c (propagate_binfo_offsets): Moved here from tree.c.
21126         Update to handle primary virtual bases.
21127         (remove_base_fields): New function, split out from
21128         layout_basetypes.
21129         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
21130         (layout_virtual_bases): New function, split out from
21131         layout_basetypes.  Update to handle primary virtual bases.
21132         (layout_basetypes): Moved here from tree.c.  Use
21133         remove_base_fields and layout_virtual_bases.
21134         * search.c (dfs_mark_primary_bases_queue_p): New function.
21135         (mark_primary_bases): Use it.
21136         * tree.c (CEIL): Remove.
21137         (propagate_binfo_offsets): Remove.
21138         (layout_basetypes): Remove.
21139
21140 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
21141
21142         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
21143         (BINFO_PRIMARY_MARKED_P): New macro.
21144         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21145         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21146         (mark_primary_bases): New function.
21147         (unmark_primary_bases): Likewise.
21148         * search.c (get_abstract_virtuals_1): Remove.
21149         (dfs_mark_primary_bases): New function.
21150         (mark_primary_bases): Likewise.
21151         (dfs_unmark_primary_bases): Likewise.
21152         (unmark_primary_bases): Likewise.
21153         (dfs_get_pure_virtuals): Likewise.
21154
21155 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
21156
21157         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
21158         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
21159         (modify_one_vtable): Adjust.
21160         (fixup_vtable_deltas1): Likewise.
21161         (override_one_vtable): Likewise.
21162         * search.c (get_abstract_virtuals_1): Likewise.
21163         (get_pure_virtuals): Likewise.
21164         (expand_upcast_fixups): Likewise.
21165         * tree.c (debug_binfo): Likewise.
21166
21167         * class.c (build_vtable): Don't return a value.  Don't rebuild
21168         vtables for bases that have already been handled.
21169         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
21170         already been handled.
21171         (modify_one_vtable): Adjust accordingly.
21172         (fixup_vtable_deltas1): Likewise.
21173         (finish_struct_1): Likewise.
21174
21175 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
21176
21177         * call.c (build_new_method_call): Also check destructors.