* decl.c (cxx_scope_descriptor): Fix thinko.
[official-gcc.git] / gcc / cp / ChangeLog
blob6b0fa8abfd9153cce5c33189b20132b4e46a46a3
1 2003-09-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3         * decl.c (cxx_scope_descriptor): Fix thinko.
4         (struct cp_binding_level): Adjust type of binding_depth field. 
6 2003-09-18  Danny Smith  <dannysmith@users.sourceforge.net>
8         PR c++/12320
9         * call.c (type_passed_as): Check for incomplete type.
10         (convert_for_arg_passing): Likewise.
12 2003-09-18  Nathan Sidwell  <nathan@codesourcery.com>
14         PR c++/9848
15         * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
16         here.
17         * semantics.c (expand_body): Set it here on the remaining clones.
19 2003-09-18  Roger Sayle  <roger@eyesopen.com>
21         * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
22         * class.c (instantiate_type): Remove FFS_EXPR case.
24 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
26         * ChangeLog: Fix recent commit.
28 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
30         * ChangeLog: Add PR number to patch for PR c++/12316.
32 2003-09-18  Gabriel Dos Reis <gdr@integrable-solutions.net>
34         * error.c (dump_type): Simplify.  Use pp_type_specifier_seq for
35         "C" types. 
36         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
38 2003-09-17  Richard Henderson  <rth@redhat.com>
40         * semantics.c (expand_body): Don't save/restore input_location.
42 2003-09-17  Mark Mitchell  <mark@codesourcery.com>
44         PR c++/12266
45         * cp-tree.h (tsubst_flags_t): Add tf_conv.
46         * class.c (standard_conversion): Pass tf_conv to
47         instantiate_type.
48         (resolve_address_of_overloaded_function): Do not call mark_used
49         when just checking conversions.
51         PR debug/12066
52         * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
53         * cp-tree.h (cxx_builtin_type_decls): Declare.
54         * decl.c (builtin_type_decls): New variables.
55         (cxx_builtin_type_decls): New function.
56         (record_builtin_type): Add to builtin_type_decls.
58 2003-09-17  Richard Henderson  <rth@redhat.com>
60         PR c++/12316
61         * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
63 2003-09-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
65         PR c++/7939
66         * typeck.c (comptypes): Don't ICE when its first argument is
67         error_mark_node.
68         (compparms): Reverse the arguments of same_type_p.
70 2003-09-15  Nathan Sidwell  <nathan@codesourcery.com>
72         PR c++/12184
73         * typeck.c (convert_arguments): Return error_mark_node for an
74         incomplete parameter. Make error message more informative.
76 2003-09-12  Mark Mitchell  <mark@codesourcery.com>
78         PR c++/3907
79         * class.c (maybe_note_name_used_in_class): Refine test for whether
80         or not we are in a class scope.
82         * cp-tree.h (language_function): Remove x_expanding_p.
83         (expanding_p): Remove.
84         (doing_semantic_analysis_p): Remove.
85         (scope_kind): Add sk_function_parms, sk_class,
86         sk_namespace.
87         (innermost_scope_kind): New method.
88         * call.c (cxx_type_promotes_to): Use type_decays_to.
89         * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
90         (LANG_HOOKS_POPLEVEL): Likewise.
91         * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
92         template_spec_p, namespace_p, is_for_scope, is_try_scope, and
93         is_catch_scope.  Add kind and explicit_spec_p.
94         (cxx_scope_descriptor): Use a lookup table.
95         (find_class_binding_level): Use "kind" field in binding_level, not
96         the various flags.
97         (pop_binding_level): Likewise.
98         (innermost_nonclass_level): Likewise.
99         (toplevel_bindings_p): Likewise.
100         (namespace_bindings_p): Likewise.
101         (template_parm_scope_p): Likewise.
102         (innermost_scope_kind): New method.
103         (current_tmpl_spec_kind): Use "kind" field in binding_level, not
104         the various flags.
105         (pushlevel): Remove check for doing_semantic_analysis_p.
106         (begin_scope): Simplify.
107         (add_decl_to_level): Use "kind" field in binding_level, not
108         the various flags.
109         (push_local_binding): Likewise.
110         (pop_label): Remove check for doing_semantic_analysis_p.
111         (poplevel): Use "kind" field in binding_level, not
112         the various flags.
113         (set_block): Remove check for doing_semantic_analysis_p.
114         (pushlevel_class): Use "kind" field in binding_level, not
115         the various flags. 
116         (poplevel_class): Likewise.
117         (initial_push_namespace_scope): Likewise.
118         (maybe_push_to_top_level): Likewise.
119         (set_identifier_type_value_with_scope): Likewise.
120         (pop_everything): Likewise.
121         (maybe_process_template_type_declaration): Likewise.
122         (pushtag): Likewise.
123         (pushdecl): Likewise.
124         (pushdecl_with_scope): Likewise.
125         (check_previous_goto_1): Likewise.
126         (define_label): Likewise.
127         (finish_case_label): Likewise.
128         (lookup_tag): Likewise.
129         (unqualified_namespace_lookup): Likewise.
130         (lookup_name_real): Likewise.
131         (lookup_name_current_level): Likewise.
132         (lookup_type_current_level): Likewise.
133         (record_builtin_type): Likewise.
134         (cp_make_fname_decl): Likewise.
135         (maybe_inject_for_scope_var): Likewise.
136         (cp_finish_decl): Remove check for doing_semantic_analysis_p.
137         (start_function): Use begin_scope, not pushlevel.
138         (finish_function): Use "kind" field in binding_level, not
139         the various flags.
140         (start_method): Use begin_scope, not pushlevel.
141         (make_label_decl): Do not check expanding_p.
142         (save_function-data): Do not set expanding_p.
143         (cxx_push_function_context): Do not clear expanding_p.
144         * semantics.c (cxx_expand_function_start): Do not set expanding_p.
145         
146 2003-09-14  Mark Mitchell  <mark@codesourcery.com>
148         * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
149         an bit-field whose width exceeds that of its type.
151 2003-09-14  Geoffrey Keating  <geoffk@apple.com>
153         * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
155 2003-09-14  Kazu Hirata  <kazu@cs.umass.edu>
157         * ChangeLog: Follow spelling conventions.
158         * parser.c: Likewise.
160 2003-09-13  Richard Henderson  <rth@redhat.com>
162         * decl2.c (finish_file): Check cgraph_assemble_pending_functions
163         during relaxation loop.
165 2003-09-11  David Edelsohn  <edelsohn@gnu.org>
167         * decl2.c (var_finalized_p): Swap arms of conditional.
169 2003-09-10  Nathan Sidwell  <nathan@codesourcery.com>
171         PR c++/11788
172         * typeck.c (build_address): If it is a function, mark it used.
173         (build_unary_op): Do not lose object's side-effects when taking
174         address of static member function.
175         * class.c (resolve_address_of_overloaded_function): Use
176         tsubst_flags_t parameter. Only expect overload sets. Adjust.
177         (instantiate_type): Adjust flags passing. Do not lose object's
178         side-effects when taking address of static member function.
180 2003-09-11  Richard Henderson  <rth@redhat.com>
182         * semantics.c (expand_or_defer_fn): Update for new
183         cgraph_finalize_function argument.
185 2003-09-10  Richard Henderson  <rth@redhat.com>
187         * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
189 2003-09-10  Jan Hubicka  <jh@suse.cz>
191         * decl2.c (var_finalized_p): New.
192         (maybe_emit_vtables, write_out_vars, finish_file): Use it.
194 2003-09-10  Richard Henderson  <rth@redhat.com>
196         * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
197         mark_member_pointers.
198         (lower_function): Remove.
199         * cp-tree.h: Update to match.
200         * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
201         (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
203 2003-09-09  Richard Henderson  <rth@redhat.com>
205         * semantics.c (expand_or_defer_fn): Update call to 
206         cgraph_finalize_function.
208         * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
209         always.
211         * decl2.c (finish_file): Avoid out-of-bounds array reference
212         during memmove.
214 2003-09-09  Richard Henderson  <rth@redhat.com>
216         * decl2.c (mark_member_pointers): Rename from
217         mark_member_pointers_and_eh_handlers and don't check eh handlers.
219 2003-09-09  Christian Ehrhardt  <ehrhardt@mathematik.uni-ulm.de>
221         PR bootstrap/12168
222         * method.c (use_thunk): Clear DECL_RTL of copied nodes.
224 2003-09-08  Mark Mitchell  <mark@codesourcery.com>
226         * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
227         c_register_builtin_type.
229         PR c++/11786
230         * decl2.c (add_function): Do not complain about seeing the same
231         non-function twice.
232         * semantics.c (perform_koenig_lookup): Improve documentation.
234         PR c++/5296
235         * pt.c (try_one_overload): Add addr_p parameter.
236         (resolve_overloaded_unification): Pass it.
238 2003-09-08  Richard Henderson  <rth@redhat.com>
240         * optimize.c (maybe_clone_body): Inc/dec function_depth.
242 2003-09-08  Richard Henderson  <rth@redhat.com>
244         * decl.c (finish_function): Clear current_function_decl.
245         * decl2.c (mark_used): Don't push/pop gc context.
246         * optimize.c (optimize_function): Likewise.
247         * tree.c (cp_cannot_inline_tree_fn): Likewise.
248         * pt.c (instantiate_decl): Inc/dec function_depth instead.
249         * semantics.c (expand_body): Update for tree_rest_of_compilation
250         nested argument.
252 2003-09-07  Gabriel Dos Reis  <gcc@integrable-solutions.net>
254         PR c++/11762
255         * error.c (dump_decl): Handle namespace-alias-definition.
256         * decl.c (warn_extern_redeclared_static): There is no point in
257         checking changes in storage class specifier for a namespace
258         declaration. 
259         (duplicate_decls): Tidy diagnostic message.
260         * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
261         (pp_cxx_right_brace): Likewise.
262         (pp_cxx_original_namespace_definition): New function.
263         (pp_cxx_namespace_alias_definition): Likewise.
264         (pp_cxx_declaration): Use them.  Handle NAMESPACE_DECLs.
266 2003-09-07  Jan Hubicka  <jh@suse.cz>
268         * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
269         Avoid re-emitting variables in unit-at-a-time mode.
271 2003-09-06  Mark Mitchell  <mark@codesourcery.com>
273         PR c++/11867
274         * call.c (standard_conversion): Improve comments.
275         (perform_direct_initialization): Make sure we return an expression
276         of the correct type.
277         * typeck.c (build_static_cast): Check for ambiguity and
278         accessibility when performing conversions.
280 2003-09-06  Gabriel Dos Reis  <gdr@integrable-solutions.net>
282         * cp-tree.h (add_binding): Remove declaration.
283         * name-lookup.h (supplement_binding): Declare.
284         * decl.c (add_binding): Move to name-lookup.c.
285         (push_local_binding): Adjust.
286         (push_class_binding): Likewise.
287         (set_identifier_type_value_with_scope): Likewise.
288         * name-lookup.c (supplement_binding): Rename from add_binding.
289         Return a bool.  Improve documentation. 
290         (set_namespace_binding): Adjust.
291         * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
293 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
295         PR c++/11794
296         * class.c (pushclass): Push dependent using decls for nested
297         classes of templates too.
299 2003-09-06  Roger Sayle  <roger@eyesopen.com>
301         PR c++/11409
302         * class.c (resolve_address_of_overloaded_function): When building
303         list of matching non-template function decls, ignore anticipated
304         declarations of undeclared or shadowed GCC builtins.
306 2003-09-06  Steven Bosscher  <steven@gcc.gnu.org>
308         PR c++/11595
309         * decl.c (define_label): Remove unreachable timevar pop.
310         Always return the decl, even if the definition is invalid.
312 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
314         PR c++/12167
315         * parser.c (cp_parser_late_parsing_default_args): Push & pop the
316         unparsed functions queue.
318 2003-09-05  Mark Mitchell  <mark@codesourcery.com>
320         PR c++/12163
321         * call.c (perform_direct_initialization): Correct logic for
322         direct-initialization of a class type.
324         PR c++/12146
325         * pt.c (lookup_template_function): Robustify.
327 2003-09-05  Nathan Sidwell  <nathan@codesourcery.com>
329         PR c++/11922
330         * pt.c (tsubst_qualified_id): Make sure we get a non-type.
331         (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
332         is_type_p to lookup_qualified_name.
334         * semantics.c (finish_call_expr): Refactor some code.
336         PR c++/12037
337         * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
338         (build_min_non_dep): Declare.
339         * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
340         (build_min_non_dep): New.
341         * cvt.c (convert_to_void): Don't explicitly copy
342         TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
343         * call.c (build_new_method_call): Use build_min_non_dep.
344         * decl2.c (grok_array_decl): Likewise.
345         (build_offset_ref_call_from_tree): Likewise.
346         * typeck.c (finish_class_member_access_expr,
347         build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
348         build_x_conditional_expr, build_x_compound_expr): Likewise.
349         (build_static_cast, build_reinterpret_cast,
350         build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
351         * typeck2.c (build_x_arrow): Use build_min_non_dep.
352         (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
353         template.
354         * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
355         (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
356         * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
358 2003-09-04  Richard Henderson  <rth@redhat.com>
360         * decl2.c (mark_member_pointers_and_eh_handlers): Update for
361         change in cgraph_mark_needed_node arguments.
363 2003-09-02  Geoffrey Keating  <geoffk@apple.com>
365         PR 12161
366         * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
367         * tree.c (cp_cannot_inline_tree_fn): Likewise.
369 2003-09-04  Nathan Sidwell  <nathan@codesourcery.com>
371         * cp-tree.h (finish_sizeof, finish_alignof): Remove.
372         (expr_sizeof): Replace with ...
373         (cxx_sizeof_or_alignof_expr): ... here.
374         (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
375         * parser.c (cp_parser_unary_expression): Commonize alignof and
376         sizeof handling.
377         * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
378         substitution.
379         * semantics.c (finish_sizeof, finish_alignof): Remove.
380         * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
381         becomes bool. Set TREE_READONLY.
382         (expr_sizeof): Replace with ...
383         (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
385 2003-09-04  Mark Mitchell  <mark@codesourcery.com>
387         Remove cast-as-lvalue extension.
388         * call.c (build_conditional_expr): Correct formatting.
389         (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
390         (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
391         * cp-tree.h (non_cast_lvalue_p): Remove.
392         (real_non_cast_lvalue_p): Remove.
393         (non_cast_lvalue_or_else): Remove.
394         * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
395         (real_lvalue_p): Adjust call to lvalue_p_1.
396         (non_cast_lvalue_p): Remove.
397         (non_cast_lvalue_or_else): Remove.
398         (lvalue_p): Adjust call to lvalue_p_1.
399         (lvalue_or_else): Simplify.
400         * typeck.c (build_unary_op): Use lvalue_or_else, not
401         non_cast_lvalue_or_else.
402         (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
404 2003-09-03  DJ Delorie  <dj@redhat.com>
406         * decl.c (finish_function): Pass fndecl to aggregate_value_p.
408 2003-09-03  Mark Mitchell  <mark@codesourcery.com>
410         PR c++/12053
411         * class.c (include_empty_classes): Correct logic for ABI version 1.
413 2003-09-03  Richard Henderson  <rth@redhat.com>
415         * optimize.c (optimize_function): Push/pop ggc context around
416         the call to optimize_inline_calls.
418 2003-09-02  Scott Brumbaugh  <scottb.lists@verizon.net>
420         PR c++/11553
421         * parser.c (cp_parser_decl_specifier_seq): Add check for a
422         duplicate friend decl-specifier.
424 2003-09-02  Mark Mitchell  <mark@codesourcery.com>
426         PR c++/11847
427         * pt.c (convert_nontype_argument): Correct representation of
428         REFERENCE_TYPE expressions.
430         PR c++/11808
431         * cp-tree.h (KOENIG_LOOKUP_P): New macro.
432         (finish_call_expr): Change prototype.
433         * parser.c (cp_parser_postfix_expression): Adjust call to
434         finish_call_expr.
435         * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
436         * semantics.c (finish_call_expr): Add koenig_p parameter.
438 2003-09-01  Mark Mitchell  <mark@codesourcery.com>
440         PR c++/12114
441         * cp-tree.h (initialize_reference): Change prototype.
442         * call.c (initialize_reference): Add cleanup parameter.
443         * decl.c (grok_reference_init): Likewise.
444         (check_initializer): Likewise.
445         (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
446         (duplicate_decls): When replacing an anticipated builtin, do not
447         honor TREE_NOTHROW.
448         * typeck.c (convert_for_initialization): Correct call to
449         initialize_reference.
451         PR c++/11972
452         * pt.c (dependent_type_p_r): Pass only the innermost template
453         arguments to any_dependent_template_arguments_p.
455 2003-09-01  Josef Zlomek  <zlomekj@suse.cz>
457         * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
458         * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
459         * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
460         * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
461         (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
463 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
465         PR c++/12093
466         * pt.c (build_non_dependent_expr): Do not build a
467         NON_DEPENDENT_EXPR for a STRING_CST.
469         PR c++/11928
470         * search.c (add_conversions): Avoid adding two conversion
471         operators for the same type.
473 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
475         PR c++/6196
476         * pt.c (tsubst_copy_and_build): Correct handling of
477         address-of-label extension.
478         * semantics.c (finish_goto_stmt): The address of a label must go
479         through the lvalue-to-rvalue conversion.
481 2003-08-29  Richard Henderson  <rth@redhat.com>
482             Jason Merrill <jason@redhat.com>
484         * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
485         (LANG_HOOKS_RTL_EXPAND_STMT): New.
486         * cp-tree.h (cxx_expand_function_start): Declare.
487         * decl.c (start_function): Use allocate_struct_function.
488         Move stmts_are_full_exprs_p assertion from expand_body.
489         Do not free_after_parsing or free_after_compilation.
490         (cxx_push_function_context): Move code to set struct function
491         data from genrtl_start_function.
492         * optimize.c (optimize_function): Don't inc/dec function_depth.
493         * semantics.c (expand_body): Use tree_rest_of_compilation.
494         (cxx_expand_function_start): Rename from genrtl_start_function,
495         omit bits done by tree_rest_of_compilation.
496         (genrtl_finish_function): Remove.
497         (clear_decl_rtl): Move to ../tree-optimize.c.
499 2003-08-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
501         PR c++/11811
502         * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
503         function. 
504         * cxx-pretty-print.h: Declare.
505         * error.c (dump_template_parameter): Use it.
506         (dump_type): Likewise.
508 2003-08-28  Mark Mitchell  <mark@codesourcery.com>
510         * init.c (decl_constant_value): Deal with COND_EXPR specially.
511         * call.c (build_conditional_expr): Revert previous patch.
513         PR optimization/5079
514         * call.c (build_conditional_expr): Use decl_constant_value to
515         simplify the arguments.
517 2003-08-26  Dan Nicolaescu  <dann@ics.uci.edu>
519         * parser.c (struct cp_token): Use enum bitfields.
520         (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
521         512B allocation unit.
522         (cp_parser_token_tree_map_node): Use enum bitfields.
524 2003-08-26  Nathan Sidwell  <nathan@codesourcery.com>
526         PR c++/11871
527         * decl.c (push_class_level_binding): Correct old_decl value from
528         my 2003-07-29 reorganization.
530         * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
531         (build_new_method_call): Add goto finish.
532         * semantics.c (simplify_aggr_init_exprs_r): Don't set
533         TREE_SIDE_EFFECTS on a call.
535 2003-08-25  Richard Henderson  <rth@redhat.com>
537         * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
539 2003-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
541         * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
542         (cxx_pretty_printer): Adjust base type.
543         (pp_cxx_function_specifier): Declare.
544         * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
545         (pp_cxx_left_paren): Likewise.
546         (pp_cxx_right_paren): Likewise.
547         (pp_cxx_dot): Likewise.
548         (pp_cxx_arrow): Likewise.
549         (pp_cxx_semicolon): Likewise.
550         (pp_cxx_identifier): Likewise.
551         (pp_cxx_cv_qualifier_seq): Likewise.
552         (pp_cxx_storage_class_specifier): Likewise.
553         (pp_cxx_expression_list): Likewise.
554         (pp_cxx_space_for_pointer_operator): Likewise.
555         (pp_cxx_init_declarator): Likewise.
556         (pp_cxx_call_argument_list): Likewise.
557         (pp_cxx_nonconsecutive_character): Tidy.
558         (pp_cxx_conversion_function_id): New function.
559         (pp_cxx_template_id): Likewise.
560         (pp_cxx_template_keyword_if_needed): Likewise.
561         (pp_cxx_nested_name_specifier): Likewise.
562         (pp_cxx_unqualified_id): Tidy
563         (pp_cxx_qualified_id): Handle more nodes.
564         (pp_cxx_primary_expression): Tidy.
565         (pp_cxx_postfix_expression): Likewise.
566         (pp_cxx_new_expression): Tidy.
567         (pp_cxx_delete_expression): Likewise.
568         (pp_cxx_cast_expression): New function.
569         (pp_cxx_pm_expression): Tidy.
570         (pp_cxx_conditional_expression): Likewise.
571         (pp_cxx_assignment_operator): New function.
572         (pp_cxx_assignment_expression): Tidy.
573         (pp_cxx_expression): New function.
574         (pp_cxx_function_specifier): Likewise.
575         (pp_cxx_decl_specifier_seq): Likewise.
576         (pp_cxx_simple_type_specifier): Tidy.
577         (pp_cxx_type_specifier_seq): Likewise.
578         (pp_cxx_ptr_operator): New function.
579         (pp_cxx_implicit_parameter_type): Likewise.
580         (pp_cxx_parameter_declaration): Tidy.
581         (pp_cxx_parameter_declaration_clause): New function.
582         (pp_cxx_exception_specification): Likewise.
583         (pp_cxx_direct_declarator): Tidy.
584         (pp_cxx_declarator): Likewise.
585         (pp_cxx_ctor_initializer): New function.
586         (pp_cxx_function_definition): Likewise.
587         (pp_cxx_abstract_declarator): Tidy.
588         (pp_cxx_direct_abstract_declarator): Likewise.
589         (pp_cxx_type_id): Likewise.
590         (pp_cxx_exception_declaration): New function.
591         (pp_cxx_statement): Likewise.
592         (pp_cxx_simple_declaration): Likewise.
593         (pp_cxx_template_parameter_list): Likewise.
594         (pp_cxx_template_parameter): Likewise.
595         (pp_cxx_template_declaration): Likewise.
596         (pp_cxx_explicit_specialization): Likewise.
597         (pp_cxx_explicit_instantiation): Likewise.
598         (pp_cxx_declaration): Tidy.
599         (pp_cxx_pretty_printer_init): Initialize more fields.
601 2003-08-25  Mark Mitchell  <mark@codesourcery.com>
603         PR c++/8795
604         * cp-tree.h (build_cplus_method_type): Remove.
605         * call.c (standard_conversion): Use build_method_type_directly
606         instead of build_cplus_method_type.
607         * class.c (build_clone): Likewise.
608         (adjust_clone_args): Likewise.
609         * decl.c (build_ptrmem_type): Likewise.
610         (grokdeclarator): Likewise.
611         (check_function_type): Likewise.
612         * decl2.c (grok_method_quals): Likewise.
613         (maybe_retrofit_in_chrg): Likewise.
614         * pt.c (copy_default_args_to_explicit_spec): Likewise.
615         (tsubst_function_type): Likewise.
616         (tsubst): Likewise.
617         * tree.c (build_cplus_method_type): Remove.
618         * typeck.c (merge_types): Use build_method_type_directly.
620 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
622         PR c++/3765
623         * search.c (dfs_access_in_type): Fix typo in comment.
624         (dfs_accessible_queue_p): Likewise.
625         (dfs_accessible_p): Only terminate when a friend is found.
626         (accessible_p): Return immediately if access_in_type allows
627         access.
629 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
631         PR c++/641, c++/11876
632         * friend.c (add_friend): Add complain parameter.
633         (make_friend_class): Likewise.
634         (do_friend): Adjust add_friend call.
635         * decl.c (grokdeclarator): Adjust make_friend_class call.
636         * parser.c (cp_parser_member_declaration): Likewise.
637         (cp_parser_template_declaration_after_exp): Likewise.
638         * pt.c (instantiate_class_template): Adjust make_friend_class
639         and add_friend call.
640         * cp-tree.h (make_friend_class): Adjust declaration.
641         (add_friend): Likewise.
643 2003-08-21  Jason Merrill  <jason@redhat.com>
645         PR c++/11283
646         * call.c (build_conditional_expr): Ignore cv-qual differences for
647         non-class types.
649 2003-08-21  Mark Mitchell  <mark@codesourcery.com>
651         PR c++/11551
652         * parser.c (cp_parser_id_expression): Add declarator_p parameter.
653         (cp_parser_primary_expression): Adjust call to
654         cp_parser_id_expression.
655         (cp_parser_unqualified_id): Complain about the use of
656         typedef-names in a destructor declarator.
657         (cp_parser_postfix_expression): Adjust call to
658         cp_parser_id_expression.
659         (cp_parser_type_parameter): Likewise.
660         (cp_parser_template_argument): Likewise.
661         (cp_parser_declarator_id): Likewise.
663         PR c++/11919
664         * call.c (standard_conversion): Use same_type_p, not pointer
665         equality, to compare types.
667         PR c++/10762
668         * parser.c (cp_parser_using_declaration): Check for invalid uses
669         of template-ids here...
670         * decl2.c (do_class_using_decl): ... rather than here.
672 2003-08-20  Mark Mitchell  <mark@codesourcery.com>
674         PR c++/11834
675         * pt.c (more_specialized): Bump processing_template_decl.
677 2003-08-21  Jason Merrill  <jason@redhat.com>
679         PR c++/11614
680         * decl.c (grokdeclarator): Recognize a flexible array based on the
681         type, not the form of the declarator.
683 2003-08-20  Jason Merrill  <jason@redhat.com>
685         * semantics.c (simplify_aggr_init_expr): Split out from
686         simplify_aggr_init_exprs_r.  Convert slot address to match
687         the return type.
688         * cp-tree.h: Declare it.
689         * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
690         DECL_NAME of a user variable.
692 2003-08-20  Nathan Sidwell  <nathan@codesourcery.com>
694         PR c++/11945
695         * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
696         COMPOUND_EXPR.
697         * semantics.c (finish_expr_stmt): Always convert to void.
698         * typeck.c (build_x_compound_exp): Always convert to void.
700 2003-08-19  Mark Mitchell  <mark@codesourcery.com>
702         PR c++/11684
703         * cp-tree.h (grok_op_properties): Change prototype.
704         * decl.c (grok_op_properties): Add complain parameter.
705         (grokfndecl): Pass it.
706         * pt.c (tsubst_decl): Adjust accordingly.
708         PR c++/10926
709         * decl.c (start_method): Return immediately if push_template_decl
710         does not like the declaration.
711         * pt.c (push_template_decl_real): Disallow member template
712         destructors.
714         PR c++/11036
715         * cp-tree.h (add_binding): Add prototype.
716         * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
717         (maybe_warn_about_overly_private_class): Use
718         CLASSTYPE_DESTRUCTORS.
719         (pushclass): Adjust call to set_identifier_type_value.
720         * decl.c (add_binding): Give it external linkage.
721         (push_local_binding): Adjust call to add_binding.
722         (push_class_binding): Likewise.
723         (set_identifier_type_value_with_scope): Change prototype.  Use
724         add_binding for global bindings.
725         (set_identifier_type_value): Adjust accordingly.
726         (pushtag): Likewise.
727         (pushdecl): Use set_identifier_type_value, not
728         set_identifier_type_value_with_scope.
729         (pushdecl_namespace_level): Adjust calls to
730         SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
731         (pushdecl_class_level): Likewise.
732         (lookup_tag): Use select_decl.
733         (select_decl): Improve comment.
734         (record_builtin_type): Do not call pushdecl.
735         (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
736         (cp_finish_decl): Adjust call to set_identifier_type_value.
737         (check_elaborated_type_specifier): Improve checks for invalid uses
738         of typedefs.
739         (xref_tag): Adjust call to check_elaborated_type_specifier.
740         * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
741         * name-lookup.c (set_namespace_binding): Use add_binding.
742         * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
743         rather than an IDENTIFIER_NODE, to represent built-in types, if
744         requested by the caller.
745         (cp_parser_postfix_expression): Adjust call.
746         (cp_parser_type_specifier): Likewise.
747         (cp_parser_elaborated_type_specifier): Adjust call to
748         check_elaborated_type_specifier.
749         * typeck2.c (build_functional_cast): Do not perform name lookups.
751         PR c++/10717
752         * decl.c (expand_static_init): Remove unncessary code.
754 2003-08-19  Andrew Pinski  <pinskia@physics.uc.edu>
756         PR c++/10538, PR c/5582
757         * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
759 2003-08-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
761         PR c++/11174
762         * init.c (build_offset_ref): Perform access checking for
763         pointer to member correctly.
765 2003-08-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
767         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
769 2003-08-18  Nathan Sidwell  <nathan@codesourcery.com>
771         PR c++/11957
772         * cp-tree.h (finish_stmt_expr): Add bool parameter.
773         * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
774         adjust the stmt_expr here.
775         (build_vec_init): Use finish_stmt_expr_expr, convert result to
776         array type.
777         * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
778         call.
779         * pt.c (tsubst_copy): Likewise.
780         * semantics.c (finish_stmt_expr): Add parameter.
782         * pt.c (instantiate_class_template): Push to class's scope before
783         tsubsting base.
785 2003-08-17  Jan Hubicka  <jh@suse.cz>
787         PR C++/11702
788         * semantics.c (finish_id_expression): Mark all functions as used.
790 2003-08-16  Nathan Sidwell  <nathan@codesourcery.com>
792         PR c++/11512
793         * cvt.c (convert_to_void): Indicate which side of conditional has
794         no effects, and rhs of comma operator. Test for no sideeffect
795         expressions here and always build a convert expr.
796         * init.c (expand_default_init): Convert the init to void.
797         * typeck.c (build_x_compound_expr): Do not check for side effects
798         here.
799         (build_compound_expr): Do not convert lhs when building a
800         template.
802 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
804         * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
805         * decl2.c (build_offset_ref_call_from_tree): Use
806         build_non_dependent_expr.
807         * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
808         * pt.c (build_non_dependent_expr): Set operand.
810 2003-08-14  Jan Hubicka  <jh@suse.cz>
812         * decl2.c (mark_member_pointers): Rename to...
813         (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
814         (lower_function): Update call.
815         * except.c (eh_type_info): Break out from ...
816         (build_eh_type): ... here; tinfo is already used.
817         (finish_eh_spec_block): Mark tinfos as used.
818         * semantics.c (finish_handler_params): Mark tinfo as used.
819         * cp-tree.h (eh_type_info): Declare.
821 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
823         * pt.c (instantiate_class_template): Set location before
824         substuting bases.
826         * decl.c (make_typename_type): Use my_friendly_assert.
827         * pt.c (tsubst_aggr_type): Rearrange context substitution.
829 2003-08-14  Jan Hubicka  <jh@suse.cz>
831         * method.c (use_thunk): Expand body directly.
833 2003-08-12  Mark Mitchell  <mark@codesourcery.com>
835         PR c++/11703
836         * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
837         determine whether or not to promote types.
838         (convert_for_arg_passing): Likewise.
839         * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
840         templates.
841         * pt.c (tsubst_decl): Do not expect it to be set.
843         PR c++/9512
844         PR c++/10923
845         * cp-tree.h (check_elaborated_type_specifier): Declare.
846         (handle_class_head): Remove.
847         (note_got_semicolon): Likewise.
848         (note_list_got_semicolon): Likewise.
849         (finish_class_definition): Likewise.
850         * decl.c (check_elaborated_type_specifier): Make it public.
851         Robustify.
852         (handle_class_head): Remove.
853         * parser.c (cp_parser_elaborated_type_specifier): Use
854         check_elaborated_type_specifier.
855         (cp_parser_class_specifier): Do not call finish_class_definition.
856         (cp_parser_class_head): Or handle_class_head.  Check for
857         over-qualified names.
858         * semantics.c (finish_class_definition): Remove.
860         * parser.c (cp_parser_check_for_definition_in_return_type): New
861         function.
862         (cp_parser_simple_declaration): Adjust call to
863         cp_parser_init_declarator.
864         (cp_parser_decl_specifier_seq): Change type of
865         declares_class_or_enum parameter.
866         (cp_parser_explicit_instantiation): Adjust accordingly.
867         (cp_parser_type_specifier): Change type of
868         declares_class_or_enum parameter.
869         (cp_parser_init_declarator): Add declares_class_or_enum
870         parameter.
871         (cp_parser_parameter_declaration): Adjust call to
872         cp_parser_decl_specifier_seq.
873         (cp_parser_function_definition): Likewise.
874         (cp_parser_member_declaration): Likewise.
875         (cp_parser_single_declaration): Likewise.
877         * cp-tree.h (lang_type_class): Remove has_call_overloaded,
878         has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
879         (TYPE_OVERLOADS_CALL_EXPR): Remove.
880         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
881         (TYPE_OVERLOADS_ARROW): Likewise.
882         (CLASSTYPE_GOT_SEMICOLON): Likewise.
883         * class.c (check_bases): Do not set them.
884         (finish_struct_1): Likewise.
885         * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
886         (build_ptrmemfunc_type): Likewise.
887         (grok_op_properties): Do not set TYPE_OVERLOADS_*.
888         (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
889         * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
890         * lex.c (note_got_semicolon): Remove.
891         (note_list_got_semicolon): Likewise.
892         * parser.c (cp_parser_simple_declaration): Do not call
893         note_list_got_semicolon.
894         * pt.c (list_eq): Remove.
895         (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
896         (instantiate_class_template): Do not set TYPE_OVERLOADS*.
897         (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
898         * ptree.c (cxx_print_type): Do not print them.
899         * semantics.c (finish_member_class_template): Do not call
900         note_list_got_semicolon.
902 2003-08-11  Aldy Hernandez  <aldyh@redhat.com>
904         * call.c (standard_conversion): Opaque pointers interconvert.
906         * testsuite/g++.dg/other/opaque-3.C: New.
908 2003-08-11  Mark Mitchell  <mark@codesourcery.com>
910         * typeck.c (merge_types): Handle cv-qualified pointer-to-member
911         types correctly.
913 2003-08-10  Mark Mitchell  <mark@codesourcery.com>
915         PR c++/11789
916         * cp-tree.h (get_vbase): Remove.
917         (get_vbase_types): Remove.
918         * init.c (expand_member_init): Correct logic for looking up base
919         classes.
921 2003-08-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
923         * error.c (dump_expr): Tidy.
924         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
925         (pp_cxx_begin_template_argument_list): Likewise.
926         (pp_cxx_end_template_argument_list): Likewise.
927         (is_destructor_name): Likewise.
928         (pp_cxx_unqualified_id): Likewise.
929         (pp_cxx_qualified_id): Likewise.
930         (pp_cxx_id_expression): Likewise.
931         (pp_cxx_new_expression): Likewise.
932         (pp_cxx_delete_expression): Likewise.
933         (pp_cxx_pm_expression): Likewise.
934         (pp_cxx_type_specifier): Rework.
935         (pp_cxx_type_id): Likewise.
936         (pp_cxx_primary_expression): Likewise.
937         (pp_cxx_postfix_expression): Likewise.
938         (pp_cxx_unary_expression): Likewise.
939         (pp_cxx_multiplicative_expression): Likewise.
940         (pp_cxx_conditional_expression): Likewise.
941         (pp_cxx_assignment_expression): Likewise.
942         (pp_cxx_pretty_printer_init): Tidy.
944 2003-08-10  Nathan Sidwell  <nathan@codesourcery.com>
946         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
947         NODE is always a TREE_VEC of nonzero size.
948         (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
949         * decl2.c (arg_assoc): Template args will be a vec.
950         * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
951         dump_template_argument_list.
952         (dump_template_parms): Args will be a vec.
953         * parser.c (cp_parser_template_argument_list): Produce a
954         vector, not a list.
955         * pt.c (coerce_template_parms): Args are always vectors.
956         (mangle_class_name_for_template): Likewise.
957         (lookup_template_function): Likewise.
958         (lookup_template_class): Likewise.
959         (tsubst_template_args): Likewise.
960         (tsubst_baselink): Use tsubst_template_args.
961         (tsubst_qualified_id): Likewise.
962         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
963         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
964         (any_dependent_template_args_p):  Args are always vectors.
965         * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
967         PR c++/11670
968         * call.c (convert_like_real): Add rvalue binding error message.
969         * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
970         really a cast.
972         PR c++/10530
973         * pt.c (dependent_type_p_r): A dependent template-id is a class
974         type with dependent template arguments, or a bound template
975         template parameter.
976         (type_dependent_expression_p): A template function decl cannot
977         have a dependent context.
979 2003-08-07  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
981         PR c++/5767
982         * parser.c (cp_parser_class_name): Return immediately when scope
983         is error_mark_node.
985 2003-08-07  Aldy Hernandez  <aldyh@redhat.com>
987         * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
989         * cp/call.c (standard_conversion): Support opaque types.
990         Include target.h.
991         (strip_top_quals): Use cp_build_qualified_type instead of
992         TYPE_MAIN_VARIANT.
994         * cp/typeck.c (convert_for_assignment): Support opaque types.
996         * testsuite/g++.dg/other/opaque-1.C: New.
998         * testsuite/g++.dg/other/opaque-2.C: New.
1000 2003-08-06  Aldy Hernandez  <aldyh@redhat.com>
1002         * decl.c (grokparms): Use cp_build_qualified_type instead
1003         TYPE_MAIN_VARIANT.
1005 2003-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1007         * cxx-pretty-print.h: New file.
1008         * cxx-pretty-print.c: Likewise.
1009         * error.c (scratch_pretty_printer): Change type.
1010         (init_error): Tidy.
1011         (dump_aggr_type): Likewise.
1012         (dump_global_iord): Likewise.
1013         (dump_expr): Likewise.
1014         (dump_char): Remove.
1015         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1016         (cxx_initialize_diagnostics): New function.
1017         * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1018         (CXX_PRETTY_PRINT_H): New variable.
1019         (cp/cxx-pretty-print.o): New rule.
1020         (cp/cp-lang.o): Update dependence.
1021         (cp/error.o): Likewise.
1023 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
1025         * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1026         (DECL_DECLARED_INLINE_P): Remove.
1027         * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1028         if decl is a FUNCTION_DECL.  This never made sense, but now it is
1029         required to avoid a tree check failure.
1030         * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1031         * optimize.c (maybe_clone_body): Likewise.
1033 2003-08-04  Roger Sayle  <roger@eyesopen.com>
1035         * decl.c (cxx_insert_default_attributes): Delete.
1036         * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1037         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1039 2003-08-03  Nathan Sidwell  <nathan@codesourcery.com>
1041         PR c++/11704
1042         * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1043         unknown type.
1045         PR c++/11766
1046         * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1047         member functions.
1049 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1051         PR c++/9447
1052         * cp-tree.def (USING_DECL): Document its type.
1053         * class.c (pushclass): If we're entering a template, push any
1054         dependent using decls it has.
1055         * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1056         a dependent scope.
1057         * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1058         (tsubst): Remove USING_DECL checks.
1059         (type_dependent_expression_p): Remove USING_DECL case.
1060         * semantics.c (finish_member_declaration): A USING_DECL's type
1061         indicates whether it is dependent.
1063 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1065         * cp-tree.h (pushclass): Remove unneeded parameter.
1066         * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1067         (push_nested_class): Adjust pushclass call.
1068         * pt.c (instantiate_class_template): Likewise.
1069         * semantics.c (begin_class_definition): Likewise.
1071 2003-08-01  Nathanael Nerode  <neroden@gcc.gnu.org>
1073         * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
1075 2003-08-01  Mark Mitchell  <mark@codesourcery.com>
1077         PR c++/11697
1078         * decl.c (decls_match): Don't ignore the types of template
1079         classes.
1081         PR c++/11744
1082         * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
1084 2003-08-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1086         PR c++/8442, c++/8806
1087         * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
1088         preferred.
1089         (check_elaborated_type_specifier): Add allow_template_p
1090         parameter.  Check tag mismatch and class template.
1091         (xref_tag): Add template_header_p parameter.  Add assertion
1092         that name is an IDENTIFIER_NODE.  Remove implicit typename
1093         warning.  Simplify lookup process if globalize is true.
1094         (cxx_init_decl_processing): Adjust call to xref_tag.
1095         (xref_tag_from_type): Likewise.
1096         * decl2.c (handle_class_head): Likewise.
1097         * parser.c (cp_parser_elaborated_type_specifier,
1098         cp_parser_class_head): Likewise.
1099         * rtti.c (init_rtti_processing, build_dynamic_cast1,
1100         tinfo_base_init, emit_support_tinfos): Likewise.
1101         * class.c (is_base_of_enclosing_class): Remove.
1102         * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
1103         template template argument.
1104         * cp-tree.h (xref_tag): Adjust declaration.
1105         (is_base_of_enclosing_class): Remove.
1106         * NEWS: Document template template argument change.
1108 2003-08-01  Nathan Sidwell  <nathan@codesourcery.com>
1110         * parser.c (cp_parser_init_declarator,
1111         cp_paser_member_declaration): Reformat.
1112         * pt.c (lookup_template_class, type_unification_real, unify,
1113         type_dependent_expression_p): Reformat.
1115         PR c++/11295
1116         * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
1117         tf_stmt_expr_body.
1118         (finish_stmt_expr_expr): Declare.
1119         * parser.c (cp_parser_primary_expression): Tell
1120         cp_parser_compount_statement that it is a statement expression.
1121         (cp_parser_statement, cp_parser_labeled_statement,
1122         cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
1123         in_statement_expr_p parameter.
1124         (cp_parser_expression_statement): Likewise. Call
1125         finish_stmt_expr_expr for final expression of a statement
1126         expression.
1127         (cp_parser_for_init_statement,
1128         cp_parser_implicitly_scoped_statement,
1129         cp_parser_already_scoped_statement, cp_parser_function_definition,
1130         cp_parser_try_block, cp_parser_handled): Adjust.
1131         * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
1132         (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
1133         (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
1134         * semantics.c (finish_expr_stmt): Do not deal with statement
1135         expressions.
1136         (begin_stmt_expr): Clear last_expr_type.
1137         (finish_stmt_expr_expr): New.
1138         (finish_stmt_expr): Process the value expression.
1140         * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
1141         compound expr inside the target's initializer.
1143         PR c++/11525
1144         * parser.c (cp_parser_primary_expression): Do not set
1145         non-constant-p merely because it is a dependent scope.
1147         PR c++/9447
1148         * decl2.c (do_class_using_decl): Set type to NULL_TREE.
1149         * semantics.c (finish_expr_stmt): Do not convert to void in a
1150         template.
1152 2003-07-31  Nathan Sidwell  <nathan@codesourcery.com>
1154         * pt.c (coerce_template_parms): Refactor.
1155         (fn_type_unification): Increment processing_template_decl when
1156         tsubsting an incomplete set of explicit args.
1158         PR c++/11347
1159         * pt.c (instantiate_class_template): Increment
1160         processing_template_decl around the tsubst of a template member
1161         class.
1162         (tsubst_qualified_id): Assert we do not have a dependent scope.
1164         * pt.c (coerce_template_template_parms, lookup_template_class,
1165         can_complete_type_without_circularity, instantiate_class_template,
1166         tsubst_decl, unify): Reformat.
1168 2003-07-31  Jan Hubicka  <jh@suse.cz>
1170         * decl2.c (maybe_make_one_only): Use mark_referenced.
1171         * method.c (use_thunk): Likewsie.
1173 2003-07-30  Jan Hubicka  <jh@suse.cz>
1175         * class.c (build_vtable_entry_ref): Kill.
1176         (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
1177         (build_vfn_ref): Do not call build_vtable_entry_ref.
1178         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
1179         * cp-tree.h (prepare_assemble_variable): Kill.
1180         * cp-decl.c (prepare_assemble_variable): Kill.
1182 2003-07-29  Geoffrey Keating  <geoffk@apple.com>
1184         * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
1185         of setting valid_pch by hand.
1187 2003-07-29  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1189         * decl.c (finish_enum): Initialize underlying_type.
1191 2003-07-29  Nathan Sidwell  <nathan@codesourcery.com>
1193         PR c++/9447
1194         * decl.c (add_binding): Add bval local variable.
1195         (push_class_level_binding): Likewise. Allow a USING_DECL to be
1196         pushed.
1197         * decl2.c (do_class_using_decl):  The type of a using decl is
1198         unknown.
1199         * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
1200         function call lookup code.
1201         * pt.c (tsubst): A USING_DECL will have unknown type.
1202         (tsubst_copy_and_build): Allow a using decl.
1203         (type_dependent_expression_p): A USING_DECL will make it
1204         dependent.
1205         * semantics.c (finish_member_declaration): Push a dependent using
1206         declaration.
1208 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
1210         PR c++/11530
1211         * parser.c (cp_parser_postfix_expression): Do not call mark_used.
1212         * semantics.c (finish_id_expression): Call mark_used for all
1213         declarations.
1215 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
1217         PR c++/11667
1218         * call.c (standard_conversion): Allow all integral->enumeral
1219         conversions, after marking them as bad.
1220         * decl.c (finish_enum): Make sure that all enumerators are
1221         properly converted to the underlying type.
1222         (build_enumerator): Set DECL_CONTEXT for namespace-scope
1223         enumeration types.
1224         * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
1225         (tsubst_enum): Tidy.
1227         * Make-lang.in (typeck.o): Depend on convert.h.
1228         (class.o): Likewise.
1229         (rtti.o): Likewise.
1230         * call.c: Include convert.h.
1231         (convert_arg_to_ellipsis): Use convert_to_real.
1232         * class.c: Include convert.h.
1233         (build_base_path): Use convert_to_integer.
1234         * rtti.c: Include convert.h.
1235         (build_headof): Use convert_to_integer.
1236         * typeck.c: Include convert.h.
1237         (decay_conversion): Use convert_to_integer.
1238         (build_unary_op): Use build_nop.
1239         (get_delta_difference): Use convert_to_integer.
1240         (build_ptrmemfunc): Avoid unncessary conversions.
1242 2003-07-28  Jan Hubicka  <jh@suse.cz>
1244         * decl2.c (mark_member_pointers): Verify that member pointer points to
1245         the function.
1247 2003-07-28  Nathan Sidwell  <nathan@codesourcery.com>
1249         * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
1250         (finish_compound_stmt): Remove no scope arg.
1251         * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
1252         end_compound_stmt calls.
1253         (expand_static_init, begin_destructor_body, begin_function_body,
1254         finish_function_body): Likewise.
1255         * decl2.c (start_objects, finish_objects,
1256         start_static_storage_duration_function,
1257         finish_static_storage_duration_function): Likewise.
1258         * init.c (begin_init_stmts, finish_init_stmts,
1259         construct_virtual_base, build_vec_init): Likewise.
1260         * method.c (do_build_assign_ref, synthesize_method): Likewise.
1261         * parser.c (cp_parser_compound_statement,
1262         cp_parser_implicitly_scoped_statement,
1263         cp_parser_already_scoped_statement): Likewise.
1264         * pt.c (tsubst_expr): Likewise.
1265         * semantics.c (begin_compound_stmt): No scope arg is a bool.
1266         (finish_compound_stmt): Remove no scope arg.
1268         * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
1269         always dyadic.
1271 2003-07-27  Mark Mitchell  <mark@codesourcery.com>
1273         * call.c (standard_conversion): Tweak handling of
1274         pointer-to-member types.
1275         * pt.c (tsubst): Correctly qualify pointers-to-data member types.
1276         * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
1277         pointer-to-data member types.
1279 2003-07-27  Nathan Sidwell  <nathan@codesourcery.com>
1281         * parser.c (cp_parser_type_parameter): Reformat.
1282         (cp_parser_parameter_declaration): Deprecate default args where
1283         not allowed.
1285 2003-07-26  Nathan Sidwell  <nathan@codesourcery.com>
1287         * cfns.h: Rebuilt.
1289         * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
1290         (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
1291         * init.c (begin_init_stmts): Make static. Return is_global
1292         value. Always call begin_stmt_expr.
1293         (finish_init_stmts): Make static. Add is_global parm. Always
1294         building a stmt tree.
1295         (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
1296         (build_vec_init): Likewise. Always building a stmt tree.
1297         (expand_default_init): Always building a stmt tree.
1298         (get_temp_regvar): Likewise.
1299         * semantics.c (begin_global_stmt_expr,
1300         finish_global_stmt_expr): Remove.
1302 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1304         * cp-tree.h (build_compound_expr): Take LHS & RHS args.
1305         (build_x_compound_expr_from_list): Declare.
1306         * typeck.c (build_x_compound_expr_from_list): New.
1307         (build_x_compound_expr): Adjust.
1308         (build_compound_expr): Remove unreachable code. Take two
1309         parameters, adjust.
1310         * decl.c (grok_reference_init): Use
1311         build_x_compound_expr_from_list.
1312         (expand_static_init): Adjust build_compound_expr call.
1313         (cxx_maybe_build_cleanup): Likewise.
1314         * init.c (perform_member_init): Use
1315         build_x_compound_expr_from_list.
1316         (build_new_1): Likewise.
1317         (build_vec_delete): Adjust build_compound_expr calls.
1318         (build_vbase_delete): Likewise.
1319         * typeck2.c (store_init_value): Use
1320         build_x_compound_expr_from_list.
1321         (build_functional_cast): Likewise.
1323 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1325         * cp-tree.h (enum tsubst_flags_t): Add tf_user.
1326         * decl.c (make_typename_type): Pass it.
1327         * pt.c (lookup_template_class): Use it.
1328         (resolve_typename_type): Pass it.
1329         * semantics.c (finish_template_type): Pass it.
1331 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1333         PR c++/11617
1334         * cp-tree.h (qualified_name_lookup_error): Declare.
1335         * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
1336         errors.
1337         (tsubst_expr) <DECL_STMT case>: Likewise.
1338         (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
1339         * semantics.c (qualified_name_lookup_error): New, broken out of ...
1340         (finish_id_expression): ... here. Use it.
1342 2003-07-25  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
1344         * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
1346 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1348         PR c++/11596
1349         * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
1350         (tsubst_template_arg): New.
1351         (tsubst_template_arg_vector): Rename to ...
1352         (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
1353         tsubst_template_arg.
1354         (coerce_template_parms): Use tsubst_template_arg for default
1355         value.
1356         (tsubst_template_parms): Likewise.
1357         (tsubst_aggr_type): Adjust.
1358         (tsubst_decl): Likewise.
1359         (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
1360         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
1362 2003-07-25 Gabriel Dos Reis  <gdr@integrable-solutions.net>
1364         * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
1365         * error.c: Use the new pretty-printer framework.
1367 2003-07-24  Per Bothner  <pbothner@apple.com>
1369         * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
1370         which causes errors messages to incorrectly mention included files.
1372 2003-07-24  Mark Mitchell  <mark@codesourcery.com>
1374         * cp-tree.h (convert_to_base_statically): Declare.
1375         * call.c (build_special_member_call): Convert INSTANCE to the base
1376         type.
1377         * class.c (convert_to_base_statically): New method.
1378         * init.c (construct_virtual_base): Use it.
1379         * method.c (do_build_assign_ref): Fix typo in comment.
1381 2003-07-24  Jason Merrill  <jason@redhat.com>
1383         * decl.c: Just set truthvalue_* to boolean_*.
1385 2003-07-24  Nathan Sidwell  <nathan@codesourcery.com>
1387         * decl.c (reshape_init): Remove unreachable code.
1389 2003-07-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1391         PR c++/11513
1392         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
1394 2003-07-23  Mark Mitchell  <mark@codesourcery.com>
1396         PR c++/11645
1397         * cp-tree.h (accessible_base_p): Declare.
1398         * call.c (build_over_call): Use it.
1399         * search.c (accessible_base_p): New function, split out from ...
1400         (lookup_base): ... here.
1402         PR c++/11517
1403         * call.c (build_conditional_expr): Use perform_implicit_conversion
1404         and error_operand_p.  Robustify.
1405         * typeck.c (build_unary_op): Use perform_implicit_conversion.
1407 2003-07-23  Nathan Sidwell  <nathan@codesourcery.com>
1409         PR c++/10953
1410         * parser.c (cp_parser_nested_name_specifier): Reset scope on
1411         failure.
1412         (cp_parser_elaborated_type_specifier): Likewise.
1414 2003-07-22  Mark Mitchell  <mark@codesourcery.com>
1416         Eliminate use of POINTER_TYPE for pointers-to-members.
1417         * call.c (standard_conversion): Rework pointer-to-member handling.
1418         Add comments.
1419         (add_builtin_candidate): Likewise.
1420         (resolve_scoped_fn_name): Remove.
1421         (build_conditional_expr): Rework pointer-to-member handling.
1422         (compare_ics): Likewise.
1423         * class.c (check_field_decls): Use TYPE_PTR_P.
1424         * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
1425         handling.
1426         * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
1427         (TYPE_PTRMEM_P): Add comment.
1428         (TYPE_PTR_P): Simplify.
1429         (TYPE_PTROB_P): Correct definition.
1430         (TYPE_PTR_TO_MEMBER_P): New macro.
1431         (TYPE_PTRMEM_CLASS_TYPE): Adjust.
1432         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1433         (resolved_scoped_fn_name): Remove declaration.
1434         (build_offset_ref): Change prototype.
1435         (resolve_offset_ref): Remove.
1436         (comp_target_types): Remove.
1437         * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
1438         handling.
1439         (convert_to_reference): Use can_convert.
1440         (ocp_convert): Improve error handling.  Rework pointer-to-member
1441         handling.
1442         (perform_qualification_conversions): Rework pointer-to-member
1443         handling.
1444         * decl.c (build_ptrmem_type): Handle functions too.
1445         (create_array_type_for_decl): Remove OFFSET_TYPE error message.
1446         (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
1447         (grokparms): Remove OFFSET_TYPE error message.
1448         * dump.c (cp_dump_tree): Rework pointer-to-member handling.
1449         * error.c (dump_type_prefix): Likewise.
1450         * expr.c (cplus_expand_constant): Use build_nop.
1451         * init.c (build_offset_ref): Add address_p parameter.  Fold in
1452         necessary bits from resolve_offset_ref.
1453         (resolve_offset_ref): Remove.
1454         * parser.c (cp_parser_postfix_expression): Remove special case
1455         code for OFFSET_TYPE.
1456         * pt.c (convert_nontype_argument): Rework pointer-to-member
1457         handling.
1458         (convert_template_argument): Likewise.
1459         (unify): Likewise.
1460         (invalid_nontype_parm_type_p): Likewise.
1461         (dependent_type_p_r): Likewise.
1462         * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
1463         (target_incomplete_p_): Rework pointer-to-member
1464         handling.
1465         (get_pseudo_ti_init): Likewise.
1466         (get_pseudo_ti_desc): Likewise.
1467         * semantics.c (finish_qualified_id_expr): Adjust call to
1468         build_offset_ref.  Remove use of resolve_offset_ref.
1469         * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
1470         * typeck.c (target_type): Use TYPE_PTRMEM_P.
1471         (type_unknown_p): Remove obsolete code about the time before
1472         non-dependent expressions were handled correctly.
1473         (qualify_type_recursive): Remove.
1474         (composite_pointer_type_r): New function.
1475         (composite_pointer_type): Use it.
1476         (merge_types): Remove dead comments.
1477         (comp_cv_target_types): Remove.
1478         (comp_target_types): Likewise.
1479         (comp_target_parms): Likewise.
1480         (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
1481         (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
1482         (build_binary_op): Do not use of comp_target_types.
1483         (pointer_diff): Remove OFFSET_TYPE case.
1484         (build_unary_op): Adjust pointer-to-member handling.
1485         (unary_complex_lvalue): Likewise.
1486         (check_for_casting_away_constness): Add description parameter.
1487         (build_static_cast): Pass it.
1488         (build_reinterpret_cast): Use check_for_casting_away_constness.
1489         (build_const_cast): Adjust pointer-to-member handling.
1490         (build_c_cast): Likewise.
1491         (convert_for_assignment): Remove OFFSET_TYPE error message.
1492         (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
1493         (comp_ptr_ttypes_reinterpret): Remove.
1494         (casts_away_constness_r): Adjust pointer-to-member handling.
1495         (casts_away_constness): Liekwise.
1496         (strip_all_pointer_quals): Remove.
1497         * typeck2.c (digest_init): Adjust pointer-to-member handling.
1498         (build_m_component_ref): Likewise.
1500 2003-07-22  Wolfgang Bangerth  <bangerth@dealii.org>
1502         * lex.c (unqualified_fn_lookup_error): Mention that the error
1503         message needs to be kept in synch with the manual.
1505 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1507         PR c++/11614
1508         * decl.c (grokdeclarator): An array member is only a flexible
1509         array member if the field itself is the array.
1511 2003-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1513         PR c++/10793
1514         * decl.c (xref_basetypes): Handle error_mark_node.
1516 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1518         * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
1519         * tree.c (lvalue_p_1): Set it.
1520         * class.c (check_field): Don't allow non-packed non-POD fields to
1521         be packed.
1522         * call.c (reference_binding): Need a temporary for all bitfield
1523         and packed fields.
1524         (convert_like_real): Check it is ok to make a temporary here.
1526 2003-07-21  Nathan Sidwell  <nathan@codesourcery.com>
1528         * cp-tree.h (hack_identifier): Remove.
1529         * method.c (hack_identifier): Remove.
1530         * semantics.c (finish_id_expression): Expand hack_identifier
1531         here. Simplify.
1533 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1535         * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
1536         semantics.c typeck.c: Remove unnecessary casts.
1538 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
1540         * cp-tree.h (hack_identifier): Remove.
1541         * method.c (hack_identifier): Remove.
1542         * semantics.c (finish_id_expression): Expand hack_identifier
1543         here. Simplify.
1545 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
1547         * cp-tree.h (finish_non_static_data_member): Add object param.
1548         * method.c (hack_identifier): Adjust.
1549         * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
1550         again for a FIELD_DECL.
1551         * semantics.c (finish_non_static_data_member): Add object
1552         parameter. Always save the DECL in the COMPONENT_REF.
1553         * call.c (resolve_scoped_fn_name): Adjust.
1555 2003-07-17  Zack Weinberg  <zack@codesourcery.com>
1557         * pt.c (get_bindings): Make definition consistent with
1558         forward declaration.
1560 2003-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1562         PR c++/7809
1563         * friend.c (add_friend): Check access for member functions
1564         and templates.
1566 2003-07-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1568         PR c++/10668
1569         * typeck.c (build_class_member_access_expr): Improve diagnostic.
1571 2003-07-16  Mark Mitchell  <mark@codesourcery.com>
1573         PR c++/11547
1574         * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
1575         macro.
1576         (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
1577         * decl.c (duplicate_decls): Merge
1578         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1579         * parser.c (cp_parser_postfix_expression): Adjust call to
1580         cp_parser_initializer_list and
1581         cp_parser_parenthesized_expression_list.
1582         (cp_parser_parenthesized_expression_list): Add non_constant_p.
1583         (cp_parser_new_placement): Adjust call to
1584         cp_parser_parenthesized_expression_list.
1585         (cp_parser_direct_new_declarator): Likewise.
1586         (cp_parser_conditional_expression): Remove.
1587         (cp_parser_constant_expression): Parse an assignment-expression,
1588         not a conditional-expression.
1589         (cp_parser_simple_declaration): Resolve expression/declaration
1590         ambiguity more quickly.
1591         (cp_parser_mem_initializer): Adjust call to
1592         cp_parser_parenthesized_expression_list.
1593         (cp_parser_init_declarator): Keep track of whether or not the
1594         initializer is a constant-expression.
1595         (cp_parser_initializer): Add non_constant_p parameter.
1596         (cp_parser_initializer_clause): Likewise.
1597         (cp_parser_initializer_list): Likewise.
1598         (cp_parser_attribute_list): Adjust call to
1599         cp_parser_parenthesized_expression_list.
1600         (cp_parser_functional_cast): Likewise.
1601         * pt.c (tsubst_decl): Copy
1602         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1603         (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
1604         * semantics.c (finish_id_expression): Use
1605         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1607 2003-07-16  Neil Booth  <neil@daikokuya.co.uk>
1609         * lang-options.h: Remove.
1611 2003-07-16  Andrew Pinski  <pinskia@physics.uc.edu>
1613         PR c/10962
1614         * class.c (field_decl_cmp): Remove.
1615         (resort_field_decl_cmp): Remove.
1616         (resort_sorted_fields): Remove.
1617         (add_fields_to_vec): Rename to ...
1618         (add_fields_to_record_type): this.
1619         (finish_struct_1): Change to be using
1620         sorted_fields_type's fields.
1621         * cp-tree.h (lang_decl): In lang_decl_u3
1622         change sorted_fields to be a pointer to
1623         sorted_fields_type.
1624         (resort_sorted_fields): Remove prototype.
1625         * search.c (lookup_field_1): Change to be using
1626         sorted_fields_type's fields.
1628 2003-07-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1630         PR c++/5421
1631         * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
1632         is a member of other class.
1633         * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
1634         is a specialization of function template.
1636 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1638         PR c++/10903
1639         * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
1640         Improve.
1642 2003-07-15  Mark Mitchell  <mark@codesourcery.com>
1644         * cp-tree.def (LOOKUP_EXPR): Remove.
1645         * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
1646         (LOOKUP_EXPR_GLOBAL): Remove.
1647         (get_bindings): Remove.
1648         (is_aggr_type_2): Remove.
1649         * call.c (resolved_scoped_fn_name): Remove support for
1650         LOOKUP_EXPR.
1651         * decl.c (grokfndecl): Likewise.
1652         (grokdeclarator): Likewise.
1653         * error.c (dump_decl): Likewise.
1654         (dump_expr): Likewise.
1655         * friend.c (do_friend): Likewise.
1656         * init.c (build_offset_ref): Likewise.
1657         * lex.c (unqualified_fn_lookup_error): Use pedwarn.  Do not create
1658         LOOKUP_EXPRs
1659         * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
1660         * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
1661         test.
1662         * pt.c (get_bindings): Give it internal linkage.
1663         (check_explicit_specialization): Remove support for LOOKUP_EXPR.
1664         (lookup_template_function): Likewise.
1665         (for_each_tempalte_parm_r): Likewise.
1666         (tsubst_decl): Likewise.
1667         (tsubst_qualified_id): Handle template template parameters.
1668         (tsubst_copy): Remove support for LOOKUP_EXPR.
1669         (tsubst_copy_and_build): Likewise.
1670         (most_general_template): Likewise.
1671         (value_dependent_expression_p): Likewise.
1672         (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
1673         always dependent.
1674         * semantics.c (perform_koenig_lookup): Do not create
1675         IDENTIFIER_NODEs.
1676         (finish_fname): Likewise.
1677         (finish_id_expression): Likewise.
1678         * tree.c (is_aggr_type_2): Remove.
1680 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1682         PR c++/11531
1683         * typeck.c (check_return_expr): Fix thinko in diagnostic.
1685 2003-07-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1687         PR c++/10108
1688         * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
1689         error_mark_node.
1691 2003-07-14  Mark Mitchell  <mark@codesourcery.com>
1693         PR c++/11509
1694         * pt.c (dependent_scope_ref_p): New function.
1695         (value_dependent_expression_p): Use it.
1696         (type_dependent_expression_p): Likewise.
1698         * pt.c (tsubst_friend_function): Use reregister_specialization.
1700         PR c++/7019
1701         * cp-tree.h (lookup_qualified_name): Adjust prototype.
1702         * decl.c (lookup_qualified_name): Add complain parameter.  Adjust
1703         call to is_aggr_type.
1704         * parser.c (cp_parser_lookup_name): Adjust call to
1705         lookup_qualified_name.
1706         * pt.c (tsubst_qualified_id): Likewise.
1707         (tsubst_copy_and_build): Likewise.
1708         * semantics.c (finish_qualified_id_expr): Deal with erroneous
1709         expressions.
1711 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
1713         PR c++/11510
1714         * call.c (op_error): Properly format  REALPART_EXPR and
1715         IMAGPART_EXPR.
1716         * error.c (dump_expr): Likewise.
1718 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
1720         * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
1722 2003-07-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1724         PR c++/5293
1725         * call.c (initialize_reference): Improve diagnostic.
1727 2003-07-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1729         PR c++/11154
1730         * pt.c (more_specialized_class): Add full_args parameter.
1731         (most_specialized_class): Adjust calls to more_specialized_class.
1732         * cp-tree.h (more_specialized_class): Adjust declaration.
1734 2003-07-14  Dan Nicolaescu  <dann@ics.uci.edu>
1736         * lex.c (enum tree_node_kind): Delete.
1738 2003-07-13  Mark Mitchell  <mark@codesourcery.com>
1740         PR c++/11503
1741         * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
1742         (SET_DECL_SELF_REFERENCE_P): Likewise.
1743         * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
1744         * pt.c (tsubst_decl): Copy it.
1745         * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
1747         * pt.c (reregister_specialization): Fix thinko in previous change.
1749         * cp-tree.h (cp_id_kind): New type.
1750         (unqualified_name_lookup_error): Change prototype.
1751         (unqualified_fn_lookup_error): New function.
1752         (do_identifier): Remove.
1753         (do_scoped_id): Likewise.
1754         (tsubst_copy_and_build): Change prototype.
1755         (reregister_specialization): New function.
1756         (perform_koenig_lookup): Likewise.
1757         (finish_id_expression): Likewise.
1758         * call.c (build_method_call): Adjust call to
1759         unqualified_name_lookup_error.
1760         * decl.c (duplicate_decls): Use reregister_specialization.
1761         * lex.c (is_global): Remove.
1762         (unqualified_name_lookup_error): Return a value.
1763         (do_identifier): Remove.
1764         (do_scoped_id): Likewise.
1765         (identifier_typedecl_value): Remove.
1766         (unqualified_fn_lookup_error): New function.
1767         * parser.c (cp_parser_id_kind): Remove.
1768         (cp_parser_non_constant_id_expression): Remove.
1769         (cp_parser_primary_expression): Use finish_id_expression.
1770         (cp_parser_class_or_namespace_name): Use cp_id_kind, not
1771         cp_parser_id_kind.
1772         (cp_parser_postfix_expression): Use perform_koenig_lookup.
1773         (cp_parser_template_argument): Use cp_id_kind.
1774         (cp_parser_fold_non_dependent_expr): Adjust call to
1775         tsubst_copy_and_build.
1776         * pt.c (unregister_specialization): Rename to ...
1777         (reregister_specialization): This.
1778         (tsubst_friend_function): Use it.
1779         (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
1780         (tsubst_qualified_id): Likewise.
1781         (tsubst_expr): Likewise.
1782         (tsubst_copy_and_build): Add function_p parameter.  Use
1783         finish_id_expression.  Introduce RECUR macro.
1784         (tsubst_non_call_postfix_expression): New function.
1785         (regenerate_decl_from_template): Use reregister_specialization.
1786         * semantics.c (perform_koenig_lookup): New function.
1787         (finish_id_expression): Likewise.
1789 2003-07-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1791         * pt.c (push_access_scope_real): Remove.
1792         (push_access_scope): Move code from push_access_scope_real.
1793         (pop_access_scope): Don't check for TEMPLATE_DECL.
1794         (instantiate_template): Defer access checking during template
1795         substitution.
1796         (regenerate_decl_from_template): Tidy.
1798 2003-07-11  Nathanael Nerode  <neroden@gcc.gnu.org>
1800         PR c++/11437
1801         * operators.def: Add definitions for __imag__, __real__.
1803 2003-07-11  Nathan Sidwell  <nathan@codesourcery.com>
1805         PR c++/11050
1806         * parser.c (cp_parser_expression_list): Rename to ...
1807         (cp_parser_parenthesized_expression_list): ... here. Add attribute
1808         parameter, parse the surounding parentheses.
1809         (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
1810         parameters. Return int.
1811         (cp_parser_skip_to_closing_parenthesis or comma): Remove.
1812         (cp_parser_postfix_expression): Adjust function call parsing.
1813         (cp_parser_new_placement): Adjust.
1814         (cp_parser_new_initializer): Likewise.
1815         (cp_parser_cast_expression): Likewise.
1816         (cp_parser_selection_statement): Likewise.
1817         (cp_parser_mem_initializer): Likewise.
1818         (cp_parser_asm_definition): Likewise.
1819         (cp_parser_init_declarator): Likewise.
1820         (cp_parser_declarator): Make
1821         cdtor_or_conv_p an int ptr.
1822         (cp_parser_direct_declarator): Likewise. Check for a parameter
1823         list on cdtors & conv functions.
1824         (cp_parser_initializer): Adjust.
1825         (cp_parser_member_declaration): Adjust.
1826         (cp_parser_attribute_list): Move code into
1827         cp_parser_parens_expression_list.
1828         (cp_parser_functional_cast): Adjust.
1829         * pt.c (type_dependent_expression_p): Erroneous expressions are
1830         non-dependent.
1832 2003-07-11  Geoffrey Keating  <geoffk@apple.com>
1834         * decl.c (cp_finish_decl): Handle 'used' attribute.
1836         * cp-lang.c (c_reset_state): New dummy routine.
1837         * cp-tree.h (finish_file): Move prototype to c-common.h.
1838         * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
1840 2003-07-11  Mark Mitchell  <mark@codesourcery.com>
1842         PR c++/8327
1843         * pt.c (tsubst_qualified_id): Implement suggested resolution for
1844         Core Issue 2.
1845         (type_dependent_expression_p): Likewise.
1847 2003-07-10  Mark Mitchell  <mark@codesourcery.com>
1849         * typeck.c (build_binary_op): Do not warn about signed
1850         vs. unsigned comparisons in the bodies of templates.
1852         PR c++/9411
1853         * parser.c (cp_parser_postfix_expression): Check dependency of
1854         functions.
1856 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
1858         PR c++/10032
1859         * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
1860         still errors.
1862         PR c++/10527
1863         * error.c (decl_to_string): Do not print default argument
1864         expressions.
1866         * cp-tree.h (break_out_calls): Remove declaration.
1867         * tree.c (break_out_calls): Remove.
1868         * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
1870 2003-07-09  Nathan Sidwell  <nathan@codesourcery.com>
1872         PR c++ 9483
1873         * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
1874         * decl2.c (constructor_name_p): Avoid repeated constructor_name
1875         calls.
1876         * decl.c (grokdeclarator): Refactor ctor/dtor detection.
1878 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
1880         * typeck.c (build_x_unary_op): Take note of the fact that
1881         PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
1882         trees.
1884         * parser.c (cp_parser_primary_expression): Preserve the form of
1885         qualified expressions in templates, even if they are not
1886         dependent.
1887         * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
1888         (tsubst_qualified_id): Likewise.
1889         * search.c (accessible_p): Treat everything in the body of a
1890         template as accessible.
1892 2003-07-08  Mark Mitchell  <mark@codesourcery.com>
1894         * cp-tree.def (NON_DEPENDENT_EXPR): New node.
1895         * cp-tree.h (build_call_from_tree): Remove.
1896         (build_member_call): Likewise.
1897         (dependent_template_arg_p): Remove.
1898         (any_dependent_template_arguments_p): New function.
1899         (dependent_template_id_p): Likewise.
1900         (any_type_dependent_arguments_p): Likewise.
1901         (build_non_dependent_expr): Likewise.
1902         (build_non_dependent_args): Likewise.
1903         (build_x_compound_expr): Adjust prototype.
1904         * call.c (build_new_method_call): Handle non-dependent expressions
1905         correctly.
1906         * decl2.c (grok_array_decl): Likewise.
1907         (build_offset_ref_call_from_tree): Likewise.
1908         (build_call_from_tree): Remove.
1909         * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
1910         (dump_expr): Likewise.
1911         * init.c (build_member_call): Remove.
1912         * mangle.c (write_expression): Update handling for template-ids.
1913         * parser.c (cp_parser_primary_expression): Use
1914         any_dependent_template_arguments_p.  Update constant-expression
1915         handling.
1916         (cp_parser_postfix_expression): Use
1917         any_type_dependent_arguments_p.  Simplify call processing.
1918         (cp_parser_unary_expression): Simplify.
1919         (cp_parser_expression): Adjust for changes to
1920         build_x_compound_expr.
1921         (cp_parser_template_argument): Implement standard-conforming
1922         parsing of non-type template arguments.
1923         (cp_parser_direct_declarator): Use
1924         cp_parser_fold_non_dependent_expr.
1925         (cp_parser_fold_non_dependent_expr): New function.
1926         (cp_parser_next_token_ends_template_argument_p): Likewise.
1927         * pt.c (convert_template_argument): Do not call
1928         maybe_fold_nontype_arg.
1929         (tsubst_baselink): Likewise.
1930         (tsubst_copy_and_build): Share common code.  Make sizeof/alignof
1931         processing work correctly for non-dependent expressions.  Adjust
1932         handling of COMPOUND_EXPR.  Simplify call processing.
1933         (value_dependent_expression_p): Deal with functional casts and
1934         sizeof/alignof correctly.
1935         (type_dependent_expression_p): Handle overloaded functions.
1936         (any_type_dependent_arguments_p): New function.
1937         (any_dependent_template_arguments_p): Likewise.
1938         (dependent_template_p): Treat SCOPE_REFs as dependent.
1939         (dependent_template_id_p): Simplify.
1940         (build_non_dependent_expr): New function.
1941         (build_non_dependent_args): Likewise.
1942         * semantics.c (finish_stmt_expr): Don't make dependent
1943         statement-expresions have void type.
1944         (finish_call_expr): Handle non-dependent expressions
1945         correctly.
1946         * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
1947         * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
1948         type size_t, even in templates.
1949         (expr_sizeof): Likewise.
1950         (finish_class_member_access_expr): Handle non-dependent expressions
1951         correctly.
1952         (build_x_indirect_ref): Likewise.
1953         (build_x_binary_op): Likewise.
1954         (build_x_unary_op): Likewise.
1955         (build_x_conditional_expr): Likewise.
1956         (build_x_compound_expr): Likewise.
1957         * typeck2.c (build_x_arrow): Likewise.
1959 2003-07-09  Jan Hubicka  <jh@suse.cz>
1961         * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
1962         * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
1963         (start_function): Use DECL_ESTIMATED_INSNS.
1964         * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
1966         * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
1967         unit-at-a-time
1969 2003-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1971         PR c++/11030
1972         * pt.c (instantiate_class_template): Don't call xref_tag to
1973         inject name when the friend class is a specialization.
1975 2003-07-07  Mark Mitchell  <mark@codesourcery.com>
1977         * cp-tree.h (build_scoped_method_call): Remove.
1978         (lookup_qualified_name): Remove parameter.
1979         (tsubst_copy_and_build): Declare.
1980         (finish_qualified_object_call_expr): Remove.
1981         (check_accessibility_of_qualified_id): New function.
1982         (finish_qualified_id_expr): Likewise.
1983         (non_reference): Likewise.
1984         (build_expr_from-tree): Remove.
1985         * call.c (non_reference): Remove.
1986         (build_scoped_method_call): Likewise.
1987         (build_method_call): Use error_operand_p.  Assert that we are not
1988         processing a template.
1989         (standard_conversion): Use non_reference.
1990         * class.c (build_vtbl_entry_ref): Likewise.
1991         (build_vtbl_ref_1): Likewise.
1992         * cvt.c (build_expr_type_conversion): Use non_reference.
1993         * decl.c (lookup_qualified_name): Remove flags parameter.
1994         (grok_op_properties): Use non_reference.
1995         * decl2.c (grok_array_decl): Likewise.
1996         (build_expr_from_tree): Remove.
1997         (build_offset_ref_call_from_tree): Update comment.
1998         * error.c (parm_to_string): Call reinit_global_formatting_buffer.
1999         * except.c (prepare_eh_types): Use non_reference.
2000         (can_convert_eh): Likewise.
2001         * init.c (build_dtor_call): Avoid using build_method_call.
2002         * mangle.c (write_template_param): Remove misleading comment.
2003         * method.c (locate_copy): Use non_reference.
2004         * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2005         (cp_parser_primary_expression): Do not create SCOPE_REFs is
2006         non-dependent contexts.
2007         (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2008         (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2009         build_expr_from_tree.
2010         (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2011         Use check_accessibility_of_qualified_id.
2012         * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2013         build_expr_from_tree.
2014         (tsubst_baselink): New function.
2015         (tsubst_qualified_id): Likewise.
2016         (tsubst_copy): Use them.  Remove support for METHOD_CALL_EXPR.
2017         (tsubst_expr): Adjust call to lookup_qualified_name.
2018         (tsubst_copy_and_build): Handle SCOPE_REFs specially.  Adjust
2019         handling of CALL_EXPRs.
2020         (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2021         * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2022         * search.c (check_final_overrider): Likewise.
2023         * semantics.c (check_accessibility_of_qualified_id): New function.
2024         (finish_qualified_object_call_expr): Remove.
2025         * typeck.c (target_type): Use non_reference.
2026         (cxx_sizeof_or_alignof_type): Likewise.
2027         (dubious_conversion_warnings): Likewise.
2028         (convert_for_initialization): Likewise.
2029         (non_reference): New function.
2031 2003-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2033         * decl.c (print_binding_level, print_other_binding_stack,
2034         print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2035         stdio calls.
2036         * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2038 2003-07-07  Andreas Jaeger  <aj@suse.de>
2040         * friend.c: Convert to ISO C90 prototypes.
2042         * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2043         language.
2044         * cfns.h: Regenerate.
2046         * typeck.c: Convert remaining prototypes to ISO C90.
2047         * search.c: Likewise.
2049         * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2050         * semantics.c (expand_or_defer_fn): Likewise
2051         * mangle.c (discriminator_for_string_literal): Likewise.
2052         * g++spec.c (lang_specific_driver): Likewise.
2054         * search.c (lookup_base_r): Remove unused variable.
2056 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
2058         * semantics.c: (genrtl_try_block) Adjust emit_line_note
2059         calls.
2061 2003-07-07  Andreas Jaeger  <aj@suse.de>
2063         * search.c (lookup_base_r): Remove unused variable.
2065 2003-07-06  Michael Chastain  <mec@shout.net>
2067         PR debug/10055
2068         * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2069         assigning to input_filename directly.
2071 2003-07-06  Kazu Hirata  <kazu@cs.umass.edu>
2073         * call.c: Fix comment formatting.
2074         * class.c: Likewise.
2075         * cp-tree.h: Likewise.
2076         * decl.c: Likewise.
2077         * decl2.c: Likewise.
2078         * error.c: Likewise.
2079         * method.c: Likewise.
2080         * name-lookup.c: Likewise.
2081         * parser.c: Likewise.
2082         * pt.c: Likewise.
2083         * rtti.c: Likewise.
2084         * search.c: Likewise.
2085         * typeck.c: Likewise.
2087 2003-07-06  Mark Mitchell  <mark@codesourcery.com>
2089         PR c++/11345
2090         * search.c (lookup_base_r): Remove is_non_public and
2091         within_current_scope parameters.  Remove other dead code.
2092         (lookup_base): Adjust call to lookup_base_r.
2093         (adjust_result_of_qualified_name_lookup): Improve comment.
2094         * semantics.c (finish_call_expr): Use maybe_dummy_object.
2096 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
2098         * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
2099         LANG_HOOKS_MISSING_ARGUMENT): Override.
2101 2003-07-05  Mark Mitchell  <mark@codesourcery.com>
2103         PR c++/11431
2104         * typeck.c (build_static_cast): Check for reference conversions
2105         earlier.
2107 2003-07-04  Mark Mitchell  <mark@codesourcery.com>
2109         * cp-tree.h (perform_integral_promotions): Declare.
2110         * call.c (build_addr_func): Use decay_conversion.
2111         (convert_arg_to_ellipsis): Likewise.  Remove misleading comment.
2112         (convert_for_arg_passing): Use perform_integral_promotions.
2113         * cvt.c (build_expr_type_conversion): Use decay_conversion.
2114         (type_promotes_to): Do not return a cv-qualified type.
2115         * decl.c (grok_reference_init): Fix formatting.
2116         (get_atexit_node): Use decay_conversion.
2117         (build_enumerator): Use perform_integral_promotions.
2118         * init.c (build_vec_init): Use decay_conversion.
2119         * semantics.c (finish_expr_stmt): Likewise.
2120         (finish_switch_cond): Use perform_integral_promotions.
2121         * typeck.c (default_conversion): Likewise.
2122         (perform_integral_promotions): New function.
2123         (build_indirect_ref): Use decay_conversion.
2124         (build_array_ref): Use perform_integral_promotions.
2125         (convert_arguments): Use decay_conversion.
2126         (build_unary_op): Use perform_integral_promotions.
2127         (build_c_cast): Use decay_conversion.
2128         (build_modify_expr): Likewise.
2129         (convert_for_initialization): Likewise.
2130         * typeck2.c (build_x_arrow): Likewise.
2132 2003-07-04  Kazu Hirata  <kazu@cs.umass.edu>
2134         * call.c: Fix comment typos.
2135         * class.c: Likewise.
2136         * cp-tree.h: Likewise.
2137         * cvt.c: Likewise.
2138         * decl2.c: Likewise.
2139         * decl.c: Likewise.
2140         * init.c: Likewise.
2141         * mangle.c: Likewise.
2142         * parser.c: Likewise.
2143         * pt.c: Likewise.
2144         * search.c: Likewise.
2145         * semantics.c: Likewise.
2146         * tree.c: Likewise.
2147         * typeck.c: Likewise.
2149 2003-07-04  Zack Weinberg  <zack@codesourcery.com>
2151         * parser.c (cp_lexer_read_token): No need to handle string
2152         constant concatenation.
2154 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2156         * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
2157         (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
2158         ATTRIBUTE_GCC_CXXDIAG.
2160 2003-07-03  Mark Mitchell  <mark@codesourcery.com>
2162         * call.c (build_addr_func): Handle bound pointers-to-members.
2163         (build_method_call): Do not call resolve_offset_ref.
2164         (implicit_conversion): Likewise.
2165         (resolve_scoped_fn_name): Use finish_non_static_data_member, not
2166         resolve_offset_ref.
2167         (resolve_args): Do not call resolve_offset_ref.
2168         (build_conditional_expr): Likewise.
2169         (build_new_method_call): Likewise.
2170         * cp-tree.def (OFFSET_REF): Update documentation.
2171         * cvt.c (cp_convert_to_pointer): Update handling of conversions from
2172         pointers to members to pointers.
2173         (ocp_convert): Do not call resolve_offset_ref.
2174         (convert_to_void): Likewise.
2175         (build_expr_type_conversion): Likewise.
2176         * decl2.c (delete_sanity): Likewise.
2177         * init.c (resolve_offset_ref): Simplify greatly.
2178         (build_vec_delete): Do not call resolve_offset_ref.
2179         * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
2180         if appropriate.
2181         (cp_parser_unary_expression): Use
2182         cp_parser_simple_cast_expression.
2183         (cp_parser_delete_expression): Likewise.
2184         (cp_parser_cast_expression): Likewise.
2185         (cp_parser_pm_expression): Use cp_parser_binary_op.
2186         (cp_parser_simple_cast_expression): New function.
2187         * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
2188         * semantics.c (finish_increment_expr): Likewise.
2189         (finish_typeof): Likewise.
2190         * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
2191         * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
2192         (decay_conversion): Do not call resolve_offset_ref.
2193         (finish_class_member_access_expr): Likewise.
2194         (convert_arguments): Likewise.
2195         (build_x_binary_op): Handle DOTSTAR_EXPR.
2196         (condition_conversion): Do not call resolve_offset_ref.
2197         (unary_complex_lvalue): Likewise.
2198         (build_static_cast): Likewise.
2199         (build_reinterpret_cast): Likewise.
2200         (build_const_cast): Likewise.
2201         (build_c_cast): Likewise.
2202         (build_modify_expr): Likewise.
2203         (convert_for_assignment): Likewise.
2204         (convert_for_initialization): Likewise.
2205         * typeck2.c (build_x_arrow): Likewise.
2206         (build_m_component_ref): Simplify.
2208         * call.c (build_scoped_method_call): Use convert_to_void.
2209         (build_method_call): Likewise.
2210         * class.c (check_field_decls): Remove dead code.
2211         * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
2212         * decl2.c (grok_array_decl): Remove dead code.
2213         (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2214         as pointer-to-member representation.
2215         * init.c (build_offset_ref): Tidy.
2216         (build_vec_delete_1): Use convert_to_void.
2217         * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2218         as pointer-to-member representation.
2220 2003-07-03  Nathan Sidwell  <nathan@codesourcery.com>
2222         PR c++/9162
2223         * decl.c (grokdeclarator): Return friend decls, not
2224         void_type_node.
2225         * decl2.c (grokfield): Alter friend decl check.
2226         * parser.c (struct cp_parser): Document default_arg chain on
2227         unparsed_functions_queue.
2228         (cp_parser_save_default_args): New.
2229         (cp_parser_init_declarator, cp_parser_function_definition,
2230         cp_parser_member_declaration): Call it.
2231         (cp_parser_class_specifier): Remove unused variable. Alter
2232         processing of unparsed_functions_queue.
2234 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2236         * class.c (add_method, check_field_decl): Fix format specifier.
2237         * decl.c (duplicate_decls, pushdecl, check_goto,
2238         fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
2239         start_enum): Likewise.
2240         * decl2.c (ambiguous_decl): Likewise.
2241         * pt.c (redeclare_class_template): Likewise.
2243 2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
2245         PR c++/10219
2246         * pt.c (type_unification_real): Don't unify exprs of error type.
2247         * tree.c (error_type): Don't die on error_type.
2249         PR c++/9779
2250         * decl2.c (arg_assoc_class): Don't die on NULL type.
2251         * typeck.c (type_unknown_p): Don't die on untyped expressions.
2253 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2255         PR c++/6949
2256         * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
2257         classes.
2259 2003-07-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2261         * error.c (locate_error): %P takes an `int', not a `tree'.
2263 2003-07-02  Jan Hubicka  <jh@suse.cz>
2265         * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
2266         (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
2267         clear DECL_DEFER_OUTPUT once function is processed; avoid flags
2268         massaging.
2270         * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
2271         (expand_or_defer_fn): Declare.
2272         (lower_function): Declare.
2273         * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
2274         * decl2.c: Include cgraph.h and varpool.h
2275         (maybe_emit_vtables):  Make explicit instantations as needed.
2276         (mark_member_pointers, lower_function): New functions.
2277         (finish_file): Do unit-at-a-time.
2278         * method.c (synthesize_method): Use expand_or_defer_fn.
2279         * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
2280         * parser.c (cp_parser_function_definition_after_decl): Use
2281         expand_or_defer_fn.
2282         * pt.c (instantiate_decl): Likewise.
2283         * semantics.c: Include cgraph.h
2284         (expand_or_defer_fn): Break out from ...
2285         (expand_body): ... here; deal with unit-at-a-time.
2286         * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
2287         LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
2289 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2291         * call.c (resolve_scoped_fn_name): Return error_mark_node for
2292         erroneous cases.
2294 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2296         PR c++/11149
2297         * call.c (resolve_scoped_fn_name): Check that the qualifying scope
2298         is a class type.
2300 2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
2302         PR c++/8046
2303         * error.c (dump_decl): Handle BIT_NOT_EXPR as
2304         pseudo destructor calls.
2306 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
2308         * cp-tree.h (define_label): Replace filename and lineno
2309         arguments with a location_t.
2310         * decl.c (pop_label): Adjust define_label call.
2311         (define_label): Replace filename and lineno arguments with a
2312         location_t.
2313         * semantics.c (finish_label): Adjust define_label call.
2315 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
2317         PR c++/9559
2318         * decl2.c (grokfield): Do not build NOP_EXPRs around the
2319         error_mark_node.
2321 2003-06-30  Neil Booth  <neil@daikokuya.co.uk>
2323         * Make-lang.in: Update.
2324         * cp-lang.c (c_language): Define.
2325         (LANG_HOOKS_INIT_OPTIONS): Use common hook.
2326         * cp-tree.h (cxx_init_options): Remove.
2327         * lex.c: Don't include diagnostic.h.
2328         (cxx_init_options): Remove.
2330 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2332         PR c++/4933
2333         * error.c (dump_expr): Support correctly the COMPOUND_EXPR
2334         tree generated within a template. Use dump_expr to dump an
2335         expression sizeof.
2337 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2339         * mangle.c (write_expression): Exit gracefully when trying to
2340         mangle a CALL_EXPR.
2342 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
2344         PR c++/10750
2345         * parser.c (cp_parser_primary_expression): A VAR_DECL with a
2346         (value- or type-) dependent expression as DECL_INITIAL is a
2347         valid constant-expression (at parser time).
2349 2003-06-30  Giovanni Bajo <giovannibajo@libero.it>
2351         PR c++/11106
2352         * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
2353         USING_DECL, instead of print_tree_identifier.
2355 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2357         * cp-tree.h (language_to_string): Adjust declaration.
2358         * dump.c (cp_dump_tree): Adjust usage.
2359         * error.c (dump_char): Use output_formatted_scalar. Tidy.
2360         (parm_to_string): Lose unused parameter.  Tidy.
2361         (expr_to_string): Likewise.
2362         (code_to_string): Likewise.
2363         (language_to_string): Likewise.
2364         (op_to_string): Likewise.
2365         (assop_to_string): Likewise.
2366         (digit_buffer): Remove.
2367         (dump_type): Format builtin vector type as __vector__.
2369 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2371         * error.c (print_integer): Remove.
2372         (dump_type_suffix): Adjust.
2373         (dump_expr): Likewise.
2375 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2377         * error.c (print_instantiation_partial_context): Take a
2378         location_t.
2379         (print_instantiation_full_context): Adjust.
2380         (print_instantiation_context): Adjust.
2382         * cp-tree.h (cp_line_of, cp_file_of): Remove.
2383         * error.c (cp_line_of, cp_file_of): Merge into ...
2384         (location_of): ... here. Make static, return a location_t.
2385         (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
2387 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
2389         PR c++/10784
2390         * call.c (joust): Move warn_conversion check outwards.
2392 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
2394         * decl.c (build_typename_type)
2395         * mangle.c (write_template_template_arg)
2396         * parser.c (cp_parser_scope_through_which_access_occurs)
2397         * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
2398         * repo.c (get_base_filename)
2399         * semantics.c (maybe_convert_cond):
2400         Mark the definition static, matching the forward declaration.
2402 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
2404         PR c++/10468
2405         * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
2407 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
2409         PR c++/10796
2410         * decl.c (finish_enum): Implement DR377.
2412         * decl.c (cp_finish_decl): Don't make variables with reference
2413         type readonly while they are being initialized.
2415 2003-06-26  Mark Mitchell  <mark@codesourcery.com>
2417         PR c++/11332
2418         * typeck.c (build_static_cast): Avoid returning expressions with
2419         reference type.
2421 2003-06-26  Nathan Sidwell  <nathan@codesourcery.com>
2423         * call.c (build_op_delete_call): Use strip_array_call. Correct
2424         error message to say 'delete' or 'delete[]'.
2426 2003-06-26  Giovanni Bajo  <giovannibajo@libero.it>
2428         PR c++/8266
2429         * pt.c (check_explicit_specialization): When looking up a
2430         template function from an identifier outside class-scope, bind
2431         it to CP_DECL_CONTEXT.
2433 2003-06-25  Mark Mitchell  <mark@codesourcery.com>
2435         PR c++/10990
2436         * search.c (lookup_base_r): Rely on accessible_p, rather than
2437         trying to emulate that logic here.
2439         PR c++/10931
2440         * call.c (convert_like): Pass issue_conversion_warnings.
2441         (convert_like_with_context): Likewise.
2442         (convert_like_real): Add issue_conversion_warnings parameter.
2443         (perform_direct_initialization_if_possible): New function.
2444         * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
2445         * typeck.c (check_for_casting_away_constness): New function.
2446         (build_static_cast): Rewrite.
2448 2003-06-24  Nathan Sidwell  <nathan@codesourcery.com>
2450         * call.c (enforce_access): Assert we get a binfo.
2451         (build_op_delete_call): Pass a binfo to
2452         perform_or_defer_access_check.
2453         * class.c (alter_access): Likewise.
2454         * decl.c (make_typename_type): Likewise.
2455         (make_unbound_class_template): Likewise.
2456         * lex.c (do_identifier): Likewise.
2457         * method.c (hack_identifier): Likewise.
2458         * parser.c (cp_parser_lookup_name): Likewise.
2459         * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
2460         test.
2461         * semantics.c (finish_non_static_data_member): Likewise.
2462         (perform_or_defer_access_check): Expect a binfo.
2463         * typeck.c (comptypes): Expect types.
2465         * mangle.c (find_substitution): Don't pass a non-type to same_type_p
2466         * friend.c (make_friend_class): Likewise.
2467         * pt.c (check_default_tmpl_args): Likewise.
2468         (lookup_template_class): Likewise.
2470 2003-06-24  Jan Hubicka  <jh@suse.cz>
2472         * method.c (thunk_labelno): Move outside ifdef block to make garbage
2473         collector happy.
2475 2003-06-24  Jan Hubicka  <jh@suse.cz>
2477         * class.c (build_vtable): Make vtables.
2478         * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
2479         * decl2.c (output_vtable_inherit): Rename to ...
2480         (prepare_assemble_variable): ... this one; change interface.
2481         (maybe_emit_vtables): Do not call output_vtable_inherit.
2482         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
2483         * cp-tree.h (prepare_assemble_variable): New.
2485 2003-06-23  Andrew Pinski <pinskia@physics.uc.edu>
2487         * method.c: add prototype for make_alias_for_thunk.
2488         (thunk_labelno, make_alias_for_thunk): only define
2489         if ASM_OUTPUT_DEF is defined.
2491 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
2493         * method.c (thunk_labelno): New variable.
2494         (make_alias_for_thunk): New function.
2495         (use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
2496         into the same section as the function it is calling.
2497         Include gt-cp-method.h.
2498         * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
2499         (cp/method.o): Depend on gt-cp-method.h.
2500         * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
2502 2003-06-23  Jan Hubicka  <jh@suse.cz>
2504         * decl.c (register_dtor_fn): Mark cleanup as used.
2505         * decl2.c (mark_vtable_entries): Skip nops.
2506         * rtti.c (get_tinfo_ptr): Mark tinfo as used.
2507         (build_dynamic_cast_1): Likewise.
2508         (tinfo_base_init): Likewise.
2509         (emit_tinfo_decl): Likewise.
2511 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
2513         * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
2514         to it.
2516 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
2518         PR c++/10784
2519         * call.c (joust): Warn about choosing conversion sequence only if
2520         -Wconversion.
2522 2003-06-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2524         PR c++/10864
2525         * call.c (op_error): Tidy.
2526         * error.c (dump_expr): Properly format 'T()' when T is an
2527         aggregate type.
2529 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
2531         PR c++/10915
2532         * decl.c (grok_op_properties): Warn possible confusing conversion
2533         only if -Wconversion.
2535 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
2537         PR c++/10749
2538         * parser.c (cp_parser_class_head): See through dependent names
2539         when parsing a class-head.
2541         PR c++/10845
2542         * pt.c (try_class_unification): Correct handling of member class
2543         templates.
2545 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
2547         * semantics.c (genrtl_finish_function): Adjust
2548         expand_function_end call.
2550 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
2552         PR c++/10939
2553         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
2554         functions.
2555         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
2557         PR c++/9649
2558         * cp-tree.h (pushdecl_class_level): Change prototype.
2559         (push_class_level_binding): Likewise.
2560         * decl.c (add_binding): Reject duplicate static data members.
2561         (pushdecl_class_level): Return a value indicating whether or not
2562         the binding was valid.
2563         (push_class_level_binding): Likewise.
2564         * semantics.c (finish_member_declaration): Don't keep invalid
2565         declarations.
2567         PR c++/11041
2568         * call.c (initialize_reference): Do not use cp_finish_decl to emit
2569         temporary variables.
2570         * cp-tree.h (static_aggregates): Declare.
2571         (pushdecl_top_level_and_finish): Likewise.
2572         * decl.c (pushdecl_top_level_1): New function.
2573         (pushdecl_top_level): Use it.
2574         (pushdecl_top_level_and_finish): New function.
2575         (initialize_local_var): Remove redundant code.
2576         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
2577         building_stmt_tree.
2578         * decl.h (static_aggregates): Remove.
2579         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
2580         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
2581         (tinfo_base_init): Likewise.
2583 2003-06-19  Matt Austern  <austern@apple.com>
2585         PR c++/11228
2586         * init.c (build_zero_init): Assert that number of array elements
2587         is an integer constant.
2588         (build_default_init) Don't use build_zero_init for arrays with
2589         variable number of elements.
2591 2003-06-19  Andreas Jaeger  <aj@suse.de>
2593         * cp-tree.h: Remove duplicated declarations.
2595 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
2597         * pt.c: Convert to ISO C.
2598         * semantics.c: Convert to ISO C.
2600 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
2602         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
2603         at_least_as_qualified_p, more_qualified_p): Return bool.
2604         * typeck.c: ANSIFY function definitions.
2605         (comp_array_types): Take redeclaration bool parameter.
2606         (comptypes): Rearrange STRICT handling.
2607         (at_least_as_qualified_p, more_qualified_p,
2608         comp_cv_qualification): Cache cv quals.
2609         (compparms): Rearrange loop.
2611 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
2613         * cp-tree.h (COMPARE_RELAXED): Rename to ...
2614         (COMPARE_DERIVED): ... here. Adjust comment.
2615         (resolve_typename_type_in_current_instantiation): Remove.
2616         (cp_tree_equal, comptypes): Return a bool.
2617         * cvt.c (convert_to_reference): Adjust comptypes call.
2618         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
2619         (resolve_typename_type_in_current_instantiation): Remove.
2620         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
2621         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
2622         calls. Refactor code.
2623         * typeck.c (comp_array_types): Return bool. Lose callback.
2624         parameter. Adjust cp_tree_equal calls.
2625         (comptypes): Return bool. Adjust strict handling. Remove relaxed
2626         enumeration and java type handling. Deal with typename types here.
2627         Adjust recursive and cp_tree_equals calls. Adjust base and derived
2628         checking.
2629         (comp_target_types): Remove unreachable code. Adjust
2630         same_or_base_type_p calls.
2631         (ptr_reasonably_similar): Adjust base and derived check.
2633         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
2634         unused calculation.
2635         (check_return_expr): Adjust error messages.
2636         * cp-tree.def (SCOPE_REF): Correct comment.
2638 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
2640         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2641         string again.
2643 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
2645         * optimize.c (dump_function): Form complete flag name by
2646         prefixing 'fdump-' to string returned by dump_flag_name().
2648 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
2650         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2651         string.
2653 2003-06-17  Jason Merrill  <jason@redhat.com>
2655         PR c++/10929
2656         * decl.c (grokfndecl): Don't mark a function inline for
2657         -finline-functions if it isn't defined.
2659 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
2661         PR c++/10712
2662         * class.c (handle_using_decl): Robustify.
2664         PR c++/11105
2665         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
2666         * mangle.c (struct globals): Remove internal_mangling_p.
2667         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
2668         (write_template_parm): Don't write out the level number.
2669         (conv_type_names): New variable.
2670         (hash_type): New function.
2671         (compare_type): Likewise.
2672         (mangle_conv_op_name_for_type): Don't try to mangle conversion
2673         operator names.
2674         * search.c (lookup_conversion_operator): New function.
2675         (lookup_fnfields_1): Use it.
2677 2003-06-17  Andreas Jaeger  <aj@suse.de>
2679         * except.c: Remove duplicate declaration of push_eh_cleanup.
2681         * call.c: Remove extra declaration of inhibit_warnings.
2683 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
2685         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
2686         * mangle.c: Convert to ISO C.
2688 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2690         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
2691         macro.
2693 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
2695         * tree.c: Convert to ISO C.
2697 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
2699         * cp-tree.h: Follow spelling conventions.
2700         * mangle.c: Likewise.
2701         * method.c: Likewise.
2702         * parser.c: Likewise.
2704 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
2706         * decl.c (start_function): Adjust init_function_start call.
2707         * method.c (use_thunk): Likewise.
2708         * semantics.c (genrtl_start_function): Likewise.
2710 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
2712         * Make-lang.in: Remove c-options.o.
2714 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
2716         * lex.c: Convert to ISO C.
2718         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
2719         * init.c: removes use of PARAMS macro.  Use ISO style function
2720         declarations.  (Not copyright-significant change.)
2722         * rtti.c: Remove PARAMS.
2724         * typeck2.c: Convert to ISO C.
2726 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
2728         PR c++/10635
2729         * typeck.c (build_c_cast): Check that the destination type is
2730         complete.
2732 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
2734         PR c++/10432
2735         * cp-tree.h (finish_declarator): Remove.
2736         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
2737         erroneous declarations.
2738         * semantics.c (finish_declarator): Remove.
2740 2003-06-11  Roger Sayle  <roger@eyesopen.com>
2742         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
2743         global static constructor/destructor if it will be empty, i.e.
2744         either doesn't call any ctors/dtors or only calls pure or const
2745         ctors/dtors.
2747 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
2749         * mangle.c (tm_p.h): Include it.
2750         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
2752         PR c++/11131
2753         * tree.c (cp_cannot_inline_fn): Check for "inline" before
2754         instantiation.
2756 2003-06-10  Jason Merrill  <jason@redhat.com>
2758         PR c++/10968
2759         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
2761 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
2763         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
2764         (start_cleanup_cnt): New.
2766 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
2768         PR c++/11131
2769         * cp-tree.h (template_for_substitution): Declare.
2770         * decl2.c (mark_used): Use it when figuring out whether or not a
2771         function is inline.
2772         * pt.c (template_for_substitution): Give it external linkage.
2773         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
2774         possible.
2776 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
2778         PR 8861
2779         * mangle.c (write_real_cst): New function.  Implement
2780         ABI-compliant mangling of floating-point literals when
2781         -fabi-version>=2; provide backward compatibility with 3.3 when
2782         -fabi-version=1 (with warning).  Clarify commentary.
2783         (write_template_arg_literal): Use write_real_cst.
2785 2003-06-07  Andreas Jaeger  <aj@suse.de>
2787         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
2789 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
2791         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
2792         (LANG_HOOKS_HANDLE_OPTION): Override.
2793         * cp-tree.h (cxx_init_options): Update.
2794         * lex.c (cxx_init_options): Update.
2796 2003-06-05  Jan Hubicka  <jh@suse.cz>
2798         * Make-lang.in:  Add support for stageprofile and stagefeedback
2800 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
2802         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
2804 2003-06-04  Andreas Jaeger  <aj@suse.de>
2806         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
2808 2003-06-03  Jason Merrill  <jason@redhat.com>
2810         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
2812         * cp/decl.c (reshape_init): Handle vectors.
2814         * testsuite/g++.dg/init/array10.C: New.
2816 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2818         PR c++/10940
2819         * pt.c (check_explicit_specialization): Check for 'static'
2820         earlier.
2822 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
2824         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
2825         the operand of a CONSTRUCTOR node.
2827 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
2829         * decl.c (cp_binding_level::this_entity): Rename from this_class.
2830         (cxx_scope_descriptor): New function.
2831         (cxx_scope_debug): Likewise.
2832         (push_binding_level): Use it.
2833         (pop_binding_level): Likewise.
2834         (suspend_binding_level): Likewise.
2835         (resume_binding_level): Likewise.
2836         (pushlevel_class): Adjust use of this_class.
2837         (pushtag): Likewise.
2838         (lookup_name_real): Likewise.
2839         (global_scope_name): New variable.
2840         (initialize_predefined_identifiers): Initialize it.
2841         (push_namespace): Use it.
2842         (make_cxx_scope): New function.
2843         (pushlevel): Use it.
2844         (pushlevel_class): Likewise.
2845         (push_binding_level): Simplify.  Loose the last two arguments.
2846         (make_binding_level): Remove.
2847         (initial_push__namespace_scope): New function.
2848         (push_namespace): Use it.  Simplify.
2849         (cxx_init_decl_processing): Likewise.
2850         (declare_namespace_level): Remove.
2852 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2854         PR c++/10956
2855         * pt.c (instantiate_decl): Don't use full template arguments if
2856         we are dealing with specializations.
2858 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2860         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
2861         (binding_depth): Unconditionally define.
2862         (is_class_level): Likewise.
2863         (indent): Likewise.  Take an indenting parameter.
2864         (push_binding_level): Remove conditional definittion.
2865         (pop_binding_level): Likewise.
2866         (suspend_binding_level): Likewise.
2867         (resume_binding_level): Likewise.
2868         (pushlevel): Likewise.
2869         (pushlevel_class): Likewise.
2870         (poplevel_class): Likewise.
2871         (pop_everything): Likewise.
2873 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
2875         * name-lookup.h (global_scope_p): New macro.
2876         * decl.c (pop_binding_level): Use it.  Don't refer directly to
2877         global_binding_level.
2878         (suspend_binding_level): Likewise.
2879         (global_bindings_p): Likewise.
2880         (print_other_binding_stack): Likewise.
2881         (print_binding_stack): Likewise.
2882         (maybe_push_to_top_level): Likewise.
2883         (pushdecl_namespace_level): Likewise.
2884         (cxx_init_decl_processing): Likewise.
2885         (start_decl): Likewise.
2886         (cp_finish_decl): Likewise.
2887         (start_function): Likewise.
2888         (global_binding_level): Remove.
2890 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2892         * parser.c (cp_parser_explicit_instantiation): Restore old
2893         access before template instantiation.
2895 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
2897         * lang-specs.h: Use -o to specify preprocessor's output file.
2898         Make -no-integrated-cpp work when building PCH files.
2900 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2902         PR c++/10682
2903         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
2904         check for implicitly created typedef to an enum.
2906 2003-05-21  Jason Merrill  <jason@redhat.com>
2908         * init.c (build_vec_delete): Copy the address into a temporary
2909         variable before calling build_vec_delete_1.
2910         * decl2.c (delete_sanity): Don't call stabilize_reference.
2912 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
2914         * pt.c (register_specialization): Update the decl's location,
2915         if necessary.
2916         (check_explicit_specialization): Likewise.
2918 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2920         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
2922 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
2924         PR c++/9738
2925         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
2926         if the old decl had instantiated DECL_RTL.
2927         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
2929 2003-05-19  Matt Austern  <austern@apple.com>
2931         * lang-options.h: Document -Wno-invalid-offsetof
2932         * typeck.c (build_class_member_access_expr): Don't complain about
2933         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
2935 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
2937         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
2938         (binding_entry_make): Make entry->chain NULL after getting an entry.
2939         fix the spelling of chain in a comment.
2940         (binding_table_free): speed up by having temporary variable.
2941         (binding_table_new): set table->chain to be NULL after allocating
2942         a table.
2943         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
2944         binding->previous to NULL after getting an binding for speed.
2946 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2948         * cp-tree.h (struct lang_type_class): Replace data member tags
2949         with hash-table nested_udts.
2950         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
2951         * class.c (unreverse_member_declarations): Don't touch
2952         CLASSTYPE_TAGS.
2953         (pushclass): Use cxx_remember_type_decls.
2954         * decl.c (struct cp_binding_level): Replace data member tags with
2955         hash-table type_decls.
2956         (pop_binding_level): Handle level->type_decls.
2957         (kept_level_p): Adjust.
2958         (poplevel): Remove unused local variable.
2959         (bt_print_entry): New function.
2960         (print_binding_level): Use it.
2961         (push_namespace): Build current_binding_level->type_decls.
2962         (maybe_process_template_type_declaration): Adjust.
2963         (pushtag): Likewise.
2964         (clear_anon_tags): Use binding_table_remove_anonymous_types.
2965         (gettags): Remove.
2966         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
2967         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
2968         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
2969         (cxx_init_decl_processing): Build global_binding_level->type_decls.
2970         (store_parm_decls): Remove pointless code.
2971         * name-lookup.c (free_binding_entry): New variable.
2972         (ENTRY_INDEX): New macro.
2973         (struct binding_table_s): New datatype.
2974         (binding_entry_make): New function.
2975         (binding_entry_free): Likewise.
2976         (binding_table_construct): Likewise.
2977         (binding_table_free): Likewise.
2978         (binding_table_new): Likewise.
2979         (binding_table_expand): Likewise.
2980         (binding_table_insert): Likewise.
2981         (binding_table_find): Likewise.
2982         (binding_table_find_anon_type): Likewise.
2983         (binding_table_reverse_maybe_remap): Likewise.
2984         (binding_table_remove_anonymous_types): Likewise.
2985         (binding_table_foreach): Likewise.
2986         * name-lookup.h (binding_table): New type.
2987         (binding_entry): Likewise.
2988         (bt_foreach_proc): Likewise.
2989         (struct binding_entry_s): New datatype.
2990         (SCOPE_DEFAULT_HT_SIZE): New macro.
2991         (CLASS_SCOPE_HT_SIZE): Likewise.
2992         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
2993         (NAMESPACE_STD_HT_SIZE): Likewise.
2994         (GLOBAL_SCOPE_HT_SIZE): Likewise.
2995         (binding_table_new): Declare.
2996         (binding_table_free): Likewise.
2997         (binding_table_insert): Likewise.
2998         (binding_table_find_anon_type): Likewise.
2999         (binding_table_reverse_maybe_remap): Likewise.
3000         (binding_table_remove_anonymous_types): Likewise.
3001         (binding_table_foreach): Likewise.
3002         (binding_table_find): Likewise.
3003         (cxx_remember_type_decls): Likewise.
3004         * pt.c (bt_instantiate_type_proc): New function.
3005         (do_type_instantiation): Use it.
3006         * search.c (lookup_field_r): Use binding_table_find.
3008 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3010         * semantics.c (perform_deferred_access_checks): Don't discard
3011         checked access.
3013 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3015         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3016         libiberty VA_ macros, always use stdarg.
3017         * rtti.c (create_pseudo_type_info): Likewise.
3018         * tree.c (build_min_nt, build_min): Likewise.
3020 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3022         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3023         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3024         collapse multiple function calls into one.
3025         * tree.c (debug_binfo): Likewise.
3027 2003-05-15  Jason Merrill  <jason@redhat.com>
3029         PR c++/5388
3030         * call.c (conditional_conversion): Don't consider implicit
3031         conversions if T2 is a base of T1.
3032         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3033         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3035         * parser.c (cp_parser_primary_expression): Convert a static data
3036         member from reference.
3038 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
3040         * call.c (build_op_delete_call): Avoid creating unnecessary types.
3041         * class.c (instantiate_type): Remove tests for tf_no_attributes.
3042         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3043         (COMPARE_NO_ATTRIBUTES): Remove.
3044         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3046         PR c++/8385
3047         * semantics.c (finish_typeof): Refine type-dependency check.
3049 2003-05-13  Jason Merrill  <jason@redhat.com>
3051         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3052         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3054 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3056         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3058 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3060         PR c++/10230, c++/10481
3061         * semantics.c (finish_non_static_data_member): Handle when the
3062         non-static member is not from a base of the current class type.
3064 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3066         PR c++/10552
3067         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3068         template and has dependent context.
3070 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3072         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
3074 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3076         PR c++/9252
3077         * cp-tree.h (saved_scope): Remove check_access field.
3078         (tsubst_flags_t): Remove tf_parsing.
3079         * decl.c (maybe_push_to_top_level): Don't initialize
3080         scope_chain->check_access.
3081         (make_typename_type, make_unbound_class_template): Don't use
3082         tf_parsing.
3083         (register_dtor_fn): Use push/pop_deferring_access_checks
3084         instead of scope_chain->check_access.
3085         * method.c (use_thunk): Likewise.
3086         * parser.c (cp_parser_explicit_instantiation
3087         (cp_parser_constructor_declarator_p): Don't call
3088         push/pop_deferring_access_checks here.
3089         (cp_parser_template_argument, cp_parser_class_name): Don't use
3090         tf_parsing.
3091         (yyparse): Check flag_access_control.
3092         * pt.c (instantiate_class_template): Call
3093         push/pop_deferring_access_checks.
3094         * semantics.c (push_deferring_access_checks): Propagate
3095         dk_no_check.
3096         (perform_or_defer_access_check): Make sure basetype_path is
3097         a type before comparison.
3098         * call.c (build_op_delete_call, build_over_call): Use
3099         perform_or_defer_access_check.
3100         * class.c (alter_access): Likewise.
3101         * init.c (build_offset_ref): Likewise.
3102         * lex.c (do_identifier): Likewise.
3103         * method.c (hack_identifier): Likewise.
3104         * search.c (lookup_member): Likewise.
3105         * semantics.c (finish_non_static_data_member): Likewise.
3106         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
3107         instead of flag_access_control.
3109 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3111         PR c++/9554
3112         * parser.c (cp_parser_class_name): Remove check_access parameter.
3113         All caller adjusted.  Update declaration.
3114         (cp_parser_lookup_name): Likewise.
3115         * semantics.c (push_deferring_access_checks): Change parameter type
3116         to enum deferring_kind.  All caller adjusted.
3117         (resume_deferring_access_checks): Adjust to use new enum.
3118         (stop_deferring_access_checks): Likewise.
3119         (perform_or_defer_access_check): Likewise.
3120         * cp-tree.h (deferring_kind): New enum.
3121         (deferred_access): Adjust field type.
3122         (push_deferring_access_checks): Update declaration.
3124 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3126         PR c++/10555, c++/10576
3127         * pt.c (lookup_template_class): Handle class template with
3128         multiple levels of parameters when one of the levels contain
3129         errors.
3131 2003-05-08  Jason Merrill  <jason@redhat.com>
3133         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
3134         expression.  Undo some of the recent reorg.
3136 2003-05-07  Richard Henderson  <rth@redhat.com>
3138         PR c++/10570
3139         * cfns.gperf: Comment out POSIX thread cancellation points,
3140         plus abort and raise.
3141         * cfns.h: Regenerate.
3143 2003-05-07  Jason Merrill  <jason@redhat.com>
3145         * call.c (build_conditional_expr): Don't assume that the folded
3146         expression has result_type.
3148 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3150         * typeck.c (build_unary_op): Deal with const qualifier in
3151         invalid pointer-to-member earlier.
3153 2003-05-05  Jason Merrill  <jason@redhat.com>
3155         PR c++/9537
3156         * call.c (conditional_conversion): Build an RVALUE_CONV if
3157         we're just changing the cv-quals.
3158         (build_conditional_expr): Don't call convert to change
3159         cv-quals.
3161 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3163         PR c++/10496
3164         * typeck.c (build_unary_op): Don't output const qualifier when
3165         output invalid pointer-to-member diagnostics.
3167 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3169         * decl.c: Fix typos.
3171 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3173         PR c++/4494
3174         * decl.c (start_function): Use same_type_p to check return type
3175         of main.
3177 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
3179         PR c/10604
3180         * cp/typeck.c (build_x_compound_expr): No need to check
3181         extra_warnings as well as warn_unused_value.
3183 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3185         PR c++/9364, c++/10553, c++/10586
3186         * decl.c (make_typename_type): Don't crash on illegal code.
3188 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
3190         * class.c (finish_struct): Use location_t and input_location
3191         directly.
3192         * decl.c (make_label_decl): Likewise.
3193         (use_label): Likewise.
3194         * decl2.c (warn_if_unknown_interface): Likewise.
3195         (start_static_initialization_or_destruction): Likewise.
3196         (generate_ctor_or_dtor_function): Likewise.
3197         (finish_file): Likewise.
3198         * error.c (print_instantiation_full_context): Likewise.
3199         * init.c (create_temporary_var): Likewise.
3200         * method.c (synthesize_method): Likewise.
3201         * parser.c (cp_token): Likewise.
3202         (cp_lexer_set_source_position_from_token): Likewise.
3203         (cp_lexer_get_preprocessor_token): Likewise.
3204         (cp_parser_statement): Likewise.
3205         * pt.c (tsubst_friend_function): Likewise.
3206         (instantiate_class_template): Likewise.
3207         (tsubst_decl): Likewise.
3208         (tsubst): Likewise.
3209         (instantiate_decl): Likewise.
3210         * semantics.c (begin_class_definition): Likewise.
3211         (expand_body): Likewise.
3213 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3215         * class.c (finish_struct): Rename lineno to input_line.
3216         * decl.c (push_binding_level, pop_binding_level,
3217         suspend_binding_level, resume_binding_level, make_label_decl,
3218         use_label, start_function): Likewise.
3219         * decl2.c (warn_if_unknown_interface,
3220         start_static_initialization_or_destruction,
3221         generate_ctor_or_dtor_function, finish_file): Likewise.
3222         * error.c (cp_line_of, print_instantiation_full_context,
3223         print_instantiation_context): Likewise.
3224         * except.c (check_handlers_1, check_handlers): Likewise.
3225         * init.c (create_temporary_var): Likewise.
3226         * method.c (use_thunk, synthesize_method): Likewise.
3227         * parser.c (cp_lexer_set_source_position_from_token,
3228         cp_lexer_get_preprocessor_token): Likewise.
3229         * pt.c (push_tinst_level, pop_tinst_level,
3230         tsubst_friend_function, instantiate_class_template, tsubst_decl,
3231         tsubst, tsubst_expr, instantiate_decl): Likewise.
3232         * semantics.c (genrtl_try_block, finish_label_stmt,
3233         begin_class_definition, expand_body,
3234         genrtl_finish_function): Likewise.
3235         * tree.c (build_min_nt, build_min): Likewise.
3237 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
3239         * decl2.c (comdat_linkage): Don't externalize explicit
3240         instantiations.
3242 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3244         PR c++/10554
3245         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
3246         is not NULL.
3248 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
3250         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
3251         (struct lang_identifier): ... to here.
3252         (LANG_ID_FIELD): Remove.
3253         (SET_LANG_ID): Remove.
3254         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
3255         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
3256         (IDENTIFIER_IMPLICIT_DECL): Likewise.
3257         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
3258         (IDENTIFIER_ERROR_LOCUS): Likewise.
3259         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3261 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3263         PR c++/8772
3264         * pt.c (convert_template_argument): Correct diagnostic.
3266 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3268         PR c++/9432, c++/9528
3269         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
3271 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
3273         * decl.c (check_previous_goto_1): Adjust prototype.
3274         (check_previous_goto): Adjust use.
3275         (check_switch_goto): Likewise.
3276         (use_label): Adjust.
3277         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
3278         (struct named_label_use_list): Use location_t datatype.
3280 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3282         PR c++/10551
3283         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
3284         that have not yet been written out.
3286 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3288         PR c++/10549
3289         * class.c (layout_class_type): Mark overlong bitfields as having
3290         the maximum size permitted by their type, after layout.
3292         PR c++/10527
3293         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
3295 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3297         * call.c (build_operator_new_call): Fix typo.
3298         * lang-options.h: Likewise.
3300 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
3302         PR c++/10515
3303         * cp-tree.h (lookup_field_1): Declare it.
3304         * search.c (lookup_field_1): Make it public.
3305         * decl.c (reshape_init): Handle designated initializers.
3307         * decl.c (maybe_commonize_var): Further tweak support for systems
3308         without weak symbols.
3310 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
3312         * decl.c (maybe_commonize_var): Fix thinko in last patch.
3314 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
3316         PR c++/10506
3317         * method.c (use_thunk): Decrement immediate_size_expand.
3319         PR c++/10503
3320         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
3321         (DECL_MAYBE_TEMPLATE): Remove.
3322         * class.c (fixed_type_or_null): Avoid infinite recursion.
3324         * decl.c (maybe_commonize_var): Make the code match the comments.
3325         * pt.c (instantiate_decl): Move call to import_export_decl.
3327 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
3329         * decl2.c (finish_file): Fix merge botch.
3331 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
3333         * decl2.c (finish_file): Don't call import_export_decl for
3334         functions that are not defined.
3335         (handle_class_head): Robustify.
3336         * pt.c (instantiate_decl): Do not call cp_finish_decl for
3337         variables that are not defined.
3339 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
3341         * call.c (print_z_candidates): Fix off by one error.
3343 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
3345         PR c++/10337
3346         * call.c (joust): Don't warn about conversion ops that are exact
3347         or cv-conversions. Rearrange to avoid multiple type comparisons.
3349 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
3351         PR c++/10471
3352         * call.c (build_cxx_call): Robustify.
3354 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
3356         * Make-lang.in (lex.o): Remove mbchar.h.
3357         * lex.c (MULTIBYTE_CHARS): Lose.
3358         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
3359         in c-lex.c.
3361 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
3363         PR c++/9847
3364         * cp-tree.h (duplicate_tag_error): Remove.
3365         * class.c (duplicate_tag_error): Remove.
3366         * semantics.c (begin_class_definition): Return immediately for a
3367         duplicate class definition.
3369         PR c++/10451
3370         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
3372 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
3374         PR c++/10446
3375         * search.c (lookup_fnfields_1): Handle empty slots in the method
3376         vector.
3378         PR c++/10428
3379         * decl.c (check_elaborated_type_specifier): New function, split
3380         out from ...
3381         (xref_tag): ... here.  Use the new function in more places.
3383         * rtti.c (throw_bad_typeid): Use build_cxx_call.
3385 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
3387         * call.c (build_over_call): Use build_cxx_call.
3388         (build_cxx_call): New method, split out of build_over_call.
3389         * cp-tree.h (language_function): Add can_throw.
3390         (build_cxx_call): Declare it.
3391         * decl.c (finish_function): If a function does not contain any
3392         calls to functions that can throw an exception, indicate that
3393         fact.
3394         * decl2.c (mark_used): Do not defer the instantiation of
3395         functions, if the current function does not throw.
3396         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
3397         * pt.c (instantiate_decl): Make sure import_export_decl is called
3398         before emitting things.
3399         * rtti.c (throw_bad_cast): Use build_cxx_call.
3400         (build_dynamic_cast_1): Likewise.
3401         * typeck.c (build_function_call): Likewise.
3403 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
3405         PR c++/9881
3406         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
3407         expressions. Reverts my 2002-08-08 patch.
3409         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
3410         cheaper early exit.
3412 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3414         * cp/decl2.c (start_static_storage_duration_function): Take count
3415         arg, don't check if it wraps round.
3416         (generate_ctor_or_dtor_function): Add locus arg, use it.
3417         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
3418         locus.
3419         (finish_file): Set line numbers to past EOF for synthesized
3420         functions.
3422 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3424         PR c++/10405
3425         * search.c (lookup_field_1): Final scan goes backwards for
3426         types, forwards for non-types.
3428 2003-04-17  Roger Sayle  <roger@eyesopen.com>
3430         PR c/10375
3431         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
3432         "nothrow" function attributes.
3434 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3436         PR c++/10347
3437         * pt.c (type_dependent_expression_p): Handle array new.
3439 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
3441         PR c++/10381
3442         * parser.c (cp_parser_primary_expression): Reorganize logic for
3443         dealing with name lookup failures.
3445 2003-04-15  Jason Merrill  <jason@redhat.com>
3447         * decl2.c (mark_used): Don't instantiate anything if
3448         skip_evaluation.
3450 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
3452         * tree.c (build_cplus_array_type_1): Do not call
3453         uses_template_parms() on a NULL index_type.
3455 2003-04-13  Roger Sayle  <roger@eyesopen.com>
3457         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
3459 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
3461         PR c++/10300
3462         * init.c (build_new_1): Reorganize.
3464 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3466         * class.c (initialize_array)
3467         * decl.c (reshape_init)
3468         * decl2.c (build_expr_from_tree)
3469         * init.c (build_zero_init)
3470         * pt.c (tsubst_copy, tsubst_copy_and_build)
3471         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
3472         (ptm_initializer, class_initializer, get_pseudo_ti_init)
3473         * semantics.c (finish_compound_literal)
3474         * typeck.c (build_ptrmemfunc1)
3475         * typeck2.c (store_init_value, process_init_constructor)
3476         (build_functional_cast): Use build_constructor.
3478 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3480         * call.c (print_z_candidates): Use gcc_gettext_width, not
3481         strlen, to determine how much padding to use.
3483 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
3485         * decl.c: Update all calls to shadow_warning.
3487 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
3489         * class.c (layout_class_type): Correct handling for overlong
3490         bit-fields whose width is the same as an integer type.
3492 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
3494         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
3495         * cp-lang.c (cp_tree_size): New function.
3496         (LANG_HOOKS_TREE_SIZE): Override.
3498         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
3499         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
3500         (union lang_tree_node): Remove common and srcloc members.
3501         (build_srcloc_here): Don't prototype.
3502         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
3503         * pt.c (pending_templates): Correct comment.
3504         * tree.c (build_srcloc, build_srcloc_here): Kill.
3506 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
3508         * call.c: Include intl.h.
3509         (print_z_candidate): Always use inform; get rid of errfn
3510         argument. Reorganize so that all the strings get picked up
3511         by xgettext.  Note obligation of caller to pass first argument
3512         through gettext.
3513         (print_z_candidates): Update to match.  Indent second and
3514         successive candidates by strlen() of translated message.
3515         (joust): Restructure ambiguous-conversion pedwarn so that
3516         translators see a complete sentence.  Update calls to
3517         print_z_candidate.
3519         * Make-lang.in (cp/call.o): Update dependencies.
3521 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3523         * decl.c (set_current_binding_level): Delete, revert last change.
3524         (current_binding_level): Modify to allow it as as lvalue.
3526 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3528         * name-lookup.c (find_binding): Pass appropriate pointer type to
3529         POP_TIMEVAR_AND_RETURN.
3531 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3533         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
3534         * cp-tree.h: Don't insist on having GNUC.
3536 2003-04-03  Jason Merrill  <jason@redhat.com>
3538         * cvt.c (ocp_convert): Only abort if we try to convert an object
3539         of TREE_ADDRESSABLE type.
3541         * class.c (build_vtable): Set DECL_ALIGN here.
3542         (get_vtable_decl): Not here.
3543         (layout_vtable_decl): Or here.
3544         (create_vtable_ptr): Or here.
3545         (layout_class_type): Or here.
3546         (check_bitfield_decl): Don't mess with field alignment.
3548 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3550         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
3551         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
3552         * rtti.c (dfs_class_hint_mark): Likewise.
3554         * decl.c (push_local_name, push_class_level_binding,
3555         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
3556         functions returning void.
3557         * decl2.c (add_using_namespace): Likewise.
3559         * decl.c (print_binding_level, print_other_binding_stack,
3560         print_binding_stack): Cast argument of %p specifier to void*.
3561         * ptree.c (cxx_print_decl): Likewise.
3563         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3564         VAR_FUNCTION_OR_PARM_DECL_CHECK,
3565         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3566         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
3567         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
3569         * decl.c (set_current_binding_level): New macro.  Use throughout
3570         when setting the current binding level.
3572         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
3573         in enum.
3574         * method.c (mangling_flags): Likewise.
3576         * cp-tree.h (lang_type_header): Add __extension__ and use
3577         CHAR_BITFIELD for members.
3579 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
3581         PR other/9274
3582         * mangle.c: Include gt-cp-mangle.h.
3583         (subst_identifiers): Mark with GTY.
3584         * config-lang.in (gtfiles): Add cp/mangle.c.
3585         * Make-lang.in: (gt-cp-mangle.h): New rule.
3586         (cp/mangle.o): Depends on gt-cp-mangle.h.
3588 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
3590         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
3591         after \$(srcdir)/cp/name-lookup.h.
3592         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
3593         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
3594         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
3595         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
3597 2003-03-31  Jason Merrill  <jason@redhat.com>
3599         PR java/10145
3600         * class.c (check_field_decl): Don't set DECL_ALIGN.
3602 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
3604         PR c++/7647
3605         * decl.c (grokdeclarator): Tidy, slightly.
3606         * search.c (lookup_field_1): Add want_type parameter.
3607         (lookup_field_r): Adjust call to lookup_field_1.
3609 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3611         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
3613 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
3615         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
3616         prototype.
3617         (cxx_scope_find_binding_for_name): Likewise.
3618         * decl.c (find_binding: Move to name-lookup.c.
3619         (binding_for_name): Likewise.
3620         (cxx_scope_find_binding_for_name): Likewise.
3621         (BINDING_LEVEL):  Remove.
3622         (push_binding): Tidy.
3623         (push_class_binding): Likewise.
3624         (pop_binding): Likewise.
3625         (poplevel): Likewise.
3626         (poplevel_class): Likewise.
3627         (set_identifier_type_value_with_scope): Likewise.
3628         (push_overloaded_decl): Likewise.
3629         (lookup_tag): Likewise.
3630         (unqualified_namespace_lookup): Likewise.
3631         (lookup_name_current_level): Likewise.
3632         (maybe_inject_for_scope_var): Likewise.
3633         (namespace_binding): Move to name-lookup.c.
3634         (set_namespace_binding): Likewise.
3635         * decl2.c (lookup_using_namespace): Tidy.
3636         (qualified_lookup_using_namespace): Likewise.
3637         (do_toplevel_using_decl): Likewise.
3638         * name-lookup.c: Include "timevar.h"
3639         * name-lookup.h (cxx_scope):  Declare.
3640         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
3641         member declaration.
3642         (BINDING_SCOPE): Adjust definition.
3643         (BINDING_HAS_LEVEL_P): Remove.
3645 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3647         * name-lookup.c: New file.
3648         * name-lookup.h: Likewise..
3649         * decl.c (push_binding): Adjust use cxx_binding_make.
3650         (free_bindings): Move to name-lookup.c
3651         (pop_binding): Use cxx_binding_free.
3652         (binding_for_name): Tidy.
3653         * cp-tree.h: Include "name-lookup.h"
3654         (cxx_binding_make): Move to name-lookup.h
3655         (cxx_binding_clear): Likewise.
3656         (struct cxx_binding): Likewise.
3657         (LOCAL_BINDING_P): Likewise.
3658         (INHERITED_VALUE_BINDING_P): Likewise.
3659         (BINDING_SCOPE): Likewise.
3660         (BINDING_HAS_LEVEL_P): Likewise.
3661         (BINDING_VALUE): Likewise.
3662         (BINDING_TYPE): Likewise.
3663         * config-lang.in (gtfiles): Add cp/name-lookup.h
3664         * Make-lang.in (cp/name-lookup.o): New rule.
3665         (CXX_OBJS): Add cp/name-lookup.o
3666         (CXX_TREE_H): Add cp/name-lookup.h
3668 2003-03-28  Jason Merrill  <jason@redhat.com>
3670         PR c++/10245
3671         * cvt.c (force_rvalue): New fn.
3672         * call.c (build_conditional_expr): Use it.
3673         * cp-tree.h: Declare it.
3675 2003-03-28  Mike Stump  <mrs@apple.com>
3677         * error.c (dump_expr): Add 0x to printed hex numbers to make
3678         output match source code better.
3680 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
3682         PR c++/10218
3683         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
3684         definitions.
3686         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
3687         non-existant ssdf_decls array.
3688         (finish_file): Call generator_ctor_or_dtor_function when there are
3689         static constructors or destructors and no other static
3690         initializations.
3692 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
3694         PR c++/10047
3695         * decl2.c (finish_file): Don't warn about explicitly instantiated
3696         inline decls.
3698 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
3700         PR c++/10224
3701         * pt.c (lookup_template_class): Only check instantiated args if
3702         they do not contain template parameters.
3704 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
3706         PR c++/10158
3707         * parser.c (cp_parser_function_definition): Set
3708         DECL_INITIALIZED_IN_CLASS for members.
3709         * pt.c (instantiate_decl): Only reduce the template args for
3710         friends that are not defined in class.
3712 2003-03-25  Jason Merrill  <jason@redhat.com>
3714         * call.c (print_z_candidate): Change name of first arg to msgid.
3715         (joust): Add comment for translators.
3717 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
3719         PR c++/9898, PR c++/383, DR 322
3720         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
3721         through reference types on both PARM and ARG.
3723 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
3725         PR c++/10119
3726         * error.c (dump_expr) <BASELINK>: Use dump_expr.
3727         * pt.c (maybe_fold_nontype_args): New function.
3728         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
3729         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
3730         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
3731         maybe_fold_nontype_args.
3733 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
3735         PR c++/10026
3736         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
3738 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
3740         PR c++/7086
3741         * typeck.c (cxx_mark_addressable):  Adjust call to
3742         gen_mem_addressof or put_var_into_stack.
3744 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
3746         PR c++/9978, c++/9708
3747         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
3748         * call.c (add_template_candidate_real): Adjust
3749         instantiate_template call.
3750         * class.c (resolve_address_of_overloaded_function): Likewise.
3751         * decl.c (build_enumerator): Set TREE_CONSTANT.
3752         * pt.c (check_instantiated_args): New.
3753         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
3754         TREE_READONLY.
3755         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
3756         (reduce_template_parm_level): Likewise.
3757         (process_template_parm): Likewise.
3758         (check_explicit_specialization): Adjust instantiate_template call.
3759         (convert_template_argument): Don't check non-type argument here.
3760         (lookup_template_class): Check them here.
3761         (tsubst_friend_function): Adjust instantiate_template call.
3762         (instantiate_template): Add tsubst_flags parameter, use it. Check
3763         instantiated args.
3765 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
3767         * decl.c: Update calls to shadow_warning.
3769 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
3771         PR c++/9898
3772         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
3773         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
3775 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
3777         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
3778         friends.
3779         * cp/pt.c (instantiate_class_template): Fix formatting.
3781 2003-03-14  Matt Austern  <austern@apple.com>
3783         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
3784         (unemitted_tinfo_decl_p): Remove.
3785         (emit_tinfo_decl): Change declaration to remove unused parameter.
3786         * decl2.c (finish_file): Change tinfo emission to loop through
3787         unemitted_tinfo_decls array instead of looping through all decls.
3788         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
3789         unused second parameter.
3790         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
3791         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
3792         (emit_tinfo_decl): remove unused second parameter, add assertion
3793         that decl hasn't already been emitted.
3795 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
3797         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
3798         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
3799         return statements.
3801 2003-03-19  Jason Merrill  <jason@redhat.com>
3803         PR c++/8316, c++/9315, c++/10136
3804         * call.c (print_z_candidate): Split out from...
3805         (print_z_candidiates): ...here.
3806         (joust): Use it.
3808 2003-03-17  Roger Sayle  <roger@eyesopen.com>
3810         PR c++/10031
3811         * decl.c (duplicate_decls): Use the new type when prototyping
3812         anticipated decls, even when the types match.  This defines the
3813         exception list for the built-in function.
3815 2003-03-17  Jason Merrill  <jason@redhat.com>
3817         PR c++/10091
3818         * typeck.c (build_class_member_access_expr): Compare
3819         TYPE_MAIN_VARIANTs.
3821 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
3823         PR c++/9639
3824         * parser.c (cp_parser_declarator_id): Clear parser->scope.
3826 2003-03-16  Jason Merrill  <jason@redhat.com>
3828         PR c++/9993
3829         * decl.c (finish_function): Only allow the NRVO to use variables
3830         declared at function scope.
3832 2003-03-17  Andreas Jaeger  <aj@suse.de>
3834         * Make-lang.in (cp/TAGS): Remove.
3836 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
3838         PR c++/9629
3839         * cp-tree.h (struct language_function): Add in_base_initializer.
3840         (in_base_initializer): define it.
3841         (expand_member_init): Remove INIT param.
3842         * init.c (expand_member_init): Remove INIT param, return the member.
3843         (emit_mem_initializers): Set in_base_initializer.
3844         * class.c (build_base_path): Check in_base_initializer.
3845         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
3846         * pt.c (tsubst_initializer_list): Likewise.
3848 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
3850         * decl.c (binding_for_name): Fix initialization thinko.
3852 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
3854         Compile-time improvement: 2/n.
3855         * cp-tree.h (struct cxx_binding): New datatype;
3856         (struct lang_identifier): Use it.
3857         (LOCAL_BINDING_P): Adjust definition.
3858         (INHERITED_VALUE_BINDING_P): Likewise.
3859         (BINDING_SCOPE): Likewise.
3860         (BINDING_HAS_LEVEL_P): Likewise.
3861         (BINDING_VALUE): Likewise.
3862         (BINDING_TYPE): Likewise.
3863         (IDENTIFIER_VALUE): Likewise.
3864         (struct tree_binding): Remove.
3865         (TS_CP_BINDING): Likewise.
3866         ((union lang_tree_node): Remove field "binding".
3867         (cxx_binding_clear): New macro.
3868         (binding_for_name): Adjust return type.
3869         (qualified_lookup_using_namespace): Adjust prototype.
3870         (lookup_using_namespace): Adjust prototype.
3871         (cxx_scope_find_binding_for_name): Declare.
3872         * cp-tree.def: Remove CPLUS_BINDING definition.
3873         * decl.c (push_binding): Adjust local variable type.
3874         (add_binding): Likewise.
3875         (push_class_binding): Likewise.
3876         (pop_binding): Likewise.
3877         (poplevel): Likewise.
3878         (poplevel_class): Likewise.
3879         (free_bindings):  Adjust type.
3880         (find_binding): Adjust return type, add a third parameter. Remove
3881         non-useful assertion now that we use static typing.
3882         (cxx_scope_find_binding_for_name): New function.
3883         (binding_for_name): Use it.  Adjust local variable type. Simplify.
3884         (namespace_binding):  Simplify.
3885         (set_namespace_binding): Likewise.
3886         (set_identifier_type_value_with_scope): Adjust local variable type.
3887         (lookup_tag): Don't type-abuse of local variable 'old'.
3888         (lookup_namespace_name): Likewise.  Allocate binding on stack.
3889         (select_decl): Adjust prototype.
3890         (unqualified_namespace_lookup):  Allocate binding on stack.
3891         Don't type-abuse of local variable 'val'.
3892         (lookup_name_real): Likewise.
3893         (maybe_inject_for_scope_var): Adjust local variable type.
3894         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
3895         (namespace_binding): Adjust logic, simplify.
3896         (BINDING_LEVEL): Adjust definition.
3897         (push_class_level_binding): Adjust local variable type.
3898         (struct cxx_saved_binding): Adjust field 'binding' type.
3899         * decl2.c (ambiguous_decl): Adjust prototype.
3900         (lookup_using_namespace): Adjust local variable type.
3901         (qualified_lookup_using_namespace): Catch type error and correct
3902         ensueing logic error.
3903         (do_nonmember_using_decl): Adjust local variable type.  Allocate
3904         temporary cxx_binding on stack.
3905         (do_toplevel_using_decl): Adjust local variable type.
3906         * ptree.c (cxx_print_cxx_binding): New function.
3907         (cxx_print_identifier): Use it.
3908         (cxx_print_xnode): Delete CPLUS_BINDING case label.
3910 2003-03-15  Roger Sayle  <roger@eyesopen.com>
3912         * tree.c (count_functions): Fix whitespace.
3914 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
3916         * Make-lang.in: Update.
3918 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3920         PR c++/6440
3921         * pt.c (maybe_process_partial_specialization): Handle
3922         member class template when enclosing class template is
3923         explicit specialized.
3924         (most_general_template): Stop looking when DECL is already
3925         specialized.
3927 2003-03-13  Jason Merrill  <jason@redhat.com>
3929         PR c++/9420
3930         * search.c (lookup_conversions): Call complete_type here.
3931         * call.c (implicit_conversion): Not here.
3933 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
3935         * decl2.c (do_nonmember_using_decl): Correct handling of
3936         simultaneous type/non-type bindings.
3938         * call.c (initialize_reference): Remove bogus assertion.
3939         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
3941 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
3943         PR c++/7050
3944         * expr.c (cxx_expand_expr): Return const0_rtx for throw
3945         expressions.
3947 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
3949         PR c++/9474
3950         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3951         to merge old and new declarations.
3953 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
3955         * g++.1: Remove.
3956         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
3957         (cp/g++.1): Build it from scratch in the build tree.
3958         (c++.install-man): Depend on it.  Install it from the build tree.
3959         (c++.mostlyclean): Clean it.
3961 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
3963         PR c++/9474
3964         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3965         to merge old and new declarations.
3967         PR c++/9924
3968         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
3970 2003-03-11  Jason Merrill  <jason@redhat.com>
3972         PR c++/9820
3973         * search.c (lookup_member): Fix handling of functions in a class
3974         being defined.
3976 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
3978         PR c++/8700
3979         * call.c (convert_class_to_reference): Adjust usage of
3980         splice_viable.
3981         (any_viable): Remove.
3982         (splice_viable): Combine with any_viable.
3983         (print_z_candidates): Avoid printing duplicates.
3984         (build_user_type_conversion_1): Adjust usage of splice_viable.
3985         (build_new_function_call): Likewise.
3986         (build_operator_new_call): Likewise.
3987         (build_object_call): Likewise.
3988         (build_conditional_expr): Likewise.
3989         (build_new_op): Likewise.
3990         (build_new_method_call): Likewise.
3991         (joust): Remove spurious comment.
3992         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
3993         * decl2.c (arg_assoc_class): Simplify.
3994         * friend.c (add_friend): Likewise.
3996 2003-03-11  Jason Merrill  <jason@redhat.com>
3998         PR c++/8660
3999         * decl2.c (check_classfn): A member template only matches a
4000         member template.
4002 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
4004         * Make-lang.in (CXX_C_OBJS): Update.
4005         * lang-specs.h: Don't define __GNUG__ here.
4007 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
4009         * call.c (perform_overload_resolution): New function.
4010         (build_new_function_call): Use it.
4011         (build_operator_new_call): Likewise.
4012         (add_candidates): Add explicit_targs and template_only parameters.
4013         (build_new_op): Adjust accordingly.
4014         * cp-tree.h (build_operator_new_call): New function.
4015         (build_function_call_real): Remove.
4016         (build_function_call_maybe): Likewise.
4017         * init.c (build_new_1): Use build_operator_new_call.
4018         * typeck.c (build_function_call_real): Rename to ...
4019         (build_function_call): ... this.
4021 2003-03-10  Devang Patel  <dpatel@apple.com>
4023         PR c++/9394
4024         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4026 2003-03-10  Jason Merrill  <jason@redhat.com>
4028         PR c++/9798
4029         * decl.c (push_using_directive): Push before recursing.
4031         PR c++/9868, c++/9524
4032         * call.c (resolve_scoped_fn_name): Handle the case of a function
4033         pointer member.
4035         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4036         argument in the pointer-to-member case.
4038 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
4040         PR c++/9373
4041         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4042         pointers to member functions.
4044         PR c++/8534
4045         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4046         in pointer-to-member-function types.
4048 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4050         * expr.c (cplus_expand_constant): Use C90 prototype style.
4051         (cxx_expand_expr): Likewise.
4053 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4055         PR c++/9970
4056         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4057         functions.
4059 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
4061         * lang-specs.h (c++-header): Change .pch to .gch.
4063 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
4065         * cp-tree.h (cxx_init): Update prototype.
4066         * lex.c (cxx_init): Similarly.
4068 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
4070         PR c++/9823
4071         * cp-tree.h (begin_mem_initializers): Remove.
4072         * parser.c (cp_parser_mem_initializer_list): Inline it here.
4073         Do not call finish_mem_initializers if not in a constructor.
4074         (cp_parser_class_head): Fix typo in error message.
4075         * semantics.c (begin_mem_initializers): Remove.
4076         * testsuite/g++.dg/parser/constructor1.C: New test.
4078         PR c++/9809
4079         * call.c (add_function_candidate): Skip builtin fuctions that have
4080         not yet been declared.
4082         PR c++/9982
4083         * init.c (build_new_1): Correct logic for determining whether or
4084         not to use an array cookie.
4086         PR c++/9524
4087         * parser.c (cp_parser_postfix_expression): Call
4088         finish_non_static_data_member, even when processing_template_decl.
4090         PR c++/9912
4091         * cp-tree.h (is_ancestor): New function.
4092         (handle_class_head): Change prototype.
4093         * decl2.c (is_namespace_ancestor): Rename to ...
4094         (namespace_anecestor): ... this.
4095         (set_decl_namespace): Adjust accordingly.
4096         (handle_class_head): Remove unncessary parameters.
4097         * parser.c (cp_parser_class_head): Check that
4098         nested-name-specifiers are used appropriately.
4100 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
4102         * call.c (reference_binding): Remove REF_IS_VAR parameter.
4103         (implicit_conversion): Adjust call to reference_binding.
4104         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
4105         (initialize_reference): Adjust handling for references bound to
4106         rvalues.
4107         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
4108         prototype.
4109         (real_non_cast_lvalue_p): New method.
4110         * cvt.c (build_up_reference): Adjust use of
4111         make_temporary_var_for_ref_to_temp.
4112         * tree.c (real_non_cast_lvalue_p): New method.
4114 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4116         * except.c (init_exception_processing): Use C90 prototype style.
4117         (cp_protect_cleanup_actions): Likewise.
4118         (prepare_eh_type): Likewise.
4119         (build_eh_type_type): Likewise.
4120         (build_exc_ptr): Likewise.
4121         (do_begin_catch): Likewise.
4122         (dtor_nothrow): Likewise.
4123         (do_end_catch): Likewise.
4124         (push_eh_cleanup): Likewise.
4125         (decl_is_java_type): Likewise.
4126         (choose_personality_routine): Likewise.
4127         (initialize_handler_parm): Likewise.
4128         (expand_start_catch_block): Likewise.
4129         (expand_end_catch_block): Likewise.
4130         (begin_eh_spec_block): Likewise.
4131         (finish_eh_spec_block): Likewise.
4132         (do_allocate_exception): Likewise.
4133         (do_free_exception): Likewise.
4134         (wrap_cleanups_r): Likewise.
4135         (stabilize_throw_expr): Likewise.
4136         (build_throw): Likewise.
4137         (complete_ptr_ref_or_void_ptr_p): Likewise.
4138         (is_admissible_throw_operand): Likewise.
4139         (nothrow_libfn_p): Likewise.
4140         (can_convert_eh): Likewise.
4141         (check_handlers_1): Likewise.
4142         (check_handlers): Likewise.
4144 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
4146         * call.c (merge_conversion_sequences): New function.
4147         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
4148         (convert_class_to_reference): Correct handling of second
4149         standard conversion sequence in a user-defined conversion
4150         sequence.
4151         (build_user_type_conversion_1): Use merge_conversion_sequences.
4152         * cp-tree.def: Add comments for CONV nodes.
4153         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
4155 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4157         * error.c (init_error): Use C90 prototype style.
4158         (dump_scope): Likewise.
4159         (dump_qualifiers): Likewise.
4160         (dump_template_argument): Likewise.
4161         (dump_template_argument_list): Likewise.
4162         (dump_template_parameter): Likewise.
4163         (dump_template_bindings): Likewise.
4164         (dump_type): Likewise.
4165         (dump_typename): Likewise.
4166         (class_key_or_enum): Likewise.
4167         (dump_aggr_type): Likewise.
4168         (dump_type_prefix): Likewise.
4169         (dump_type_suffix): Likewise.
4170         (dump_global_iord): Likewise.
4171         (dump_simple_decl): Likewise.
4172         (dump_decl): Likewise.
4173         (dump_template_decl): Likewise.
4174         (dump_function_decl): Likewise.
4175         (dump_parameters): Likewise.
4176         (dump_exception_spec): Likewise.
4177         (dump_function_name): Likewise.
4178         (dump_template_parms): Likewise.
4179         (dump_char): Likewise.
4180         (dump_expr_list): Likewise.
4181         (dump_expr): Likewise.
4182         (dump_binary_op): Likewise.
4183         (dump_unary_op): Likewise.
4184         (type_as_string): Likewise.
4185         (expr_as_string): Likewise.
4186         (decl_as_string): Likewise.
4187         (context_as_string): Likewise.
4188         (lang_decl_name): Likewise.
4189         (cp_file_of): Likewise.
4190         (cp_line_of): Likewise.
4191         (decl_to_string): Likewise.
4192         (expr_to_string): Likewise.
4193         (fndecl_to_string): Likewise.
4194         (code_to_string): Likewise.
4195         (language_to_string): Likewise.
4196         (parm_to_string): Likewise.
4197         (op_to_string): Likewise.
4198         (type_to_string): Likewise.
4199         (assop_to_string): Likewise.
4200         (args_to_string): Likewise.
4201         (cv_to_string): Likewise.
4202         (cxx_print_error_function): Likewise.
4203         (cp_diagnostic_starter): Likewise.
4204         (cp_diagnostic_finalizer): Likewise.
4205         (cp_print_error_function): Likewise.
4206         (function_category): Likewise.
4207         (print_instantiation_full_context): Likewise.
4208         (print_instantiation_partial_context): Likewise.
4209         (maybe_print_instantiation_context): Likewise.
4210         (print_instantiation_context): Likewise.
4211         (cp_printer): Likewise.
4212         (print_integer): Likewise.
4213         (print_non_consecutive_character): Likewise.
4214         (locate_error): Likewise.
4216 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
4218         PR c++/9965
4219         * call.c (reference_binding): Add ref_is_var parameter.
4220         (implicit_conversion): Adjust call to reference_binding.
4221         (initialize_reference): Likewise.
4223         PR c++/9400
4224         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
4225         PARM_DECLs.
4227         PR c++/9791
4228         * class.c (get_basefndecls): Use lookup_fnfields_1.
4230 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4232         PR c++/9188
4233         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
4234         in error message.
4235         (cp_parser_single_declaration): Likewise.
4237 2003-03-05  Jason Merrill  <jason@redhat.com>
4239         PR c++/9440
4240         * call.c (build_conditional_expr): Use convert rather than an
4241         explicit NOP_EXPR.
4243 2003-03-02  Matt Austern  <austern@apple.com>
4245         * decl.c (cp_binding_level): Add static_decls varray member.
4246         (add_decl_to_level): Add static/inline namespace scope
4247         declarations to static_decls array.
4248         (wrapup_global_for_namespace): Pass static_decls only, instead of
4249         all decls, to wrapup_global_declarations/check_global_declarations.
4250         (push_namespace): Initialize static_decls for ordinary namespaces.
4251         (cxx_init_decl_processing): Initialize static_decls for global
4252         namespace.
4254 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
4256         * class.c (end_of_class): Correct thinko.
4258 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
4260         * config-lang.in: Replace ${libstdcxx_version} by its value.
4262 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
4264         * cp-tree.h (cxx_saved_binding): Declare.
4265         (struct saved_scope): Adjust type of field 'old_binding'.
4266         * decl.c (cxx_saved_binding_make): New macro.
4267         (struct cxx_saved_binding): Define.
4268         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
4269         C++ bindings.
4270         (maybe_push_to_top_level): Adjust local variable type.
4271         (pop_from_top_level): Likewise.
4273 2003-03-04  Tom Tromey  <tromey@redhat.com>
4275         * Make-lang.in (c++.tags): New target.
4277 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
4279         * Make-lang.in: Update.
4281 2003-03-03  Jason Merrill  <jason@redhat.com>
4283         * decl.c (finish_enum): Do set the type in a template. Simplify.
4284         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
4286 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
4288         PR c++/9878
4289         * call.c (convert_class_to_reference): Correct conversion
4290         sequences.
4291         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
4292         (implicit_conversion): Adjust call to reference_binding.
4293         (add_candidate): Change type of candidates parameter.
4294         (add_function_candidate): Likewise.
4295         (add_conv_candidate): Likewise.
4296         (build_builtin_candidate): Likewise.
4297         (add_builtin_candidate): Likewise.
4298         (add_builtin_candidates): Likewise.
4299         (add_template_candidate_real): Likewise.
4300         (add_template_candidate): Likewise.
4301         (add_template_conv_candidate): Likewise.
4302         (build_user_type_conversion_1): Adjust accordingly.
4303         (build_object_call): Likewise.
4304         (build_conditional_expr): Likewise.
4305         (add_candidates): Likewise.
4306         (build_new_op): Likewise.
4307         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
4308         (build_new_method_call): Adjust calls to add_function_candidate.
4309         (make_temporary_var_for_ref_to_temp): New function.
4310         (initialize_reference): Add decl parameter.
4311         * class.c (build_rtti_vtbl_entries): Use build_address and
4312         build_nop.
4313         * cp-tree.h (initialize_reference): Change prototype.
4314         (make_temporary_var_for_ref_to_temp): New function.
4315         (build_type_conversion): Change prototype.
4316         (build_address): New function.
4317         (build_nop): Likewise.
4318         * cvt.c (cp_convert_to_pointer): Adjust call to
4319         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
4320         Use build_nop.
4321         (convert_to_pointer_force): Use build_nop.
4322         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
4323         (convert_to_reference): Adjust call to build_type_conversion.
4324         (ocp_convert): Likewise.
4325         (build_type_conversion): Remove for_sure parameter.
4326         * decl.c (grok_reference_init): Use initialize_reference.
4327         * typeck.c (build_address): New function.
4328         (build_nop): Likewise.
4329         (build_unary_op): Use them.
4330         (build_ptrmemfunc): Tidy slightly.
4331         (convert_for_initialization): Adjust call to
4332         initialize_reference.
4333         * typeck2.c (store_init_value): Remove #if 0'd code.
4335 2003-03-03  Jason Merrill  <jason@redhat.com>
4337         * decl.c (start_function): Clear DECL_NUM_STMTS.
4339         * class.c (get_vtable_decl): Use vtbl_type_node.
4340         (build_primary_vtable): Check for it.
4342 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
4344         * decl.c (check_initializer): Check for vector_opaque_p.
4346 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
4348         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
4349           invoke an external cpp during compilation.
4351 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4353         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
4354         that of warning().
4355         (start_decl): Likewise.
4356         (start_function): Likewise.
4358 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
4360         * Make-lang.in (CXX_C_OBJS): Update.
4362 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
4364         PR c++/9892
4365         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
4366         instantiating it.
4368 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
4370         * parser.c (cp_parser_init_declarator): Revert opaque
4371         vector_opaque_p change.
4372         Do not include target.h.
4374 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
4376         PR c++/9879
4377         * cp-tree.h (build_zero_init): Add parameter.
4378         * decl.c (cp_finish_decl): Adjust call.
4379         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
4380         calls.
4381         (build_default_init): Add nelts parameter.  Adjust calls to
4382         build_zero_init.
4383         (build_new_1): Adjust call to build_default_init.
4384         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
4386 2003-02-26  Devang Patel  <dpatel@apple.com>
4388         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
4389         required.  Postpone enum setting for template decls.
4390         (build_enumerator): Delay copying value node until finish_enum
4391         (). Remove #if 0'ed code.
4392         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
4393         (tsubst_copy): Add check for enum type.
4395 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
4397         PR c++/9683
4398         * decl2.c (prune_vars_needing_no_initialization): Do not throw
4399         away initializations for DECL_EXTERNAL VAR_DECLs.
4400         (finish_file): Adjust accordingly.
4401         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
4403 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
4405         * decl.c (add_binding): Time TV_NAME_LOOKUP.
4406         (push_class_binding): Likewise.
4407         (set_namespace_binding): Likewise.
4409 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
4411         PR c++/9836
4412         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
4413         specializations back to the main template.
4414         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
4415         * pt.c (resolve_typename_type): Likewise.
4417 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
4419         PR c++/9778
4420         * pt.c (tsubst_copy_and_build): For a templated function inside a
4421         scope, process template arguments.
4423 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4425         PR c++/9602
4426         * typeck2.c (abstract_virtuals_error): Don't check when
4427         TYPE is still template parameter dependent.
4429 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
4431         PR c++/5333
4432         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
4433         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
4434         * pt.c (instantiate_class_template): Don't try to instantiate
4435         dependent types.
4436         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
4438 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
4440         PR c++/9749
4441         * decl.c (grokdeclarator): Do not allow parameters with variably
4442         modified types.
4444 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
4446         * search.c (grow_bfs_bases): Remove. Fold into ...
4447         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
4448         in previous patch.
4450 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
4452         PR c++/9729
4453         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
4454         when the G++ 3.2 ABI prevents correct compilation.
4456 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
4458         Change base class access representation. Share virtual base
4459         binfos.
4460         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
4461         call.
4462         * cp/class.c (build_base_path): Likewise.
4463         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
4464         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
4465         (make_new_vtable): Adjust.
4466         (force_canonical_binfo_r): Delete.
4467         (force_canonical_binfo): Delete.
4468         (mark_primary_virtual_base): Delete.
4469         (dfs_unshared_virtual_bases): Delete.
4470         (mark_primary_bases): Adjust.
4471         (maybe_warn_about_overly_private_class): Adjust.
4472         (dfs_base_derived_from): Delete.
4473         (base_derived_from): Follow the inheritance chain.
4474         (struct find_final_overrider_data): Add vpath member.
4475         (dfs_find_final_overrider): Adjust.
4476         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
4477         (find_final_overrider): Adjust.
4478         (update_vtable_entry_for_fn): Adjust.
4479         (modify_all_vtables): Adjust.
4480         (walk_subobject_offsets): Adjust.
4481         (layout_nonempty_base_or_field): Adjust.
4482         (layout_empty_base): Remove last parameter. Adjust.
4483         (build_base_field): Adjust.
4484         (build_base_fields): Adjust.
4485         (propagate_binfo_offsets): Remove last parameter. Adjust.
4486         (dfs_set_offset_for_unshared_vbases): Delete.
4487         (layout_virtual_bases): Adjust.
4488         (finish_struct_1): Adjust.
4489         (init_class_processing): Don't init access nodes.
4490         (dfs_get_primary_binfo): Delete.
4491         (get_primary_binfo): Adjust.
4492         (dump_class_hierarchy_r): Remove most derived arg, add IGO
4493         parameter. Adjust.
4494         (dump_class_hierarchy): Adjust.
4495         (finish_vtbls): Adjust.
4496         (get_original_base): Delete.
4497         (build_vtt_inits): Adjust.
4498         (dfs_build_secondary_vptr_vtt_inits): Adjust.
4499         (dfs_ctor_vtable_bases_queue_p): Adjust.
4500         (build_ctor_vtbl_group): Adjust.
4501         (dfs_accumulate_vtbl_inits): Adjust.
4502         (build_vtbl_initializer): Adjust.
4503         (build_vbase_offset_vtbl_entries): Adjust.
4504         (add_vcall_offset_vtbl_entries_1): Adjust.
4505         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
4506         (access_*_node): Remove.
4507         (CANONICAL_BINFO): Delete.
4508         (BINFO_UNSHARED_MARKED): Remove.
4509         (BINFO_MARKED): Set LANG_FLAG_0 directly.
4510         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
4511         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
4512         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
4513         Delete.
4514         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
4515         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4516         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
4517         Delete.
4518         (BINFO_DEPENDENT_BASE_P): New.
4519         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
4520         index.
4521         (markedp, unmarkedp): Adjust.
4522         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
4523         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
4524         find_vbase_instance, binfo_for_vbase): Delete.
4525         (copied_binfo, original_binfo): Declare.
4526         (finish_base_specifier): Add virtual_p arg.
4527         (unshare_base_binfos): Delete.
4528         (copy_base_binfos): Declare.
4529         (reverse_path): Delete.
4530         * cp/decl.c (xref_basetypes): Access and virtuality passed
4531         differently. Don't copy direct base binfos here. Call
4532         copy_base_binfos.
4533         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
4534         (initialize_vtbl_ptrs): Adjust.
4535         (expand_member_init): Adjust.
4536         * cp/parser.c (cp_parser_base_specifier): Adjust.
4537         * cp/pt.c (instantiate_class_template): Adjust.
4538         (get_template_base_recursive): Adjust.
4539         * cp/rtti.c (get_pseudo_ti_init): Adjust.
4540         (get_pseudo_ti_desc): Adjust.
4541         * cp/tree.c (unshare_base_binfos): Rename to ...
4542         (copy_base_binfos): ... here, reimplement.
4543         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
4544         (reverse_path): Remove.
4545         * cp/typeck.c (get_delta_difference): Adjust error messages.
4546         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
4547         * cp/search.c (lookup_base_r): Adjust.
4548         (dynamic_cast_base_recurse): Adjust.
4549         (canonical_binfo): Remove.
4550         (dfs_canonical_queue): Remove.
4551         (dfs_assert_unmarked_p): Remove.
4552         (assert_canonical_unmarked): Remove.
4553         (shared_marked_p, shared_unmarked_p): Remove.
4554         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
4555         (dfs_access_in_type): Adjust.
4556         (access_in_type): Adjust.
4557         (dfs_accessible_queue_p): Adjust.
4558         (dfs_accessible_p): Adjust.
4559         (is_subobject_of_p_1, is_subobject_of_p): Remove.
4560         (struct lookup_field_info): Remove from_dep_base_p field.
4561         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
4562         (lookup_field_r): Remove dependent base code.
4563         (lookup_member): Likewise.
4564         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
4565         (dfs_unmarked_real_bases_queue_p): Remove.
4566         (dfs_marked_real_bases_queue_p): Remove.
4567         (dfs_skip_vbases): Remove.
4568         (dfs_get_pure_virtuals): Adjust.
4569         (markedp, unmarkedp): Adjust.
4570         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
4571         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
4572         (dfs_unmark): Adjust.
4573         (dfs_get_vbase_types):Remove.
4574         (dfs_build_inheritance_graph_order): Remove.
4575         (get_vbase_types): Remove
4576         (dfs_find_vbase_instance): Remove.
4577         (find_vbase_instance): Remove.
4578         (dfs_debug_unmarkedp): Adjust.
4579         (dependent_base_p): Remove.
4580         (dfs_push_type_decls): Adjust.
4581         (dfs_push_decls): Adjust.
4582         (dfs_no_overlap_yet): Adjust.
4583         (copied_binfo): New function.
4584         (original_binfo): New function.
4585         (binfo_for_vbase): Remove.
4587 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
4589         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
4590         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
4591         vectors, for speed.
4593 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
4595         PR c++/9704
4596         * class.c (layout_class_type): In the 3.2 ABI, take into account
4597         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
4599 2003-02-18  Matt Austern <austern@apple.com>
4601         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
4602         nothing for C++.
4603         * cp/decl.c (wrapup_globals_for_namespace): Remove special
4604         handling of global namespace.
4606 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
4608         * cp-tree.h (rid_to_yy): Delete.
4609         (C_RID_YYCODE): Delete.
4610         (finish_file): Delete redundant declaration.
4612 2003-02-18  Jason Merrill  <jason@redhat.com>
4614         PR c++/9623
4615         * decl.c (reshape_init): Don't mess with initializer labels.
4617         PR c++/9485
4618         * parser.c (cp_parser_postfix_expression): Set idk properly for
4619         object->scope::member.
4621 2003-02-18  Ben Elliston  <bje@redhat.com>
4623         PR other/7350
4624         * decl.c (duplicate_decls): Fix typo in comment.
4626 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
4628         PR debug/9717
4629         * class.c (build_base_field): Mark fields for base classes with
4630         DECL_IGNORED_P.
4632 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4634         PR c++/9457
4635         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
4636         CONSTRUCTOR_ELTS only once.
4638 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4640         PR c++/9459
4641         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
4642         (dump_type_suffix): Likewise.
4644 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4646         * search.c: ANSIfy function declarations and definitions.
4647         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
4648         * call.c (build_method_call, resolve_scoped_fn_name,
4649         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
4650         calls.
4651         * class.c (handle_using_decl): Likewise.
4652         * decl.c (make_typename_type, make_unmound_class_template,
4653         start_decl, compute_array_index_type): Likewise.
4654         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
4655         * init.c (expand_member_init, build_member_call): Likewise.
4656         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
4657         resolve_typename_type): Likewise.
4658         * typeck.c (lookup_destructor, finish_class_member_access_exprm
4659         build_prememfunc_access_expr): Likewise.
4661 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
4663         * decl2.c: Include "timevar.h".
4664         (namespace_ancestor): Time name lookup.
4665         (add_using_namespace): Likewise.
4666         (lookup_using_namespace): Likewise.
4667         (qualified_lookup_using_namespace): Likewise.
4668         (decl_namespace): Likewise.
4669         (lookup_arg_dependent): Likewise.
4670         * lex.c (do_identifier): Likewise.
4671         (do_scoped_id): Likewise.
4672         * pt.c (lookup_template_class): Likewise.
4674 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
4676         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
4678 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4680         * decl.c: Include "timevar.h".
4681         (poplevel): Time name lookup.
4682         (find_binding): Likewise.
4683         (push_namespace): Likewise.
4684         (pop_nested_namespace): Likewise.
4685         (store_bindings): Likewise.
4686         (maybe_push_to_top_level): Likewise.
4687         (pop_from_top_level): Likewise.
4688         (push_local_name): Likewise.
4689         (pushtag): Likewise.
4690         (pushdecl): Likewise.
4691         (pushdecl_with_scope): Likewise.
4692         (pushdecl_namespace_level): Likewise.
4693         (pushdecl_top_level): Likewise.
4694         (pushdecl_class_level): Likewise.
4695         (push_class_level_binding): Likewise.
4696         (push_using_decl): Likewise.
4697         (push_using_directive): Likewise.
4698         (push_overloaded_decl): Likewise.
4699         (lookup_label): Likewise.
4700         (define_label): Likewise.
4701         (lookup_tag): Likewise.
4702         (lookup_tag_reverse): Likewise.
4703         (lookup_namespace_name): Likewise.
4704         (select_decl): Likewise.
4705         (unqualified_namespace_lookup): Likewise.
4706         (lookup_name_real): Likewise.
4707         (lookup_name_current_level): Likewise.
4708         (lookup_type_current_level): Likewise.
4709         (maybe_inject_for_scope_var): Likewise.
4710         (xref_tag): Likewise.
4712         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
4714 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
4716         * decl.c (build_enumerator):  Remove unneeded test.
4718 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
4720         * cp-tree.h (struct lang_type_header): Make all fields unsigned
4721         char.
4723 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
4725         PR c++/7129
4726         * call.c (z_candidate): Add args.
4727         (convert_class_to_reference): Set it.
4728         (implicit_conversion): Tidy.
4729         (add_candidate): Add args parameter.
4730         (add_function_candidate): Adjust call to add_candidate.
4731         (add_conv_candidate): Likewise.
4732         (build_builtin_candidate): Likewise.
4733         (build_user_type_conversion_1): Eliminate wasteful tree_cons
4734         usage.
4735         (build_new_function_call): Likewise.
4736         (build_object_call): Likewise.
4737         (add_candidates): New function.
4738         (build_new_op): Use it.
4739         (covert_like_real): Adjust call to build_over_call.
4740         (build_over_call): Remove args parameter.
4741         * operators.def: Add <?= and >?=.
4743 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
4745         * typeck.c (build_indirect_ref): Don't check flag_volatile.
4747 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4749         PR c++/8849
4750         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
4752 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
4754         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
4755         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
4756         (BINFO_LANG_ELTS): New #define.
4757         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
4759 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
4761         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
4763 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
4765         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
4766         for class types.
4767         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
4768         rather than TYPE_LANG_FLAG_0.
4769         (TYPE_BUILT_IN): Remove.
4770         (TYPE_DEPENDENT_P): New macro.
4771         (TYPE_DEPENDENT_P_VALID): Likewise.
4772         (lang_type_class): Add fields_readonly.
4773         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
4774         * pt.c (dependent_type_p_r): New function, split out from ...
4775         (dependent_type_p): ... here.  Memoize results.
4776         * search.c (dependent_base_p): Use dependent_type_p, not
4777         uses_template_parms.
4778         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
4779         for class types.
4781 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
4783         * call.c (build_field_call): Use build_new_op, not build_opfncall.
4784         (prep_operand): New function.
4785         (build_new_op): Use it.  Remove dead code.
4786         * class.c (pushclass): Change "modify" parameter type from int to
4787         bool.
4788         (currently_open_class): Use same_type_p, not pointer equality.
4789         (push_nested_class): Adjust calls to pushclass, remove modify
4790         parameter.
4791         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
4792         (pushclass): Change prototype.
4793         (push_nested_class): Likewise.
4794         (grokoptypename): Remove.
4795         (build_opfncall): Remove.
4796         (value_dependent_expression_p): Declare.
4797         (resolve_typename_type): Likewise.
4798         (resolve_typename_type_in_current_instantiation): Likewise.
4799         (enter_scope_of): Remove.
4800         (tsubst): Remove.
4801         (tsubst_expr): Likewise.
4802         (tsubst_copy): Likewise.
4803         (tsubst_copy_and_build): Likewise.
4804         * decl.c (warn_about_implicit_typename_lookup): Remove.
4805         (finish_case_label): Return error_mark_node for erroneous labels.
4806         (start_decl): Adjust calls to push_nested_class.
4807         (grokfndecl): Call push_scope/pop_scope around call to
4808         duplicate_decls.
4809         (grokdeclarator): Do not call tsubst.
4810         (start_function): Adjust calls to push_nested_class.
4811         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
4812         (check_classfn): Use push_scope/pop_scope around type comparisions.
4813         (grokoptypename): Remove.
4814         (push_sscope): Adjust call to push_nested_class.
4815         * error.c (dump_type): Show cv-qualification of typename types.
4816         * init.c (build_member_call): Use build_new_op, not
4817         build_opfncall.
4818         * method.c (build_opfncall): Remove.
4819         * parser.c (cp_parser): Add allow_non_constant_expression_p and
4820         non_constant_expression_p.
4821         (cp_parser_constant_expression): Adjust prototype.
4822         (cp_parser_resolve_typename_type): Remove.
4823         (cp_parser_non_constant_expression): New function.
4824         (cp_parser_non_constant_id_expression): Likewise.
4825         (cp_parser_new): Set allow_non_constant_expression_p and
4826         non_constant_expression_p.
4827         (cp_parser_primary_expression): Reject `this' and `va_arg' in
4828         constant-expressions.  Note that dependent names aren't really
4829         constant.
4830         (cp_parser_postfix_expression): Reject conversions to non-integral
4831         types in constant-expressions.  Neither are increments or
4832         decrements.
4833         (cp_parser_unary_expression): Reject increments and decrements in
4834         constant-expressions.
4835         (cp_parser_direct_new_declarator): Adjust call to
4836         cp_parser_constant_expression.
4837         (cp_parser_cast_expression): Reject conversions to non-integral
4838         types in constant-expressions.
4839         (cp_parser_assignment_expression): Rejects assignments in
4840         constant-expressions.
4841         (cp_parser_expression): Reject commas in constant-expressions.
4842         (cp_parser_labeled_statement): Adjust call to
4843         cp_parser_constant_expression.
4844         (cp_parser_direct_declarator): Simplify array bounds, even in
4845         templates, when they are non-dependent.  Use
4846         resolve_typename_type, not cp_parser_resolve_typename_type.
4847         (cp_parser_class_head): Use resolve_typename_type, not
4848         cp_parser_resolve_typename_type.
4849         (cp_parser_member_declaration): Adjust call to
4850         cp_parser_constant_expression.
4851         (cp_parser_constant_initializer): Likewise.
4852         (cp_parser_constructor_declarator): Use resolve_typename_type, not
4853         cp_parser_resolve_typename_type.
4854         (cp_parser_late_parsing_default_args): Adjust call to
4855         push_nested_class.
4856         * pt.c (tsubst): Give it internal linkage.
4857         (tsubst_expr): Likewise.
4858         (tsubst_copy): Likewise.
4859         (tsubst_copy_and_build): Likewise.
4860         (push_access_scope_real): Likewise.
4861         (tsubst_friend_class): Likewise.
4862         (instantiate_class_template): Adjust call to pushclass.
4863         (value_dependent_expression_p): Give it external linkage.
4864         Robustify.
4865         (resolve_typename_type): New function.
4866         * semantics.c (finish_call_expr): Use build_new_op, not
4867         build_opfncall.
4868         (begin_constructor_declarator): Remove.
4869         (begin_class_definition): Adjust call to pushclass.
4870         (enter_scope_of): Remove.
4871         * typeck.c (comptypes): Resolve typename types as appropriate.
4872         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
4873         (build_x_compound_expr): Likewise.
4874         (build_modify_expr): Likewise.
4875         (build_x_modify_expr): Likewise.
4876         * typeck2.c (build_x_arrow): Likewise.
4878 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
4880         * pt.c (last_pending_template) Declare GTY().
4882 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4884         PR c++/8591
4885         * parser.c (cp_parser_elaborated_type_specifier): Convert
4886         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
4887         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
4889 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
4891         PR c++/9437
4892         * pt.c (unify): Don't unify '*T' with 'U C::*'.
4894         PR c++/3902
4895         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
4896         inside a declarator.
4898 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
4900         * class.c (update_vtable_entry_for_fn): Add index parameter.
4901         Generate vcall thunk for covariant overriding from a virtual
4902         primary base.
4903         (dfs_modify_vtables): Adjust.
4905 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
4907         PR c++/9403
4908         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
4909         template keyword.
4910         (cp_parser_base_specifier): Look for and consume a
4911         TEMPLATE keyword. Replace switch with array index.
4913         PR c++/795
4914         * semantics.c (finish_non_static_data_member): Remember the
4915         field's type even in a template.
4917         PR c++/9415
4918         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
4919         already scoped.
4921         PR c++/8545
4922         * parser.c (cp_parser_cast_expression): Be more tentative.
4924 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4926         * cp-tree.h (flagged_type_tree_s): Remove.
4927         (check_for_new_type): Likewise.
4928         * typeck2.c (check_for_new_type): Likewise.
4930 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
4932         * dump.c: ANSIfy function declarations and definitions.
4934         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
4936 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
4938         PR c++/9354
4939         * init.c (build_new): Set the type of the new-expression, even
4940         when processing_templte_decl.
4942         PR c++/9216
4943         * parser.c (cp_parser_primary_expression): Improve error message
4944         for templates used in an expression context.
4946         PR c++/8696
4947         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
4948         parse when encountering "typedef".
4950 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
4952         * class.c, parser.c: ANSIfy function definitions and declarations.
4954 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
4956         PR c++/9328
4957         * error.c (dump_decl): For an OVERLOAD, just print the name of the
4958         function; it doesn't make sense to try to print its type.
4959         * semantics.c (finish_typeof): Issue errors about invalid uses.
4961         PR c++/9298
4962         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
4963         function.
4964         (cp_parser_expression_statement): Use it.
4965         (cp_parser_explicit_instantiation): Likewise.
4966         * pt.c (do_decl_instantiation): Improve error handling logic.
4968 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
4970         PR c++/9384
4971         * parser.c (cp_parser_using_declaration): Issue error messages
4972         about name resolution failures here.
4974         PR c++/9388
4975         * class.c (currently_open_derived_class): Use dependent_type_p.
4976         * cp-tree.h (dependent_type_p): New function.
4977         (dependent_template_arg_p): Likewise.
4978         (dependent_template_p): Likewise.
4979         (type_dependent_expression_p): Likewise.
4980         * parser.c (cp_parser_dependent_type_p): Remove.
4981         (cp_parser_value_dependent_type_p): Likewise.
4982         (cp_parser_type_dependent_expression_p): Likewise.
4983         (cp_parser_dependent_template_arg_p): Likewise.
4984         (cp_parser_dependent_template_id_p): Likewise.
4985         (cp_parser_dependent_template_p): Likewise.
4986         (cp_parser_diagnose_invalid_type_name): Replace
4987         cp_parser_dependent_type_p with dependent_type_p, etc.
4988         (cp_parser_primary_expresion): Likewise.
4989         (cp_parser_nested_name_specifier_opt): Likewise.
4990         (cp_parser_postfix_expression): Likewise.
4991         (cp_parser_unary_expression): Likewise.
4992         (cp_parser_template_name): Likewise.
4993         (cp_parser_class_name): Likewise.
4994         (cp_parser_lookup_name): Likewise.
4995         * pt.c (dependent_type_p): New function.
4996         (value_dependent_expression_p): Likewise.
4997         (type_dependent_expression_p): Likewise.
4998         (dependent_template_arg_p): Likewise.
4999         (dependent_template_id_p): Likewise.
5000         (dependent_template_p): Likewise.
5002         PR c++/9285
5003         PR c++/9294
5004         * parser.c (cp_parser_simple_declaration): Return quickly when
5005         encountering errors.
5007 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5009         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5011 2003-01-17  Jason Merrill  <jason@redhat.com>
5013         PR c++/9167, c++/9358
5014         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5016 2003-01-17  Jason Merrill  <jason@redhat.com>
5018         PR c++/9342
5019         * call.c (build_conditional_expr): Always do lvalue-rvalue
5020         conversion.
5022 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
5024         PR c++/9294
5025         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5026         * cp-tree.h (BASELINK_BINFO): Adjust.
5027         (BASELINK_FUNCTIONS): Likewise.
5028         (BASELINK_ACCESS_BINFO): Likewise.
5029         (tree_baselink): New structure.
5030         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5031         (lang_tree_node): Add baselink.
5032         * decl.c (cp_tree_node_structure): Add BASELINK case.
5033         * search.c (build_baselink): Adjust.
5034         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
5035         test from TREE_LIST case.
5037         PR c++/9272
5038         * parser.c (cp_parser_constructor_declarator_p): Do not assume
5039         that a constructor cannot be declared outside of its own class.
5041         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5042         be resolved, neither can the qualified name.
5044         * rtti.c (get_pseudo_ti_desc): Fix thinko.
5046 2003-01-16  Jason Merrill  <jason@redhat.com>
5048         PR c++/8564
5049         * init.c (build_vec_init): Re-add maxindex parm.
5050         (perform_member_init, build_aggr_init): Pass it.
5051         (build_new_1): Pass it. Use an incomplete array type for full_type.
5052         * typeck.c (build_modify_expr): Pass it.
5053         * cp-tree.h: Adjust.
5055 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
5057         * cp-tree.h (tsubst_copy_and_build): New declaration.
5058         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5059         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
5060         (tsubst_copy_and_build): New function.
5062 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
5064         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5065         (PARTIAL_INSTANTIATION_P): Remove.
5066         (IMPLICIT_TYPENAME_P): Likewise.
5067         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5068         (build_typename_type): Remove declaration.
5069         (parmlist_is_exprlist): Likewise.
5070         * decl.c (build_typename_type): Make it static, remove third
5071         parameter.
5072         (push_class_binding): Don't do implicit typename stuff.
5073         (make_typename_type): Likewise.
5074         (lookup_name_real): Likewise.
5075         (grokdeclarator): Don't try to convert declarations into
5076         initializations.  Don't do implicit typename stuff.
5077         (parmlist_is_exprlist): Remove.
5078         (xref_basetypes): Simplify.
5079         * decl2.c (grokfield): Don't try to convert declarations into
5080         initializations.
5081         (build_anon_union_vars): Do this while processing templates, too.
5082         (finish_anon_union): Likewise.
5083         * error.c (dump_type): Remove implicit typename handling.
5084         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
5085         (cp_parser_primary_expression): Correct handling of names not
5086         found by unqualified name lookup in templates.
5087         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
5088         of types when possible.
5089         (cp_parser_simple_declaration): Complain intelligently about some
5090         invalid declarations.
5091         (cp_parser_member_declaration): Likewise.
5092         (cp_parser_constructor_declarator_p): Don't check when we're in a
5093         function scope.
5094         * pt.c (instantiate_class_template): Remove
5095         PARTIAL_INSTANTIATION_P gunk.
5096         * search.c (lookup_field_r): Don't build implicit typenames.
5097         (marked_pushdecls_p): Don't enter dependent base types.
5098         (unmarked_pushdecls_p): Likewise.
5099         * semantics.c (begin_class_definition): Remove implicit typename
5100         stuff.
5102 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
5104         PR c++/9212
5105         * parser.c (cp_parser_direct_declarator): If accepting either
5106         abstract or named, the name must be an unqualified-id.
5108 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5110         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
5112 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5114         * decl2.c (check_classfn): Fix uninitialized warning.
5115         (build_anon_union_vars): Likewise.
5116         * pt.c (tsubst_copy): Likewise.
5118 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
5120         Further conform g++'s __vmi_class_type_info to the C++ ABI
5121         specification.
5122         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
5123         the specification.
5124         (class_hint_flags): Likewise.
5126 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5128         * config-lang.in: Add semantics.c to gtfiles.
5129         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
5130         (saved_scope): Likewise.
5131         (type_lookups): Remove.
5132         (deferred_access): New structure.
5133         (type_access_control): Remove.
5134         (save_type_access_control): Likewise.
5135         (reset_type_access_control): Likewise.
5136         (decl_type_access_control): Likewise.
5137         (push_deferring_access_checks): Declare.
5138         (resume_deferring_access_checks): Likewise.
5139         (stop_deferring_access_checks): Likewise.
5140         (pop_deferring_access_checks): Likewise.
5141         (get_deferred_access_checks): Likewise.
5142         (pop_to_parent_deferring_access_checks): Likewise.
5143         (perform_deferred_access_checks): Likewise.
5144         (perform_or_defer_access_check): Likewise.
5145         * decl.c (make_typename_type): Use perform_or_defer_access_check.
5146         (make_unbound_class_template): Likewise.
5147         (grokdeclarator): Don't call decl_type_access_control.
5148         * parser.c (cp_parser_context): Remove deferred_access_checks
5149         and deferring_access_checks_p fields.
5150         (cp_parser_context_new): Adjust.
5151         (cp_parser): Remove access_checks_lists.
5152         (cp_parser_defer_access_check): Remove.
5153         (cp_parser_start_deferring_access_checks): Remove.
5154         (cp_parser_stop_deferring_access_checks): Remove.
5155         (cp_parser_perform_deferred_access_checks): Remove.
5156         (cp_parser_nested_name_specifier_opt): Use new deferred access
5157         functions.
5158         (cp_parser_simple_declaration): Likewise.
5159         (cp_parser_template_id): Likewise.
5160         (cp_parser_function_definition): Likewise.
5161         (cp_parser_class_specifier): Likewise.
5162         (cp_parser_lookup_name): Likewise.
5163         (cp_parser_single_declaration): Likewise.
5164         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
5165         (cp_parser_parse_tentatively): Likewise.
5166         (cp_parser_parse_definitely): Likewise.
5167         (yyparse): Likewise.
5168         (cp_parser_init_declarator): Remove access_checks parameter.
5169         Use new deferred access functions.
5170         (cp_parser_function_definition_from_specifiers_and_declarator):
5171         Likewise.
5172         (cp_parser_class_head): Remove deferring_access_checks_p and
5173         saved_access_checks parameters.  Use new deferred access functions.
5174         (cp_parser_member_specification_opt): Don't call
5175         reset_type_access_control.
5176         * search.c (type_access_control): Remove.
5177         * semantics.c: Include "gt-cp-semantics.h".
5178         (deferred_type_access_control): Remove.
5179         (deferred_access_stack): New variable.
5180         (deferred_access_free_list): Likewise.
5181         (push_deferring_access_checks): New function.
5182         (resume_deferring_access_checks): Likewise.
5183         (stop_deferring_access_checks): Likewise.
5184         (pop_deferring_access_checks): Likewise.
5185         (get_deferred_access_checks): Likewise.
5186         (pop_to_parent_deferring_access_checks): Likewise.
5187         (perform_deferred_access_checks): New function, adapted from
5188         cp_parser_perform_deferred_access_checks.
5189         (perform_or_defer_access_check): New function, adapted from
5190         cp_parser_defer_access_check.
5191         (current_type_lookups): Remove.
5192         (deferred_type_access_control): Likewise.
5193         (decl_type_access_control): Likewise.
5194         (save_type_access_control): Likewise.
5195         (reset_type_access_control): Likewise.
5196         (begin_function_definition): Adjust.
5197         (begin_class_definiton): Likewise.
5199 2003-01-13  Jason Merrill  <jason@redhat.com>
5201         PR c++/8748
5202         * class.c (build_base_path): Take the address before calling save_expr.
5204         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
5205         all the ambiguous conversions are bad.
5207         * class.c (maybe_warn_about_overly_private_class): Don't stop
5208         searching when we find a nonprivate method.
5210         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
5212 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
5214         * cp-tree.h (get_arglist_len_in_bytes): Remove.
5216         PR c++/9264
5217         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
5218         typeame types more robustly.
5220 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
5222         * parser.c:  Fix comment typos.
5224 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
5226         PR c++/9099
5227         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
5228         an object_type which is not a class type.
5230 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
5232         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
5233         (cp_parser_late_parsing_default_args): Likewise.
5235 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
5237         * cfns.gperf: ANSIfy function declarations.
5238         * cfns.h: Regenerate.
5239         * cp-tree.h: ANSIfy function declarations.
5241 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
5243         * cp-tree.h (reparse_absdcl_as_expr): Remove.
5244         (reparse_absdcl_as_casts): Likewise.
5245         (reparse_decl_as_expr): Likewise.
5246         (finish_decl_parsing): Likewise.
5247         * decl2.c (reparse_absdcl_as_expr): Remove.
5248         (reparse_absdcl_as_casts): Likewise.
5249         (repase_decl_as_expr): Likewise.
5250         (finish_decl_parsing): Likewise.
5252         PR c++/9128
5253         PR c++/9153
5254         PR c++/9171
5255         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
5256         function.
5257         (cp_parser_nested_name_specifier_opt): Correct the
5258         check_dependency_p false.
5259         (cp_parser_postfix_expression): Fix formatting.
5260         (cp_parser_decl_specifier_seq): Avoid looking for constructor
5261         declarators when possible.
5262         (cp_parser_template_id): Avoid performing name-lookup when
5263         possible.
5264         (cp_parser_class_head): Do not count specializations when counting
5265         levels of templates.
5266         (cp_parser_constructor_declarator_p): Return immediately if
5267         there's no chance that the tokens form a constructor declarator.
5268         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
5269         expression with reference type.
5270         (get_tinfo_decl_dynamic): Do not return an expression with
5271         reference type.
5272         (build_typeid): Add comment.  Do not return an expression with
5273         reference type.
5274         * typeck.c (build_class_member_access_expr): Improve handling of
5275         conditionals and comma-expressions as objects.
5277 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
5279         * cfns.gperf: ANSIfy function declarations.
5280         * cfns.h: Regenerate.
5281         * cp-tree.h: ANSIfy function declarations.
5282         * parser.c: ANSIfy function declarations & definitions.
5284         * decl.c (bad_specifiers): Fix parameter order error I introduced.
5286 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
5288         Merge from pch-branch:
5290         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
5292         Merge to tag pch-merge-20030102:
5294         * semantics.c (finish_translation_unit): Don't call finish_file.
5295         * parser.c: Don't include ggc.h.
5296         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
5297         read first token here.  Don't allow PCH files after the first
5298         token is read.
5299         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
5300         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
5301         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
5302         (cp_parser_late_parsing_for_member): Don't duplicate call to
5303         cp_lexer_set_source_position_from_token.
5304         (cp_parser_late_parsing_default_args): Likewise.
5305         (yyparse): Call finish_file after clearing the_parser.
5307         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
5309         * Make-lang.in: Remove $(GGC_H) from all dependencies.
5310         (CXX_TREE_H): Add $(GGC_H).
5311         * class.c: Don't include ggc.h.
5312         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
5313         (method_name_cmp): Likewise.
5314         (resort_data): New variable.
5315         (resort_field_decl_cmp): New.
5316         (resort_method_name_cmp): New.
5317         (resort_sorted_fields): New.
5318         (resort_type_method_vec): New.
5319         (finish_struct_methods): Delete cast.
5320         (finish_struct_1): Delete cast.
5321         * cp-tree.h: Include ggc.h.
5322         (struct lang_type_class): Add reorder attribute to field `methods'.
5323         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
5324         (resort_sorted_fields): New prototype.
5325         (resort_type_method_vec): New prototype.
5326         * call.c: Don't include ggc.h.
5327         * decl.c: Likewise.
5328         * decl2.c: Likewise.
5329         * init.c: Likewise.
5330         * lex.c: Likewise.
5331         * method.c: Likewise.
5332         * optimize.c: Likewise.
5333         * parse.y: Likewise.
5334         * pt.c: Likewise.
5335         * repo.c: Likewise.
5336         * search.c: Likewise.
5337         * semantics.c: Likewise.
5338         * spew.c: Likewise.
5339         * tree.c: Likewise.
5341         * lang-specs.h: Remove comment.
5343         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
5345         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
5346         (operator_name_info): Mark to be saved for PCH, specify size.
5347         (assignment_operator_name_info): Likewise.
5349         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
5351         * decl.c (anon_cnt): Mark to be saved for PCH.
5353         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
5355         * lex.c  (init_reswords): Delete now-untrue comment.
5356         Allocate ridpointers using GGC.
5358         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
5360         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
5362         * g++spec.c (lang_specific_driver): Don't include standard
5363         libraries in `added'.
5365         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
5367         * decl2.c (finish_file): Call c_common_write_pch.
5368         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
5370         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
5372         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
5373         files when using g++.
5374         * lang-specs.h: Handle compiling C++ header files.
5376 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
5378         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
5380 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5382         * pt.c (push_access_scope_real): Call push_to_top_level for
5383         function in namespace scope.
5384         (pop_access_scope): Call pop_from_top_level for function in
5385         namespace scope.
5387 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
5389         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
5391 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
5393         * Make-lang.in (c++.install-common, c++.install-man,
5394         c++.uninstall): Prepend $(DESTDIR) to destination paths in
5395         all (un)installation commands.
5396         (c++.install-common): Rewrite $(LN) commands to support
5397         DESTDIR with "ln" as well as with "ln -s".
5399 2003-01-08  Jason Merrill  <jason@redhat.com>
5401         * parser.c (cp_parser_primary_expression): See through explicitly
5402         scoped ALIAS_DECLs, too.
5404 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
5406         * decl.c: Remove some #if 0 code.
5408         * decl.c: ANSIfy function declarations.
5410 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
5412         * parser.c (cp_parser_asm_definition): Correct handling of omitted
5413         operands.
5415 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5417         PR c++/9030
5418         * decl.c (make_typename_type): Check access only when tf_error.
5419         (make_unbound_class_template): Likewise.
5420         * pt.c (saved_access_scope): New variable.
5421         (push_access_scope_real): New function.
5422         (push_access_scope): Likewise.
5423         (pop_access_scope): Likewise.
5424         (tsubst_default_argument): Use them.
5425         (instantiate_template): Likewise.
5426         (regenerate_decl_from_template): Likewise.
5427         (instantiate_decl): Likewise.
5428         (get_mostly_instantiated_function_type): Likewise.
5430 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
5432         * tree.c: Delete bogus #if 0 code.
5434 2003-01-07  Andreas Schwab  <schwab@suse.de>
5436         * class.c (layout_class_type): Don't use
5437         PCC_BITFIELD_TYPE_MATTERS if not defined.
5439 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
5441         PR c++/9165
5442         * decl2.c (build_cleanup): Mark the object as used.
5444         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
5445         (hash_local_specialization): New function.
5446         (register_local_specialization): Revert 2003-01-05 change.
5447         (instantiate_decl): Use hash_local_specialization when creating
5448         the local_specializations table.
5450         * decl2.c (mark_used): Do not synthesize thunks.
5452         * class.c (layout_class_type): Correct handling of unnamed
5453         bitfields wider than their types.
5455         PR c++/9189
5456         * parser.c (cp_parser): Remove default_arg_types.  Update
5457         documentation for unparsed_functions_queues.
5458         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
5459         parameter.
5460         (cp_parser_new): Don't set parser->default_arg_types.
5461         (cp_parser_function_definition): Adjust usage of
5462         unparsed_funtions_queues.
5463         (cp_parser_class_specifier): Don't mess with
5464         parser->default_arg_types.  Handle default argument processing in
5465         a separate phase from function body processing.
5466         (cp_parser_template_declaration_after_export): Adjust usage of
5467         unparsed_functions_queues.
5468         (cp_parser_late_parsing_for_member): Do not handle default
5469         arguments.
5471 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
5473         PR c++/9109
5474         * parser.c (cp_parser_declarator_kind): New enum.
5475         (cp_parser_declarator): Adjust.
5476         (cp_parser_direct_declarator): Adjust. Allow for either named or
5477         abstract declarator. Prefer abstract, if possible. Allow
5478         parenthesized function name.
5479         (cp_parser_condition): Adjust cp_parser_declarator call.
5480         (cp_parser_explicit_instantiation): Likewise.
5481         (cp_parser_init_declarator): Likewise.
5482         (cp_parser_type_id): Likewise.
5483         (cp_parser_function_definition): Likewise.
5484         (cp_parser_member_declaration): Likewise.
5485         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
5486         the tentative parsing.
5487         (cp_parser_exception_declaration): Likewise.
5489 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
5491         * parser.c (cp_parser_template_parameter): Adjust call to
5492         cp_parser_parameter_declaration.
5493         (cp_parser_parameter_declaration_list): Likewise.
5494         (cp_parser_parameter_declaration): Replace
5495         greater_than_is_operator_p with template_parm_p parameter.  Do not
5496         cache tokens for template default arguments.
5498         * pt.c (retrieve_local_specialization): Use htab_find, not
5499         htab_find_with_hash.
5500         (register_local_specialization): Use htab_find_slot, not
5501         htab_find_slot_with_hash.
5502         (instantiate_decl): Pass a hash function to htab_create.
5504 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5506         * parser.c (cp_parser_binary_expression,
5507         cp_parser_multiplicative_expression,
5508         cp_parser_additive_expression, cp_parser_shift_expression,
5509         cp_parser_relational_expression, cp_parser_equality_expression,
5510         cp_parser_and_expression, cp_parser_exclusive_or_expression,
5511         cp_parser_inclusive_or_expression,
5512         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
5513         cp_parser_binary_expression): Const-ify.
5515 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
5517         * method.c (use_thunk): Disable access control while building the
5518         body of the thunk.
5520 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
5522         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
5523         front end.
5525 2003-01-03  Matt Austern  <austern@apple.com>
5527         * cp-tree.h (struct lang_type_class): add field for key method
5528         (cp_global_trees): rename dynamic_classes to keyed_classes
5529         (key_method): add definition
5530         * class.c (finish_struct_1): compute class's key method, and add
5531         the class to keyed_classes list if there is no key method.
5532         * decl.c (finish_function): add class to keyed_classes list if we
5533         see a definition of the class's key method.
5534         * pt.c (instantiate_class_template): add template specialization
5535         of a dynamic class to keyed_classes list.
5536         * decl2.c (key_method): remove
5537         (finish_file): iterate only through keyed_classes list when
5538         deciding whether to emit vtables, remove class from its list after
5539         we do the emission.
5541 2003-01-02  Jason Merrill  <jason@redhat.com>
5543         * call.c (build_conditional_expr): Stabilize lvalues properly.
5544         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
5545         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
5546         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
5548         * call.c (convert_like_real): Call decl_constant_value for an
5549         IDENTITY_CONV even if there are no more conversions.
5551         * cvt.c (build_up_reference): Don't push unnamed temps.
5553         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
5555         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
5556         for a backend struct.
5558         * except.c (wrap_cleanups_r, build_throw): Make
5559         MUST_NOT_THROW_EXPRs void.
5560         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
5562         * init.c (build_vec_delete_1): Pre-evaluate the base address.
5564         * init.c (get_temp_regvar): Simplify logic.
5566         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
5567         our replacement is a decl.
5569         * decl.c (cp_make_fname_decl): Push the decls inside the
5570         outermost scope.
5572 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
5574         PR c++/45, c++/3784
5575         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
5576         the same too.
5578 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
5580         * parser.c (struct cp_parser): Add access_checks_lists field
5581         (cp_parser_simple_declaration): Use.
5582         (cp_parser_init_declarator): Likewise.
5584 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
5586         * parser.c (cp_parser_declaration): Accept the __extension__
5587         keyword before the declaration.
5589         PR c++/2843
5590         * parser.c (cp_parser_parameter_declaration): Allow attributes to
5591         appear after the declarator.
5593         * call.c (build_new_method_call): Fix typo in message format
5594         string.
5596 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
5598         * parser.c (cp_lexer_next_token_is): Declare it inline.
5599         (cp_lexer_set_source_position_from_token): Likewise.
5600         (cp_lexer_debugging_p): Likewise.
5601         (cp_parser_parsing_tentatively): Likewise.
5602         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
5603         to the cp_lexer_peek_token.
5605         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
5606         expression.
5608 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
5610         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
5611         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
5612         cp/repo.c: Fix copyright years.
5614 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
5616         * lex.c: Remove superfluous include of cpplib.h.
5617         (CONSTRAINT): Define without conditions.
5618         (init_cp_pragma): Use c_register_pragma.
5620 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
5622         * .cvsignore: Remove.
5624 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5626         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
5627           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
5628           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
5629           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
5630           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
5631           copyright header.
5632         * lex.h: parse.y is dead, so don't mention it.  Also replace the
5633           copyright header with the default GNU copyright header.
5635 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
5637         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
5638         (lookup_name_namespace_only): Likewise.
5639         (begin_only_namespace_names): Likewise.
5640         (end_only_namespace_names): Likewise.
5641         * decl.c (only_namespace_names): Remove.
5642         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
5643         (lookup_name_real): Do not check only_namespace_names.
5644         (lookup_name_namespace_only): Remove.
5645         (begin_only_namespace_names): Likewise.
5646         (end_only_namespace_names): Likewise.
5647         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
5648         nested-name-specifiers more gracefully.
5649         (cp_parser_class_or_namespace_name): Avoid looking up namespace
5650         names when they cannot possibly appear.
5651         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
5652         (cp_parser_elaborated_type_specifier): Likewise.
5653         (cp_parser_namespace_name): Only look for namespace names.
5654         (cp_parser_lookup_name): Add is_namespace parameter.
5655         (cp_parser_lookup_name_simple): Adjust call to
5656         cp_parser_lookup_name.
5658         * parser.c (cp_parser_dependent_type_p): Fix thinko.
5660 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
5662         * .cvsignore: Update.
5664 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
5666         * class.c (modify_vtable_entry): Remove unused variable.
5667         (get_vcall_index): Always expect a non-thunk.
5668         (update_vtable_entry_for_fn): Combine covariant adjustments, when
5669         overriding a thunk. Pass get_vcall_index a non-thunk.
5671         * decl2.c (finish_file): Mark undefined inlines as extern.
5673 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
5675         * cp-tree.def (RETURN_INIT): Remove.
5676         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
5677         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
5678         (note_level_for_for): Remove.
5679         (note_level_for_try): Likewise.
5680         (note_level_for_catch): Likewise.
5681         (finish_named_return_value): Likewise.
5682         (do_pushlevel): Change prototype.
5683         (pending_lang_change): Remove.
5684         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
5685         sk_for.
5686         (note_level_for_for): Remove.
5687         (note_level_for_try): Likewise.
5688         (note_level_for_catch): Likewise.
5689         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
5690         * parser.c (cp_parser_context_free_list): Make it "deletable".
5691         (cp_parser_template_argument): Remove misleading comment.
5692         * pt.c (tsubst_expr): Remove RETURN_INIT code.
5693         * semantics.c (genrtl_named_return_value): Remove.
5694         (do_pushlevel): Take a scope kind as an argument.
5695         (begin_if_stmt): Adjust.
5696         (begin_while_stmt): Likewise.
5697         (begin_for_stmt): Likewise.
5698         (finish_for_init_stmt): Likewise.
5699         (begin_switch_stmt): Likewise.
5700         (begin_handler): Likewise.
5701         (begin_compound_stmt): Likewise.
5702         (finish_named_return_value): Remove.
5703         (cp_expand_stmt): Remove RETURN_INIT case.
5704         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
5706 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
5708         PR c++/9112
5709         * parser.c (cp_parser_direct_declarator): Handle erroneous
5710         parenthesized declarators correctly.
5712 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5714         * cp-tree.h (pending_lang_change): Declare.
5716 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
5718         * parser.c (cp_parser_context_free_list): New variable.
5719         (cp_parser_context_new): Use it.
5720         (cp_parser_error): Check return code from
5721         cp_parser_simulate_error.
5722         (cp_parser_simulate_error): Return a value.
5723         (cp_parser_id_expression): Optimize common case.
5724         (cp_parser_class_name): Likewise.
5725         (cp_parser_class_specifier): Adjust call to
5726         cp_parser_late_parsing_default_args.
5727         (cp_parser_lookup_name): Optimize common case.
5728         (cp_parser_late_parsing_for_member): Adjust call to
5729         cp_parser_late_parsing_default_args.
5730         (cp_parser_late_parsing_default_args): Add scope parameter.
5731         (cp_parser_require): Avoid creating the error message unless it's
5732         needed.
5733         (cp_parser_parse_definitely): Place free'd contexts on the free
5734         list.
5736         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
5738 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
5740         * parser.c (cp_parser_parameter_declaration_clause): Treat system
5741         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
5743 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
5745         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
5746         GCC, not GNU CC.
5748 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
5750         * parse.y: Remove.
5751         * spew.c: Likewise.
5752         * Make-lang.in (gt-cp-spew.h): Remove.
5753         * cp-tree.h (do_pending_lang_change): Remove.
5754         (do_identifier): Change prototype.
5755         (finish_id_expr): Remove.
5756         * decl.c (lookup_name_real): Remove yylex variable.
5757         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
5758         * lex.c (init_cpp_parse): Remove.
5759         (reduce_cmp): Likewise.
5760         (token_cmp): Likewise.
5761         (yychar): Likewise.
5762         (lastiddecl): Likewise.
5763         (token_count): Likewise.
5764         (reduce_count): Likewise.
5765         (yyhook): Likewise.
5766         (print_parse_statistics): Likewise.
5767         (do_pending_lang_change): Likewise.
5768         (do_identifier): Remove parsing parameter.
5769         * lex.h (lastiddecl): Remove.
5770         (looking_for_typename): Remove.
5771         (looking_for_template): Likewise.
5772         (pending_lang_change): Likewise.
5773         (yylex): Likewise.
5774         * semantics.c (finish_id_expr): Remove.
5776         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
5777         thread" correctly.
5779 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
5781         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
5782         end, not the C front end.
5784 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
5786         * cp-tree.h (THUNK_TARGET): New macro.
5787         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
5788         (finish_thunk): Remove offset parms.
5789         * class.c (find_final_overrider): Look through thunks.
5790         (get_vcall_index): Use THUNK_TARGET.
5791         (update_vtable_entry_for_fn): Look through thunks. Set covariant
5792         fixed offset here. Adjust finish_thunk call.
5793         (build_vtbl_initializer): Adjust finish_thunk calls.
5794         * mangle.c (mangle_call_offset): Remove superfluous if.
5795         (mangle_thunk): Adjust.
5796         * method.c (make_thunk): Adjust.
5797         (finish_thunk): Adjust.
5798         (thunk_adjust): Remove assert.
5799         (use_thunk): Use THUNK_TARGET
5800         * dump1.c (cp_dump_tree): Adjust thunk dumping.
5802         PR c++/9054
5803         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
5804         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
5806 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5808         Remove traditional C constructs 4/n.
5809         * decl2.c (grok_method_quals, warn_if_unknown_interface,
5810         grok_x_components, cp_build_parm_decl, build_artificial_parm,
5811         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
5812         delete_sanity, check_member_template, check_java_method,
5813         check_classfn, finish_static_data_member_decl, grokfield,
5814         grokbitfield, grokoptypename, grok_function_init,
5815         cplus_decl_attributes, constructor_name, defer_fn,
5816         build_anon_union_vars, finish_anon_union, coerce_new_type,
5817         coerce_delete_type, comdat_linkage, maybe_make_one_only,
5818         key_method, import_export_vtable, import_export_class,
5819         output_vtable_inherit, import_export_decl, import_export_tinfo,
5820         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
5821         set_guard, start_objects, finish_objects,
5822         start_static_storage_duration_function,
5823         finish_static_storage_duration_function, get_priority_info,
5824         start_static_initialization_or_destruction,
5825         finish_static_initialization_or_destruction,
5826         do_static_initialization, do_static_destruction,
5827         prune_vars_needing_no_initialization, write_out_vars,
5828         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
5829         add_using_namespace, merge_functions, ambiguous_decl,
5830         lookup_using_namespace, lookup_using_namespace,
5831         qualified_lookup_using_namespace, set_decl_namespace,
5832         decl_namespace, current_decl_namespace, push_decl_namespace,
5833         pop_decl_namespace, push_scope, pop_scope, add_function,
5834         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
5835         lookup_arg_dependent, do_namespace_alias,
5836         validate_nonmember_using_decl, do_nonmember_using_decl,
5837         do_toplevel_using_decl, do_local_using_decl,
5838         do_class_using_decl, do_using_directive, check_default_args,
5839         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
5840         * parser.c (cp_parser_class_head): Use booleanss.
5841         * decl.c (walk_globals, walk_vtables): Likewise.
5842         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
5843         walk_globals): Change return type from 'int' to 'bool'.
5844         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
5845         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
5846         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
5847         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
5848         qualifier_flags, tinfo_base_init, generic_initializer,
5849         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
5850         dfs_class_hint_unmark, class_hint_flags, class_initializer,
5851         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
5852         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
5853         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
5854         * repo.c (repo_compile_flags, repo_template_declared,
5855         repo_template_defined, repo_class_defined, repo_get_id,
5856         repo_template_used, repo_vtable_used, repo_inline_used,
5857         repo_tinfo_used, repo_template_instantiated, extract_string,
5858         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
5859         finish_repo): Likewise.
5860         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
5861         cxx_print_xnode): Likewise..
5862         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
5863         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
5864         * cxxfilt.c (demangle_it, print_demangler_list, usage,
5865         standard_symbol_characters, hp_symbol_characters, main, fatal):
5866         Likewise.
5867         (strip_underscore):  Change type from 'int' to 'bool'.
5868         (main): Use boolean constants.
5870 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5872         Remove traditional C constructs 3/n.
5873         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
5874         build_up_reference, warn_ref_binding, convert_to_reference,
5875         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
5876         convert_to_void, convert, convert_force, build_type_conversion,
5877         build_expr_type_conversion, type_promotes_to,
5878         perform_qualification_conversions): Use C90 prototyping style.
5879         * decl2.c (grok_array_decl): Use boolean constant.
5880         (delete_sanity): Likewise.
5881         * typeck.c (build_unary_op): Likewise.
5882         * semantics.c (finish_switch_cond): Likewise.
5883         * parser.c (cp_parser_direct_new_declarator): Likewise.
5884         * init.c (build_new): Likewise.
5886 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
5888         * Make-lang.in (po-generated): Remove parse.c.
5889         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
5890         ($(srcdir)/cp/parse.h): Remove target.
5891         ($(srcdir)/cp/parse.c): Likewise.
5892         (gt-cp-parse.h): Likewise.
5893         (gt-cp-parser.h): New target.
5894         (c++.distclean): Do not remove parse.output.
5895         (c++.maintainer-clean): Do not remove parse.c or parse.h.
5896         (cp/spew.o): Remove target.
5897         (cp/lex.o): Adjust dependencies.
5898         (cp/pt.o): Likewise.
5899         (cp/parse.o): Likewise.
5900         (cp/TAGS): Do not mention parse.c.
5901         (cp/parser.o): New target.
5902         * NEWS: Mention the new parser.
5903         * call.c (build_scoped_method_call): Simplify.
5904         (build_method_call): Likewise.
5905         (build_new_function_call): Adjust calls to add_function_candidate
5906         and add_template_candidate.
5907         (build_new_op): Improve handling of erroroneous operands.
5908         (convert_default_arg): Remove circular argument processing.
5909         (name_as_c_string): New function.
5910         (build_new_method_call): Use it.
5911         (perform_implicit_conversion): Use error_operand_p.
5912         * class.c (finish_struct_anon): Use constructor_name_p.
5913         (check_field_decls): Likewise.
5914         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
5915         (resolve_address_of_overloaded_function): Likewise.
5916         (instantiate_type): Tweak pointer-to-member handling.
5917         (get_primary_binfo): Remove incorrect assertion.
5918         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
5919         * cp-tree.h (DEFARG_TOKENS): New macro.
5920         (default_arg): New structure.
5921         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
5922         (lang_tree_node): Add default_arg.
5923         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
5924         (type_info_ref_type): New macro.
5925         (saved_scope): Make processing_explicit_instantiation a boolean.
5926         (check_access): New field.
5927         (unparsed_text): Remove.
5928         (language_function): Remove unparsed_inlines.
5929         (error_operand_p): New macro.
5930         (lang_decl): Adjust pending_inline_info.
5931         (DEFARG_POINTER): Remove.
5932         (tag_types): Add typenames.
5933         (lookup_ualified_name): Declare.
5934         (lookup_name_real): Likewise.
5935         (shadow_tag): Adjust prototype.
5936         (get_scope_of_declarator): Declare it.
5937         (process_next_inline): Remove it.
5938         (check_for_missing_semicolon): Likewise.
5939         (maybe_get_template_decl_from_type_decl): Declare it.
5940         (finish_label_stmt): Adjust prototype.
5941         (finish_non_static_data_meber): Declare it.
5942         (finish_pseudo_destructor_call_expr): Rename to ...
5943         (finish_pseudo_destructor_expr): ... this.
5944         (finish_compound_literal): Declare it.
5945         (begin_inline_definitions): Remove it.
5946         (init_spew): Remove.
5947         (peekyylex): Likewise.
5948         (arbitrate_lookup): Likewise.
5949         (frob_opname): Likewise.
5950         (maybe_snarf_defarg): Likewise.
5951         (add_defarg_fn): Likewise.
5952         (do_pending_defargs): Likewise.
5953         (done_pending_defargs): Likewise.
5954         (unprocessed_defarg_fn): Likewise.
5955         (replace_defarg): Likewise.
5956         (end_input): Likewise.
5957         (get_overloaded_fn): Likewise.
5958         * cvt.c (convert_to_reference): Improve error handling.
5959         * decl.c (lookup_name_real): Do not declare it static.
5960         (maybe_push_to_top_level): Set check_access.
5961         (identifier_type_value): Adjust call to lookup_name_real.
5962         (lookup_qualified_name): New method.
5963         (lookup_name_real): Remove special-case parsing code.
5964         (lookup_name-nonclass): Adjust call to lookup_name_real.
5965         (lookup_name_namespace_only): Likewise.
5966         (lookup_name): Likewise.
5967         (check_tag_decl): Return the type declared.
5968         (shadow_tag): Likewise.
5969         (register_dtor_fn): Tweak check_access.
5970         (grokfndecl): Use constructor_name_p.
5971         (get_scope_of_declarator): New function.
5972         (grokdeclarator): Obscure tweaks for slightly different declarator
5973         representations.
5974         (start_method): Return error_mark_node to indicate failure.
5975         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
5976         * decl2.c (constructor_name_full): Simplify.
5977         (constructor_name): Use it.
5978         (build_expr_from_tree): Adjust for changes to do new parser.
5979         (push_scope): Improve robustness.
5980         (validate_nonmember_using_decl): Process declarations, not names.
5981         (do_class_using_decl): Likewise.
5982         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
5983         here.
5984         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
5985         * expr.c (cxx_expand_expr): Handle BASELINKs.
5986         * init.c (member_init_ok_or_else): Issue more errors.
5987         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
5988         * lex.c: Do not include parse.h.
5989         (yypring): Do not declare.
5990         (yylval): Likewise.
5991         (make_reference_declarator): Remove error-generating code.
5992         (rid_to_yy): Remove.
5993         (cxx_init): Do not call init_spew.
5994         (yypring): Remove.
5995         (check_for_missing_semicolon): Remove.
5996         * lex.h (got_scope): Remove.
5997         (got_object): Remove.
5998         * method.c (hack_identifier): Use finish_non_static_data_member.
5999         (implicitly_declare_fn): Adjust use of constructor_name.
6000         * parser.c: New file.
6001         * pt.c (parse.h): Do not include it.
6002         (maybe_get_template_decl_from_template): Do not declare it.
6003         (finish_member_template_decl): Tweak.
6004         (begin_explicit_instantiation): Adjust for
6005         processing_explicit_instantiation being boolean.
6006         (end_explicit_instantiation): Likewise.
6007         (maybe_process_partial_specialization): Tighten specialization
6008         test.
6009         (retrieve_local_specialization): Adjust ue of hash table.
6010         (eq_local_specializations): New function.
6011         (register_local_specialization): Likewise.
6012         (push_template_decl_real): Remove unnecessary test.
6013         (maybe_get_template_decl_from_type_decl): Don't make it static.
6014         (for_each_template_parm_r): Handle TYPEOF_TYPE.
6015         (tsubst_copy): Use retrieive_local_specialization to handle
6016         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
6017         Handle COMPONENT_REFs with pseudo-destructor-expressions.
6018         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6019         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6020         (unify): Tweak handling of CONST_DECLs.
6021         (regenerate_decl_from_template): Use push_nested_class.
6022         (template_for_substitution): New funciton.
6023         (instantiate_decl): Use it.  Register parameters as local
6024         specializations.
6025         * rtti.c (init_rtti_processing): Set type_info_ref_type.
6026         (build_typeid): Use it.
6027         (get_typeid): Likeise.
6028         * search.c (accessible_p): Use check_access, not
6029         flag_access_control.
6030         (adjust_result_of_qualified_name_lookup): Pay attention to the
6031         context_class.
6032         * semantics.c (finish_asm_stmt): Adjust error handling.
6033         (finish_label_stmt): Return the statement.
6034         (finish_non_static_data_member): New function.
6035         (finish_class_expr): Handle BASELINKs.
6036         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6037         (finish_object_call_expr): Simplify handling during templates.
6038         (finish_pseudo_destructor_call_expr): Rename to ...
6039         (finish_pseudo_dtor_expr): ... this.
6040         (finish_compound_literal): New function.
6041         (begin_inline_definitions): Remove.
6042         (finish_sizeof): Remove special template handling.
6043         * spew.c: Do not include parse.h.
6044         * tree.c (get_overloaded_fn): Remove.
6045         * typeck.c (build_class_member_access_expr): Handle
6046         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
6047         (lookup_destructor): New function.
6048         (finish_class_member_access_expr): Use it.
6049         (convert_arguments): Simplify.
6050         (build_unary_op): Handle BASELINKs.
6052 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
6054         PR c++/4803
6055         * decl2.c (mark_used): Defer inline functions.
6056         (finish_file): Merge deferred_fns loops. Check all used
6057         inline functions have a definition.
6058         * method.c (make_thunk): Thunks are not inline.
6060         PR c++/5116, c++/764
6061         * call.c (build_new_op): Make sure template class operands are
6062         instantiated.
6064 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
6066         PR C++/7964
6067         * cp-tree.h (resolve_scoped_fn_name): Prototype.
6068         * call.c (resolve_scoped_fn_name): New function. Deal with
6069         more template expansion. Broken out of ...
6070         * parse.y (parse_finish_call_expr): ... here. Call it.
6071         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
6072         resolve_scoped_fn_name and build_call_from_tree.
6074         PR c++/9053
6075         * decl.c (duplicate_decls): Templates may be disambiguated by
6076         return type.
6078         PR c++/8702
6079         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
6080         conversion operators on failure.
6082 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6084         Remove traditional C constructs 2/n.
6085         * call.c (tourney, build_field_call, equal_functions, joust,
6086         compare_ics, build_over_call, build_java_interface_fn_ref,
6087         convert_like_real, op_error, build_object_call, resolve_args,
6088         build_vfield_ref, check_dtor_name, build_scoped_method_call,
6089         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
6090         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
6091         standard_conversion, reference_related_p,
6092         reference_compatible_p, convert_class_to_reference,
6093         direct_reference_binding, reference_binding,
6094         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
6095         add_template_conv_candidate, any_viable, any_strictly_viable,
6096         build_this, splice_viable, print_z_candidates,
6097         build_user_type_conversion, build_new_function_call,
6098         conditional_conversion, build_conditional_expr, build_new_op,
6099         build_op_delete_call, enforce_access, call_builtin_trap,
6100         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
6101         convert_default_arg, type_passed_as, convert_for_arg_passing,
6102         in_charge_arg_for_name, is_properly_derived_from,
6103         maybe_handle_implicit_object, maybe_handle_ref_bind,
6104         source_type, add_warning, can_convert, can_convert_arg,
6105         perform_implicit_conversion, can_convert_arg_bad,
6106         initialize_reference, add_conv_candidate,
6107         add_template_candidate_real, add_template_candidate): Ansify.
6109 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
6111         PR c++/8572
6112         * cp-tree.h (grokoptypename): Add SCOPE parameter.
6113         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
6114         if in a template scope.
6115         * parse.y (unoperator): Return the scope.
6116         (operator_name): Adjust grokoptypename call.
6118 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6120         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
6121         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
6122         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
6124 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
6126         * ChangeLog: Fix a typo.
6127         * class.c: Fix comment typos.
6128         * cp-tree.h: Likewise.
6130 2002-12-18  Jason Merrill  <jason@redhat.com>
6132         Handle anonymous unions at the tree level.
6133         C++ ABI change: Mangle anonymous unions using the name of their
6134         first named field (by depth-first search).  Should not cause
6135         binary compatibility problems, though, as the compiler previously
6136         didn't emit anything for affected unions.
6137         * cp-tree.def (ALIAS_DECL): New tree code.
6138         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
6139         first field, not the largest.
6140         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
6141         push the decl, and write it out at namespace scope.
6142         * decl.c (lookup_name_real): See through an ALIAS_DECL.
6143         (pushdecl): Add namespace bindings for ALIAS_DECLs.
6144         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
6145         of a decl which doesn't have one.
6146         * typeck.c (build_class_member_access_expr): Don't recurse if
6147         we already have the type we want.
6149 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6151         PR c++/8099
6152         * friend.c (make_friend_class): Allow partial specialization
6153         when declaration is not a template friend.
6155 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6157         PR c++/3663
6158         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
6159         TREE_PROTECTED to created decl nodes.
6161 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
6163         * class.c (build_base_field): Do not set DECL_PACKED on the
6164         FIELD_DECL.
6166 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6168         * cp-tree.h (struct tree_srcloc): Use location_t.
6169         (SOURCE_LOCUS): New.
6170         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
6172 2002-12-17  Jason Merrill  <jason@redhat.com>
6174         * decl.c (finish_function): Also complain about no return in
6175         templates.
6176         * semantics.c (finish_return_stmt): Also call check_return_expr in
6177         templates.
6178         * typeck.c (check_return_expr): In a template, just remember that we
6179         saw a return.
6181 2002-12-16  Jason Merrill  <jason@redhat.com>
6183         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
6184         of the CALL_EXPR.
6186         * semantics.c (do_pushlevel): Call pushlevel after adding the
6187         SCOPE_STMT.
6188         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
6189         * parse.y (function_body): Go back to using compstmt.
6190         * decl.c (pushdecl): Skip another level to get to the parms level.
6192         * call.c (build_new_method_call): Use is_dummy_object to determine
6193         whether or not to evaluate the object parameter to a static member
6194         function.
6196 2002-12-14  Jason Merrill  <jason@redhat.com>
6198         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
6199         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
6200         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
6201         don't bother with an AGGR_INIT_EXPR.
6202         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
6203         just generate a new decl normally.  Take return slot parm.
6204         * cp-tree.h: Adjust prototype.
6206 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6208         PR C++/8031
6209         * cvt.c (convert_to_pointer_force): Don't try comparing against
6210         erronous type.
6212 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
6214         * cp-tree.h: Have the multiple-include guards around
6215         the entire file.
6217 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
6219         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
6220         for SPEW_DEBUG.
6221         (snarf_method): Same.
6222         (snarf_defarg): Same.
6224 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
6226         PR c++/8372
6227         * pt.c (tsubst_copy): Handle destructor names more correctly.
6229 2002-12-10  Matt Austern   <austern@apple.com>
6231         * cp-tree.h: get rid of needs_virtual_reinit bit.
6233 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
6235         * NEWS: Document removal of in-class initialization extension for
6236         static data members of non-arithmetic, non-enumeration type.
6237         * decl.c (check_static_variable_definition): Do not allow that
6238         extension.
6239         * decl2.c (grokfield): Do not call digest_init when processing
6240         templates.
6242 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6244         * error.c (dump_expr): Fix format specifier warning.
6246 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
6248         * class.c (finish_struct_1): Correct comment.
6249         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
6251 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6253         PR C++/8799
6254         * error.c (dump_expr): Don't ever try to dump a non-existent
6255         expression.
6257 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
6259         Implement covariant returns.
6260         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
6261         (struct lang_decl_flags): Add this_thunk_p flag.
6262         Rename vcall_offset to virtual_offset.
6263         (struct lang_decl): Rename delta to fixed_offset.
6264         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
6265         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
6266         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
6267         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
6268         (make_thunk): Add this_adjusting arg.
6269         (finish_thunk): Declare.
6270         (mangle_thunk): Add this_adjusting arg.
6271         * class.c (get_vcall_index): Use base function for lookup.
6272         (update_vtable_entry_for_fn): Generate covariant thunk.
6273         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
6274         (build_vtbl_initializer): Use base function for lookup.
6275         Finish covariant thunk here. Adjust thunk generation.
6276         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
6277         Adjust thunk dumping.
6278         * mangle.c (mangle_call_offset): New function.
6279         (mangle_thunk): Adjust for covariant thunks.
6280         * method.c (make_thunk): Adjust. Do not set name here.
6281         (finish_thunk): New function. Set name here.
6282         (use_thunk): Generate covariant thunks too.
6283         (thunk_adjust): New function.
6284         * search.c (covariant_return_p): Remove. Fold into ...
6285         (check_final_overrider): ... here. Simplify.
6286         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
6288 2002-12-03  Jason Merrill  <jason@redhat.com>
6290         PR c++/8674
6291         * call.c (build_over_call): Check specifically for TARGET_EXPR
6292         when eliding.
6294         PR c++/8461, c++/8625
6295         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
6296         (cp_convert_parm_for_inlining): Remove.
6297         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6298         Remove.
6299         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
6300         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
6302         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
6303         an ambiguous conversion.
6305 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
6307         PR c++/8688
6308         * decl.c (reshape_init): Handle erroneous initializers.
6310 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
6312         PR c++/8720
6313         * spew.c (remove_last_token): Make sure that last_chunk is set
6314         correctly.
6316         PR c++/8615
6317         * error.c (dump_expr): Handle character constants with
6318         TREE_OVERFLOW set.
6320 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6322         DR 180
6323         * decl.c (grokdeclarator): Require class-key for all friend class.
6324         Output the correct type and context in the error message.
6326 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
6328         PR c++/5919
6329         * pt.c (unify): Use variably_modified_type_p to test validity of
6330         template argument types.
6332         PR c++/8727
6333         * cp-tree.h (lang_type_class): Add typeinfo_var.
6334         (CLASSTYPE_TYPEINFO_VAR): New macro.
6335         * rtti.c (get_tinfo_decl): Use it.
6337         PR c++/8663
6338         * init.c (expand_member_init): Always get the main variant of a
6339         base class.
6341 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
6343         PR c++/8332
6344         PR c++/8493
6345         * decl.c (cxx_init_decl_processing): Use size_type_node, not
6346         c_size_type_node.
6347         * decl2.c (coerce_new_type): Likewise.
6348         * except.c (do_allocate_exception): Likewise.
6350 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
6352         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
6353         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
6354         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
6355         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6356         typeck2.c: Include coretypes.h and tm.h.
6357         * Make-lang.in: Update dependencies.
6359 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
6361         PR c++/8227
6362         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
6363         (check_initializer): Validate the type of the initialized
6364         variable, even if the initializer is absent.
6365         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
6367         PR c++/8214
6368         * typeck.c (convert_for_assignment): Do not use
6369         decl_constant_value on the operand.
6371         PR c++/8511
6372         * pt.c (instantiate_decl): Handle template friends defined outside
6373         of the class correctly.
6375 2002-11-29  Joe Buck <jbuck@synopsys.com>
6377         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
6378         anonymous structs.
6380 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
6382         * class.c (walk_subobject_offsets): Recur on binfos as well as on
6383         types.
6384         (layout_nonempty_base_or_field): Pass it a binfo when processing a
6385         base class.
6386         (layout_empty_base): Likewise.
6387         (build_base_field): Likewise.
6389 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
6391         * class.c (build_base_field): Make sure we get the canonical base
6392         when descending through primary bases.
6394 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
6396         * decl.c (check_initializer): Don't error on initialisation of
6397         a scalar with a brace-enclosed expression.
6399 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
6401         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
6402         (template_parms_equal): Remove prototype.
6403         * typeck.c (buuld_indirect_ref): Reformat.
6405 2002-11-25  Jason Merrill  <jason@redhat.com>
6407         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
6408         and a DO_STMT.
6410 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
6412         * tree.c (cp_build_qualified_type_real): Correct handling of
6413         array types.
6414         * class.c (walk_subobject_offsets): Fix thinko.
6415         (build_base_field): Record offsets of empty bases in primary
6416         virtual bases.
6417         (layout_class_type): Record offsets of empty bases in fields.
6419         * search.c (is_subobject_of_p_1): Fix thinko.
6420         (lookup_field_queue_p): Likewise.
6422 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
6424         * class.c (layout_class_type): Reuse tail padding when laying out
6425         virtual bases.
6427 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
6429         * rtti.c (qualifier_flags): Fix thinko.
6431 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6433         Remove traditional C constructs 1/n.
6434         * cp-tree.h (init_method, set_mangled_name_for_decl,
6435         build_opfncall, hack_identifier, make_thunk, use_thunk,
6436         synthesize_method, implicitly_declare_fn,
6437         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
6438         maybe_clone_body): Remove use of PARAMS.
6440         * method.c (do_build_assign_ref, do_build_copy_constructor,
6441         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
6442         Likewise.
6443         (synthesize_method): Use 'bool' type and constants instead of
6444         'int'.
6445         (locate_copy): Likewise.
6446         (implicitly_declare_fn): Likewise.
6448         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
6449         Remove old-style declaration.
6450         (maybe_clone_body): Use 'bool' type and constants.
6452 2002-11-21  Glen Nakamura  <glen@imodulo.com>
6454         PR c++/8342
6455         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
6456         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
6457         of the branches of a COND_EXPR.
6459 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
6461         * pt.c (for_each_template_parm): Free allocated memory.
6462         * search.c (is_subobject_of_p_1): New function.
6463         (is_subobject_of_p): Avoid walking virtual bases multiple times.
6465 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
6467         * g++spec.c (lang_specific_spec_functions): New.
6469 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
6471         * ChangeLog: Follow spelling conventions.
6472         * class.c: Likewise.
6473         * decl2.c: Likewise.
6475 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
6477         * search.c (dfs_push_decls): Do not try to reorder elements
6478         3..n of method_vec if method_vec has only two elements.
6479         Reverse order of two tests to avoid accessing unallocated
6480         memory.
6482 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
6484         * class.c (dfs_find_final_overrider): Adjust so that the most
6485         derived object is a binfo, rather than a class type.
6486         (find_final_overrider): Likewise.
6487         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
6488         (add_vcall_offset): Likewise.
6490 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6492         PR c++/8389
6493         * pt.c (instantiate_template): Push class scope for member
6494         functions.
6495         (get_mostly_instantiated_function_type): Likewise.  Don't call
6496         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
6497         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
6498         * mangle.c (write_encoding, write_unqualified_name): Adjust.
6500 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
6502         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
6503         vcall offfsets.  Split out ...
6504         (add_vcall_offset): ... new function.
6506         PR c++/8338
6507         * pt.c (for_each_template_parm): Add htab parameter.
6508         (process_partial_specialization): Adjust call.
6509         (push_template_decl_real): Likewise.
6510         (pair_fn_data): Add visited.
6511         (for_each_template_parm_r): Avoid walking duplicates more than
6512         once.
6513         (uses_template_parms): Adjust call to for_each_template_parm.
6515 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
6517         * class.c (add_implicitly_declared_members): Put implicitly
6518         declared functions at the end of TYPE_METHODs when -fabi-version
6519         is at least 2.
6521 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
6523         * decl2.c (finish_file): Correct spelling.
6525 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
6527         * call.c (build_special_member_call): Do not try to lookup VTTs by
6528         name.
6529         * class.c (vtbl_init_data): Add generate_vcall_entries.
6530         (get_vtable_decl): Do not look up virtual tables by name.
6531         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
6532         (set_primary_base): Do not set CLASSTYPE_RTTI.
6533         (determine_primary_base): Likewise.
6534         (get_matching_virtual): Remove.
6535         (get_vcall_index): New function.
6536         (update_vtable_entry_for_fn): Do not try to use virtual thunks
6537         when they are not required.  Assign vcall indices at this point.
6538         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
6539         Do update dynamic_classes.
6540         (build_vtt): Do not add VTTs to the symbol table.
6541         (build_ctor_vtbl_group): Likewise.
6542         (build_vtbl_initializer): Simplify handling of vcall indices.
6543         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
6544         for the most derived class.
6545         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
6546         the vtable.
6547         * cp-tree.h (dynamic_classes): New macro.
6548         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
6549         (CLASSTYPE_RTTI): Remove.
6550         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
6551         (CLASSTYPE_VCALL_INDICES): New macro.
6552         (CLASSTYPE_VTABLES): Likewise.
6553         (BV_USE_VCALL_INDEX_P): Remove.
6554         (build_vtable_path): Remove.
6555         * decl2.c (finish_vtable_vardecl): Remove.
6556         (key_method): Remove #if 0'd code.
6557         (finish_vtable_vardecl): Rename to ...
6558         (maybe_emit_vtables): ... this.
6559         (finish_file): Use it.
6560         * search.c (look_for_overrides_here): Update comment.
6562 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
6564         PR c/7353 redux
6565         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
6567 2002-10-30  Jason Merrill  <jason@redhat.com>
6569         PR c++/8186
6570         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
6571         * call.c (convert_for_arg_passing): Set it.
6572         * except.c (stabilize_throw_expr): Recurse for such an arg.
6574 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
6576         * cp-tree.h (lang_decl_flags): Remove init_priority.
6577         (lang_decl): Add delta.
6578         (GLOBAL_INIT_PRIORITY): Remove.
6579         (THUNK_DELTA): Revise definition.
6580         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
6581         * dump.c (cp_dump_tree): Don't dump it.
6583 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
6585         PR c++/8160
6586         * typeck2.c (process_init_constructor): Call complete_array_type.
6588         PR c++/8149
6589         * decl.c (make_typename_type): Issue errors about invalid results.
6591 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6593         Core issue 287, PR c++/7639
6594         * cp-tree.h (lang_type_class): Add decl_list field.
6595         (CLASSTYPE_DECL_LIST): New macro.
6596         (maybe_add_class_template_decl_list): Add declaration.
6597         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
6598         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
6599         (maybe_add_class_template_decl_list): New function.
6600         (add_implicitly_declared_members): Use it.
6601         * decl.c (maybe_process_template_type_declaration): Likewise.
6602         (pushtag): Likewise.
6603         * friend.c (add_friend): Likewise.
6604         (make_friend_class): Likewise.
6605         * semantics.c (finish_member_declaration): Likewise.
6606         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
6607         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
6608         to process members and friends in the order of declaration.
6610 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
6612         PR c++/8287
6613         * decl.c (finish_destructor_body): Create the label to jump to
6614         when returning from a destructor here.
6615         (finish_function_body): Rather than here.
6617 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
6619         PR c++/7266
6620         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
6621         SCOPE_REF is not null before dereferencing it.
6623 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
6625         * call.c (build_over_call): Use DECL_CONTEXT, not
6626         DECL_VIRTUAL_CONTEXT.
6627         * class.c (modify_vtable_entry): Don't mess with
6628         DECL_VIRTUAL_CONTEXT.
6629         (set_vindex): Remove.
6630         (set_primary_base): Remove vfuns_p parameter.
6631         (determine_primary_base): Likewise.
6632         (modify_all_vtables): Likewise.
6633         (layout_class_type): Likewise.  Adjust calls to other functions
6634         accordingly.
6635         (finish_struct_1): Adjust calls to modified functions.  Set
6636         DECL_VINDEX here.
6637         * cp-tree.h (lang_type_class): Remove vsize.
6638         (CLASSTYPE_VSIZE): Remove.
6639         (lang_decl): Remove thunks.
6640         (DECL_THUNKS): Adjust.
6641         (DECL_VIRTUAL_CONTEXT): Remove.
6642         (duplicate_decls): Don't copy it.
6643         * pt.c (build_template_decl): Don't set it.
6644         (tsubst_decl): Likewise.
6645         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
6647         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
6648         (build_vtable_entry): Remove.
6649         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
6650         (lang_decl): Add thunks.
6651         (DECL_THUNKS): New macro.
6652         * decl.c (duplicate_decls): Copy it.
6653         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
6654         * semantics.c (emit_associated_thunks): Simplify.
6656 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
6658         PR c++/7228
6659         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
6660         lang_type structure exists before accessing field.
6661         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
6662         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
6663         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
6664         * class.c (check_field_decls): Use new macros.
6665         * typeck2.c (process_init_constructor): Remove redundant check for
6666         existence of lang_type structure.
6668 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
6670         * class.c (end_of_base): New method.
6671         (end_of_class): Use it.  Check indirect virtual bases.
6673         * class.c (check_field_decls): Fix typo.
6675 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
6677         PR c++/8067
6678         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
6679         related variables.
6681         PR c++/7679
6682         * spew.c (next_token): Do not return an endless stream of
6683         END_OF_SAVED_INPUT tokens.
6684         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
6685         the cached token stream.
6686         (snarf_defarg): Likewise.
6688 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
6690         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
6691         variably_modified_type_p.
6692         * cp-tree.h: Remove prototype of variably_modified_type_p.
6693         * tree.c (variably_modified_type_p): Remove; now implemented
6694         in language-independent code.
6696 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
6698         PR c++/6579
6699         * spew.c (snarf_parenthesized_expression): New function.
6700         (snarf_block): Use it.
6702 2002-10-22  Richard Henderson  <rth@redhat.com>
6704         * method.c (use_thunk): Always compute vcall_value; assert that
6705         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
6706         for vcall thunks as well.
6708 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
6710         * class.c (empty_base_at_nonzero_offset_p): New function.
6711         (layout_nonempty_base_or_field): Do not check for conflicts when
6712         laying out a virtual base using the GCC 3.2 ABI.
6713         (build_base_field): Correct checking for presence of empty classes
6714         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
6716         * class.c (include_empty_classes): Use normalize_rli.
6717         (layout_class_type): Likewise.
6719         * decl.c (reshape_init): Tweak handling of character arrays.
6721         PR c++/8218
6722         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
6723         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
6724         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
6725         (check_field_decls): Likewise.
6726         (layout_class_type): Likewise.
6727         (finish_struct_1): Initialize it.
6728         (walk_subobject_offsets): Use it to prune searches.
6730 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
6732         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
6733         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
6734         TARGET_ASM_OUTPUT_MI_THUNK in comments.
6736 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
6738         * decl.c (start_decl): Point users of the old initialized-
6739         typedef extension at __typeof__.
6741 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
6743         * Make-lang.in (method.o): Depend on TARGET_H.
6744         * method.c (target.h): Include it.
6745         (use_thunk): Use target hooks.  Use vcall thunks, if available.
6747 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
6749         * class.c (base_derived_from): Make sure return value is a bool.
6751 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
6753         * class.c (find_final_overrider_data_s): Remove overriding_fn and
6754         overriding_base.
6755         (dfs_base_derived_from): New function.
6756         (base_derived_from): Likewise.
6757         (dfs_find_final_overrider): Use base_derived_from.
6758         (find_final_overrider): Adjust.
6760 2002-10-18  Jason Merrill  <jason@redhat.com>
6762         PR c++/8080
6763         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
6764         with condition decls in a template.
6766 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
6768         * class.c (add_method): Compare template parms too.
6770 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
6772         PR c++/7584
6773         * class.c (handle_using_decl): Allow the declaration used to be
6774         from an ambiguous base.
6776         * pt.c (convert_template_argument): Revert this change:
6777                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
6778                 * pt.c (convert_template_argument): Do not fold non-type
6779                 template rguments when inside a template.
6781         * init.c (expand_default_init): Handle brace-enclosed initializers
6782         correctly.
6784 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
6786         * mangle.c (write_expression): Correct handling of enumeration
6787         constants.
6788         (write_template_arg): Likewise.
6789         * pt.c (convert_template_argument): Do not fold non-type template
6790         arguments when inside a template.
6792         PR c++/7478
6793         * cvt.c (convert_to_reference): Allow references as the incoming
6794         type.
6796 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
6798         PR c++/7524
6799         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
6800         build_qualified_type.
6802 2002-10-15  Richard Henderson  <rth@redhat.com>
6804         * error.c (dump_expr): Use real_to_decimal directly, and with
6805         the new arguments.
6807 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
6809         * decl.c (reshape_init): Fix typo.
6811         * cp-tree.h (operator_name_info_t): Add arity.
6812         * lex.c (init_operators): Initialize it.
6813         * mangle.c (write_conversion_operator_name): New function.
6814         (write_unqualified_name): Use it.
6815         (write_template_args): Accept template arguments as a TREE_LIST.
6816         (write_expression): Adjust handling of qualified names to match
6817         specification.
6819 2002-10-15  Jason Merrill  <jason@redhat.com>
6821         * call.c (call_builtin_trap): New fn.
6822         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
6823         (build_call): Don't set current_function_returns_abnormally outside
6824         a function.
6826 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
6828         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
6829         clear CLASSTYPE_EMPTY_P.
6830         (build_base_field): Likewise.
6831         (build_base_fields): Likewise.
6832         (check_bases_and_members): Likewise.
6833         (create_vtbl_ptr): Likewise.
6834         (layout_class_type): Likewise.  Ensure that empty classes have
6835         size zero when used as base classes in the 3.2 ABI.
6836         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
6837         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
6838         parameter.
6839         (is_empty_class): Correct definition when using post-3.2 ABI.
6840         * cp-tree.h (lang_type_class): Add empty_p.
6841         (CLASSTYPE_EMPTY_P): New macro.
6843 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
6845         * init.c (build_delete): Do not apply save_expr for arrays.
6846         (build_vec_delete): Likewise.
6848 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
6850         * decl.c (layout_var_decl): Call layout_decl even for variables
6851         whose type is an array with unspecified bounds.
6853         PR c++/7176
6854         * lex.c (do_identifier): Add another option for the parsing
6855         parameter.
6856         * parse.y (do_id): Use it.
6858 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6860         PRs C++/6803, C++/7721 and C++/7803
6861         * decl.c (grokdeclarator): Gracefully handle template-name as
6862         decl-specifier.
6864 2002-10-11  Jason Molenda  <jmolenda@apple.com>
6866         * init.c (build_field_list): Provide uses_unions_p with a default
6867         value.
6869 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
6871         PR c++/5661
6872         * cp-tree.h (variably_modified_type_p): New function.
6873         (grokdeclarator) Tighten check for variably modified types as
6874         fields.
6875         * pt.c (convert_template_argument): Do not allow variably modified
6876         types as template arguments.
6877         * tree.c (variably_modified_type_p): New function.
6879         * NEWS: Document removal of "new X = ..." extension.
6880         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
6881         brace-enclosed initializers.
6882         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
6883         (initialize_local_var): Remove declaration.
6884         (expand_static_init): Likewise.
6885         * decl.c (next_initializable_field): New function.
6886         (reshape_init): Likewise.
6887         (check_initializer): Use them.  Build dynamic initializer for
6888         aggregates here too.
6889         (initialize_local_var): Simplify, and incorporate cleanup
6890         insertion code as well.
6891         (destroy_local_var): Remove.
6892         (cp_finish_decl): Tidy.
6893         (expand_static_init): Fold checks for whether or not a variable
6894         needs initialization into this function.  Simplify.
6895         * decl2.c (do_static_initialization): Simplify.
6896         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
6897         be done for us automatically.
6898         (expand_default_init): Handle brace-enclosed initializers
6899         correctly.
6900         (expand_aggr_init_1): Remove RTL-generation code.
6901         (build_vec_init): Remove "new X = ..." support.
6902         * parse.y (new_initializer): Likewise.
6903         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
6904         brace-enclosed initializer.
6905         (create_pseudo_type_info): Likewise.
6906         * typeck2.c (store_init_value): Don't try to handle digest_init
6907         being called more than once.
6908         (digest_init): Tidy handling of brace-enclosed initializers.
6910 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6912         * decl.c (typename_hash): Use htab_hash_pointer.
6914 2002-10-10  Jim Wilson  <wilson@redhat.com>
6916         * decl.c (duplicate_decls): Don't call decl_attributes.
6918 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
6920         PR c/7353
6921         * decl.c (start_decl): Unconditionally issue error for
6922         'typedef foo = bar'.
6923         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
6924         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
6926 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6928         * decl2.c (prune_vtable_vardecl): Delete unused function.
6930 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
6932         PR c++/7754
6933         * decl2.c (finish_anon_union): Do not expand anonymous unions when
6934         procesing template functions.
6935         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6936         type. Call layout_decl.
6937         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6939 2002-10-07  Richard Henderson  <rth@redhat.com>
6941         * decl2.c, pt.c: Revert c++/7754 fix.
6943 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6945         PR c++/7804
6946         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
6948 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
6950         PR c++/7931
6951         * pt.c (for_each_template_parm_r): Handle BASELINKs.
6953         PR c++/7754
6954         * decl2.c (finish_anon_union): Do not expand anonymous unions when
6955         procesing template functions.
6956         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6957         type. Call layout_decl.
6958         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6960 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
6962         PR c++/8006
6963         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
6964         template parameters.
6965         (globals): Add entity and need_abi_warning.
6966         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
6967         CLASSTYPE_TEMPLATE_INFO.
6968         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
6969         TYPE_TI_TEMPLATE.
6970         (write_prefix): Handle typename types correctly.
6971         (write_template_prefix): Handle template template parameters
6972         correctly.
6973         (start_mangling): Add entity parameter.
6974         (finish_mangling): Warn about names whose mangling will change.
6975         (mangle_decl_string): Adjust.
6976         (mangle_type_string): Likewise.
6977         (mangle_special_for_type): Likewise.
6978         (mangle_ctor_vtbl_for_type): Likewise.
6979         (mangle_thunk): Likewise.
6980         (mangle_guard_variable): Likewise.
6981         (mangle_ref_init_variable): Likewise.
6983 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
6985         PR c++/7188.
6986         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
6987         * cp-tree.h (emit_base_init): Rename to ....
6988         (emit_mem_initializers): ... this.
6989         (expand_member_init): Change prototype.
6990         * init.c (perform_member_init): Compute explicit, rather than
6991         requiring it as a parameter.
6992         (sort_member_init): Rename to ...
6993         (sort_mem_initializers): ... this.  Process bases and data members
6994         together.
6995         (sort_base_init): Remove.
6996         (emit_base_init): Rename to ...
6997         (emit_mem_initializers): ... this.
6998         (expand_aggr_vbase_init_1): Remove.
6999         (construct_virtual_bases): Rename to ...
7000         (construct_virtual_base): ... this.
7001         (expand_member_init): Rework handling of base initializers.
7002         * method.c (do_build_copy_constructor): Use
7003         finish_mem_initializers.
7004         * parse.y (member_init): Adjust calls to expand_member_init.
7005         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7006         (tsubst_initializer_list): Use expand_member_init.
7007         * semantics.c (finish_mem_intiailizers): Simplify.
7009 2002-10-02  Matt Austern  <austern@apple.com>
7010         * decl.c (walk_vtables_r): Fixed typo that caused result to
7011         never get a nonzero value.
7013 2002-10-02  Roger Sayle  <roger@eyesopen.com>
7015         PR optimization/6627
7016         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7017         from here, and move it to tree.h.
7018         * decl.c (cxx_init_decl_processing): If storing the vbit
7019         in function pointers, ensure that force_align_functions_log
7020         is atleast one.
7022 2002-10-02  Matt Austern  <austern@apple.com>
7024         * class.c (check_field_decls): Changed warning about const member
7025         variables so that it doesn't get issued for a class aggregate.
7027 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
7029         * decl.c (cp_finish_decl): Make sure array types are laid out,
7030         even if the array bounds are unknown.
7032 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
7034         * class.c (build_vtbl_initializer): Change build_c_cast
7035         to build1.
7037 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
7039         * decl.c (cp_finish_decl): Make sure array types are laid out,
7040         even if the array bounds are unknown.
7042         * decl.c (cp_finish_decl): Correct check for dynamic
7043         initialization of thread-local storage.
7045 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
7047         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7048         overloaded.
7050 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
7052         * class.c (build_vtbl_initializer): Add cast.
7053         (add_vcall_offset_vtbl_entries_1):
7054         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7056 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
7058         * class.c (walk_subobject_offsets): Correct the calculation of
7059         offsets for virtual bases.  Correct the counting of array
7060         elements.
7061         (layout_nonempty_base_or_field): Simplify.  Correct the
7062         calculation of offsets to be propagated through the binfo
7063         hierarchy.
7064         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7065         Add the FIELD_DECL to TYPE_FIELDS.
7066         (build_base_fields): Adjust accordingly.
7067         (layout_virtual_bases): Use build_base_field.
7068         (end_of_class): Return a tree, not an integer.
7069         (warn_about_ambiguous_direct_bases): Rename to ...
7070         (warn_about_ambiguous_bases): ... this.
7071         (include_empty_classes): New function.
7072         (layout_class_type): Create an alternative version of the type to
7073         be used when as a base class type.  Do not call
7074         finish_record_layout until we are done laying out the class.
7075         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
7076         as_base.
7077         (CLASSTYPE_SIZE): Reimplement.
7078         (CLASSTYPE_SIZE_UNIT): Likewise.
7079         (CLASSTYPE_ALIGN): Likweise.
7080         (CLASSTYPE_USER_ALIGN): Likewise.
7081         (CLASSTYPE_AS_BASE): New macro.
7082         (DECL_INITIALIZED_P): Likewise.
7083         (extract_init): Remove prototype.
7084         (build_forced_zero_init): Rename to ...
7085         (build_zero_init): ... this.
7086         (force_store_init_value): Remove.
7087         * decl.c (obscure_complex_init): Remove.
7088         (duplicate_decls): Copy DECL_INITIALIZED_P.
7089         (check_initializer): Do not leave junk in DECL_INITIAL.
7090         (cp_finish_decl): Handle zero-initialization of entities with
7091         static storage duration.
7092         * expr.c (extract_init): Remove.
7093         * init.c (build_forced_zero_init): Remove.
7094         (build_zero_init): New function.
7095         (build_default_init): Use it.
7096         (build_field_list): Skip FIELD_DECLs for base subobjects.
7097         (push_base_cleanups): Likewise.
7098         * method.c (do_build_assign_ref): Likewise.
7099         (synthesize_exception_spec): Likewise.
7100         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
7101         (regenerate_decl_from_template): To not set DECL_INITIAL for a
7102         static data member whose initialization took place in its class.
7103         (instantiate_decl): Do not pass an initializer to cp_finish_decl
7104         in that situation.
7105         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
7106         (dfs_unuse_fields): Likewise.
7107         * tree.c (pod_type_p): Handle error_mark_node.
7108         (zero_init_p): Likewise.
7109         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
7110         subobjects.
7111         * typeck2.c (store_init_value): Remove #if 0'd code.
7112         (force_store_init_value): Remove.
7113         (process_init_constructor): Use build_zero_init.
7115 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
7117         PR c++/7788
7118         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
7120 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
7122         * cp-tree.h: Fix comment typos.
7123         * decl.c: Likewise.
7124         * pt.c: Likewise.
7126 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
7128         * cp/class.c (contains_empty_class_p): New method.
7129         (walk_subobject_offsets): Correct computation of field offset.
7130         (layout_empty_base): Correct placement of emtpy base classes.
7131         (layout_class_type): Warn about ABI changes.
7133 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
7135         * cp/class.c (layout_virtual_bases): Do not round the size of the
7136         type to a multiple of the alignment before laying out virtual bases.
7137         (layout_class_type): Correct handling of bit-fields that are wider
7138         than their type inside unions.  Round the size of the type to a
7139         even number of bytes when computing the size without virtual
7140         bases.
7141         * cp/cp-tree.h (abi_version_at_least): New macro.
7143 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
7145         * ChangeLog: Follow spelling conventions.
7146         * ChangeLog.2: Likewise.
7147         * call.c: Likewise.
7148         * class.c: Likewise.
7149         * cp-tree.h: Likewise.
7150         * cvt.c: Likewise.
7151         * decl.c: Likewise.
7152         * decl2.c: Likewise.
7153         * except.c: Likewise.
7154         * friend.c: Likewise.
7155         * g++spec.c: Likewise.
7156         * init.c: Likewise.
7157         * lex.c: Likewise.
7158         * mangle.c: Likewise.
7159         * method.c: Likewise.
7160         * operators.def: Likewise.
7161         * optimize.c: Likewise.
7162         * pt.c: Likewise.
7163         * rtti.c: Likewise.
7164         * search.c: Likewise.
7165         * semantics.c: Likewise.
7166         * spew.c: Likewise.
7167         * tree.c: Likewise.
7168         * typeck.c: Likewise.
7170 2002-09-18  Devang Patel  <dpatel@apple.com>
7172         * cp/cp-tree.h: New prototype for walk_vtabls().
7173         * cp/decl.c (walk_vtables_r): New function.
7174         (struct cp_binding_level): Add new members, namespaces,
7175         names_size and vtables.
7176         (add_decl_to_level): Add decl in namespaces or vtables
7177         chain, if conditions match.
7178         (walk_vtables): New function.
7179         (walk_namespaces_r): Travers separate namespace chain
7180         for namespace decls.
7181         (wrapup_globals_for_namespace): Use names_size instead
7182         of list_length().
7183         * cp/decl2.c (finish_file): Use walk_vtables() instead of
7184         walk_globals() to walk vtable decls.
7186 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
7188         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
7189         ICE with invalid pointers & references.
7191 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
7193         * Make-lang.in: Remove all references to the demangler.
7194         * cxxfilt.c: Moved to binutils.
7196 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
7198         PR c++/7718
7199         * pt.c (tsubst_decl): Remove assert.
7201         Remove DR 295 implementation.
7202         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
7203         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
7204         about ignoring volatile qualifiers.
7206         * search.c (lookup_member): Correct documentation.
7208 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
7210         * cp-tree.h (union lang_tree_node): Add chain_next option.
7212 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
7214         * parse.y (parse_finish_call_expr): Check lookup_member result.
7216         PR c++/7015
7217         * semantic.c (finish_asm_stmt): Fix operand/output_operands
7218         thinko.
7219         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
7221 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
7223         PR c++/7919
7224         * call.c (build_over_call): Convert this pointer for fns found by
7225         using decls.
7227 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
7229         * ChangeLog: Follow spelling conventions.
7230         * ChangeLog.1: Likewise.
7232 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
7234         PR c++/7768
7235         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
7237 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
7239         * error.c: Fix comment formatting.
7240         * except.c: Likewise.
7241         * expr.c: Likewise.
7242         * friend.c: Likewise.
7243         * g++spec.c: Likewise.
7244         * init.c: Likewise.
7245         * lex.c: Likewise.
7246         * mangle.c: Likewise.
7247         * method.c: Likewise.
7248         * optimize.c: Likewise.
7249         * pt.c: Likewise.
7250         * rtti.c: Likewise.
7251         * search.c: Likewise.
7252         * semantics.c: Likewise.
7253         * spew.c: Likewise.
7254         * tree.c: Likewise.
7255         * typeck.c: Likewise.
7256         * typeck2.c: Likewise.
7258 2002-09-13  Matt Austern  <austern@apple.com>
7260         PR C++/7828
7261         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
7262         * cp/call.c: Change call-by-const-reference mechanism to use
7263         non_cast_lvalue_p when deciding whether the create a temporary.
7264         We need a temporary when passing, e.g. (long) x by const ref.
7266 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
7268         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
7270 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
7272         * decl.c: Fix comment formatting.
7273         * decl2.c: Likewise.
7275 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
7277         * call.c: Fix comment formatting.
7278         * class.c: Likewise.
7279         * cp-lang.c: Likewise.
7280         * cp-tree.h: Likewise.
7281         * cvt.c: Likewise.
7283 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
7285         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
7286         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
7287         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
7288         minor adjustments (use version_string, eliminate yet another
7289         duplicate of xmalloc)
7291 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7293         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
7295 2002-09-05  Jason Merrill  <jason@redhat.com>
7297         * typeck2.c (add_exception_specifier): Only pedwarn for an
7298         incomplete type.
7299         (require_complete_eh_spec_types): New fn.
7300         (cxx_incomplete_type_diagnostic): Also support pedwarning.
7301         * typeck.c (complete_type_or_diagnostic): Likewise.
7302         * call.c (build_call): Call require_complete_eh_spec_types.
7303         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
7304         on an incomplete type.
7306 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
7308         * decl.c (start_cleanup_fn): Clear interface_only before
7309         start_function, restore it afterwards.
7311 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
7313         * cp-tree.h (finish_builtin_type): Remove.
7314         * decl2.c (finish_builtin_type): Move to common code.
7315         * decl.c (build_ptrmemfunc_type): Adjust.
7316         * rtti.c (create_pseudo_type_info): Adjust.
7317         (create_tinfo_types): Adjust.
7319 2002-08-31  Jason Merrill  <jason@redhat.com>
7321         * cp-lang.c (cp_expr_size): Allow initialization from a
7322         CONSTRUCTOR.
7324 2002-08-30  Richard Henderson  <rth@redhat.com>
7326         PR opt/7515
7327         * tree.c: Include target.h.
7328         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
7329         don't bind locally.
7330         * Makefile.in (tree.o): Update.
7332 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
7334         * class.c (layout_virtual_bases): Warn about bugs in G++ that
7335         result in incorrect object layouts.
7336         (layout_class_type): Likewise.
7338 2002-08-24  Matt Austern  <austern@apple.com>
7340         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
7341         are allowable.
7342         (real_lvalue_p): Update caller.
7343         (lvalue_p): Ditto.
7344         (non_cast_lvalue_or_else): New.
7345         * tree.h: Declare it.
7346         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
7348 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
7350         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
7351         and COND_EXPR specially; fix error message output.
7353 2002-08-22  Jason Merrill  <jason@redhat.com>
7355         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
7356         * semantics.c (nullify_returns_r): Likewise.
7358 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7360         Fix PR/7621
7361         * typeck.c (finish_class_member_access_expr): Diagnose cases where
7362         name lookup finds nothing.
7364 2002-08-15  Jason Merrill  <jason@redhat.com>
7366         * semantics.c (finish_then_clause): Remove redundant assignment.
7367         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
7368         extra binding level outside the if/switch statement.
7369         (finish_while_cond, finish_for_cond): Rewrite complex condition
7370         into the loop body.
7372 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
7374         * parse.y (sizeof, alignof, typeof): New non-terminals to
7375         increment skip_evaluation.  Replace terminals with them and
7376         decrement skip_evaluation at the end of rules using them.
7377         * decl2.c (mark_used): Don't assemble_external if
7378         skipping evaluation.
7380 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
7382         Fix PR/7504
7383         * parse.y (parse_finish_call_expr): Handle incomplete
7384         type used to name a scope.
7386 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
7388         PR c++/7598
7389         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
7390         regression caused by my 2002-08-08 patch.
7392 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
7394         * decl.c (pushdecl_class_level): Honor requests to bind names to
7395         OVERLOADs.
7397 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7399         * decl2.c (build_call_from_tree): Fix uninitialized variable.
7400         * parse.y (parse_finish_call_expr): Likewise.
7401         * repo.c (old_args, old_dir, old_main): Const-ify.
7403 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
7405         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
7406         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
7407         * optimize.c (maybe_clone_body): Likewise.
7408         * pt.c (tsubst_enum): Likewise.
7409         (lookup_template_class): Likewise.
7410         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
7412 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
7414         * lang-specs.h: Remove -ansi.
7416 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
7418         * tree.c (maybe_dummy_object): Replace // with /* */
7420 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
7422         * call.c (standard_conversion): Use build_ptrmem_type.
7423         * cp-tree.h (build_ptrmem_type): New function.
7424         (adjust_result_of_qualified_name_lookup): Likewise.
7425         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
7426         static data members.
7427         (build_ptrmem_type): New function.
7428         (grokdeclarator): Do not use build_offset_type when encountering a
7429         qualified name.
7430         * parse.y (parse_finish_call_expr): Use
7431         adjust_result_of_qualified_name_lookup.
7432         * search.c (adjust_result_of_qualified_name_lookup): New function.
7433         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
7434         accessing OFFSET_TYPEs directly.
7436 2002-08-08  Mike Stump  <mrs@apple.com>
7438         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
7439         (type_decays_to): Likewise.
7440         * class.c (find_final_overrider): Likewise.
7441         (maybe_note_name_used_in_class): Likewise.
7442         * decl.c (current_tmpl_spec_kind): Likewise.
7443         (add_binding): Likewise.
7444         (push_class_binding): Likewise.
7445         (duplicate_decls): Likewise.
7446         (layout_var_decl): Likewise.
7447         (grokfndecl): Likewise.
7448         (grokdeclarator): Likewise.
7449         (check_default_argument): Likewise.
7450         * decl2.c (handle_class_head): Likewise.
7451         * error.c (dump_template_decl): Likewise.
7452         * init.c (build_offset_ref): Likewise.
7453         * pt.c (check_specialization_scope): Likewise.
7454         (determine_specialization): Likewise.
7455         (check_explicit_specialization): Likewise.
7456         (maybe_check_template_type): Likewise.
7457         (process_partial_specialization): Likewise.
7458         (check_default_tmpl_args): Likewise.
7459         (push_template_decl_real): Likewise.
7460         (convert_template_argument): Likewise.
7461         (try_class_unification): Likewise.
7462         (get_bindings_real): Likewise.
7463         (do_decl_instantiation): Likewise.
7464         * semantics.c (begin_function_definition): Likewise.
7465         (finish_member_declaration): Likewise.
7466         (check_multiple_declarators): Likewise.
7467         * typeck.c (comp_array_types): Likewise.
7468         (comptypes): Likewise.
7469         (expr_sizeof): Likewise.
7470         (build_binary_op): Likewise.
7471         (dubious_conversion_warnings): Likewise.
7472         (check_return_expr): Likewise.
7474 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
7476         * typeck.c (build_class_member_access_expr): Do not return
7477         error_mark_node when no error has occurred.
7479 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7481         * typeck.c (build_component_addr): Remove.
7482         (build_unary_op): Just check it's not a bitfield, and then build
7483         an ADDR_EXPR.
7485 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7487         * class.c (convert_to_base): Correct check for error_mark_node.
7488         (create_vtable_ptr): Remove unused VFUNS_P parm.
7490 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7492         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
7494 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
7496         Rework build_component_ref.
7497         * call.c (build_vfield_ref): Do not go through build_component_ref.
7498         (build_field_call): Use build_class_member_access_expr.
7499         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
7500         (build_object_call): Likewise.
7501         * class.c (convert_to_base): New function.
7502         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
7503         (instantiate_type): Handle BASELINKs.
7504         * cp-tree.def (BASELINK): New tree code.
7505         * cp-tree.h (BASELINK_P): Reimplement.
7506         (SET_BASELINK_P): Remove.
7507         (BASELINK_BINFO): Reimplement.
7508         (BASELINK_FUNCTIONS): Likewise.
7509         (BASELINK_ACCESS_BINFO): Likewise.
7510         (BASELINK_OPTYPE): Likewise.
7511         (convert_to_base): New function.
7512         (name_p): Likewise.
7513         (build_object_ref): Remove.
7514         (build_component_ref_1): Likewise.
7515         (build_component_ref): Likewise.
7516         (build_x_component_ref): Likewise.
7517         (build_class_member_access_expr): New function.
7518         (finish_class_member_access_expr): Likewise.
7519         (build_ptrmemfunc_access_expr): Likewise.
7520         * decl.c (grokdeclarator): Handle BASELINKs.
7521         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
7522         finish_class_member_access_expr.
7523         (arg_assoc): Handle BASELINKs.
7524         (do_class_using_decl): Likewise.
7525         * error.c (dump_decl): Likewise.
7526         (dump_expr): Use build_ptrmemfunc_access_expr.
7527         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
7528         destructors.
7529         (build_throw): Use BASELINK_FUNCTIONS.
7530         * init.c (perform_member_init): Use
7531         build_class_member_access_expr.
7532         (build_offset_ref): Handle BASELINKs.  Use
7533         build_class_member_access_expr.
7534         * method.c (hack_identifier): Likewise.
7535         * parse.y (do_id): Use BASELINK, not TREE_LIST.
7536         (primary): Remove uses of build_object_ref.
7537         * pt.c (lookup_template_function): Handle BASELINKs.
7538         (resolve_overloaded_unification): Likewise.
7539         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
7540         (lookup_field): Use BASELINK, not TREE_LIST.
7541         (lookup_fnfiels): Likewise.
7542         (setup_class_bindings): Likewise.
7543         * semantics.c (finish_object_call_expr): Do not use
7544         build_method_call when we already know what function is being
7545         called.
7546         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
7547         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
7548         TREE_CHAIN.
7549         (name_p): New function.
7550         * typeck.c (build_object_ref): Remove.
7551         (build_component_ref_1): Likewise.
7552         (build_x_component_ref): Likewise.
7553         (build_class_member_access_expr): New function.
7554         (finish_class_member_access_expr): Likewise.
7555         (build_ptrmemfunc_access_expr): Likewise.
7556         (get_member_function_from_ptrfunc): Use
7557         build_ptrmemfunc_access_expr.
7558         (build_binary_op): Likewise.
7559         (build_unary_op): Likewise.
7560         (build_ptrmemfunc): Likewise.
7561         (pfn_from_ptrmemfunc): Likewise.
7562         * typeck2.c (build_m_component_ref): Adjust comment.
7564 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
7566         * Make-lang.in (CXX_C_OBJS): Update.
7567         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
7568         * cp-tree.h (cxx_decode_option): Remove.
7569         * decl2.c (compare_options, lang_f_options, unsupported_options,
7570         cxx_decode_option): Remove.
7572 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
7574         * typeck.c (build_x_unary_op): Handle pointer-to-member.
7576 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
7578         * class.c: Don't include obstack.h.
7579         (popclass):
7580         * decl2.c: Delete bogus comment.
7581         * error.c: Don't include obstack.h.
7582         * except.c: Likewise.
7583         (dump_type): Correct comment.
7584         * method.c: Don't include obstack.h.
7585         * tree.c: Likewise.
7587 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
7589         Fix PR/2213
7590         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
7591         expressions to pointer-to-data-member of pointer-to-member-functions.
7593 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
7595         * cvt.c (ocp_convert): Delete obsolete code.
7596         * parse.y (permanent_obstack): Delete declaration.
7597         * pt.c (permanent_obstack): Delete declaration.
7598         * repo.c (permanent_obstack): Delete declaration.
7599         (open_repo_file): Use xmalloc instead of permanent_obstack.
7600         (init_repo): Use xstrdup instead of permanent_obstack.
7602 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
7604         * cp-tree.h (VF_DERIVED_VALUE): Remove.
7605         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
7607 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
7609         PR 7470.
7610         C++ ABI change - vfunc ordering.
7611         * class.c (add_virtual_function): Remove.
7612         (dfs_modify_all_vtables): Take list of all declared
7613         virtuals. Assign all that are not in primary base.
7614         (check_for_override): Adjust comments.
7615         (create_vtable_ptr): Take single list of virtuals. Build chain
7616         of declared virtuals here.
7617         (layout_class_type): Take single list of virtuals. Adjust.
7618         (finish_struct_1): Keep virtuals on single list. Adjust.
7620 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
7622         * init.c (build_member_call): Use build_new_method_call, not
7623         build_method_call.
7625 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
7627         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
7629 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
7631         * call.c (build_method_call): Issue a more helpful error message
7632         about ambiguous method names.
7634 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
7636         * tree.c (build_shared_int_cst): Make cache file scope, and
7637         GTY it.
7639 2002-08-02  Jason Merrill  <jason@redhat.com>
7641         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
7642         (cp_expr_size): New fn.
7643         * call.c (build_over_call): Lose empty class hackery.
7644         (convert_arg_to_ellipsis): Promote non-POD warning to error.
7645         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
7647         * semantics.c (expand_body): Do tree optimization in the function
7648         context, too.
7650 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
7652         * cp-tree.h: Move all warning and flag declarations to c-common.h.
7653         * decl.c: Move all warning and flag variables to c-common.c.
7654         * decl2.c: Move all warning and flag variables to c-common.c.
7655         * lex.c (flag_digraphs): Remove.
7656         (warn_traditional): Now in c-common.c.
7658 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
7660         * call.c (build_field_call): Do not look up the field by name.
7661         (build_method_call): Simplify.
7662         (struct z_candidate): Add access_path and conversion_path.  Remove
7663         basetype_path.
7664         (convert_class_to_reference): Adjust use of
7665         add_function_candidate.
7666         (add_candidate): Add conversion_path argument.
7667         (add_function_candidate): Use it.
7668         (add_conv_dndidate): Likewise.
7669         (build_builtin_candidate): Likewise.
7670         (add_template_candidate_real): Add conversion_path argument.
7671         (add_template_conv_candidate): Likewise.
7672         (add_template_candidate): Likewise.
7673         (build_user_type_conversion_1): Use it.
7674         (build_new_function_call): Remove name lookup code.  Adjust use of
7675         add_template_candidate and add_function_candidate.
7676         (build_new_op): Likewise.
7677         (convert_like_real): Use build_special_member_call.
7678         (build_over_call): Use cand->conversion_path.
7679         (build_special_member_call): New method.
7680         (build_new_method_call): Remove name lookup code.
7681         * cp-tree.def (OFFSET_REF): Update documentation.
7682         (TEMPLATE_ID_EXPR): Likewise.
7683         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
7684         (BASELINK_OPTYPE): Likewise.
7685         (build_new_method_call): Adjust prototype.
7686         (build_special_member_call): New method.
7687         (build_baselink): New method.
7688         (build_offset_ref_call_from_tree): Likewise.
7689         (build_call_from_tree): Likewise.
7690         (finish_qualified_call_expr): Remove.
7691         (finish_call_expr): Adjust prototype.
7692         (build_x_function_call): Remove.
7693         * cvt.c (ocp_convert): Use build_special_member_call.
7694         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
7695         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
7696         CALL_EXPR.
7697         (build_offset_ref_call_from_tree): New function.
7698         (build_call_from_tree): Likewise.
7699         * init.c (expand_cleanup): Use build_special_member_call.
7700         (expand_default_init): Likewise.
7701         (build_member_call): Use finish_call_expr.
7702         (build_new_1): Use build_special_member_call.
7703         (push_base_cleanups): Likewise.
7704         * method.c (do_build_assign_ref): Likewise.
7705         * parse.y (template_id): Do not pass a COMPONENT_REF to
7706         lookup_template_function.
7707         (primary): Use parse_finish_call_epxr, not finish_call_expr.
7708         (parse_finish_call_expr): New function.
7709         * pt.c (lookup_template_function): Add assertions.
7710         * search.c (lookup_base): Allow T to be a binfo.
7711         (build_baselink): New function.
7712         (lookup_member): Use it.
7713         * semantics.c (finish_call_expr): Do not do name lookup.
7714         (finish_object_call_expr): Remove #if 0'd code.
7715         (finish_qualified_call_expr): Remove.
7716         * typeck.c (build_x_function_call): Remove.
7717         (build_static_case): Use build_special_member_call.
7718         * typeck2.c (build_functional_cast): Likewise.
7720 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
7722         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
7724 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
7726         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
7728 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
7730         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
7731         documentation.
7733 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
7735         * cp-tree.h: Comment typo fix.
7737 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
7739         * spew.c (space_for_token): Allocate zeroed memory for a new token
7740         chunk.
7742 2002-07-27  Roger Sayle  <roger@eyesopen.com>
7744         * decl.c (builtin_function_1): No need to explicitly mark
7745         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
7747 2002-07-27  Roger Sayle  <roger@eyesopen.com>
7749         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
7751 2002-07-26  Jason Merrill  <jason@redhat.com>
7753         * call.c (build_over_call): Likewise.
7754         (cp_convert_parm_for_inlining): New fn.
7755         (convert_for_arg_passing): New fn.
7756         (convert_default_arg, build_over_call): Use it.
7757         (type_passed_as): New fn.
7758         * pt.c (tsubst_decl): Use it.
7759         * decl2.c (cp_build_parm_decl): New fn.
7760         (build_artificial_parm): Use it.
7761         (start_static_storage_duration_function): Likewise.
7762         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
7763         (grokparms): Don't mess with DECL_ARG_TYPE.
7764         * typeck.c (convert_arguments): Use convert_for_arg_passing.
7765         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7766         Define.
7767         * cp-tree.h: Declare new fns.
7769 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
7771         * cp-tree.h (flag_operator_names): Remove.
7772         * decl2.c (flag_operator_names): Remove.
7773         (lang_f_options): Remove operator-names.
7774         * lex.c (D_OPNAME): Remove.
7775         (reswords): Remove operator names.
7776         (rid_to_yy): Remove operator names.
7777         (init_reswords): No need to handle D_OPNAME.
7778         * spew.c (read_process_identifier): There are no operator
7779         names.
7781 2002-07-26  Jason Merrill  <jason@redhat.com>
7783         * dump.c (cp_dump_tree): Call c_dump_tree.
7784         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
7786 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
7788         * error.c (print_whitespace): Remove.
7789         * g++spec.c (LIBUNWIND): Move.
7790         * mangle.c (mangled_position, write_signed_number): Remove.
7792 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
7794         * decl2.c (cxx_decode_option): Similarly.
7796 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
7798         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
7799         (cxx_sizeof_or_alignof_type): Take a third argument.
7800         (cxx_sizeof): Adjust definition.
7801         (cxx_alignof): Likewise.
7802         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
7803         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
7804         complaining.
7805         (c_sizeof_nowarn): Remove definition.
7806         (build_unary_op): Use cxx_sizeof_nowarn.
7808 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
7810         * tree.c (cp_build_qualified_type_real): When copying
7811         pointer-to-method types, unshare the record that holds
7812         the cached pointer-to-member-function type.
7814 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
7816         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
7818 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
7820         Fix PR/7363:
7821         * typeck.c (cxx_sizeof_or_alignof_type): New function.
7822         (c_sizeof): Remove definition.
7823         (expr_sizeof): Use cxx_sizeof.
7824         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
7825         * decl.c (finish_destructor_body): Use cxx_sizeof.
7826         * semantics.c (finish_alignof): Likewise.
7827         (finish_alignof): Use cxx_alignof.
7828         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
7829         (cxx_sizeof_or_alignof_type): Declare.
7830         (my_friendly_assert): Move to ../c-common.h.
7832 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
7834         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
7836 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7838         PR c++/7347, c++/7348
7839         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
7840         * decl.c (make_typename_type): Use it.
7841         (make_unbound_class_template): Likewise.
7842         (lookup_name_real): Don't call type_access_control if scope is
7843         template parameter dependent.
7844         * parse.y (template_arg): Call make_unbound_class_template with
7845         tf_parsing set.
7846         (nest_name_specifier): Call make_typename_type with tf_parsing set.
7847         (typename_sub0): Likewise.
7848         (typename_sub1): Likewise.
7849         (instantiate_decl): Push class scope.
7850         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
7851         for both static variable and member function template.
7852         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
7853         and arguments.
7854         * search.c (type_access_control): Do type access for TEMPLATE_DECL
7855         too.
7857 2002-07-20  Roger Sayle  <roger@eyesopen.com>
7859         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
7860         test by using positive_option.  Make whitespace consistent.
7862 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
7864         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
7865         members with 'locus'.  Adjust use throughout.
7866         (struct feed):  Likewise.
7867         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
7868         Adjust use.
7869         (snarf_defarg): Use error(), not error_with_file_and_line().
7871 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
7873         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
7874         cpp_options is included.
7876 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7878         PR c++/2862, c++/2863
7879         * pt.c (determine_specialization): Compare the length of
7880         TYPE_ARG_TYPES.  Tidy.
7882 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7884         PR c++/3797
7885         * decl.c (duplicate_decls): Don't propagate inlining parameters from
7886         olddecl to newdecl when newdecl is a specialization of the
7887         instantiation olddecl.
7889 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7891         PR c++/4802, c++/5387
7892         * decl.c (make_typename_type): Use enforce_access.
7894 2002-07-17  Scott Snyder <snyder@fnal.gov>
7896         PR c++/7320
7897         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
7899 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
7901         * class.c (add_method): Correct handling of conversion operators.
7903 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
7905         PR c++/7224
7906         * class.c (add_method): Simplify.
7908 2002-07-11  Jason Merrill  <jason@redhat.com>
7910         PR c++/7279
7911         * tree.c (cp_copy_res_decl_for_inlining): Also copy
7912         TREE_ADDRESSABLE.
7914 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
7916         * pt.c (template_parm_this_level_p, push_template_decl_real):
7917         Pass depth as int pointer.
7919 2002-07-11  Tim Josling  <tej@melbpc.org.au>
7921         Remove front end hard coding from gengtype.c.
7923         * config-lang.in (gtfiles): Add files needed for this front end.
7925 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
7927         * cp-tree.h (unqualified_name_lookup_error): Declare it.
7928         (begin_function_definition): Adjust prototype.
7929         * lex.c (unqualified_name_lookup_error): New function, split out
7930         from ...
7931         (do_identifier): ... here.
7932         * parse.y (parse_begin_function_definition): New function.
7933         (fn.def1): Use it.
7934         * semantics.c (begin_function_definition): Accept decl-specifiers
7935         and attributes as separate parameters.
7937 2002-07-10  Jason Merrill  <jason@redhat.com>
7939         PR c++/6255
7940         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
7941         modifying the old one.
7943 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
7945         * cp-tree.h (constructor_name_p): Declare it.
7946         (check_template_template_default_arg): Likewise.
7947         * class.c (handle_using_decl): Use constructor_name_p.
7948         * decl.c (grokdeclarator): Likewise.
7949         * decl2.c (constructor_name_p): Define it.
7950         * init.c (build_member_call): Use constructor_name_p.
7951         * parse.y (template_parm): Use check_template_template_default_arg.
7952         * pt.c (check_explicit_specialization): Use constructor_name_p.
7953         * semantics.c (check_template_template_default_arg): New function.
7955 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7957         * pt.c (can_complete_type_without_circularity): Add static to
7958         function definition.
7960 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
7962         * cp-tree.h (have_extern_spec): Declare it
7963         * decl.c (have_extern_spec): Define it.
7964         (start_decl): Eliminate use of used_extern_spec.
7965         (start_function): Likewise.
7966         * parse.y (have_extern_spec): Remove declaration.
7967         (used_extern_spec): Likewise.
7968         (frob_specs): Eliminate use of used_extern_spec.
7969         (.hush_warning): Likewise.
7971 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
7973         * Make-lang.in (cp/parse.o): Depend on decl.h.
7974         * cp-tree.h (do_decl_instantiation): Change prototype.
7975         * parse.y: Include decl.h.
7976         (parse_decl_instantiation): New function.
7977         (explicit_instantiation): Use it.
7978         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
7979         and DECLSPECS.
7981 2002-07-07  Roger Sayle  <roger@eyesopen.com>
7983         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
7984         constructor and destructor tests when passed a TEMPLATE_DECL.
7986 2002-07-05  Jason Merrill  <jason@redhat.com>
7988         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
7989         pointers.
7991         PR optimization/7145
7992         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
7994 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
7996         Repair damage on weak-impared targets caused by my previous patch.
7997         * cp-tree.h (import_export_tinfo): Add parameter.
7998         * decl2.c (import_export_tinfo): Add parameter, post adjust
7999         DECL_COMDAT.
8000         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8001         import_export_tinfo.
8003 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8005         PR c++/6944
8006         * init.c (build_aggr_init): Remove qualifiers of init before calling
8007         build_vec_init.
8008         (build_vec_init): Flatten multi-dimensional array during cleanup.
8009         (build_vec_delete_1): Abort if the type of each element is array.
8011 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
8013         * pt.c (instantiate_class_template): Fix typo.
8015 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8017         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8018         by CVS conflict in my last patch.
8020 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8022         PR c++/6716
8023         * pt.c (can_complete_type_without_circularity): New function.
8024         (instantiate_class_template): Use it.
8025         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8026         message due to incomplete fields.
8028 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
8030         PR c++/7112
8031         * mangle.c (write_expression): Add mangling for sizeof when
8032         applied to a type.
8033         * operators.def: Remove stale comment.
8035 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
8037         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8038         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8039         (tinfo_decl_type): Replace with ...
8040         (type_info_ptr_type): ... this.
8041         (import_export_tinfo): Declare.
8042         (tinfo_decl_p): Rename to ...
8043         (unemitted_tinfo_decl_p): ... this.
8044         * decl2.c (import_export_decl): Break out tinfo handling into ...
8045         (import_export_tinfo): ... here. New function.
8046         (finish_file): Adjust.
8047         * rtti.c (TINFO_REAL_NAME): New macro.
8048         (init_rtti_processing): Create the tinfo types.
8049         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8050         (get_tinfo_decl): Adjust.
8051         (get_tinfo_ptr): New function.
8052         (get_type_id): Use it.
8053         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8054         (ptr_initializer): Use get_tinfo_ptr.
8055         (ptm_initializer): Likewise.
8056         (synthesize_tinfo_var): Break into ...
8057         (get_pseudo_ti_init): ... this. Just create the initializer.
8058         (get_pseudo_ti_desc): .. and this.
8059         (create_real_tinfo_var): Remove.
8060         (create_pseudo_type_info): Don't create the vtable decl here.
8061         (get_vmi_pseudo_type_info): Remove.
8062         (create_tinfo_types): Adjust.
8063         (tinfo_decl_p): Rename to ...
8064         (unemitted_tinfo_decl_p): ... here. Adjust.
8065         (emit_tinfo_decl): Adjust. Create the initializer.
8067 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
8069         PR c++/6695
8070         * pt.c (tsubst_friend_class): Substitute into the context of the
8071         friend before using it.
8073 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
8075         * cp-tree.h (xref_tag): Change prototype.
8076         (handle_class_head): Likewise.
8077         (build_x_component_ref): Likewise.
8078         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
8079         (xref_tag): Take attributes as a separate parameter.
8080         (xref_tag_from_type): Adjust call to xref_tag.
8081         * decl2.c (build_expr_from_tree): Adjust call to
8082         build_x_component_ref.
8083         (handle_class_head): Take attributes as a separate parameter.
8084         * parse.y (parse_xref_tag): New function.
8085         (parse_handle_class_head): Likewise.
8086         (primary): Use parse_xref_tag.
8087         (class_head_decl): Use parse_handle_class_head.
8088         (class_head_defn): Likewise.
8089         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
8090         (build_dynamic_cast_1): Likewise.
8091         (create_pseudo_type_info): Likewise.
8092         (emit_support_tinfos): Likewise.
8093         * typeck.c (build_object_ref): Adjust call to
8094         build_x_component_ref.
8095         (build_x_component_ref): Remove protect parameter.
8097 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
8099         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
8100         * class.c (handle_using_decl): Likewise.
8101         (instantiate_type): Likewise.
8102         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
8103         (xref_basetypes): Change prototype.
8104         (begin_mem_initializers): New function.
8105         (get_overloaded_fn): Likewise.
8106         * decl.c (xref_basetypes): Simplify.
8107         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
8108         * init.c (build_offset_ref): Likewise.
8109         * parse.y (base_init): Use begin_mem_initializers().
8110         (structsp): Adjust call to xref_basetypes.
8111         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
8112         (instantiate_class_template): Adjust call to xref_basetypes.
8113         * semantics.c (begin_mem_initializers): New function.
8114         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
8115         (really_overlaoded_fn): Likewise.
8116         (get_overloaded_fn): New function.'
8117         (get_first_fn): USe BASELINK_FUNCTIONS.
8119 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
8121         * cp-tree.h (SCALAR_TYPE_P): New macro.
8122         (check_for_out_of_scope_variable): New function.
8123         (at_class_scope_p): Likewise.
8124         (finish_fname): Likewise.
8125         * class.c (finish_struct): Use at_function_scope_p.
8126         * decl.c (check_for_out_of_scope_variable): New function, split
8127         out from do_identifier.
8128         (finish_enum): Use at_function_scope_p.
8129         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
8130         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
8131         (primary): Use at_function_scope_p.
8132         * search.c (at_class_scope_p): New function.
8133         * semantics.c (finish_fname): Likewise.
8134         (check_multiple_declarators): Use at_function_scope_p.
8136 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
8138         * parse.y (parse_scoped_id): New function.
8139         (primary): Use it.
8140         * cp-tree.h (do_scoped_id): Adjust declaration.
8141         * lex.c (do_scoped_id): Remove call to yylex.
8142         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
8143         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
8144         expanding it inline.
8146 2002-06-23  Matt Thomas  <matt@3am-software.com>
8148         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
8149         "#if VMS_TARGET".
8151 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8153         * mangle.c (integer_type_codes): Const-ify.
8155 2002-06-20  Richard Henderson  <rth@redhat.com>
8157         PR c++/6747
8158         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
8159         Call put_var_into_stack.
8161 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8163         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
8164         array size calculation.
8166 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8168         PR c++/6892
8169         * pt.c (tsubst_expr): Handle FILE_STMT.
8171 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8173         PR c++/6723
8174         * pt.c (lookup_template_class): Don't build complete argument of
8175         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
8176         argument.
8178 2002-06-19  Akim Demaille  <akim@epita.fr>
8180         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
8181         decl.h's TYPENAME.
8182         * spew.c, lex.c: Adjust.
8183         * parse.y (explicit_instantiation): Add empty action to override
8184         the default $$ = $1 where it introduces a type clash.
8186 2002-06-14  Jason Merrill  <jason@redhat.com>
8188         * semantics.c (begin_for_stmt): Push the 'for' scope before
8189         adding the FOR_STMT.
8191         C++ ABI changes.
8192         * class.c (build_base_field): Set DECL_PACKED.
8193         (layout_class_type): Don't use tail padding of PODs.
8194         * mangle.c (write_unqualified_name): Fix template conversion op
8195         mangling.
8197 2002-06-16  Richard Henderson  <rth@redhat.com>
8199         PR opt/6793
8200         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
8201         after template instantiation.
8203 2002-06-16  Richard Henderson  <rth@redhat.com>
8205         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
8207 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
8209         * cp-tree.h (compiler_error): Remove declaration.
8210         * lex.c (compiler_error): Remove definition.
8212 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
8214         * g++spec.c (LIBUNWIND): New.
8215         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
8217 2002-06-13  Jessica Han  <jessica@cup.hp.com>
8219         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
8220         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
8221         (build_vbase_offset_vtbl_entries): Likewise.
8222         * rtti.c (build_headof): Likewise.
8223         (get_tinfo_decl_dynamic): Likewise.
8224         (create_pseudo_type_info): Likewise.
8226 2002-06-12  Stan Shebs  <shebs@apple.com>
8228         * mpw-config.in: Remove file, no longer used.
8229         * mpw-make.sed: Ditto.
8231 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
8233         * decl2.c: Update call to cpp_handle_option.
8235 2002-06-07  H.J. Lu  (hjl@gnu.org)
8237         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
8239 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
8241         * error.c (cp_error_at): Fix typo.
8243 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
8245         * error.c (cp_diagnostic_starter): Adjust call.
8246         (maybe_print_instantiation_context): Change prototype to take a
8247         'diagnostic_info *'.
8248         (print_instantiation_full_context): Likewise.
8249         (print_instantiation_partial_context): Likewise.
8250         (cp_diagnostic_starter): Likewise.
8251         (cp_diagnostic_finalizer): Likewise.
8252         (cp_print_error_function): Likewise.
8253         (cp_printer): Take a secondary parameter as a 'text_info *'.
8254         Remove output_state savings.  Adjust calls.
8256 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
8258         * pt.c (inline_parm_levels): Mark for GC.
8260         * mangle.c (start_mangling): Allocate G.substitutions here...
8261         (init_mangle): ... rather than here.
8262         (finish_mangling): Clear the varray pointer when done with it.
8263         * spew.c (yylexstring): Don't use VARRAY_FREE.
8264         * search.c (bfs_walk): Don't use VARRAY_FREE.
8265         * decl2.c (pending_statics): Use gengtype to mark.
8266         (deferred_fns): Likewise.
8267         (ssdf_decls): Likewise.
8268         (init_decl2): Delete.
8269         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
8270         (cxx_init_decl_processing): Don't call init_decl2.
8271         (cxx_pop_function_context): Don't use VARRAY_FREE.
8272         * cp-tree.h (struct saved_scope): No need for special marking
8273         of varrays.
8274         (struct language_function): Likewise.
8275         (local_classes): Use gengtype to mark.
8276         (init_decl2): Delete prototype.
8277         * class.c (init_class_processing): Don't use
8278         ggc_add_tree_varray_root.
8279         (build_vtbl_initializer): Don't use VARRAY_FREE.
8281         * decl.c (typename_compare): Don't use same_type_p.
8283         * decl.c: Include hashtab.h instead of hash.h.
8284         (typename_hash): Update to use htab_h.
8285         (typename_compare): Likewise.
8286         (typename_htab): Use gengtype to mark.
8287         (build_typename_type): Update to use htab_h.
8288         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
8290         * Make-lang.in (gt-cp-tree.h): New rule.
8291         (cp/tree.o): Depend on gt-cp-tree.h.
8292         * config-lang.in (gtfiles): Add cp/tree.c.
8293         * tree.c: Include gt-cp-tree.h.
8294         (list_hash_table): Use gengtype to mark.
8295         (init_tree): Use gengtype to mark trees.
8297         * Make-lang.in (cp/decl.o): Add debug.h dependency.
8298         * call.c (struct z_candidate): Use gengtype.
8299         (USER_CONV_CAND): Use WRAPPER_ZC.
8300         (convert_class_to_reference): Use build_zc_wrapper.
8301         (build_type_conversion_1): Likewise.
8302         (build_over_call): Use WRAPPER_ZC.
8303         (add_warning): Use build_zc_wrapper.
8304         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
8305         * cp-tree.h (struct lang_identifier): Use gengtype.
8306         (struct template_parm_index_s): Likewise.
8307         (struct ptrmem_cst): Likewise.
8308         (struct tree_binding): Likewise.
8309         (struct tree_overload): Likewise.
8310         (struct tree_srcloc): Likewise.
8311         (struct tree_wrapper): Likewise.  Also modify to have a pointer
8312         to struct z_candidate rather than void.
8313         (enum cp_tree_node_structure_enum): New.
8314         (union lang_tree_node): New.
8315         (cxx_mark_tree): Delete prototype.
8316         (cp_tree_node_structure): New prototype.
8317         (build_ptr_wrapper): Delete prototype.
8318         (build_int_wrapper): Delete prototype.
8319         (build_zc_wrapper): New prototype.
8320         * decl.c: Include debug.h
8321         (cxx_mark_tree): Delete.
8322         (cp_tree_node_structure): New.
8323         * tree.c (build_ptr_wrapper): Delete.
8324         (build_int_wrapper): Delete.
8325         (build_zc_wrapper): New.
8327         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
8328         Correct typo.  Patch from k_fukui@highway.ne.jp.
8330         * semantics.c (current_stmt_tree): Update for change to
8331         struct language_function.
8332         (finish_mem_initializers): Likewise.
8333         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
8334         * cp-tree.h (struct language_function): Rename from
8335         cp_language_function.  Change all uses.
8336         (cp_function_chain): Don't need to cast.
8338         * class.c (duplicate_tag_error): Reset discriminator.
8339         (check_bases_and_members): Update for data structure changes.
8340         * cp-tree.h (struct lang_id2): Use gengtype.
8341         (flagged_type_tree): Likewise.
8342         (SET_LANG_ID): Use GGC on struct lang_id2.
8343         (struct cp_language_function): Use gengtype.  Remove field
8344         'x_vcalls_possible_p'.
8345         (current_vcalls_possible_p): Delete.
8346         (struct lang_type_header): New.
8347         (struct lang_type_class): Rename from struct lang_type.  Include
8348         struct lang_type_header.
8349         (struct lang_type_ptrmem): New.
8350         (struct lang_type): New.
8351         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
8352         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
8353         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
8354         (struct lang_decl_flags): Use gengtype.  Add discriminators.
8355         (struct lang_decl): Use gengtype.  Add and use discriminators.
8356         Update the macros that reference moved fields.
8357         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
8358         (SET_DECL_THUNK_P): Set discriminator too.
8359         (clear_inline_text_obstack): Delete prototype.
8360         (finish_inline_definitions): Delete prototype.
8361         (mark_pending_inlines): Delete prototype.
8362         (lang_check_failed): New prototype.
8363         * decl.c (struct named_label_use_list): Use gengtype.
8364         (struct named_label_list): Likewise.
8365         (mark_binding_level): Delete.
8366         (mark_named_label_lists): Delete.
8367         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
8368         (cxx_init_decl_processing): Use generated marker routine.
8369         (begin_destructor_body): Delete dead set to
8370         current_vcalls_possible_p.
8371         (mark_lang_function): Delete.
8372         (mark_cp_function_context): Delete.
8373         (lang_mark_tree): Use generated marker routines.
8374         * decl2.c (start_objects): Set discriminator when setting
8375         GLOBAL_INIT_PRIORITY.
8376         * lex.c (retrofit_lang_decl): Set discriminators.
8377         (copy_lang_type): Update for changes to lang_type structure.
8378         (cp_make_lang_type): Set discriminator.
8379         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
8380         * search.c: Include ggc.h.
8381         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
8382         (finish_inline_definitions): Delete.
8383         * spew.c (struct token): Use gengtype.
8384         (struct token_chunk): New.
8385         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
8386         (struct feed): Use gengtype.
8387         (feed_obstack): Delete.
8388         (feed): Mark as GC root.
8389         (pending_inlines): Mark as GC root.
8390         (pending_inlines_tail): Likewise.
8391         (processing_these_inlines): Likewise.
8392         (token_obstack): Make static.
8393         (first_token): Likewise.
8394         (init_spew): Don't initialize deleted things; use gengtype for roots.
8395         (clear_inline_text_obstack): Delete.
8396         (feed_input): Use GC for struct feed.  Update for changes to
8397         struct unparsed_text.
8398         (mark_pending_inlines): Delete.
8399         (next_token): Rename from add_token.  Change all callers.  Update
8400         for changes to struct unparsed_text.
8401         (space_for_token): New.
8402         (remove_last_token): New.
8403         (alloc_unparsed_text): New.
8404         (snarf_block): Take an unparsed_text.  Update for changes to struct
8405         unparsed_text.
8406         (snarf_method): Update for changes to struct unparsed_text.
8407         (snarf_defarg): Update for changes to struct unparsed_text.
8408         * tree.c (lang_check_failed): New.
8410         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
8411         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
8412         (cp/spew.o): Add dependency on gt-<filename>.h.
8413         (cp/decl2.o): Add dependency on gt-<filename>.h.
8414         (cp/call.o): Add dependency on gt-<filename>.h.
8415         (cp/pt.o): Add dependency on gt-<filename>.h.
8416         (cp/repo.o): Add dependency on gt-<filename>.h.
8417         (cp/parse.o): Add dependency on gt-<filename>.h.
8418         * call.c: Use gengtype for roots.
8419         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
8420         decl2.c parse.y pt.c repo.c spew.c.
8421         * cp-tree.h: Use gengtype for roots.
8422         (struct saved_scope): Use GGC, gengtype.
8423         (cp_parse_init): Delete prototype.
8424         (init_pt): Delete prototype.
8425         * decl.c: Use gengtype for roots.
8426         (mark_saved_scope): Delete.
8427         (cxx_init_decl_processing): Don't call deleted initilisation
8428         routines.
8429         (signed_size_zero_node): Delete, unused.
8430         * decl.h: Use gengtype for roots.
8431         * decl2.c: Use gengtype for roots.
8432         * lex.h: Use gengtype for roots.
8433         * parse.y: Use gengtype for roots.
8434         (cp_parse_init): Delete.
8435         * pt.c: Use gengtype for roots.
8436         (init_pt): Delete.
8437         * repo.c: Use gengtype for roots.
8438         * spew.c: Use gengtype for roots.
8440         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
8441         (cp/decl.o): Add dependency on gtype-cp.h.
8442         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
8443         Include gtype-cp.h.  Allow for filename changes.
8445         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
8446         (cp/decl.o): Add cp/gt-decl.h dependency.
8447         * config-lang.in (gtfiles): New.
8448         * tree.h: Rename struct binding_level to struct cp_binding_level.
8449         * decl.c: Rename struct binding_level to struct cp_binding_level.
8450         Include cp/gt-decl.h.
8451         (struct cp_binding_level): Use gengtype.
8452         (make_binding_level): Use GGC on struct cp_binding_level.
8453         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
8454         (cxx_init_decl_processing): Mark free_binding_level as
8455         deletable.
8457         * decl.c (mark_cp_function_context): Update calling sequence.
8459         * decl.c (start_function): Don't free 'struct
8460         cp_language_function'.
8461         (pop_cp_function_context): Likewise.
8462         (save_function_data): Allocate it using GC.
8463         * semantics.c (genrtl_start_function): Don't free 'struct
8464         cp_language_function'.
8466 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
8468         * lang-specs.h: Use cpp_debug_options.
8470 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
8472         * mangle.c, tree.c: Include real.h.
8473         * Make-lang.in: Update dependency lists.
8475 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8477         * lex.c: Don't include c-lex.h.
8478         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
8480 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
8482         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
8484 2002-05-22  Richard Henderson  <rth@redhat.com>
8486         * decl.c (obscure_complex_init): Check for VAR_DECL
8487         before using DECL_THREAD_LOCAL.
8489 2002-05-22  Richard Henderson  <rth@redhat.com>
8491         * decl.c (check_tag_decl): Handle RID_THREAD.
8492         (obscure_complex_init): Reject run-time init of tls.
8493         (grokvardecl, grokdeclarator): Handle RID_THREAD.
8494         * lex.c (reswords): Add __thread.
8495         (rid_to_yy): Map RID_THREAD to SCSPEC.
8497 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
8499         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
8500         * cp-tree.h (cxx_post_options): Kill.
8501         * cp-lex.c (cxx_post_options): Kill.
8503 2002-05-21  Richard Henderson  <rth@redhat.com>
8505         * lex.c (rid_to_yy): Add RID_THREAD.
8507 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
8509         * init.c (build_vec_init): Test for trivial copy-assignment when
8510         copy-assigning arrays.
8512 2002-05-20  Andreas Jaeger  <aj@suse.de>
8514         * init.c (build_default_init): Remove unused variable.
8516 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
8518         * call.c (any_strictly_viable): New.
8519         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
8521 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8523         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
8525 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8527         PR c++/186, DR 259
8528         * pt.c (do_decl_instantiation): Don't complain explicit
8529         instantiation after explicit specialization.
8530         (do_type_instantiation): Likewise.
8532 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
8534         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
8535         renamed from...
8536         (complete_type_or_else): ... this.  Redefined as macro.
8537         (cxx_incomplete_type_diagnostic): Declare.
8538         (cxx_incomplete_type_error): Define as macro.
8539         * init.c (build_delete): Warn about incomplete types other than
8540         void, and use the built-in operator delete for them.
8541         * typeck.c (complete_type_or_diagnostic): Renamed from
8542         complete_type_or_else.  Added warn_only argument, passed to...
8543         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
8544         warnings or errors depending on new warn_only argument.  Renamed
8545         from...
8546         (cxx_incomplete_type_error): ... this.  New implementation in
8547         terms of cxx_incomplete_type_diagnostic.
8549 2002-05-18  Jason Merrill  <jason@redhat.com>
8551         PR c++/6611
8552         * decl2.c (import_export_decl): If we clear
8553         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
8555 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8557         PR c++/6620
8558         * pt.c (verify_class_unification): Don't check if PARM is template
8559         parameter dependent.  Simplify.
8560         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
8561         parameter dependent expression.
8563 2002-05-14  Jason Merrill  <jason@redhat.com>
8565         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
8566         Do set DECL_COMDAT.
8567         (synthesize_tinfo_var): Take the public decl.
8568         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
8569         (emit_tinfo_decl): Adjust.  Call import_export_decl.
8570         * decl2.c (import_export_decl): Simplify tinfo decl handling.
8572 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
8574         * cp-tree.h (struct lang_type): Added non_zero_init.
8575         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
8576         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
8577         * class.c (check_field_decls): Test non_zero_init.
8578         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
8579         zero-to-NULL conversions.
8580         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
8581         type that needs zero-initialization without zeros.
8582         (check_initializer_decl): Compute zero-initializer for types
8583         that require a non-trivial one.
8584         * init.c (build_forced_zero_init): New function.
8585         (build_default_init): Use it.
8586         * tree.c (zero_init_p): New function.
8587         * typeck2.c (force_store_init_value): New function.
8588         (process_init_constructor): Create non-trivial zero-initializers
8589         for array members and class fields.
8591 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
8593         * lang-specs.h: Remove redundant -lang-c++.
8595 2002-05-13  Jason Merrill  <jason@redhat.com>
8597         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
8598         (fixed_type_or_null): See through reference vars.
8599         (build_base_path): Vtable contents are constant.
8600         * typeck.c (get_member_function_from_ptrfunc): Likewise.
8602 2002-05-12  Jason Merrill  <jason@redhat.com>
8604         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
8605         structs are safe.
8607 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8609         * cp-tree.h (flag_ansi): Remove.
8610         * decl2.c (flag_ansi): Remove.
8611         (cxx_decode_option): Set flag_iso and flag_undef.
8613 2002-05-09  Jason Merrill  <jason@redhat.com>
8615         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
8616         Use subtraction rather than a bitmask to get the index.
8617         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
8619         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
8621 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
8623         * Make-lang.in (decl2.o): Update.
8624         * cp-tree.h (warn_multichar): Remove.
8625         * decl2.c: Include c-common.h.
8626         (warn_multichar): Remove.
8628 2002-05-03  Jason Merrill  <jason@redhat.com>
8630         * tree.c (build_cplus_array_type): Only const and volatile get
8631         special handling.
8633         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
8635 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
8637         ABI change, returning simple classes from functions.
8638         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
8639         TYPE_HAS_TRIVIAL_INIT_REF is false or
8640         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
8642 2002-04-30  Jason Merrill  <jason@redhat.com>
8644         PR debug/6436
8645         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
8646         anonymous class with a typedef if there are attributes.
8648 2002-04-29  Paul Eggert  <eggert@twinsun.com>
8650         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
8652 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
8654         PR c++/6477
8655         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
8656         non-NULL first.
8658 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
8660         PR c++/6492
8661         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
8662         enter that scope before name lookup.
8664         PR c++/6486
8665         * method.c (do_build_copy_constructor): Avoid building
8666         cv-qualified reference types.
8668 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
8670         PR c++/5719
8671         * decl.c (grok_op_properties): Assignment ops don't have to return
8672         by value. operator% should.
8674 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
8676         PR c/6343
8677         * decl.c (duplicate_decls): Call merge_weak.
8679 2002-04-26  Richard Henderson  <rth@redhat.com>
8681         * parse.y (malloced_yyss, malloced_yyvs): New.
8682         (yyoverflow): Re-add.  Set them.
8683         (free_parser_stacks): New.
8685 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
8687         PR c++/6497
8688         * method.c (do_build_assign_ref): Pass a derivation to
8689         build_method_call when calling base class assignment operators.
8691 2002-04-26  Richard Henderson  <rth@redhat.com>
8693         * parse.y (yyoverflow): Revert.
8695 2002-04-26  Richard Henderson  <rth@redhat.com>
8697         PR c/3581
8698         * parse.y (string): Remove.  Update all uses to use STRING
8699         instead, and not call combine_strings.
8700         * rtti.c (tinfo_name): Use fix_string_type.
8701         * semantics.c (finish_asm_stmt): Don't call combine_strings.
8702         * spew.c (yylexstring): New.
8703         (read_token): Use it.
8705 2002-04-25  Richard Henderson  <rth@redhat.com>
8707         PR c/2161
8708         * parse.y (yyoverflow): New.
8710 2002-04-25  Jason Merrill  <jason@redhat.com>
8712         PR c++/5607
8713         * search.c (check_final_overrider): No longer static.
8714         * class.c (update_vtable_entry_for_fn): Call it.
8715         * cp-tree.h: Adjust.
8717 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8719         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8720         * cp-tree.h (cxx_set_yydebug): Die.
8721         * lex.c (YYDEBUG): Get from c-lex.h.
8722         (cxx_set_yydebug): Remove.
8723         * parse.y: Include c-lex.h.
8724         (YYDEBUG): Get from c-lex.h.
8726 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
8728         PR c++/6438.
8729         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
8730         void.
8732 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
8734         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
8735         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
8736         Redefine.
8737         * cp-tree.h (cp_attribute_table): Rename.
8738         * decl.c (lang_attribute_table): Remove declaration.
8739         (cxx_init_decl_processing): Don't set it.
8740         * tree.c (cp_attribute_table): Rename.
8742 2002-04-24  Jason Merrill  <jason@redhat.com>
8744         PR c++/6331
8745         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
8746         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
8747         The pedwarn for array assignment is now unconditional.
8748         * tree.c (build_cplus_array_type_1): Still process simple array types
8749         normally in templates.
8751         PR c++/6395
8752         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
8753         stuff for comdats.
8755 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
8757         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
8758         node with attributes.
8760 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
8762         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
8763         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
8765 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
8767         PR c++/6256:
8768         * pt.c (tsubst_friend_class): Handle templates with explicit
8769         nested names.
8771         PR c++/6331:
8772         * typeck.c (merge_types): Remember the cv-qualification of pointer
8773         types when merging them.
8775 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8777         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
8778         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
8779         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
8780         cxx_mark_function_context): New.
8781         * decl.c (push_cp_function_context, pop_cp_function_context,
8782         mark_cp_function_context): Rename for consistency.
8783         (cxx_init_decl_processing): Don't set old hooks.
8785 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8787         * call.c (convert_type_from_ellipsis): Rename, update.
8788         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
8789         * cp-tree.h (convert_type_from_ellipsis): Rename.
8790         * decl.c (cxx_init_decl_processing): Don't set hook.
8792 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8794         * call.c (build_new_method_call): Update.
8795         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
8796         * cp-tree.h (cxx_incomplete_type_error): New.
8797         * decl.c (grokdeclarator, grokparms): Update.
8798         * decl2.c (check_classfn): Update.
8799         * pt.c (tsubst): Update.
8800         * typeck.c (complete_type_or_else, expr_sizeof,
8801         decay_conversion): Update.
8802         * typeck2.c (incomplete_type_error): Rename.
8803         (add_exception_specifier): Update.
8805 2002-04-18  Jason Merrill  <jason@redhat.com>
8807         PR c++/5658
8808         * search.c (setup_class_bindings): A class template qualifies as a
8809         type binding.
8811 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
8813         PR c++/6316
8814         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
8815         before expanding.
8817 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
8819         * init.c (begin_init_stmts): Remove commented out code.
8820         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
8821         * semantics.c (begin_gobal_stmt_expr): Adjust call to
8822         expand_start_stmt_expr.
8824 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
8826         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
8827         dso_handle itself, to __cxa_atexit.
8829 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8831         * error.c (cxx_print_error_function): Adjust call to macros.
8833 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
8835         * class.c (layout_virtual_bases): Do all dsize computation on trees.
8837 2002-04-14  Jason Merrill  <jason@redhat.com>
8839         * typeck.c (get_member_function_from_ptrfunc): Don't do
8840         gratuitious division and multiplication on
8841         ptrmemfunc_vbit_in_delta targets.
8843 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
8845         PR c++/5373.
8846         * semantics.c (finish_expr_stmt): Remember the type of the
8847         expression before any conversions are performed.
8849 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
8851         PR c++/5189.
8852         * call.c (add_template_candidate_real): Do not treat member
8853         templates as copy constructors.
8855 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
8857         * decl.c (duplicate_decls): Do not copy the RTL for a variable
8858         declaration if the old variable had an incomplete type and the new
8859         variable does not.
8860         (complete_vars): Do not call layout_decl for completed variables.
8862 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
8864         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
8865         with an explicit one.
8866         (follow_tag_typedef): New.
8867         (lookup_tag): Use it to extract the tag of an explicit typedef.
8868         (xref_tag): Likewise.
8870 2002-04-11  Andrew Haley  <aph@redhat.com>
8872         * typeck.c (type_after_usual_arithmetic_conversions):
8873         If two types have the same variant, return immediately.
8874         When two floating-point operands are the same precision:
8875           convert to float if one of the operands is float;
8876           if neither operand is one of the standard types, return the type
8877           of the first operand.
8879 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
8881         PR c++/5507
8882         * decl.c (make_typename_type): Remove implicit typenameness.
8884 2002-04-09  Jason Merrill  <jason@redhat.com>
8886         PR optimization/6189
8887         * semantics.c (genrtl_start_function): Don't free
8888         DECL_SAVED_FUNCTION_DATA for inline functions.
8890         * init.c (build_member_call): For now, don't convert to
8891         intermediate base if it would cause an error.
8893 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
8895         * parse.y (namespace_qualifier, maybe_identifier,
8896         begin_explicit_instantiation, end_explicit_instantiation,
8897         apparent_template_type, .finish_template_type,
8898         do_id, maybe_init, defarg_again, component_decl_1):
8899         Add ending ';', in accordance with POSIX.
8901 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
8903         PR c++/5571
8904         * class.c (layout_class_type): Remember incomplete static
8905         variables.
8906         (finish_struct_1): Call complete_vars, not
8907         hack_incomplete_structures.
8908         * cp-tree.h (hack_incomplete_structures): Rename to ...
8909         (complete_vars): ... this.
8910         (struct saved_scope): Remove incomplete.
8911         (namespace_scope_incomplete): Remove.
8912         * decl.c (struct binding_level): Remove incomplete.
8913         (incomplete_vars): New variable.
8914         (mark_binding_level): Don't mark incomplete.
8915         (print_binding_level): Don't print it.
8916         (mark_saved_scope): Don't mark incomplete.
8917         (pushdecl): Use maybe_register_incopmlete_var.
8918         (cxx_init_decl_processing): Register incomplete_vars for GC.
8919         (start_decl_1): Clarify error message.
8920         (hack_incomplete_vars): Remove.
8921         (maybe_register_incomplete_var): New function.
8922         (complete_vars): Likewise.
8924 2002-04-06  Jason Merrill  <jason@redhat.com>
8926         PR c++/4934
8927         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
8928         set before checking it.
8930         PR c++/525
8931         * init.c (build_member_call): Use build_scoped_ref.
8932         (resolve_offset_ref): Likewise.
8933         * call.c (build_scoped_method_call): Likewise.
8934         * tree.c (maybe_dummy_object): Kludge around current_class_type being
8935         wrong.
8936         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
8937         * cp-tree.h: Adjust.
8939         * init.c (push_base_cleanups): Just use build_scoped_method_call.
8941         PR c++/6179
8942         * method.c (implicitly_declare_fn): Pass unqualified type to
8943         synthesize_exception_spec.
8945 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
8947         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8948         * cvt.c: Update comment.
8949         * init.c (expand_cleanup_for_base): Update.
8950         * semantics.c (finish_parenthesized_expr): Update.
8951         * typeck.c (cp_truthvalue_conversion): Update.
8953 2002-04-04  Jason Merrill  <jason@redhat.com>
8955         * semantics.c (finish_eh_cleanup): New fn.
8956         * cp-tree.h: Add prototype.
8957         * init.c (perform_member_init, expand_cleanup_for_base): Use
8958         finish_eh_cleanup.
8959         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
8960         * cp-tree.h: Remove references.
8961         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
8962         * dump.c (cp_dump_tree): Likewise.
8963         * pt.c (tsubst_expr): Likewise.
8964         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
8965         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
8966         * tree.c (cp_statement_code_p): Likewise.
8968         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
8970         PR c++/5636
8971         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
8972         cleanup for nrv.
8974         PR c++/5104
8975         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
8976         specifiers.
8977         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
8979 2002-04-03  Richard Henderson  <rth@redhat.com>
8981         * cp-lang.c (cxx_warn_unused_global_decl): New.
8982         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
8984 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
8986         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
8987         * tree.c (init_tree): Don't set hook.
8989 2002-04-03  Roger Sayle  <roger@eyesopen.com>
8991         PR c++/5998:
8992         * decl.c (duplicate_decls): Don't mess with assembler names when
8993         redeclaring builtin functions as static.
8995 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8997         * call.c (build_addr_func): Update.
8998         * class.c (resolve_address_of_overloaded_function): Update.
8999         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9000         * cp-tree.h (cxx_mark_addressable): New.
9001         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9002         * decl2.c (build_cleanup): Update.
9003         * except.c (build_throw): Update.
9004         * init.c (resolve_offset_ref): Update.
9005         * pt.c (convert_nontype_argument): Update.
9006         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9007         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9008         unary_complex_lvalue): Update.
9009         (mark_addressable): Rename.
9011 2002-04-01  Roger Sayle  <roger@eyesopen.com>
9013         PR c++/5998:
9014         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
9015         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
9016         but follow the SET_DECL_RTL idiom used elsewhere in the function.
9018 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9020         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9021         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9022         * decl.c (grokdeclarator): Update.
9023         * mangle.c (write_integer_cst): Update.
9024         * typeck.c (build_binary_op): Update.
9026 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9028         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9029         * lex.c (cxx_init): Don't set hook.
9031 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9033         * Make-lang.in (error.o): Update.
9034         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9035         * cp-tree.h (struct diagnostic_context): Predeclare.
9036         (cxx_print_error_function): New.
9037         * error.c: Include langhooks-def.h.
9038         (lang_print_error_function): Rename.  Update.
9039         (init_error): Don't set hook.
9041 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9043         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9044         Redefine.
9045         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9046         * decl.c (finish_enum): Similarly.
9047         * error.c (dump_type): Similarly.
9048         * lex.c (cxx_init): Similarly.
9049         * mangle.c (write_builtin_type): Similarly.
9050         * typeck.c (comptypes): Similarly.
9052 2002-03-28  Roger Sayle  <roger@eyesopen.com>
9054         PR c++/5998:
9055         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9056         in the g++ front-end.
9057         (duplicate_decl): Allow redefinition of anticipated built-ins.
9058         Fix inlining problem by over-writing the old DECL_RTL.
9059         (lookup_namespace_name): Fail to find an identifier in the
9060         specified namespace if its still anticipated.
9061         (builtin_function_1): New function split out from builtin_function
9062         to create a builtin in the current namespace with given context.
9063         (builtin_function): Call builtin_function_1 to define the
9064         appropriate builtins in both the std and global namespaces.
9065         (select_decl): Don't test for anticipated decls here.
9066         (unqualified_namespace_lookup): Instead ignore them whilst
9067         searching through scopes and namespaces.
9068         * decl2.c (do_nonmember_using_decl): If a using declaration
9069         specifies an anticipated built-in function, mark it as no longer
9070         anticipated in that scope.
9071         (ambiguous_decl):  Avoid resolving to an anticipated decl.
9072         * lex.c (do_scoped_id): Fail to find an identifier in the global
9073         namespace if its still anticipated.
9075 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9077         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
9078         * cp-tree.h (cp_make_lang_type): Rename.
9079         * lex.c (cp_make_lang_type): Rename.
9080         (make_aggr_type): Update.
9081         * tree.c (init_tree): Don't set make_lang_type_fn.
9083 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
9085         PR c++/6073
9086         * class.c (finish_struct_1): Update static field's DECL_MODE even
9087         if its type is a variant of t.
9089 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9091         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
9092         * cp-tree.h (cxx_insert_default_attributes): New.
9093         * decl.c (insert_default_attributes): Rename.
9095 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
9097         PR c++/4884
9098         * call.c (build_op_delete_call): Allow for the fact the placement
9099         may be a COMPOUND_EXPR.
9101 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9103         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9104         * cp-tree.h (init_cplus_expand): Remove.
9105         (cxx_expand_expr): New.
9106         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
9107         fix prototype.
9108         (init_cplus_expand): Remove.
9109         * lex.c (cxx_init): Don't call init_cplus_expand.
9111 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
9113         PR c++/4884.
9114         * init.c (build_new_1): Allow for the fact the result of
9115         build_function_call may be a COMPOUND_EXPR.
9117 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
9119         PR c++/5682
9120         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
9121         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9122         (dfs_skip_nonprimary_vbases_markedp): Remove.
9123         * search.c (get_shared_vbase_if_not_primary): Remove.
9124         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9125         (dfs_skip_nonprimary_vbases_markedp): Remove.
9126         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
9127         (dfs_marked_real_bases_queue_p): Likewise.
9129 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
9131         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9132         * cp-tree.h (cxx_mark_tree): New.
9133         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
9135 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9137         * cp-tree.h (cxx_maybe_build_cleanup): New.
9138         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
9139         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
9140         * tree.c (build_target_expr): Update.
9141         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
9143 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
9145         * decl2.c (cxx_decode_option): Handle -E.
9146         * lang-specs.h (default_compilers): Preprocess with cc1plus.
9147         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
9149 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
9151         PR c++/6037
9152         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
9154 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9156         * error.c (dump_type): Be careful about implicit typenames.
9158 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9160         PR C++/3656
9161         * semantics.c (finish_base_specifier): Handle erronous base
9162         classes.
9164 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
9166         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
9167         REAL_IS_NOT_DOUBLE.
9169 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
9171         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
9172         an index into the vtable_entry array regardless of
9173         TARGET_PTRMEMFUNC_VBIT_LOCATION.
9175 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
9177         * tree.c (cp_cannot_inline_tree_fn): Same.
9179 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
9181         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9182         insert_block, getdecls, global_bindings_p): New.
9184 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
9186         PR c++/4361
9187         * mangle.c (struct globals) Add internal_mangling_p member.
9188         (write_template_param): Do internal mangling, if needed.
9189         (mangle_conv_op_name_for_type): Request internal mangling.
9191 2002-03-20  Jason Merrill  <jason@redhat.com>
9193         PR c++/2136
9194         * init.c (build_delete): Check access for a member op delete here.
9195         * decl2.c (delete_sanity): Not here.
9197 2002-03-19  Jason Merrill  <jason@redhat.com>
9199         PR c++/5118
9200         * class.c (get_vfield_name): Use the constructor_name.
9202 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9204         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9205         * cp-tree.h (lang_printable_name): Rename.
9206         * error.c (lang_decl_name): Use new hook.
9207         * lex.c (cxx_init): Remove old hook.
9208         * pt.c (tsubst_decl): Use new hook.
9209         * tree.c (lang_printable_name): Rename.
9211 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
9213         PR c++/3882
9214         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
9215         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
9216         only after recording the declaration.
9218 2002-03-18  Jason Merrill  <jason@redhat.com>
9220         PR c++/2039
9221         * init.c (resolve_offset_ref): Hand off to build_component_ref.
9223         PR c++/4222, c++/5995
9224         * call.c (build_over_call): Fix empty class logic.
9226         PR c++/3870
9227         * cp-tree.h (struct saved_scope): Add last_parms field.
9228         * decl.c (maybe_push_to_top_level): Save last_function_parms.
9229         (pop_from_top_level): Restore it.
9231         PR c++/4377
9232         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
9233         NON_LVALUE_EXPRs.
9235         PR c++/4003
9236         * pt.c (tsubst_friend_function): Use decl_namespace_context.
9238         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
9239         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
9240         type with a nontrivial destructor.
9242 2002-03-17  Jason Merrill  <jason@redhat.com>
9244         PR c++/4460
9245         * class.c (build_base_path): Virtual base layout is fixed in
9246         in-charge [cd]tors.
9248 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
9250         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9251         * parse.y (yyparse): Remove macro.
9253 2002-03-17  Jason Merrill  <jason@redhat.com>
9255         PR c++/5757
9256         * init.c (build_new_1): Pass the right pointer to op delete.
9258 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
9260         PR c++/4361
9261         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
9262         conversion operators go.
9263         (struct lang_decl_flags): Add template_conv_p and unused
9264         bitfields.
9265         (DECL_TEMPLATE_CONV_FN_P): New macro.
9266         * call.c (build_user_type_conversion_1): Don't check second type
9267         conversion of overload set first.
9268         * class.c (add_method): Make sure templated conversion operators
9269         all end up on slot 2.
9270         * lex.c (do_identifier): A conversion operator token might be
9271         satisfied by a templated conversion operator.
9272         * pt.c (check_explicit_specialization): Use
9273         CLASSTYPE_FIRST_CONVERSION_SLOT.
9274         (template_parm_this_level_p): New function.
9275         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
9276         * search.c (lookup_fnfields_1): Template conversions will be on
9277         the first slot.
9278         * typeck.c (build_component_ref): Preserve the type of an
9279         conversion operator name on the overload type.
9280         (build_x_function_call): Retrieve the conversion operator name.
9282 2002-03-15  Richard Henderson  <rth@redhat.com>
9284         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
9286 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
9288         * cp-tree.h (CLEANUP_DECL): Remove.
9289         (CLEANUP_EXPR): Likewise.
9290         * decl.c (destroy_local_var): Simplify.
9291         (maybe_build_cleanup): Tidy.
9292         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
9293         * semantics.c (cp_expand_stmt): Likewise.
9294         * cp/tree.c (cp_statement_code_p): Likewise.
9296 2002-03-15  Jason Merrill  <jason@redhat.com>
9298         PR c++/5857
9299         * decl.c (duplicate_decls): Use merge_types instead of common_type.
9300         * typeck.c (common_type): Just hand off to
9301         type_after_usual_arithmetic_conversions and
9302         composite_pointer_type.
9303         (merge_types): New fn.
9304         (commonparms): Use it instead of common_type.
9305         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
9306         (composite_pointer_type): Also handle attributes.
9307         * cp-tree.h: Declare merge_types.
9309         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
9310         variables.
9311         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
9313 2002-03-14  Richard Henderson  <rth@redhat.com>
9315         * decl.c: Include c-pragma.h.
9316         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
9317         * Make-lang.in: Update dependencies.
9319 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
9321         PR c++/5908
9322         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
9323         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
9325 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
9327         * mangle.c (write_builtin_type): Handle 128-bit integers even if
9328         they are not a standard integer type.
9330 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
9332         * cp-tree.h (init_init_processing): Remove declaration.
9333         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
9334         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
9336 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9338         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
9339         Define.
9340         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
9341         tree_code_length.
9342         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
9343         cplus_tree_code_name): Delete.
9344         (cxx_init): Don't call add_c_tree_codes, instead set
9345         lang_unsafe_for_reeval.  Don't try to copy into the various
9346         tree_code arrays.
9348 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
9350         PR c++/5659
9351         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
9352         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
9353         definitions.
9355 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
9357         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
9358         DR209 is now not a defect.
9359         * cp-tree.h (skip_type_access_control): Remove.
9360         * decl.c (grokdeclarator): Do type access control for friend
9361         declarations.
9362         * semantics.c (decl_type_access_control): Don't reset
9363         current_type_lookups.
9364         (save_type_access_control): Always save the lookups.
9365         (skip_type_access_control): Remove.
9366         (finish_class_definition): Don't change type_lookups.
9368 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
9370         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
9371         It is incorrect.
9372         * typeck.c (build_static_cast): Compare non-qualified types
9373         with pointer to member conversions.
9375 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
9376             Daniel Berlin  <dan@dberlin.org>
9378         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
9379         (cxx_get_alias_set): Use it.
9381 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9383         * cp-tree.h (stabilize_expr): Prototype.
9385 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9387         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
9388         conditional return void.
9390 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
9392         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
9393         * cp-tree.h (cxx_unsave): New.
9394         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
9395         (init_tree): Update.
9397 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9399         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
9400         explicit sizeof/sizeof.
9401         * decl2.c (cxx_decode_option): Likewise.
9402         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
9404 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9406         PR c++/775
9407         * decl.c (lookup_tag): Only reject enum/class mismatch, not
9408         class/union mismatch.
9409         * parse.y (check_class_key): New function.
9410         (structsp): Call it.
9412 2002-03-01  Michael Matz  <matz@suse.de>
9414         * typeck.c (cp_pointer_int_sum): Complete inner type which is
9415         used later by size_in_bytes().
9417 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
9419         * cp-tree.h:  Require __GNUC__ to be #defined.
9420         (build_init):  Add missing prototype.
9422 2002-03-01  Jason Merrill  <jason@redhat.com>
9424         * except.c: Don't include decl.h or obstack.h.  Do include
9425         tree-inline.h.
9426         (build_throw): Destroy temporaries from the thrown
9427         expression before calling __cxa_throw.  Construct a thrown
9428         temporary directly into the exception object.
9429         (stabilize_throw_expr): New function.
9430         (wrap_cleanups_r): New function.
9431         * tree.c (stabilize_expr): New function.
9432         * init.c (build_init): New function.
9433         * Make-lang.in (cp/except.o): Adjust .h deps.
9435 2002-02-28  Jason Merrill  <jason@redhat.com>
9437         * search.c (lookup_base_r): Don't clear is_non_public just because
9438         we found a friendly scope.
9440         * decl.c (finish_function): Only warn about missing return
9441         statement with -Wreturn-type.
9443 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
9445         * class.c (build_clone): Update.
9446         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9447         * cp-tree.h (cxx_dup_lang_specific_decl): New.
9448         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
9449         (copy_decl): Update.
9450         * method.c (make_thunk): Update.
9452 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
9454         * decl2.c: Delete traditional-mode-related code copied from
9455         the C front end but not used, or used only to permit the
9456         compiler to link.
9458 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
9460         PR c++/4093
9461         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
9462         to void.
9464 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
9466         PR other/5746
9467         * semantics.c (finish_switch_cond): Don't call get_unwidened
9468         if error_mark_node.
9470 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
9472         PR c++/2645, DR 295
9473         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
9474         tf_keep_type_decl.
9475         (make_typename_type): Use tsubst_flags_t.
9476         * decl.c (make_typename_type): Adjust. Return non-artificial
9477         TYPE_DECLs, if required.
9478         (grokdeclarator): Simplify CVR qualification handling. Allow bad
9479         qualifiers on typedef types.
9480         * decl2.c (handle_class_head): Adjust make_typename_type call.
9481         * parse.y (nested_name_specifier): Likewise.
9482         (typename_sub0): Likewise.
9483         (typename_sub1): Likewise.
9484         * pt.c (convert_template_argument): Adjust make_typename_type
9485         return value.
9486         (tsubst): Adjust cp_build_qualified_type_real calls.
9487         (check_cv_quals_for_unify): Cope with allowing bad qualifications
9488         on template type parms.
9489         (instantiate_decl): Recheck substitutions to give warnings on bad
9490         qualifications.
9491         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
9493 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
9495         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
9497         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
9498         unless DECL_ALWAYS_INLINE.
9500 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
9502         * typeck.c (cp_pointer_int_sum): Renamed from
9503         pointer_int_sum, call pointer_int_sum.
9505 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
9507         * decl.c (duplicate_decls): Return 0 if issued error about
9508         redeclaration.
9510 2002-02-19  Jason Merrill  <jason@redhat.com>
9512         ABI change: Mangle `void (A::*)() const' as
9513         M1AKFvvE, not MK1AFvvE.
9514         * mangle.c (write_function_type): Write cv-quals for member
9515         function type here.
9516         (write_pointer_to_member_type): Not here.
9518 2002-02-18  Jason Merrill  <jason@redhat.com>
9520         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
9521         (do_decl_instantiation): Likewise.
9523 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9525         PR c++/5685
9526         * decl.c (duplicate_decls): Make warning unconditional
9527         if duplicate default argument declarations are present.
9529 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
9531         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
9532         shortening.
9534 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
9536         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
9537         remove incorrect comment. Move #if 0'd code to common path. Use
9538         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
9540 2002-02-13  Jason Merrill  <jason@redhat.com>
9542         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
9543         (finish_function): Don't warn if current_function_returns_null.
9545         * typeck2.c (digest_init): Do handle values of vector type.
9547         * typeck2.c (digest_init, process_init_constructor): Treat vectors
9548         like arrays.
9550 2002-02-11  Jason Merrill  <jason@redhat.com>
9552         * parse.y (reserved_declspecs): Don't handle attributes.
9553         (reserved_typespecquals): Handle them here.
9554         * Make-lang.in (parse.c): Adjust expected conflicts.
9556 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
9558         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
9559         instead of compstmt.
9560         (compstmt_or_stmtexpr): Renamed from compstmt.
9561         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
9563 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
9565         Rename instantiate_type_flags to tsubst_flags_t & expand use.
9566         * cp-tree.h (instantiate_type_flags): Rename to ...
9567         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
9568         add tf_warning flag.
9569         (instantiate_type): Adjust prototype.
9570         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
9571         do_type_instantiation, cp_build_qualified_type_real): Likewise.
9572         cp_build_qualified_type: Adjust.
9573         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
9574         tf_*.
9575         * call.c (standard_conversion): Rename itf_* to tf_*.
9576         (reference_binding): Likewise.
9577         (convert_like_real): Likewise.
9578         * cvt.c (cp_convert_to_pointer): Likewise.
9579         (convert_to_reference): Likewise.
9580         * decl.c (lookup_namespace_name): Use tf_* flags.
9581         (make_typename_type): Likewise.
9582         (grokdeclarator): Likewise.
9583         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
9584         (coerce_template_template_parms, convert_template_argument,
9585         coerce_template_parms, maybe_get_template_decl_from_type_decl,
9586         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
9587         instantiate_class_template, tsubst_template_arg_vector,
9588         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
9589         tsubst_decl, tsubst_arg_types, tsubst_function_type,
9590         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
9591         instantiate_template, fn_type_unification,
9592         resolve_overloaded_unification, verify_class_unification,
9593         unify, get_bindings_real, do_type_instantiation,
9594         regenerate_decl_from_template, instantiate_decl,
9595         tsubst_initializer_list, tsubst_enum,
9596         get_mostly_instantiated_function_type,
9597         invalid_nontype_parm_type_p): Likewise.
9598         * tree.c (cp_build_qualified_type_real): Likewise.
9599         * typeck.c (build_binary_op): Rename itf_* to tf_*.
9600         (build_ptrmemfunc): Likewise.
9601         (convert_for_assignment): Likewise.
9603 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
9605         PR c++/109
9606         * decl.c (grokdeclarator): Allow friend declarations from
9607         dependent types.
9608         * decl2.c (handle_class_head): Don't push into template parm contexts.
9609         * pt.c (push_template_decl_real): Template parm contexts are never
9610         being defined.
9612 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
9614         * class.c: Include target.h.
9615         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
9616         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
9617         bit-field layout.
9618         * Make-lang.in: Adjust deps.
9620 2002-02-05  Jason Merrill  <jason@redhat.com>
9622         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
9624 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
9626         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
9627         (finish_switch_cond): Set SWITCH_TYPE.
9629 2002-02-04  Richard Henderson  <rth@redhat.com>
9631         * method.c (use_thunk): Always initialize the block tree.  Reindent.
9632         * semantics.c (expand_body): Emit thunks after function, not before.
9634 2002-02-04  Jason Merrill  <jason@redhat.com>
9636         * decl.c (start_function): Call cplus_decl_attributes immediately
9637         after grokdeclarator.
9639         * decl.c (start_function): Combine DECL_RESULT handling code.
9641 2002-02-03  Jason Merrill  <jason@redhat.com>
9643         * xref.c: Remove.
9644         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
9645         (cp/xref.o): Remove dependencies.
9646         * class.c (finish_struct_1, check_methods): Don't call xref fns.
9647         (finish_struct_1): Likewise.
9648         * friend.c (make_friend_class): Likewise.
9649         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
9650         * spew.c (read_process_identifier): Likewise.
9652 2002-02-01  Jason Merrill  <jason@redhat.com>
9654         PR c++/4872
9655         * decl.c (finish_function): Warn about a non-void function with
9656         no return statement and no abnormal exit.
9657         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
9658         (current_function_returns_abnormally): New macro.
9659         * call.c (build_call): Set it.
9661         * typeck.c (build_component_ref): Always complain about offsetof
9662         constructs on non-PODs.  Only make it an error for members of
9663         virtual bases.
9665         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
9666         (dump_function_decl): Always dump parms.
9668         * decl2.c (finish_static_data_member_decl): Complain about a local
9669         class with a static data member.
9671         PR c++/4286
9672         * search.c (lookup_field_1): Don't xref a static data member
9673         just because we looked it up.
9675 2002-01-31  Jason Merrill  <jason@redhat.com>
9677         * Make-lang.in (parse.c): Handle .output file.
9679         PR c++/3395
9680         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
9681         not TREE_TYPE.
9682         * semantics.c (finish_class_definition): Adjust.
9684         Allow attributes in parms and casts.
9685         * parse.y (named_parm): Don't strip attrs.
9686         (declmods): Remove 'attributes' production.
9687         (nonempty_cv_qualifiers): Accept attributes.
9688         (ATTRIBUTE): Give precedence.
9689         * decl.c (groktypename): Handle attributes.
9690         (grokparms): Likewise.
9692 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
9694         * decl2.c (cxx_decode_option): Pass 0 as last argument to
9695         cpp_handle_option.
9696         * lang-specs.h: Use cpp_unique_options instead of cpp_options
9697         when used together with cc1_options.
9699 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
9701         PR c++/5132
9702         * typeck2.c (digest_init): Make sure non-array core type is
9703         instantiated.
9704         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
9705         constructor, rather than build a new one.
9706         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
9707         PURPOSE of constructor elts.
9709 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
9711         * Make-lang.in (parse.c): Adjust expected number of
9712         shift-reduce conflicts.
9713         (decl.o): Depend on diagnostic.h.
9714         * decl.c: Include diagnostic.h.
9715         (grokdeclarator): Check for null pointer.
9716         (finish_function): Don't abort when
9717         current_binding_level->parm_flag != 1, if errors have
9718         occurred; throw away the statement tree and extra binding
9719         levels, and continue.
9720         * lex.c (note_list_got_semicolon): Check for null pointer.
9721         * method.c (hack_identifier): Just return error_mark_node if
9722         value is error_mark_node.
9723         * parse.y (primary: TYPEID(type_id)): No need to use
9724         TYPE_MAIN_VARIANT here.
9725         (handler_seq): Accept an empty list of catch clauses and
9726         generate a fake handler block to avoid later crashes.
9727         (ansi_raise_identifier): Accept the error token too.
9728         * semantics.c (begin_class_definition,
9729         finish_class_definition): Check for error_mark_node.
9731 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
9733         * typeck2.c (friendly_abort): Delete definition.
9734         * cp-tree.h (friendly_abort): Don't prototype.
9735         (my_friendly_assert): Use fancy_abort.
9737 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9739         * cp-tree.h (my_friendly_abort): Remove.
9741 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
9743         * spew.c (pending_inlines, pending_inlines_tail,
9744         processing_these_inlines): Make static.
9745         (mark_pending_inlines): Remove static.
9746         (begin_parsing_inclass_inline): If in function, save pi
9747         for GC to cp_function_chain->unparsed_inlines instead.
9748         (process_next_inline): Likewise.
9749         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
9750         (mark_pending_inlines): Add prototype.
9751         * decl.c (spew_debug): Remove unused extern.
9752         (mark_lang_function): Call mark_pending_inlines.
9754 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9756         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
9757         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
9758         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
9759         Change my_fancy_abort() to abort().
9761 2002-01-23  Jason Merrill  <jason@redhat.com>
9763         PR c++/5453
9764         * class.c (fixed_type_or_null): Fix thinko.
9766         PR c++/3331
9767         * init.c (resolve_offset_ref): Use build_indirect_ref.
9769         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
9771 2002-01-22  Jason Merrill  <jason@redhat.com>
9773         * parse.y (function_body): Suppress the block for the outermost
9774         curly braces.
9775         * decl.c (pushdecl): Don't try to skip it.
9776         (begin_function_body): Keep the block we create, not the next one.
9777         * init.c (emit_base_init): Don't mess with keep_next_level.
9779         * class.c (build_base_path): Tweak formatting.
9781 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9783         Fix regression introduced with patch for c++/775
9784         * parse.y (class_head_defn): Check for template specializations
9785         with a different class-key.
9787 2002-01-17  Jason Merrill  <jason@redhat.com>
9789         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
9790         (begin_function_body): Call them and keep_next_level.
9791         * init.c (emit_base_init): Call keep_next_level.
9792         * semantics.c (setup_vtbl_ptr): Lose.
9793         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
9794         (vtbls_set_up_p): Lose.
9795         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
9796         * method.c (do_build_copy_constructor): Likewise.
9797         (synthesize_method): Call finish_mem_initializers.
9798         * parse.y (nodecls): Likewise.
9800         * error.c (dump_type_suffix): Print the exception specs before
9801         recursing.
9802         (dump_function_decl): Here, too.
9804         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
9806 2002-01-10  Ira Ruben   <ira@apple.com>
9808         PR c++/907
9809         * decl.c (start_method): Handle attrlist.
9811 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
9813         * decl2.c (max_tinst_depth): Increase default limit to 500.
9815 2002-01-10  Graham Stott  <grahams@redhat.com>
9817         * spew.c (YYCHAR): Uppercase macro parameter and add
9818         parenthesis.
9819         (YYCODE): Likewise.
9820         (NAME): Uppercase macro parameter.
9822 2002-01-09  Graham Stott  <grahams@redhat.com>
9824         * decl.h (grokdeclarator): Wrap long line.
9826         * semantics.c (FINISH_COND): Uppercase macro paramaters and
9827         add parenthesis.
9829 2002-01-08  Graham Stott  <grahams@redhat.com>
9831         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
9832         (PALLOC): Uppercase macro parameter and whitespace.
9833         (SALLOC): Uppercase macro parameter.
9834         (SFREE): Uppercase macros parameter, add parenthese and
9835         whitespace.
9836         (STREQL): Uppercase macro parameter and whitespace.
9837         (STRNEQ): Likewise.
9838         (STRLSS): Likewise.
9839         (STRLEQ): Likewise.
9840         (STRGTR): Likewise.
9841         (STRGEQ): Likewise.
9843         * call.c (convert_like): Add parenthesis and wrap.
9844         (convert_like_with_context): Likewise.
9845         (ICS_RANK): Whitespace.
9846         (NEED_TEMPORARY_P): Remove parenthesis.
9848         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
9849         whitespace.
9850         (VTT_MARKED_BINFO_P): Likewise.
9852         * decl.c (BINDING_LEVEL): Add parenthesis.
9853         (DEF_OPERATOR): Likewise.
9855         * mangle.c (MANGLE_TRACE): Add parenthesis.
9856         (MANGLE_TRACE_TREE): Likewise.
9857         (write_signed_number): Likewise.
9858         (write_unsigned_number): Likewise.
9860         * pt.c (ccat): Uppercase macro parameter.
9861         (cat): Likewise
9863         * search.c (SET_BINFO_ACCESS): Add parenthesis.
9865 2002-01-07  Jason Merrill  <jason@redhat.com>
9867         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
9868         to pedwarn.
9870         PR c++/3536
9871         * method.c (make_thunk): If !flag_weak, give the thunk the
9872         function's linkage.
9873         (use_thunk): Here, too.
9875 2002-01-07  Graham Stott  <grahams@redhat.com>
9877         * error.c: Update copyright date.
9878         (print_scope_operator): Add parenthesis.
9879         (print_left_paren): Likewise.
9880         (print_right_paren): Likewise.
9881         (print_left_bracket): Likewise.
9882         (print_right_bracket): Likewise.
9883         (print_template_argument_list_start): Likewise.
9884         (print_template_argument_list_end): Likewise.
9885         (print_non_consecutive_character): Likewise.
9886         (print_tree_identifier): Likewise.
9887         (print_identifier): Likewise.
9888         (NEXT_CODE): Uppercase macro parameter.
9889         (ident_fndecl): Delete unused.
9890         (GLOBAL_THING): Likewise.
9892 2002-01-06  Graham Stott  <grahams@redhat.com>
9894         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
9895         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
9896         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
9897         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
9898         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
9899         (C_IS_RESERVED_WORD): Uppercase macro parameter.
9900         (C_RID_YYCODE) Likewise.
9901         (ptrmem_cst): Use rtx.
9902         (LOCAL_BINDING_P): Add whitespace.
9903         (INHERITED_VALUE_BINDING_P): Likewise.
9904         (BINDING_SCOPE): Wrap long line.
9905         (BINDING_HAS_LEVEL_P): Remove parenthesis.
9906         (BINDING_VALUE): Wrap long line.
9907         (BINDING_TYPE): Whitespace.
9908         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
9909         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
9910         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
9911         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
9912         (same_type_p): Uppercase macro parameters.
9913         (same_type_ignoring_top_level_qualifiers_p): Likewise.
9914         (OVL_FUNCTION): Wrap long line.
9915         (OVL_CHAIN): Whitespace.
9916         (OVL_CURRENT): Add parenthesis and whitespace.
9917         (OVL_NEXT): Whitespace.
9918         (OVL_USED): Likewise.
9919         (IDENTIFIER_TYPE_VALUE): Likewise.
9920         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
9921         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
9922         (LANG_ID_FIELD): Whitespace.
9923         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
9924         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
9925         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
9926         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
9927         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
9928         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
9929         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
9930         (IDENTIFIER_VIRTUAL_P): Likewise.
9931         (IDENTIFIER_OPNAME_P): Likewise.
9932         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
9933         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
9934         (C_SET_EXP_ORIGINAL_CODE): Likewise.
9935         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
9936         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
9937         (IS_AGGR_TYPE): Uppercase macro parameter.
9938         (CLASS_TYPE_P): Likewise.
9939         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
9940         (IS_AGGR_TYPE_2): Whitespace.
9941         (TAGGED_TYPE_P): Uppercase macro parameter.
9942         (TYPE_BUILT_IN): Whitespace.
9943         (TYPE_FOR_JAVA): Likewise.
9944         (FUNCTION_ARG_CHAIN): Remove parenthesis.
9945         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
9946         (FUNCTION_FIRST_USER_PARAM): Likewise.
9947         (PROMOTES_TO_AGGR_TYPE): Whitespace.
9948         (DERIVED_FROM_P): Add parenthesis and wrap.
9949         (UNIQUELY_DERIVED_FROM_P): Likewise.
9950         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
9951         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
9952         (CLASSTYPE_USE_TEMPLATE): Whitespace.
9953         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
9954         (TYPE_GETS_DELETE): Add parenthesis.
9955         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
9956         (TYPE_HAS_ASSIGN_REF): Likewise,
9957         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
9958         (TYPE_HAS_INIT_REF): Likewise.
9959         (TYPE_HAS_CONST_INIT_REF): Likewise.
9960         (TYPE_BEING_DEFINED): Likewise.
9961         (TYPE_LANG_SPECIFIC): Likewise.
9962         (CLASSTYPE_RTTI): Likewise.
9963         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
9964         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
9965         (TYPE_OVERLOADS_ARROW): Likewise.
9966         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
9967         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
9968         (CLASSTYPE_METHOD_VEC): Likewise.
9969         (CLASSTYPE_MARKED_N): Likewise.
9970         (CLASSTYPE_MARKED): Likewise.
9971         (CLASSTYPE_MARKED2): Likewise.
9972         (CLASSTYPE_MARKED3): Likewise.
9973         (CLASSTYPE_MARKED4): Likewise.
9974         (CLASSTYPE_MARKED5): Likewise.
9975         (CLASSTYPE_MARKED6): Likewise.
9976         (SET_CLASSTYPE_MARKED): Whitespace.
9977         (CLEAR_CLASSTYPE_MARKED): Likewise.
9978         (SET_CLASSTYPE_MARKED2): Likewise.
9979         (CLEAR_CLASSTYPE_MARKED2): Likewise.
9980         (SET_CLASSTYPE_MARKED3): Likewise.
9981         (CLEAR_CLASSTYPE_MARKED3): Likewise.
9982         (SET_CLASSTYPE_MARKED4): Likewise.
9983         (CLEAR_CLASSTYPE_MARKED4): Likewise.
9984         (SET_CLASSTYPE_MARKED5): Likewise.
9985         (CLEAR_CLASSTYPE_MARKED5): Likewise.
9986         (SET_CLASSTYPE_MARKED6): Likewise.
9987         (CLEAR_CLASSTYPE_MARKED6): Likewise.
9988         (CLASSTYPE_TAGS): Likewise.
9989         (CLASSTYPE_VSIZE): Likewise.
9990         (CLASSTYPE_VBASECLASSES): Likewise.
9991         (CANONICAL_BINFO): Add parenthesis.
9992         (CLASSTYPE_SIZE(NODE): Likewise.
9993         (CLASSTYPE_SIZE_UNIT): Likewise.
9994         (CLASSTYPE_ALIGN(NODE): Likewise.
9995         (CLASSTYPE_USER_ALIGN): Likewise.
9996         (TYPE_JAVA_INTERFACE): Likewise.
9997         (CLASSTYPE_PURE_VIRTUALS): Likewise.
9998         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
9999         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10000         (CLASSTYPE_HAS_MUTABLE): Likewise.
10001         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10002         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10003         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10004         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10005         (CLASSTYPE_INTERFACE_ONLY): Likewise.
10006         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10007         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10008         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10009         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10010         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10011         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10012         (BINFO_UNSHARED_MARKED): Whitespace.
10013         (BINFO_MARKED): Whitespace and wrap.
10014         (SET_BINFO_MARKED): Likewise.
10015         (CLEAR_BINFO_MARKED): Likewise.
10016         (BINFO_VTABLE_PATH_MARKED): Likewise.
10017         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10018         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10019         (BINFO_SUBVTT_INDEX): Remove parenthesis.
10020         (BINFO_VPTR_INDEX): Likewise.
10021         (BINFO_PRIMARY_BASE_OF): Likewise,
10022         (CLASSTYPE_VFIELDS): Whitespace.
10023         (VF_DERIVED_VALUE): Wrap long line.
10024         (NAMESPACE_LEVEL): Whitespace.
10025         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10026         (DEFARG_POINTER): Whitespace.
10027         (DECL_NEEDED_P): Remove parenthesis.
10028         (DECL_LANGUAGE): Whitespace.
10029         (SET_DECL_LANGUAGE): Add parenthesis.
10030         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10031         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10032         (DECL_IN_AGGR_P): Whitespace.
10033         (DECL_FRIEND_P): Likewise.
10034         (DECL_BEFRIENDING_CLASSES): Likewise.
10035         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10036         (DECL_NONCONVERTING_P): Whitespace.
10037         (DECL_PURE_VIRTUAL_P): Likewise.
10038         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10039         (DECL_PENDING_INLINE_INFO): Whitespace.
10040         (DECL_SORTED_FIELDS): Likewise.
10041         (DECL_DEFERRED_FN): Likewise.
10042         (DECL_TEMPLATE_INFO): Likewise.
10043         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10044         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10045         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10046         (TMPL_ARGS_LEVEL): Likewise.
10047         (SET_TMPL_ARGS_LEVEL): Likewise.
10048         (INNERMOST_TEMPLATE_PARMS): Whitespace.
10049         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10050         (INTEGRAL_CODE_P(CODE): Add parenthesis.
10051         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10052         (TYPE_HAS_CONSTRUCTOR): Whitespace.
10053         (TREE_HAS_CONSTRUCTOR): Likewise.
10054         (TYPE_HAS_DESTRUCTOR): Likewise.
10055         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10056         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10057         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10058         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10059         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10060         (TYPE_PTRMEMFUNC_P): Likewise.
10061         (TYPE_PTRMEMFUNC_FLAG): Likewise.
10062         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10063         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10064         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10065         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10066         (DECL_ACCESS): Whitespace.
10067         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10068         (DECL_GLOBAL_DTOR_P): Likewise.
10069         (GLOBAL_INIT_PRIORITY): Likewise.
10070         (DECL_TEMPLATE_PARMS): Likewise.
10071         (DECL_TEMPLATE_RESULT): Likewise.
10072         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
10073         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
10074         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
10075         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
10076         (PRIMARY_TEMPLATE_P): Add parenthesis.
10077         (DECL_USE_TEMPLATE): Whitespace.
10078         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10079         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10080         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10081         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10082         (CALL_DECLARATOR_PARMS): Remove parenthesis.
10083         (CALL_DECLARATOR_QUALS): Likewise.
10084         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
10085         (TEMP_NAME_P): Wrap.
10086         (VFIELD_NAME_P): Likewise.
10087         (B_SET): Uppercase macro parameters and add parenthesis.
10088         (B_CLR): Likewise.
10089         (B_TST): Likewise.
10090         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
10091         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
10092         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
10093         (same_or_base_type_p): Likewise.
10094         (cp_deprecated): Likewise.
10096 2002-01-05  Richard Henderson  <rth@redhat.com>
10098         * semantics.c (expand_body): Revert last change.
10100 2002-01-04  Jason Merrill  <jason@redhat.com>
10102         PR c++/4122
10103         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
10104         lost primary.
10106         * class.c (build_vtbl_initializer): Check for a lost primary
10107         before calculating the vtable entry to throw away.
10109 2002-01-02  Jason Merrill  <jason@redhat.com>
10111         * semantics.c (expand_body): Call outlining_inline_function when
10112         emitting an inline function out of line.
10114 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10116         PR c++/5116, c++/764 reversion
10117         * call.c (build_new_op): Revert the instantiations. They are
10118         incorrect.
10120 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10122         PR c++/5089
10123         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
10125 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10127         PR c++/3716
10128         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
10129         (tsubst, case POINTER_TYPE): Handle pmfs here.
10130         (tsubst, case OFFSET_TYPE): Check it is not an offset to
10131         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
10133 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10135         PR c++/35
10136         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
10137         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
10138         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
10139         PARM_DECL.
10140         (tsubst_template_parms): Break up loop statements.
10141         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
10142         parm PARM_DECLs don't get promoted.
10144 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10146         PR c++/5123
10147         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
10148         (build_x_function_call): Cope with a COMPONENT_REF containing a
10149         TEMPLATE_ID_EXPR.
10151 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10153         PR c++/5213
10154         * pt.c (convert_template_argument): Be more careful determining
10155         when RECORD_TYPE templates are or are not templates.
10157 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10159         PR c++/775
10160         * cp-tree.h (handle_class_head): Adjust prototype.
10161         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
10162         parameters. Use for all class heads.
10163         * parse.y (named_class_head_sans_basetype, named_class_head,
10164         named_complex_class_head_sans_basetype,
10165         named_class_head_sans_basetype_defn,
10166         unnamed_class_head): Remove.
10167         (class_head, class_head_apparent_template): Recognize class heads
10168         (class_head_decl, class_head_defn): New reductions. Process class
10169         heads.
10170         (structsp): Adjust class definition and class declaration
10171         reductions.
10172         (maybe_base_class_list): Give diagnostic on empty list.
10174 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10176         PR c++/4379
10177         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
10178         single non-static member.
10179         (unary_complex_lvalue): If it cannot be a pointer to member, don't
10180         make it so. Check it is not pointer to reference.
10182 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10184         PR c++/5132
10185         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
10186         are processing a template decl.
10188 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10190         PR c++/5116, c++/764
10191         * call.c (build_new_op): Make sure template class operands are
10192         instantiated. Simplify arglist construction.
10194 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10196         * call.c (build_user_type_conversion_1): Use my_friendly_assert
10197         rather than if ... abort.
10198         * cvt.c (convert_to_reference): Likewise.
10199         * semantics.c (setup_vtbl_ptr): Likewise.
10200         * pt.c (lookup_template_class): Comment typo.
10202 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10204         PR c++/5125
10205         * pt.c (push_template_decl_real): Make sure DECL has
10206         DECL_LANG_SPECIFIC.
10208 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10210         PR c++/335
10211         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
10212         for non-reference fields.
10213         * typeck.c (require_complete_type): Use resolve_offset_ref).
10215 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
10217         PR c++/196
10218         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
10220 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
10222         PR c++/160
10223         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
10224         up. Don't stabilize_references when initializing a reference.
10226 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10228         * decl2.c (lang_f_options): Const-ify.
10230 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
10232         * config-lang.in (diff_excludes): Remove.
10234 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
10236         PR c++/90
10237         * typeck.c (build_function_call_real): Use original function
10238         expression for errors.
10240 2001-12-18  Jason Merrill  <jason@redhat.com>
10242         PR c++/3242
10243         * class.c (add_method): Do compare 'this' quals when trying to match a
10244         used function.  Don't defer to another used function.
10246 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
10248         * pt.c (instantiate_clone): Remove, fold into ...
10249         (instantiate_template): ... here. Simplify by removing mutual
10250         recursion.
10251         * typeck2.c (build_m_component_ref): Don't cv qualify the function
10252         pointed to by a pointer to function.
10253         * class.c (delete_duplicate_fields_1): Typo.
10255 2001-12-18  Jason Merrill  <jason@redhat.com>
10257         C++ ABI change: destroy value arguments in caller.
10258         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
10259         create an extra binding level for the parameters.
10260         * decl.c (store_parm_decls): Don't do parameter cleanups.
10262 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
10264         * call.c (build_new_method_call): Use '%#V'.
10265         * error.c (cv_to_string): Use V parameter to determine padding.
10267 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
10269         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
10270         spellings in messages.
10272 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
10274         * cp-tree.h: Delete #defines for cp_error, cp_warning,
10275         cp_pedwarn, and cp_compiler_error.
10276         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
10277         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
10278         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
10279         typeck2.c: Change calls to the above macros to use their
10280         language-independent equivalents: error, warning, pedwarn, and
10281         internal_error respectively.
10283 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
10285         * decl2.c (finish_file): Remove back_end_hook.
10287 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
10289         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
10290         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
10291         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
10293 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
10295         * lang-options.h: Use American spelling in messages.
10297 2001-12-13  Jason Merrill  <jason@redhat.com>
10299         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
10301         Use cleanups to run base and member destructors.
10302         * init.c (push_base_cleanups): New function, split out from...
10303         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
10304         * decl.c (finish_destructor_body): Move vbase destruction code to
10305         push_base_cleanups.
10306         (begin_function_body, finish_function_body): New fns.
10307         (finish_function): Move [cd]tor handling and call_poplevel to
10308         finish_function_body.
10309         (pushdecl): Skip the new level.
10310         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
10311         (setup_vtbl_ptr): Call push_base_cleanups.
10312         * method.c (synthesize_method): Call {begin,end}_function_body.
10313         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
10314         * cp-tree.h: Declare new fns.
10315         * parse.y (function_body, .begin_function_body): New nonterminals.
10316         (fndef, pending_inline, function_try_block): Use function_body.
10317         (ctor_initializer_opt, function_try_block): No longer has a value.
10318         (base_init): Remove .set_base_init token.
10319         (.set_base_init, compstmt_or_error): Remove.
10320         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
10322         * optimize.c (maybe_clone_body): Fix parameter updating.
10324 2001-12-12  Jason Merrill  <jason@redhat.com>
10326         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
10327         * semantics.c (genrtl_start_function): Don't pass
10328         parms_have_cleanups or push an extra binding level.
10329         (genrtl_finish_function): Lose cleanup_label cruft.
10331         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
10332         (ctor_label): Remove.
10333         * semantics.c (finish_return_stmt): Lose ctor_label support.
10334         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
10335         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
10336         dtor_label.
10338         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
10339         check for [cd]tors.
10340         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
10342         * decl.c (finish_function): Check VMS_TARGET, not VMS.
10344         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
10345         (end_cleanup_fn): And poplevel.
10347         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
10348         if we're in a template.
10350 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
10352         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
10353         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
10354         THIS_NAME_P): Delete.
10355         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
10356         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
10357         with internal naming scheme.
10358         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
10360 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
10362         * decl.c (grokdeclarator): Deprecated implicit typename use.
10364 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
10366         PR g++/51
10367         * parse.y (frob_specs): Indicate it is a language linkage which
10368         contained the extern.
10369         * decl.c (grokdeclarator): Allow extern language linkage with
10370         other specifiers.
10372 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
10374         PR g++/72
10375         * decl.c (add_binding): Don't reject duplicate typedefs involving
10376         template parameters.
10378 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
10380         * parse.y, semantics.c: Similarly.
10382 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
10384         PR g++/87
10385         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
10386         (copy_args_p): Rename to ...
10387         (copy_fn_p): ... here.
10388         (grok_special_member_properties): New function.
10389         (grok_op_properties): Lose VIRTUALP parameter.
10390         (copy_assignment_arg_p): Remove.
10391         * call.c (build_over_call): Use copy_fn_p.
10392         * decl.c (grokfndecl): Reformat. Adjust call to
10393         grok_op_properties.
10394         (copy_args_p): Rename to ...
10395         (copy_fn_p): ... here. Reject template functions. Check for pass
10396         by value.
10397         (grok_special_member_properties): Remember special functions.
10398         (grok_ctor_properties): Don't remember them here, just check.
10399         (grok_op_properties): Likewise.
10400         (start_method): Call grok_special_member_properties.
10401         * decl2.c (grokfield): Likewise.
10402         (copy_assignment_arg_p): Remove.
10403         (grok_function_init): Don't remember abstract assignment here.
10404         * pt.c (instantiate_class_template): Call
10405         grok_special_member_properties.
10406         (tsubst_decl): Adjust grok_op_properties call.
10408 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
10410         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
10411         RID_TYPES_COMPATIBLE_P.
10413 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10415         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
10416         call to build_aggr_init.
10417         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
10419 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
10421         * parse.y: Replace uses of the string non-terminal with STRING.
10422         Don't perform string concatentaion here.
10423         (string): Remove non-terminal.
10424         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
10426 2001-12-05  Jason Merrill  <jason@redhat.com>
10428         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
10429         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
10430         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
10431         * pt.c (push_tinst_level): No longer static.
10432         * cp-tree.h: Declare them.
10434         * init.c (resolve_offset_ref): Don't check access for the base
10435         conversion to access a FIELD_DECL.
10437         * cp-tree.h (TYPE_REFFN_P): New macro.
10438         * decl.c (bad_specifiers): Check it, too.
10440         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
10441         on the __*_type_info type if we haven't seen a definition.
10443 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
10445         * decl.c: Include c-common.h.
10446         (shadow_warning): Move to c-common.c.
10448 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10450         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
10452 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10454         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
10456 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10458         PR g++/164
10459         * init.c (sort_base_init): Allow binfos to be directly specified.
10460         * method.c (do_build_copy_constructor): Explicitly convert to the
10461         base instance.
10462         (do_build_assign_ref): Likewise.
10464 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
10466         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
10467         declaration and initialization.
10469 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
10471         * typeck2.c: Remove leading capital from diagnostic messages, as
10472         per GNU coding standards.
10474 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
10476         PR c++/3394
10477         * decl.c (xref_basetypes): Handle attributes between
10478         'class' and name.
10480 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
10482         PR g++/3381
10483         * parse.y (named_complex_class_head_sans_basetype): Add new
10484         reduction.
10485         * Make-lang.in (parse.c): Adjust expected conflict count.
10487 2001-12-03  Jason Merrill  <jason@redhat.com>
10489         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
10490         immediate binfos for our virtual bases.
10492 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
10494         * call.c (build_java_interface_fn_ref): Similarly.
10495         * except.c (is_admissible_throw_operand): Similarly.
10496         * init.c (build_java_class_ref): Similarly.
10497         * xref.c (open_xref_file): Similarly.
10499 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
10501         * class.c (finish_struct): Remove trailing periods from messages.
10502         * decl.c (check_tag_decl): Similarly.
10503         * lex.c (cxx_set_yydebug): Similarly.
10504         * typeck2.c (friendly_abort): Similarly.
10506 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10508         PR c++/3048
10509         * cp-tree.h (ovl_member): Remove.
10510         * decl2.c (merge_functions): Handle extern "C" functions
10511         specially.
10512         * tree.c (ovl_member): Remove.
10514 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10516         PR c++/4842
10517         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
10518         FUNCTION_DECL, as input.
10519         (mark_overriders): Remove.
10520         (warn_hidden): Rework for the new ABI.
10522 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10524         PR c++/3471
10525         * call.c (convert_like_real): Do not build additional temporaries
10526         for rvalues of class type.
10528 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10530         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
10531         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
10532         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
10533         (DERIVED_FROM_P): Likewise.
10534         (enum base_access): Renumber, add ba_quiet bit mask.
10535         (get_binfo): Remove.
10536         (get_base_distance): Remove.
10537         (binfo_value): Remove.
10538         (ACCESSIBLY_DERIVED_FROM_P): Remove.
10539         * call.c (standard_conversion): Use lookup_base.
10540         * class.c (strictly_overrides): Likewise.
10541         (layout_virtual_bases): Likewise.
10542         (warn_about_ambiguous_direct_bases): Likewise.
10543         (is_base_of_enclosing_class): Likewise.
10544         (add_vcall_offset_vtbl_entries_1): Likewise.
10545         * cvt.c (build_up_reference): Adjust comment.
10546         * init.c (build_member_call): Reformat.
10547         * search.c (get_binfo): Remove.
10548         (get_base_distance_recursive): Remove.
10549         (get_base_distance): Remove.
10550         (lookup_base_r): Tweak.
10551         (lookup_base): Add ba_quiet control. Complete the types here.
10552         (covariant_return_p): Use lookup_base.
10553         * tree.c (binfo_value): Remove.
10554         (maybe_dummy_object): Use lookup_base.
10555         * typeck.c (build_static_cast): Use lookup_base.
10556         (get_delta_difference): Likewise.
10557         * typeck2.c (binfo_or_else): Use lookup_base.
10558         (build_scoped_ref): Add back error_mark_check.
10559         (build_m_component_ref): Use lookup_base.
10561 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10563         * Make-lang.in (c++.generated-manpages): New dummy target.
10565 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10567         * Make-lang.in (cp-lang.o): Depends on c-common.h.
10568         * cp-lang.c (c-common.h): Include.
10569         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
10570         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
10571         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
10573 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
10575         * decl2.c (c_language): Move to c-common.c.
10576         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
10577         functions.
10578         (cxx_init): Update.
10580 2001-11-26  Jason Merrill  <jason@redhat.com>
10582         * call.c (joust): Remove COND_EXPR hack.
10584 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
10586         * search.c (lookup_base_r): Declare bk in variable declaration
10587         space.
10589 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
10591         PR g++/3145
10592         * class.c (build_vbase_pointer): Remove.
10593         (build_vbase_path): Remove.
10594         (build_base_path): New function.
10595         * cp-tree.h (base_access, base_kind): New enumerations.
10596         (build_base_path): Declare.
10597         (convert_pointer_to_real): Remove.
10598         (convert_pointer_to): Remove.
10599         (lookup_base): Declare.
10600         (convert_pointer_to_vbase): Remove.
10601         * call.c (build_scoped_method_call): Use lookup_base &
10602         build_base_path instead of convert_pointer_to_real,
10603         get_base_distance & get_binfo.
10604         (build_over_call): Likewise.
10605         * cvt.c (cp_convert_to_pointer): Likewise.
10606         (convert_to_pointer_force): Likewise.
10607         (build_up_reference): Likewise.
10608         (convert_pointer_to_real): Remove.
10609         (convert_pointer_to): Remove.
10610         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
10611         instead of convert_pointer_to_vbase & build_vbase_path.
10612         (emit_base_init): Use build_base_path instead of
10613         convert_pointer_to_real.
10614         (expand_virtual_init): Lose unrequired conversions.
10615         (resolve_offset_ref): Use lookup_base and build_base_path
10616         instead of convert_pointer_to.
10617         * rtti.c (build_dynamic_cast_1): Use lookup_base &
10618         build_base_path instead of get_base_distance & build_vbase_path.
10619         * search.c (get_vbase_1): Remove.
10620         (get_vbase): Remove.
10621         (convert_pointer_to_vbase): Remove.
10622         (lookup_base_r): New function.
10623         (lookup_base): New function.
10624         * typeck.c (require_complete_type): Use lookup_base &
10625         build_base_path instead of convert_pointer_to.
10626         (build_component_ref): Likewise.
10627         (build_x_function_call): Likewise.
10628         (get_member_function_from_ptrfunc): Likewise.
10629         (build_component_addr): Likewise.
10630         * typeck2.c (build_scoped_ref): Likewise.
10632 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10634         * cp-tree.h (CP_TYPE_QUALS): Removed.
10635         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
10636         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
10637         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
10638         * dump.c (cp_dump_tree): Use void* dump_info argument to match
10639         lang-hooks prototype.
10640         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
10641         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
10642         CP_TYPE_QUALS changed to cp_type_quals.
10643         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
10644         (CXX_C_OBJS): Remove c-dump.o.
10646 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
10648         PR c++/3637
10649         * pt.c (lookup_template_class): Ensure that all specializations
10650         are registered on the list corresponding to the most general
10651         template.
10653 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
10655         * call.c (non_reference): Add documentation.
10656         (convert_class_to_reference): Do not strip reference types
10657         from conversion operators.
10658         (maybe_handle_ref_bind): Simplify.
10659         (compare_ics): Correct handling of references.
10661 2001-11-19  John Wilkinson <johnw@research.att.com>
10663         * dump.c (dump_op): New function.
10664         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
10665         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
10666         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
10668 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
10670         PR4629
10671         * semantics.c (finish_sizeof): Make sure that expression created
10672         while processing a template do not have a type.
10673         (finish_alignof): Likewise.
10674         * typeck.c (c_sizeof): Likewise.
10675         (expr_sizeof): Likewise.
10677 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
10679         * lex.c (cxx_finish): Call c_common_finish.
10680         (finish_parse): Remove.
10682 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10684         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
10685         when displaying error message about missing array bounds.
10687 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10689         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
10690         CONST_CAST_EXPR.
10691         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
10693 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
10695         * cp-tree.h (print_class_statistics): Restore.
10697 2001-11-15  Jason Merrill  <jason@redhat.com>
10699         * method.c (use_thunk): Don't emit debugging information for thunks.
10701         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
10702         * decl.c (make_typename_type): Handle getting a class template.
10703         * search.c (lookup_field_r): A class template is good enough for
10704         want_type.
10706         * call.c (convert_like_real): Only use cp_convert for the bad part.
10707         (standard_conversion): Also allow bad int->enum.
10708         * typeck.c (ptr_reasonably_similar): Also allow functions to
10709         interconvert.  Pointers to same-size integers are reasonably
10710         similar.
10712         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
10713         give it void type.
10715 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
10717         PR g++/3154
10718         * init.c (sort_base_init): Remove unreachable code.
10719         (expand_member_init): Adjust comment to reflect reality. Simplify
10720         and remove unreachable code.
10722 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
10724         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
10725         (cxx_init): Update prototype.
10726         * decl.c (init_decl_processing): Rename.  Move null node init
10727         to its creation time.
10728         * lex.c (cxx_init_options): Update.
10729         (cxx_init): Combine with old init_parse; also call
10730         cxx_init_decl_processing.
10732 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
10734         * decl.c (check_initializer): Try to complete the type of an
10735         array element before checking whether it's complete.  Don't
10736         complain about arrays with complete element types but an
10737         unknown size.
10738         (cp_finish_decl): Build the hierarchical constructor before
10739         calling maybe_deduce_size_from_array_init.
10741 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
10743         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
10745 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
10747         PR g++/4206
10748         * parse.y (already_scoped_stmt): Remove.
10749         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
10751 2001-11-12  H.J. Lu <hjl@gnu.org>
10753         * cvt.c (ocp_convert): Don't warn the address of a weak
10754         function is always `true'.
10756 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
10758         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
10759         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
10760         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
10761         * cp-tree.h (print_class_statistics): Remove.
10762         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
10763         cxx_print_identifier, cxx_set_yydebug): New.
10764         * lex.c (set_yydebug): Rename c_set_yydebug.
10765         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
10766         lang_print_xnode): Rename.
10767         * tree.c (print_lang_statistics): Rename.
10769 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10771         * class.c (dump_array): Fix format specifier warning.
10773 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
10775         * cp-lang.c (LANG_HOOKS_NAME): Override.
10776         (struct lang_hooks): Constify.
10777         * lex.c (cxx_init_options): Update.
10778         (lang_identify): Remove.
10779         * parse.y (language_string): Remove.
10781 2001-11-08  Andreas Franck  <afranck@gmx.de>
10783         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
10784         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
10785         suggested by autoconf.
10786         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
10787         (c++.install-common): Use the transformed target alias names.
10789 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10791         * Make-lang.in: Update.
10792         * cp-lang.c: Include langhooks-def.h.
10794 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10796         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
10798 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10800         * lex.c (copy_lang_type): Add static prototype.
10802 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10804         * pt.c (unify): Handle SCOPE_REF.
10806 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
10808         * tree.c (cp_copy_res_decl_for_inlining): Adjust
10809         DECL_ABSTRACT_ORIGIN for the return variable.
10811 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
10813         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10815 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
10817         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
10818         semantics.c, spew.c: Fix spelling errors.
10820 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10822         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
10824 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
10826         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
10827         pop_everything.
10829 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10831         * cp-lang.c (cxx_get_alias_set): New function.
10832         Point LANG_HOOKS_GET_ALIAS_SET to it.
10834 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10836         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
10837         * cp-tree.h (make_unbound_class_template): Prototype new function.
10838         * decl.c (make_unbound_class_template): New function.
10839         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
10840         * error.c (dump_type): Likewise.
10841         * mangle.c (write_type): Likewise.
10842         * parse.y (template_parm): Likewise.
10843         (template_argument): Use make_unbound_class_template.
10844         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
10845         (tsubst): Likewise.
10846         (tsubst_copy): Likewise.
10847         (unify): Likewise.
10848         * tree.c (walk_tree): Likewise.
10849         * typeck.c (comptypes): Likewise.
10851 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10853         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
10854         extra calls into fewer ones.
10856 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
10858         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
10859         Warn when merging inline with attribute noinline.
10860         (start_decl, start_function): Warn if inline and attribute
10861         noinline appear in the same declaration.
10863 2001-10-16  H.J. Lu <hjl@gnu.org>
10865         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
10866         for tree checking disabled.
10868 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
10870         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
10871         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
10873 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
10875         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
10876         (unify): Only handle MINUS_EXPR specially if the above flag is set
10877         and the subtracted constant is 1.  Clear the flag on recursive calls.
10878         Set it when unifying the maximum value in an INTEGER_TYPE's range.
10880 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
10882         * decl.c (bad_specifiers): Don't allow exception specifications
10883         on any typedefs.
10885 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
10887         * cp/lex.c (init_cp_pragma): Similarly.
10889 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10891         * pt.c (lookup_template_class): Build complete template arguments
10892         for BOUND_TEMPLATE_TEMPLATE_PARM.
10894 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10896         * cp-tree.h (TYPE_BINFO): Update comment.
10897         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
10898         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
10899         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
10900         (copy_type): Prototype new function.
10901         * lex.c (copy_lang_decl): Gather tree node statistics.
10902         (copy_lang_type): New function.
10903         (copy_type): Likewise.
10904         (cp_make_lang_type): Create lang_type for
10905         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
10906         and BOUND_TEMPLATE_TEMPLATE_PARM.
10907         * pt.c (tsubst): Use copy_type instead of copy_node.
10908         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
10910 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10912         * pt.c (determine_specialization): Ignore functions without
10913         DECL_TEMPLATE_INFO.
10915 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
10917         PR g++/4476
10918         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
10920 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
10922         * typeck2.c (store_init_value): Don't re-digest a bracketed
10923         initializer.
10925         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
10926         ANON_AGGR_TYPE_P.
10928 2001-10-11  Richard Henderson  <rth@redhat.com>
10930         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
10931         of an asm statement.
10932         (build_vtbl_ref_1): Split out from build_vtbl_ref.
10933         (build_vfn_ref): Use it to handle vtable descriptors before
10934         calling build_vtable_entry_ref.
10935         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
10937 2001-10-10  Richard Henderson  <rth@redhat.com>
10939         * parse.y (asm_operand): Allow named operands.
10940         * semantics.c (finish_asm_stmt): Tweek for changed location
10941         of the operand constraint.
10943 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
10945         * call.c (standard_conversion): Add bad conversion between
10946         integers and pointers.
10947         (convert_like_real): Don't use convert_for_initialization for bad
10948         conversions; complain here and use cp_convert.
10949         (build_over_call): Don't handle bad conversions specially.
10950         (perform_implicit_conversion): Allow bad conversions.
10951         (can_convert_arg_bad): New fn.
10952         * cp-tree.h: Declare it.
10953         * typeck.c (convert_for_assignment): Use it.
10954         (ptr_reasonably_similar): Any target type is similar to void.
10956 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
10958         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
10959         (cp/cp-lang.o): New rule.
10960         * cp-tree.h: Declare hooks.
10961         * tree.c: Make hooks non-static.
10962         (init_tree): Don't initialize hooks here.
10963         * lex.c: Likewise.  Move definition of lang_hooks to...
10964         * cp-lang.c: ... new file.
10966 2001-10-08  Richard Henderson  <rth@redhat.com>
10968         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
10969         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
10971 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10973         * class.c (build_vtable_entry_ref): Const-ify.
10974         * decl.c (predefined_identifier,
10975         initialize_predefined_identifiers): Likewise.
10976         * init.c (build_new_1): Likewise.
10977         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
10978         Likewise.
10980 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
10982         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
10983         (INSNS_PER_STMT): Likewise.
10984         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
10985         (copy_body, initialize_inlined_parameters): Likewise.
10986         (declare_return_variable, inlinable_function_p): Likewise.
10987         (expand_call_inline, expand_calls_inline): Likewise.
10988         (optimize_inline_calls, clone_body): Likewise.
10989         * tree.c (walk_tree): Moved to ../tree-inline.c.
10990         (walk_tree_without_duplicates): Likewise.
10991         (copy_tree_r, remap_save_expr): Likewise.
10993 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
10995         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
10996         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
10997         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
10998         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
10999         (flag_inline_trees): Moved declaration to ../tree-inline.h.
11000         (walk_tree): Moved declaration to ../tree-inline.h.
11001         (walk_tree_without_duplicates, copy_tree_r): Likewise.
11002         (remap_save_expr): Likewise.
11003         * decl.c: Include tree-inline.h.
11004         (lang_mark_tree): Don't mark inlined_fns.
11005         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11006         * optimize.c: Include tree-inline.h.
11007         (optimize_inline_calls): Move declaration to ../tree.h, as
11008         non-static.
11009         (remap_decl): Use language-independent constructs and hooks.
11010         (remap_block, copy_body_r, declare_return_variable): Likewise.
11011         (inlinable_function_p): Likewise.  Don't test for
11012         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11013         no longer language-specific.
11014         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
11015         call of dump_function to...
11016         (optimize_function): Here...
11017         (clone_body): New function, extracted from...
11018         (maybe_clone_body): ... here.  Build decl_map locally and pass
11019         it on to clone_body.
11020         * pt.c, semantics.c: Include tree-inline.h.
11021         * tree.c: Likewise.
11022         (cp_walk_subtrees): New language-specific hook for tree inlining.
11023         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11024         cp_is_overload_p, cp_auto_var_in_fn_p,
11025         cp_copy_res_decl_for_inlining): Likewise.
11026         (walk_tree): Move language-specific constructs into...
11027         (cp_walk_subtrees): this new function.
11028         (copy_tree_r): Use language-independent constructs and hooks.
11029         (init_tree): Initialize tree inlining hooks.
11030         (remap_save_expr): Adjust prototype so that the declaration
11031         does not require the definition of splay_tree.
11033 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11035         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11036         to build the declaration instead of the declaration itself.
11038 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
11040         * decl2.c (cxx_decode_option): Add 'else'.
11042         * spew.c (end_input): No longer static.
11043         * cp-tree.h: Declare it.
11044         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11046 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11048         * call.c (build_over_call), typeck.c (build_function_call_real):
11049         Pass type attributes to check_function_format rather than name or
11050         assembler name.  Don't require there to be a name or assembler
11051         name to check formats.
11053 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11055         * decl.c (init_decl_processing): Don't call
11056         init_function_format_info.  Initialize lang_attribute_table
11057         earlier.
11058         (builtin_function): Call decl_attributes.
11059         (insert_default_attributes): New.
11061 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
11063         * decl.c (grokdeclarator): Copy array typedef handling from C
11064         frontend.
11066         * decl.c (grokdeclarator): Copy too-large array handling from C
11067         frontend.
11069 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
11071         * config-lang.in (target_libs): Added target-gperf, so that we
11072         don't try to build it if C++ is disabled.
11074 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
11076         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
11077         (cp/errfn.o): Delete rule.
11078         (cp/error.o): Depend on flags.h.
11079         * errfn.c: Delete file.
11080         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
11081         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
11082         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
11083         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
11084         internal_error respectively.  Make cp_deprecated into a macro.
11085         Don't define cp_printer typedef or declare cp_printers.
11086         * error.c: Include flags.h.
11087         Delete: struct tree_formatting_info, print_function_argument_list,
11088         print_declaration, print_expression, print_function_declaration,
11089         print_function_parameter, print_type_id, print_cv_qualifier_seq,
11090         print_type_specifier_seq, print_simple_type_specifier,
11091         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
11092         print_parameter_declaration_clause, print_exception_specification,
11093         print_nested_name_specifier, and definition of cp_printers.
11094         (locate_error): New function.
11095         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
11096         rewritten in terms of locate_error and diagnostic.c.
11097         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
11098         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
11099         (init_error): Adjust to match.
11101 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11103         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
11105 2001-09-21  Richard Henderson  <rth@redhat.com>
11107         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
11108         (build_vtbl_initializer): Likewise.
11109         (build_vfn_ref): New.
11110         * cp-tree.h: Declare it.
11111         * call.c (build_over_call): Use it.
11112         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
11113         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
11115 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
11117         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
11119 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
11121         Table-driven attributes.
11122         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
11123         * decl2.c (cplus_decl_attributes): Only take one attributes
11124         parameter.
11125         * cp-tree.c (cplus_decl_attributes): Update prototype.
11126         * class.c (finish_struct), decl.c (start_decl, start_function),
11127         decl2.c (grokfield), friend.c (do_friend), parse.y
11128         (parse_bitfield): Update calls to cplus_decl_attributes.
11129         * decl.c (grokdeclarator): Take a pointer to a single ordinary
11130         attribute list.
11131         * decl.h (grokdeclarator): Update prototype.
11132         * decl2.c (grokfield): Take a single ordinary attribute list.
11133         * friend.c (do_friend): Likewise.
11134         * decl.c (shadow_tag, groktypename, start_decl,
11135         start_handler_parms, grokdeclarator, grokparms, start_function,
11136         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
11137         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
11138         (process_template_parm, do_decl_instantiation): Pass single
11139         ordinary attribute lists around.
11140         * decl.c (grokdeclarator): Correct handling of nested attributes.
11141         Revert the patch
11142         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
11143                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11144                 not the left.
11145         .
11146         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
11147         (cp_attribute_table): Declare.
11148         * decl.c (valid_lang_attribute): Don't define.
11149         (lang_attribute_table): Define.
11150         (init_decl_processing): Initialize lang_attribute_table instead of
11151         valid_lang_attribute.
11152         * tree.c (cp_valid_lang_attribute): Remove.
11153         (handle_java_interface_attribute, handle_com_interface_attribute,
11154         handle_init_priority_attribute): New functions.
11155         (cp_attribute_table): New array.
11156         * decl2.c (import_export_class): Don't use
11157         targetm.valid_type_attribute.
11159 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11161         * Make-lang.in (cp/error.o): Depend on real.h
11162         * error.c: #include "real.h"
11164 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11166         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
11167         xmalloc/strcpy/strcat.
11169 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11171         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
11172         Const-ification.
11173         * pt.c (tsubst_decl): Likewise.
11175 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11177         * decl2.c (lang_f_options): Const-ification.
11178         * lex.c (cplus_tree_code_name): Likewise.
11179         * spew.c (yyerror): Likewise.
11181 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11183         PR c++/3986
11184         * class.c (force_canonical_binfo_r): Check & move an indirect
11185         primary base first.
11186         (force_canonical_binfo): Check that it's not already
11187         canonical.
11188         (mark_primary_virtual_base): Remove BINFO parameter.
11189         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
11191 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11193         Remove TYPE_NONCOPIED_PARTS.
11194         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
11195         CLASSTYPE_PURE_VIRTUALS.
11196         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
11197         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
11198         (layout_class_type): Don't call fixup_inline_methods here ...
11199         (finish_struct_1): ... call it here.
11201 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
11203         * decl.c (duplicate_decls): Remove code deadling with
11204         DECL_SAVED_INSNS.
11205         * decl2.c (finish_file): Likewise.
11206         * pt.c (instantiate_decl): Likewise.
11207         * semantics.c (expand_body): Don't defer local functions if
11208         they wouldn't be deferred for some other reason.  Don't
11209         generate RTL for functions that will not be emitted.
11210         (genrtl_start_function): Remove code deadling with
11211         DECL_SAVED_INSNS.
11212         (genrtl_finish_function): Likewise.
11214 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11216         PR c++/4203
11217         * call.c (build_over_call): Do not optimize any empty base
11218         construction.
11220 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11222         * error.c (dump_template_decl): Output template parameters
11223         together with their specifiers.
11224         Output `class' prefix for template template parameter.
11225         (dump_decl): Fix formatting.
11227 2001-08-30  Kurt Garloff  <garloff@suse.de>
11229         * optimize.c (inlinable_function_p): Allow only smaller single
11230         functions. Halve inline limit after reaching recursive limit.
11232 2001-08-30  Joern Rennecke <amylaar@redhat.com>
11233             Jason Merrill  <jason_merrill@redhat.com>
11235         * class.c (build_vtable_entry_ref): Subtract in char*, not
11236         ptrdiff_t.
11238 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
11240         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
11241         (build_cplus_array_type): Use cp_build_qualified_type, not
11242         TYPE_MAIN_VARIANT, to get an unqualified version.
11244         * decl2.c (grok_alignof): Lose.
11245         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
11246         * typeck.c (c_alignof): Lose.
11247         * semantics.c (finish_sizeof, finish_alignof): New.
11248         * parse.y: Use them.
11249         * cp-tree.h: Declare them.
11251 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
11253         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
11254         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
11255         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
11257 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
11259         * typeck2.c (add_exception_specifier): Only require complete type if
11260         not in processing template declaration.
11262 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11264         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
11265         GNU_xref_start_scope and GNU_xref_end_scope.
11267         * tree.c (TYPE_HASH): Moved to ../tree.h.
11269 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
11271         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
11272         on COMPOUND_EXPRs.
11274 2001-08-14  Richard Henderson  <rth@redhat.com>
11276         * class.c, cp-tree.h (build_vfn_ref): Remove.
11277         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
11279 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
11281         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
11282         empty class assignment as having side-effects to avoid
11283         spurious warnings.
11285 2001-08-13  Zack Weinberg  <zackw@panix.com>
11287         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
11288         * except.c: Include libfuncs.h.
11290 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11292         * decl.c (grokdeclarator): Clarify diagnostic message.
11294 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11296         * decl2.c (do_nonmember_using_decl): Replace using directive
11297         with using declaration in the error message.
11299 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11301         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
11302         criterion to avoid rebuilding expression tree instead of
11303         processing_template_decl.
11305 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
11307         Support named return value optimization for inlines, too.
11308         * decl.c (finish_function): Nullify returns here.
11309         * semantics.c (genrtl_start_function): Not here.
11310         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
11311         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
11312         Also nullify the CLEANUP_STMT for the nrv.
11313         * cp-tree.h: Declare it.
11314         * optimize.c (declare_return_variable): Replace the nrv with the
11315         return variable.
11316         * typeck.c (check_return_expr): Be more flexible on alignment check.
11317         Ignore cv-quals when checking for a matching type.
11319 2001-08-09  Richard Henderson  <rth@redhat.com>
11321         * decl2.c (finish_objects): Use target hooks instead of
11322         assemble_constructor and assemble_destructor.
11324 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11326         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
11328 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
11330         PR c++/3820
11331         Stop using TYPE_NONCOPIED_PARTS.
11332         * call.c (build_over_call): Be careful when copy constructing
11333         or assigning to an empty class.
11334         * class.c (check_bases_and_members): It has a
11335         COMPLEX_ASSIGN_REF if it has a vptr.
11336         (layout_class_type): Don't add empty class padding to
11337         TYPE_NONCOPIED_PARTS.
11338         (finish_struct_1): Don't add the VFIELD either.
11339         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
11340         initialization.
11342 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
11344         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
11346 2001-08-06  Richard Henderson  <rth@redhat.com>
11348         * decl2.c (finish_objects): Pass a symbol_ref and priority to
11349         assemble_{constructor,destructor}.  Remove priority handling.
11351 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11353         Don't allow template-id in using-declaration.
11354         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
11355         (do_class_using_decl): Likewise.
11357 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11359         * cp/spew.c (read_token): No need to pop buffers.
11361 2001-08-02  Stan Shebs  <shebs@apple.com>
11363         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
11364         (fnaddr_from_vtable_entry): Remove decl.
11365         * method.c (use_thunk): Update comment.
11367 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
11369         * repo.c (get_base_filename): Change return value to const char
11370         pointer.
11372 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
11374         Kill -fhonor-std.
11375         * NEWS: Document.
11376         * cp-tree.h (flag_honor_std): Remove.
11377         (CPTI_FAKE_STD): Remove.
11378         (std_node): Remove comment about it being NULL.
11379         (fake_std_node): Remove.
11380         * decl.c (in_fake_std): Remove.
11381         (walk_namespaces_r): Remove fake_std_node check.
11382         (push_namespace): Remove in_fake_std code.
11383         (pop_namespace): Likewise.
11384         (lookup_name_real): Remove fake_std_node check.
11385         (init_decl_processing): Always create std_node. Always add
11386         std:: things there.
11387         (builtin_function): Always put non '_' fns in std.
11388         * decl2.c (flag_honor_std): Remove.
11389         (lang_f_options): Remove honor-std.
11390         (unsupported_options): Add honor-std.
11391         (set_decl_namespace): Remove fake_std_node check.
11392         (validate_nonmember_using_decl): Likewise.
11393         (do_using_directive): Likewise.
11394         (handle_class_head): Likewise.
11395         * dump.c (cp_dump_tree): Likewise.
11396         * except.c (init_exception_processing): Adjust.
11397         * init.c (build_member_call): Remove fake_std_node check.
11398         (build_offset_ref): Likewise.
11399         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
11400         * rtti.c (init_rtti_processing): Adjust.
11402 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
11404         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
11405         operand while calling cp_tree_equal.
11407 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11409         The 3.0 ABI no longer has vbase pointer fields.
11410         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
11411         FORMAT_VBASE_NAME): Remove.
11412         * method.c (do_build_copy_constructor): Adjust.
11413         (do_build_assign_ref): Adjust.
11414         * search.c (lookup_field_r): Adjust.
11415         * typeck.c (build_component_ref): Adjust.
11417         The 3.0 ABI always has a vtable pointer at the start of every
11418         polymorphic class.
11419         * rtti.c (build_headof_sub): Remove.
11420         (build_headof): Adjust.
11421         (get_tinfo_decl_dynamic): No need to check flag_rtti
11422         here. Adjust.
11423         (create_real_tinfo_var): Explain why we need a hidden name.
11425 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11427         PR c++/3631
11428         * class.c (update_vtable_entry_for_fn): The fixed adjustment
11429         of a virtual thunk should be from declaring base.
11431 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11433         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
11434         the shared virtual base, so preserving inheritance graph order.
11436 2001-07-30  Andreas Jaeger  <aj@suse.de>
11438         * decl2.c: Remove unused var global_temp_name_counter.
11440 2001-07-28  Richard Henderson  <rth@redhat.com>
11442         * method.c (pending_inlines): Remove.
11444 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
11446         * class.c (mark_primary_virtual_base): Don't adjust base
11447         offsets here.
11448         (dfs_unshared_virtual_bases): Adjust them here.
11449         (mark_primary_bases): Explain why we adjust at the end.
11451 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
11453         * class.c (finish_struct_1): When copying the primary base's
11454         VFIELD, make sure we find it is at offset zero.
11456 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11458         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
11459         tsubst_expr for default template arguments.
11461 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11463         PR c++/3621
11464         * spew.c (yylex): Only copy the token's lineno, if it is
11465         nonzero.
11467 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11469         PR c++/3624
11470         * call.c (resolve_args): Simplify, call
11471         convert_from_reference.
11472         (build_new_op): Resolve and convert from reference ARG1
11473         earlier. Adjust ARG2 & ARG3 resolve and conversion.
11475 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11477         * decl.c (last_function_parm_tags): Remove.
11478         (current_function_parm_tags): Remove.
11479         (init_decl_processing): Adjust.
11480         (start_function): Adjust.
11481         (store_parm_decls): Adjust.
11483         PR c++/3152
11484         * decl.c (grokdeclarator): Detect when a function typedef is
11485         declaring a function, and create last_function_parms correctly.
11487 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
11489         * call.c (joust): Only prefer a non-builtin candidate to a builtin
11490         one if they have the same signature.
11492         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
11493         it rather than toplevel_bindings_p.  Give it a mangled name if static.
11494         (convert_to_reference): Adjust.
11495         * decl2.c (get_temp_name): Lose.
11496         * mangle.c (mangle_ref_init_variable): New fn.
11497         (mangle_guard_variable): Strip the ref-init header.
11498         * cp-tree.h: Adjust.
11499         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
11500         initializer.
11501         (grok_reference_init): Always use DECL_INITIAL.
11503 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11505         PR c++/3416
11506         * call.c (build_conditional_expr): Recheck args after
11507         conversions.
11508         * cp-tree.h (build_conditional_expr): Move to correct file.
11509         * typeck.c (decay_conversion): Diagnose any unknown types
11510         reaching here.
11511         (build_binary_op): Don't do initial decay or default
11512         conversions on overloaded functions.
11513         (build_static_cast): Don't do a decay conversion here.
11515 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11517         PR c++/3543
11518         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
11519         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
11521 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11523         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
11524         (create_vtbl_ptr): ... here.
11526 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11528         * class.c (build_vbase_offset_vbtl_entries): Look for
11529         non-primary base of which we are a sub vtable.
11531 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
11533         * semantics.c (finish_this_expr):  Remove unused code.
11535 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
11537         Simplify rtti, now we've only one ABI.
11538         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
11539         CPTI_TINFO_VAR_ID.
11540         (tinfo_decl_id, tinfo_var_id): Remove.
11541         (get_typeid_1): Remove.
11542         * rtti.c
11543         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
11544         (typeid_ok_p): New function.
11545         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
11546         (get_tinfo_decl): Remove old abi documentation.
11547         (tinfo_from_decl): Remove.
11548         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
11549         (get_typeid_1): Remove.
11550         (get_base_offset): Remove.
11551         (synthesize_tinfo_var): Absorb get_base_offset.
11552         (create_real_tinfo_var): Don't use tinfo_decl_id.
11554 2001-07-23  Graham Stott  <grahams@redhat.com>
11556         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
11557         variable has_two_argument_delete_p.
11559 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
11561         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
11562         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
11563         (CPTI_INDEX_IDENTIFIER): Remove.
11564         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
11565         (delta2_identifier): Remove.
11566         (index_identifier): Remove.
11567         (pfn_or_delta2_identifier): Remove.
11568         (flag_vtable_thunks): Remove.
11569         (VTABLE_DELTA2_NAME): Remove.
11570         (VTABLE_INDEX_NAME): Remove.
11571         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
11572         (vfunc_ptr_type_node): Adjust.
11573         (VTABLE_NAME_PREFIX): Adjust.
11574         (build_vfn_ref): Lose first parameter.
11575         (fixup_all_virtual_upcast_offsets): Remove.
11576         * decl.c (initialize_predefined_identifiers): Remove
11577         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
11578         (init_decl_processing): Remove no-vtable-thunk code.
11579         * decl2.c (flag_vtable_thunks): Remove.
11580         (mark_vtable_entries): Remove no-vtable-thunk code.
11581         * error.c (dump_decl): Remove no-vtable-thunk code.
11582         (dump_expr): Adjust ptr to member function code.
11583         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
11584         code.
11585         * rtti.c (build_headof): Remove no-vtable-thunk code.
11586         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
11587         * search.c (get_base_distance): Remove expand_upcast_fixups case.
11588         (virtual_context) Remove.
11589         (expand_upcast_fixups): Remove.
11590         (fixup_virtual_upcast_offsets): Remove.
11591         (fixup_all_virtual_upcast_offsets): Remove.
11592         * typeck.c (get_member_function_from_ptrfunc): Remove
11593         no-vtable-thunk code.
11594         * call.c (build_over_call): Adjust call to build_vfn_ref.
11595         * class.c (build_vfn_ref): Lose first parameter. Remove
11596         no-vtable-thunk code.
11597         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
11598         (build_vtable_entry): Remove no-vtable-thunk code.
11600 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
11602         Remove old-abi remnants. Remove comments about old abi
11603         behavior. Remove references to 'new-abi' in comments.
11604         * cp-tree.h: Adjust comments.
11605         (vbase_offsets_in_vtable_p): Delete.
11606         (vcall_offsets_in_vtable_p): Delete.
11607         (vptrs_present_everywhere_p): Delete.
11608         (all_overridden_vfuns_in_vtables_p): Delete.
11609         (merge_primary_and_secondary_vtables_p): Delete.
11610         (TYPE_CONTAINS_VPTR_P): Adjust.
11611         (VTT_NAME_PREFIX): Remove.
11612         (CTOR_VTBL_NAME_PREFIX): Remove.
11613         (init_vbase_pointers): Remove.
11614         * class.c: Adjust coments.
11615         (build_vbase_pointer_fields): Delete.
11616         (build_vbase_pointer): Remove old-abi code.
11617         (build_secondary_vtable): Likewise.
11618         (modify_all_vtables): Likewise.
11619         (create_vtable_ptr): Likewise.
11620         (layout_class_type): Likewise.
11621         (finish_struct_1): Likewise.
11622         (finish_vtbls): Likewise.
11623         (dfs_finish_vtbls): Delete.
11624         (build_vbase_offset_vtbl_entries): Remove old-abi code.
11625         * cvt.c: Adjust comments.
11626         * decl.c: Adjust comments.
11627         * decl2.c: Adjust comments.
11628         * init.c: Adjust comments.
11629         (construct_virtual_bases): Remove old-abi code.
11630         * lang-specs.h: Remove -fno-new-abi.
11631         * mangle.c: Adjust comments.
11632         * rtti.c: Adjust comments.
11633         (get_base_offset): Remove old-abi-code.
11634         * search.c: Adjust comments.
11635         (dfs_init_vbase_pointers): Remove.
11636         (dfs_vtable_path_unmark): Remove.
11637         (init_vbase_pointers): Remove.
11638         * semantics.c: Adjust comments.
11639         (emit_associated_thunks): Remove old-abi code.
11640         * typeck.c: Adjust comments.
11642 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
11644         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
11645         params.h.
11647 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
11649         * class.c (finish_struct_anon): Forbid nested classes.
11651 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
11653         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
11654         * optimize.c: Include debug.h.
11655         (maybe_clone_body): Use debug hook.
11656         * semantics.c: Include debug.h.
11657         (expand_body): Use debug hook.
11659 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
11661         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
11663 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
11665         * class.c (type_requires_array_cookie): New function.
11666         (check_methods): Don't try to figure out whether the type needs a
11667         cookie here.
11668         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
11669         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
11670         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
11671         * pt.c (instantiate_class_template): Don't set
11672         TYPE_VEC_DELETE_TAKES_SIZE.
11673         * NEWS: Document ABI changes from GCC 3.0.
11675 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
11676             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
11678         * NEWS (Changes in GCC 3.0): Fix typo.
11680 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11682         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
11683         which attributes are to be attached, and a flags argument.  Update
11684         call to decl_attributes.
11685         (grokfield): Update call to decl_attributes.
11686         * class.c (finish_struct): Update call to cplus_decl_attributes.
11687         * cp-tree.h (cplus_decl_attributes): Update prototype.
11688         * decl.c (start_decl, grokdeclarator, start_function): Update
11689         calls to decl_attributes and cplus_decl_attributes.
11690         * friend.c (do_friend): Update call to cplus_decl_attributes.
11691         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
11693 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
11695         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
11696         for `register' variables with an asm-specification.
11698 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
11700         * semantics.c (finish_asm_stmt): Mark the output operands
11701         to an asm addressable, if necessary.
11703 2001-07-11  Ben Elliston  <bje@redhat.com>
11705         * Revert this change -- there is a subtle bug.
11707         PR c++/80
11708         * decl.c (finish_enum): New "attributes" argument; pass it to
11709         cplus_decl_attributes.  Use a narrower type if the enum is packed.
11710         * cp-tree.h (finish_enum): Adjust prototype.
11711         * parse.y (enum_head): New non-terminal.
11712         (structsp): Use it. Enums now may be preceded or followed by
11713         optional attributes -- pass their chained tree to finish_enum().
11714         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
11716 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
11718         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
11719         variables.
11721 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
11723         * semantics.c (cp_expand_stmt): Fix for null
11724         current_function_return_value.
11726 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
11728         * call.c (build_op_delete_call): Initialize fn.
11729         (convert_like_real): Delete conditional.
11730         (joust): Initialize *w and *l.
11731         * class.c: Add prototype for binfo_ctor_vtable.
11732         (get_primary_binfo): Initialize result.
11733         * init.c (build_java_class_ref): Initialize name.
11735 2001-07-09  Erik Rozendaal  <dlr@acm.org>
11737         * typeck.c (unary_complex_lvalue): Do not duplicate the
11738         argument to modify, pre-, or post-increment when used as an
11739         lvalue and when the argument has side-effects.
11741 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11743         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11744         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
11745         cplus_decl_attributes even if attrs is NULL.
11746         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11748 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11750         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
11751         calls to decl_attributes.
11753 2001-07-06  Ira Ruben   <ira@apple.com>
11755         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
11756         be DECL_TEMPLATE_RESULT.
11758 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11760         * cp-tree.h (copy_template_template_parm): Rename to ...
11761         (bind_template_template_parm): ... here.
11762         * tree.c (copy_template_template_parm): Rename to ...
11763         (bind_template_template_parm): ... here.  Remove the case when
11764         NEWARGS is NULL_TREE.
11765         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
11766         BOUND_TEMPLATE_TEMPLATE_PARM.
11767         * pt.c (lookup_template_class): Adjust.
11769 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
11771         * cvt.c (convert_lvalue): New fn.
11772         * cp-tree.h: Declare it.
11773         * method.c (do_build_assign_ref): Use it.
11774         (do_build_copy_constructor): Convert parm to base types
11775         before calling base constructors.
11777         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
11778         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
11779         optimize.
11780         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
11782 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
11784         * optimize.c (optimize_inline_calls): New function, broken out
11785         of ...
11786         (optimize_function): ... here. Call it. Don't inline if it is
11787         a thunk.
11788         (dump_function): Print name of dump flag causing this dump.
11789         * semantics.c (expand_body): Move thunk inline check to
11790         optimize_function.
11792 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
11794         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
11795         (comptypes): Use target.comp_type_attributes.
11797 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
11799         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
11801 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11803         * error.c (lang_print_error_function): Add a `diagnostic_context *'
11804         parameter. Tweak.
11806 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11808         * decl2.c (import_export_class): Update.
11810 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11812         * error.c (init_error): Adjust settings.
11814 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11816         * error.c (init_error): Adjust settings.
11818 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
11820         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
11821         return pointers to data members by reference rather than by value.
11823 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
11825         Implement the Named Return Value optimization.
11826         * cp-tree.h (struct cp_language_function): Add x_return_value.
11827         (current_function_return_value): Now a macro.
11828         * decl.c: Don't define it.
11829         (define_label, finish_case_label): Don't clear it.
11830         (init_decl_processing): Don't register it with GC.
11831         * semantics.c (genrtl_finish_function): Don't check it for
11832         no_return_label.  Copy the RTL from the return value to
11833         current_function_return_value and walk, calling...
11834         (nullify_returns_r): ...this new fn.
11835         * typeck.c (check_return_expr): Set current_function_return_value.
11837 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
11839         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
11840         sharing a ctor vtable with.  Merge code for cases 1 and 2.
11841         (binfo_ctor_vtable): New fn.
11842         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
11844 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
11846         * class.c (dfs_find_final_overrider): Fix logic.
11848         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
11849         virtual thunk instead of non-virtual.
11850         (get_matching_virtual): Uncomment.
11852         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
11853         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
11854         PARM, not ARG.
11856 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
11858         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
11859         we've not emerged from the hierarchy of RTTI_BINFO on reaching
11860         a non-virtual base.
11862 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
11864         * NEWS: Update release number.
11866 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
11868         PR c++/3130, c++/3131, c++/3132
11869         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
11870         * class.c (force_canonical_binfo_r): Move
11871         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
11872         virtual bases unless they're primary and what they're primary
11873         too has been moved.
11874         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
11875         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
11876         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
11877         derived binfo.
11878         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
11879         (layout_nonempty_base_or_field): Add most derived type
11880         parameter. Adjust.
11881         (layout_empty_base): Likewise.
11882         (build_base_field): Likewise.
11883         (build_base_fields): Likewise.
11884         (propagate_binfo_offsets): Add most derived type
11885         parameter. Skip non canonical virtual bases too.
11886         (dfs_set_offset_for_unshared_vbases): Don't skip primary
11887         bases. Do skip canonical bases.
11888         (layout_virtual_bases): Adjust.
11889         (layout_class_type): Adjust.
11890         (dfs_get_primary_binfo): Build list of virtual primary base
11891         candidates.
11892         (get_primary_binfo): Check that the shared virtual primary
11893         base candidate was found first.
11894         (accumulate_vtbl_inits): Don't do anything for non-vptr
11895         containing binfos. For case 1 primary virtual bases, keep
11896         checking that we've not emerged from the hierarchy of RTTI_BINFO.
11898 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
11900         PR c++/3089
11901         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
11902         hierarchy looking for primary bases for a ctor
11903         vtable. Recursively call oneself, if we meet our primary via
11904         this route and haven't met it yet via inheritance graph order.
11906 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
11908         * lang-options.h: Emit documentation for -fno-honor-std, not
11909         -fhonor-std.
11911 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
11913         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
11914         Don't clobber delta.
11915         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
11917 2001-06-10  Mark Mitchell <mark@codesourcery.com>
11918             Gabriel Dos Reis  <gdr@codesourcery.com>
11920         * Make-lang.in (cp/call.o): Depend on diagnostic.h
11921         (cp/typeck.o): Depend on diagnostic.h
11922         (cp/typeck2.o): Depend on diagnostic.h
11923         (cp/repo.o): Depend on dignostic.h
11924         * typeck.c: #include diagnostic.h
11925         (convert_for_initialization): Remove extern declaration for
11926         warningcount and errorcount.
11928         * call.c: #include diagnostic.h
11929         (convert_like_real): Remove extern declaration for warnincount and
11930         errorcount.
11932         * repo.c: #include diagnostic.h
11933         * typeck2.c: #include diagnostic.h
11935 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
11937         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
11938         in previous change.
11940 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
11942         PR c++/2929
11943         * friend.c (do_friend): Use push_decl_namespace for classes at
11944         namespace scope.
11946 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
11947             Jason Merrill <jason_merrill@redhat.com>
11949         PR c++/3061
11950         * class.c (build_secondary_vtable): Use assert, rather than an error
11951         message.
11952         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
11953         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
11954         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
11955         Don't set BINFO_VTABLE for a primary virtual base.
11957 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
11959         * decl.c (duplicate_decls): Update source position information
11960         when a template function is defined.
11962 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
11964         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
11966 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
11968         PR c++/2914
11969         * decl.c (pushtag): Don't push into a complete type's scope.
11971 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
11973         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
11974         (struct lang_decl_flags): Lose generate_with_vtable_p.
11975         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
11976         * class.c (copy_virtuals): Adjust.
11977         * decl2.c (mark_vtable_entries): Adjust.
11978         * method.c (make_thunk, build_vtable_entry): Adjust.
11979         * class.c (update_vtable_entry_for_fn): Only look as far as the
11980         first defining class.
11981         (build_vtbl_initializer): Put nothing in the slot for a function only
11982         defined in a lost primary virtual base.
11983         (add_vcall_offset_vtbl_entries_1): Use the same code for
11984         the lost primary case and the normal case.
11985         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
11986         (get_vfield_offset, get_derived_offset): Lose.
11987         (dfs_find_final_overrider): Use look_for_overrides_here.
11988         (get_matching_virtual): New fn.
11989         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
11990         not BV_VCALL_INDEX.
11991         * search.c (look_for_overrides_here): Split out from...
11992         (look_for_overrides_r): Here.
11994         * class.c (find_final_overrider): Return error_mark_node on error.
11996         * decl2.c (key_method): #if 0 accidental change.
11998 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12000         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12001         (build_over_call): Likewise.
12002         * decl.c (grokparms): Likewise.
12003         * pt.c (tsubst_decl): Likewise.
12004         * typeck.c (convert_arguments): Likewise.
12006 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
12008         * semantics.c (begin_class_definition): Robustify.
12010         * pt.c (instantiate_decl): Tell the repository code about the
12011         clones, not the cloned functions.
12012         * repo.c (repo_template_used): Explicitly instantiate the cloned
12013         function, not the clones.
12015 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12017         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12018         ICS_BAD_FLAG on created conversion.
12019         (compare_ics): Break out rank.
12021 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12023         * decl.c (xref_tag): Remove extraneous %s on dependent name
12024         lookup warning.
12026 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12028         * class.c (layout_vtable_decl): Fix off by one error on
12029         build_index_type.
12030         (build_vtt): Likewise.
12031         (build_ctor_vtbl_group): Likewise.
12033 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12035         * class.c (maybe_indent_hierarchy): New function.
12036         (dump_class_hierarchy_r): Add flags. Dump extra binfo
12037         information, if enabled. Use maybe_indent_hierarchy. Adjust
12038         output format.
12039         (dump_class_hierarchy): Adjust prototype. Adjust output format.
12040         (dump_array, dump_vtable, dump_vtt): New functions.
12041         (finish_struct_1): Adjust hierarchy dumping.
12042         (initialize_vtable): Call dump_vtable.
12043         (build_vtt): Call dump_vtt.
12044         (build_ctor_vtbl_group): Call dump_vtable.
12045         * decl2.c (flag_dump_class_layout): Remove.
12046         (cxx_decode_option): Remove dump translation unit
12047         and dump class hierarchy check. Call dump_switch_p.
12048         (finish_file): Adjust dumping.
12049         (dump.c): Only dump base classes if not TDF_SLIM.
12050         Only dump namespace members if not TDF_SLIM.
12051         * optimize.c (dump_function): New function.
12052         (optimize_function): Call dump_function.
12053         * semantics.c (expand_body): Use dump_enabled_p.
12055 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
12057         PR g++/2936
12058         Part missed from first commit
12059         * decl2.c (finish_anon_union): Copy context.
12061 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
12063         PR g++/2936
12064         * optimize.c (remap_decl): Remap anonymous aggregate members too.
12066 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
12068         PR g++/2823
12069         * semantics.c (expand_body): Don't optimize thunks.
12071 2001-05-25  Sam TH  <sam@uchicago.edu>
12073         * cp-tree.h lex.h: Fix header include guards.
12075 2001-05-25  Mark Mitchell <mark@codesourcery.com>
12077         * decl.c (init_decl_processing): Tweak.
12079 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
12081         * decl.c (duplicate_decls): Tidy.
12082         (init_decl_processing): Always set flag_no_builtin.
12084 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
12086         PR c++/2184
12087         * decl2.c (do_local_using_decl): Push the decls, even in a
12088         template.
12090 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
12092         * optimize.c (initialize_inlined_parameters): Don't set
12093         TREE_READONLY for a VAR_DECL taking the place of an inlined
12094         PARM_DECL.
12096 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
12098         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
12099         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
12100         attribute.
12102 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
12104         * parse.y: Refer to compound literals as such, not as
12105         constructor-expressions.
12107 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
12109         * call.c (build_op_delete_call): Ignore exception-specifications
12110         when looking for matching delete operators.
12111         * init.c (build_new_1): Compute whether or not the allocation
12112         function used is a placement allocation function or not, and
12113         communicate this information to build_op_delete_call.
12115 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
12117         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
12118         (build_vtbl_ref): Adjust.
12119         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
12120         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
12121         Re-add vtable-gc.
12122         (unsupported_options): Correspondingly.
12124         * decl2.c (maybe_make_one_only): Check flag_weak, not
12125         supports_one_only().
12127         * cp-tree.def (START_CATCH_STMT): Lose.
12128         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
12129         * tree.c (cp_statement_code_p): Don't case it.
12130         * semantics.c (cp_expand_stmt): Likewise.
12131         * cp-tree.h (START_CATCH_TYPE): Lose.
12132         (HANDLER_TYPE): New.
12133         * except.c (expand_start_catch_block): Don't start any blocks.
12134         Return the type.
12135         (expand_end_catch_block): Don't end any blocks.
12136         * parse.y (handler): Don't pass anything from finish_handler_parms
12137         to finish_handler.
12138         * pt.c (tsubst_expr): Likewise.
12139         * semantics.c (begin_handler): Call note_level_for_catch here.
12140         (finish_handler_parms): Don't return anything.
12141         (genrtl_catch_block, begin_catch_block): Lose.
12142         (genrtl_handler): Call expand_start_catch here.
12144 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
12146         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
12147         (get_vtable_decl, build_vtt): Not here.
12149 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
12151         PR c++/2781
12152         * optimize.c (update_cloned_parm): Copy addressability and other
12153         flags.
12155 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12157         * pt.c (determine_specialization): Ignore artificial functions.
12159 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
12161         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
12162         (C_RID_CODE): Remove.
12163         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
12164         (init_parse): Don't do it here.
12166 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
12168         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
12169         function declaration to avoid stripping the symbol's attributes.
12171 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
12173         * decl.c (pushdecl): Adjust error string.
12174         (xref_tag): Adjust friend class injection warning. Remove the
12175         inherited name from the class shadowed scope.
12177 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
12179         * except.c (cp_protect_cleanup_actions): New function.
12180         (init_exception_processing): Don't set protect_cleanup_actions
12181         here.  Do set lang_protect_cleanup_actions.
12183 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
12185         * spew.c (read_token): Call yyerror on all unexpected tokens.
12187 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
12189         * init.c (member_init_ok_or_else): Take a tree rather than
12190         string for name.
12191         (expand_member_init): Adjust.
12193 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
12195         * decl.c (duplicate_decls): Suppress warning about duplicate
12196         decls if the first decl is a friend.
12198 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
12200         * except.c (choose_personality_routine): Export.  Add
12201         explanatory comment.  Take an enum languages, not a boolean.
12202         (initialize_handler_parm): Adjust to match.
12203         * cp-tree.h: Prototype choose_personality_routine.
12204         * lex.c (handle_pragma_java_exceptions): New function.
12205         (init_cp_pragma): Register #pragma GCC java_exceptions.
12207 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12209         * method.c (build_mangled_C99_name): Remove unused prototype.
12211 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
12213         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
12214         * typeck.c (get_member_function_from_ptrfunc,
12215         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
12216         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
12218         Reverted Geoff Keating's 2001-05-03's patch.
12220 2001-05-11  Ira Ruben   <ira@apple.com>
12222         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
12224 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
12226         * cp-tree.h (finish_label_expr, lookup_label): Delete.
12227         * parse.y: Update for '&&'; don't issue warning here.
12228         * semantics.c (finish_label_expr): Delete.
12230 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
12232         * splay-tree.h (splay_tree_max): New function.
12233         (splay_tree_min): Likewise.
12235 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
12237         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
12238         (pfn_vflag_identifier): Define.
12239         Update comment about layout of pointer functions.
12240         (build_ptrmemfunc1): Update prototype.
12241         (expand_ptrmemfunc_cst): Update prototype.
12242         * decl.c (initialize_predefined_identifiers): Initialize
12243         pfn_vflag_identifier.
12244         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
12245         an extra field to the type.
12246         * expr.c (cplus_expand_constant): Pass 'flag' between
12247         expand_ptrmemfunc_cst and build_ptrmemfunc1.
12248         * typeck.c (get_member_function_from_ptrfunc): When
12249         FUNCTION_BOUNDARY < 16, look at additional field to determine
12250         if a pointer-to-member is a real pointer or a vtable offset.
12251         (build_ptrmemfunc1): Add new parameter to contain extra field.
12252         (build_ptrmemfunc): Pass the extra field around.
12253         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
12254         (pfn_from_ptrmemfunc): Ignore the extra field.
12256 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
12258         * cp-tree.h (flag_inline_trees): Update documentation.
12259         * decl.c (init_decl_processing): Adjust handling of
12260         flag_inline_functions and flag_inline_trees to support -O3.
12261         (grokfndecl): Set DECL_INLINE on all functions if that's what
12262         the user requested.
12263         (save_function_data): Clear DECL_INLINE in
12264         current_function_cannot_inline is non-NULL.
12265         * decl2.c (flag_inline_trees): Update documentation.
12267 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
12269         * dump.c (cp_dump_tree, USING_STMT case): New case.
12270         * tree.c (cp_statement_code_p): Add USING_STMT.
12271         * decl2.c (do_using_directive): Add the using directive statement.
12273         * tree.c (walk_tree): Reformat an if block.
12275 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
12277         * decl.c (compute_array_index_type): Don't try to do anything with
12278         the indices when processing a template.
12280 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12282         * call.c: NULL_PTR -> NULL.
12283         * class.c: Likewise.
12284         * cvt.c: Likewise.
12285         * decl.c: Likewise.
12286         * decl2.c: Likewise.
12287         * except.c: Likewise.
12288         * init.c: Likewise.
12289         * rtti.c: Likewise.
12290         * search.c: Likewise.
12291         * tree.c: Likewise.
12292         * typeck.c: Likewise.
12293         * typeck2.c: Likewise.
12295 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
12297         * decl2.c (do_using_directive): Revert previous patch.
12299 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12301         * cp-tree.def (USING_STMT): New statement node.
12302         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
12303         * decl2.c (do_using_directive): Add USING_STMT to statement
12304         tree. Don't emit errors when processing template decl.
12305         * pt.c (tsubst_expr, USING_STMT case): New case.
12306         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
12308 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12310         * call.c (build_new_op): Convert args from reference here.
12311         (build_conditional_expr): Don't convert here.
12313 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
12315         * spew.c (last_token_id): New static variable.
12316         (read_token): Set it here.
12317         (yyerror): Use it here.
12319 2001-04-30  Richard Henderson  <rth@redhat.com>
12321         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
12322         * decl.c: Likewise.
12324 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
12326         * gxxint.texi: Remove.
12327         * Make-lang.in: Remove all traces of gxxint.texi.
12329 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
12331         * decl2.c (start_static_initialization_or_destruction): Correct
12332         logic to handle the -fno-use-cxa-atexit case.
12334 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
12336         * optimize.c (update_cloned_parm): New function.
12337         (maybe_clone_body): Use it.  Update the `this' parameter too.
12339 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
12341         * decl2.c (unsupported_options): Add new-abi.
12342         * lang-options.h: Remove no longer supported options.
12344 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12346         * except.c (can_convert_eh): Don't check template parms,
12347         typename types etc.
12349 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12351         * optimize.c (maybe_clone_body): Copy parameter names and locations.
12353 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
12355         * cp-tree.h (adjust_clone_args): Prototype new function.
12356         * class.c (adjust_clone_args): New function.
12357         * decl.c (start_function): Call it for in charge ctors.
12359 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
12361         * method.c (use_thunk): Make sure that thunks really are emitted
12362         when requested.
12364 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
12366         * mangle.c (write_chars): New macro.
12367         (hwint_to_ascii): New function
12368         (write_number): Use it.
12369         (write_integer_cst): Deal with really big numbers.
12371 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
12373         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
12374         the clone.
12376 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
12378         * decl.c (grokdeclarator): Set context of namespace scope
12379         TYPE_DECLS.
12381 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
12383         * cp/optimize.c: Include hashtab.h.
12384         (struct inline_data): Add tree_pruner.
12385         (expand_call_inline, expand_calls_inline): Use it when calling
12386         walk_tree.
12387         (optimize_function): Initialize and free tree_pruner.
12389 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
12391         Lazy __FUNCTION__ generation.
12392         * cp-tree.def (FUNCTION_NAME): Remove.
12393         * cp-tree.h (function_name_declared_p): Remove.
12394         (cp_fname_init): Prototype.
12395         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
12396         don't call declare_function_name. Call start_fname_decls.
12397         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
12398         clobber the line number.
12399         (cp_fname_init): New function.
12400         (start_function): Call start_fname_decls.
12401         (finish_function): Call finish_fname_decls.
12402         * lex.c (reswords): Add slots for __FUNCTION__ et al.
12403         (rid_to_yy): Add mappings for __FUNCTION__ et al.
12404         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
12405         * parse.y (VAR_FUNC_NAME): New token.
12406         (primary): Add VAR_FUNC_NAME.
12407         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
12408         generation.
12409         (tsubst, FUNCTION_NAME case): Remove.
12410         (tsubst_copy, FUNCTION_NAME case): Remove.
12411         (tsubst_expr, DECL_STMT case): Be careful with a
12412         DECL_PRETTY_FUNCTION_P.
12413         (instantiate_decl): Remove function_name_declared_p.
12414         * semantics.c (begin_compound_statement): Don't call
12415         declare_function_name here.
12416         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
12417         (finish_translation_unit): Call finish_fname_decls.
12418         (expand_body): Remove function_name_declared_p.
12419         * typeck2.c (digest_init): Allow any ERROR_MARK.
12421 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
12423         * pt.c (tsubst_decl): Use VOID_TYPE_P.
12424         * semantics.c: Fix some typos.
12426 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
12428         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
12430 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12432         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
12434 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
12436         * except.c (build_throw): Wrap the initialization of the exception
12437         object in a MUST_NOT_THROW_EXPR.
12438         (do_free_exception): #if 0.
12440 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
12442         * cp-tree.h (finish_enum): Change prototype.
12443         * decl.c (finish_enum): Reorganize.
12444         * parse.y (structsp): Adjust calls to finish_enum.
12446 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12448         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
12449         't' case.
12451 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12453         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
12454         (layout_empty_base): Return at end flag.
12455         (build_base_field): Likewise.
12456         (build_base_fields): Likewise.
12457         (layout_virtual_bases): Don't add 1 to eoc value.
12458         (end_of_class): Use full size for empty bases.
12459         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
12460         empty bases. Don't add 1 to eoc value. Only add trailing padding
12461         if we're an empty class with no empty bases.
12462         (dump_class_hierarchy): Dump size and alignment.
12464 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
12466         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
12467         ICS_BAD_FLAG.
12469 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
12471         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
12472         is found, look first if name does not match the structure name.
12474 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
12476         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
12477         set.
12478         (SET_DECL_LANGUAGE): New macro.
12479         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
12480         (pushdecl): Likewise.
12481         (build_library_fn_1): Likewise.
12482         (build_cp_library_fn): Likewise.
12483         (grokfndecl): Likewise.
12484         (grokvardecl): Mark `extern "C"' variables as having C linkage.
12485         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
12486         * lex.c (retrofit_lang_decl): Likewise.
12487         * mangle.c (mangle_decl_string): Don't mangle the names of
12488         variables declared with C language linkage.
12489         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
12491 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12493         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
12494         flag_access_control from uninitialized storage.
12496 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
12498         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
12499         * mangle.c (write_pointer_to_member_type): Fix mangling of
12500         pointers to cv-qualified member function types.
12502         * init.c (build_delete): Create a SAVE_EXPR for the address if
12503         we're going to use it more than once.
12505 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
12507         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
12508         (expand_ptremfunc_cst): Change prototype.
12509         (delta2_from_ptrmemfunc): Remove.
12510         * expr.c (cplus_expand_constant): Adjust call to
12511         expand_ptrmemfunc_cst.
12512         * typeck.c (build_ptrmemfunc1): Simplify.
12513         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
12514         results in a constant.
12515         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
12516         (delta2_from_ptrmemfunc): Remove.
12517         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
12519 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
12521         * cp-tree.h (decl_namespace_list): New macro.
12522         (struct saved_scope): Add decl_ns_list.
12523         * decl.c (mark_saved_scope): Mark it.
12524         * decl2.c: Lose static decl_namespace_list.
12525         (init_decl2): Don't save it.
12527 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12529         * cp-tree.h (warn_return_type, yylex): Delete redundant
12530         declarations.
12532         * decl.c (current_class_depth, global_namespace): Likewise.
12534         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
12536         * repo.c (flag_use_repository): Likewise.
12538 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12540         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
12541         set_block, pushdecl, getdecls, gettags, init_decl_processing,
12542         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
12543         lvalue_or_else, print_lang_statistics, comp_target_types,
12544         unsigned_type, signed_type, signed_or_unsigned_type,
12545         build_function_call, mark_addressable, incomplete_type_error):
12546         Delete redundant declarations.
12548 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
12550         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
12551         (TYPE_ANONYMOUS_P): New macro.
12552         (TAGGED_TYPE_P): New macro.
12553         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
12554         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
12555         * tree.c (no_linkage_helper): Likewise.
12556         * semantics.c (begin_class_definition): Likewise.
12557         * pt.c (convert_template_argument): Likewise.
12558         * lex.c (check_for_missing_semicolon): Likewise.
12560 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
12562         * class.c (dfs_unshared_virtual_bases): New function.
12563         (mark_primary_bases): Call it.
12564         (check_bases): Ignore virtual bases when determining
12565         nearly-emptiness.
12567 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
12569         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
12571 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
12573         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
12574         cloned function to the clone.
12576 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12578         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
12580         * semantics.c: Include expr.h.
12582 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
12584         * method.c (implicitly_declare_fn): Commonize code for copy ctor
12585         and assignment op. Set TREE_USED for parameter.
12587 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
12589         * class.c (find_final_overrider_data): Add `candidates'.
12590         (dfs_find_final_overrider): Don't issue error messages
12591         prematurely.
12592         (find_final_overrider): Issue error messages here.
12593         (build_base_field): Don't warn about amgibuous direct bases here.
12594         (warn_about_ambiguous_direct_bases): New function.
12595         (layout_class_type): Use it.
12597 2001-04-10  Richard Henderson  <rth@redhat.com>
12599         * typeck.c (build_array_ref): Push the array reference inside
12600         COMPOUND_EXPR and COND_EXPR.
12602 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
12604         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
12605         * decl.c (duplicate_decls): Adjust accordingly.
12606         (maybe_commonize_var): Likewise.
12607         (grokfndecl): Likewise.
12608         (start_function): Likewise.
12609         (start_method): Likewise.
12610         * decl2.c (key_method): Likewise.
12611         (import_export_decl): Likewise.
12612         * method.c (implicitly_declare_fn): Likewise.
12613         * optimize.c (maybe_clone_body): Likewise.
12615 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
12617         * lang-specs.h: Add __DEPRECATED.
12619 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
12621         * search.c (get_dynamic_cast_base_type): When building a new
12622         constant, set its type to ssizetype.
12624 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
12626         * optimize.c (expand_call_inline): Only add newly inlined statements
12627         into inlined_stmts.
12629 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
12631         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
12632         (OPERATOR_FORMAT): Likewise.
12633         (OPERATOR_TYPENAME_FORMAT): Likewise.
12634         * operators.def: Remove old name-mangling information.
12635         * decl.c (grok_op_properties): Adjust accordingly.
12636         * lex.c (init_operators): Likewise.
12637         * rtti.c (get_tinfo_decl): Issue error messages about types that
12638         have variable size.
12640 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
12642         * decl2.c (import_export_decl): Don't call import_export_class
12643         when processing an inline member function.
12644         * semantics.c (expand_body): Call import_export_decl before
12645         emitting inline functions.
12647 2001-03-28  Richard Henderson  <rth@redhat.com>
12649         IA-64 ABI Exception Handling:
12650         * cp-tree.def (EH_SPEC_BLOCK): New.
12651         (MUST_NOT_THROW_EXPR): New.
12652         * cp-tree.h: Update changed function declarations.
12653         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
12654         (CPTI_CALL_UNEXPECTED): New.
12655         (struct cp_language_function): Rename x_eh_spec_try_block
12656         to x_eh_spec_block.
12657         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
12658         * decl.c (current_binding_level): If no current function
12659         bindings, revert to scope_chain.
12660         (initialize_predefined_identifiers): Remove __cp_push_exception.
12661         (store_parm_decls): Use begin_eh_spec_block.
12662         (finish_function): Use finish_eh_spec_block.
12663         (mark_lang_function): Update for name changes.
12664         * decl2.c (finish_file): No mark_all_runtime_matches.
12665         * dump.c (cp_dump_tree): Handle new tree codes.
12666         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
12667         * except.c (catch_language_init, catch_language): Remove.
12668         (init_exception_processing): Don't set language code.
12669         Initialize call_unexpected_node, protect_cleanup_actions,
12670         eh_personality_libfunc, lang_eh_runtime_type.
12671         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
12672         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
12673         (prepare_eh_type): Split out type canonicalizations ...
12674         (build_eh_type_type): ... from here.
12675         (build_eh_type_type_ref): Remove.
12676         (mark_all_runtime_matches): Remove.
12677         (build_exc_ptr): New.
12678         (do_begin_catch, do_end_catch): New.
12679         (do_pop_exception): Remove.
12680         (build_terminate_handler): Remove.
12681         (choose_personality_routine): Split out language choice from ...
12682         (initialize_handler_parm): ... here.
12683         Use MUST_NOT_THROW_EXPR.
12684         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
12685         exception object handling.
12686         (expand_start_eh_spec, expand_end_eh_spec): Remove.
12687         (expand_exception_blocks, alloc_eh_object): Remove.
12688         (begin_eh_spec_block, finish_eh_spec_block): New.
12689         (do_allocate_exception, do_free_exception): New.
12690         (expand_throw): Merge into ...
12691         (build_throw): ... here.  Update for abi.
12692         * expr.c (cplus_expand_expr): No expand_internal_throw.
12693         Handle MUST_NOT_THROW_EXPR.
12694         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
12695         * semantics.c (*) Update for except.h name changes.
12696         (genrtl_try_block): No protect_with_terminate.
12697         (genrtl_eh_spec_block): New.
12698         (genrtl_handler): Don't emit the goto here.
12699         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
12700         (genrtl_finish_function): Don't expand_exception_blocks.
12701         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
12703 2001-03-28  Richard Henderson  <rth@redhat.com>
12705         * decl.c (struct named_label_list): Rename eh_region to
12706         in_try_scope, add in_catch_scope.
12707         (struct binding_level): Rename eh_region to is_try_scope,
12708         add is_catch_scope.
12709         (note_level_for_try): Rename from note_level_for_eh.
12710         (note_level_for_catch): New.
12711         (poplevel): Copy both is_try_scope and is_catch_scope to
12712         the named_label_list struct.
12713         (check_previous_goto_1): Don't check for catch block via
12714         DECL_ARTIFICIAL; use in_try_scope instead.
12715         (check_goto): Likewise.
12716         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
12717         * except.c (expand_start_catch_block): Call note_level_for_catch.
12718         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
12720 2001-03-27  Richard Henderson  <rth@redhat.com>
12722         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
12723         exceptions_via_longjmp.
12725 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
12727         * pt.c (check_default_tmpl_args):  Make error messages clearer.
12729 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
12731         * error.c:  Also undefine 'A' macro used for cp_printers definition.
12733 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12735         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
12737 2001-03-26  Mike Yang <yang@research.att.com>
12738             Mark Mitchell  <mark@codesourcery.com>
12740         * dump.c (dump_access): New function.
12741         (cp_dump_tree): Use it.  Dump basetype information for class
12742         types.
12744 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
12746         * Makefile.in (optimize.o): Depend on params.h.
12747         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
12748         (init_decl_processing): Set flag_no_inline when doing
12749         inlining-on-trees.
12750         * optimize.c: Include params.h.
12751         (struct inline_data): Improve documentation of FNS.  Add
12752         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
12753         (INSNS_PER_STMT): New macro.
12754         (remap_block): Use CLONING_P.
12755         (inlinable_function_p): Don't inline big functions.
12756         (expand_call_inline): Keep track of how much inlining we've done.
12757         (optimize_function): Set FIRST_INLINED_FN.
12758         (maybe_clone_body): Set CLONING_P.
12759         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
12760         tree nodes.
12761         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
12762         rest_of_compilation.  Clear DECL_RTL for local variables
12763         afterwards.
12764         (clear_decl_rtl): New function.
12766 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
12768         Implement DR 209
12769         * cp-tree.h (skip_type_access_control,
12770         reset_type_access_control): Prototype.
12771         * decl.c (grokdeclarator): Access of friends is not checked.
12772         * parse.y (component_decl_list): Reset type access control.
12773         * semantics.c (decl_type_access_control): Clear
12774         current_type_lookups.
12775         (save_type_access_control): Don't save if not deferring.
12776         (skip_type_access_control, reset_type_access_control): New
12777         functions.
12778         (begin_class_definition): Do type access control for basetypes.
12779         Start deferred access control.
12780         (finish_class_definition): Resume immediate access control if
12781         this is a local class.
12783 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12785         * class.c (add_method): Use memcpy/memmove, not bcopy.
12787         * decl.c (duplicate_decls): Likewise.
12789 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
12791         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
12792         not `_'.
12794 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
12796         * decl.c (local_names): Define.
12797         (push_local_name): New.
12798         (grok_reference_init): Return init if initializing static reference
12799         variable with non-constant instead of emitting it.
12800         Move expand_static_init call to cp_finish_decl.
12801         (layout_var_decl): Call push_local_name.
12802         (maybe_commonize_var): Allow inlining functions even if they have
12803         static local variables, use comdat_linkage for them if flag_weak.
12804         (check_initializer): Call obscure_complex_init if
12805         grok_reference_init returned nonzero.
12806         (save_function_data): Clear x_local_names.
12807         (pop_cp_function_context): Free x_local_names.
12808         (mark_inlined_fns): Remove.
12809         (mark_lang_function): Mark x_local_names.
12810         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
12811         Mark inlined_fns as tree, remove call to mark_inlined_fns.
12812         * class.c (alter_access): Ensure DECL_ACCESS is never set if
12813         DECL_DISCRIMINATOR_P.
12814         * cp-tree.h (cp_language_function): Add x_local_names.
12815         (lang_decl_flags): Add discriminator into u2.
12816         (lang_decl_inlined_fns): Remove.
12817         (lang_decl): inlined_fns is now a TREE_VEC.
12818         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
12819         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
12820         TREE_VEC, not a custom structure.
12821         (optimize_function): Likewise.
12822         * mangle.c (discriminator_for_local_entity): Discriminate among
12823         VAR_DECL local entities.
12824         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
12825         is not valid.
12827 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
12829         Add support for Java interface method calls.
12830         * cp-tree.h (struct lang_type): Add java_interface flag.
12831         (TYPE_JAVA_INTERFACE): New macro.
12832         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
12833         by setting TYPE_JAVA_INTERFACE.
12834         * call.c (java_iface_lookup_fn): New static.
12835         (build_over_call): If calling a method declared in a
12836         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
12837         expression which resolves the function address.
12838         (build_java_interface_fn_ref): New function.
12840 2001-03-22  Richard Henderson  <rth@redhat.com>
12842         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
12843         * except.c: Don't include it.
12845 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
12846             based on an idea from Joe Buck <jbuck@synopsys.com>
12848         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
12849         New nonterminals.
12850         (data_def, component_decl): Add reductions to bad_decl.
12852 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
12854         * method.c (do_build_assign_ref): Don't use build_modify_expr for
12855         anonymous aggregates, since they don't have assignment operator
12856         method.
12857         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
12858         assignment operators for anonymous structure fields.
12860 2001-03-21  Jason Merrill  <jason@redhat.com>
12862         * pt.c (instantiate_decl): Abort if we see a member constant
12863         instantiation that doesn't already have its initializer.
12864         Downgrade explicit instantiation without definition to pedwarn.
12866         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
12867         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
12868         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
12870         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
12871         (pending_vtables): Remove.
12872         * decl2.c (pending_vtables): Remove.
12873         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
12874         CLASSTYPE_VTABLE_NEEDS_WRITING.
12875         (import_export_class): Likewise.
12876         (init_decl2): Don't mark pending_vtables.
12877         * lex.c (handle_pragma_vtable): Just sorry.
12878         * pt.c (instantiate_class_template): Don't mess with
12879         CLASSTYPE_VTABLE_NEEDS_WRITING.
12880         (mark_class_instantiated): Likewise.
12881         * ptree.c (print_lang_type): Don't print it.
12882         * semantics.c (begin_class_definition): Don't set it.
12884         * pt.c (template_tail): Replace with last_pending_template.
12885         (maybe_templates, maybe_template_tail): Remove.
12886         (add_pending_template): Adjust.
12887         (instantiate_pending_templates): Adjust.
12889         * cp-tree.h (struct saved_scope): Remove lang_stack field.
12890         (current_lang_stack): Remove.
12891         * decl.c (maybe_push_to_top_level): Don't initialize it.
12892         (duplicate_decls): Use current_lang_depth.
12893         (xref_basetypes): Likewise.
12894         * class.c (current_lang_depth): New fn.
12895         (push_lang_context): Use more varray functionality.
12896         (pop_lang_context): Likewise.
12898         * error.c (GLOBAL_THING): Always use '__'.
12900 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
12902         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
12904         * mangle.c (mangle_decl_string): Mangle the names of overloaded
12905         operators, even when they have `extern "C"' linkage.
12907 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
12909         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
12910         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12911         where it's not necessary.
12912         (add_method): Remove optimization involving comparison of
12913         DECL_ASSEMBLER_NAME.
12914         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
12915         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12916         where it's not necessary.
12917         (check_methods): Likewise.
12918         (build_clone): Likewise.
12919         (built_vtt): Likewise.
12920         * cp-tree.h (DECL_NEEDED_P): Likewise.
12921         * decl.c (pushtag): Likewise.
12922         (duplicate_decls): Likewise.
12923         (pushdecl): Likewise.
12924         (builtin_function): Likewise.
12925         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
12926         (build_cp_library_fn): Likewise.
12927         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
12928         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12929         where it's not necessary.
12930         (make_rtl_for_nonlocal_decl): Likewise.
12931         (cp_finish_decl): Likewise.
12932         (grokfndecl): Likewise.
12933         (grokvardecl): Likewise.
12934         (grokdeclarator): Likewise.
12935         (start_function): Likewise.
12936         (cp_missing_return_ok_p): Likewise.
12937         * decl2.c (grokclassfn): Likewise.
12938         (check_classfn): Likewise.
12939         (finish_static_data_member_decl): Likewise.
12940         (grokfield): Likewise.
12941         * error.c (GLOBAL_IORD_P): Remove.
12942         (dump_global_iord): Improve output.
12943         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
12944         * except.c (nothrow_libfn_p): Summarily reject any function not in
12945         namespace-scope.
12946         * init.c (build_java_class_ref): Don't explicitly set
12947         DECL_ASSEMBLER_NAME after calling mangle_decl.
12948         * mangle.c (mangle_decl_string): Handle extern "C" functions.
12949         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
12950         * method.c (set_mangled_name_for_decl): Don't explicitly set
12951         DECL_ASSEMBLER_NAME after calling mangle_decl.
12952         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
12953         IDENTIFIER_GLOBAL_VALUE for the thunk.
12954         * pt.c (set_mangled_name_for_template_decl): Remove.
12955         (check_explicit_specialization): Don't use it.
12956         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
12957         (tsubst_friend_function): Likewise.
12958         (tsubst_decl): Likewise.
12959         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
12960         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
12961         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12962         where it's not necessary.
12963         (tinfo_base_init): Likewise.
12964         (create_real_tinfo_var): Likewise.
12965         * search.c (looup_field_1): Likewise.
12966         * semantics.c (finish_named_return_value): Likewise.
12967         * tree.c (init_tree): Set lang_set_decl_assembler_name.
12969 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
12971         Correct semantics restrictions checking in throw-expression.
12972         * except.c (is_admissible_throw_operand): New function.
12973         (build_throw): Use it.
12975 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
12977         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
12978         and its ilk.
12980 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
12982         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12983         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
12984         * decl.c (duplicate_decls): Likewise.
12985         (builtin_function): Likewise.
12986         (build_library_fn): Likewise.
12987         (build_cp_library_fn): Likewise.
12988         (check_initializer): Likewise.
12989         (cp_finish_decl): Likewise.
12990         * decl2.c (grokfield): Likewise.
12991         (grok_function_init): Remove #if 0'd code.
12992         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12993         * friend.c (do_friend): Likewise.
12994         * init.c (get_temp_regvar): Likewise.
12995         * method.c (make_thunk): Likewise.
12996         * pt.c (tsubst_friend_function): Likewise.
12997         (tsubst_decl): Likewise.
12998         (regenerate_decl_from_template): Likewise.
12999         * semantics.c (genrtl_named_return_value): Likewise.
13000         (expand_body): Likewise.
13001         (genrtl_finish_function): Likewise.
13002         * tree.c (cp_tree_equal): Likewise.
13004 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
13006         * call.c (convert_like_real): Add extra semantics to INNER
13007         parameter. Don't convert to temporary if a user conversion
13008         gives us an lvalue that we're about to bind to a reference.
13009         Set INNER to indicate pending reference binding on recursive
13010         calls.
13012 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
13014         * cp/lex.c: Delete duplicate pending_lang_change.
13016 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
13018         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13019         Similarly.
13020         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13021         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13023 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
13025         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13027 2001-03-08  Stan Shebs  <shebs@apple.com>
13029         * cp-tree.h (set_identifier_local_value): Remove unused decl.
13031 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
13033         * spew.c: Remove references to CPP_OSTRING.
13035 2001-03-06  Andrew Haley  <aph@redhat.com>
13037         * typeck.c (convert_arguments): Check that we have an fndecl.
13039 2001-03-05  Andrew Haley  <aph@redhat.com>
13041         * typeck.c (convert_arguments): Don't do ellipsis conversion for
13042         __built_in_constant_p.
13044 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13046         * typeck.c (build_static_cast): Allow enum to enum conversions
13047         as per DR 128.
13049 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13051         * class.c (check_field_decls): Pointers to member do not a
13052         non-pod struct make, as per DR 148.
13054 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13056         * call.c (joust): cp_pedwarn when using gnu extension concerning
13057         worst conversion sequences.
13059 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
13061         * decl.c: Replace all uses of 'boolean' with 'bool'.
13063 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
13065         * lang-specs.h: Add zero initializer for cpp_spec field to
13066         all array elements that need one.  Don't put an #ifdef inside
13067         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13068         use it.
13070 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
13072         Implement using decls inside template functions.
13073         * decl2.c (validate_nonmember_using_decl): Don't special case
13074         fake_std_node in the global namespace. Don't reject early when
13075         processing a template.
13076         (do_local_using_decl): Add to statement tree. Don't do further
13077         processing when building a template.
13078         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
13080 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
13082         * decl2.c (do_nonmember_using_decl): Don't complain if we find
13083         same function. Do complain about ambiguating extern "C"
13084         declarations.
13086 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
13088         Remove floating point and complex type template constant parms.
13089         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
13090         COMPLEX_TYPE extensions.
13091         (invalid_nontype_parm_type_p): Likewise.
13093 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
13095         * except.c (call_eh_info): Revert "match_function"'s type.
13097 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
13099         Fix ctor vtable vcall offsets.
13100         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
13101         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
13102         (get_matching_base): Remove.
13103         (get_original_base): New function.
13104         (build_vtbl_initializer): Initialize vid.rtti_binfo.
13105         Use a virtual thunk for a ctor vtable with an index
13106         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
13107         primary base within a constructor vtable. Only set
13108         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
13109         when primary base has been lost.
13110         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
13112 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
13114         * call.c (joust): Ensure more_specialized()'s argument length
13115         parameter has correct value for constructors.
13117 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
13119         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
13121         * decl.c (mark_inlined_fns): Prototype.
13123 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
13125         * spew.c (yylex): Correct handling of friends.
13127 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
13129         * mangle.c (write_encoding): Pass write_function_type the
13130         FUNCTION_DECL for the function being encoded.
13131         (write_function_type): Pass it along to write_bare_function_type.
13132         (write_bare_function_type): Pass it along to write_method_parms.
13133         (write_method_parms): Don't mangle the compiler-generated
13134         parameters to a constructor or destructor.
13136 2001-02-22  Andreas Jaeger  <aj@suse.de>
13138         * optimize.c: Include toplev.h for
13139         note_deferral_of_defined_inline_function prototype.
13141 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
13143         * cp-tree.h (struct lang_decl_inlined_fns): New.
13144         (struct lang_decls): Add inlined_fns.
13145         (DECL_INLINED_FNS): New macro.
13146         * optimize.c (struct inline_data): Add inlined_fns.
13147         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
13148         (inlinable_function_p): Likewise, fix typo in comment,
13149         function is not inlinable if it already inlined function currently
13150         being optimized.
13151         (expand_call_inline): Add fn to inlined_fns if necessary.
13152         (optimize_function): Initialize inlined_fns.
13153         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
13154         * decl.c (mark_inlined_fns): New function.
13155         (lang_mark_tree): Call it.
13157 2001-02-21  Jason Merrill  <jason@redhat.com>
13159         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
13160         (DECL_UNINLINABLE): Move to middle-end.
13162         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
13163         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
13164         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
13165         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
13166         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
13168         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
13169         second parm of op=.
13171 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
13173         * decl2.c (set_decl_namespace): Allow explicit instantiations in
13174         any namespace.
13176 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13178         * optimize.c (expand_call_inline): Don't walk subtrees of type
13179         nodes.
13181 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
13183         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
13184         for a destructor.
13186 2001-02-18  Jason Merrill  <jason@redhat.com>
13188         Do put the VTT parameter in DECL_ARGUMENTS.
13189         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
13190         (current_vtt_parm): New macro.
13191         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
13192         (DECL_HAS_VTT_PARM_P): New macro.
13193         (DECL_VTT_PARM): Remove.
13194         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
13195         * decl.c (duplicate_decls): Only copy the operator code if
13196         appropriate.
13197         (start_function): Set current_vtt_parm.
13198         (lang_mark_tree): Don't mark vtt_parm.
13199         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
13200         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
13201         * class.c (build_clone): Maybe remove the VTT parm.
13202         * optimize.c (maybe_clone_body): Set up the VTT parm.
13203         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
13204         * call.c (build_over_call): Just allow the VTT arg.
13205         * method.c (make_thunk): Don't set DECL_VTT_PARM.
13206         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
13207         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
13208         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
13209         * error.c (dump_function_decl): Likewise.
13210         * call.c (build_user_type_conversion_1, convert_like_real): Abort
13211         if we try to call a constructor with in-charge or VTT parms.
13212         * method.c (skip_artificial_parms_for): New fn.
13213         * call.c (add_function_candidate, build_over_call): Call it.
13214         * call.c (build_new_method_call): Use current_vtt_parm.
13215         * init.c (expand_virtual_init): Likewise.
13216         * class.c (same_signature_p): No longer static.
13217         * cp-tree.h: Declare it.
13218         * search.c (look_for_overrides_r): Use it.
13220 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
13222         * cp-tree.h (new_abi_rtti_p): Remove.
13223         (name_mangling_version): Likewise.
13224         (flag_do_squangling): Likewise.
13225         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
13226         * decl.c (grokfndecl): Likewise.
13227         * decl2.c (name_mangling_version): Remove.
13228         (flag_do_squangling): Likewise.
13229         (lang_f_options): Remove `squangle'.
13230         (unsupported_options): Add `squangle'.
13231         (cxx_decode_option): Issue a warning about uses of
13232         -fname-mangling-version.
13233         (finish_file): Remove old ABI support.
13234         * pt.c (check_explicit_specialization): Likewise.
13235         (tsubst_decl): Likewise.
13236         * rtti.c (init_rtti_processing): Likewise.
13237         (build_headof): Likewise.
13238         (get_tinfo_decl_dynamic): Likewise.
13239         (tinfo_from_decl): Likewise.
13240         (build_dynamic_cast_1): Likewise.
13241         (synthesize_tinfo_var): Likewise.
13242         * init.c (build_new): Allow enumeration types for the array-bounds
13243         in a direct-new-declarator.
13245         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
13247         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
13248         TREE_PROTECTED from the template being specialized.
13250 2001-02-17  Jason Merrill  <jason@redhat.com>
13252         * decl2.c (build_artificial_parm): Set TREE_READONLY.
13254         * decl.c (bad_specifiers): Allow throw specs on things with
13255         pointer-to-function or -member-function type.
13256         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
13257         a pmf.
13259 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
13261         * call.c (check_dtor_name): Handle template names correctly.
13263 2001-02-16  Jason Merrill  <jason@redhat.com>
13265         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
13266         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
13267         * optimize.c (maybe_clone_body): Don't substitute it.
13268         * call.c (build_new_method_call): Check in_chrg instead.
13269         * init.c (expand_virtual_init): Likewise.
13271 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
13273         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
13274         class-type introduces at least a type-name.
13276 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
13278         * call.c (convert_like_real): Create a temporary for non-lvalue.
13280 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
13282         * cp-tree.h: Fix typos in comments.
13284 2001-02-16  Jason Merrill  <jason@redhat.com>
13286         * optimize.c (remap_block): If we're compiling a clone, pass the
13287         new block to insert_block.
13289 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
13291         * semantics.c (finish_asm_stmt): Robustify.
13293 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
13295         * pt.c (push_template_decl_real): Don't remangle the name of a
13296         class template.
13298 2001-02-15  Jim Meyering  <meyering@lucent.com>
13300         * Make-lang.in (c++.install-common): Depend on installdirs.
13301         (c++.install-info): Likewise.
13302         (c++.install-man): Likewise.
13304 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
13306         * typeck2.c (build_m_component_ref): Robustify.
13308 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
13310         * friend.c (do_friend): Don't take the nested [template] class
13311         into account when deciding whether to warn about the friend
13312         function not referring to a template function.
13314 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
13316         * typeck.c (build_unary_op): Clarify error message.
13318 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
13320         * parse.y (component_constructor_declarator): allow optional
13321         parentheses around constructor class name.
13323 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13325         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
13326         section.
13327         * init.c (emit_base_init): Remove incorrect comment about
13328         virtual bases.
13329         * method.c (make_thunk): Fix comment alignment.
13331 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13333         Kill remnants of this is variable.
13334         * cp-tree.h (flag_this_is_variable): Remove.
13335         * decl2.c (flag_this_is_variable): Remove.
13336         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
13337         (build_vbase_path): The path is non-static, even in a cdtor.
13338         (resolves_to_fixed_type_p): Add additional return value.
13339         * search.c (init_vbase_pointers): Adjust.
13340         * tree.c (lvalue_p_1): Adjust.
13341         * typeck.c (mark_addressable): Adjust.
13343 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13345         * pt.c (unify): Don't check cv quals of array types.
13347 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
13349         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
13350         check whether we already have the type.
13352 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
13354         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
13355         * call.c (build_op_delete_call): Simplify to remove duplicate
13356         code.
13357         * class.c (clone_function_decl): Don't build the deleting variant
13358         of a non-virtual destructor.
13359         * decl.c (finish_destructor_body): Don't call delete if this is a
13360         non-virtual destructor.
13361         * init.c (build_delete): Explicitly call `operator delete' when
13362         deleting an object with a non-virtual destructor.
13364 2001-02-13  Jason Merrill  <jason@redhat.com>
13366         * lang-specs.h: Add more __EXCEPTIONS.
13368 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13370         * typeck2.c (process_init_constructor): Check
13371         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
13373 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13375         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
13376         Remove spurious information in comment. Allow further
13377         adjustments of REFERENCE_TYPE args.
13379 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
13381         * errfn.c (cp_deprecated): Tweak diagnostic text.
13382         * parse.y (new_initializer): Deprecate initializer lists
13383         extension.
13385 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
13387         Remove old ABI support.
13389 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
13391         * decl2.c (flag_vtable_thunks): Always set it to 1.
13392         (flag_new_abi): Likewise.
13393         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
13395         * Makefile.in (g++spec.o): Fix typo.
13397 2001-02-09  Jason Merrill  <jason@redhat.com>
13399         * lang-specs.h: Restore definition of __EXCEPTIONS.
13401 2001-02-08  Jason Merrill  <jason@redhat.com>
13403         * search.c (shared_member_p): New function.
13404         (lookup_field_r): Use it.
13405         * cp-tree.h (SHARED_MEMBER_P): Remove.
13407         * method.c (process_overload_item): Handle template-dependent array
13408         bounds.
13409         * pt.c (type_unification_real): If we end up with undeduced nontype
13410         parms, try again.
13412         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
13413         types.
13415         * typeck2.c (friendly_abort): Don't say anything if we have
13416         earlier errors or sorries.
13418         * decl.c (check_tag_decl): Notice attempts to redefine bool and
13419         wchar_t.  Ignore if in_system_header.
13421         * decl.c (maybe_push_cleanup_level): New fn...
13422         (start_decl_1): ...split out from here.
13423         * cvt.c (build_up_reference): Use it.
13424         * cp-tree.h: Declare it.
13426 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
13428         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
13429         spec.
13431 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
13433         * pt.c (lookup_template_class): Make sure it's a primary
13434         template or template_template_parm when called from the parser.
13435         (instantiate_template_class): Add assertion.
13437 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
13439         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
13440         from error_mark_node.
13442 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
13444         Fix specification and implementation bugs in V3 ABI
13445         construction vtables.
13446         * cp-tree.h (flag_dump_class_layout): New flag.
13447         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
13448         (BINFO_LOST_PRIMARY_P): New flag.
13449         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
13450         (BINFO_PRIMARY_MARKED_P): Rename to ...
13451         (BINFO_PRIMARY_P): ... here.
13452         (binfo_via_virtual): New prototype.
13453         * decl2.c (flag_dump_class_layout): New flag.
13454         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
13455         use `=' as a file name separator.
13456         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
13457         bases.
13458         (build_vtbl_address): If this is a virtual primary base, then
13459         get the vtbl of what it is ultimately primary for.
13460         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
13461         for BINFO_PRIMARY_P.
13462         (dfs_skip_nonprimary_vbases_markedp): Likewise.
13463         (get_shared_vbase_if_not_primary): Likewise.
13464         (dfs_get_pure_virtuals): Likewise.
13465         (expand_upcast_fixups): Likewise.
13466         (fixup_virtual_upcast_offsets): Likewise.
13467         (dfs_find_vbase_instance): Likewise.
13468         (find_vbase_instance): Likewise.
13469         (binfo_from_vbase): Adjust comment to reflect reality.
13470         (binfo_via_virtual): New function.
13471         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
13472         for binfo walking during VTT construction.
13473         (dfs_mark_primary_bases): Remove.
13474         (force_canonical_binfo_r): New function.
13475         (force_canonical_binfo): New function.
13476         (mark_primary_virtual_base): New function.
13477         (mark_primary_bases): Walk in inheritance graph order, use
13478         mark_primary_virtual_base.
13479         (determine_primary_base): Use some more intermediate variables.
13480         (dfs_find_final_overrider): Don't check for overriding along a
13481         virtual path.
13482         (dfs_modify_vtables): Walk into primary virtual bases too.
13483         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
13484         (build_base_fields): Likewise.
13485         (dfs_set_offset_for_unshared_vbases): Likewise.
13486         (layout_virtual_bases): Likewise.
13487         (end_of_class): Likewise.
13488         (finish_struct_1): Call dump_class_hierarchy, if requested.
13489         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
13490         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
13491         (dump_class_hierarchy): Add file parameter. Append to file, if
13492         required.
13493         (finish_vtbls): Adjust accumulate_vtbl_inits call.
13494         Use canonical base for virtual bases.
13495         (build_vtt): Add more comments. Adjust build_vtt_inits call.
13496         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
13497         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
13498         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
13499         virtual VTTs.
13500         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
13501         from DATA.  We want virtual primary bases and all bases via virtual.
13502         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
13503         virtual base when not a construction vtable.
13504         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
13505         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
13506         Use canonical bases when processing virtual bases.
13507         (accumulate_vtbl_inits): We're interested in any base via a
13508         virtual path.
13509         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
13510         within a construction vtable, determine what is being overridden.
13511         (build_vtbl_initializer): Add more comments
13512         (add_vcall_offset_vtbl_entries_1): Adjust comment.
13513         (build_rtti_vtbl_entries): Check if the base has lost its
13514         primary.
13516 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
13518         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
13520 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13522         * decl.c (pushdecl): Call abort instead of fatal.
13523         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
13524         * init.c (build_new_1): Likewise.
13525         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
13526         * decl.c (build_typename_type): hash_table_init now returns void.
13527         decl.c (init_decl_processing): Make an error non-fatal.
13529 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
13531         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
13532         Document.
13533         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
13534         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
13535         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
13536         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
13537         * decl.c (maybe_commonize_var): Use the new name-mangling where
13538         appropriate.
13539         * decl2.c (comdat_linkage): Enhance comments.  Make all
13540         compiler-generated things static, if COMDAT is not available.
13541         (get_tinfo_decl): Do not make typeinfo objects that belong in the
13542         library COMDAT.
13543         (tinfo_base_init): Use the correct mangled name for typeinfo
13544         strings, and push them into the global scope.
13545         (typeinfo_in_lib_p): New function.
13546         (synthesize_tinfo_var): Use it.
13547         (create_real_tinfo_var): Likewise.
13549 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
13551         * decl.c (push_class_binding): Use context_for_name_lookup instead
13552         of CP_DECL_CONTEXT.
13553         * search.c (context_for_name_lookup): Remove static.  Check for NULL
13554         context in the loop.
13555         * cp-tree.h (context_for_name_lookup): Add prototype.
13557 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
13559         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
13560         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
13561         Remove.
13562         * call.c (convert_class_to_reference, build_user_type_conversion_1,
13563         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
13565 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
13567         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
13568         of macros used when compiling g++spec.c.
13569         * g++spec.c (lang_specific_driver): Link with the shared
13570         libgcc by default.
13572 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
13574         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
13575         make_reference_declarator, make_call_declarator), method.c
13576         (implicitly_declare_fn), parse.y (namespace_using_decl,
13577         notype_unqualified_id, expr_or_declarator, new_type_id,
13578         after_type_declarator, direct_after_type_declarator,
13579         notype_declarator, complex_notype_declarator,
13580         complex_direct_notype_declarator, qualified_id,
13581         notype_qualified_id, overqualified_id, direct_new_declarator,
13582         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
13583         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
13584         instead of build_parse_node.
13586 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13588         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
13589         (minus_one_node): Moved to top level gcc directory.  Renamed
13590         to integer_minus_one_node.
13592         * init.c (init_init_processing): Don't set minus_one_node.
13593         (build_vec_init): Use integer_minus_one_node.
13595         * rtti.c (get_tinfo_decl_dynamic): Likewise.
13597 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
13599         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
13600         identical and they would be replaced with constant, remove
13601         MODIFY_EXPR from the tree.
13603 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13605         * Make-lang.in: Remove all dependencies on defaults.h.
13606         * call.c: Don't include defaults.h.
13607         * decl.c: Likewise.
13608         * decl2.c: Likewise.
13609         * except.c: Likewise.
13610         * pt.c: Likewise.
13611         * rtti.c: Likewise.
13612         * tree.c: Likewise.
13613         * typeck.c: Likewise.
13615 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
13617         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
13618         operators even in "C" linkage.
13619         * method.c (set_mangled_name_for_decl): Likewise.
13620         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
13621         overloaded operators in "C" linkage.
13623 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
13625         * pt.c (tsubst_decl): Remove IN_DECL parameter.
13626         (tsubst_arg_types): Check parameter is not void.
13627         (tsubst): Adjust tsubst_decl call.
13629 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
13631         * call.c (add_builtin_candidate): Quote std properly, from
13632         previous change.
13634 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13636         * pt.c (check_explicit_specialization): Clone constructors and
13637         destructors.
13639 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
13641         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
13642         indicates anything special about template depth. Make sure we
13643         only count the user visible template classes.
13645 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
13647         * call.c (build_conv): Typo in comment.
13648         (add_builtin_candidate): Add more explanation.
13649         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
13650         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
13651         when we have enumeral types.
13652         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
13653         candidates for relops and eqops.
13654         (joust): Simplify control flow. Allow a non-template user
13655         function to hide a builtin.
13657 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
13659         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
13660         (more_specialized): Add deduction parameter.
13661         * call.c (joust): Adjust more_specialized call.
13662         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
13663         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
13664         (get_bindings_order): Remove.
13665         (get_bindings_real): Add DEDUCE parameter.
13666         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
13667         REFERENCE_TYPE jig for DEDUCE_ORDER.
13668         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
13669         maybe_adjust_types_for_deduction.
13670         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
13671         directly.
13672         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
13673         (check_cv_quals_for_unify): Use new unify qualifier flags.
13674         (unify): Clear new unify qualifier flags.
13675         (get_bindings_real): Add DEDUCE parameter.
13676         (get_bindings): Adjust call to get_bindings_real.
13677         (get_bindings_overload): Likewise.
13678         (most_specialized_instantiation): Adjust call to
13679         more_specialized.
13681 2001-01-19  Jason Merrill  <jason@redhat.com>
13683         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
13685         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
13686         -fnew-abi.
13688 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
13690         * decl2.c (arg_assoc_class): Fix double iteration logic.
13692 2001-01-19  Jason Merrill  <jason@redhat.com>
13694         * init.c (build_delete): Always call convert_force to strip cv-quals.
13696         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
13697         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
13698         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
13700 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13702         * search.c (get_vbase_1): Count only virtual bases.
13704 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13706         * class.c (duplicate_tag_error): Robustify flag clearing.
13708 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13710         * cp-tree.h (lookup_template_class): Add complain parm.
13711         * decl.c (lookup_namespace_name): Adjust call to
13712         lookup_template_class.
13713         (make_typename_type): Likewise.
13714         * semantics.c (finish_template_type): Likewise.
13715         * pt.c (lookup_template_class): Add complain parm. Adjust.
13716         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
13717         (tsubst): Likewise.
13719 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13721         * pt.c (copy_default_args_to_explicit_spec): Preserve
13722         object's CV quals. Reorganize.
13724 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13726         * typeck.c (build_modify_expr): Say `initialization' for
13727         INIT_EXPRs.
13728         * init.c (build_default_init): Convert to enumeral type, if
13729         needed.
13731 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
13733         * parse.y (nomods_initdcl0): Properly set things up for
13734         initdcl0_innards.
13736 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13738         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
13739         (type_unification_real): Set it.
13740         (unify): Use it.
13742 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13744         * decl.c (finish_destructor_body): Convert to vbase pointer here.
13746 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13748         * semantics.c (begin_class_definition): Check we're not inside a
13749         template parm list.
13751 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13753         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
13754         BASELINK_P.
13756 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13758         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
13759         * call.c (build_over_call): Add comment.
13761 2001-01-16 Daniel Berlin <dberlin@redhat.com>
13763         * cvt.c (ocp_convert): Handle vector type conversion
13764         * typeck2.c (digest_init): Handle vector type initializations
13766 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
13768         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
13769           was given.
13771 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
13773         * pt.c (check_nontype_parm): Rename to ...
13774         (invalid_nontype_parm_type_p): ... here.
13775         (process_template_parm): Adjust.
13776         (convert_template_argument): Adjust.
13778 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
13780         * pt.c (check_nontype_parm): New function.
13781         (process_template_parm): Use it.
13782         (convert_template_argument): Use it.
13783         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
13784         member.
13786 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
13788         * tree.c: Add defaults.h
13789         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
13790         * Make-lang.in (cp/tree.o): Add defaults.h.
13792 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
13794         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
13796 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
13798         * g++.1: Change to be ".so man1/gcc.1".
13800 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
13802         * Make-lang.in (c++.info, c++.install-info): Build and install g++
13803         internals info.
13804         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
13805         ($(srcdir)/cp/g++int.info): New target.
13806         * gxxint.texi: Add info directory entry.  Use @@ in email address.
13807         * .cvsignore: Update.
13809 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
13811         * typeck.c (build_c_cast): Do template processing earlier.
13812         Always pedwarn on array casts.
13814 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
13816         * friend.c (make_friend_class): Make sure a templated class is
13817         actually a template.
13819 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13821         * decl2.c (get_guard): Set linkage from guarded decl.
13823 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13825         * call.c (convert_default_arg): Check for unprocessed
13826         DEFAULT_ARG.
13827         * cp-tree.h (replace_defarg): Move to spew.c.
13828         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
13829         spew.c, which is where they really are.
13830         (done_pending_defargs): Declare.
13831         (unprocessed_defarg_fn): Declare.
13832         * decl.c (replace_defarg): Move to spew.c
13833         * parse.y (structsp): Call done_pending_defargs.
13834         * spew.c (defarg_fns): Rearrange list structure.
13835         (defarg_fnsdone): New static variable.
13836         (defarg_depfns): New static variable.
13837         (init_spew): Adjust.
13838         (add_defarg_fn): Store the type in TREE_TYPE.
13839         (do_pending_defargs): Detect and deal with ordering constraints
13840         and circularity.
13841         (done_pending_defargs): New function.
13842         (unprocessed_defarg_fn): New function.
13843         (replace_defarg): Moved from decl.c. Robustify. Don't save
13844         if circularity detected.
13846 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13848         * pt.c (unify): Check array has a domain, before checking
13849         whether it is variable sized.
13851 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13853         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
13854         parameters with pointers to arrays of unknown bound.
13856 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13858         * parse.y (template_parm_header, template_spec_header): New
13859         reductions. Split out from ...
13860         (template_header): ... here. Use them.
13861         (template_template_parm): Use template_parm_header.
13862         * semantics.c (finish_template_template_parm): Add assert.
13864 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
13866         * mangle.c (write_builtin_type): Fix thinko.
13868         * pt.c (copy_default_args_to_explicit_spec_1): New function.
13869         (copy_default_args_to_explicit_spec): Likewise.
13870         (check_explicit_specialization): Use it.
13872         * class.c (finish_struct_1):  Remove last argument in call to
13873         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
13874         * decl.c (builtin_function): Likewise.
13875         (build_cp_library_fn): Likewise.
13876         (check_initializer): Likewise.
13877         (make_rtl_for_nonlocal_decl): Likewise.
13878         (cp_finish_decl): Likewise.
13879         (start_function): Likewise.
13880         * decl2.c (finish_anon_union): Likewise.
13881         * friend.c (do_friend): Likewise.
13882         * init.c (build_java_class_ref): Likewise.
13883         * method.c (make_thunk): Likewise.
13884         * pt.c (tsubst_friend_function): Likewise.
13885         * semantics.c (expand_body): Likewise.
13887 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
13889         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
13890         looking at DECL_CLONED_FUNCTION for non-functions.
13892 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
13894         * error.c (dump_template_parameter): Use parm to determine how
13895         to print default value.
13897 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
13899         * class.c (duplicate_tag_error): Clear more flags.
13901 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
13903         * call.c (build_new_method_call): Use binfo_for_vbase.
13905 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
13907         * cp-tree.h (flag_cond_mismatch): Don't declare.
13908         * decl2.c (flag_cond_mismatch): Don't define.
13909         (lang_f_options): Remove cond-mismatch.
13910         (unsupported_options): Add cond-mismatch.
13912 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
13914         * class.c (handle_using_decl): Reject using of constructor name
13915         of sourcing class. Allow injecting of a method with same name as
13916         nested class. Fixup error messages.
13918 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
13920         * decl2.c (lang_decode_option): Handle -Wformat=2.
13922 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
13924         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
13925         initialized_in_class.
13926         (DECL_DEFINED_IN_CLASS_P): Rename to ...
13927         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
13928         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
13929         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
13930         * pt.c (check_default_tmpl_args): Adjust for
13931         DECL_INITIALIZED_IN_CLASS_P.
13932         (instantiate_class_template): Likewise.
13933         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
13935         * class.c (finish_struct): Constify saved_filename.
13937 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
13939         * class.c (duplicate_tag_error): Adjust diagnostic.
13940         (finish_struct): Locally set location to start of struct.
13941         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
13943 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
13945         * decl.c (struct binding_level): Adjust class_shadowed comments
13946         to reflect reality.
13947         (push_class_level_binding): Adjust comments to reflect reality.
13948         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
13949         Don't set TREE_VALUE on the class_shadowed list.
13951 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13953         * decl2.c (acceptable_java_type): Allow references too.
13954         * init.c (build_java_class_ref): When using the new ABI, search
13955         `class$' and have it mangled with `mangle_decl.'
13956         * mangle.c (write_java_integer_type_codes): New function.
13957         (write_builtin_type): Detect and mangle Java integer and real
13958         types.
13960 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
13962         * decl2.c (grokfield): Don't accept `asm' specifiers for
13963         non-static data members.
13965 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13967         * expr.c (cplus_expand_expr): Don't reset `target'.
13969 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
13971         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
13973 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
13975         * parse.y (template_datadef): Check for error_mark_node.
13977 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
13979         * cp-tree.def (DEFAULT_ARG): Make `x' class.
13981 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
13983         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
13984         (record_builtin_type): Make non-static.
13985         (flag_short_double): Don't declare.
13986         (init_decl_processing): Remove the creation of many tree nodes now
13987         in c_common_nodes_and_builtins.
13988         (build_void_list_node): New function.
13989         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
13990         * cp-tree.h (flag_short_wchar): Don't declare.
13992 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
13994         * call.c (build_conv): Don't use build1 for USER_CONV.
13995         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
13997 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
13999         * lex.c (lang_init): Call c_common_lang_init.
14001 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
14003         * search.c (lookup_fnfields_here): Remove.
14004         (look_for_overrides_r): Use lookup_fnfields_1.
14005         Ignore functions from using declarations.
14007 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
14009         Implement exceptions specifiers for implicit member functions.
14010         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14011         * method.c (synthesize_exception_spec): New function.
14012         (locate_dtor, locate_ctor, locate_copy): New functions.
14013         (implicitly_declare_fn): Generate the exception spec too.
14014         * search.c (check_final_overrider): Check artificial functions
14015         too.
14016         * typeck2.c (merge_exception_specifiers): New function.
14018 2001-01-03  Jason Merrill  <jason@redhat.com>
14020         * init.c (build_default_init): New fn.
14021         (perform_member_init): Split out from here.
14022         (build_new_1): Use it.  Simplify initialization logic.
14023         (build_vec_init): Take an array, rather than a pointer and maxindex.
14024         Speed up simple initializations.  Don't clean up if we're assigning.
14025         * cp-tree.h: Adjust.
14026         * decl2.c (do_static_initialization): Remove TREE_VEC case.
14027         * parse.y (new_initializer): Return void_zero_node for ().
14028         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14029         * typeck2.c (digest_init): Only complain about user-written
14030         CONSTRUCTORs.
14032 2000-12-22  Mike Stump  <mrs@wrs.com>
14034         * decl2.c: (max_tinst_depth): Increase to 50.
14036 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
14038         * class.c (invalidate_class_lookup_cache): Zero the
14039         previous_class_values.
14040         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14041         TREE_INT_CST_HIGH.
14042         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14043         * decl.c (free_bindings): New variable.
14044         (push_binding): Don't create a new binding if we have one on the
14045         free list.
14046         (pop_binding): Put old bindings on the free list.
14047         (init_decl_processing): Use size_int, not build_int_2.
14048         Register free_bindings as a GC root.
14049         (cp_make_fname_decl): Use size_int, not build_int_2.
14050         (push_inline_template_parms_recursive): Likewise.
14051         (end_template_parm_list): Likewise.
14052         (for_each_template_parm): Do not use walk_tree_without_duplicates.
14053         (tsubst_template_parms): Use size_int, not build_int_2.
14054         (tsubst): Likewise.
14055         * rtti.c (get_vmi_pseudo_type_info): Likewise.
14057 2001-01-02  Richard Henderson  <rth@redhat.com>
14059         * parse.y (asm): Set ASM_INPUT_P.
14061 2001-01-02  Jason Merrill  <jason@redhat.com>
14063         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14064         for v3 ABI.
14066         * typeck.c (cp_truthvalue_conversion): New fn.
14067         * cvt.c (ocp_convert): Use it.
14069         * cp-tree.h: Lose c-common.c decls.
14071         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
14072         * cvt.c (convert_to_void): Use type_unknown_p.
14074         * typeck.c (strip_all_pointer_quals): Also strip quals from
14075         pointer-to-member types.
14077         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
14078         parse.y as C.
14080         * call.c (build_new_method_call): Do evaluate the object parameter
14081         when accessing a static member.
14082         * typeck.c (build_component_ref): Likewise.
14084 2001-01-02  Andreas Jaeger  <aj@suse.de>
14086         * decl.c (cp_missing_noreturn_ok_p): New.
14087         (init_decl_processing): Set lang_missing_noreturn_ok_p.
14089 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
14091         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
14093 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
14095         * class.c (pushclass): Remove #if 0'd code.
14096         * cp-tree.h (overload_template_name): Remove.
14097         * decl.c (store_bindings): Simplify.
14098         (pop_from_top_level): Likewise.
14099         * pt.c (overload_template_name): Remove.
14100         (instantiate_decl): Don't call push_to_top_level if it's not
14101         needed.
14103 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
14105         * pt.c (register_local_specialization): Don't return a value.
14106         (lookup_template_class): Use move-to-front heuristic when looking
14107         up template instantiations.
14108         (instantiate_decl): Only push_to_top_level when we're actually
14109         going to instantiate the template.
14111 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
14113         * search.c (binfo_for_vtable): Return least derived class, not
14114         most.  Handle secondary vtables.
14116 2000-12-22  Jason Merrill  <jason@redhat.com>
14118         * pt.c (more_specialized): Don't optimize len==0.
14119         (fn_type_unification): If we're adding the return type, increase len.
14121         * typeck.c (build_binary_op): Fix pmf comparison logic.
14123         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
14124         DECL_STATIC_FUNCTION_P.
14126         * semantics.c (genrtl_finish_function): Don't try to jump to
14127         return_label unless it exists.
14129         In partial ordering for a call, ignore parms for which we don't have
14130         a real argument.
14131         * call.c (joust): Pass len to more_specialized.
14132         (add_template_candidate_real): Strip 'this', pass len.
14133         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
14134         (get_bindings_order): New fn.  Pass len down.
14135         (get_bindings_real): Strip 'this', pass len.
14136         (fn_type_unification): Likewise.
14137         (type_unification_real): Succeed after checking 'len' args.
14138         (most_specialized_instantiation): Lose explicit_args parm.
14139         * class.c (resolve_address_of_overloaded_function): Strip 'this',
14140         pass len.
14142 2000-12-21  Jason Merrill  <jason@redhat.com>
14144         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
14145         DECL_TEMPLATE_RESULT.
14147         * search.c (lookup_field_r): Call lookup_fnfields_1, not
14148         lookup_fnfields_here.
14150         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
14152         * call.c (build_object_call): Also allow conversions that return
14153         reference to pointer to function.
14154         (add_conv_candidate): Handle totype being ref to ptr to fn.
14155         (build_field_call): Also allow members of type reference to function.
14156         Lose support for calling pointer to METHOD_TYPE fields.
14158         * error.c (dump_expr): Handle *_CAST_EXPR.
14160         * typeck2.c (build_scoped_ref): Always convert to the naming class.
14162         * tree.c (break_out_cleanups): Lose.
14163         * cp-tree.h: Remove prototype.
14164         * typeck.c (build_component_ref): Don't break_out_cleanups.
14165         (build_compound_expr): Likewise.
14166         * semantics.c (finish_expr_stmt): Likewise.
14168 2000-12-20  Richard Henderson  <rth@redhat.com>
14170         * cp-tree.h: Update declarations.
14171         * decl.c (finish_case_label): Return the new stmt node.
14172         * semantics.c (finish_goto_stmt): Likewise.
14173         (finish_expr_stmt, finish_return_stmt): Likewise.
14174         (finish_break_stmt, finish_continue_stmt): Likewise.
14175         (finish_asm_stmt): Likewise.
14176         * parse.y (already_scoped_stmt): Set STMT_LINENO.
14177         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
14178         (simple_if, simple_stmt): Return the new stmt node.
14179         (save_lineno): New.
14181 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
14183         * cp-tree.h: Don't declare warn_long_long.
14185 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14187         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
14188         IS_AGGR_TYPE.
14190 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14192         * pt.c (unify): Handle when both ARG and PARM are
14193         BOUND_TEMPLATE_TEMPLATE_PARM.
14195 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14197         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
14198         DECL_TEMPLATE_PARM_P.
14200 2000-12-15  Jason Merrill  <jason@redhat.com>
14202         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
14204         * init.c (build_new_1): Don't strip quals from type.
14206         * decl.c (pushdecl): Don't check for linkage on a non-decl.
14208         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
14210         * call.c (build_new_function_call): Lose space before paren in
14211         error message.
14212         (build_new_method_call): Likewise.
14214         * typeck2.c (build_m_component_ref): Propagate quals from datum.
14216 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14218         * pt.c (check_explicit_specialization): Propagate default
14219         function arguments to explicit specializations.
14221 2000-12-13  DJ Delorie  <dj@redhat.com>
14223         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
14224         and <? operators.
14226 2000-12-08  Jason Merrill  <jason@redhat.com>
14228         * error.c (dump_function_name): Don't let the user see __comp_ctor.
14230         Clean up copy-initialization in overloading code.
14231         * call.c (build_user_type_conversion_1): Die if we are asked to
14232         convert to the same or a base type.
14233         (implicit_conversion): Avoid doing so.  Lose reference binding code.
14234         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
14235         direct-initialization.  Also do direct-init part of copy-init.
14236         (build_user_type_conversion): Don't provide context to convert_like.
14237         * cvt.c (ocp_convert): build_user_type_conversion will now provide
14238         the constructor call for copy-init.
14240         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
14241         instantiation of a member template.
14242         (do_decl_instantiation): Not here.
14244 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
14246         * class.c (check_field_decls): Don't special case anonymous
14247         fields in error messages.
14248         (note_name_declared_in_class): Use %D on diagnostic.
14250         * tree.c (pod_type_p): Use strip_array_types.
14251         (cp_valid_lang_attribute): Likewise.
14252         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
14253         multiple evaluations.
14254         (cp_has_mutable_p): Use strip_array_types.
14256 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
14258         * cp-tree.h (sufficient_parms_p): Declare new function.
14259         * call.c (sufficient_parms_p): New function, broken out of ...
14260         (add_function_candidate): ... here. Use it.
14261         (add_conv_candidate): Use it.
14262         * decl.c (grok_ctor_properties): Use it.
14264 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
14266         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
14268 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
14270         * decl2.c (lang_decode_option): Handle -Wformat-security.
14272 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14274         * pt.c (verify_class_unification): New function.
14275         (get_class_bindings): Use it.
14276         (try_class_unification): Tidy.
14277         (unify): Handle when argument of a template-id is not
14278         template parameter dependent.
14279         (template_args_equal): Handle when TREE_CODE's do not match.
14281 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
14283         * lang-specs.h (c++): When invoking the stand-alone preprocessor
14284         for -save-temps, pass all relevant -Defines to it, and then don't
14285         pass them to cc1plus.
14287 2000-12-05  Will Cohen  <wcohen@redhat.com>
14289         * decl.c (finish_case_label): Cleared
14290         more_cleanups_ok in surrounding function scopes.
14291         (define_label): Likewise.
14293 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
14295         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
14296         (get_matching_virtual): Remove.
14297         (look_for_overrides): Declare new function.
14298         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
14299         DECL_VINDEX here.
14300         * class.c (check_for_override): Move base class iteration code
14301         to look_for_overrides.
14302         * search.c (next_baselink): Remove.
14303         (get_virtuals_named_this): Remove.
14304         (get_virtual_destructor): Remove.
14305         (tree_has_any_destructors_p): Remove.
14306         (struct gvnt_info): Remove.
14307         (check_final_overrider): Remove `virtual' from error messages.
14308         (get_matching_virtuals): Remove. Move functionality to ...
14309         (look_for_overrides): ... here, and ...
14310         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
14311         to be overriding.
14313 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
14315         * typeck.c (get_delta_difference): If via a virtual base,
14316         return zero.
14317         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
14318         adjustment.
14320 2000-12-04  Richard Henderson  <rth@redhat.com>
14322         * error.c (dump_tree): Use output_add_string not OB_PUTS.
14324 2000-12-04  Jason Merrill  <jason@redhat.com>
14326         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
14327         (write_builtin_type): Pass intSI_type_node and the like through
14328         type_for_mode.
14329         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
14330         Pass intSI_type_node and the like through type_for_mode.
14331         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
14332         * pt.c (tsubst, unify): Likewise.
14333         * tree.c (walk_tree): Likewise.
14334         * error.c (dump_type): Likewise.
14335         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
14337         * Make-lang.in: Tweak top comment for emacs.
14338         (cp/TAGS): Restore.
14340         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
14342         * class.c (clone_function_decl): Robustify.
14344 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
14346         * decl.c (store_bindings): Only search in the non modified
14347         old_bindings for duplicates.
14349 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
14351         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
14352         TYPE_POLYMORPHIC_P.
14354         * typeck.c (build_static_cast): Remove unused variable.
14356 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14358         * pt.c: Fix typo in comment.
14360 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
14362         * decl2.c (warn_format): Remove definition.
14363         (lang_decode_option): Handle -Wformat-nonliteral,
14364         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
14366 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
14368         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
14369         (init_decl_processing): Don't create string_type_node,
14370         const_string_type_node, wint_type_node, intmax_type_node,
14371         uintmax_type_node, default_function_type, ptrdiff_type_node and
14372         unsigned_ptrdiff_type_node.  Adjust position of call to
14373         c_common_nodes_and_builtins.
14374         (identifier_global_value): New function.
14376 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
14378         * call.c (standard_conversion): Reject pointer to member
14379         conversions from ambiguous, inaccessible or virtual bases.
14380         * typeck.c (build_static_cast): Don't check pointers to members
14381         specially.
14383 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14385         * method.c (do_build_copy_constructor): Preserve cv
14386         qualifications when accessing source object members.
14387         (do_build_assign_ref): Likewise. Remove separate diagnostics for
14388         unnamed fields.
14390 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14392         * method.c (do_build_assign_ref): Construct appropriately
14393         CV-qualified base reference. Don't allow const casts in base
14394         conversion.
14396 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
14398         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
14399         incomplete return type.
14401 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14403         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
14404         * semantics.c (finish_base_specifier): Accept a _TYPE not a
14405         _DECL.
14407 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14409         * spew.c (yyerror): Cope if yylval.ttype is NULL.
14411 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14413         * decl.c (grokdeclarator): Diagnose undefined template contexts.
14415 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14417         * decl.c (grokdeclarator): Do type access control on friend
14418         class.
14420 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
14422         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
14423         bison parser ickiness.
14424         * pt.c (tsubst_friend_function): Enter namespace scope when
14425         tsubsting the function name.
14426         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
14428 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
14430         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
14431         * cvt.c (cp_convert_to_pointer): Add force parameter.
14432         Allow conversions via virtual base if forced.
14433         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
14434         (ocp_convert): Likewise.
14435         * search.c (binfo_from_vbase): Return the virtual base's binfo.
14436         * typeck.c (get_delta_difference): Adjust handling of virtual
14437         bases.
14439 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
14441         * tree.c (struct list_hash): Remove.
14442         (list_hash_table): Make it be an htab.
14443         (struct list_proxy): New type.
14444         (list_hash_eq): New function.
14445         (list_hash_pieces): Renamed from ...
14446         (list_hash): ... this.
14447         (list_hash_lookup): Remove.
14448         (list_hash_add): Remove.
14449         (hash_tree_cons): Use the generic hashtable.
14450         (mark_list_hash): Remove.
14451         (init_tree): Create the hashtable.
14453 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
14455         * method.c (build_mangled_C9x_name): Rename to
14456         build_mangled_C99_name.  Change C9X references in comments to
14457         refer to C99.
14459 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
14461         * parse.y (unary_expr): Move VA_ARG from here ...
14462         (primary): ... to here.
14464 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
14466         * semantics.c (finish_id_expr): If type is error_mark, return
14467         error_mark.
14469 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
14471         * pt.c (lookup_template_class): Simplify loop exit constructs.
14472         Cope when there is no partial instantiation of a template
14473         template member.
14475 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
14477         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
14479 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
14481         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
14482         prefix.
14484         * pt.c (do_decl_instantiate): Explicitly clone constructors and
14485         destructors that haven't already been cloned.
14487 2000-11-20  Richard Henderson  <rth@redhat.com>
14489         * parse.y (yyparse_1): Rename the parser entry point.
14491 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
14493         * mangle.c (write_name): Use <unscoped-name> for names directly in
14494         function scope.
14495         (write_unscoped_name): Accept names directly in function scope.
14497 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
14499         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
14500         * parse.y (extdef): Add EXPORT reduction.
14501         * spew.c (yylex): Don't skip export here.
14503 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
14505         * decl.c (init_decl_processing): Correct name of pure virtual
14506         function under the new ABI.
14507         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
14508         (throw_bad_typeid): Likewise for bad typeid function.
14510 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
14512         * decl.c (grokparms): Don't even function types of `void' type,
14513         either.
14514         * mangle.c (write_type): Don't crash when confronted with the
14515         error_mark_node.
14517         * decl.c (grokparms): Don't create parameters of `void' type.
14519 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
14521         * lex.c (mark_impl_file_chain): Delete.
14522         (init_parse): Remove call to ggc_add_string_root.  No need to
14523         ggc_strdup a string constant.  Do not add impl_file_chain to GC
14524         roots.
14525         (handle_pragma_implementation): No need to ggc_strdup main_filename.
14527 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14529         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
14531 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14533         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
14534         * decl.c (grokdeclarator): Don't reject void parms here.
14535         (require_complete_types_for_parms): Simplify, use
14536         complete_type_or_else.
14537         (grokparms): Remove bitrot. Remove funcdef parm.
14538         Deal with ellipsis parm lists here.
14539         * semantics.c (finish_parmlist): Don't append void_list_node
14540         here. Set PARMLIST_ELLIPSIS_P.
14542 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14544         * typeck2.c (incomplete_type_error): Reorganize to avoid
14545         excessive diagnostics.
14547 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
14549         * lex.c (struct impl_files, internal_filename): Constify a char *.
14551 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
14553         * mangle.c (write_special_name_constructor): Don't generate
14554         assembler junk when confronted with an old-style constructor.
14555         (write_special_name_destructor): Likewise.
14556         (mangle_decl_string): Do it here instead.
14558 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
14560         * call.c (op_error): Make error messages clearer.
14562 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
14564         * decl.c (wrapup_globals_for_namespace): Don't mark things
14565         TREE_ASM_WRITTEN when they're not.
14567 2000-11-15  Jason Merrill  <jason@redhat.com>
14569         * typeck2.c (friendly_abort): Uncount the error before handing
14570         off to fancy_abort.
14572 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
14574         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
14576 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
14578         * class.c (build_vtbl_initializer): Fix typo in comment.
14579         * typeck.c (expr_sizeof): Don't crash on errors.
14581 2000-11-14  Jim Wilson  <wilson@redhat.com>
14583         * lang-specs.h: Add %2 after %(cc1_options).
14585 2000-11-14  Richard Henderson  <rth@redhat.com>
14587         * typeck.c (c_sizeof): Be strict about casting result value
14588         back to c_size_type_node.
14589         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
14591 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14593         * typeck.c (build_unary_op): Use boolean_increment from
14594         c-common.c, moving the relevant code there.
14596 2000-11-11  Jason Merrill  <jason@redhat.com>
14598         * typeck.c (mark_addressable): Don't call put_var_into_stack.
14600         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
14601         in inlines.
14603 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14605         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
14606         * lex.c (copy_lang_decl): Likewise.
14608 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
14610         * dump.c (cp_dump_tree): Don't dump function bodies here.
14612         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
14613         (dump.o): Update dependency list.
14614         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
14615         (flag_dump_translation_unit): Likewise.
14616         (CP_TYPE_QUALS): Adjust definition.
14617         (DECL_C_BIT_FIELD): Remove.
14618         (SET_DECL_C_BIT_FIELD): Likewise.
14619         (CLEAR_DECL_C_BIT_FIELD): Likewise.
14620         (add_maybe_template): Likewise.
14621         (strip_array_types): Likewise.
14622         (dump_node_to_file): Likewise.
14623         (cp_dump_tree): New function.
14624         * decl.c (init_decl_processing): Set lang_dump_tree.
14625         * decl2.c (flag_dump_translation_unit): Remove.
14626         * dump.c: Move most of it to ../c-dump.c.
14627         (cp_dump_tree): New function.
14628         * pt.c (add_maybe_template): Remove.
14629         * typeck.c (strip_array_types): Likewise.
14631 2000-11-07  Eric Christopher  <echristo@redhat.com>
14633         * decl.c (init_decl_processing): Change definition of
14634         __wchar_t to wchar_t.  Remove artificial declaration of
14635         wchar_t.
14636         * lex.c: Change instances of __wchar_t to wchar_t.
14638 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
14640         * lex.c (do_identifier): Don't lookup_name for operators.
14641         * parse.y (operator): Save looking_for_typename.
14642         (unoperator): Restore it.
14643         * spew.c (frob_opname): Use nth_token for lookahead.
14645 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
14647         * decl.c (grok_op_properties): Always use coerce_new_type and
14648         coerce_delete_type.
14649         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
14650         exception specification. Tidy up.
14651         (coerce_delete_type): Preserve exception specification. Tidy up.
14653 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
14655         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
14656         (push_binding_level), error.c (cp_tree_printer), pt.c
14657         (process_partial_specialization, tsubst_template_arg_vector),
14658         search.c (lookup_member): Use memset () instead of bzero ().
14660 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
14662         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
14664 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
14666         * Make-lang.in (c++.distdir): Remove.
14668 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
14670         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
14671         declarations from different namespaces to be combined.
14673 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
14675         * decl.c: Include tm_p.h.
14677 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
14679         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
14681 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
14683         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
14684         (build_overload_value), repo.c (open_repo_file), xref.c
14685         (open_xref_file): Use strchr () and strrchr () instead of index ()
14686         and rindex ().
14688 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
14690         * call.c (build_over_call): Call fold on the CALL_EXPR.
14692 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
14694         * error.c (dump_template_decl): Separate template hearders with
14695         space not comma.
14697 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
14699         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
14700         TS_* flags with corresponding TFF_*.  Adjust prototypes of
14701         functions (which used to take a tree_string_flags) to take an int.
14703         * cp-tree.h (enum tree_string_flags): Remove
14704         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
14705         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
14706         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14707         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14708         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
14709         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
14710         (type_as_string, decl_as_string, expr_as_string,
14711         context_as_string): Adjust prototype.
14713         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
14714         instead of TS_PLAIN.
14716         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
14717         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
14718         plain `0'.
14720 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
14722         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
14723         (linkage_kind): New enumeration.
14724         (decl_linkage): New function.
14725         * decl2.c (comdat_linkage): Extend comment.
14726         * error.c (dump_function_decl): Print the arguments used to
14727         instantiate a template, even when not printing the type of the
14728         function.
14729         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
14730         not TREE_PUBLIC, to test for external linkage.
14731         * tree.c (decl_linkage): New function.
14733 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
14735         * pt.c (instantiate_decl): Always instantiate static data members
14736         initialized in-class.
14738 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
14740         * Make-lang.in: Move all build rules here from Makefile.in,
14741         adapt to new context.  Wrap all rules that change the current
14742         directory in parentheses.  Expunge all references to $(P).
14743         When one command depends on another and they're run all at
14744         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
14745         all object-file generation rules.  Delete obsolete variables.
14747         * Makefile.in: Delete.
14748         * config-lang.in: Delete outputs= line.
14750 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
14752         * error.c (dump_function_decl): Print no space between
14753         `ptr-operator' the `type-specifier' of the return type.
14754         (dump_type_prefix): Make sure we put space at the appropriate
14755         place.
14757 2000-10-23  Jason Merrill  <jason@redhat.com>
14759         * call.c (equal_functions): Also call decls_match for extern "C" fns.
14761 2000-10-22  Jason Merrill  <jason@redhat.com>
14763         * call.c (build_conditional_expr): Use ocp_convert to force
14764         rvalue conversion.
14766 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
14768         * call.c (standard_conversion): Use RVALUE_CONVs for all
14769         expressions that satisfy lvalue_p, not just those that satisfy
14770         real_lvalue_p.
14772         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
14774         * typeck.c (c_sizeof): Return an expression of `size_t' type,
14775         not one with TYPE_IS_SIZETYPE set.
14776         (dubious_conversion_warnings): Remove special-case code.
14778 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
14780         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
14781         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
14782         (dump_type_prefix): Print vector-of-int as 'int vector'.
14783         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
14784         * tree.c (walk_tree): Handle VECTOR_TYPE.
14786         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
14788 2000-10-21  Jason Merrill  <jason@redhat.com>
14790         * parse.y (operator): Set got_object from got_scope.
14791         Set looking_for_typename.
14792         * decl.c (lookup_name_real): Clear val after setting from_obj.
14793         Reorganize diagnostic.
14795 2000-10-20  Jason Merrill  <jason@redhat.com>
14797         * tree.c (walk_tree): Don't walk into default args.
14799         * error.c (dump_expr): Use host_integerp.
14801 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
14803         * typeck2.c (abstract_virtuals_error): Use "because" instead of
14804         "since" in error message.
14806 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14808         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
14810 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
14812         * decl.c (revert_static_member_fn): Fixed typo.
14814 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
14816         * class.c (subobject_offset_fn): New type.
14817         (dfs_record_base_offsets): Remove.
14818         (record_base_offsets): Likewise.
14819         (dfs_search_base_offsets): Likewise.
14820         (record_subobject_offset): New function.
14821         (check_subobject_offset): Likewise.
14822         (walk_subobject_offsets): Likewise.
14823         (record_subobject_offsets): Likewise.
14824         (layout_conflict_p): Reimplement.
14825         (layout_nonempty_base_or_field): Correct handling of type
14826         conflicts during layout.
14827         (layout_empty_base): Likewise.
14828         (build_base_field): Adjust to handle new representation of empty
14829         base offset table.
14830         (build_base_fields): Likewise.
14831         (layout_virtual_bases): Likewise.
14832         (splay_tree_compare_integer_csts): New function.
14833         (layout_class_type): Use a splay_tree, rather than a varray, to
14834         represent the offsets of empty bases.
14836         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
14837         * decl.c (select_decl): Don't return declarations that are
14838         DECL_ANTICIPATED.
14840 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
14842         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
14843         (fake_std_node): New macro.
14844         * decl.c (in_std): Rename to ...
14845         (in_fake_std): ... this.
14846         (flag_no_builtin): Remove.
14847         (flag_no_nonansi_builtin): Likewise.
14848         (walk_namespaces_r): Use fake_std_node.
14849         (push_namespace): Use std_identifier.
14850         (pop_namespace): Use in_fake_std.
14851         (lookup_name_real): Use fake_std_node.
14852         (init_decl_processing): When -fhonor-std, create the `std'
14853         namespace.  Don't create a dummy fake_std_node in that case.
14854         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
14855         (builtin_function): Put builtins whose names don't begin
14856         with `_' in the std namespace.
14857         * decl2.c (flag_no_builtin): Remove.
14858         (flag_no_nonansi_builtin): Likewise.
14859         (set_decl_namespace): Use fake_std_node.
14860         (validate_nonmember_using_decl): Likewise.
14861         (do_using_directive): Likewise.
14862         (handle_class_head): Likewise.
14863         * dump.c (dequeue_and_dump): Likewise.
14864         * except.c (init_exception_processing): Use std_identifier.
14865         * init.c (build_member_call): Use fake_std_node.
14866         * rtti.c (init_rtti_processing): Use std_identifier.
14868 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
14870         * cp-tree.h (back_end_hook): Remove declaration.
14871         * decl2.c (back_end_hook): Remove definition.
14873         * dump.c (dequeue_and_dump): Dump TREE_USED.
14875 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
14877         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
14879 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
14881         * decl.c (WINT_TYPE): Define.
14882         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
14883         c_size_type_node, signed_size_type_node and wint_type_node.
14885 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
14887         * decl2.c (warn_missing_format_attribute): New variable.
14888         (lang_decode_option): Decode -Wmissing-format-attribute.
14890 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
14892         * typeck.c (qualify_type): Remove.
14893         (composite_pointer_type): Fix handling of conversions to `cv void*'.
14895 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14897         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
14899 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14901         * Makefile.in (parse.c, parse.h): Create atomically.
14903 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
14905         * class.c (current_obstack): Remove.
14906         * decl.c (ggc_p): Remove.
14907         (start_decl): Don't use decl_tree_cons.
14908         (grokdeclarator): Don't use build_decl_list.
14909         (start_function): Don't use decl_tree_cons.
14910         (finish_function): Don't mess with obstacks.
14911         * decl2.c (grok_x_components): Don't use build_decl_list.
14912         * lex.c (make_call_declarator): Don't call decl_tree_cons.
14913         (implicitly_declare_fn): Don't call build_decl_list.
14914         * parse.y (frob_specs): Don't call build_decl_list or
14915         decl_tree_cons.
14916         (expr_or_declarator_intern): Don't call decl_tree_cons.
14917         (primary): Don't call build_decl_list.
14918         (fcast_or_absdcl): Likewise.
14919         (typed_declspecs): Don't call decl_tree_cons.
14920         (reserved_declspecs): Don't call build_decl_list.
14921         (declmods): Likewise.
14922         (reserved_typespecquals): Likewise.
14923         (aggr): Likewise.
14924         (new_type_id): Likewise.
14925         (cv_qualifiers): Likewise.
14926         (after_type_declarator_intern): Likewise.
14927         (notype_declarator_intern): Likewise.
14928         (absdcl_intern): Likewise.
14929         (named_parm): Likewise.
14930         * pt.c (most_specialized_class): Likewise.
14931         * repo.c (temporary_obstack): Make it a structure, not a pointer.
14932         (init_repo): Initialize it.
14933         * search.c (current_obstack): Remove.
14934         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
14936 2000-10-09  Richard Henderson  <rth@cygnus.com>
14938         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
14939         (c++ language support bits for libgcc): Remove.
14940         (c++.clean): Remove cplib2.txt cleanup.
14941         * config-lang.in (headers, lib2funcs): Remove.
14943         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
14944         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
14945         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
14946         * inc/new.h, inc/typeinfo: Remove files.
14948 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
14950         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
14951         defined.
14952         (init_decl_processing): Initialize intmax_type_node and
14953         uintmax_type_node.
14955 2000-10-06  Richard Henderson  <rth@cygnus.com>
14957         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
14958         (original_result_rtx): Remove.
14959         * decl.c (save_function_data): Don't clear x_result_rtx.
14960         (mark_lang_function): Don't mark it either.
14961         * expr.c (fixup_result_decl): Remove.
14962         * semantics.c (genrtl_named_return_value): Frob the return decl
14963         before calling emit_local_var.
14964         (genrtl_finish_function): Don't call fixup_result_decl.
14965         Always emit the jump to return_label.
14967 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
14969         * pt.c (lookup_template_class): Set current access for enum.
14970         (tsubst_enum): Set file & line for enum decl.
14972         * spew.c (yylex): Remove unused variable.
14974 2000-10-05  Richard Henderson  <rth@cygnus.com>
14976         * semantics.c (genrtl_finish_function): Don't init or check
14977         can_reach_end; remove noreturn and return value checks.
14979 2000-10-05  Tom Tromey  <tromey@cygnus.com>
14981         * init.c (build_java_class_ref): Use `build_static_name' with a
14982         suffix, not a prefix, to build the class object's name.
14984 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
14986         * cp-tree.h (access_kind): Fix comment typo.
14987         * decl2.c (grokfield): Fix diagnostic typo.
14988         * semantics.c (finish_template_type): Fix comment typo.
14989         (finish_qualified_object_call_expr): Likewise.
14991 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
14993         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
14994         tsubsting fails.
14996 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
14998         * spew.c (frob_id): New static function.
14999         (frob_opname): Use it.
15000         (yylex): Use it.
15002 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
15004         * decl.c (lang_mark_false_label_stack): Remove.
15005         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15007 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
15009         * gxxint.texi: Use @email for formatting email addresses.
15011 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
15013         * error.c: Remove direct obstack manipulation.  Replace with
15014         output_buffer-based formatting.  Adjust calls to removed macros.
15015         (obstack_chunk_alloc, obstack_chunk_free): Remove.
15016         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15017         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15019 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
15021         * ir.texi: Move to ../c-tree.texi.
15023 2000-09-20  Jason Merrill  <jason@redhat.com>
15025         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15027 2000-09-21  Andreas Jaeger  <aj@suse.de>
15029         * errfn.c: Move declaration of cp_printer and cp_printers to ...
15030         * cp-tree.h: ... here.
15032         * error.c: Remove declaration of cp_printer.
15034 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
15036         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15038 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
15040         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15041         users.
15043 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
15045         * decl.c (start_function): Robustify.
15047 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15049         * cp-tree.h (check_function_format): Accept a `status' parameter.
15051         * call.c, typeck.c: Updates calls to `check_function_format'.
15053 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
15055         * decl2.c (handle_class_head): Always push some scope even
15056         in the error case.
15058 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
15060         * cp-tree.h (struct cp_language_function): Remove
15061         x_scope_stmt_stack and name_declared.
15062         (current_scope_stmt_stack): Remove.
15063         (function_name_declared_p): New macro.
15064         (struct lang_decl_flags): Use c_lang_decl as a base class.
15065         (context): Remove.
15066         (struct lang_decl): Replace saved_tree with context.
15067         (DECL_FRIEND_CONTEXT): Adjust accordingly.
15068         (SET_DECL_FRIEND_CONTEXT): Likewise.
15069         (DECL_VIRTUAL_CONTEXT): Likewise.
15070         (DECL_SAVED_TREE): Remove.
15071         (C_DECLARED_LABEL_FLAG): Likewise.
15072         (cplus_expand_expr_stmt): Don't declare.
15073         (add_decl_stmt): Likewise.
15074         (add_scope_stmt): Likewise.
15075         * decl.c (mark_stmt_tree): Remove.
15076         (case_compare): Likewise.
15077         (finish_case_label): Use c_add_case_label.
15078         (init_decl_processing): Set more language-specific hooks.
15079         (build_enumerator): Fix typo in comment.
15080         (cplus_expand_expr_stmt): Remove.
15081         (mark_lang_function): Use mark_c_language_function.
15082         (lang_mark_tree): Use c_mark_lang_decl.
15083         * decl2.c: Change order of inclusion.
15084         * except.c: Likewise.
15085         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
15086         back on c_expand_expr.
15087         * friend.c: Include expr.h.
15088         * init.c: Change order of inclusion.
15089         * Makefile.in: Update dependencies.
15090         * lex.h (free_lang_decl_chain): Remove.
15091         * optimize.c (maybe_clone_body): Use function_name_declared_p.
15092         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
15093         it doesn't exist.
15094         (instantiate_decl): Use function_name_declared_p.
15095         * semantics.c (lang_expand_expr_stmt): Remove.
15096         (set_current_function_name_declared): Likewise.
15097         (current_function_name_declared): Likewise.
15098         (begin_compound_stmt): Use function_name_declared_p.
15099         (add_decl_stmt): Remove.
15100         (setup_vtbl_ptr): Use function_name_declared_p.
15101         (add_scope_stmt): Remove.
15102         (current_scope_stmt_stack): New function.
15103         (cp_expand_stmt): Don't handle SCOPE_STMTs.
15104         (expand_body): Use function_name_declared_p.
15105         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
15106         * typeck.c: Change order of includes.
15107         (convert_sequence): Remove.
15109 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
15111         * lex.c (reswords): Add _Complex.
15113 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15115         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
15117 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
15119         * init.c (begin_init_stmts): Don't use // comments.
15121 2000-09-12  Jason Merrill  <jason@redhat.com>
15123         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
15124         all non-extern arrays.
15126         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
15127         typenames, too.  Downgrade complaint to pedwarn.
15128         (xref_tag): Warn about surprising behavior of 'friend struct T'.
15129         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
15130         'class This::Inherited'.
15132 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
15134         * decl.c (finish_case_label): Given the LABEL_DECL a
15135         DECL_CONTEXT.
15137 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
15139         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
15140         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
15141         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15142         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15143         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
15144         New macros.
15145         (sorry_for_unsupported_tree, print_scope_operator,
15146         print_left_paren, print_right_paren, print_left_bracket,
15147         print_right_bracket, print_whitespace): Likewise.
15148         (aggr_variety): Rename to class_key_or_enum.
15149         (print_type): Rename to print_type_id.
15150         (print_type_specifier_seq, print_simple_type_specifier,
15151         print_elaborated_type_specifier,
15152         print_rest_of_abstract_declarator,
15153         print_parameter_declaration_clause, print_exception_specification,
15154         print_nested_name_specifier, print_template_id,
15155         typedef_original_name,  print_template_argument_list_start,
15156         print_template_argument_list_end): New functions.
15158 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
15160         * ir.texi: Add more documentation.
15162 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
15164         * cp-tree.h (struct saved_scope): Remove x_function_parms.
15165         (current_function_parms): Don't define.
15166         (struct cp_language_function): Remove parms_stored.
15167         (current_function_just_assigned_this): Don't define.
15168         (current_function_parms_stored): Likewise.
15169         (static_ctors): Declare.
15170         (static_dtors): Likewise.
15171         (SF_EXPAND): Don't define.
15172         (expand_start_early_try_stmts): Remove declaration.
15173         (store_parm_decls): Likewise.
15174         * decl.c (static_ctors): Don't declare.
15175         (static_dtors): Likewise.
15176         (struct binding_level): Remove this_block.
15177         (poplevel): Remove dead code.
15178         (set_block): Likewise.
15179         (mark_binding_level): Don't mark this_block.
15180         (mark_saved_scope): Don't mark x_function_parms.
15181         (init_decl_processing): Don't add current_function_parms as a GC
15182         root.
15183         (check_function_type): Change prototype.
15184         (start_function): Remove RTL-generation code.
15185         (expand_start_early_try_stmts): Remove.
15186         (store_parm_decls): Give it internal linkage.  Remove
15187         RTL-generation code.
15188         (finish_function): Remove RTL-generation code.
15189         * decl2.c (static_ctors): Fix formatting.
15190         (static_dtors): Likewise.
15191         * method.c (use_thunk): Don't call store_parm_decls.
15192         (synthesize_method): Likewise.
15193         * optimize.c (maybe_clone_body): Likewise.
15194         * parse.y (fn.def2): Likewise.
15195         (.set_base_init): Likewise.
15196         (nodecls): Likewise.
15197         * pt.c (instantiate_decl): Likewise.
15198         * rtti.c (synthesize_tinfo_fn): Likewise.
15199         * semantics.c (genrtl_try_block): Simplify.
15200         (expand_body): Use genrtl_start_function and
15201         genrtl_finish_function.
15202         (genrtl_start_function): New function.
15203         (genrtl_finish_function): Likewise.
15205 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
15207         * error.c (cp_tree_printer, case 'P'): Append break.
15209 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
15211         * cp-tree.h (frob_opname): Declare.
15212         * parse.y (saved_scopes): New static variable.
15213         (cp_parse_init): Adjust.
15214         (do_id): If lastiddecl is NULL, do do_identifier.
15215         (operator): Save scope information.
15216         (unoperator): New reduction. Restore scope information.
15217         (operator_name): Append unoperator. Call frob_opname.
15218         * spew.c (frob_opname): Define.
15220 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
15222         * decl.c, rtti.c: Include defaults.h if not already included.
15223         Don't define the *_TYPE_SIZE macros.
15225 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
15227         * cp-tree.h (push_switch): Change prototype.
15228         (check_cp_case_value): Remove declaration.
15229         (decl_constant_value): Likewise.
15230         * decl.c (struct cp_switch): Add switch_stmt and cases.
15231         (case_compare): New function.
15232         (push_switch): Set switch_stmt.  Initialize cases.
15233         (pop_switch): Clean up cases.
15234         (define_case_label): Rename to ...
15235         (finish_case_label): ... this.  Do semantic analysis for case
15236         labels here.
15237         (start_function): Correct comment.
15238         * decl2.c (check_cp_case_value): Remove.
15239         * expr.c (do_case): Remove.
15240         * pt.c (tsubst_expr): Adjust call to finish_case_label.
15241         * semantics.c (genrtl_do_poplevel): Remove declaration.
15242         (RECHAIN_STMTS): Remove.
15243         (finish_break_stmt): Use build_break_stmt.
15244         (finish_continue_stmt): Use build_continue_stmt.
15245         (finish_switch_cond): Adjust condition here, rater than in
15246         c_expand_start_case.
15247         (finish_case_label): Remove.
15248         * typeck.c (c_expand_return): Remove.
15249         (c_expand_start_case): Likewise.
15251 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
15253         * ir.texi: Document type nodes.
15255 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
15257         * cp-tree.h (init_cp_semantics): Declare.
15258         (genrtl_try_block): Don't declare.
15259         (genrtl_handler): Likewise.
15260         (genrtl_catch_block): Likewise.
15261         (genrtl_ctor_stmt): Likewise.
15262         (genrtl_subobject): Likewise.
15263         (genrtl_do_poplevel): Likewise.
15264         (genrtl_named_return_value): Likewise.
15265         * lex.c (init_parse): Call init_cp_semantics.
15266         * semantics.c (genrtl_try_block): Give it internal linkage.
15267         (genrtl_handler): Likewise.
15268         (genrtl_catch_block): Likewise.
15269         (genrtl_ctor_stmt): Likewise.
15270         (genrtl_subobject): Likewise.
15271         (genrtl_do_poplevel): Likewise.
15272         (genrtl_named_return_value): Likewise.
15273         (lang_expand_stmt): Rename to ...
15274         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
15275         (init_cp_semantics): Define.
15277         * decl.c (initialize_local_var): Remove RTL-generating code.
15278         * semantics.c (genrtl_try_block): Fix formatting.
15280         Move statement-tree facilities from C++ to C front-end.
15281         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
15282         (void_zero_node): Remove.
15283         (stmt_tree): Likewise.
15284         (scope_chain): Adjust.
15285         (language_function): Rename to cp_language_function.
15286         (cp_function_chain): Adjust.
15287         (current_stmt_tree): Remove.
15288         (last_tree): Likewise.
15289         (last_expr_type): Likewise.
15290         (struct lang_decl): Adjust.
15291         (STMT_IS_FULL_EXPR_P): Remove.
15292         (add_tree): Remove.
15293         (begin_stmt_tree): Likewise.
15294         (finish_stmt_tree): Likewise.
15295         (walk_tree_fn): Likewise.
15296         (walk_stmt_tree): Likewise.
15297         * class.c (finish_struct): Replace use of add_tree with add_stmt.
15298         * decl.c (mark_stmt_tree): Adjust type.
15299         (init_decl_processing): Don't build void_zero_node.
15300         (initialize_local_var): Adjust usage of current_stmt_tree.
15301         (finish_enum): Use add_stmt, not add_tree.
15302         (save_function_data): Adjust use of language_function.
15303         (finish_constructor_body): Use add_stmt, not add_tree.
15304         (finish_destructor_body): Likewise.
15305         (push_cp_function_context): Adjust use of language_function.
15306         (pop_cp_function_context): Likewise.
15307         (mark_lang_function): Likewise.
15308         (mark_cp_function_context): Likewise.
15309         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
15310         (build_vec_init): Likewise.
15311         * semantics.c (SET_LAST_STMT): Remove.
15312         (RECHAIN_STMTS): Don't use it.
15313         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
15314         (current_stmt_tree): Define.
15315         (add_tree): Remove.
15316         (finish_goto_stmt): Use add_stmt, not add_tree.
15317         (finish_expr_stmt): Likewise.
15318         (begin_if_stmt): Likewise.
15319         (finish_then_clause): Likewise.
15320         (begin_while_stmt): Likewise.
15321         (begin_do_stmt): Likewise.
15322         (finish_return_stmt): Likewise.
15323         (begin_for_stmt): Likewise.
15324         (finish_break_stmt): Likewise.
15325         (finish_continue_stmt): Likewise.
15326         (begin_switch_stmt): Likewise.
15327         (finish_case_label): Likewise.
15328         (begin_try_block): Likewise.
15329         (begin_function_try_block): Likewise.
15330         (begin_handler): Likewise.
15331         (begin_catch_block): Likewise.
15332         (begin_compound_stmt): Likewise.
15333         (begin_asm_stmt): Likewise.
15334         (finish_asm_stmt): Likewise.
15335         (finish_label_stmt): Likewise.
15336         (add_decl_stmt): Likewise.
15337         (finish_subobject): Likewise.
15338         (finish_decl_cleanup): Likewise.
15339         (finish_named_return_value): Likewise.
15340         (setup_vtbl_ptr): Likewise.
15341         (add_scope_stmt): Likewise.
15342         (finish_stmt_expr): Likewise.
15343         (prune_unused_decls): Remove.
15344         (begin_stmt_tree): Likewise.
15345         (finish_stmt_tree): Likewise.
15346         (prep_stmt): Adjust use of current_stmt_tree.
15347         (lang_expand_stmt): Likewise.
15348         * tree.c (statement_code_p): Remove.
15349         (cp_statement_code_p): New function.
15350         (walk_stmt_tree): Remove.
15351         (init_tree): Set lang_statement_code_p.
15353 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
15355         Integrated preprocessor.
15357         * Make-lang.in, Makefile.in: Remove all references to input.c,
15358         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
15359         * gxx.gperf, hash.h, input.c: Delete.
15360         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
15361         initialized properly.
15363         * class.c (fixup_pending_inline): Take a tree, not a
15364         struct pending_inline *.  All callers changed.
15365         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
15366         RID_PROTECTED entries in ridpointers[] array here.
15367         * decl.c (duplicate_decls): Do not refer to struct
15368         pending_inline.
15369         (record_builtin_type, init_decl_processing): Use RID_MAX not
15370         CP_RID_MAX.
15371         (grokdeclarator): Use C_IS_RESERVED_WORD.
15372         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
15373         cpplib.
15374         (grok_x_components): Do not inspect pending_inlines chain.
15376         * cp-tree.h (struct lang_identifier): Add rid_code entry.
15377         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
15378         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
15379         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
15380         TIME_IDENTIFIER_FILEINFO): Kill.
15381         Update prototypes.
15382         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
15383         single 32-bit word.
15384         * parse.y: Call do_pending_inlines unconditionally.
15385         reinit_parse_for_method is now snarf_method.  fn.defpen is no
15386         longer necessary.  Remove unnecessary <itype> annotation on
15387         SCOPE.  Do not refer to end_of_file or struct pending_inline.
15388         * semantics.c (begin_inline_definitions): Call
15389         do_pending_inlines unconditionally.
15391         * lex.c: Remove all code now shared with C front end.
15392         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
15393         into the get_identifier table.  Rewrite pragma handling to
15394         work with the registry.  Move code to save tokens for later
15395         processing to spew.c.
15397         * spew.c: Rewrite everything in terms of token streams instead
15398         of text.  Move routines here from lex.c / input.c as
15399         appropriate.  GC-mark trees hanging off the pending inlines
15400         chain.
15402 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
15404         * NEWS: Mention that the named return value extension has been
15405         deprecated.
15406         * cp-tree.h (original_result_rtx): Define.
15407         (TREE_REFERENCE_EXPR): Remove.
15408         (DECL_VPARENT): Likewise.
15409         (pushdecl_nonclass_level): Likewise.
15410         (store_return_init): Likewise.
15411         (reinit_lang_specific): Likewise.
15412         (genrtl_named_return_value): Change prototype.
15413         * decl.c (original_result_rtx): Remove.
15414         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
15415         Do not generate RTL for local variables here.
15416         (store_return_init): Remove.
15417         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
15418         store_return_init.
15419         (finish_named_return_value): Adjust accordingly.  Warn that this
15420         extension is deprecated.
15421         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
15423 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15425         * pt.c (type_unification_real): Replace switch with if.
15426         (unify): Tsubst non-type parms before comparing.
15428 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15430         * error.c (dump_typename): New function, broken out of ...
15431         (dump_type): ... here. Use it.
15432         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
15434 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15436         * init.c (build_offset_ref): Deal with namespace scoped
15437         TEMPLATE_ID_EXPRs.
15439 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15441         * class.c (resolve_address_of_overloaded_function): Add
15442         explanation message.
15443         * decl.c (define_case_label): Reformat explanation.
15444         * decl2.c (finish_static_data_member_decl): Likewise.
15445         (grokfield): Likewise.
15446         * friend.c (do_friend): Likewise.
15448 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
15450         * tree.c (walk_tree): Expose tail recursion.
15451         (walk_stmt_tree): New function.
15452         * cp-tree.h: Prototype walk_stmt_tree.
15453         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
15454         the BLOCKs directly.  If a BLOCK has no variables after
15455         pruning, discard it.
15456         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
15457         restore the line number.
15459 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
15461         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
15462         (pt.o): Remove dependency on HTAB_H.
15463         * cp-tree.h: Include hashtab.h.
15464         (walk_tree): Change prototype.
15465         (walk_tree_without_duplicates): New function.
15466         * decl.c (check_default_argument): Use it.
15467         * optimize.c (remap_decl): Adjust calls to walk_tree.
15468         (copy_body): Likewise.
15469         (expand_calls_inline): Likewise.
15470         (calls_setjmp_p): Use walk_tree_without_duplicates.
15471         * pt.c: Don't include hashtab.h.
15472         (for_each_template_parm): Use walk_tree_without_duplicates.
15473         * semantics.c (finish-stmt_tree): Likewise.
15474         (expand_body): Likewise.
15475         * tree.c (walk_tree): Add additional parameter.
15476         (walk_tree_without_duplicates): New function.
15477         (count_trees): Use it.
15478         (verify_stmt_tree): Adjust call to walk_tree.
15479         (find_tree): Use walk_tree_without_duplicates.
15480         (no_linkage_check): Likewise.
15481         (break_out_target_exprs): Adjust call to walk_tree.
15482         (cp_unsave): Likewise.
15484 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15486         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
15487         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15488         * cp-tree.h (TYPE_BINFO): Adjust comment.
15489         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
15490         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
15491         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15492         (TYPE_TEMPLATE_INFO): Likewise.
15493         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
15494         * class.c (push_nested_class): Likewise.
15495         * decl.c (lookup_name_real): Likewise.
15496         (grokdeclarator): Likewise.
15497         (grok_op_properties): Likewise.
15498         (xref_tag): Likewise.
15499         (xref_basetypes): Likewise.
15500         * decl2.c (constructor_name_full): Likewise.
15501         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
15502         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15503         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
15504         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15505         (dump_type_suffix): Likewise.
15506         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
15507         instead.
15508         (get_aggr_from_typedef): Likewise.
15509         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
15510         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15511         (write_template_parm): Likewise.
15512         (write_template_template_parm): Check tree code instead of
15513         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15514         * method.c (build_overload_nested_name): Add
15515         BOUND_TEMPLATE_TEMPLATE_PARM.
15516         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
15517         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15518         * pt.c (convert_template_argument): Check tree code instead of
15519         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15520         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
15521         (for_each_template_parm): Adjust comment.
15522         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
15523         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15524         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
15525         template_args_equal to compare template template parameter cases.
15526         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15527         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
15528         instead.
15529         * tree.c (copy_template_template_parm): Decide whether to create
15530         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
15531         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15532         (copy_tree_r): Likewise.
15533         * typeck.c (comptypes): Likewise.  Check tree code instead of
15534         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15536 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
15538         * decl.c (finish_function): Move the code for handling functions
15539         marked with the constructor and destructor attributes inside the
15540         expand_p block.
15542 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15544         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
15546 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15548         * pt.c (lookup_template_class): Remove abort.
15549         * tree.c (get_type_decl): Allow error_mark_node.
15551 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15553         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
15554         TEMPLATE_ID_EXPRs.
15556 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
15558         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
15559         new ABI mangling.
15561 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
15563         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
15564         union tag mismatch error reporting.
15566 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
15568         * call.c (build_scoped_method_call): Check it is not a namespace.
15570 2000-08-30  Jason Merrill  <jason@redhat.com>
15572         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
15574         * tree.c (bot_manip): Check TREE_CONSTANT rather than
15575         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
15576         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
15578         * decl.c (start_function): Always call make_function_rtl.
15580 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
15582         * semantics.c (prune_unused_decls): New function.
15583         (finish_stmt_tree): Call it via walk_tree.
15585 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
15587         * class.c (build_secondary_vtable): Constify a char *.
15588         * decl.c (init_decl_processing): Initialize function_id_node,
15589         pretty_function_id_node, and func_id_node.
15590         * input.c (struct input_source): Constify 'str'.
15591         (feed_input): Constify first argument.
15592         * mangle.c (write_identifier): Constify argument.
15593         * pt.c (mangle_class_name_for_template): Constify argument.
15595 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
15597         * typeck.c (mark_addressable): Remove code that pokes around in
15598         RTL.
15600 2000-08-28  Jason Merrill  <jason@redhat.com>
15602         * lex.c (file_name_nondirectory): Move to toplev.c.
15604         * cp-tree.h (LOCAL_CLASS_P): New macro.
15605         * class.c (finish_struct_1): Use it.
15607 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
15609         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
15610         (write_encoding): Pass another argument to write_name.
15611         (write_name): Add ignore_local_scope parameter.  Fix handling of
15612         local names.
15613         (write_nested_name): Use write_unqualified_name.
15614         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
15615         (write_template_prefix): Use write_unqualified_name.
15616         (write_component): Remove.
15617         (write_local_name): Add parameter.  Use direct local entity to
15618         discriminator calculation.
15619         (write_class_enum_type): Pass another argument to write_name.
15620         (write_template_template_arg): Likewise.
15621         (make_guard_variable): Likewise.
15623 2000-08-27  Jason Merrill  <jason@redhat.com>
15625         * decl.c (pushdecl): Matching decls for local externs are found in
15626         the current level.  Propagate linkage information from previous
15627         declarations.
15629 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
15631         * ir.texi (Expressions): Fix typo.
15633 2000-08-25  Greg McGary  <greg@mcgary.org>
15635         * tree.c (init_tree): Use ARRAY_SIZE.
15637 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15639         * error.c (cp_tree_printer): Rework.
15641 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
15643         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
15644         dyn-string.o.
15645         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
15646         (cp-demangle.o): Remove target.
15647         (dyn-string.o): Likewise.
15649         * decl.c (grokfndecl): Require that `main' return an `int'.
15650         * mangle.c (write_encoding): Don't mangle return types for
15651         conversion functions.
15653 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15655         * error.c (tree_formatting_info): New data type.
15656         (tree_being_formatted): New macro.
15657         (tree_formatting_flags): Likewise.
15658         (put_whitespace): Likewise.
15659         (print_tree_identifier): Likewise.
15660         (print_identifier): Likewise.
15661         (cp_tree_printer, print_function_argument_list, print_declaration,
15662         print_expression, print_function_declaration,
15663         print_function_parameter, print_type, print_cv_qualifier): New
15664         functions.
15665         (init_error): Initialize lang_printer.
15667 2000-08-24  Jason Merrill  <jason@redhat.com>
15669         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
15670         adjustment necessary.
15672 2000-08-24  Greg McGary  <greg@mcgary.org>
15674         * cp-tree.h (MAIN_NAME_P): Remove macro.
15676 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
15678         * error.c (print_instantiation_context): Don't forget to flush the
15679         buffer.
15681 2000-08-23  Jason Merrill  <jason@redhat.com>
15683         * typeck.c (build_ptrmemfunc): Save the input pmf.
15685         * method.c (process_modifiers): Use same_type_p.
15687 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
15689         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
15690         * mangle.c (write_function_type): Change prototype.
15691         (write_encoding): Don't mangle return types for
15692         constructors or destructors.
15693         (write_type): Adjust call to write_function_type.
15694         * pt.c (instantiate_template): Instantiate alternate entry points
15695         when instantiating the main function.
15697 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
15699         * error.c (cp_print_error_function): Don't use embedded '\n' in
15700         output_printf.
15702 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
15704         * decl.c (init_decl_processing): Remove bogus initialization.
15705         * error.c (lang_print_error_function): Restore here.
15706         (init_error): Initialize print_error_function.
15708 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
15710         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
15712 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
15714         * Makefile.in (error.o): Depends on diagnostic.h
15716         * cp-tree.h (problematic_instantiation_changed,
15717         record_last_problematic_instantiation, current_instantiation,
15718         print_instantiation_context): Declare.
15719         (maybe_print_template_context): Remove.
15721         * decl.c (init_decl_processing): Set print_error_function to NULL.
15722         (lang_print_error_function): Remove, since we're using a new
15723         machinery.
15725         * error.c: #include diagnostic.h
15726         (function_category): New function.
15727         (cp_diagnostic_starter): Likewise.
15728         (cp_diagnostic_finalizer): Likewise.
15729         (cp_print_error_function): Likewise.
15730         (maybe_print_instantiation_context): Likewise.
15731         (print_instantiation_full_context): Likewise.
15732         (print_instantiation_partial_context): Likewise.
15733         (print_instantiation_context): Define.
15734         (init_error): Initialize diagnostic pager and finalizer.
15736         * pt.c (problematic_instantiation_changed): Define.
15737         (record_last_problematic_instantiation): Likewise.
15738         (current_instantiation): Likewise.
15739         (maybe_print_template_context): Remove.
15740         (print_template_context): Likewise.
15741         (current_tinst_level): Make static to reflect Brendan Kehoe's
15742         change of 1995-04-13.
15743         (push_tinst_level): Call print_instantiation_context.
15745 2000-08-21  Nix  <nix@esperi.demon.co.uk>
15747         * lang-specs.h: Do not process -o or run the assembler if
15748         -fsyntax-only.
15750 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
15752         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
15753         variables.
15754         * decl2.c (lang_decode_option): Disable gettext attributes for
15755         -ansi.
15757 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
15759         * lex.c (lang_init_options): Default diagnostic message maximum
15760         length to 80, when line-wrapping.
15762 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
15764         * class.c (build_vtbl_initializer): Clear the entire
15765         vtbl_init_data.  Start keeping track of the functions for which we
15766         have created vcall offsets here.
15767         (dfs_build_vcall_offset_vtbl_entries): Remove.
15768         (build_vcall_offset_vtbl_entries): Reimplement.
15769         (add_vcall_offset_vtbl_entries_r): New function.
15770         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
15771         computing when vcall offsets are necessary.
15773 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15775         * decl.c (member_function_or_else): Use cp_error ... %T.
15776         (grokdeclarator): Likewise.
15777         (start_method): Likewise.
15778         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
15780 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15782         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
15783         TYPE_DECLs.
15785 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15787         * cp-tree.h (PTRMEM_OK_P): New macro.
15788         (itf_ptrmem_ok): New enumeration value.
15789         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
15790         argument. Diagnose implicit pointer to member.
15791         (instantiate_type): Don't diagnose implicit pointer to member
15792         here. Pass itf_ptrmem_ok if ok. Adjust calls to
15793         resolve_address_of_overloaded_function.
15794         * init.c (build_offset_ref): Set PTRMEM_OK_P.
15795         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
15796         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
15797         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
15798         (build_unary_op): Deal with single non-static member in
15799         microsoft-land.
15801 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15803         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
15805 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15807         * cp-tree.h (enum_name_string): Remove prototype.
15808         (report_case_error): Remove prototype.
15809         * cp/typeck2.c (enum_name_string): Remove.
15810         (report_case_error): Remove.
15811         * error.c (dump_expr): Deal with enum values directly.
15812         Correctly negate integer constant.
15814 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15816         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
15817         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
15818         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
15819         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
15820         (__cxa_vec_new): Use __cxa_vec_new2.
15821         (__cxa_vec_delete): Use __cxa_vec_delete2.
15823 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15825         * vec.cc (__cxa_vec_new): Set "C" linkage.
15826         (__cxa_vec_ctor): Likewise.
15827         (__cxa_vec_cctor): Likewise.
15828         (__cxa_vec_dtor): Likewise.
15829         (__cxa_vec_delete): Likewise.
15830         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
15831         (__cxa_vec_ctor): Likewise.
15832         (__cxa_vec_cctor): Likewise.
15833         (__cxa_vec_dtor): Likewise.
15834         (__cxa_vec_delete): Likewise.
15836 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15838         * class.c (instantiate_type): Reinstate local variable
15839         deleted in previous change.
15841         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
15842         itf_no_attributes.
15844 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15846         * cp-tree.h (instantiate_type_flags): New enumeration.
15847         (instantiate_type): Change parameter.
15848         * class.c (instantiate_type): Adjust prototype. Adjust.
15849         * call.c (standard_conversion): Adjust instantiate_type call.
15850         (reference_binding): Likewise.
15851         (build_op_delete_call): Likewise.
15852         (convert_like_real): Likewise.
15853         * cvt.c (cp_convert_to_pointer): Likewise.
15854         (convert_to_reference): Likewise.
15855         * pt.c (convert_nontype_argument): Likewise.
15856         * typeck.c (build_binary_op): Likewise.
15857         (build_ptrmemfunc): Likewise.
15858         (convert_for_assignment): Likewise.
15860 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15862         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
15863         (current_aggr): Define.
15864         * decl.c (grokdeclarator): Make sure a friend class is an
15865         elaborated type specifier.
15866         * parse.y (current_aggr): Remove static definition.
15867         (cp_parse_init): Adjust.
15868         (structsp): Clear and restore current_aggr.
15869         (component_decl_list): Clear current_aggr.
15871         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
15872         aggregate tag on the typename's context.
15874         * pt.c (tsubst_friend_class): Return error_mark_node, if
15875         parms becomes NULL.
15876         (instantiate_class_template): Ignore error_mark_node friend types.
15878 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
15880         * cvt.c (warn_ref_binding): New static function, broken out of ...
15881         (convert_to_reference): ... here. Use it.
15883 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
15885         * parse.y (template_arg): Add rule for template qualified with
15886         global scope.
15888 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15890         * decl2.c (add_function): Reorganize.
15891         (arg_assoc): Do not consider function template decls.
15893 2000-08-11  Jason Merrill  <jason@redhat.com>
15895         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
15896         looking inside.
15898 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15900         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
15901         (lookup_nested_tag): Likewise.
15903         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
15904         can be produced.
15906 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15908         * parse.y (named_complex_class_head_sans_basetype): Remove
15909         always true if.
15911 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15913         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
15914         explicit TEMPLATE_ID_EXPR args.
15915         (build_expr_from_tree, case CALL_EXPR): Likewise.
15917 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15919         * decl.c (check_tag_decl): Diagnose typename's which don't
15920         declare anything.
15922 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
15924         * init.c (build_aggr_init): Reject bogus array initializers
15925         early.
15927 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
15929         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
15930         runtime.
15931         * cp/tinfo.cc (__dynamic_cast): Likewise.
15932         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
15934 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
15936         * cvt.c (convert_to_pointer_force): Fix error message when
15937         attempting to cast from ambiguous base.
15939 2000-08-08  Jason Merrill  <jason@redhat.com>
15941         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
15942         (tsubst_template_arg_vector): Likewise.
15944         * decl2.c (build_anon_union_vars): Choose the largest field; don't
15945         assume that one will be as large as the union.
15947 2000-08-07  Kazu Hirata  <kazu@hxi.com>
15949         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
15950         * decl.c (pop_labels): Likewise.
15952 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
15954         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
15955         specifications.
15956         (__pointer_to_member_type_info): Likewise.
15957         (__base_class_info): Likewise.
15958         (__class_type_info): Likewise.
15959         (__si_class_type_info): Likewise.
15960         (__vmi_class_type_info): Likewise.
15961         * tinfo.cc (__si_class_type_info::__do_find_public_src):
15962         Changed member names to match specifications.
15963         (__vmi_class_type_info::__do_find_public_src): Likewise.
15964         (__si_class_type_info::__do_dyncast): Likewise.
15965         (__vmi_class_type_info::__do_dyncast): Likewise.
15966         (__si_class_type_info::__do_upcast): Likewise.
15967         (__vmi_class_type_info::__do_upcast): Likewise.
15968         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
15969         (__pbase_type_info::__pointer_catch): Likewise.
15970         (__pointer_type_info::__pointer_catch): Likewise.
15971         (__pointer_to_member_type_info::__pointer_catch): Likewise.
15973 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
15975         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
15976         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
15977         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
15979 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
15981         * cp-tree.h (add_method): Change prototype.
15982         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
15983         Don't double the size of the method vector in the error case.
15984         (handle_using_decl): Adjust call to add_method.
15985         (add_implicitly_declared_members): Likewise.
15986         (clone_function_decl): Likewise.
15987         * decl2.c (check_classfn): Likewise.
15988         * semantics.c (finish_member_declaration): Likewise.
15990 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
15992         * decl.c (flag_isoc94): New variable.
15994 2000-08-02  Jason Merrill  <jason@redhat.com>
15996         * pt.c (do_type_instantiation): Add complain parm; don't complain
15997         if called recursively.
15998         * cp-tree.h, parse.y: Adjust.
16000 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
16002         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16003         -Wno-strict-prototypes.
16005         * g++spec.c: Adjust type of second argument to
16006         lang_specific_driver, and update code as necessary.
16008         * cp-tree.h: Don't prototype min_precision here.
16009         (my_friendly_assert): Cast expression to void.
16010         * semantics.c (do_poplevel): Initialize scope_stmts.
16012 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
16014         * cp-tree.h (DECL_NEEDED_P): Tweak.
16016 2000-07-28  Jason Merrill  <jason@redhat.com>
16018         * lang-specs.h: Use %i in rule for .ii files.
16020 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
16022         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16024 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
16026         Allow indirect primary bases.
16027         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
16028         primary_base.
16029         (CLASSTYPE_VFIELD_PARENT): Remove.
16030         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16031         (BINFO_PRIMARY_BINFO): Remove.
16032         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16033         (BINFO_VBASE_PRIMARY_P): Likewise.
16034         (BINFO_PRIMARY_BASE_OF): New macro.
16035         (BINFO_INDIRECT_PRIMARY_P): Likewise.
16036         (get_primary_binfo): New function.
16037         * decl.c (lang_mark_tree): Make lang_type::primary_base.
16038         * class.c (vcall_offset_data_s): Rename to ...
16039         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
16040         and add ctor_vtbl_p.
16041         (get_derived_offset): Use get_primary_binfo.
16042         (dfs_mark_primary_bases): Adjust handling of virtual primary
16043         bases.
16044         (mark_primary_bases): Likewise.
16045         (set_primary_base): Take a binfo, not an integer, as a
16046         representation of the primary base.
16047         (indirect_primary_base_p): Remove.
16048         (determine_primary_base): Adjust for indirect primary bases.
16049         (dfs_find_final_overrider): Fix typo in coment.
16050         (update_vtable_entry_for_fn): Use get_primary_binfo.
16051         (layout_nonempty_base_or_field): Tweak.
16052         (build_base_fields): Adjust for new primary base semantics.
16053         (dfs_propagate_binfo_offsets): Remove.
16054         (propagate_binfo_offsets): Rewrite.
16055         (dfs_set_offset_for_shared_vbases): Remove.
16056         (layout_virtual_bases): Don't use it.
16057         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16058         ABI.
16059         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16060         CLASSTYPE_VFIELD_PARENT.
16061         (dfs_get_primary_binfo): New function.
16062         (get_primary_binfo): Likewise.
16063         (dump_class_hierarchy_r): Tweak printing of primary bases.
16064         (build_vtbl_initializer): Fix typo in comments.  Use
16065         vtbl_init_data.
16066         (build_vcall_and_vbase_vtbl_entries): Likewise.
16067         (build_vbaes_offset_vtbl_entries): Likewise.
16068         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16069         BV_VCALL_INDEX to handle indirect primary bases.
16070         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16071         (build_rtti_vtbl_entries): Likewise.
16072         * search.c (get_shared_vbase_if_not_primary): Tweak.
16073         (find_vbase_instance): Likewise.
16074         (binfo_for_vtable): Simplify.
16075         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
16076         (make_binfo): Make it have 11 entries.
16078 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
16080         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
16081         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
16082         ascertaining primaryness.
16083         (G): Remove template_args.
16084         (decl_is_template_id): New function.
16085         (write_encoding): Use decl_is_template_id.
16086         (write_name): Likewise.  Handle type_decls.  Get main variant of
16087         type decls.
16088         (write_nested_name): Likewise.
16089         (write_prefix): Likewise.
16090         (write_template_prefix): Likewise.
16091         (write_special_name_constructor): Remove defunct production from
16092         comment.
16093         (write_bare_function_type): Remove comment about absent parameter.
16094         (write_template_template_arg): Add missing grammar production to
16095         comment.
16097 2000-07-27  Jason Merrill  <jason@redhat.com>
16099         * decl.c (duplicate_decls): If common_type produces a non-typedef
16100         type for a typedef, just use the old type.
16102 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
16104         * cp-tree.h (function_depth): Declare.
16105         (verify_stmt_tree): Likewise.
16106         (find_tree): Likewise.
16107         * decl.c (function_depth): Give it external linkage.
16108         * optimize.c (optimize_function): Increment and decrement it.
16109         * tree.c (verify_stmt_tree_r): New function.
16110         (verify_stmt_tree): Likewise.
16111         (find_tree_r): Likewise.
16112         (find_tree): Likewise.
16114 2000-07-27  Jason Merrill  <jason@redhat.com>
16116         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
16117         TYPE_PTRMEMFUNC_P.
16118         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
16120 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
16122         * decl.c (start_cleanup_fn): Mark the function as `inline'.
16123         * decl2.c (get_guard): Call cp_finish_decl, not
16124         rest_of_decl_compilation, for local guards.
16125         * lex.c (do_identifier): Remove unused variable.
16127 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
16129         * parse.y:  Add missing ';'.
16131 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
16133         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
16134         of `extern "C++"'.
16136 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
16138         Kill strict_prototype. Backwards compatibility only for
16139         non NO_IMPLICIT_EXTERN_C systems.
16140         * cp-tree.h (flag_strict_prototype): Remove.
16141         (strict_prototype): Remove.
16142         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16143         * decl.c (maybe_push_to_top_level): Adjust.
16144         (pop_from_top_level): Adjust.
16145         (decls_match): Only allow sloppy parm matching for ancient
16146         system headers.
16147         (init_decl_processing): Adjust.
16148         (grokdeclarator): Adjust.
16149         * decl2.c (flag_strict_prototype): Remove.
16150         (strict_prototype): Remove.
16151         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16152         (lang_f_options): Remove "strict-prototype".
16153         (unsupported-options): Add "strict-prototype".
16154         * lex.c (do_identifier): Adjust.
16155         (do_scoped_id): Adjust.
16156         * parse.y (empty_parms): Adjust.
16157         * class.c (push_lang_context): Adjust.
16158         (pop_lang_context): Adjust.
16159         * typeck.c (comp_target_parms): Adjust.
16161 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
16163         * decl.c (poplevel): Deal with anonymous variables at for scope.
16164         (maybe_inject_for_scope_var): Likewise.
16166 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
16168         * decl.c: Remove all signal handling code, now done in toplev.c.
16170 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
16172         * decl.c (make_rtl_for_nonlocal_decl): Rework.
16174         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
16175         correctly.
16177 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
16179         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
16180         Define my_friendly_assert and my_friendly_abort as macros
16181         which may call friendly_abort.  Prototype friendly abort, not
16182         my_friendly_abort or my_friendly_assert.
16183         * decl.c (signal_catch): Report the signal caught in the error
16184         message.  Call fatal directly.
16185         * typeck2.c (ack, my_friendly_assert): Delete.
16186         (my_friendly_abort): Rename to friendly_abort.  Expect file,
16187         line, and function parameters.  Report the abort code, then
16188         call fancy_abort.  Do not mask an abort if errors have
16189         already occurred.
16191 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
16193         * typeck.c (comp_target_parms): Remove obsolete parameter.
16194         (comp_target_types): Adjust.
16196 2000-07-17  Jason Merrill  <jason@redhat.com>
16198         * typeck.c (mark_addressable): Never set TREE_USED.
16199         * call.c (build_call): Don't abort on calls to library functions
16200         that have been declared normally.
16202         * typeck.c (build_binary_op): Fix grammar in warning.
16204         * exception.cc (__eh_free): Fix prototype.
16206         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
16208         * decl.c (pushdecl): Handle seeing an OVERLOAD in
16209         IDENTIFIER_NAMESPACE_VALUE.
16211 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
16213         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
16214         * method.c (use_thunk): Correct handling of vcall offsets.
16216 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
16218         * .cvsignore: parse.h and parse.c have no cp- prefix.
16220 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
16222         * .cvsignore: New file.
16224 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
16226         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
16228 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
16230         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
16231         * parse.c: Remove.
16232         * parse.h: Likewise.
16234 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
16236         * class.c (layout_class_type): Add pointers to virtual bases after
16237         base classes under the old ABI.
16239 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
16241         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
16242         (finish_continue_stmt): Likewise.
16243         (begin_for_stmt): Remove call to note_level_for_for.
16244         (finish_goto_stmt): Change call from build_min_nt
16245         to build_stmt.
16246         (finish_expr_stmt): Likewise.
16247         (begin_if_stmt): Likewise.
16248         (begin_while_stmt): Likewise.
16249         (finish_while_stmt): Likewise.
16250         (finish_return_stmt): Likewise.
16251         (begin_for_stmt): Likewise.
16252         (finish_for_stmt): Likewise.
16253         (finish_break_stmt): Likewise.
16254         (begin_switch_stmt): Likewise.
16255         (finish_case_label): Likewise.
16256         (genrtl_try_block): Likewise.
16257         (begin_try_block): Likewise.
16258         (begin_handler): Likewise.
16259         (begin_compound_stmt): Likewise.
16260         (finish_asm_stmt): Likewise.
16261         (finish_label_stmt): Likewise.
16262         (add_decl_stmt): Likewise.
16263         (finish_subobject): Likewise.
16264         (finish_decl_cleanup): Likewise.
16265         (finish_named_return_value): Likewise.
16266         (setup_vtbl_ptr): Likewise.
16267         (add_scope_stmt): Likewise.
16268         * decl.c (finish_constructor_body): Likewise.
16269         (finish_destructor_body): Likewise.
16270         * optimize.c (copy_body_r): Likewise.
16271         (initialize_inlined_parameters): Likewise.
16272         (declare_return_variable): Likewise.
16273         (expand_call_inline): Likewise.
16275 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
16277         * semantics.c (expand_body): Sync interface information
16278         at the end of function body expansion.
16280 2000-07-09  Jason Merrill  <jason@redhat.com>
16282         * init.c (build_new_1): Bail early if the call to new fails.
16284         * decl.c (compute_array_index_type): Check specifically for
16285         an INTEGER_CST, not just TREE_CONSTANT.
16287         * decl.c (duplicate_decls): Don't call duplicate_decls on
16288         the DECL_TEMPLATE_RESULT.
16289         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
16290         codes.
16292         * error.c (dump_template_bindings): Don't crash if we had an
16293         invalid argument list.
16295         * typeck.c (c_expand_start_case): Do narrowing here.
16296         * semantics.c (finish_switch_cond): Not here.
16298 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
16300         * parse.y (asm_clobbers): Do string concatenation.
16302 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
16304         * decl.c (pushtag): Don't put local classes in template functions
16305         on the local_classes list.
16307 2000-07-04  Scott Snyder  <snyder@fnal.gov>
16309         * decl2.c (get_guard): Add missing return for old ABI local
16310         variable case.
16312 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
16314         * cp-tree.h (char_type_p): New function.
16315         * decl.c (init_decl_processing): Don't initialize
16316         signed_wchar_type_node or unsigned_wchar_type_node.
16317         (complete_array_type): Handle brace-enclosed string-constants.
16318         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
16319         * tree.c (char_type_p): New function.
16320         * typeck2.c (digest_init): Use char_type_p.
16322 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
16324         * pt.c (tsubst): Don't layout type, if it's error_mark.
16326 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
16328         * pt.c (instantiate_pending_templates): Reset template level.
16330 2000-07-05  Jason Merrill  <jason@redhat.com>
16332         * call.c (joust): Don't complain about `operator char *()' beating
16333         `operator const char *() const'.
16335 2000-07-04  scott snyder  <snyder@fnal.gov>
16336             Jason Merrill  <jason@redhat.com>
16338         * repo.c (repo_get_id): Handle the case where a class with virtual
16339         bases has a null TYPE_BINFO_VTABLE.
16341 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
16342             Jason Merrill  <jason@redhat.com>
16344         * parse.y (member_init): Just pass in the type.
16345         * init.c (expand_member_init): Handle getting a type.
16347 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16348             Jason Merrill  <jason@redhat.com>
16350         * decl.c (finish_function): Warn if a function has no return
16351         statement.
16352         Suggested by Andrew Koenig.
16353         * typeck.c (check_return_expr): Do set current_function_returns_value
16354         if we got an error_mark_node.
16356 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
16358         * decl2.c (push_decl_namespace): Push the original namespace.
16360 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
16362         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
16363         * semantics.c (begin_class_definition): Clear it.
16365 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
16367         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
16368         (genrtl_expr_stmt): Likewise.
16369         (genrtl_decl_stmt): Likewise.
16370         (genrtl_if_stmt): Likewise.
16371         (genrtl_while_stmt): Likewise.
16372         (genrtl_do_stmt): Likewise.
16373         (genrtl_return_stmt): Likewise.
16374         (genrtl_for_stmt): Likewise.
16375         (genrtl_break_stmt): Likewise.
16376         (genrtl_continue_stmt): Likewise.
16377         (genrtl_scope_stmt): Likewise.
16378         (genrtl_switch_stmt): Likewise.
16379         (genrtl_case_label): Likewise.
16380         (genrtl_begin_compound_stmt): Likewise.
16381         (genrtl_finish_compound_stmt): Likewise.
16382         (genrtl_compound_stmt): Likewise.
16383         (genrtl_asm_stmt): Likewise.
16385         * init.c (begin_init_stmts): Remove call to
16386         genrtl_begin_compound_stmt.
16387         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
16389         * semantics.c (lang_expand_stmt): Changed call to
16390         genrtl_compound_stmt to ignore return value.
16392 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
16394         * mangle.c (canonicalize_for_substitution): Return the canonical
16395         variant of a type.
16397         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
16398         TYPE_DECL.
16399         * typeck.c (commonparms): Remove obstack manipulations.
16401 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
16403         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
16405         * Makefile.in (OBJS): Added ../c-semantics.o.
16406         (OBJDEPS): Likewise.
16408         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
16409         ../c-common.h.
16410         (struct stmt_tree): Added comment.
16411         (current_function_name_declared): Removed.
16412         (stmts_are_full_exprs_p): Likewise.
16413         (genrtl_do_pushlevel): Likewise.
16414         (genrtl_clear_out_block): Likewise.
16415         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
16416         (DECL_ANON_UNION_ELEMS): Likewise.
16417         (emit_local_var): Likewise.
16418         (make_rtl_for_local_static): Likewise.
16419         (do_case): Likewise.
16420         (expand_stmt): Likewise.
16421         (genrtl_decl_cleanup): Likewise.
16422         (c_expand_asm_operands): Likewise.
16423         (c_expand_return): Likewise.
16424         (c_expand_start_case): Likewise.
16426         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
16427         (emit_local_var): Likewise.
16428         (initialize_local_var): Change reference to
16429         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16430         Change reference to stmts_are_full_exprs_p to
16431         current_stmt_tree->stmts_are_full_exprs_p.
16432         (push_cp_function_context): Likewise.
16434         * expect.c (expand_throw): Change reference to
16435         stmts_are_full_exprs_p.
16437         * init.c (build_aggr_init): Change reference to
16438         stmts_are_full_exprs_p.
16439         (build_vec_init): Likewise.
16441         * optimize.c (maybe_clone_body): Change reference to
16442         current_function_name_declared to
16443         cp_function_chain->name_declared.
16445         * pt.c (instantiate_decl): Change reference to
16446         current_function_name_declared to
16447         cp_function_chain->name_declared.
16449         * semantics.c (expand_cond): Moved declaration to c-common.h.
16450         (genrtl_do_pushlevel): Moved to c-semantics.c.
16451         (genrtl_clear_out_block): Likewise.
16452         (genrtl_goto_stmt): Likewise.
16453         (genrtl_expr_stmt): Likewise.
16454         (genrtl_decl_stmt): Likewise.
16455         (gerntl_if_stmt): Likewise.
16456         (genrtl_while_stmt): Likewise.
16457         (genrtl_do_stmt): Likewise.
16458         (genrtl_return_stmt): Likewise.
16459         (genrtl_for_stmt): Likewise.
16460         (genrtl_break_stmt): Likewise.
16461         (genrtl_continue_stmt): Likewise.
16462         (genrtl_scope_stmt): Likewise.
16463         (genrtl_switch_stmt): Likewise.
16464         (genrtl_case_label): Likewise.
16465         (genrtl_begin_compound_stmt): Likewise.
16466         (genrtl_finish_compound_stmt): Likewise.
16467         (genrtl_compound_stmt): Likewise.
16468         (genrtl_asm_stmt): Likewise.
16469         (genrtl_decl_cleanup): Likewise.
16470         (expand_cond): Likewise.
16471         (expand_stmt): Renamed to ...
16472         (lang_expand_stmt): ... this.
16473         (lang_expand_expr_stmt): Initialize.
16474         (set_current_function_name_declared): Likewise.
16475         (stmts_are_full_exprs_p): Likewise.
16476         (current_function_name_declared): Likewise.
16477         (anon_aggr_type_p): Likewise.
16478         (do_poplevel): Change reference to
16479         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16480         Change reference to stmts_are_full_exprs_p to
16481         current_stmt_tree->stmts_are_full_exprs_p.
16482         (add_tree): Likewise.
16483         (finish_expr_stmt): Likewise.
16484         (prep_stmt): Likewise.
16485         (lang_expand_stmt): Likewise.
16486         (begin_compound_stmt): Change reference to
16487         current_function_name_declared to
16488         cp_function_chain->name_declared and call to
16489         current_function_name_declared().
16490         (setup_vtbl_ptr): Likewise.
16491         (genrtl_do_poplevel): Removed.
16493 2000-06-30  Jason Merrill  <jason@redhat.com>
16495         * init.c (init_init_processing): Go back to aligning like
16496         double_type_node for old ABI.
16497         (get_cookie_size): Make cookie larger if we get a type that needs
16498         more alignment.
16499         (build_vec_delete): Call it.
16501         * typeck.c (qualify_type_recursive): New fn.
16502         (composite_pointer_type): Use it.
16503         (build_binary_op): Use composite_pointer_type.
16505 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
16506             Jason Merrill  <jason@redhat.com>
16508         * typeck.c (check_return_expr): Don't complain about returning
16509         NULL from operator new if -fcheck-new.
16510         * cp-tree.h: Declare flag_check_new here.
16511         * init.c: Not here.
16513 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
16515         * mangle.c (find_substitution): Use same_type_p.
16516         (write_encoding): Don't check for substitutions.
16518 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
16520         * parse.y (expr_no_comma_rangle): New non-terminal.
16521         (template_parm): Use it for default parameter case.
16522         (template_arg): Use it.
16523         (expr_no_commas): Remove commented out undefined extensions.
16524         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16525         * parse.h, parse.c: Rebuilt.
16527 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
16529         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
16530         (finish_asm_stmt): Do it here, instead.
16532         * cp-tree.h (ridpointers): Don't declare.
16533         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
16534         (record_builtin_java_type): Likewise.
16535         (init_decl_processing): Likewise.
16536         * lex.c: Move inclusion of lex.h.
16537         (ridpointers): Don't define.
16538         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
16539         RID_MAX.
16540         * lex.h (enum rid): Rename to ...
16541         (enum cp_rid): ... this.
16542         (ridpointers): Don't declare.
16543         * parse.y: Move inclusion of lex.h.
16544         * parse.c: Regenerated.
16545         * spew.c: Move inclusion of lex.h.
16547         * cp-tree.h (struct language_function): Remove temp_name_counter.
16548         (temp_name_counter): Remove.
16549         (get_temp_name): Change prototype.
16550         (get_guard): New function.
16551         (get_guard_cond): Likewise.
16552         (set_guard): Likewise.
16553         * cvt.c (build_up_reference): Adjust call to get_temp_name.
16554         * decl.c (expand_static_init): Use get_guard and friends to
16555         implement guard variables.
16556         * decl2.c (get_temp_name): Assume that the variables created are
16557         always static.
16558         (get_sentry): Rename to ...
16559         (get_guard): ... this.  Implement new ABI guard variables.
16560         (get_guard_bits): New function.
16561         (get_guard_cond): Likewise.
16562         (set_guard): Likewise.
16563         (start_static_initialization_or_destruction): Use them.
16564         (do_static_initialization): Replace sentry with guard throughout.
16565         (do_static_destruction): Likewise.
16566         * init.c (create_temporary_var): Add comment.
16568 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
16570         * mangle.c (find_substitution): Use same_type_p.
16571         (write_encoding): Don't check for substitutions.
16573 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
16575         * parse.y (expr_no_comma_rangle): New non-terminal.
16576         (template_parm): Use it for default parameter case.
16577         (template_arg): Use it.
16578         (expr_no_commas): Remove commented out undefined extensions.
16579         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16580         * parse.h, parse.c: Rebuilt.
16582 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
16584         * cp-tree.h (flag_const_strings): Remove.
16585         (warn_parentheses): Likewise.
16586         (warn_format): Likewise.
16587         (common_type): Likewise.
16588         (default_conversion): Likewise.
16589         (build_binary_op): Likewise.
16590         (cp_build_binary_op): New macro.
16591         * call.c (build_new_op): Use cp_build_binary_op instead of
16592         build_binary_op.
16593         * class.c (build_vtable_entry_ref): Likewise.
16594         * decl.c (expand_static_init): Likewise.
16595         (compute_array_index_type): Likewise.
16596         (build_enumerator): Likewise.
16597         * decl2.c (delete_sanity): Likewise.
16598         (start_static_initialization_or_destruction): Likewise.
16599         * error.c (dump_type_suffix): Likewise.
16600         * init.c (resolve_offset_ref): Likewise.
16601         (build_new): Likewise.
16602         (build_new_1): Likewise.
16603         (build_vec_delete_1): Likewise.
16604         (build_vec_init): Likewise.
16605         (build_delete): Likewise.
16606         * rtti.c (synthesize_tinfo_fn): Likewise.
16607         (synthesize_tinfo_var): Likewise.
16608         * search.c (expand_upcast_fixups): Likewise.
16609         (fixup_all_virtual_upcast_offsets): Likewise.
16610         * typeck.c (build_array_ref): Likewise.
16611         (get_member_function_from_ptrfunc): Likewise.
16612         (build_binary_op): Add parameter.
16613         (pointer_int_sum): Use cp_build_binary_op.
16614         (pointer_diff): Likewise.
16615         (build_modify_expr): Likewise.
16616         (get_delta_difference): Likewise.
16617         (build_ptrmemfunc): Likewise.
16619 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
16621         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
16622         * decl.c (create_implicit_typedef): Adjust.
16623         * decl2.c (build_artificial_parm): Adjust.
16624         * method.c (implicitly_declare_fn): Adjust.
16625         * pt.c (push_inline_template_parms_recursive): Adjust.
16626         (process_template_parm): Adjust.
16627         (overloaded_template_name): Adjust.
16628         * semantics.c (finish_template_template_parm): Adjust.
16630 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
16632         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
16633         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
16634         where to emit thunks.
16635         (build_vtt): Adjust call to build_vtt_inits.
16636         (build_vtt_inits): Add parameter to indicate whether or not
16637         sub-VTTs for virtual bases should be included.  Adjust handling of
16638         construction vtables.
16639         (get_matching_base): New function.
16640         (dfs_build_vtt_inits): Rename to ...
16641         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
16642         construction vtables.
16643         (dfs_fixup_binfo_vtbls): Likewise.
16644         (build_ctor_vtbl_groups): Build construction vtables for virtual
16645         bases, too.
16646         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
16647         to build construction vtbls.
16648         (dfs_accumulate_vtbl_inits): Adjust handling of
16649         construction vtables.
16651         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
16652         types correctly.
16654 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
16656         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
16658 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
16660         * search.c (hides): Remove.
16661         (is_subobject_of_p): Add most_derived parameter. Use
16662         CANONICAL_BINFO.
16663         (lookup_field_queue_p): Adjust.
16664         (lookup_field_r): Adjust.
16666 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
16668         * decl2.c (handle_class_head): Bash typedefs to the type's main
16669         decl.
16671 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
16673         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
16674         (begin_global_stmt_expr): ... this.
16675         (genrtl_finish_stmt_expr): Rename to ...
16676         (finish_global_stmt_expr): ... this.
16677         * init.c (begin_init_stmts): Adjust calls.
16678         (finish_init_stmts): Likewise.
16679         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
16680         (begin_global_stmt_expr): ... this.
16681         (genrtl_finish_stmt_expr): Rename to ...
16682         (finish_global_stmt_expr): ... this.
16684 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16686         * search.c (lookup_member): Fix typo in comment.
16688 2000-06-24  Jason Merrill  <jason@redhat.com>
16690         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
16691         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
16693 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16695         * parse.y (complex_direct_notype_declarator): Support global_scope.
16696         * Makefile.in: Adjust conflict count.
16698 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16700         * parse.y (template_arg): Convert TEMPLATE_DECL
16701         that is a template template parameter to
16702         TEMPLATE_TEMPLATE_PARM here.
16704         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16705         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
16706         (copy_template_template_parm): Adjust prototype.
16707         * decl.c (grokdeclarator): Remove dead code.
16708         * pt.c (process_template_parm): Tidy.
16709         (lookup_template_class): Construct nodes in
16710         copy_template_template_parm.
16711         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
16712         lookup_template_class.  Use TYPE_TI_TEMPLATE.
16713         * tree.c (copy_template_template_parm): Add NEWARGS
16714         parameter.
16715         (mapcar): Adjust call to copy_template_template_parm.
16716         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
16717         * method.c (build_template_template_parm_names): Change error
16718         code to avoid compilation warning.
16720         * gxxint.texi: Document template template parameter
16721         name mangling.
16723 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
16725         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
16726         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
16727         (cp-demangle.o): New rule.
16728         (dyn-string.o): Likewise.
16729         * inc/cxxabi.h (__cxa_demangle): New declaration.
16731 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
16733         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
16734         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
16735         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
16736         a tree, not an int.
16737         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
16738         (make_thunk): Change prototype.
16739         (emit_thunk): Rename to use_thunk.
16740         (mangle_thunk): Change prototype.
16741         * class.c (get_derived_offset): Simplify.
16742         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
16743         BV_GENERATE_THUNK_WITH_VTABLE_P.
16744         (build_primary_vtable): Simplify.
16745         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
16746         (dfs_find_base): Remove.
16747         (update_vtable_entry_for_fn): Correct bug in finding the base
16748         where a virtual function was first declared.  Figure out whether
16749         or not to emit a vcall-thunk with the vtables in which it appears.
16750         Correct logic for deciding whether to use an ordinary thunk, or a
16751         vcall thunk.
16752         (finish_struct_1): Remove unnecssary code.
16753         (build_vtbl_initializer): Use ssize_int for the running counter of
16754         negative indices.
16755         (build_vtbl_initializer): Only use vcall thunks where necessary.
16756         Mark thunks as needing to be emitted with their vtables, or not.
16757         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
16758         indices.  Use size_binop.
16759         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
16760         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
16761         size_binop.
16762         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
16763         (build_vtable_entry): Mark thunks as needing to be emitted with
16764         their vtables, or not.
16765         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
16766         * decl2.c (mark_vtable_entries): Use use_thunk instead of
16767         emit_thunk.
16768         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
16769         information.
16770         * error.c (dump_expr): Use BV_FN.
16771         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
16772         not an int.
16773         * method.c (make_thunk): Likewise.
16774         (emit_thunk): Rename to use_thunk.  Allow callers to decide
16775         whether or not to actually emit the thunk.  Adjust for changes in
16776         representation of vcall offsets.
16777         * search.c (dfs_get_pure_virtuals): Use BV_FN.
16778         * semantics.c (emit_associated_thunks): New function.
16779         (expand_body): Use it.
16780         * ir.texi: Adjust decriptions of thunks.
16782 2000-06-22  Jason Merrill  <jason@redhat.com>
16784         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
16785         (tsubst_friend_function): Copy it here.
16787         * decl.c (grok_op_properties): Fix typo.
16789         * decl2.c (delete_sanity): Clarify warning, avoid failure on
16790         deleting void*.
16792         * pt.c (check_explicit_specialization): Clarify error.
16794         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
16795         an old OVERLOAD when we're declaring a non-function.
16796         (pushdecl, destroy_local_var): Check for error_mark_node.
16797         (warn_extern_redeclared_static): Also bail early if
16798         we're a CONST_DECL.
16799         (push_overloaded_decl): Ignore an old error_mark_node.
16801 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
16803         * call.c (build_x_va_arg): Check if in a template decl.
16804         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
16806 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16808         * class.c (push_lang_context): TYPE_NAME gets you to the Java
16809         types DECLs.
16810         * decl.c (check_goto): Computed gotos assumed OK.
16812 2000-06-20  Jason Merrill  <jason@redhat.com>
16814         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
16815         for which we don't need to look for instantiations.
16817 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
16819         * parse.y (program): Always call finish_translation_unit.
16820         * parse.c, parse.h: Rebuilt.
16822 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
16824         * method.c: Don't include hard-reg-set.h.
16826 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
16828         * rtti.c (get_base_offset): Cope when vbase field is in a base.
16830 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
16832         * call.c (build_conditional_expr): Use VOID_TYPE_P.
16833         * cvt.c (cp_convert_to_pointer): Likewise.
16834         (convert_to_void): Likewise.
16835         * error.c (dump_expr): Likewise.
16836         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
16837         * init.c (build_delete): Likewise.
16838         * method.c (emit_thunk): Likewise.
16839         * optmize.c (declare_return_variable): Likewise.
16840         * rtti.c (get_tinfo_decl_dynamic): Likewise.
16841         (get_typeid): Likewise.
16842         (build_dynamic_cast_1): Likewise.
16843         * typeck.c (composite_pointer_type): Likewise.
16844         (common_type): Likewise.
16845         (build_indirect_ref): Likewise.
16846         (build_binary_op): Likewise.
16847         (build_x_compound_expr): Likewise.
16848         (check_return_expr): Likewise.
16849         * typeck2.c (add_exception_specifier): Likewise.
16851         * mangle.c (write_method_parms): Use direct comparison for end
16852         of parmlist.
16854 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
16856         * cp-tree.h (genrtl_try_block): Declare function.
16857         (genrtl_handler): Likewise.
16858         (genrtl_catch_block): Likewise.
16859         (genrtl_ctor_stmt): Likewise.
16860         (genrtl_subobject): Likewise.
16861         (genrtl_decl_cleanup): Likewise.
16862         (genrtl_do_poplevel): Likewise.
16863         (genrtl_do_pushlevel): Likewise.
16864         (genrtl_clear_out_block): Likewise.
16865         (genrtl_goto_stmt): Likewise.
16866         (genrtl_expr_stmt): Likewise.
16867         (genrtl_decl_stmt): Likewise.
16868         (genrtl_if_stmt): Likewise.
16869         (genrtl_while_stmt): Likewise.
16870         (genrtl_do_stmt): Likewise.
16871         (genrtl_return_stmt): Likewise.
16872         (genrtl_for_stmt): Likewise.
16873         (genrtl_break_stmt): Likewise.
16874         (genrtl_continue_stmt): Likewise.
16875         (genrtl_scope_stmt): Likewise.
16876         (genrtl_switch_stmt): Likewise.
16877         (genrtl_case_label): Likewise.
16878         (genrtl_begin_compound_stmt): Likewise.
16879         (genrtl_finish_compound_stmt): Likewise.
16880         (genrtl_compound_stmt): Likewise.
16881         (genrtl_asm_stmt): Likewise.
16882         (genrtl_named_return_value): Likewise.
16883         (genrtl_begin_stmt_expr): Likewise.
16884         (genrtl_finish_stmt_expr): Likewise.
16885         (finish_for_stmt): Removed first argument.
16886         (finish_switch_stmt): Likewise.
16888         * semantics.c (genrtl_try_block): Define function.
16889         (genrtl_handler): Likewise.
16890         (genrtl_catch_block): Likewise.
16891         (genrtl_ctor_stmt): Likewise.
16892         (genrtl_subobject): Likewise.
16893         (genrtl_decl_cleanup): Likewise.
16894         (genrtl_do_poplevel): Likewise.
16895         (genrtl_do_pushlevel): Likewise.
16896         (genrtl_clear_out_block): Likewise.
16897         (genrtl_goto_stmt): Likewise.
16898         (genrtl_expr_stmt): Likewise.
16899         (genrtl_decl_stmt): Likewise.
16900         (genrtl_if_stmt): Likewise.
16901         (genrtl_while_stmt): Likewise.
16902         (genrtl_do_stmt): Likewise.
16903         (genrtl_return_stmt): Likewise.
16904         (genrtl_for_stmt): Likewise.
16905         (genrtl_break_stmt): Likewise.
16906         (genrtl_continue_stmt): Likewise.
16907         (genrtl_scope_stmt): Likewise.
16908         (genrtl_switch_stmt): Likewise.
16909         (genrtl_case_label): Likewise.
16910         (genrtl_begin_compound_stmt): Likewise.
16911         (genrtl_finish_compound_stmt): Likewise.
16912         (genrtl_compound_stmt): Likewise.
16913         (genrtl_asm_stmt): Likewise.
16914         (genrtl_named_return_value): Likewise.
16915         (genrtl_begin_stmt_expr): Likewise.
16916         (genrtl_finish_stmt_expr): Likewise.
16917         (finish_for_stmt): Removed first argument and generate rtl
16918         specific code.
16919         (finish_switch_stmt): Likewise.
16920         (do_poplevel): Removed generate rtl specific code.
16921         (do_pushlevel): Likewise.
16922         (add_tree): Likewise.
16923         (finish_goto_stmt): Likewise.
16924         (finish_expr_stmt): Likewise.
16925         (begin_if_stmt): Likewise.
16926         (finish_if_stmt_cond): Likewise.
16927         (finish_then_clause): Likewise.
16928         (begin_else_clause): Likewise.
16929         (finish_else_clause): Likewise.
16930         (finish_if_stmt): Likewise.
16931         (clear_out_block): Likewise.
16932         (begin_while_stmt): Likewise.
16933         (finish_while_stmt_cond): Likewise.
16934         (finish_while_stmt): Likewise.
16935         (begin_do_stmt): Likewise.
16936         (finish_do_body): Likewise.
16937         (finish_do_stmt): Likewise.
16938         (finish_return_stmt): Likewise.
16939         (begin_for_stmt): Likewise.
16940         (finish_for_init_stmt): Likewise.
16941         (finish_for_cond): Likewise.
16942         (finish_for_expr): Likewise.
16943         (finish_break_stmt): Likewise.
16944         (finish_continue_stmt): Likewise.
16945         (begin_switch_stmt): Likewise.
16946         (finish_switch_cond): Likewise.
16947         (finish_case_label): Likewise.
16948         (begin_try_block): Likewise.
16949         (begin_function_try_block): Likewise.
16950         (finish_try_block): Likewise.
16951         (finish_cleanup_try_block): Likewise.
16952         (finish_cleanup): Likewise.
16953         (finish_function_try_block): Likewise.
16954         (finish_handler_sequence): Likewise.
16955         (finish_function_handler_sequence): Likewise.
16956         (begin_handler): Likewise.
16957         (finish_handler_parms): Likewise.
16958         (begin_catch_block): Likewise.
16959         (finish_handler): Likewise.
16960         (begin_compound_stmt): Likewise.
16961         (finish_compound_stmt): Likewise.
16962         (finish_asm_stmt): Likewise.
16963         (finish_label_stmt): Likewise.
16964         (finish_label_decl): Likewise.
16965         (finish_subobject): Likewise.
16966         (finish_decl_cleanup): Likewise.
16967         (finish_named_return_value): Likewise.
16968         (begin_stmt_expr): Likewise.
16969         (finish_stmt_expr): Likewise.
16971         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
16972         to call genrtl_expr_stmt when appropriate.
16974         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
16975         begin_compound_expr to call genrtl_begin_stmt_expr and
16976         genrtl_begin_compound_expr when appropriate.
16977         (finish_init_stmts): Changed calls to finish_compound_expr and
16978         finish_stmt_expr to call genrtl_finish_compound_expr and
16979         genrtl_finish_stmt_expr when appropriate.
16980         (expand_default_init): Changed call to finish_expr_stmt to call
16981         genrtl_expr_stmt when appropriate.
16982         (build_vec_init): Likewise.
16984         * parse.y (simple_stmt): Removed first argument from call to
16985         finish_for_stmt. Removed first argument from call to
16986         finish_switch_stmt.
16988         * parse.c: Regenerated.
16990         * pt.c (tsubst_expr): Removed first argument from call to
16991         finish_for_stmt. Removed first argument from call to
16992         finish_switch_stmt.
16994 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
16996         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
16997         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
16999         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17000         (cplus_tree_code_length[]): Likewise.
17001         (cplus_tree_code_name[]): Likewise.
17002         (init_parse): Added call to add_c_tree_codes. Changed
17003         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17005 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
17007         * cp-tree.h (finish_mem_initializers): Declare.
17008         (count_trees): Likewise.
17009         * parse.y (base_init): Use finish_mem_initializers.
17010         * semantics.c (finish_mem_initializers): New function.
17012         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
17013         the number of trees.
17014         (n_trees): Remove.
17015         (count_trees): Don't use it.
17017 2000-06-15  Jason Merrill  <jason@redhat.com>
17019         * tree.c (count_trees): New debugging function.
17021         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17022         * init.c (build_member_call): Pull out the name of a DECL.
17024         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17025         * semantics.c (expand_body): Push to TV_INTEGRATION here.
17026         * optimize.c (optimize_function): Not here.
17027         * pt.c (instantiate_decl): Push to TV_PARSE.
17029 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
17031         * cp-tree.h (struct language_function): Remove x_base_init_list
17032         and x_member_init_list.
17033         (current_base_init_list): Remove.
17034         (current_member_init_list): Likewise.
17035         (setup_vtbl_ptr): Change prototype.
17036         (emit_base_init): Likewise.
17037         (expand_member_init): Likewise.
17038         (reinit_parse_for_function): Remove.
17039         * decl.c (save_function_data): Don't clear x_base_init_list and
17040         x_member_init_list.
17041         (mark_language_function): Don't mark them.
17042         * init.c (perform_member_init): Tweak comment.
17043         (sort_member_init): Take the list of initializers as an argument.
17044         (sort_base_init): Likewise.
17045         (emit_base_init): Likewise.
17046         (expand_member_init): Return the initializer.  Don't use global
17047         variables.
17048         * lex.c (reinit_parse_for_function): Remove.
17049         * method.c (build_template_parm_names): Correct substitution.
17050         (do_build_copy_constructor): Don't use current_member_init_list
17051         and current_base_init_list.
17052         (synthesize_method): Likewise.
17053         * parse.y (base_init): Split mem-initializers into
17054         base-initializers and field-initializers.
17055         (member_init_list): Build up the list here.
17056         (member_init): Return the initializer.
17057         (fn.depfn): Don't use reinit_parse_for_function.
17058         * parse.c: Regenerated.
17059         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17060         ERROR_MARK.
17061         (tsubst_expr): Don't use current_member_init_list
17062         and current_base_init_list.
17063         (tsubst_expr_values): Rename to ...
17064         (tsubst_initializer_list): ... this.  Use convert_from_reference.
17065         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17066         and current_base_init_list.
17067         (begin_function_definition): Don't call reinit_parse_for_function.
17069         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17071         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
17072         correctly.
17074         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
17076 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
17078         * cp-tree.h (IF_COND): Move to c-common.h.
17079         (THEN_CLAUSE): Likewise.
17080         (ELSE_CLAUSE): Likewise.
17081         (WHILE_COND): Likewise.
17082         (WHILE_BODY): Likewise.
17083         (DO_COND): Likewise.
17084         (DO_BODY): Likewise.
17085         (RETURN_EXPR): Likewise.
17086         (EXPR_STMT_EXPR): Likewise.
17087         (FOR_INIT_STMT): Likewise.
17088         (FOR_COND): Likewise.
17089         (FOR_EXPR): Likewise.
17090         (FOR_BODY): Likewise.
17091         (SWITCH_COND): Likewise.
17092         (SWITCH_BODY): Likewise.
17093         (CASE_LOW): Likewise.
17094         (CASE_HIGH): Likewise.
17095         (GOTO_DESTINATION): Likewise.
17096         (COMPOUND_BODY): Likewise.
17097         (ASM_CV_QUAL): Likewise.
17098         (ASM_STRING): Likewise.
17099         (ASM_OUTPUTS): Likewise.
17100         (ASM_INPUTS): Likewise.
17101         (ASM_CLOBBERS): Likewise.
17102         (DECL_STMT_DECL): Likewise.
17103         (STMT_EXPR_STMT): Likewise.
17104         (LABEL_STMT_LABEL): Likewise.
17105         (SCOPE_BEGIN_P): Likewise.
17106         (SCOPE_END_P): Likewise.
17107         (SCOPE_STMT_BLOCK): Likewise.
17108         (SCOPE_NULLIFIED_P): Likewise.
17109         (SCOPE_NO_CLEANUPS_P): Likewise.
17110         (SCOPE_PARTIAL_P): Likewise.
17111         (ASM_VOLATILE_P): Likewise.
17112         (STMT_LINENO): Likewise.
17113         (STMT_LINENO_FOR_FN_P): Likewise.
17115         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
17116         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
17117         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
17118         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
17119         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
17121         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
17123         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
17124         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
17126         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
17127         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
17128         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
17130 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
17132         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
17133         * class.c (dfs_find_final_overrider): Set it appropriately.
17134         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
17135         avoid unneeded secondary vptrs.
17137 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
17139         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
17140         (check_bitfield_decl, check_field_decl): Likewise.
17141         (build_vtbl_or_vbase_field, build_base_field): Likewise.
17142         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
17143         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
17144         (xfer_tag, finish_enum): Likewise.
17145         * decl2.c (finish_builtin_type): Likewise.
17146         * init.c (init_init_processing): Likewise.
17147         * pt.c (instantiate_class_template): Likewise.
17148         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
17149         * cp-tree.h (struct lang_type): Add user_align member.
17150         (CLASSTYPE_USER_ALIGN): Define.
17152 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
17154         * Make-lang.in (c++.install-common): Install g++-cross in
17155         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
17156         $(target_alias)-g++ and $(target_alias)-c++.
17158 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
17160         * class.c (vcall_offset_data_s): Add last_init and fns.
17161         (overrides): Rename to same_signature_p.
17162         (dfs_find_final_overrider): Adjust accordingly.
17163         (mark_overriders): Likewise.
17164         (warn_hidden): Likewise.
17165         (build_vtbl_initializer): Reorganize machinery for building things
17166         at negative offsets.
17167         (build_vcall_and_vbase_vtbl_entries): Likewise.
17168         (build_vbase_offset_vtbl_entries): Likewise.
17169         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
17170         offset entries.  Do not create two entries for functions with the
17171         same signature.
17172         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
17173         (build_rtti_vtbl_entries): Reorganize machinery for building things
17174         at negative offsets.
17176         * optimize.c (expand_call_inline): Don't recurse into the code
17177         used to initialize the parameters more than once.
17179 2000-06-11  Mark Mitchell <mark@codesourcery.com>
17181         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
17182         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
17183         (find_substitution): Only use the `Sa' substitution for
17184         std::allocator, not instantiations of it.
17185         (write_template_prefix): Move comment.  Only use a TREE_LIST to
17186         represent substitutions for a member template.
17187         (write_array_type): Mangle array dimensions correctly.
17188         * optimize.c (maybe_clone_body): Copy more information from the
17189         cloned function.
17190         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
17191         on the regenerated declaration.
17193 2000-06-11  Chip Salzenberg  <chip@valinux.com>
17194             Mark Mitchell <mark@codesourcery.com>
17196         * class.c (build_vtable): Clarify comment.
17197         (build_ctor_vtbl_group): Pass the most derived type to
17198         build_vtable.
17200 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17202         * decl2.c (compare_options): Don't needlessly cast away const-ness.
17204 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
17206         * decl.c (add_binding): Handle duplicate declarations of external
17207         variables.
17209 2000-06-09  Chip Salzenberg  <chip@valinux.com>
17210             Mark Mitchell <mark@codesourcery.com>
17212         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
17213         argument.
17214         (write_signed_number): New macro.
17215         (write_unsigned_number): Likewise.
17216         (write_source_name): Use them.
17217         (write_number): Handle signed and unsigned values.
17218         (write_integer_cst): Use tree_int_cst_sgn, and use
17219         write_unsigned_number or write_signed_number as appropriate.
17220         (write_discriminator): Use write_unsigned_number or
17221         write_signed_number as appropriate.
17222         (write_template_arg_literal): Likewise.
17223         (write_array_type): Use tree_low_cst.
17224         (write_template_parm):  Use write_unsigned_number or
17225         write_signed_number as appropriate.
17226         (write_substitution): Adjust call to write_number.
17227         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
17228         (write_expression): Handle non-type template arguments of
17229         reference type correctly.
17230         (mangle_thunk): Use write_signed_number.
17232 2000-06-09  Chip Salzenberg  <chip@valinux.com>
17234         * mangle.c (find_substition): Don't mangle objects with typename
17235         substitutions (e.g. "cin" as "Si").
17237 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
17239         * call.c (add_candidate): Use ggc_alloc_cleared.
17240         * decl.c (lookup_label): Likewise.
17241         * lex.c (retrofit_lang_decl): Likewise.
17243 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
17245         * semantics.c (expand_body): Push to TV_EXPAND.
17246         * optimize.c (optimize_function): Push to TV_INTEGRATION.
17247         * decl.c (start_function): Always call announce_function.
17249         * tinfo2.cc: Just declare abort.
17251 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
17253         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
17254         whenever @ is a symbolic name.
17256 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
17258         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
17260 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
17262         * decl.c (pushdecl): Look up functions by DECL_NAME, not
17263         DECL_ASSEMBLER_NAME.
17265 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
17267         * decl2.c (c_language): Define.
17269 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
17271         * lex.c (lang_init_options): Tweak.
17273         * decl2.c: Remove #inclusion of diagnostic.h
17274         (lang_decode_option): Move diagnostic formatting options to
17275         toplevel.
17277         * lang-options.h: Remove documentation for diagnostic options.
17279         * Makefile.in (lex.o): Depends upon diagnostic.h
17281 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
17283         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
17284         the same DECL_RESULT, it's not a redefinition.
17285         * pt.c (tsubst_decl): Remove code to handle illegal
17286         specializations.
17288 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
17290         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
17292 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
17294         * search.c (maybe_suppress_debug_info): Don't check
17295         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
17297         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
17298         here if extern_p.
17300         Remember instantiation context in deferred instantiations.
17301         * cp-tree.h (struct tinst_level): Remove.
17302         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
17303         * pt.c (current_tinst_level): Now a tree.
17304         (print_template_context, push_tinst_level, pop_tinst_level,
17305         tinst_for_decl): Adjust.
17306         (reopen_tinst_level): New fn.
17307         (init_pt): Register current_tinst_level as a root.
17308         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
17309         of the pending templates list.
17310         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
17311         * lex.c (extract_interface_info): Adjust.
17312         * decl2.c (warn_if_unknown_interface): Adjust.
17314 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
17316         * class.c (indirect_primary_base_p): New function.
17317         (determine_primary_base): Use it.
17319 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
17321         Update new-abi dynamic cast algorithm.
17322         * tinfo.cc (__class_type_info::__dyncast_result): Add
17323         whole_details. Adjust constructor.
17324         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
17325         Avoid unnecessary searching.
17326         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
17328 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17330         * decl.c (init_decl_processing): Don't call record_component_aliases.
17331         * tree.c (build_cplus_array_type_1): Likewise.
17333 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
17335         * ir.texi: Correct typo.
17336         * mangle.c (write_expression): Handle non-type template arguments
17337         with reference type.
17338         * method.c (build_overload_value): Likewise.
17339         * pt.c (convert_nontype_argument): Explicitly represent conversion
17340         to a reference with an ADDR_EXPR.
17341         (unify): Always unify arguments in left-to-right order.
17343 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
17344             Mark Mitchell  <mark@codesourcery.com>
17346         * Make-lang.in (CXX_SRCS): Add mangle.c.
17347         * Makefile.in (CXX_OBJS): Add mangle.o.
17348         (mangle.o): New rule.
17350         * class.c (local_classes): New variable.
17351         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
17352         (get_vtt_name): Use mangle_vtt_name for new ABI.
17353         (init_class_processing): Initialize local_classes.
17354         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
17355         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
17356         (std_identifier): New macro.
17357         (DECL_VOLATILE_MEMFUNC_P): New macro.
17358         (DECL_NAMESPACE_STD_P): Likewise.
17359         (local_classes): Declare.
17360         (get_mostly_instantiated_function_type): Declare.
17361         (init_mangle): Declare.
17362         (mangle_decl): Likewise.
17363         (mangle_type_string): Likewise.
17364         (mangle_type): Likewise.
17365         (mangle_typeinfo_for_type): Likewise.
17366         (mangle_typeinfo_string_for_type): Likewise.
17367         (mangle_vtbl_for_type): Likewise.
17368         (mangle_vtt_for_type): Likewise.
17369         (mangle_ctor_vtbl_for_type): Likewise.
17370         (mangle_thunk): Likewise.
17371         (mangle_conv_op_name_for_type): Likewise.
17372         (mangle_guard_variable): Likewise.
17373         * decl.c (pushtag): Keep track of local classes.
17374         (initialize_predefined_identifiers): Initialize std_identifier.
17375         (init_decl_processing): Use std_identifier.
17376         (start_decl): Don't treat instantiations as specializations.
17377         (grokdeclarator): Likewise.
17378         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
17379         name for fully-instantiated templates.
17380         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
17381         destructors with the new ABI.
17382         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
17383         (grokfield): Use mangle_type for new ABI.
17384         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
17385         (get_sentry): Use mangle_guard_variable for new ABI.
17386         (start_static_initialization_or_destruction): Likewise.
17387         * expr.c (extract_aggr_init): Remove.
17388         (extract_scalar_init): Likewise.
17389         (extract_init): Remove #if 0'd code.
17390         * mangle.c: New function.
17391         * method.c (build_mangled_name): Assert not flag_new_abi.
17392         (build_static_name): Likewise.
17393         (build_decl_overload_real): Likewise.
17394         (build_typename_overload): Likewise.
17395         (build_overload_with_type): Likewise.
17396         (build_overload_name): Likewise.
17397         (get_ctor_vtbl_name): Likewise.
17398         (start_squangling): Likewise.
17399         (get_id_2): Likewise.
17400         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
17401         (init_method): Call init_mangle for new ABI.
17402         (make_thunk): Call mangle_thunk for new ABI.
17403         * operators.def: Correct new ABI manglings for the `%' operator.
17404         Add `::' operator.
17405         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
17406         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
17407         (lookup_template_class): Call mangle_decl for new ABI.
17408         (get_mostly_instantiated_function_type): New function.
17409         (set_mangled_name_for_template_decl): Use it.
17410         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
17411         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
17412         conversion op names.
17413         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
17414         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
17415         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
17416         mangle_typeinfo_string_for_type.
17418 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
17420         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
17421         (INNERMOST_TEMPLATE_ARGS): New macro.
17422         (innermost_args): Remove.
17423         (get_innermost_template_args): New function.
17424         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
17425         * error.c (dump_function_decl): Be caution when using
17426         most_general_template.
17427         * method.c (build_template_parm_names):  Use
17428         INNERMOST_TEMPLATE_ARGS.
17429         * pt.c (add_to_template_args): Tidy comment
17430         (get_innermost_template_args): New function.
17431         (check_explicit_specialization): Clear DECL_INITIAL for a new
17432         specialization.
17433         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
17434         Tidy.
17435         (push_template_decl): Always register specializations of the most
17436         general template.
17437         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
17438         (coerce_template_parms): Likewise.
17439         (lookup_template_class): Likewise.
17440         (innermost_args): Remove.
17441         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
17442         (tsubst_decl): Handle tricky specializations.  Use
17443         get_innermost_template_args.
17444         (instantiate_template): Simplify handling of partial
17445         instantiations.
17446         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
17447         (most_general_template): Reimplement, in a more straightforward
17448         manner.
17449         (regenerate_decl_from_template): Tweak formatting.  Use
17450         TMPL_ARGS_DEPTH for clarity.
17451         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
17453         * dump.c (dequeue_and_dump): Dump information about thunks.
17455 2000-06-01  Richard Henderson  <rth@cygnus.com>
17457         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
17459 2000-06-01  Richard Henderson  <rth@cygnus.com>
17461         * decl2.c (unsupported_options): Fix typo, make const.
17462         (lang_decode_option): Fix bsearch argument order.
17464 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
17466         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
17467         on FIELD_DECLs.
17469 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17471         * cp-tree.h (c_get_alias_set): Deleted.
17472         * Makefile.in (decl.o): Include ../expr.h.
17473         * decl.c (expr.h): Include.
17474         (init_decl_processing): Call record_component_aliases for arrays.
17475         (grokdeclarator): Likewise.
17476         Set TREE_ADDRESSABLE for fields that aren't bitfields.
17477         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
17479 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
17481         Remove guiding declaration support.
17482         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
17483         (flag_guiding_decls): Remove.
17484         * call.c (build_user_type_conversion_1): Remove support for
17485         guiding decls.
17486         (build_new_function_call): Likewise.
17487         (build_new_op): Likewise.
17488         (build_new_method_call): Likewise.
17489         * decl.c (start_function): Likewise.
17490         * friend.c (is_friend): Likewise.
17491         (do_friend): Likewise.
17492         * decl2.c ((flag_dump_translation_unit): Make it const.
17493         (flag_guiding_decls): Remove.
17494         (unsupported_options): New variable
17495         (compare_options): New function.
17496         (lang_decode_option): Use them.
17498         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
17500         * method.c (mangle_expression): Adjust test for legal expression
17501         operators.
17503         * pt.c (instantiate_decl): Save and restore the local
17504         specializations list.
17506 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
17508         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
17510 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
17512         * call.c (add_template_candidate_real): Handle member template
17513         constructors for classes with virtual bases.
17514         (build_user_type_conversion_1): Use in_charge_arg_for_name.
17515         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
17517         * ir.texi: Update thunk documentation.
17519         * call.c (joust): Fix handling of overloaded builtin operators.
17521 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
17523         * cp-tree.h (DECL_ANTICIPATED): New macro.
17524         Document new use of DECL_LANG_FLAG_7.
17525         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
17526         in the user namespace.
17527         * lex.c (do_identifier): If the identifier's declaration has
17528         DECL_ANTICIPATED on, it has not yet been declared.  But do not
17529         replace it with an ordinary implicit declaration.
17531         * tinfo2.cc: Include stdlib.h.
17533 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
17535         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
17536         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
17537         CLASSTYPE_ALIGN.
17539 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
17541         * decl2.c (lang_decode_option): Use skip_leading_substring instead
17542         of plain strncmp.
17544 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
17546         * operators.def (<?): Duplicated, should have been...
17547         (>?): this.  Fixed.
17549 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
17550             Mark Mitchell  <mark@codesourcery.com>
17552         * cp-tree.h (ansi_opname): Make it a macro.
17553         (ansi_assopname): Likewise.
17554         (struct lang_decl_flags): Add assignment_operator_p.
17555         (struct lang_decl): Add operator_code.
17556         (DECL_VTT_PARM): Adjust.
17557         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
17558         overloaded operator.
17559         (SET_OVERLOADED_OPERATOR_CODE): New macro.
17560         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
17561         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
17562         (opname_tab): Remove.
17563         (assignop_tab): Likewise.
17564         (operator_name_info_t): New type.
17565         (operator_name_info): New variable.
17566         (assignment_operator_name_info): Likewise.
17567         (build_cp_library_fn): Remove declaration.
17568         (push_cp_library_fn): Likewise.
17569         (operator_name_string): Likewise.
17570         (build_decl_overload): Likewise.
17571         * call.c (print_z_candidates): Simplify.
17572         (build_object_call): Adjust usage of ansi_opname.  Use
17573         DECL_OVERLOADED_OPERATOR_P.
17574         (op_error): Adjust operator name lookup.
17575         (build_conditional_expr): Adjust usage of ansi_opname.
17576         (build_new_op): Likewise.
17577         (build_op_delete_call): Likewise.
17578         (build_over_call): Likewise.
17579         (joust): Use DECL_OVERLOADED_OPERATOR_P.
17580         * decl.c (duplicate_decls): Copy operator_code.
17581         (init_decl_processing): Adjust parameters to push_cp_library_fn.
17582         (builtin_function): Adjust parameters to build_library_fn_1.
17583         (build_library_fn_1): Accept an overloaded operator code.
17584         (build_library_fn): Pass ERROR_MARK.
17585         (build_cp_library_fn): Accept an overloaded operator code.
17586         (push_cp_library_fn): Likewise.
17587         (grokfndecl): Tweak.
17588         (grokdeclarator): Simplify code to compute names of overloaded
17589         operators.  Adjust use of ansi_opname.
17590         (ambi_op_p): Work on tree_codes, not identifiers.
17591         (unary_op_p): Likewise.
17592         (grok_op_properties): Likewise.
17593         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
17594         (lang_mark_tree): Don't try to mark the operator_code.
17595         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
17596         * error.c (dump_decl): Remove special handling for operator
17597         names.
17598         (dump_function_name): Likewise.
17599         (dump_expr): Adjust name lookup of operators.
17600         (op_to_string): Simplify.
17601         (assop_to_string): Likewise.
17602         * init.c (build_new_1): Adjust use of ansi_opname.
17603         * lex.c (opname_tab): Remove.
17604         (assignop_tab): Likewise.
17605         (ansi_opname): Likewise.
17606         (ansi_assopname): Likewise.
17607         (operator_name_string): Likewise.
17608         (reinit_lang_specific): Likewise.
17609         (operator_name_info): New variable.
17610         (assignment_operator_name_info): Likewise.
17611         (init_operators): New function.
17612         (init_parse): Use it.
17613         (do_identifier): Adjust use of ansi_opname.
17614         * method.c (mangle_expression): Don't use ansi_opname for
17615         mangling.
17616         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
17617         (build_decl_overload): Remove.
17618         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
17619         (do_build_assign_ref): Adjust use of ansi_opname.
17620         (synthesize_method): Likewise.
17621         (implicitly_declare_fn): Likewise.
17622         * operators.def: New file.
17623         * parse.y (operator): Adjust use of ansi_opname.
17624         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
17625         (set_mangled_name_for_template_decl): Don't play games with
17626         current_namespace.
17627         (special_function_p): Adjust use of ansi_opname.
17628         * typeck.c (check_return_expr): Likewise.
17629         * Make-lang.in (cc1plus): Depend on operators.def.
17630         * Makefile.in (lex.o): Likewise.
17631         (decl.o): Likewise.
17633 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
17635         * Make-lang.in (cplib2.ready): Eradicate.
17637 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17639         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
17640         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
17641         (built_min, cp_tree_equal): Likewise.
17643 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
17645         * class.c (layout_nonempty_base_or_field): Replace
17646         `record_layout_info' with `record_layout_info_s'.
17648 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
17650         Fix goto checking.
17651         * cp-tree.h (struct language_function): x_named_labels is now
17652         a struct named_label_list*.
17653         * decl.c (struct named_label_use_list): Renamed from...
17654         (struct named_label_list): ...this.  New struct.
17655         (push_binding_level): Don't set eh_region.
17656         (note_level_for_eh): New fn.
17657         (pop_label): Take label and old value directly.
17658         (pop_labels): Adjust for new named_labels format.
17659         (lookup_label): Likewise.
17660         (poplevel): Note characteristics of a binding level containing a
17661         named label.  Mess with named label lists earlier.
17662         (mark_named_label_lists): New fn.
17663         (mark_lang_function): Call it.
17664         (use_label): New fn, split out from...
17665         (make_label_decl): ...here.  Don't call it.
17666         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
17667         check_previous_gotos): New fns, split out from...
17668         (define_label): ...here.
17669         (check_switch_goto): New fn.
17670         (define_case_label): Call it.
17671         (check_goto): New fn.
17672         * semantics.c (finish_goto_stmt): Call it and use_label.
17673         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
17674         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
17676 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
17678         * class.c (build_vtable_entry_ref): Correct usage of
17679         get_vtbl_decl_for_binfo.
17681         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
17682         * method.c (implicitly_declare_fn): Not here.
17684 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
17686         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
17687         (CPTI_PTMD_DESC_TYPE): ... here.
17688         (ptmd_desc_type_node): Rename to ...
17689         (ptm_desc_type_node): ... here.
17690         * decl.c: Likewise.
17691         * rtti.c (ptmd_initializer): Rename to ...
17692         (ptm_initializer): ... here.
17693         (sythesize_tinfo_var): Adjust. Deal with pointer to member
17694         function.
17695         (create_tinfo_types): Adjust.
17697 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
17699         Finish implementation of VTTs.
17700         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
17701         CPTI_VTT_PARM_IDENTIFIER.
17702         (vtt_parm_identifier): New macro.
17703         (vtt_parm_type): Likewise.
17704         (BINFO_SUBVTT_INDEX): Likewise.
17705         (BINFO_VPTR_INDEX): Likewise.
17706         (struct lang_decl): Add vtt_parm.
17707         (DECL_VTT_PARM): New macro.
17708         (DECL_USE_VTT_PARM): Likewise.
17709         (DECL_NEEDS_VTT_PARM_P): Likewise.
17710         (get_vtt_name): Declare.
17711         (build_artificial_parm): Likewise.
17712         (fixup_all_virtual_upcast_offsets): Likewise.
17713         (expand_indirect_vtbls_init): Remove.
17714         * call.c (build_new_method_call): Pass the vtt to subobject
17715         constructors and destructors.
17716         * class.c (get_vtt_name): Give it external linkage.
17717         (build_clone): Handle the magic VTT parameters for clones.
17718         (clone_function_decl): Fix typo in comment.
17719         (build_vtt): Keep track of the indices in the VTTs where various
17720         entities are stored.
17721         (build_vtt_inits): Likewise.
17722         (dfs_build_vtt_inits): Likewise.
17723         (build_ctor_vtbl_group): Tweak type of construction vtables.
17724         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
17725         primary bases, when building construction vtables.
17726         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
17727         (initialize_predefined_identifiers): Add vtt_parm_identifier.
17728         (init_decl_processing): Initialize vtt_parm_type.
17729         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
17730         (lang_mark_tree): Make vtt_parm.
17731         * decl2.c (build_artificial_parm): New function.
17732         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
17733         (grokclassfn): Use build_artificial_parm.
17734         * init.c (initialize_vtbl_ptrs): Call
17735         fixup_all_virtual_upcast_offsets directly.
17736         (perform_member_init): Use the complete subobject destructor for
17737         member cleanups.
17738         (build_vtbl_address): New function.
17739         (expand_virtual_init): Handle VTTs.
17740         * optimize (maybe_clone_body): Likewise.
17741         * search.c (fixup_all_virtual_upcast_offsets): Give it external
17742         linkage.
17743         (expand_indirect_vtbls_init): Remove.
17744         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
17745         * tree.c (make_binfo): Make them bigger.
17747 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
17749         * inc/cxxabi.h (__pbase_type_info): Define, based on
17750         __pointer_type_info.
17751         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
17752         (__pointer_to_member_type_info): Likewise.
17753         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
17754         (__pointer_to_member_type_info::__is_pointer_p): Remove.
17755         (__pointer_type_info::__do_catch): Rename to ...
17756         (__pbase_type_info::__do_catch): ... here. Adjust.
17757         (__pbase_type_info::__pointer_catch): Implement.
17758         (__pointer_type_info::__pointer_catch): Adjust.
17759         (__pointer_to_member_type_info::__pointer_catch): Adjust.
17761 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
17763         * tinfo.h (__user_type_info::contained_virtual_p): New
17764         predicate.
17765         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
17766         shaped hierarchy.
17767         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
17768         diamond shaped hierarchy. Add early out for mixed diamond and
17769         duplicate shaped hierarchy.
17771 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
17773         * cp-tree.h (build_delete): Change prototype.
17774         (build_vec_delete): Likewise.
17775         * call.c (build_scoped_method_call): Use special_function_kind
17776         values to indicate the kind of destruction to be done.
17777         (build_method_call): Likewise.
17778         * decl.c (finish_destructor_body): Likewise.
17779         (maybe_build_cleanup_1): Likewise.  Rename to ...
17780         (maybe_build_cleanup): ... this.
17781         * decl2.c (delete_sanity): Use special_function_kind
17782         values to indicate the kind of destruction to be done.
17783         (build_cleanup): Likewise.
17784         * init.c (perform_member_init): Likewise.
17785         (build_vec_delete_1): Likewise.
17786         (build_dtor_call): Simplify.
17787         (build_delete): Use special_function_kind
17788         values to indicate the kind of destruction to be done.
17789         (build_vbase_delete): Likewise.
17790         (build_vec_delete): Likewise.
17792         * init.c (sort_member_init): Fix typo in error message generation
17793         code.
17795 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
17797         * semantics.c (begin_class_definition): make the packed
17798         attribute be sensitive to the "-fpack-struct" command line flag
17800 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
17802         Update new-abi upcast algorithm.
17803         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
17804         prototype and meaning of return value.
17805         (__si_class_type_info::__do_upcast): Likewise.
17806         (__vmi_class_type_info::__do_upcast): Likewise.
17807         * tinfo.cc (__class_type_info::__upcast_result): Replace
17808         whole2dst with part2dst. Adjust ctor.
17809         (__class_type_info::__do_upcast): Adjust call of worker function.
17810         (__class_type_info::__do_upcast): Adjust.
17811         (__si_class_type_info::__do_upcast): Adjust. Use parent's
17812         __do_upcast.
17813         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
17814         virtual base in diamond hierarchy bug.
17816 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
17818         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
17819         and bitfield to tinfo_fn_p.
17820         (DECL_TINFO_FN_P): Adjust.
17821         (SET_DECL_TINFO_FN_P): Likewise.
17822         (DECL_MUTABLE_P): Likewise.
17823         (DECL_C_BIT_FIELD): Likewise.
17824         (SET_DECL_C_BIT_FIELD): Likewise.
17825         (CLEAR_DECL_C_BIT_FIELD): Likewise.
17826         (DECL_UNINLINABLE): Likewise.
17827         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
17828         (handle_using_decl): Remove assertion.
17829         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
17830         to build FIELD_DECLs.
17831         (build_base_field): Likewise.
17832         (layout_class_type): Likewise.
17833         * decl.c (init_decl_processing): Likewise.
17834         (build_ptrmemfunc_type): Likewise.
17835         (grokdeclarator): Likewise.
17836         * decl2.c (grok_x_components): Likewise.
17837         * except.c (call_eh_info): Likewise.
17838         * init.c (init_init_processing): Likewise.
17839         * rtti.c (expand_class_desc): Likewise.
17840         (create_pseudo_type_info): Likewise.
17841         (get_vmi_pseudo_type_info): Likewise.
17842         (create_tinfo_types): Likewise.
17843         * ptree.c (print_lang_decl): Adjust.
17844         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
17845         before checking DECL_MUTABLE_P.
17847         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
17848         parameters for template functions.
17849         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
17850         destructors as well as constructors.
17852 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
17854         * class.c (build_ctor_vtbl_group): Set inits.
17855         * optimize.c (maybe_clone_body): Set DECL_INLINE and
17856         DECL_THIS_INLINE appropriately for clones.
17858         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
17859         (DECL_CONV_FN_P): Simplify.
17860         (DECL_OPERATOR): Remove.
17861         (language_to_string): Declare.
17862         * decl.c (duplicate_decls): Fix typo in comment.
17863         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
17864         (grok_op_properties): Use DECL_CONV_FN_P instead of
17865         IDENTIFIER_TYPENAME_P.
17866         * dump.c (dequeue_and_dump): Dump the language linkage of
17867         declarations.
17868         * error.c (language_to_string): Give it external linkage.
17869         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
17870         (implicitly_declare_fn): Set DECL_LANGUAGE.
17871         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
17872         IDENTIFIER_TYPENAME_P.
17873         (tsubst_decl): Likewise.
17874         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
17875         * semantics.c (finish_member_declaration): Don't mark members of
17876         classes declared in an extern "C" region as extern "C".
17878 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17880         * decl2.c (qualified_lookup_using_namespace): Look through
17881         namespace aliases.
17883         * decl.c (push_using_decl): Return the old decl on namespace level.
17885 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
17887         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
17888         (VTT_NAME_PREFIX): New macro.
17889         (CTOR_VTBL_NAME_PREFIX): Likewise.
17890         (get_ctor_vtbl_name): New function.
17891         * class.c (get_vtable_name): Simplify.
17892         (get_vtt_name): New function.
17893         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
17894         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
17895         when a virtual base becomes primary.
17896         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
17897         VTTs.
17898         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
17899         additional parameters.
17900         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
17901         (initialize_array): New function.
17902         (build_vtt): Likewise.
17903         (build_vtt_inits): Likewise.
17904         (dfs_build_vtt_inits): Likewise.
17905         (dfs_fixup_binfo_vtbls): Likewise.
17906         (build_ctor_vtbl_group): Likewise.
17907         (initialize_vtable): Use initialize_array.
17908         (accumulate_vtbl_inits): Reimplement to handle construction
17909         vtables.
17910         (dfs_accumulate_vtbl_inits): Likewise.
17911         (bulid_vtbl_initializer): Adjust parameter name.
17912         * method.c (build_typename_overload): Remove #if 0'd code.
17913         (get_ctor_vtbl_name): New function.
17914         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
17915         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
17917         * cp-tree.h (struct lang_type): Remove search_slot.
17918         (CLASSTYPE_SEARCH_SLOT): Remove.
17919         (emit_base_init): Change prototype.
17920         (initialize_vtbl_ptrs): Likewise.
17921         (expand_indirect_vtbls_init): Likewise.
17922         (clear_search_slots): Remove.
17923         * decl.c (lang_mark_tree): Don't mark search_slot.
17924         * init.c (initialize_vtbl_ptrs): Simplify.
17925         (emit_base_init): Likewise.
17926         * search.c (struct vbase_info): Document decl_ptr.
17927         (convert_pointer_to_single_level): Remove.
17928         (dfs_find_vbases): Remove.
17929         (dfs_init_base_pointers): Simplify.
17930         (dfs_clear_vbase_slots): Remove.
17931         (dfs_vtable_path_unmark): New function.
17932         (init_vbase_pointers): Simplify.
17933         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
17934         (expand_indirect_vtbls_init): Simplify.  Don't call
17935         mark_all_temps_used.
17936         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
17937         initialize_vtbl_ptrs.
17939 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
17941         * except.c: Add static prototypes.
17943 2000-05-20  H.J. Lu  <hjl@gnu.org>
17945         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
17947 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
17949         Don't create a separate copy of virtual bases for the
17950         CLASSTYPE_VBASECLASSES list.
17951         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
17952         (BINFO_FOR_VBASE): Remove.
17953         (CANONICAL_BINFO): Adjust.
17954         (binfo_for_vbase): New function.
17955         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
17956         instead of BINFO_FOR_VBASE.
17957         (build_vbase_pointer): Likewise.
17958         (build_secondary_vtable): Likewise.
17959         (dfs_mark_primary_bases): Likewise.
17960         (mark_primary_bases): Likewise.
17961         (layout_nonempty_base_or_field): Likewise.
17962         (dfs_set_offset_for_shared_vbases): Likewise.
17963         (dfs_set_offset_for_unshared_vbases): Likewise.
17964         (layout_virtual_bases): Likewise.  Adjust for changes to the
17965         CLASSTYPE_VBASECLASSES list.
17966         (dump_class_hierarchy_r): Use binfo_for_vbase
17967         instead of BINFO_FOR_VBASE.
17968         (dump_class_hierarchy): Likewise.
17969         (finish_vtbls): Likewise.
17970         (build_vtbl_initializer): Adjust for changes to the
17971         CLASSTYPE_VBASECLASSES list.
17972         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
17973         * decl.c (finish_destructor_body): Adjust for changes to the
17974         CLASSTYPE_VBASECLASSES list.
17975         * init.c (sort_base_init): Use binfo_for_vbase.
17976         (construct_virtual_bases): Adjust for changes to the
17977         CLASSTYPE_VBASECLASSES list.
17978         (expand_member_init): Use binfo_for_vbase.
17979         (build_vbase_delete):  Adjust for changes to the
17980         CLASSTYPE_VBASECLASSES list.
17981         * method.c (do_build_copy_constructor): Likewise.
17982         * rtti.c (get_base_offset): Use binfo_for_vbase.
17983         (expand_class_desc): Remove #if 0'd code.
17984         * search.c (struct vbase_info): Remove vbase_types.
17985         (get_base_distance):  Use binfo_for_vbase.
17986         (lookup_field_queue_p): Use CANONICAL_BINFO.
17987         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
17988         (get_pure_virtuals): Adjust for changes to the
17989         CLASSTYPE_VBASECLASSES list.
17990         (dfs_find_vbases): Use binfo_for_vbase.
17991         (dfs_init_vbase_pointers): Likewise.
17992         (init_vbase_pointers): Don't initialize vi.vbase_types.
17993         (virtual_context): Use binfo_for_vbase.
17994         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
17995         CLASSTYPE_VBASECLASSES list.
17996         (expand_indirect_vtbls_init): Simplify.
17997         (dfs_get_vbase_types): Don't replicate virtual bases.
17998         (find_vbase_instance): Use binfo_for_vbase.
17999         (binfo_for_vbase): New function.
18000         * typeck.c (get_delta_difference): Use binfo_for_vbase.
18002 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
18004         * decl2.c (finish_anon_union): Generalize error messages to handle
18005         anonymous structures.
18006         * init.c (perform_member_init): Remove `name' parameter.
18007         (build_field_list): New function.
18008         (sort_member_init): Handle anonymous union initialization order
18009         correctly.  Check for multiple initializations of the same union.
18010         (emit_base_init): Don't look up fields by name here.
18011         (expand_member_init): Record the result of name lookup for future
18012         reference.
18013         * typeck.c (build_component_ref): Fix formatting.
18015 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
18017         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18018         * typeck.c (build_x_compound_expr): Replace warn_unused with
18019         warn_unused_value.
18021         * decl2.c (lang_decode_option): Update -Wall unused flags by
18022         calling set_Wunused.
18024 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
18026         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18027         * init.c (dfs_vtable_path_unmark): Remove.
18028         * search.c (marked_new_vtable_p): Likewise.
18029         (unmarked_new_vtable_p): Likewise.
18030         (dfs_search_slot_nonempty_p): Likewise.
18031         (dfs_mark): Likewise.
18032         (dfs_vtable_path_unmark): Likewise.
18033         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18034         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18035         (dfs_init_vbase_pointers): Remove special-case new ABI code.
18036         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18037         (init_vbase_pointers): Simplify.
18038         (expand_indirect_vtbls_init): Likewise.
18040         * class.c (copy_virtuals): New function.
18041         (build_primary_table): Use it.
18042         (build_secondary_vtable): Likewise.
18043         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18044         indicate that no vcall offset is required.
18045         (add_virtual_function): Likewise.
18046         (modify_all_vtables): Likewise.
18047         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18048         (dfs_accumulate_vtbl_inits): Likewise.
18049         (build_vtbl_initializer): Make changes to handle construction
18050         vtables.
18051         (dfs_build_vcall_offset_vtbl_entries): Likewise.
18052         (build_rtti_vtbl_entries): Likewise.
18053         (build_vtable_entries): Handle a NULL vcall_index.
18055 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
18057         * decl2.c (lang_decode_option): Fix thinko.
18059 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
18061         * except.c (check_handlers): New fn.
18062         * cp-tree.h: Declare it.
18063         * semantics.c (finish_handler_sequence): Call it.
18064         (finish_function_handler_sequence): Likewise.
18065         (finish_handler_parms): Set TREE_TYPE on the handler.
18066         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18067         * search.c (get_base_distance_recursive): If protect>1, ignore
18068         special access.
18069         (get_base_distance): Don't reduce watch_access.
18071 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
18073         * lex.c: #include diagnostic.h.
18074         (lang_init_options): Set default prefixing rules.
18076         * lang-options.h: Add -fdiagnostics-show-location=.
18078         * decl2.c: #include diagnostic.h.
18079         (lang_decode_option): Handle -fdiagnostics-show-location=.
18081 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
18083         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
18084         * vec.cc: Revert my 2000-05-07 change.
18086 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
18088         * class.c (check_field_decls): Complain about non-static data
18089         members with same name as class in class with constructor.
18091 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
18093         * decl.c (grokdeclarator): Allow non-static data members with
18094         same name as class.
18096 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
18098         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
18099         and pending_inline.filename.  Update prototypes.
18100         * decl.c (define_label): Constify filename parameter.
18101         * decl2.c (warn_if_unknown_interface): Constify local char *.
18102         * input.c Constify input_source.filename. Don't declare
18103         input_filename or lineno.  Constify filename parameter to feed_input.
18104         * lex.c (init_parse): Constify parameter and return value.
18105         (cp_pragma_interface, cp_pragma_implementation): Constify
18106         filename argument.
18107         (reinit_parse_for_method, reinit_parse_for_block,
18108         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
18109         Constify local char *.
18110         * pt.c: Don't declare lineno or input_filename.
18111         (print_template_context, tsubst_friend_function, tsubst_decl,
18112         tsubst, instantiate_decl): Constify local char *.
18113         * semantics.c (expand_body): Constify local char *.
18114         * tree.c (build_srcloc): Constify filename parameter.
18115         * typeck.c (c_expand_asm_operands): Constify filename
18116         parameter.
18118 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
18120         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
18121         offsetof expansion.
18123 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
18125         * inc/cxxabi.h:  Fix typos in comment.
18126         (__base_class_info::__offset): Use a static_cast.
18128 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
18130         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
18131         of std::size_t and std::ptrdiff_t respectively.
18132         * tinfo.cc: Likewise.
18133         * vec.cc: Likewise.
18135 2000-05-06  Richard Henderson  <rth@cygnus.com>
18137         * typeck.c (build_c_cast): Don't warn integer->pointer size
18138         mismatch for constants.
18140 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
18142         * rtti.c (ptmd_initializer): Set non-public, if class is
18143         incomplete.
18145         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
18146         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18147         __cxa_vec_delete): Likewise.
18148         * tinfo.cc (__dynamic_cast): Likewise.
18149         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18150         __cxa_vec_delete): Likewise.
18152 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
18154         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
18155         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
18156         (lang_decl_flags): Add vcall_offset.
18157         (THUNK_VCALL_OFFSET): Use it.
18158         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
18159         * method.c (make_thunk): Create the lang_decl here, not in
18160         emit_thunk.
18161         (emit_thunk): Make generic thunks into ordinary functions once
18162         they have been fed to expand_body.
18163         * semantics.c (expand_body): Set current_function_is_thunk here.
18165 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18167         * class.c (update_vtable_entry_for_fn): Prototype.
18169         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
18170         and `tmpl'.
18172         * search.c (dfs_build_inheritance_graph_order): Prototype.
18174 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
18176         * cp-tree.h (special_function_kind): Add various kinds of
18177         destructors.
18178         (special_function_p): New function.
18179         * class.c (overrides): Don't let one kind of destructor override
18180         another.
18181         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
18182         whether or not to instantiate a template.
18183         * tree.c (special_function_p): Define.
18185 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
18187         * cp-tree.def (THUNK_DECL): Remove.
18188         * cp-tree.h (DECL_THUNK_P): New macro.
18189         (DECL_NON_THUNK_FUNCTION_P): Likewise.
18190         (DECL_EXTERN_C_FUNCTION_P): Likewise.
18191         (SET_DECL_THUNK_P): Likewise.
18192         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
18193         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
18194         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
18195         * decl.c (decls_match): Use DECL_EXTERN_C_P.
18196         (duplicate_decls): Likewise.
18197         (pushdecl): Likewise.  Adjust thunk handling.
18198         (grokfndecl): Use DECL_EXTERN_C_P.
18199         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
18200         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
18201         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
18202         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
18203         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
18204         DECL_NO_STATIC_CHAIN.
18205         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
18206         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
18207         * search.c (covariant_return_p): Remove THUNK_DECL handling.
18208         * ir.texi: Update.
18210 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
18212         * tree.c (walk_tree): Set lineno.
18214 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
18216         * exception.cc: Update license notice.
18217         * new.cc: Likewise.
18218         * new1.cc: Likewise.
18219         * new2.cc: Likewise.
18220         * tinfo.cc: Likewise.
18221         * tinfo2.cc: Likewise.
18222         * vec.cc: Likewise.
18223         * inc/cxxabi.h: Likewise.
18224         * inc/exception: Likewise.
18225         * inc/new: Likewise.
18226         * inc/new.h: Likewise.
18227         * inc/typeinfo: Likewise.
18229 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
18231         * tree.c (build_target_expr_with_type): If we already have a
18232         TARGET_EXPR, just return it.
18234         * optimize.c (initialize_inlined_parameters): Don't generate an
18235         EXPR_STMT if we can just use DECL_INITIAL.
18236         * decl.c (emit_local_var): Only make the initialization a
18237         full-expression if stmts_are_full_exprs_p.
18239 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
18241         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
18242         macro.
18243         * call.c (standard_conversion): Use it.
18244         (direct_reference_binding): Likewise.
18245         (build_over_call): Likewise.
18246         (is_properly_derived_from): Likewise.
18247         (compare_ics): Likewise.
18248         * class.c (resolves_to_fixed_type_p): Likewise.
18249         * optimize.c (declare_return_variable): Likewise.
18250         * pt.c (is_specialization_of): Likewise.
18251         (unify): Likewise.
18252         * typeck.c (comp_target_parms): Likeiwse.
18253         (build_static_cast): Likewise.
18254         (build_reinterpret_cast): Likewise.
18255         (build_const_cast): Likewise.
18256         (comp_ptr_ttypes_real): Likewise.
18257         (comp_ptr_ttypes_const): Likewise.
18258         * typeck2.c (process_init_constructor): Likewise.
18260 2000-04-30  Scott Snyder <snyder@fnal.gov>
18262         * decl.c (finish_destructor_body): Use the base destructor when
18263         destroying virtual bases.
18265 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
18267         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
18268         STMT_EXPRs.
18269         * optimize.c (struct inline_data): Add target_exprs field.
18270         (declare_return_variable): When a function returns an aggregate,
18271         use the variable declared in the TARGET_EXPR as the remapped
18272         DECL_RESULT.
18273         (expand_call_inline): Update the pending target_exprs stack.
18274         (optimize_function): Initialize the stack.
18276         * decl2.c (finish_file): Fix typo in comment.
18278         * method.c (emit_thunk): Don't try to return a `void' value.
18280         * optimize.c (initialize_inlined_parameters): If the parameter is
18281         addressable, we need to make a new VAR_DECL, even if the
18282         initializer is constant.
18284 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
18286         * decl.c (grok_op_properties): Add an extra check of argtypes.
18288 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
18290         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
18291         variables.
18292         (initialize_inlined_parameters): Try to avoid creating new
18293         VAR_DECLs.
18295 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
18297         * lex.c (my_get_run_time): Remove.
18298         (init_filename_times): Use get_run_time instead of my_get_run_time.
18299         (check_newline): Likewise.
18300         (dump_time_statistics): Likewise.
18301         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
18302         of computing elapsed time explicitly.
18304 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
18306         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
18307         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
18308         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
18309         before calling decl_constant_value.
18310         * class.c (check_bitfield_decl): Likewise.
18311         * cvt.c (ocp_convert): Likewise.
18312         (convert): Likewise.
18313         * decl.c (compute_array_index_type): Likewise.
18314         (build_enumerator): Likewise.
18315         * decl2.c (check_cp_case_value): Likewise.
18316         * pt.c (convert_nontype_argument): Likewise.
18317         (tsubst): Likewise.
18318         * typeck.c (decay_conversion): Likewise.
18319         (build_compound_expr): Likewise.
18320         (build_reinterpret_cast): Likewise.
18321         (build_c_cast): Likewise.
18322         (convert_for_assignment): Likewise.
18324 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
18326         * decl.c (finish_function): Don't play games with DECL_INLINE.
18328 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
18330         * ir.texi: Correct typo.
18332 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18334         * decl.c (grokdeclarator): Reject VLAs as members.
18336 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
18338         * call.c (standard_conversion): Accept conversion between
18339         COMPLEX_TYPEs.
18341         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
18343 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
18345         * decl2.c (finish_file): Remove double setup for accounting
18346         compile time.
18348 2000-04-24  Robert Lipe <robertlipe@usa.net>
18350         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
18352 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
18354         * new.cc (set_new_handler): Needs to be in std::.
18356 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
18358         * cp-tree.h (lang_decl): Remove pretty_function_p.
18359         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
18360         language-specific node.
18361         * decl.c (cp_make_fname_decl): Use build_decl, not
18362         build_lang_decl, to build the variables.
18363         (grokvardecl): Don't call build_lang_decl for local variables in
18364         templates.
18365         (grokdeclarator): Don't call build_lang_decl for local type
18366         declarations in templates.
18367         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
18368         zero'd memory, rather than calling memset.
18369         * pt.c: Include hashtab.h.
18370         (local_specializations): New variable.
18371         (retrieve_local_specialization): Use it.
18372         (register_local_specialization): Likewise.
18373         (tsubst_decl): Don't assume local variables have
18374         DECL_LANG_SPECIFIC.
18375         (instantiate_decl): Set up local_specializations.
18376         * Makefile.in (HTAB_H): New variable.
18378 2000-04-23  Richard Henderson  <rth@cygnus.com>
18380         * typeck.c (c_expand_asm_operands): Restore the original
18381         contents of the output list.
18383 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
18385         * ir.texi:  Document complex number representation.
18387 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
18389         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
18390         (target_incomplete_p): New function.
18391         (tinfo_base_init): Create comdat NTBS name variable.
18392         (ptr_initializer): Add non_public parameter. Calculate it.
18393         (ptmd_initializer): Likewise.
18394         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
18395         (create_real_tinfo_var): Add non_public parameter. Use it.
18396         Push proxy into global namespace.
18397         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
18398         New enumeration.
18399         * inc/typeinfo (type_info::before, type_info::operator==):
18400         Compare __name addresses.
18402         * tinfo2.cc: Remove new-abi builtins comment.
18404 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
18406         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
18408         * call.c (joust): Exit early if we get the same function, too.
18410         * decl2.c (key_method): Return NULL_TREE for template classes.
18411         (import_export_class): Don't need to check for template classes.
18413 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
18415         * lex.c: Remove references to cccp.c.
18417 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
18419         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
18420         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
18421         (DECL_DESTRUCTOR_P): Use destructor_attr.
18422         (DECL_CONST_MEMFUNC_P): Reimplement.
18423         (DECL_VOLATILE_MEMFUNC_P): Remove.
18424         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
18425         (overrides): Use DECL_DESTRUCTOR_P.
18426         (check_for_override): Likewise.
18427         * decl.c (start_function): Likewise.
18428         * decl2.c (grokfclassfn): Likewise.
18429         (check_classfn): Likewise.
18430         (grok_function_init): Likewise.
18432 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
18434         * decl2.c (grokfield): Issue error on illegal data member
18435         declaration.
18437 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
18439         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
18441 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
18443         * class.c (build_vtable_entry): Don't build thunks for type-info
18444         functions.
18446 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
18448         * decl.c (decls_match): Allow a redeclaration of a builtin to
18449         specify args while the builtin did not.
18451 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
18453         * cp-tree.def (THUNK_DECL): Add to documentation.
18454         * cp-tree.h (flag_huge_objects): Declare.
18455         * class.c (modify_vtable_entry): Tidy.
18456         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
18457         Calculate delta appropriately for the new ABI.
18458         (dfs_modify_vtables): Use it.
18459         (modify_all_vtables): Fix thinko in code to add overriding copies
18460         of functions to primary vtables.
18461         (build_clone): Fix typo in comment.
18462         (clone_function_decl): Correct order of destructors in vtable.
18463         (build_vbase_offset_vtbl_entries): Adjust comment.
18464         (dfs_vcall_offset_queue_p): Remove.
18465         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
18466         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
18467         (build_vtable_entry): Correct check for pure virtual functions.
18468         Don't declare flag_huge_objects.
18469         * decl.c (flag_huge_objects): Remove declaration.
18470         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
18471         Use int_size_in_bytes.
18472         (emit_thunk): Handle vcall offset thunks.
18474 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18476         * decl2.c (parse_time, varconst_time): Delete declarations.
18477         (finish_file): Delete LINENO declaration.
18478         START_TIME and THIS_TIME now long.
18480 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
18482         * class.c (build_base_field): Reformat comment.
18484         * inc/cxxabi.h (stddef.h): Comment inclusion.
18485         (__base_class_info::__offset): Comment shift.
18487 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
18489         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
18490         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
18491         (cp_push_exception_identifier): New macro.
18492         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
18493         (DECL_BASE_DESTRUCTOR_P): Likewise.
18494         (DECL_DELETING_DESTRUCTOR_P): Likewise.
18495         (get_vtbl_decl_for_binfo): Fix formatting.
18496         (in_charge_arg_for_name): New macro.
18497         (maybe_build_cleanup_and_delete): Remove declaration.
18498         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
18499         (in_charge_arg_for_name): New function.
18500         (build_new_method_call): Use it.  Handle cloned destructors.
18501         (build_clone): Don't make the base constructor virtual.
18502         Automatically defer generated functions.
18503         (clone_function_decl): Handle destructors, too.
18504         (clone_constructors_and_destructors): Likewise.
18505         (create_vtable_ptr): Don't create a vtable entry for a cloned
18506         function.
18507         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
18508         (initialize_predefined_identifiers): Update appropriately.
18509         (finish_destructor_body): Simplify.
18510         (maybe_build_cleanup_and_delete): Remove.
18511         * except.c (expand_throw): Handle new-ABI destructors.
18512         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
18513         (build_dtor_call): New function.
18514         (build_delete): Use it.  Simplify.
18515         * optimize.c (maybe_clone_body): Handle destructors.
18516         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
18518         * exception.cc (cleanup_fn): New typedef.
18519         (CALL_CLEANUP): New macro.
18520         (cp_eh_info): Use them.
18521         (__cp_push_exception): Likewise.
18522         (__cp_pop_exception): Likewise.
18524 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
18526         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
18527         (complete_dtor_identifier): New macro.
18528         (CLASSTYPE_FIRST_CONVERSION): Remove.
18529         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
18530         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
18531         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
18532         (CLASSTYPE_CONSTRUCTORS): Likewise.
18533         (CLASSTYPE_DESTRUCTORS): Likewise.
18534         (lang_decl): Add cloned_function.
18535         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
18536         (DECL_BASE_CONSTRUCTOR_P): Likewise.
18537         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
18538         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
18539         (DECL_CLONED_FUNCTION_P): Likewise.
18540         (DECL_CLONED_FUNCTION): Likewise.
18541         (clone_function_decl): Declare.
18542         (maybe_clone_body): Likewise.
18543         * call.c (build_user_type_conversion_1): Call complete object
18544         constructors in the new ABI.
18545         (build_new_method_call): Don't add in-charge parameters under the
18546         new ABI.
18547         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
18548         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
18549         CLASSTYPE_DESTRUCTOR_SLOT.
18550         (build_clone): New function.
18551         (clone_function_decl): Likewise.
18552         (clone_constructors_and_destructors): Likewise.
18553         (check_bases_and_members): Use it.
18554         * decl.c (iniitialize_predefined_identifiers): Initialize
18555         complete_dtor_identifier.
18556         (finish_function): Don't add extra code to a clone.
18557         (lang_mark_tree): Mark cloned_function.
18558         * decl2.c (mark_used): Don't bother trying to instantiate things
18559         we synthesized.
18560         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
18561         * method.c (set_mangled_name_for_decl): Don't treat clones as
18562         constructors.
18563         (synthesize_method): Sythesize cloned functions, not the clones.
18564         * optimize.c (inline_data): Update comment on ret_label.
18565         (remap_block): Don't assume DECL_INITIAL exists.
18566         (copy_body_r): Allow ret_label to be NULL.
18567         (maybe_clone_body): Define.
18568         * pt.c (tsubst_decl): Handle clones.
18569         (instantiate_clone): New function.
18570         (instantiate_template): Use it.
18571         (set_mangled_name_for_template_decl): Don't treat clones as
18572         constructors.
18573         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
18574         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
18575         * semantics.c (expand_body): Clone function bodies as necessary.
18577         * optimize.c (remap_decl): Avoid sharing structure for arrays
18578         whose size is only known at run-time.
18579         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
18581         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
18582         to has_in_charge_parm_p.
18583         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
18584         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
18585         (DECL_COPY_CONSTRUCTOR_P): New macro.
18586         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
18587         (build_user_type_conversion_1): Likewise.
18588         (convert_like_real): Likewise.
18589         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
18590         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
18591         (copy_args_p): Likewise.
18592         (grok_ctor_properties): Likewise.
18593         (start_function): Likewise.
18594         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
18595         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
18596         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
18597         * method.c (do_build_copy_constructor): Use
18598         DECL_HAS_IN_CHARGE_PARM_P.
18599         (synthesize_method): Likewise.
18600         * pt.c (instantiate_template): Remove goto.
18601         * tree.c (build_cplus_method_type): Remove mention of obstacks in
18602         comment.
18604         * cp-tre.h (finish_function): Change prototype.
18605         * decl.c (end_cleanup_fn): Adjust caller.
18606         (finish_function): Take only one parameter.
18607         * decl2.c (finish_objects): Adjust caller.
18608         (finish_static_storage_duration_function): Likewise.
18609         * method.c (emit_thunk): Likewise.
18610         * parse.y: Likewise.
18611         * parse.c: Regenerated.
18612         * pt.c (instantiate_decl): Likewise.
18613         * rtti.c (synthesize_tinfo_fn): Likewise.
18614         * semantics.c (expand_body): Likewise.
18616         * cp-tree.h (copy_decl): New function.
18617         * class.c (finish_struct_1): Use it.
18618         * lex.c (copy_decl): Define it.
18619         * pt.c (tsubst_decl): Likewise.
18620         * tree.c (copy_template_template_parm): Likewise.
18622         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
18623         has_nonpublic_assign_ref.
18624         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
18625         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
18626         * class.c (finish_struct_methods): Don't set
18627         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
18628         (interface_only): Don't declare.
18629         (interface_unknown): Likewise.
18631 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18633         * tree.h (HAVE_TEMPLATES): Remove definition.
18634         * lang-options.h (-fthis-is-variable): Remove documentation.
18636 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
18638         * class.c (instantiate_type): Handle object-relative template-id.
18640         * semantics.c (finish_expr_stmt): Call convert_to_void here.
18641         * decl.c (cplus_expand_expr_stmt): Not here.
18643         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
18644         Initialize exprtype earlier.
18646         * parse.y (fn.def1): Check for defining types in return types.
18648         * decl.c (check_tag_decl): Notice extra fundamental types.
18649         Diagnose empty decls in classes, too.
18651         * decl.c (grokdeclarator): Don't override an anonymous name if no
18652         declarator was given.
18654         * cvt.c (convert_to_void): Call resolve_offset_ref.
18656         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
18658         * decl2.c (decl_namespace): Handle getting a type.
18660         * typeck.c (build_c_cast): Re-enable warning for cast between
18661         pointer and integer of different size.
18663 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
18665         * inc/cxxabi.h (__pointer_type_info): Add restrict and
18666         incomplete flags.
18667         (__pointer_type_info::__pointer_catch): New virtual function.
18668         (__pointer_to_member_type_info): Derive from
18669         __pointer_type_info. Adjust.
18670         (__pointer_to_member_type_info::__do_catch): Remove.
18671         (__pointer_to_member_type_info::__is_pointer_p): Declare.
18672         (__pointer_to_member_type_info::__pointer_catch): Declare.
18673         * rtti.c (qualifier_flags): Add restrict flag.
18674         (ptmd_initializer): Reorder members.
18675         (create_tinfo_types): Expand comments. Reorder
18676         ptmd_desc_type_node members.
18677         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
18678         Implement.
18679         (__pointer_type_info::__do_catch): Move specific code into
18680         __pointer_catch. Call it.
18681         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
18682         specific catch checking. Fix void conversion check.
18683         (__pointer_to_member_type_info::__do_catch): Remove.
18684         (__pointer_to_member_type_info::__pointer_catch): Implement.
18686 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18688         * lex.c (init_parse): Remove traces of classof and headof.
18689         * decl2.c (flag_operator_names): Default to 1.
18690         (lang_decode_option): Do not set it for -ansi.
18692 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
18694         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
18695         (DECL_MAIN_VARIANT): Remove.
18696         * decl.c (duplicate_decls): Don't set it.
18697         (start_function): Likewise.
18698         (lang_mark_tree): Don't mark it.
18699         * decl2.c (defer_fn): Don't use it.
18700         * lex.c (retrofit_lang_decl): Don't set it.
18701         * pt.c (tsubst_decl): Likewise.
18702         * ptree.c (print_lang_decl): Don't print it.
18703         * typeck.c (mark_addressable): Don't use it.
18705 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
18707         * vec.cc: Include <new> and <exception>.
18708         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
18709         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
18710         terminate.
18711         (__cxa_vec_delete): Catch dtor exceptions.
18713 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
18715         Prepend __ to implementation defined names.
18716         * inc/typeinfo (type_info): Rename _name to __name.
18717         (type_info::type_info): Rename parameter.
18718         (type_info::operator==, type_info::operator!=,
18719         type_info::before): Likewise.
18720         (type_info::is_pointer_p, type_info::is_function_p,
18721         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
18722         parameters.
18723         * inc/cxxabi.h
18724         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
18725         (__pointer_type_info::__pointer_type_info): Likewise.
18726         (__pointer_type_info::is_pointer_p,
18727         __pointer_type_info::do_catch): Prepend __. Rename parameters.
18728         (__array_type_info::__array_type_info): Rename parameters.
18729         (__function_type_info::__function_type_info): Likewise.
18730         (__function_type_info::is_function_p): Prepend __.
18731         (__enum_type_info::__enum_type_info): Rename parameters.
18732         (__pointer_to_member_type_info::__pointer_to_member_type_info):
18733         Likewise.
18734         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
18735         parameters.
18736         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
18737         (__class_type_info::__class_type_info): Rename parameters.
18738         (__class_type_info::sub_kind): Prepend __. Adjust member names.
18739         (__class_type_info::upcast_result,
18740         __class_type_info::dyncast_result): Prepend __. Move definition
18741         into tinfo.cc.
18742         (__class_type_info::do_upcast, __class_type_info::do_catch,
18743         __class_type_info::find_public_src,
18744         __class_type_info::do_dyncast,
18745         __class_type_info::do_find_public_src): Prepend __. Rename
18746         parameters.
18747         (__si_class_type_info::__si_class_type_info): Rename parameters.
18748         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
18749         __si_class_type_info::do_find_public_src): Prepent __. Rename
18750         parameters.
18751         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
18752         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
18753         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
18754         parameters.
18755         (__dynamic_cast): Rename parameters.
18756         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
18757         type_info::do_catch, type_info::do_upcast): Prepend __.
18758         (contained_p, public_p, virtual_p, contained_public_p,
18759         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
18760         (__class_type_info::do_catch,
18761         __class_type_info::do_upcast): Prepend __. Adjust.
18762         (__class_type_info::__upcast_result,
18763         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
18764         Adjust.
18765         (__class_type_info::find_public_src): Prepend __. Adjust.
18766         (__class_type_info::do_find_public_src,
18767         __si_class_type_info::do_find_public_src,
18768         __vmi_class_type_info::do_find_public_src): Likewise.
18769         (__class_type_info::do_dyncast,
18770         __si_class_type_info::do_dyncast,
18771         __vmi_class_type_info::do_dyncast): Likewise.
18772         (__class_type_info::do_upcast,
18773         __si_class_type_info::do_upcast,
18774         __vmi_class_type_info::do_upcast): Likewise.
18775         (__dynamic_cast): Adjust.
18776         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
18777         (__function_type_info::is_function_p): Likewise.
18778         (__pointer_type_info::do_catch): Likewise. Adjust.
18779         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
18780         (__throw_type_match_rtti_2): Adjust.
18781         (__is_pointer): Adjust.
18783 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
18785         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
18786         (complete_ctor_identifier): New macro.
18787         (special_function_kind): Add sfk_copy_constructor and
18788         sfk_assignment_operator.
18789         (LOOKUP_HAS_IN_CHARGE): Remove.
18790         (cons_up_default_function): Rename to ...
18791         (implicitly_declare_fn): ... this.
18792         * call.c (build_new_method_call): Add in-charge parameters for
18793         constructors here.
18794         * class.c (add_implicitly_declared_members): Change parameter name
18795         from cant_have_assignment to cant_have_const_assignment.
18796         Replace calls to cons_up_default_function to implicitly_declare_fn.
18797         * cvt.c (ocp_convert): Use complete_ctor_identifier.
18798         * decl.c (initialize_predefined_identifiers): Initialize it.
18799         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
18800         complex expression.
18801         * init.c (expand_default_init): Don't calculate the in-charge
18802         parameter here.
18803         (build_new_1): Likewise.
18804         * lex.c (cons_up_default_function): Move to method.c.
18805         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
18806         (implicitly_declare_fn): New function.
18807         * typeck.c (build_static_cast): Use complete_ctor_identifier.
18808         (build_modify_expr): Likewise.
18809         * typeck2.c (build_functional_cast): Likewise.
18811         Under the new ABI, constructors don't return `this'.
18812         * cp-tree.h (warn_reorder): Declare.
18813         (special_function_kind): New enum.
18814         (global_base_init_list): Remove declaration.
18815         (emit_base_init): Don't return a value.
18816         (check_base_init): Don't declare.
18817         (is_aggr_typedef): Likewise.
18818         * decl.c (check_special_function_return_type): New function.
18819         (return_types): Remove.
18820         (grokdeclarator): Use check_special_function_return_type.
18821         (start_function): Don't initialize ctor_label under the new ABI.
18822         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
18823         * init.c (begin_init_stmts): Move to top of file.
18824         (finish_init_stmts): Likewise.
18825         (warn_reorder): Don't declare.
18826         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
18827         value.
18828         (check_base_init): Remove.
18829         (is_aggr_typedef): Likewise.
18830         (build_new_1): Don't use the return value of a constructor.
18831         * semantics.c (setup_vtbl_ptr): Don't use the return value
18832         of emit_base_init.
18833         * typeck.c (check_return_expr): Don't magically convert return
18834         statements into `return this' in constructors under the new ABI.
18836         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
18837         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
18838         (base_ctor_identifier): New macro.
18839         (base_dtor_identifier): Likewise.
18840         (deleting_dtor_identifier): Likewise.
18841         * decl.c: Don't include obstack.h.
18842         (obstack_chunk_alloc): Don't define.
18843         (obstack_chunk_free): Likewise.
18844         (struct predefined_identifier): New type.
18845         (initialize_predefined_identifiers): New function.
18846         (init_decl_processing): Use it.
18847         (debug_temp_inits): Remove.
18848         (start_method): Don't call preserve_data.
18849         (hack_incomplete_structures): Update comment.
18850         * init.c (init_init_processing): Don't initialize
18851         nelts_identifier.
18852         (build_offset_rf): Remove dead code.
18853         (build_delete): Use CLASSTYPE_N_BASECLASSES.
18854         * search.c (init_search_processing): Don't initialize
18855         vptr_identifier.
18857 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18859         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
18860         some sign_compare warnings.
18862 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
18864         Rename abi::__vmi_class_type_info members.
18865         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
18866         base_list, detail_masks members to vmi_flags, vmi_base_count,
18867         vmi_bases and vmi_flags_masks respectively.
18868         (__vmi_class_type_info::vmi_flags_masks): Rename
18869         details_unknown_mask to flags_unknown_mask.
18870         * tinfo.cc (__class_type_info::do_upcast): Adjust.
18871         (__vmi_class_type_info::do_find_public_src): Adjust.
18872         (__vmi_class_type_info::do_dyncast): Adjust.
18873         (__vmi_class_type_info::do_upcast): Adjust.
18875 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
18877         * tinfo.cc (convert_to_base): New function.
18878         (get_vbase_offset): Remove. Move into convert_to_base.
18879         (__vmi_class_type_info::do_find_public_src): Adjust.
18880         (__vmi_class_type_info::do_dyncast): Adjust.
18881         (__vmi_class_type_info::do_upcast): Adjust.
18883 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
18885         * tinfo.cc (operator=): Use __builtin_strcmp.
18886         * tinfo2.cc (before): Likewise.
18888 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
18890         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
18891         (DECL_SAVED_INLINE): Rename to ...
18892         (DECL_DEFERRED_FN): ... this.
18893         (in_function_p): Remove declaration.
18894         (mark_inline_for_output): Rename to ...
18895         (defer_fn): ... this.
18896         * decl.c (finish_function): Adjust call to mark_inline_for_output.
18897         (in_function_p): Remove definition.
18898         * decl2.c (saved_inlines): Rename to ...
18899         (deferred_fns): ... this.
18900         (saved_inlines_used): Rename to ...
18901         (deferred_fns_used): ... this.
18902         (mark_inline_for_output): Rename to ...
18903         (defer_fn): ... this.
18904         (finish_file): Adjust accordingly.
18905         (init_decl2): Likewise.
18906         * lex.c (cons_up_default_function): Likewise.
18907         * pt.c (mark_decl_instantiated): Likewise.
18908         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
18909         circumstances.
18910         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
18911         * semantics.c (expand_body): Defer more functions.
18913 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
18915         * vec.cc: New file.
18916         * Make-lang.in (CXX_LIB2FUNCS): Add it.
18917         (vec.o): Build it.
18918         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18919         __cxa_vec_delete): Declare.
18921 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
18923         * rtti.c (dfs_class_hint_mark): New static function.
18924         (dfs_class_hint_unmark): New static function.
18925         (class_hint_flags): Use them.
18927 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
18929         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
18931 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
18933         * cp-tree.h (instantiate_decl): Change prototype.
18934         * decl2.c (mark_used): Adjust call.
18935         * optimize.c (inlinable_function_p): Adjust handling of templates.
18936         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
18937         (do_type_instantiation): Likewise.
18938         (instantiate_decl): Defer more templates.
18939         (instantiate_pending_templates): Adjust logic to handle inline
18940         friend functions.
18942         * Makefile.in (GGC_H): New variable.  Use it throughout in place
18943         of ggc.h.
18945         * call.c: Don't include obstack.h.  Include ggc.h.
18946         (obstack_chunk_alloc): Don't define.
18947         (obstack_chunk_free): Likewise.
18948         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
18949         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
18950         (pop_switch): Free it.
18952         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
18954         * dump.c (dequeue_and_dump): Don't try to print the bit_position
18955         if we don't have a DECL_FIELD_OFFSET.
18957 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
18959         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
18960         special_function_p.
18962 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18964         * cfns.gperf (hash, libc_name_p): Prototype.
18966         * rtti.c (build_dynamic_cast_1): Constification.
18968         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
18970         * semantics.c (deferred_type_access_control): Prototype.
18972 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
18974         Correct many new ABI issues regarding vbase and vcall offset
18975         layout.
18976         * cp-tree.h (BINFO_VTABLE): Document.
18977         (struct lang_type): Tweak formatting.
18978         (BINFO_PRIMARY_BINFO): Add to documentation.
18979         (CLASSTYPE_VSIZE): Fix typo in comment.
18980         (CLASSTYPE_VBASECLASSES): Update documentation.
18981         (BINFO_VBASE_MARKED): Remove.
18982         (SET_BINFO_VBASE_MARKED): Likewise.
18983         (CLEAR_BINFO_VBASE_MARKED): Likewise.
18984         (BINFO_FIELDS_MARKED): Remove.
18985         (SET_BINFO_FIELDS_MARKED): Likewise.
18986         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
18987         (enum access_kind): New enumeration.
18988         (num_extra_vtbl_entries): Remove declaration.
18989         (size_extra_vtbl_entries): Likewise.
18990         (get_vtbl_decl_for_binfo): New function.
18991         (dfs_vbase_unmark): Remove declaration.
18992         (mark_primary_bases): Likewise.
18993         * class.c (SAME_FN): Remove.
18994         (struct vcall_offset_data_s): Move definition.
18995         (build_vbase_pointer): Use `build', not `build_binary_op', to
18996         access the vbase pointer under the new ABI.
18997         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
18998         (build_primary_vtable): Likewise.
18999         (dfs_mark_primary_bases): Move here from search.c.
19000         (mark_primary_bases): Likewise.
19001         (determine_primary_bases): Under the new ABI, don't make a base
19002         class a primary base just because we don't yet have any virtual
19003         functions.
19004         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19005         (num_vfun_entries): Remove.
19006         (dfs_count_virtuals): Likewise.
19007         (num_extra_vtbl_entries): Likewise.
19008         (size_extra_vtbl_entries): Likewise.
19009         (layout_virtual_bases): Iterate in inheritance graph order under
19010         the new ABI.
19011         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19012         indicate that a vfield is present.
19013         (init_class_processing): Initialize access_public_node, etc., from
19014         ak_public, etc.
19015         (get_vtbl_decl_for_binfo): New function.
19016         (dump_class_hierarchy_r): Likewise.
19017         (dump_class_hierarchy): Use it.
19018         (finish_vtbls): Build the vtbls in inheritance graph order.
19019         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19020         (initialize_vtable): Use get_vtbl_decl_for_binfo.
19021         (accumulate_vtbl_inits): Add comments explaining why a pre-order
19022         walk is required.
19023         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19024         where the vptr points, even for primary vtables.
19025         (build_vtbl_initializer): Adjust handling of vbase and vcall
19026         offsets.
19027         (build_vcall_and_vbase_vtable_entries): New function.
19028         (dfs_build_vbase_offset_vtbl_entries): Remove.
19029         (build_vbase_offset_vtbl_entries): Reimplement.
19030         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19031         were already handled in a primary base class vtable.
19032         (build_vcall_offset_vtbl_entries): Adjust.
19033         (build_rtti_vtbl_entries): Adjust.
19034         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19035         * init.c (expand_virtual_init): Simplify.
19036         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19037         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19038         * search.c (BINFO_ACCESS): New macro.
19039         (SET_BINFO_ACCESS): Likewise.
19040         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19041         (access_in_type): Likewise.
19042         (dfs_accessible_p): Likewise.
19043         (protected_accessible_p): Likewise.
19044         (lookup_fnfields_1): Adjust documentation.
19045         (dfs_mark_primary_bases): Move to class.c
19046         (mark_primary_bases): Likewise.
19047         (dfs_vbase_unmark): Remove.
19048         (virtual_context): Use BINFO_FOR_VBASE.
19049         (dfs_get_vbase_types): Simplify.
19050         (dfs_build_inheritance_graph_order): New function.
19051         (get_vbase_types): Use it.
19052         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19054         * tinfo.cc (get_vbase_offset): New function.
19055         (__vmi_class_type_info::do_find_public_src): Use it.
19056         (__vmi_class_type_info::do_dyncast): Likewise.
19057         (__vmi_class_type_info::do_upcast): Likewise.
19059 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
19061         * lang-specs.h: Pass -fno-show-column to the preprocessor.
19063 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
19065         * rtti.c (class_hint_flags): Rename flags.
19066         (class_initializer): Remove flags.
19067         (synthesize_tinfo_var): Combine offset and flags. Add flags
19068         for __vmi_class_type_info.
19069         (create_tinfo_types): Remove flags from __class_type_info and
19070         __si_class_type_info. Merge flags and offset from
19071         base_class_type_info.
19072         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
19073         (__base_class_info::is_virtual_p): Adjust.
19074         (__base_class_info::is_public_p): Adjust.
19075         (__base_class_info::offset): New accessor.
19076         (__class_type_info::details): Remove member.
19077         (__class_type_info::__class_type_info): Lose details.
19078         (__class_type_info::detail_masks): Remove.
19079         (__si_class_type_info::__si_class_type_info): Lose details.
19080         (__vmi_class_type_info::details): New member.
19081         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
19082         (__vmi_class_type_info::detail_masks): New member.
19083         * tinfo.cc (__class_type_info::do_upcast): Initialize result
19084         with unknown_details_mask.
19085         (__vmi_class_type_info::do_find_public_src): Adjust
19086         (__vmi_class_type_info::do_dyncast): Adjust.
19087         (__vmi_class_type_info::do_upcast): Set result details, if
19088         needed. Adjust.
19089         (__dynamic_cast): Temporarily #if out optimization.
19091 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
19093         * rtti.c (get_tinfo_decl): Mark used.
19094         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
19095         mark as dealt with, if we output it.
19097 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
19099         * class.c: Reorganize to put virtual function table initialization
19100         machinery at the end of the file.
19102 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
19104         * class.c (finish_struct): Use bitsize_zero_node.
19105         * pt.c (instantiate_class_template): Likewise.
19107 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
19109         Put RTTI entries at negative offsets in new ABI.
19110         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
19111         vbase offset at index -3, not -1.
19112         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
19113         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
19114         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
19115         (build_rtti_vtbl_entries): New function.
19116         (set_rtti_entry): Remove.
19117         (build_primary_vtable): Don't use it.
19118         (build_secondary_vtable): Likewise.
19119         (start_vtable): Remove.
19120         (first_vfun_index): New function.
19121         (set_vindex): Likewise.
19122         (add_virtual_function): Don't call start_vtable.  Do call
19123         set_vindex.
19124         (set_primary_base): Rename parameter.
19125         (determine_primary_base): Likewise.
19126         (num_vfun_entries): Don't use skip_rtti_stuff.
19127         (num_extra_vtbl_entries): Include RTTI information.
19128         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
19129         (skip_rtti_stuff): Remove.
19130         (dfs_modify_vtables): Don't use it.
19131         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
19132         (layout_nonempty_base_or_field): Update size handling.
19133         (create_vtable_ptr): Tweak.
19134         (layout_class_type): Adjust parameter names.
19135         (finish_struct_1): Simplify.
19136         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
19137         (skip_rtti_stuff): Remove.
19138         (first_vfun_index): New function.
19139         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19140         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
19141         (marked_vtable_pathp): Declare.
19142         (unmarked_vtable_pathp): Likewise.
19143         * error.c (dump_expr): Use first_vfun_index to calculate vtable
19144         offsets.
19145         * rtti.c (build_headof): Look for RTTI at negative offsets.
19146         (get_tinfo_decl_dynamic): Likewise.
19147         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
19148         here.
19149         (create_pseudo_type_info): Do it here instead.  Adjust so that
19150         vptr points at first virtual function.
19151         * search.c (marked_vtable_pathp): Make it global.
19152         (unmarked_vtable_pathp): Likewise.
19153         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19154         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19155         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
19156         (get_pure_virtuals): Likewise.
19157         (expand_upcast_fixups): Likewise.
19158         * tree.c (debug_binfo): Likewise.
19159         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
19160         negative offset.
19162 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19164         * class.c (check_field_decl): Fix typo.
19165         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
19166         (check_methods): Likewise.
19167         (check_field_decls): Likewise.
19168         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
19169         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
19170         Use DECL_RESULT_FLD, not DECL_RESULT.
19171         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
19172         * lex.c (identifier_type): Likewise.
19173         * pt.c (determine_specialization, lookup_template_class): Likewise.
19174         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
19175         (resolve_overloaded_unification, more_specialized): Likewise.
19176         * semantics.c (finish_member_declaration): Likewise.
19177         * typeck.c (build_x_function_call): Likewise.
19179 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
19181         * class.c (layout_empty_base): Handle empty bases with non-byte
19182         alignment.
19183         (build_base_field): Likewise.
19184         (layout_virtual_bases): Likewise.
19186         * class.c (finish_struct_1): Fix typo in this change:
19188         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19190 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
19192         * decl.c (grokdeclarator): Count partial specializations when
19193         keeping track of how many template classes have been seen.
19195         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
19197 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19199         * class.c (build_vbase_pointer_fields): layout_field now place_field.
19200         (get_vfield_offset): Use byte_position.
19201         (set_rtti_entry): Set OFFSET to ssizetype zero.
19202         (get_binfo_offset_as_int): Deleted.
19203         (dfs_record_base_offsets): Use tree_low_cst.
19204         (dfs_search_base_offsets): Likewise.
19205         (layout_nonempty_base_or_field): Reflect changes in RLI format
19206         and call byte_position.
19207         (layout_empty_base): Convert offset to ssizetype.
19208         (build_base_field): use rli_size_unit_so_far.
19209         (dfs_propagate_binfo_offsets): Do computation in proper type.
19210         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
19211         (layout_class_type): Reflect changes in RLI names and fields.
19212         (finish_struct_1): Set DECL_FIELD_OFFSET.
19213         * dump.c (dequeue_and_dump): Call bit_position.
19214         * expr.c (cplus_expand_constant): Use byte_position.
19215         * rtti.c (expand_class_desc): Use bitsize_one_node.
19216         * typeck.c (build_component_addr): Use byte_position and don't
19217         special case for zero offset.
19219 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
19221         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
19223         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
19224         tinfo object.
19225         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
19226         vtable.
19228 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19230         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
19231         DECL_P macros.
19232         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
19233         make_typename_type, check_initializer, cp_finish_decl,
19234         xref_tag): Likewise.
19235         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
19236         decl_namespace, arg_assoc_template_arg, arg_assoc,
19237         validate_nonmember_using_decl, do_class_using_decl): Likewise.
19238         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
19239         args_to_string): Likewise.
19240         * friend.c (is_friend): Likewise.
19241         * lex.c (note_got_semicolon, note_list_got_semicolon,
19242         is_global): Likewise.
19243         * method.c (build_overload_nested_name, build_overload_value,
19244         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
19245         * parse.y (typename_sub, typename_sub1): Likewise.
19246         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
19247         process_partial_specialization, convert_template_argument,
19248         template_args_equal, add_pending_template, lookup_template_class,
19249         for_each_template_parm_r, maybe_fold_nontype_arg,
19250         tsubst, instantiate_template, type_unification_real, unify,
19251         instantiate_pending_templates, set_mangled_name_for_template_decl):
19252         Likewise.
19253         * repo.c (repo_get_id, repo_template_used): Likewise.
19254         * search.c (lookup_field_1): Likewise.
19255         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
19256         * xref.c (classname): Likewise.
19258 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
19260         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
19261         (CANONICAL_BINFO): New macro.
19262         (BINFO_NEW_VTABLE_MARKED): Use it.
19263         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
19264         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
19265         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
19266         not TREE_TYPE.
19267         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19268         (build_secondary_vtable): Likewise.
19269         (dfs_finish_vtbls): Likewise.
19270         (dfs_accumulate_vtbl_inits): Likewise.
19271         (accumulate_vtbl_inits): New function.
19272         (finish_vtbls): Make sure that virtual bases come after
19273         non-virtual bases in the vtable group.
19274         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
19275         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19276         * search.c (struct vbase_info): Move definition.
19277         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19278         (unmarked_new_vtable_p): Likewise.
19279         (dfs_mark_vtable_path): Remove.
19280         (dfs_mark_new_vtable): Remove.
19281         (dfs_unmark_new_vtable): Likewise.
19282         (dfs_clear_search_slot): Likewise.
19283         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
19284         (dfs_clear_vbase_slots): Likewise.
19285         (init_vbase_pointers): LIkewise.
19287 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
19289         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
19290         SIZETYPE to a non-SIZETYPE.
19292 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
19294         * class.c (layout_virtual_bases): Adjust names in conditionally
19295         compiled code.
19297         * class.c (record_base_offsets): New function.
19298         (layout_conflict_p): Likewise.
19299         (layout_nonempty_base_or_field): Use it.
19300         (layout_empty_base): New function.
19301         (build_base_field): Use it.
19302         (build_base_fields): Update comment.
19303         (layout_virtual_bases): Fold in a little code form
19304         layout_basetypes.  Use layout_empty_base.
19305         (layout_basetypes): Remove.
19306         (end_of_class): New function.
19307         (layout_class_type): Use it.  Adjust.
19309         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
19310         (fntype_p): Remove.
19311         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
19312         comment.
19313         (dfs_skip_nonprimary_vbases_markedp): Likewise.
19314         * typeck.c (fntype_p): Remove.
19316         * cp-tree.h (TI_SPEC_INFO): Remove.
19317         (CLASSTYPE_TI_SPEC_INFO): Likewise.
19318         * pt.c (process_partial_specialization): Likewise.
19320         * class.c (build_base_field): Fix thinko in computation of binfo
19321         offsets.
19323         * tree.c (mark_local_for_remap_p): Mark variables declared in
19324         TARGET_EXPRs as well.
19326 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
19328         * typeck.c (require_complete_type, complete_type,
19329         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
19330         build_array_ref, convert_arguments, pointer_diff,
19331         build_x_unary_op, build_unary_op, build_c_cast,
19332         build_modify_expr): Use COMPLETE_TYPE_P etc.
19333         * call.c (is_complete, convert_like_real,
19334         build_new_method_call): Likewise.
19335         * class.c (build_vbase_pointer_fields, check_bases,
19336         build_base_field, finish_struct_1, pushclass): Likewise.
19337         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
19338         * decl.c (maybe_process_template_type_declaration, pushtag,
19339         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
19340         layout_var_decl, check_initializer, cp_finish_decl,
19341         grokdeclarator, require_complete_types_for_parms,
19342         grok_op_properties, xref_tag, xref_basetypes,
19343         check_function_type): Likewise.
19344         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
19345         * friend.c (do_friend): Likewise.
19346         * init.c (build_offset_ref): Likewise.
19347         * parse.y (structsp): Likewise.
19348         * pt.c (maybe_process_partial_specialization,
19349         tsubst_friend_function, instantiate_class_template, tsubst,
19350         do_type_instantiation, instantiate_pending_templates): Likewise.
19351         * repo.c (repo_get_id): Likewise.
19352         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
19353         synthesize_tinfo_var, emit_support_tinfos): Likewise.
19354         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
19355         * semantics.c (begin_class_definition): Likewise.
19356         * tree.c (build_cplus_method_type): Likewise.
19357         * typeck2.c (digest_init, build_functional_cast,
19358         add_exception_specifier): Likewise.
19359         * parse.h, parse.c: Regenerated.
19361 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
19363         * inc/cxxabi.h: New header file. Define new-abi entry points.
19364         (__pointer_type_info::target): Rename member to ...
19365         (__pointer_type_info::type): ... here.
19366         (__base_class_info::type): Rename member to ...
19367         (__base_class_info::base): ... here.
19368         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
19369         * cp-tree.h (CPTI_ABI): New global tree enumeration.
19370         (abi_node): New global tree node.
19371         * decl.c (abi_node): Document.
19372         (init_decl_processing): Initialize abi_node.
19373         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
19374         (get_vmi_pseudo_type_info): Likewise.
19375         (create_tinfo_types): Likewise.
19376         (emit_support_tinfos): Likewise.
19377         * tinfo.h (cxxabi.h): Include for new-abi.
19378         Move rtti class definitions to new header file.
19379         * tinfo.cc (abi): Use the namespace.
19380         (std): Move new abi rtti classes from here ...
19381         (__cxxabiv1): ... to here.
19382         * tinfo2.cc (cxxabi.h): Include for new-abi.
19383         Move rtti class definitions to new header file.
19384         (std): Move new abi rtti classes from here ...
19385         (__cxxabiv1): ... to here.
19386         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
19387         namespace.
19389 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
19390             Jason Merrill  <jason@casey.cygnus.com>
19392         * method.c (build_overload_int): Use host_integerp.
19394 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19396         * init.c (build_offset_ref): Handle the case of a templated member
19397         function.
19399 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19401         * except.c (expand_exception_blocks): Clear catch_clauses_last.
19403 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
19405         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
19406         * class.c (check_bitfield_decl): Turn illegal bitfields into
19407         non-bitfields.
19408         (dfs_propagate_binfo_offsets): Adjust for new size_binop
19409         semantics.
19410         (dfs_offset_for_unshared_vbases): Likewise.
19411         * cvt.c (cp_convert_to_pointer): Convert NULL to a
19412         pointer-to-member correctly under the new ABI.
19413         * expr.c (cplus_expand_constant): Don't use cp_convert when
19414         turning an offset into a pointer-to-member.
19415         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
19416         when dereferencing them under the new ABI.
19417         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
19418         of pointers-to-members under the new ABI.
19420         * class.c (check_bitfield_decl): Remove restriction on really long
19421         bitfields.
19422         (layout_class_type): Implement new ABI handling of bitfields
19423         longer than their types.
19425 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19427         * parse.y (extdefs): Call ggc_collect.
19428         * parse.c: Regenerated.
19430 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
19432         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
19433         (note_name_declared_in_class): Use OVL_CURRENT to get at a
19434         potential overload.
19436 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19438         * class.c (build_vbase_path): Use integer_zerop.
19439         (build_vtable_entry): Use tree_low_cst.
19440         (get_vfield_offset): Use bit_position.
19441         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
19442         Use tree_low_cst.
19443         (check_bitfield_decl): Set DECL_SIZE using convert.
19444         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
19445         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
19446         Use tree_low_cst.
19447         (finish_struct_1): Use bit_position.
19448         (dump_class_hierarchy): Use tree_low_cst.
19449         * cp-tree.h (min_precision): Add declaration.
19450         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
19451         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
19452         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
19453         * expr.c (cplus_expand_constant): Use bit_position.
19454         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
19455         * rtti.c (get_base_offset): Use bit_position.
19456         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
19457         host_integerp, and tree_low_cst.
19458         (pointer_int_sum): Use integer_zerop.
19459         (build_component_addr): Use bit_position.
19461 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
19463         * typeck.c (require_complete_type): Don't assume size_zero_node.
19464         (complete_type_or_else): Likewise.
19466 2000-03-16  Steven Grady <grady@digitaldeck.com>
19467             Jason Merrill  <jason@casey.cygnus.com>
19469         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
19471 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
19473         * decl2.c (grokfield): Bail out if type is error_mark_node.
19475 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19477         * tinfo2.cc (__ptr_to_member_data): Rename to ...
19478         (__pointer_to_member_data): ... here. Adjust.
19479         * rtti.c (create_tinfo_types): Adjust.
19481 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19483         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
19484         * decl.c (ref_desc_type_node): Undocument.
19485         * rtti.c (ptr_ref_initializer): Rename to ...
19486         (ptr_initializer): ... here. Adjust comments.
19487         (ptmd_initializer): Fix comment thinko.
19488         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
19489         (create_tinfo_types): Remove ref_desc_type_node init.
19490         * tinfo2.cc (__reference_type_info): Remove.
19492 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19494         * decl.c (cp_finish_decl): Remove obsolete comment.
19496         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
19498 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
19500         * cp-tree.h: Tweak documentation.
19501         * class.c (build_vbase_pointer_fields): Layout the fields, too.
19502         (avoid_overlap): Remove.
19503         (get_binfo_offset_as_int): New function.
19504         (dfs_serach_base_offsets): Likewise.
19505         (layout_nonempty_base_or_field): Likewise.
19506         (build_base_field): Layout fields here.  Avoid placing two objects
19507         of the same type at the same address, under the new ABI.
19508         (build_base_fields): Adjust accordingly.
19509         (create_vtable_ptr): Return the new field, but don't attach it to
19510         TYPE_FIELDS.
19511         (remove_base_field): Remove.
19512         (remove_base_fields): Remove.
19513         (layout_basetypes): Adjust accordingly.
19514         (layout_class_type): Call layout_field for each field, rather than
19515         just making a wholesale call to layout_type.
19517 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
19519         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
19521 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
19523         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
19525         * except.c (dtor_nothrow): New fn.
19526         (do_pop_exception): Use it.  Take type parm.
19527         (push_eh_cleanup): Take type parm.
19528         (expand_start_catch_block): Pass it.
19529         (build_eh_type_type_ref): Accept null type.
19531 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
19533         * cp-tree.h (revert_static_member_fn): Change prototype.
19534         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
19535         (grok_op_properties): Likewise.
19536         (start_function): Likewise.
19537         (revert_static_member_fn): Simplify.
19538         * pt.c (check_explicit_specialization): Adjust call to
19539         revert_static_member_fn.
19541 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
19543         * cp-tree.h (scope_kind): New type.
19544         (tmpl_spec_kind): Likewise.
19545         (declare_pseudo_global_level): Remove.
19546         (pseudo_global_level_p): Rename to template_parm_scope_p.
19547         (pushlevel): Remove declaration.
19548         (begin_scope): New function.
19549         (finish_scope): Likewise.
19550         (current_tmpl_spec_kind): Likewise.
19551         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
19552         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
19553         Add template_spec_p.
19554         (toplevel_bindings_p): Adjust.
19555         (declare_pseudo_global_level): Remove.
19556         (pseudo_global_level_p): Rename to template_parm_scope_p.
19557         (current_tmpl_spec_kind): New function.
19558         (begin_scope): Likewise.
19559         (finish_scope): Likewise.
19560         (maybe_push_to_top_level): Adjust.
19561         (maybe_process_template_type_declaration): Likewise.
19562         (pushtag): Likewise.
19563         (pushdecl_nonclass_level): Likewise.
19564         (lookup_tag): Likewise.
19565         (grokfndecl): Handle member template specializations.  Share
19566         constructor and non-constructor code.
19567         * decl2.c (check_classfn): Handle member template specializations.
19568         * pt.c (begin_template_parm_list): Use begin_scope.
19569         (begin_specialization): Likewise.
19570         (end_specialization): Likewise.
19571         (check_explicit_specialization): Use current_tmpl_spec_kind.
19572         Handle member template specializations.
19573         (end_template_decl): Use finish_scope.  Remove call to
19574         get_pending_sizes.
19575         (push_template_decl_real): Remove bogus error message.
19576         (tsubst_decl): Fix typo in code contained in comment.
19577         (instantiate_template): Handle member template specializations.
19578         (most_general_template): Likewise.
19580 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
19582         * lex.c (whitespace_cr): Compress consecutive calls to warning().
19583         (do_identifier): Ditto for error().
19585         * pt.c (convert_nontype_argument): Ditto for cp_error().
19586         (convert_template_argument): Ditto for cp_pedwarn().
19588 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
19590         * exception.cc (__check_null_eh_spec): New fn.
19591         * except.c (expand_end_eh_spec): Call it if the spec is throw().
19593 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
19595         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
19596         * except.c (expand_end_eh_spec): Add the return type.
19597         * rtti.c (throw_bad_cast): Add the parmtypes.
19598         (throw_bad_typeid): Likewise.
19600         * semantics.c (expand_stmt): Only leave out rtl for unused
19601         artificials, and set DECL_IGNORED_P on them as well.
19602         * decl.c (wrapup_globals_for_namespace): Likewise.
19604 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
19606         * decl.c (maybe_commonize_var): Skip all artificial decls.
19607         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
19609 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
19611         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
19612         * cp-tree.h: Declare flag_enforce_eh_specs.
19613         * decl.c (store_parm_decls, finish_function): Check it.
19615         C library functions don't throw.
19616         * Makefile.in (cfns.h): New target.
19617         (except.o): Depend on it.
19618         * Make-lang.in (cc1plus): Depend on cfns.gperf.
19619         * cfns.gperf: New file.
19620         * cfns.h: Generated.
19621         * except.c: Include it.
19622         (nothrow_libfn_p): New fn.
19623         * decl.c (grokfndecl): Use it.
19624         * cp-tree.h: Declare it.
19626         * decl.c (push_overloaded_decl_1, auto_function,
19627         define_function): Lose.
19628         (build_library_fn_1): New static fn.
19629         (builtin_function): Use it.
19630         (get_atexit_node): Use build_library_fn_ptr.
19631         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
19632         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
19633         push_void_library_fn, push_throw_library_fn): New fns.
19634         * cp-tree.h: Declare them.
19635         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
19636         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
19637         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
19638         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
19639         * rtti.c (build_runtime_decl): Lose.
19640         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
19641         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
19642         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
19644         * call.c (build_call): Remove result_type parm.
19645         Call mark_used on unused artificial fns.
19646         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
19648 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
19650         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
19651         appropriate.
19652         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
19653         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
19654         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
19655         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
19656         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
19657         expand_generic_desc): Likewise.
19659 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19661         * exception.cc (__cp_pop_exception): Cleanup the original object.
19663 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19665         * decl.c (grok_op_properties): Merge conversion to void warning
19666         with other silly op warnings.
19668 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
19670         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
19671         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
19673 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19675         * decl.c (cp_make_fname_decl): New function.
19676         (wrapup_globals_for_namespace): Don't emit unused static vars.
19677         (init_decl_processing): Remove comment about use of
19678         array_domain_type. Set make_fname_decl.
19679         (cp_finish_decl): Remove __FUNCTION__ nadgering.
19680         * semantics.c (begin_compound_stmt): Remove
19681         current_function_name_declared flagging.
19682         (expand_stmt): Don't emit unused local statics.
19683         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
19684         specially.
19686 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19688         * typeck.c (convert_for_assignment): Don't look at array
19689         initializer.
19690         * call.c (convert_like_real): Likewise.
19692 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
19694         Add initial support for '\uNNNN' specifier.
19695         * lex.c (read_ucs): New fn.
19696         (readescape, skip_white_space): Call it.
19697         (is_extended_char, is_extended_char_1): New fns.
19698         (utf8_extend_token): New fn, #if 0'd out.
19699         (real_yylex): Treat extended chars like letters.
19701         * search.c (note_debug_info_needed): Walk the bases even if we
19702         weren't deferring the type itself.
19704 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19706         * decl2.c (finish_objects): Constify a char*.
19708         * method.c (emit_thunk): Likewise.
19710 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
19712         * typeck.c (dubious_conversion_warnings): Look through
19713         REFERENCE_TYPE.
19715 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19717         * class.c (dfs_modify_vtables): I is now unsigned.
19718         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
19719         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
19720         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
19721         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
19722         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
19723         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
19724         Call integer_all_onesp.
19725         * typeck2.c (process_init_constructor): Use compare_tree_int.
19727         * lang-specs.h (as): Don't call if -syntax-only.
19729 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
19731         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
19732         RTL_EXPR_HAS_NO_SCOPE after all.
19734 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
19736         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
19737         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
19738         RTL_EXPR_HAS_NO_SCOPE.
19740         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
19741         later.
19743         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
19745 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
19747         * call.c (convert_like): Macrofy.
19748         (convert_like_with_context): New macro.
19749         (convert_like_real): Renamed from convert_like.  Add calling
19750         context parameters, for diagnostics. Add recursive flag.  Call
19751         dubious_conversion_warnings for outer conversion.
19752         (build_user_type_conversion): Use convert_like_with_context.
19753         (build_over_call): Likewise. Don't warn about dubious
19754         conversions here. Adjust convert_default_arg calls.
19755         (convert_default_arg): Add context parameters for diagnostics.
19756         Pass through to convert_like_with_context.
19757         * cp-tree.h (convert_default_arg): Add context parameters.
19758         (dubious_conversion_warnings): Prototype new function.
19759         * typeck.c (convert_arguments): Adjust convert_default_arg call.
19760         (dubious_conversion_warnings): New function, broken
19761         out of convert_for_assignment.
19762         (convert_for_assignment): Adjust.
19764 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
19766         * decl2.c (key_method): Break out from...
19767         (import_export_vtable, import_export_class): ...here.
19769         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
19770         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
19772         * search.c (note_debug_info_needed, dfs_debug_mark,
19773         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
19774         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
19776 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
19778         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
19779         typos.
19781 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
19783         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
19784         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
19785         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
19786         (lang_type): Split gets_new into has_new and has_array_new.
19787         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19788         (TYPE_GETS_NEW): Split into ...
19789         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
19790         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
19791         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
19792         (build_op_new_call): Don't declare.
19793         (build_new_1): Likewise.
19794         * call.c (build_op_new_call): Remove.
19795         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19796         instead of TYPE_NEEDS_DESTRUCTOR.
19797         (finish_struct_bits): Likewise.
19798         (add_implicitly_declared_members): Likewise.
19799         (check_field_decl): Likewise.
19800         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
19801         correctly under the new ABI.
19802         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19803         instead of TYPE_NEEDS_DESTRUCTOR.
19804         (initialize_local_var): Likewise.
19805         (destroy_local_var): Likewise.
19806         (cp_finish_decl): Likewise.
19807         (register_dtor_fn): Likewise.
19808         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
19809         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
19810         TYPE_VEC_DELETE_TAKES_SIZE here.
19811         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
19812         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
19813         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19814         (finish_destructor_body): Likewise.
19815         (maybe_build_cleanup_1): Likewise.
19816         * decl2.c (do_static_destruction): Likewise.
19817         * init.c (build_new_1): Make it static.
19818         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19819         (expand_cleanup_for_base): Likewise.
19820         (get_cookie_size): New function.
19821         (build_new_1): Handle array-new cookies correctly under the new
19822         ABI.
19823         (build_vec_delete_1): Likewise.
19824         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19825         (build_delete): Likewise.
19826         (build_vec_delete): Handle array-new cookies correctly under the new
19827         ABI.
19828         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19829         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
19830         TYPE_HAS_ARRAY_NEW_OPERATOR.
19831         * ptree.c (print_lang_type): Check them.
19832         * search.c (context_for_name_lookup): Fix typo in comment.
19833         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19834         * tree.c (break_out_cleanups): Likewise.
19835         (build_cplus_array_test_1): Likewise.
19836         (cp_build_qualified_type_real): Likewise.
19837         * typeck.c (complete_type): Likewise.
19839         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
19840         the command-line, not the end.
19842 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
19844         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
19846 2000-03-02  Tom Tromey  <tromey@cygnus.com>
19848         * cp-tree.h (build_java_class_ref): Declare.
19849         * init.c (build_java_class_ref): No longer static.
19850         * except.c (expand_throw): Generate a Java-style `throw' if the
19851         thrown object is a "Java" object.
19852         (initialize_handler_parm): Generate a Java-style lookup of
19853         exception info if the caught object is a "Java" object.
19854         (catch_language, catch_language_init): New globals.
19855         (decl_is_java_type): New function.
19856         (expand_start_catch_block): Don't call push_eh_info() or
19857         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
19858         class reference to build_catch_block.
19860 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19862         * typeck.c (comptypes): Treat sizetype like its language equivalent.
19864 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
19866         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
19867         to merge reference/pointer code and fix incorrect warnings.
19869 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
19871         * search.c (protected_accessible_p): Use context_for_name_lookup.
19873         * init.c (construct_virtual_bases): Fix thinko.
19874         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
19876 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
19878         * decl.c (current_function_decl): Move to toplev.c.
19880 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
19882         * pt.c (fn_type_unification): Unify return type, whenever
19883         provided.
19884         (get_bindings_real): Only pass return type when necessary.
19885         Remove explicit return type check.
19886         * class.c (resolve_address_of_overloaded_function): Pass desired
19887         return type to fn_type_unification.
19889 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19891         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
19892         DECL_FIELD_SIZE.
19893         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
19894         DECL_FIELD_SIZE.
19895         * rtti.c (expand_class_desc): Likewise.
19896         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
19897         (THUNK_VCALL_OFFSET): Likewise.
19898         (THUNK_DELTA): Reflect changes in ../tree.h.
19900 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
19902         * search.c (protected_accessible_p): Also allow the access if
19903         the member is public in DERIVED.  Lose TYPE parm.
19904         (friend_accessible_p): Lose TYPE parm.
19905         (accessible_p): Adjust.
19907 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19909         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
19910         on things that are not sizes; ssize_binop deleted.
19911         Call size_diffop when appropriate.
19912         (dfs_build_vcall_offset_vtbl_entries): Likewise.
19913         (build_primary_vtable, build_secondary_vtable): Likewise.
19914         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
19915         Variable I is HOST_WIDE_INT.
19916         (get_vfield_offset): Pass proper types to size_binop.
19917         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
19918         (finish_struct_1): Likewise.
19919         (skip_rtti_stuff): Arg N is now pointer to signed.
19920         (layout_class_type): Use size_zero_node.
19921         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
19922         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
19923         * decl.c (complete_arry_type): Pass proper types to size_binop.
19924         (xref_basetypes): BINFO_OFFSET is sizetype.
19925         * error.c (dump_expr): Don't use size_binop non-sizes.
19926         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
19927         * init.c (construct_virtual_bases): Fix type error.
19928         (build_vec_delete_1): Pass proper type to size_binop and don't
19929         fold result.
19930         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
19931         * rtti.c (get_base_offset): Pass proper type to size_binop.
19932         * search.c (dfs_find_vbases): Fix type error.
19933         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
19934         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
19935         * tree.c (debug_binfo): Variable N is signed.
19936         Use HOST_WIDE_INT_PRINT_DEC.
19937         * typeck.c (comptypes): sizetype is same as equivalent integer type.
19938         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
19939         size_one_node and size_zero_node.
19940         (c_alignof): Use size_one_node.
19941         (build_component_addr): Pass proper types to size_binop.
19942         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
19944 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
19946         Implement class scope using-declarations for functions.
19947         * class.c (handle_using_decl): Call add_method for used functions.
19948         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
19949         (add_method): Used functions are hidden by local functions.
19950         (check_bases_and_members): Handle using-decls before finalizing
19951         CLASSTYPE_METHOD_VEC.
19952         * call.c (add_function_candidate): Add ctype parm; if nonzero,
19953         override the type of 'this' accordingly.
19954         (add_template_candidate, add_template_candidate_real): Add ctype parm.
19955         (convert_class_to_reference, build_user_type_conversion_1,
19956         build_new_function_call, build_object_call, build_new_op,
19957         build_new_method_call): Pass ctype parm.
19959         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
19960         the baselink.
19961         * call.c (convert_class_to_reference, build_user_type_conversion_1,
19962         build_new_function_call, build_object_call, build_new_op,
19963         build_new_method_call, build_op_delete_call): Don't get basetype_path
19964         from a baselink.
19965         * typeck.c (build_component_ref): Likewise.
19966         * init.c (build_offset_ref): Likewise.
19967         (resolve_offset_ref): Don't call enforce_access.
19968         Call build_scoped_ref.
19969         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
19970         would cause an error or if -pedantic.
19971         * class.c (alter_access): Lose binfo parm.
19973 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
19975         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
19976         types.
19978 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
19980         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
19981         pseudo_type_info creation into the std namespace
19983 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
19985         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
19986         (import_export_class): Remove declaration.
19987         * decl2.c (import_export_class): Make it static.
19988         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
19989         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
19990         EXPR_WITH_FILE_LOCATION.
19991         * lex.c (check_newline): Tweak filename/lineno setting.
19992         * semantics.c (begin_while_stmt): Fix typo in comment.
19994 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19996         * lang-options.h (-fmessage-length=): Add missing option.
19998         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20000 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
20002         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20004 2000-02-25  Jim Wilson  <wilson@cygnus.com>
20006         * optimize.c (expand_call_inline): Emit the return label before
20007         evaluating the return value.
20009 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
20011         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20012         than duplicating functionality here.
20013         * optimize.c: Include input.h.
20014         (expand_call_inline): Use push_srcloc and pop_srcloc.
20015         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20016         * parse.c: Regenerated.
20017         * Makefile.in (lex.o): Depend on input.h.
20018         (optimize.o): Likewise.
20020 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
20022         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20023         function type, rather than ICE.
20025 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
20027         * decl.c (grokdeclarator): Call decl_type_access_control.
20028         * parse.y (parse_end_decl): Don't call decl_type_access_control if
20029         decl is null.
20031 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
20033         * decl.c (decls_match): Remove obsolete static member nadgering.
20035 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20037         * decl.c (grokdeclarator): Change ANSI to ISO.
20038         * lex.c (consume_string, readescape, do_identifier): Likewise.
20039         (parse_float, real_yylex): Likewise.
20040         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20041         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20042         new_type_id, maybe_label_decls, simple_stmt,
20043         for.init.statement): Likewise.
20044         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20045         * semantics.c (finish_named_return_value): Likewise.
20046         * parse.c: Regenerate.
20048 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
20050         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20051         (CPTI_CLASS_STAR_TYPE): Remove.
20052         (vtable_index_type): Likewise.
20053         (class_star_type_node): Remove.
20054         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20055         (build_binary_op_nodefault): Remove.
20056         * call.c (build_new_op): Use build_binary_op instead of
20057         build_binary_op_nodefault.
20058         * decl.c (init_decl_processing): Remove class_star_type_node
20059         initialization.  Make delta_type_node ptrdiff_type_node under the
20060         new ABI.  Initialize vtable_index_type.
20061         (build_ptrmemfunc_type): Build different structures for the new
20062         ABI.
20063         (build_enumerator): Use build_binary_op instead of
20064         build_binary_op_nodefault.
20065         * method.c (build_overload_value): Mangle pointers-to-members
20066         appropriately under the new ABI.
20067         * typeck.c (build_array_ref): Use build_binary_op instead of
20068         build_binary_op_nodefault.
20069         (get_member_function_from_ptrfunc): Adjust for the new ABI.
20070         (build_binary_op_nodefault): Rename to ...
20071         (build_binary_op): ... this.  Remove old version.  Adjust for
20072         pointer-to-member comparisons under the new ABI.
20073         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
20074         (build_ptrmemfunc): Adjust for the new ABI.
20075         (expand_ptrmemfunc_cst): Likewise.
20076         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
20077         (pfn_from_ptrmemfunc): Adjust for the new ABI.
20079 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
20081         * call.c (build_object_call): Compress consecutive calls to
20082         cp_error.
20083         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
20084         (build_op_delete_call): Adjust message formatting.
20086         * class.c (check_bases): Compress consecutive calls to
20087         cp_pedwarn.
20088         (finish_struct_anon): Say 'ISO C++'.
20090         * decl.c (start_decl): Same here.
20091         (grok_reference_init): Likewise.
20092         (grokfndecl): Correct message formatting.
20093         (grokfndecl): Improve diagnostic.
20094         (check_static_variable_definition): Likewise. Say 'ISO C++'
20095         (compute_array_index_type): Say 'ISO C++'
20096         (create_array_type_for_decl): Compress consecutive calls to
20097         cp_error.
20098         (grokdeclarator): Say 'ISO C++'
20099         (grok_op_properties): Likewise.
20101         * decl2.c (delete_sanity): Clairify diagnostic.
20102         (check_member_template): Same here.
20103         (grok_function_init): Use consistent terminology.
20105         * expr.c (do_case): Say 'ISO C++'
20107         * friend.c (do_friend): Compress consecutive calls to warning.
20109 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
20111         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
20112         * class.c (build_secondary_vtable): Reorganize.  Don't create a
20113         new vtable under the new ABI.
20114         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
20115         computing the size.
20116         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
20117         the initializing elements.
20118         (initialize_vtable): New function.
20119         (dfs_finish_vtbls): Use it.
20120         (dfs_accumulate_vtbl_inits): New function.
20121         (finish_vtbls): Merge primary and secondary vtables under the new
20122         ABI.
20123         (finish_struct_1): Remove redundant call to layout_vtable_decl.
20124         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
20125         aren't VAR_DECLs.
20127         * class.c (build_vtable): New function, split out from ...
20128         (get_vtable_decl): ... here, and ...
20129         (build_secondary_vtable): ... here.
20131         * pt.c (tsubst_decl): Fix formatting.
20133 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20135         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
20136         (avoid_overlap, build_base_field): Likewise.
20137         (build_base_field, build_base_fields, is_empty_class):
20138         Test DECL_SIZE with integer_zero.
20139         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
20140         * cp-tree.h (struct lang_type): New field size_unit.
20141         (CLASSTYPE_SIZE_UNIT): New macro.
20142         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
20143         (cp_finish_decl): Delete -Wlarger-than processing.
20144         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
20145         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
20146         * tree.c (make_binfo): binfo vector is one entry longer.
20147         (walk_tree): Walk DECL_SIZE_UNIT.
20149 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
20151         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
20152         comment.
20153         (build_vtable_entry): Don't assume all vtable entries are
20154         functions.
20155         (build_vtbl_initializer): Adjust accordingly.
20156         (get_vtable_decl): Fix formatting.
20158 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
20160         * semantics.c (deferred_type_access_control): Walk the entire
20161         type_lookups list.
20162         (save_type_access_control): Rename from
20163         initial_deferred_type_access_control.  Just remember the value.
20164         (decl_type_access_control): New fn.
20165         (begin_function_definition): Use deferred_type_access_control, after
20166         we've started the function.  Set type_lookups to error_mark_node.
20167         * parse.y (frob_specs, fn.def1): Adjust.
20168         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
20169         (parse_end_decl, parse_bitfield0, parse_method): New fns.
20170         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
20171         (after_type_component_declarator0): Likewise.
20172         (after_type_component_declarator): Likewise.
20173         (notype_component_declarator): Likewise.
20174         * cp-tree.h: Adjust.
20176         * decl.c (redeclaration_error_message): Allow redeclaration of
20177         namespace-scope decls.
20179 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
20181         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
20183 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
20185         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
20186         * decl2.c (grokclassfn): Likewise.
20188         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
20190         * decl2.c (lang_decode_option): Don't set default message length
20191         here.
20192         * lex.c (lang_init_options): Set it here.
20194 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
20196         Make DECL_CONTEXT mean the class in which a member function was
20197         declared, even for a virtual function.
20198         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
20199         (DECL_FRIEND_CONTEXT): New macro.
20200         (DECL_REAL_CONTEXT): Remove.
20201         (SET_DECL_FRIEND_CONTEXT): Likewise.
20202         (DECL_VIRTUAL_CONTEXT): Adjust.
20203         (DECL_CLASS_SCOPE_P): Use TYPE_P.
20204         (add_friends): Remove.
20205         (hack_decl_function_context): Likewise.
20206         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
20207         CP_DECL_CONTEXT.
20208         (build_over_call): Fix indentation.  Use DECL_CONTEXT
20209         instead of DECL_CLASS_CONTEXT.
20210         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
20211         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20212         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20213         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
20214         (build_base_field): Likewise.
20215         (finish_struct_1): Likewise.
20216         (build_self_reference): Likewise.
20217         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
20218         DECL_REAL_CONTEXT.
20219         (pushtag): Use decl_function_context, not
20220         hack_decl_function_context.
20221         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20222         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
20223         (pushdecl): Remove bogus code.
20224         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
20225         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20226         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20227         Use decl_function_context, nothack_decl_function_context.
20228         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
20229         (grokdeclarator): Likewise.  Use decl_function_context, not
20230         hack_decl_function_context.
20231         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
20232         (start_function): Use DECL_FRIEND_CONTEXT, not
20233         DECL_CLASS_CONTEXT.  Use decl_function_context, not
20234         hack_decl_function_context.
20235         (finish_function): Use decl_function_context, not
20236         hack_decl_function_context.
20237         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
20238         DECL_CLASS_CONTEXT.
20239         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
20240         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
20241         (grokfield): Likewise.
20242         (finish_builtin_type): Likewise.
20243         (finish_vtable_vardec): Use decl_function_context, not
20244         hack_decl_function_context.
20245         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20246         (start_static_initialization_or_destruction): Likewise.
20247         (finish_static_initialization_or_destruction): Likewise.
20248         (mark_used): Adjust logic for deciding when to synthesize methods.
20249         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
20250         DECL_REAL_CONTEXT.
20251         * error.c (dump_function_decl): Use DECL_CONTEXT, not
20252         DECL_CLASS_CONTEXT.
20253         * friend.c (is_friend): Likewise.
20254         (add_friends): Remove.
20255         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
20256         * lex.c (begin_definition_of_inclass_inline): Use
20257         decl_function_context, not hack_decl_function_context.
20258         (process_next_inline): Likewise.
20259         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20260         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
20261         DECL_CLASSS_CONTEXT.
20262         (hack_identifier): Likewise.
20263         (synthesize_method):  Use decl_function_context, not
20264         hack_decl_function_context.
20265         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
20266         DECL_REAL_CONTEXT.
20267         (is_member_template): Use decl_function_context, not
20268         hack_decl_function_context.  Use DECL_CONTEXT, not
20269         DECL_CLASS_CONTEXT.
20270         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
20271         DECL_CLASS_CONTEXT.
20272         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
20273         DECL_REAL_CONTEXT.
20274         (push_template_decl_real): Likewise.
20275         (instantiate_class_template): Don't call add_friends.
20276         (tsubst_default_argument): Use DECL_CONTEXT, not
20277         DECL_REAL_CONTEXT.
20278         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20279         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20280         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
20281         DECL_CLASS_CONTEXT.
20282         * repo.c (repo_inline_used): Likewise.
20283         * search.c (current_scope): Adjust for new _CONTEXT macros.
20284         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
20285         DECL_REAL_CONTEXT.
20286         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20287         (lookup_fnfields_here):Likewise.
20288         (check_final_overrider): Likewise.
20289         (init_vbase_pointers): Likewise.
20290         (virtual_context): Likewise.
20291         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
20292         (expand_body): Use decl_function_context, not
20293         hack_decl_function_context.
20294         * tree.c (hack_decl_function_context): Remove.
20295         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
20296         DECL_CLASS_CONTEXT.
20297         * typeck2.c (error_not_base_type): Likewise.
20299 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
20301         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
20303 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20305         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
20307 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
20309         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
20311 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
20313         * decl2.c (lang_decode_option): Enable automatic line wrapping.
20315 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
20317         * parse.y (frob_specs): Split out...
20318         (parse_decl): From here.
20319         (fn.def2): Call initial_deferred_type_access_control.
20320         (after_type_component_declarator0): Call frob_specs.
20321         (notype_component_declarator0): Likewise.
20322         * search.c (friend_accessible_p): Nested classes are friends of their
20323         enclosing classes.
20325 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
20327         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
20328         used to create an implicit temporary.
20330         * class.c (dfs_modify_vtables): Tweak calculation of functions to
20331         override.
20333 2000-02-08  Nathan Sidwell  <nathan@acm.org>
20335         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
20336         strip array element qualifiers too.
20338 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
20340         * decl.c (store_parm_decls): Don't build cleanups for parameters
20341         while processing_template_decl.
20343 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
20345         * cp-tree.h (struct saved_scope): Add incomplete field.
20346         (namespace_scope_incomplete): New macro.
20347         * decl.c (pushdecl): Use it.
20348         (hack_incomplete_structures): Use it.  See through artificial
20349         binding levels.
20350         (mark_saved_scope): Mark it.
20352         Implement access control for nested types.
20353         * search.c (type_access_control): New fn.
20354         (accessible_p): Now we do perform access control for types.
20355         * semantics.c (deferred_type_access_control): New fn.
20356         (initial_deferred_type_access_control): New fn.
20357         (begin_function_definition): Call it.  Add lookups parm.
20358         * decl.c (struct binding_level): Add this_class field.
20359         (pushlevel_class): Set it.
20360         (mark_binding_level): Mark it.
20361         (lookup_name_real): Use it.  Call type_access_control.
20362         (mark_saved_scope): Mark lookups field.
20363         * cp-tree.h (flagged_type_tree): Add lookups field.
20364         (struct saved_scope): Add lookups field.
20365         (type_lookups): New macro.
20366         * parse.y (declmods): Now <ftype>.
20367         (parse_decl): Add lookups parm.  Call
20368         initial_deferred_type_access_control.
20369         (lang_extdef): Clear type_lookups.
20370         (typed_declspecs, declmods, typespec): Set lookups field.
20371         (initdcl): Call deferred_type_access_control.
20372         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
20373         component_decl_1, named_parm): Adjust.
20374         * friend.c (is_friend): Nested classes are friends of their
20375         enclosing classes.
20377         * class.c (currently_open_derived_class): New fn.
20378         * method.c (hack_identifier): Use it.
20380         * lex.c (do_identifier): Remove obsolete code.
20382         * parse.y (typed_typespecs): Propagate new_type_flag properly.
20384 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
20386         * tinfo.h: Remove apostrophes from C++ comment (xgettext
20387         thinks this file is plain C).
20389 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20391         * Makefile.in (call.o): Depend on $(EXPR_H).
20393         * call.c: Include "expr.h".
20395         * class.c (dump_class_hierarchy): Add prototype.
20397         * search.c (dfs_get_pure_virtuals): Likewise.
20399 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
20401         * parse.y (simple_stmt): Allow :: token in asm parameter list.
20402         * parse.c: Rebuilt.
20404 2000-01-31  Jim Wilson  <wilson@cygnus.com>
20406         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
20407         Store it in DECL_FCONTEXT.
20408         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
20410 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
20412         * tinfo.h (old abi): #include "tconfig.h".
20413         * tinfo.cc (convert_to_base): Move into old abi section.
20415 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
20417         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
20418         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
20419         (BINFO_PRIMARY_BINFO): New macro.
20420         (BF_DELTA): Rename to ...
20421         (BV_DELTA): ... this.
20422         (BF_VCALL_INDEX): Rename to ...
20423         (BV_VCALL_INDEX): ... this.
20424         (BF_FN): Rename to ...
20425         (BV_FN): ... this.
20426         * class.c (build_vbase_path): Adjust for changes to reverse_path.
20427         (set_rtti_entry): Rename BF_ macros to BV_ variants.
20428         (modify_vtable_entry): Simplify.
20429         (add_virtual_function): Rename BF_ macros to BV_ variants.
20430         (build_vtable_initializer): Likewise.
20431         (get_class_offset_1): Remove.
20432         (dfs_get_class_offset): Likewise.
20433         (get_class_offset): Likewise.
20434         (dfs_find_final_overrider): New function.
20435         (find_final_overrider): Likewise.
20436         (modify_one_vtable): Remove.
20437         (dfs_find_base): New function.
20438         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
20439         find_final_overrider.
20440         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
20441         virtuals.
20442         (dfs_fixup_vtable_deltas): Remove.
20443         (override_one_vtable): Remove.
20444         (merge_overrides): Likewise.
20445         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
20446         unreal chilren of virtual bases.
20447         (finish_struct_1): Don't use merge_overrides.  Don't use
20448         dfs_fixup_vtable_deltas.
20449         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
20450         BINFOs.
20452 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
20453             Jason Merrill  <jason@yorick.cygnus.com>
20455         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
20457 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
20459         * exception.cc (__throw_bad_typeid): Add missing std::.
20461 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20463         * cp-tree.h (make_thunk): PROTO -> PARAMS.
20465 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
20467         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
20469         Runtime support for new-abi rtti.
20470         * inc/typeinfo (type_info::operator!=): Define in class.
20471         (type_info::before, type_info::name, type_info::operator==,
20472         type_info::operator!=): Define new ABI implementations.
20473         (type_info::is_pointer_p, type_info::is_function_p): Declare
20474         new virtual functions.
20475         (type_info::do_catch, type_info::do_upcast): Likewise.
20477         * tinfo.h (__base_class_info): Define new class.
20478         (__class_type_info): Likewise.
20479         (__si_class_type_info): Likewise.
20480         (__vmi_class_type_info): Likewise.
20481         (__dynamic_cast): Prototype.
20483         * tinfo.cc: Conditionalize old and new rtti mechanisms.
20484         (type_info::is_pointer_p): Define new function.
20485         (type_info::is_function_p): Likewise.
20486         (type_info::do_catch): Likewise.
20487         (type_info::do_upcast): Likewise.
20488         (vtable_prefix): New structure for vtable access.
20489         (adjust_pointer): Define new template function.
20490         (contained_p, public_p, virtual_p, contained_public_p,
20491         contained_nonpublic_p, contained_nonvirtual_p): Define new
20492         functions.
20493         (nonvirtual_base_type): New local variable.
20494         (__class_type_info::~__class_type_info): Define.
20495         (__si_class_type_info::~__si_class_type_info): Likewise.
20496         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
20497         (__class_type_info::do_catch): Define new function.
20498         (__class_type_info::do_upcast): Likewise.
20499         (__class_type_info::find_public_src): Likewise.
20500         (__class_type_info::do_find_public_src): Likewise.
20501         (__si_class_type_info::do_find_public_src): Likewise.
20502         (__vmi_class_type_info::do_find_public_src): Likewise.
20503         (__class_type_info::do_dyncast): Likewise.
20504         (__si_class_type_info::do_dyncast): Likewise.
20505         (__vmi_class_type_info::do_dyncast): Likewise.
20506         (__class_type_info::do_upcast): Likewise.
20507         (__si_class_type_info::do_upcast): Likewise.
20508         (__vmi_class_type_info::do_upcast): Likewise.
20509         (__dynamic_cast): Likewise.
20511         * tinfo2.cc (__fundamental_type_info): Define new class.
20512         (__pointer_type_info): Likewise.
20513         (__reference_type_info): Likewise.
20514         (__array_type_info): Likewise.
20515         (__function_type_info): Likewise.
20516         (__enum_type_info): Likewise.
20517         (__ptr_to_member_type_info): Likewise.
20518         (__fundamental_type_info::~__fundamental_type_info): Define.
20519         (__pointer_type_info::~__pointer_type_info): Likewise.
20520         (__reference_type_info::~__reference_type_info): Likewise.
20521         (__array_type_info::~__array_type_info): Likewise.
20522         (__function_type_info::~__function_type_info): Likewise.
20523         (__enum_type_info::~__enum_type_info): Likewise.
20524         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
20525         (__pointer_type_info::do_catch): Define new function.
20526         (__ptr_to_member_type_info::do_catch): Define new function.
20528         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
20529         (__is_pointer): Likewise.
20531         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
20533 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
20535         * cp/class.c (build_vtable): Rename to build_primary_vtable.
20536         (prepare_fresh_vtable): Rename to build_secondary_vtable.
20537         (make_new_vtable): New function.
20538         (modify_vtable_entry): Handle generation of new vtables correctly.
20539         (modify_one_vtable): Remove unused parameter.
20540         (dfs_fixup_vtable_deltas): Likewise.
20541         (override_one_vtable): Use build_secondary_vtable.
20542         (finish_struct_1): Use build_primary_vtable and
20543         build_secondary_vtable.
20545 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
20547         * cp/decl.c: Adjust variable names, comments, help strings.
20549 2000-01-29  Nathan Sidwell  <nathan@acm.org>
20551         * new2.cc (operator delete[]): Use operator delete, don't assume
20552         implementation.
20554 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
20556         * class.c (build_vtbl_initializer): Add argument to
20557         build_vtable_entry call.
20559 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
20561         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
20562         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
20563         (BF_DELTA): New macro.
20564         (BF_VCALL_INDEX): Likewise.
20565         (BF_FN): Likewise.
20566         (THUNK_VCALL_OFFSET): Likewise.
20567         (make_thunk): Change prototype.
20568         * class.c (build_vtable_entry): Integrate
20569         build_vtable_entry_for_fn.  Handle vcall indices.
20570         (build_vtable_entry_for_fn): Remove.
20571         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
20572         BF_VCALL_INDEX, BF_FN.
20573         (modify_vtable_entry): Integrate common code from
20574         modify_one_vtable and dfs_fixup_vtable_deltas.
20575         (add_virtual_function): Set BF_VCALL_INDEX.
20576         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
20577         and BF_FN.
20578         (modify_one_vtable): Simplify.
20579         (dfs_fixup_vtable_deltas): Likewise.
20580         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
20581         * method.c (make_thunk): Handle vcall indices.
20583 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
20585         Compiler side new abi rtti (not enabled).
20586         * cp-tree.h (new_abi_rtti_p): New macro.
20587         (emit_support_tinfos): Prototype new function.
20588         (tinfo_decl_p): Likewise.
20589         (emit_tinfo_decl): Likwise.
20590         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
20591         macros.
20592         (doing_runtime): New local static.
20593         (init_rtti_processing): Add new-abi initializer.
20594         (get_tinfo_decl): Add new-abi logic.
20595         (tinfo_from_decl): Likewise.
20596         (build_dynamic_cast_1): Likewise.
20597         (qualifier_flags): New static function.
20598         (tinfo_base_init): Likewise.
20599         (generic_initializer): Likewise.
20600         (ptr_ref_initializer): Likewise.
20601         (ptmd_initializer): Likewise.
20602         (class_hint_flags): Likewise.
20603         (class_initializer): Likewise.
20604         (synthesize_tinfo_var): Likewise.
20605         (create_real_tinfo_var): Likewise.
20606         (create_pseudo_type_info): Likewise.
20607         (get_vmi_pseudo_type_info): Likewise.
20608         (create_tinfo_types): Likewise.
20609         (emit_support_tinfos): New global function.
20610         (tinfo_decl_p): New global predicate.
20611         (emit_tinfo_decl): New global function.
20612         * class.c (set_rtti_entry): Generalize for old and new rtti.
20613         (build_vtbl_initializer): Likewise.
20614         * decl2.c (finish_file): Likewise.
20616 2000-01-27  Jim Wilson  <wilson@cygnus.com>
20618         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
20619         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
20621 2000-01-27  Mike Stump  <mrs@wrs.com>
20623         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
20624         for scopes.
20626 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
20628         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
20630 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
20632         * optimize.c (calls_setjmp_r): Supply new argument
20633         to special_function_p.
20635 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20637         * call.c: PROTO -> PARAMS.
20638         * class.c: Likewise.
20639         * cp-tree.h: Likewise.
20640         * cvt.c: Likewise.
20641         * decl.c: Likewise.
20642         * decl.h: Likewise.
20643         * decl2.c: Likewise.
20644         * dump.c: Likewise.
20645         * errfn.c: Likewise.
20646         * error.c: Likewise.
20647         * except.c: Likewise.
20648         * expr.c: Likewise.
20649         * init.c: Likewise.
20650         * input.c: Likewise.
20651         * lex.c: Likewise.
20652         * lex.h: Likewise.
20653         * method.c: Likewise.
20654         * optimize.c: Likewise.
20655         * parse.y: Likewise.
20656         * pt.c: Likewise.
20657         * repo.c: Likewise.
20658         * rtti.c: Likewise.
20659         * search.c: Likewise.
20660         * semantics.c: Likewise.
20661         * spew.c: Likewise.
20662         * tree.c: Likewise.
20663         * typeck.c: Likewise.
20664         * typeck2.c: Likewise.
20665         * xref.c: Likewise.
20667 2000-01-25  Richard Henderson  <rth@cygnus.com>
20669         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
20671 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
20673         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
20674         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
20675         (struct vcall_offset_data_s): New type.
20676         (dfs_vcall_offset_queue_p): New function.
20677         (dfs_build_vcall_offset_vtbl_entries): Likewise.
20678         (build_vcall_offset_vtbl_entries): Likewise.
20679         (layout_vtable_decl): Likewise.
20680         (num_vfun_entries): Likewise.
20681         (num_extra_vtbl_entries): Add the entries for vcall offsets.
20682         (build_vtbl_initializer): Likewise.
20683         (dfs_finish_vtabls): Use layout_vtable_decl.
20684         (modify_one_vtables): Always duplicate vtables under the new ABI.
20685         (finish_struct_1): Use layout_vtable_decl.
20687 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20689         * decl.c (member_function_or_else): Change third arg from a format
20690         specifier to an `enum overload_flags'.  Callers changed.
20692 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
20694         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
20695         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
20696         build_const_cast, get_delta_difference, check_return_expr): Avoid
20697         ANSI string concatenation usage.
20699 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
20701         * class.c (layout_class_type): Put the fields required to make a
20702         class non-empty at the end, not the beginning, of the TYPE_FIELDs
20703         list.
20705 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
20707         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
20708         template.
20710         * decl2.c (mark_used): Do instantiate inlines that have been
20711         explicitly instantiated.
20713 2000-01-24  Richard Henderson  <rth@cygnus.com>
20715         * call.c (build_over_call): Use expand_tree_builtin.
20716         * typeck.c (build_function_call_real): Likewise.
20717         (build_binary_op_nodefault): Handle unordered compares.
20719 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
20721         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
20722         cp_tree_index values.
20723         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
20724         New global node #defines for them.
20725         * rtti.c (call_void_fn): Replace with ...
20726         (build_runtime_decl): ... new static function.
20727         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
20728         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
20729         (build_dynamic_cast_1): Always produce correctly typed result.
20730         Explicitly produce type_info addresses. Use dynamic_cast_node.
20731         * exception.cc (__throw_bad_cast): Return `void *'.
20732         (__throw_bad_typeid): Return `const type_info &'.
20734 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
20736         * cp-tree.h (get_vtable_decl): Prototype new function.
20737         * class.c (get_vtable_decl): New function. Broken out from ...
20738         (build_vtable): ... here. Use it.
20739         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
20740         by get_vtable_decl.
20742 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
20744         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
20745         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
20746         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
20747         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
20748         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
20749         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
20750         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
20751         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
20752         (CPTI_TINFO_VAR_ID): New enumeration.
20753         (__tp_desc_type_node, __access_mode_type_node,
20754         __bltn_desc_type_node, __user_desc_type_node,
20755         __class_desc_type_node, __ptr_desc_type_node,
20756         __attr_desc_type_node, __func_desc_type_node,
20757         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
20758         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
20759         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
20760         enum_desc_type_node, class_desc_type_node,
20761         si_class_desc_type_node, vmi_class_desc_type_node,
20762         ptmd_desc_type_node, base_desc_type_node): New #defines.
20763         (tinfo_fn_id, tinfo_fn_type): Rename to ...
20764         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
20765         (tinfo_var_id): New enumeration.
20766         (DECL_TINFO_FN_P): Augment comment.
20767         * decl.c (cp_global_trees): Adjust documentation.
20768         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
20769         tinfo_decl_type and tinfo_var_id.
20770         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
20771         (build_typeid): Remove unused variable.
20772         (get_tinfo_var): Use tinfo_var_id.
20773         (tinfo_name): New static function.
20774         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
20775         (tinfo_from_decl): Likewise.
20776         (get_base_offset): New static function, broken out of
20777         expand_class_desc.
20778         (expand_si_desc): Use tinfo_name.
20779         (expand_class_desc): Likewise. Lose local static variable.
20780         Use base_desc_type_node. Use get_base_offset.
20781         (expand_ptr_desc): Use tinfo_name.
20782         (expand_attr_desc): Likewise.
20783         (expand_generic_desc): Likewise.
20785         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
20786         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
20788 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
20790         * cp-tree.h (__eprintf): Remove declaration.
20791         * tree.c (__eprintf): Remove definition.
20793 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
20794             Mark Mitchell  <mark@codesourcery.com>
20796         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
20797         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
20799 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
20801         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
20803 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
20805         * cp-tree.h (register_dtor_fn): New function.
20806         * decl.c (destroy_local_static): Rename to ...
20807         (register_dtor_fn): ... this.  Give it external linkage.
20808         (expand_static_init): Use it.
20809         * decl2.c (do_static_initialization): Likewise, if using
20810         __cxa_atexit.
20811         (do_static_destruction): Check that __cxa_atexit is not in use.
20812         (finish_file): Don't call do_static_destruction if using
20813         __cxa_atexit.
20815         * typeck.c (convert_arguments): Restore two-message error
20816         reporting.
20818 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
20820         Remap dynamic cast hint values to be consistent across ABIs.
20821         * search.c (dynamic_cast_base_recurse): Remap generated value.
20822         (get_dynamic_cast_base_type): Adjust documentation.
20823         * tinfo.h (__user_type_info::dyncast): Likewise.
20824         (__user_type_info::find_public_subobj): Remap BOFF meaning.
20825         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
20826         (__class_type_info::do_dyncast): Likewise.
20827         (__class_type_info::do_find_public_subobj): Likewise.
20828         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
20830 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
20832         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
20834         * typeck2.c (incomplete_type_error): Restore previous
20835         cp_error and cp_error_at call sequence.
20837 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
20839         * class.c (dump_class_hierarchy): Make format agree with argument;
20840         cast pointer to unsigned long and print with %lx.
20842 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
20844         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
20846         * typeck.c (composite_pointer_type, common_type,
20847         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
20848         build_function_call_real, convert_arguments,
20849         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
20850         build_unary_op, mark_addressable, build_compound_expr,
20851         build_static_cast, build_reinterpret_cast, build_const_cast,
20852         build_c_cast, build_modify_expr, get_delta_difference,
20853         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
20854         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
20855         into a single one.
20856         * typeck2.c (readonly_error, abstract_virtuals_error,
20857         process_init_constructor, check_for_new_type): Likewise.
20859 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
20861         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
20862         VAR_DECLs.
20864 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
20866         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
20867         (build_x_typeid): Likewise.
20868         (get_tinfo_fn): Likewise.
20869         (get_tinfo_fn_unused): Rename to ...
20870         (get_tinfo_decl): ... here.
20871         * rtti.c (build_headof): Replace logic error with assertion.
20872         (get_tinfo_fn_dynamic): Rename to ...
20873         (get_tinfo_decl_dynamic): ... here. Make static. Use
20874         complete_type_or_else.
20875         (build_x_typeid): Move into ...
20876         (build_typeid): ... here. Adjust call to
20877         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
20878         throw_bad_typeid expression.
20879         (get_tinfo_fn_unused): Rename to ...
20880         (get_tinfo_decl): ... here. Adjust comment.
20881         (get_tinfo_fn): Delete.
20882         (tinfo_from_decl): New static function.
20883         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
20884         (get_typeid): Use complete_type_or_else.
20885         (build_dynamic_cast_1): Adjust calls to
20886         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
20887         * parse.y (primary): Adjust call to build_typeid.
20888         * except.c (build_eh_type_type_ref): Adjust call to
20889         get_tinfo_decl. Mark as used.
20890         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
20891         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
20892         * parse.c: Regenerated.
20894 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
20896         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
20897         calling convention.
20898         (resolves_to_fixed_type_p): Document calling convention.
20899         * rtti.c (build_x_typeid): Initialize NONNULL.
20901         * cp-tree.h (build_shared_int_cst): New function.
20902         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
20903         * class.c (modify_vtable_entry): Likewise.
20904         (add_virtual_function): Split out code to generated shared
20905         INTEGER_CSTs to build_share_int_cst.
20906         (modify_all_vtables): Handle all the overridden functions here.
20907         Add overridden functions from non-primary virtual bases to the
20908         primary vtable.
20909         (finish_struct_1): Adjust call to modify_all_vtables.  Add
20910         overridden functions from non-primary bases to the vtable.
20911         * tree.c (build_shared_int_cst): New function.
20913         * cp-tree.h (scratchalloc): Remove.
20914         (build_scratch_list): Likewise.
20915         * call.c (convert_class_to_reference): Replace build_scratch_list
20916         and build_expr_list with build_tree_list.
20917         (add_candidate): Replace scratchalloc with expralloc.  Note memory
20918         leak.
20919         (build_user_type_conversion_1):  Replace build_scratch_list
20920         and build_expr_list with build_tree_list.
20921         (build_new_op): Likewise.
20922         (build_op_delete_call): Likewise.
20923         (convert_like): Likewise.
20924         * cvt.c (ocp_convert): Likewise.
20925         * decl.c (start_decl): Likewise.
20926         (start_function): Likewise.
20927         (finish_destructor_body): Likewise.
20928         (maybe_build_cleanup_1): Likewise.
20929         * decl2.c (reparse_decl_as_expr): Likewise.
20930         * init.c (perform_member_init): Likewise.
20931         (expand_cleanup_for_base): Likewise.
20932         (build_builtin_delete_call): Likewise.
20933         (build_new_1): Likewise.
20934         (build_delete): Likewise.
20935         * method.c (do_build_assign_ref): Likewise.
20936         * parse.y (already_scoped_stmt): Likewise.
20937         (nontrivial_exprlist): Likewise.
20938         (net_initializer): Likewise.
20939         (initlist): Likewise.
20940         * parse.c: Regenerated.
20941         * rtti.c (build_x_typeid): Likewise.
20942         (build_dynamic_cast_1): Likewise.
20943         * typeck.c (build_x_compound_expr): Likewise.
20944         (build_static_cast): Likewise.
20945         (build_modify_expr): Likewise.
20947         * cp-tree.h (DECL_VINDEX): Add documentation.
20948         * class.c (build_vtable_entry): Likewise.
20949         (start_vtable): Add comment.
20950         (add_virtual_function): Replace pending_hard_virtuals with
20951         overridden_virtuals and pending_virtuals with new_virtuals.
20952         Replace redundant assignments with assertions.
20953         (check_for_override): Add comment.
20954         (check_bases_and_members): Replace pending_hard_virtuals with
20955         overridden_virtuals and pending_virtuals with new_virtuals.
20956         (create_vtbl_ptr): Likewise.
20957         (layout_class_type): Likewise.
20958         (finish_struct_1): Likewise.  Add comments.
20960 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
20962         * class.c (finish_struct_1): Replace redundant code with
20963         assertions.
20965         * cp-tree.h (flag_new_abi): Move.
20966         (flag_use_cxa_atexit): Likewise.
20967         (flag_honor_std): Likewise.
20968         (flag_rtti): Likewise.
20969         (vbase_offsets_in_vtable_p): Define.
20970         (vptrs_present_everywhere_p): Likewise.
20971         (TYPE_CONTAINS_VPTR_P): Likewise.
20972         (dfs_walk_real): Declare.
20973         * class.c (build_vbase_pointer_fields): Check
20974         vbase_offsets_in_vtable_p.
20975         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
20976         BINFO_VPTR_FIELD.
20977         (build_vbase_offset_vtbl_entries): Simplify.
20978         (build_vbase_offset_vtbl_entries): Adjust.
20979         (build_vbase_pointer): Add ability to look up vbase offsets in
20980         vtable.
20981         (start_vtable): New function.
20982         (add_virtual_function): Use it.
20983         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
20984         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
20985         (build_vtbl_initializer): Take the type of the complete object as
20986         input.  Use it to correctly calculate vbase offsets.
20987         (dfs_finish_vtbls): Pass the complete type to
20988         build_vtbl_initializer.
20989         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
20990         (create_vtable_ptr): Create a vtable even if there are no
20991         new virtual functions, under the new ABI.
20992         (finish_struct_1): Likewise.
20993         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
20994         * decl.c (exapnd_static_init): Remove call to
20995         preserve_initializer.
20996         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
20997         vtables.
20998         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
20999         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21000         (construct_virtual_bases): Don't initialize virtual base pointers
21001         under the new ABI.
21002         (build_aggr_init): Clean up comment.
21003         (expand_aggr_init_1): Likewise.
21004         * rtti.c (expand_class_desc): Store the virtual function table
21005         index where the vbase offset lives in the offset field.
21006         * search.c (dfs_walk_real): Make it global.
21007         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21008         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21010         * tinfo.h (USItype): Make it signed under the new ABI.
21011         * tinfo.cc (convert_to_base): New function.  Encapsulate base
21012         conversion logic here.
21013         (__class_type_info::do_upcast): Use it.
21014         (__class_type_info::do_dyncast): Likewise.
21015         (__class_type_info::do_find_public_subobj): Likewise.
21017         * init.c (construct_virtual_bases): Don't look up the addresses of
21018         virtual bases at run-time.
21020         * class.c (build_vbase_pointer): Relocate.
21021         (build_vbase_pointer_fields): Likewise.
21022         (dfs_build_vbase_offset_vtbl_entries): Likewise.
21023         (build_vbase_offset_vtbl_entries): Likewise.
21025         * decl.c (init_decl_processing): Complain if -fnew-abi
21026         -fno-vtable-thunks is used.
21028         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21029         flag_new_abi.
21031 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
21033         * cp-tree.h (num_extra_vtbl_entries): New function.
21034         (size_extra_vtbl_entries): Likewise.
21035         (dfs_vtable_path_unmark): Likewise.
21036         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21037         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21038         * class.c (num_extra_vtbl_entries): New function.
21039         (size_extra_vtbl_entries): Likewise.
21040         (dfs_build_vbase_offset_vtbl_entries): New function.
21041         (build_vbase_offset_vtbl_entries): Likewise.
21042         (build_vtbl_initializer): Use it.
21043         (finish_struct_1): Adjust vtable sizes (using
21044         num_extra_vtbl_entries).
21045         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21046         THUNK_DECL is non-NULL before expanding it.
21047         * init.c (expand_virtual_init): Adjust the vtable pointer by
21048         size_extra_vtbl_entries before storing it.
21049         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21050         Handle TREE_LIST parameters here, not in the dfs_* functions.
21051         (dfs_unmarked_real_bases_queue_p): Adjust.
21052         (dfs_marked_real_bases_queue_p): Likewise.
21053         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21054         (dfs_vtable_path_marked_real_bases_queue_p): New function.
21055         (dfs_vtable_path_unmark): Likewise.
21057 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
21059         * optimize.c (copy_body_r): Clear the operand three of a
21060         TARGET_EXPR when copying it.
21062 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
21064         * method.c (build_decl_overload_real): Check whether we are in ::
21065         before returning __builtin_new/delete.
21067 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
21069         * pt.c (tsubst_friend_function): Improve comment.
21070         (instantiate_decl): Avoid crashing when a "nested" function is
21071         instantiated from the top level.
21073         * dump.c (dqeueue_and_dump): Dump
21074         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
21076 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21078         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
21080 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
21082         * g++spec.c (lang_specific_driver): Add -fnew-abi if
21083         ENABLE_NEW_GXX_ABI defined.
21084         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
21085         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
21086         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
21088 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
21090         * decl.c (start_cleanup_fn): Call pushdecl.
21092         * call.c (convert_class_to_reference): Fix typos.
21093         (build_conditional_expr): Handle errors gracefully.
21094         * class.c (push_nested_class): Likewise.
21095         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
21096         (DECL_THIS_EXTERN): Use it.
21097         (DECL_THIS_STATIC): Likewise.
21098         * cvt.c (convert_to_void): Handle errors gracefully.
21099         (build_expr_type_conversion): Likewise.
21100         * decl.c (maybe_push_decl): Likewise.
21101         (start_decl_1): Likewise.
21102         (require_complete_types_for_parms): Likewise.
21103         * parse.y (structsp): Likewise.
21104         (base_class): Likewise.
21105         * parse.c: Regenerated.
21106         * pt.c (finish_member_template_decl): Likewise.
21107         * typeck.c (decay_conversion): Likewise.
21109         * cp-tree.h (dfs_skip_vbases): New function.
21110         (find_vbase_instance): Likewise.
21111         * class.c (determine_primary_base): Allow a nearly empty base to
21112         serve as a primary base class under the new ABI.
21113         (get_class_offset_1): Rename to ...
21114         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
21115         messages here.
21116         (get_class_offset): Use it.  Issue error messages here.
21117         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
21118         find the right copies of virtual bases.
21119         (fixup_vtable_deltas1): Rename to ...
21120         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
21121         bases as primary bases.
21122         (fixup_vtable_deltas): Remove.
21123         (override_one_vtable): Handle virtual bases as primary bases.
21124         (merge_overrides): Likewise.
21125         (finish_struct_1): Likewise.
21126         (dump_class_hierarchy): Dump primary-ness of bases as well.
21127         * search.c (mark_primary_bases): Use a pre-order traversal to
21128         handle primary virtual bases.
21129         (dfs_skip_vbases): New fiunction.
21130         (expand_upcast_fixups): Adjust to handle primary virtual bases.
21131         (fixup_virtual_upcast_offsets): Likewise.
21132         (fixup_all_virtual_upcast_offsets): Likewise.
21133         (dfs_find_vbase_instances): New function.
21134         (find_vbase_instance): Likewise.
21136 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
21138         * lex.c (DIR_SEPARATOR): Delete macro.
21140 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
21142        * decl2.c (lang_decode_option): Handle automatic line wrapping
21143        option.
21145 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
21147         * friend.c (do_friend): Don't resolve scopes when processing
21148         template declarations, even if the qualifying scope doesn't
21149         involve template parameters.
21151 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
21153         * class.c (dfs_modify_vtables_queue_p): Remove.
21154         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
21155         and dfs_marked_real_bases_queue_p instead of
21156         dfs_modify_vtables_queue_p.
21158         * class.c (build_vbase_path): Simplify.
21159         (dfs_propagate_binfo_offsets): New function.
21160         (propagate_binfo_offsets): Use it.
21161         (remove_base_field): Simplify.
21162         (dfs_set_offset_for_vbases): Remove.
21163         (dfs_set_offset_for_shared_vbases): New function.
21164         (dfs_set_offset_for_unshared_vbases): Likewise.
21165         (layout_virtual_bases): Use them.
21166         (layout_basetypes): Don't call propagate_binfo_offsets.
21167         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
21168         for the vbases.
21170         * class.c (build_base_field): New function, split out from ...
21171         (build_base_fields): ... here.  Use it.  Allocate primary bases
21172         first, under the new ABI.
21173         (get_vtable_entry): Remove.
21174         (remove_base_field): New function, split out from ...
21175         (remove_base_fields): ... here.  Adjust since primary bases come
21176         first under the new ABI.
21178         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
21179         (initialize_vtbl_ptrs): New function.
21180         (expand_indirect_vtbls_init): Change prototype.
21181         (convert_pointer_to_vbase): Declare.
21182         * init.c (expand_direct_vtbls_init): Remove.
21183         (dfs_initialize_vtbl_ptrs): New function.
21184         (initialize_vtbl_ptrs): Likewise.
21185         (emit_base_init): Use initialize_vtbl_ptrs.
21186         * search.c (convert_pointer_to_vbase): Make it global.
21187         (expand_indirect_vtbls_init): Remove vtable initialization code.
21188         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
21190         * class.c (dfs_finish_vtbls): New function.
21191         (finish_vtbls): Use it.
21192         (dump_class_hierarchy): New function.
21194         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
21195         (BINFO_VBASE_PRIMARY_P): New macro.
21196         (BINFO_VIRTUALS): Add to documentation.
21197         (SET_BINFO_PRIMARY_MARKED_P): Remove.
21198         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21199         (dfs_mark_primary_bases_queue_p): Likewise.
21200         (dfs_unmarked_real_bases_queue_p): New function.
21201         (dfs_marked_real_bases_queue_p): Likewise.
21202         * search.c (dfs_mark_primary_bases): Adjust.
21203         (mark_primary_bases): Likewise.
21204         (get_shared_vbase_if_not_primary): New function.
21205         (dfs_unmarked_real_bases_queue_p): Likewise.
21206         (dfs_marked_real_bases_queue_p): Likewise.
21207         (dfs_get_pure_virtuals): Simplify.
21208         (get_pure_virtuals): Likewise.
21210 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21212         * lex.c: Include tm_p.h.
21214 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
21216         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
21218 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
21220         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
21221         * pt.c (instantiate_decl): Defer comdat templates that might not be
21222         needed.
21224         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
21225         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
21226         (finish_file): Likewise.
21228         * decl2.c (import_export_class): Undo 12/14 change.
21230         * error.c (dump_decl): operator new, not operatornew.
21232         * class.c (field_decl_cmp): A nontype is "greater" than a type.
21233         * search.c (lookup_field_1): Look for the last field with the
21234         desired name.
21236 2000-01-05  Nathan Sidwell  <nathan@acm.org>
21238         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
21239         FUNCTION_DECL.
21241 2000-01-05  Nathan Sidwell  <nathan@acm.org>
21243         * typeck.c (build_static_cast): Don't strip target qualifiers
21244         when casting from a class.
21246 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21248         * class.c (warn_hidden): Initialize variable `fndecl'.
21250 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
21252         * decl.c (flag_isoc9x): New variable to be able to use code in
21253         c-common.c.  For now always zero.
21255 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
21257         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
21258         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
21259         or unshare_base_binfos for virtual bases here.
21260         * search.c (dfs_get_vbase_types): Do it here.
21261         (get_vbase_types): Adjust.
21263 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
21265         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
21266         (BINFO_PRIMARY_MARKED_P): Use flag 5.
21267         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21268         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21269         (unmark_primary_bases): Remove declaration.
21270         (unmarkedp): Declare.
21271         (dfs_vbase_unmark): Likewise.
21272         * class.c (determine_primary_base): Return immediately if there
21273         are no base classes.  Call mark_primary_bases here.
21274         (modify_all_direct_vtables): Remove.
21275         (modify_all_indirect_vtables): Remove.
21276         (dfs_modify_vtables_queue_p): New function.
21277         (dfs_modify_vtables): New function.
21278         (modify_all_vtables): Use them.
21279         (build_base_fields): Build FIELD_DECLs for primary virtual base
21280         classes.
21281         (create_vtable_ptr): Don't call determine_primary_base here.
21282         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
21283         (dfs_set_offset_for_vbases): ... this.
21284         (layout_virtual_bases): Use it.
21285         (layout_class_type): Call determine_primary_base here.
21286         * search.c (unmarkedp): Make it global.
21287         (shared_marked_p): Simplify.
21288         (shared_unmarked_p): Likewise.
21289         (dfs_primary_bases_queue_p): Remove.
21290         (dfs_unmark_primary_bases): Likewise.
21291         (unmark_primary_bases): Likewise.
21292         (mark_primary_bases): Simplify.
21293         (get_pure_virtuals): Don't call mark_primary_bases here.
21294         (dfs_vbase_unmark): New function.
21295         (get_vbase_types): Simplify.
21297         * class.c (struct base_info): Remove.
21298         (determine_primary_base): Take has_virtual_p rather than a
21299         base_info as input.  Don't calculate max_has_virtual.
21300         (finish_struct_bits): Remove max_has_virtual argument.
21301         (create_vtable_ptr): Remove max_has_virtual_p argument.
21302         (layout_virtual_bases): Remove max argument.
21303         (layout_basetypes): Likewise.
21304         (layout_class_type): Remove max_has_virtual_p argument.
21305         (finish_struct_1): Remove max_has_virtual.
21307         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
21308         (layout_basetypes): Remove.
21309         * class.c (propagate_binfo_offsets): Moved here from tree.c.
21310         Update to handle primary virtual bases.
21311         (remove_base_fields): New function, split out from
21312         layout_basetypes.
21313         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
21314         (layout_virtual_bases): New function, split out from
21315         layout_basetypes.  Update to handle primary virtual bases.
21316         (layout_basetypes): Moved here from tree.c.  Use
21317         remove_base_fields and layout_virtual_bases.
21318         * search.c (dfs_mark_primary_bases_queue_p): New function.
21319         (mark_primary_bases): Use it.
21320         * tree.c (CEIL): Remove.
21321         (propagate_binfo_offsets): Remove.
21322         (layout_basetypes): Remove.
21324 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
21326         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
21327         (BINFO_PRIMARY_MARKED_P): New macro.
21328         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21329         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21330         (mark_primary_bases): New function.
21331         (unmark_primary_bases): Likewise.
21332         * search.c (get_abstract_virtuals_1): Remove.
21333         (dfs_mark_primary_bases): New function.
21334         (mark_primary_bases): Likewise.
21335         (dfs_unmark_primary_bases): Likewise.
21336         (unmark_primary_bases): Likewise.
21337         (dfs_get_pure_virtuals): Likewise.
21339 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
21341         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
21342         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
21343         (modify_one_vtable): Adjust.
21344         (fixup_vtable_deltas1): Likewise.
21345         (override_one_vtable): Likewise.
21346         * search.c (get_abstract_virtuals_1): Likewise.
21347         (get_pure_virtuals): Likewise.
21348         (expand_upcast_fixups): Likewise.
21349         * tree.c (debug_binfo): Likewise.
21351         * class.c (build_vtable): Don't return a value.  Don't rebuild
21352         vtables for bases that have already been handled.
21353         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
21354         already been handled.
21355         (modify_one_vtable): Adjust accordingly.
21356         (fixup_vtable_deltas1): Likewise.
21357         (finish_struct_1): Likewise.
21359 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
21361         * call.c (build_new_method_call): Also check destructors.