* c-pragma.c (c_register_pragma): New.
[official-gcc.git] / gcc / cp / ChangeLog
blobf5b3fd267878d279227052b20c6915178939bfd0
1 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
3         * lex.c: Remove superfluous include of cpplib.h.
4         (CONSTRAINT): Define without conditions.
5         (init_cp_pragma): Use c_register_pragma.
7 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
9         * .cvsignore: Remove.
11 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
13         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
14           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
15           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
16           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
17           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
18           copyright header.
19         * lex.h: parse.y is dead, so don't mention it.  Also replace the
20           copyright header with the default GNU copyright header.
22 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
24         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
25         (lookup_name_namespace_only): Likewise.
26         (begin_only_namespace_names): Likewise.
27         (end_only_namespace_names): Likewise.
28         * decl.c (only_namespace_names): Remove.
29         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
30         (lookup_name_real): Do not check only_namespace_names.
31         (lookup_name_namespace_only): Remove.
32         (begin_only_namespace_names): Likewise.
33         (end_only_namespace_names): Likewise.
34         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
35         nested-name-specifiers more gracefully.
36         (cp_parser_class_or_namespace_name): Avoid looking up namespace
37         names when they cannot possibly appear.
38         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
39         (cp_parser_elaborated_type_specifier): Likewise.
40         (cp_parser_namespace_name): Only look for namespace names.
41         (cp_parser_lookup_name): Add is_namespace parameter.
42         (cp_parser_lookup_name_simple): Adjust call to
43         cp_parser_lookup_name.
45         * parser.c (cp_parser_dependent_type_p): Fix thinko.
47 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
49         * .cvsignore: Update.
51 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
53         * class.c (modify_vtable_entry): Remove unused variable.
54         (get_vcall_index): Always expect a non-thunk.
55         (update_vtable_entry_for_fn): Combine covariant adjustments, when
56         overriding a thunk. Pass get_vcall_index a non-thunk.
58         * decl2.c (finish_file): Mark undefined inlines as extern.
60 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
62         * cp-tree.def (RETURN_INIT): Remove.
63         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
64         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
65         (note_level_for_for): Remove.
66         (note_level_for_try): Likewise.
67         (note_level_for_catch): Likewise.
68         (finish_named_return_value): Likewise.
69         (do_pushlevel): Change prototype.
70         (pending_lang_change): Remove.
71         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
72         sk_for.
73         (note_level_for_for): Remove.
74         (note_level_for_try): Likewise.
75         (note_level_for_catch): Likewise.
76         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
77         * parser.c (cp_parser_context_free_list): Make it "deletable".
78         (cp_parser_template_argument): Remove misleading comment.
79         * pt.c (tsubst_expr): Remove RETURN_INIT code.
80         * semantics.c (genrtl_named_return_value): Remove.
81         (do_pushlevel): Take a scope kind as an argument.
82         (begin_if_stmt): Adjust.
83         (begin_while_stmt): Likewise.
84         (begin_for_stmt): Likewise.
85         (finish_for_init_stmt): Likewise.
86         (begin_switch_stmt): Likewise.
87         (begin_handler): Likewise.
88         (begin_compound_stmt): Likewise.
89         (finish_named_return_value): Remove.
90         (cp_expand_stmt): Remove RETURN_INIT case.
91         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
92         
93 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
95         PR c++/9112
96         * parser.c (cp_parser_direct_declarator): Handle erroneous
97         parenthesized declarators correctly.
99 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
101         * cp-tree.h (pending_lang_change): Declare.
103 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
105         * parser.c (cp_parser_context_free_list): New variable.
106         (cp_parser_context_new): Use it.
107         (cp_parser_error): Check return code from
108         cp_parser_simulate_error.
109         (cp_parser_simulate_error): Return a value.
110         (cp_parser_id_expression): Optimize common case.
111         (cp_parser_class_name): Likewise.
112         (cp_parser_class_specifier): Adjust call to
113         cp_parser_late_parsing_default_args.
114         (cp_parser_lookup_name): Optimize common case.
115         (cp_parser_late_parsing_for_member): Adjust call to
116         cp_parser_late_parsing_default_args.
117         (cp_parser_late_parsing_default_args): Add scope parameter.
118         (cp_parser_require): Avoid creating the error message unless it's
119         needed.
120         (cp_parser_parse_definitely): Place free'd contexts on the free
121         list.
123         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
125 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
127         * parser.c (cp_parser_parameter_declaration_clause): Treat system
128         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
130 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
132         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:  
133         GCC, not GNU CC.
135 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
137         * parse.y: Remove.
138         * spew.c: Likewise.
139         * Make-lang.in (gt-cp-spew.h): Remove.
140         * cp-tree.h (do_pending_lang_change): Remove.
141         (do_identifier): Change prototype.
142         (finish_id_expr): Remove.
143         * decl.c (lookup_name_real): Remove yylex variable.
144         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
145         * lex.c (init_cpp_parse): Remove.
146         (reduce_cmp): Likewise.
147         (token_cmp): Likewise.
148         (yychar): Likewise.
149         (lastiddecl): Likewise.
150         (token_count): Likewise.
151         (reduce_count): Likewise.
152         (yyhook): Likewise.
153         (print_parse_statistics): Likewise.
154         (do_pending_lang_change): Likewise.
155         (do_identifier): Remove parsing parameter.
156         * lex.h (lastiddecl): Remove.
157         (looking_for_typename): Remove.
158         (looking_for_template): Likewise.
159         (pending_lang_change): Likewise.
160         (yylex): Likewise.
161         * semantics.c (finish_id_expr): Remove.
162         
163         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
164         thread" correctly.
166 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
168         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
169         end, not the C front end.
171 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
173         * cp-tree.h (THUNK_TARGET): New macro.
174         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
175         (finish_thunk): Remove offset parms.
176         * class.c (find_final_overrider): Look through thunks.
177         (get_vcall_index): Use THUNK_TARGET.
178         (update_vtable_entry_for_fn): Look through thunks. Set covariant
179         fixed offset here. Adjust finish_thunk call.
180         (build_vtbl_initializer): Adjust finish_thunk calls.
181         * mangle.c (mangle_call_offset): Remove superfluous if.
182         (mangle_thunk): Adjust.
183         * method.c (make_thunk): Adjust.
184         (finish_thunk): Adjust.
185         (thunk_adjust): Remove assert.
186         (use_thunk): Use THUNK_TARGET
187         * dump1.c (cp_dump_tree): Adjust thunk dumping.
189         PR c++/9054
190         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
191         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
193 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
195         Remove traditional C constructs 4/n.
196         * decl2.c (grok_method_quals, warn_if_unknown_interface,
197         grok_x_components, cp_build_parm_decl, build_artificial_parm,
198         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
199         delete_sanity, check_member_template, check_java_method,
200         check_classfn, finish_static_data_member_decl, grokfield,
201         grokbitfield, grokoptypename, grok_function_init,
202         cplus_decl_attributes, constructor_name, defer_fn,
203         build_anon_union_vars, finish_anon_union, coerce_new_type,
204         coerce_delete_type, comdat_linkage, maybe_make_one_only,
205         key_method, import_export_vtable, import_export_class,
206         output_vtable_inherit, import_export_decl, import_export_tinfo,
207         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
208         set_guard, start_objects, finish_objects,
209         start_static_storage_duration_function,
210         finish_static_storage_duration_function, get_priority_info,
211         start_static_initialization_or_destruction,
212         finish_static_initialization_or_destruction,
213         do_static_initialization, do_static_destruction,
214         prune_vars_needing_no_initialization, write_out_vars,
215         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
216         add_using_namespace, merge_functions, ambiguous_decl,
217         lookup_using_namespace, lookup_using_namespace,
218         qualified_lookup_using_namespace, set_decl_namespace,
219         decl_namespace, current_decl_namespace, push_decl_namespace,
220         pop_decl_namespace, push_scope, pop_scope, add_function,
221         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
222         lookup_arg_dependent, do_namespace_alias,
223         validate_nonmember_using_decl, do_nonmember_using_decl,
224         do_toplevel_using_decl, do_local_using_decl,
225         do_class_using_decl, do_using_directive, check_default_args,
226         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
227         * parser.c (cp_parser_class_head): Use booleanss.
228         * decl.c (walk_globals, walk_vtables): Likewise.
229         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
230         walk_globals): Change return type from 'int' to 'bool'.
231         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
232         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
233         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
234         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
235         qualifier_flags, tinfo_base_init, generic_initializer,
236         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
237         dfs_class_hint_unmark, class_hint_flags, class_initializer,
238         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
239         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
240         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
241         * repo.c (repo_compile_flags, repo_template_declared,
242         repo_template_defined, repo_class_defined, repo_get_id,
243         repo_template_used, repo_vtable_used, repo_inline_used,
244         repo_tinfo_used, repo_template_instantiated, extract_string,
245         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
246         finish_repo): Likewise.
247         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
248         cxx_print_xnode): Likewise..
249         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
250         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
251         * cxxfilt.c (demangle_it, print_demangler_list, usage,
252         standard_symbol_characters, hp_symbol_characters, main, fatal):
253         Likewise. 
254         (strip_underscore):  Change type from 'int' to 'bool'.
255         (main): Use boolean constants.
257 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
259         Remove traditional C constructs 3/n.
260         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
261         build_up_reference, warn_ref_binding, convert_to_reference,
262         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
263         convert_to_void, convert, convert_force, build_type_conversion,
264         build_expr_type_conversion, type_promotes_to,
265         perform_qualification_conversions): Use C90 prototyping style.
266         * decl2.c (grok_array_decl): Use boolean constant.
267         (delete_sanity): Likewise.
268         * typeck.c (build_unary_op): Likewise.
269         * semantics.c (finish_switch_cond): Likewise.
270         * parser.c (cp_parser_direct_new_declarator): Likewise.
271         * init.c (build_new): Likewise.
273 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
275         * Make-lang.in (po-generated): Remove parse.c.
276         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
277         ($(srcdir)/cp/parse.h): Remove target.
278         ($(srcdir)/cp/parse.c): Likewise.
279         (gt-cp-parse.h): Likewise.
280         (gt-cp-parser.h): New target.
281         (c++.distclean): Do not remove parse.output.
282         (c++.maintainer-clean): Do not remove parse.c or parse.h.
283         (cp/spew.o): Remove target.
284         (cp/lex.o): Adjust dependencies.
285         (cp/pt.o): Likewise.
286         (cp/parse.o): Likewise.
287         (cp/TAGS): Do not mention parse.c.
288         (cp/parser.o): New target.
289         * NEWS: Mention the new parser.
290         * call.c (build_scoped_method_call): Simplify.
291         (build_method_call): Likewise.
292         (build_new_function_call): Adjust calls to add_function_candidate
293         and add_template_candidate.
294         (build_new_op): Improve handling of erroroneous operands.
295         (convert_default_arg): Remove circular argument processing.
296         (name_as_c_string): New function.
297         (build_new_method_call): Use it.
298         (perform_implicit_conversion): Use error_operand_p.
299         * class.c (finish_struct_anon): Use constructor_name_p.
300         (check_field_decls): Likewise.
301         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
302         (resolve_address_of_overloaded_function): Likewise.
303         (instantiate_type): Tweak pointer-to-member handling.
304         (get_primary_binfo): Remove incorrect assertion.
305         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
306         * cp-tree.h (DEFARG_TOKENS): New macro.
307         (default_arg): New structure.
308         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
309         (lang_tree_node): Add default_arg.
310         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
311         (type_info_ref_type): New macro.
312         (saved_scope): Make processing_explicit_instantiation a boolean.
313         (check_access): New field.
314         (unparsed_text): Remove.
315         (language_function): Remove unparsed_inlines.
316         (error_operand_p): New macro.
317         (lang_decl): Adjust pending_inline_info.
318         (DEFARG_POINTER): Remove.
319         (tag_types): Add typenames.
320         (lookup_ualified_name): Declare.
321         (lookup_name_real): Likewise.
322         (shadow_tag): Adjust prototype.
323         (get_scope_of_declarator): Declare it.
324         (process_next_inline): Remove it.
325         (check_for_missing_semicolon): Likewise.
326         (maybe_get_template_decl_from_type_decl): Declare it.
327         (finish_label_stmt): Adjust prototype.
328         (finish_non_static_data_meber): Declare it.
329         (finish_pseudo_destructor_call_expr): Rename to ...
330         (finish_pseudo_destructor_expr): ... this.
331         (finish_compound_literal): Declare it.
332         (begin_inline_definitions): Remove it.
333         (init_spew): Remove.
334         (peekyylex): Likewise.
335         (arbitrate_lookup): Likewise.
336         (frob_opname): Likewise.
337         (maybe_snarf_defarg): Likewise.
338         (add_defarg_fn): Likewise.
339         (do_pending_defargs): Likewise.
340         (done_pending_defargs): Likewise.
341         (unprocessed_defarg_fn): Likewise.
342         (replace_defarg): Likewise.
343         (end_input): Likewise.
344         (get_overloaded_fn): Likewise.
345         * cvt.c (convert_to_reference): Improve error handling.
346         * decl.c (lookup_name_real): Do not declare it static.
347         (maybe_push_to_top_level): Set check_access.
348         (identifier_type_value): Adjust call to lookup_name_real.
349         (lookup_qualified_name): New method.
350         (lookup_name_real): Remove special-case parsing code.
351         (lookup_name-nonclass): Adjust call to lookup_name_real.
352         (lookup_name_namespace_only): Likewise.
353         (lookup_name): Likewise.
354         (check_tag_decl): Return the type declared.
355         (shadow_tag): Likewise.
356         (register_dtor_fn): Tweak check_access.
357         (grokfndecl): Use constructor_name_p.
358         (get_scope_of_declarator): New function.
359         (grokdeclarator): Obscure tweaks for slightly different declarator
360         representations.
361         (start_method): Return error_mark_node to indicate failure.
362         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs. 
363         * decl2.c (constructor_name_full): Simplify.
364         (constructor_name): Use it.
365         (build_expr_from_tree): Adjust for changes to do new parser.
366         (push_scope): Improve robustness.
367         (validate_nonmember_using_decl): Process declarations, not names.
368         (do_class_using_decl): Likewise.
369         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
370         here.
371         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
372         * expr.c (cxx_expand_expr): Handle BASELINKs.
373         * init.c (member_init_ok_or_else): Issue more errors.
374         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
375         * lex.c: Do not include parse.h.
376         (yypring): Do not declare.
377         (yylval): Likewise.
378         (make_reference_declarator): Remove error-generating code.
379         (rid_to_yy): Remove.
380         (cxx_init): Do not call init_spew.
381         (yypring): Remove.
382         (check_for_missing_semicolon): Remove.
383         * lex.h (got_scope): Remove.
384         (got_object): Remove.
385         * method.c (hack_identifier): Use finish_non_static_data_member.
386         (implicitly_declare_fn): Adjust use of constructor_name.
387         * parser.c: New file.
388         * pt.c (parse.h): Do not include it.
389         (maybe_get_template_decl_from_template): Do not declare it.
390         (finish_member_template_decl): Tweak.
391         (begin_explicit_instantiation): Adjust for
392         processing_explicit_instantiation being boolean.
393         (end_explicit_instantiation): Likewise.
394         (maybe_process_partial_specialization): Tighten specialization
395         test.
396         (retrieve_local_specialization): Adjust ue of hash table.
397         (eq_local_specializations): New function.
398         (register_local_specialization): Likewise.
399         (push_template_decl_real): Remove unnecessary test.
400         (maybe_get_template_decl_from_type_decl): Don't make it static.
401         (for_each_template_parm_r): Handle TYPEOF_TYPE.
402         (tsubst_copy): Use retrieive_local_specialization to handle
403         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
404         Handle COMPONENT_REFs with pseudo-destructor-expressions.
405         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
406         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
407         (unify): Tweak handling of CONST_DECLs.
408         (regenerate_decl_from_template): Use push_nested_class.
409         (template_for_substitution): New funciton.
410         (instantiate_decl): Use it.  Register parameters as local
411         specializations.
412         * rtti.c (init_rtti_processing): Set type_info_ref_type.
413         (build_typeid): Use it.
414         (get_typeid): Likeise.
415         * search.c (accessible_p): Use check_access, not
416         flag_access_control.
417         (adjust_result_of_qualified_name_lookup): Pay attention to the
418         context_class.
419         * semantics.c (finish_asm_stmt): Adjust error handling.
420         (finish_label_stmt): Return the statement.
421         (finish_non_static_data_member): New function.
422         (finish_class_expr): Handle BASELINKs.
423         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
424         (finish_object_call_expr): Simplify handling during templates.
425         (finish_pseudo_destructor_call_expr): Rename to ...
426         (finish_pseudo_dtor_expr): ... this.
427         (finish_compound_literal): New function.
428         (begin_inline_definitions): Remove.
429         (finish_sizeof): Remove special template handling.
430         * spew.c: Do not include parse.h.
431         * tree.c (get_overloaded_fn): Remove.
432         * typeck.c (build_class_member_access_expr): Handle
433         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
434         (lookup_destructor): New function.
435         (finish_class_member_access_expr): Use it.
436         (convert_arguments): Simplify.
437         (build_unary_op): Handle BASELINKs.
438         
439 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
441         PR c++/4803
442         * decl2.c (mark_used): Defer inline functions.
443         (finish_file): Merge deferred_fns loops. Check all used
444         inline functions have a definition.
445         * method.c (make_thunk): Thunks are not inline.
447         PR c++/5116, c++/764
448         * call.c (build_new_op): Make sure template class operands are
449         instantiated.
451 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
453         PR C++/7964
454         * cp-tree.h (resolve_scoped_fn_name): Prototype.
455         * call.c (resolve_scoped_fn_name): New function. Deal with
456         more template expansion. Broken out of ...
457         * parse.y (parse_finish_call_expr): ... here. Call it.
458         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
459         resolve_scoped_fn_name and build_call_from_tree.
461         PR c++/9053
462         * decl.c (duplicate_decls): Templates may be disambiguated by
463         return type.
464         
465         PR c++/8702
466         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
467         conversion operators on failure.
469 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
471         Remove traditional C constructs 2/n.
472         * call.c (tourney, build_field_call, equal_functions, joust,
473         compare_ics, build_over_call, build_java_interface_fn_ref,
474         convert_like_real, op_error, build_object_call, resolve_args,
475         build_vfield_ref, check_dtor_name, build_scoped_method_call,
476         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
477         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
478         standard_conversion, reference_related_p,
479         reference_compatible_p, convert_class_to_reference,
480         direct_reference_binding, reference_binding,
481         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
482         add_template_conv_candidate, any_viable, any_strictly_viable,
483         build_this, splice_viable, print_z_candidates,
484         build_user_type_conversion, build_new_function_call,
485         conditional_conversion, build_conditional_expr, build_new_op,
486         build_op_delete_call, enforce_access, call_builtin_trap,
487         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
488         convert_default_arg, type_passed_as, convert_for_arg_passing,
489         in_charge_arg_for_name, is_properly_derived_from,
490         maybe_handle_implicit_object, maybe_handle_ref_bind,
491         source_type, add_warning, can_convert, can_convert_arg,
492         perform_implicit_conversion, can_convert_arg_bad,
493         initialize_reference, add_conv_candidate,
494         add_template_candidate_real, add_template_candidate): Ansify.
496 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
498         PR c++/8572
499         * cp-tree.h (grokoptypename): Add SCOPE parameter.
500         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
501         if in a template scope.
502         * parse.y (unoperator): Return the scope.
503         (operator_name): Adjust grokoptypename call.
505 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
507         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
508         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
509         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
511 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
513         * ChangeLog: Fix a typo.
514         * class.c: Fix comment typos.
515         * cp-tree.h: Likewise.
517 2002-12-18  Jason Merrill  <jason@redhat.com>
519         Handle anonymous unions at the tree level.
520         C++ ABI change: Mangle anonymous unions using the name of their
521         first named field (by depth-first search).  Should not cause
522         binary compatibility problems, though, as the compiler previously
523         didn't emit anything for affected unions.
524         * cp-tree.def (ALIAS_DECL): New tree code.
525         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
526         first field, not the largest.
527         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
528         push the decl, and write it out at namespace scope.
529         * decl.c (lookup_name_real): See through an ALIAS_DECL.
530         (pushdecl): Add namespace bindings for ALIAS_DECLs.
531         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
532         of a decl which doesn't have one.
533         * typeck.c (build_class_member_access_expr): Don't recurse if
534         we already have the type we want.
536 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
538         PR c++/8099
539         * friend.c (make_friend_class): Allow partial specialization
540         when declaration is not a template friend.
542 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
544         PR c++/3663
545         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
546         TREE_PROTECTED to created decl nodes.
548 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
550         * class.c (build_base_field): Do not set DECL_PACKED on the
551         FIELD_DECL.
553 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
555         * cp-tree.h (struct tree_srcloc): Use location_t.
556         (SOURCE_LOCUS): New.
557         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
559 2002-12-17  Jason Merrill  <jason@redhat.com>
561         * decl.c (finish_function): Also complain about no return in
562         templates.
563         * semantics.c (finish_return_stmt): Also call check_return_expr in 
564         templates.
565         * typeck.c (check_return_expr): In a template, just remember that we
566         saw a return.
568 2002-12-16  Jason Merrill  <jason@redhat.com>
570         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
571         of the CALL_EXPR.
573         * semantics.c (do_pushlevel): Call pushlevel after adding the
574         SCOPE_STMT.
575         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
576         * parse.y (function_body): Go back to using compstmt.
577         * decl.c (pushdecl): Skip another level to get to the parms level.
579         * call.c (build_new_method_call): Use is_dummy_object to determine
580         whether or not to evaluate the object parameter to a static member
581         function.
583 2002-12-14  Jason Merrill  <jason@redhat.com>
585         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
586         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
587         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
588         don't bother with an AGGR_INIT_EXPR.
589         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
590         just generate a new decl normally.  Take return slot parm.
591         * cp-tree.h: Adjust prototype.
593 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
595         PR C++/8031
596         * cvt.c (convert_to_pointer_force): Don't try comparing against 
597         erronous type.
599 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
601         * cp-tree.h: Have the multiple-include guards around
602         the entire file.
604 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
606         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
607         for SPEW_DEBUG.
608         (snarf_method): Same.
609         (snarf_defarg): Same.
611 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
613         PR c++/8372
614         * pt.c (tsubst_copy): Handle destructor names more correctly.
616 2002-12-10  Matt Austern   <austern@apple.com>
618         * cp-tree.h: get rid of needs_virtual_reinit bit.
619         
620 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
622         * NEWS: Document removal of in-class initialization extension for 
623         static data members of non-arithmetic, non-enumeration type.
624         * decl.c (check_static_variable_definition): Do not allow that
625         extension.
626         * decl2.c (grokfield): Do not call digest_init when processing
627         templates.
629 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
631         * error.c (dump_expr): Fix format specifier warning.
633 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
635         * class.c (finish_struct_1): Correct comment.
636         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
638 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
640         PR C++/8799
641         * error.c (dump_expr): Don't ever try to dump a non-existent
642         expression. 
644 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
646         Implement covariant returns.
647         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
648         (struct lang_decl_flags): Add this_thunk_p flag.
649         Rename vcall_offset to virtual_offset.
650         (struct lang_decl): Rename delta to fixed_offset.
651         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
652         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
653         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
654         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
655         (make_thunk): Add this_adjusting arg.
656         (finish_thunk): Declare.
657         (mangle_thunk): Add this_adjusting arg.
658         * class.c (get_vcall_index): Use base function for lookup.
659         (update_vtable_entry_for_fn): Generate covariant thunk.
660         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
661         (build_vtbl_initializer): Use base function for lookup.
662         Finish covariant thunk here. Adjust thunk generation.
663         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
664         Adjust thunk dumping.
665         * mangle.c (mangle_call_offset): New function.
666         (mangle_thunk): Adjust for covariant thunks.
667         * method.c (make_thunk): Adjust. Do not set name here.
668         (finish_thunk): New function. Set name here.
669         (use_thunk): Generate covariant thunks too.
670         (thunk_adjust): New function.
671         * search.c (covariant_return_p): Remove. Fold into ...
672         (check_final_overrider): ... here. Simplify.
673         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
675 2002-12-03  Jason Merrill  <jason@redhat.com>
677         PR c++/8674
678         * call.c (build_over_call): Check specifically for TARGET_EXPR
679         when eliding.
681         PR c++/8461, c++/8625
682         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
683         (cp_convert_parm_for_inlining): Remove.
684         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): 
685         Remove.
686         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
687         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
689         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
690         an ambiguous conversion.
692 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
694         PR c++/8688
695         * decl.c (reshape_init): Handle erroneous initializers.
697 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
699         PR c++/8720
700         * spew.c (remove_last_token): Make sure that last_chunk is set
701         correctly.
703         PR c++/8615
704         * error.c (dump_expr): Handle character constants with
705         TREE_OVERFLOW set.
706         
707 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
709         DR 180
710         * decl.c (grokdeclarator): Require class-key for all friend class.
711         Output the correct type and context in the error message.
713 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
715         PR c++/5919
716         * pt.c (unify): Use variably_modified_type_p to test validity of
717         template argument types.
718         
719         PR c++/8727
720         * cp-tree.h (lang_type_class): Add typeinfo_var.
721         (CLASSTYPE_TYPEINFO_VAR): New macro.
722         * rtti.c (get_tinfo_decl): Use it.
724         PR c++/8663
725         * init.c (expand_member_init): Always get the main variant of a
726         base class.
728 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
730         PR c++/8332
731         PR c++/8493
732         * decl.c (cxx_init_decl_processing): Use size_type_node, not
733         c_size_type_node.
734         * decl2.c (coerce_new_type): Likewise.
735         * except.c (do_allocate_exception): Likewise.
737 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
739         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
740         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
741         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
742         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
743         typeck2.c: Include coretypes.h and tm.h.
744         * Make-lang.in: Update dependencies.
746 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
748         PR c++/8227
749         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
750         (check_initializer): Validate the type of the initialized
751         variable, even if the initializer is absent.
752         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
753         
754         PR c++/8214
755         * typeck.c (convert_for_assignment): Do not use
756         decl_constant_value on the operand.
758         PR c++/8511
759         * pt.c (instantiate_decl): Handle template friends defined outside
760         of the class correctly.
762 2002-11-29  Joe Buck <jbuck@synopsys.com>
764         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
765         anonymous structs.
766         
767 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
769         * class.c (walk_subobject_offsets): Recur on binfos as well as on
770         types.
771         (layout_nonempty_base_or_field): Pass it a binfo when processing a
772         base class.
773         (layout_empty_base): Likewise.
774         (build_base_field): Likewise.
775         
776 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
778         * class.c (build_base_field): Make sure we get the canonical base
779         when descending through primary bases.
781 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
783         * decl.c (check_initializer): Don't error on initialisation of
784         a scalar with a brace-enclosed expression.
786 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
788         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
789         (template_parms_equal): Remove prototype.
790         * typeck.c (buuld_indirect_ref): Reformat.
792 2002-11-25  Jason Merrill  <jason@redhat.com>
794         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
795         and a DO_STMT.
797 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
799         * tree.c (cp_build_qualified_type_real): Correct handling of
800         array types.
801         * class.c (walk_subobject_offsets): Fix thinko.
802         (build_base_field): Record offsets of empty bases in primary
803         virtual bases.
804         (layout_class_type): Record offsets of empty bases in fields.
805         
806         * search.c (is_subobject_of_p_1): Fix thinko.
807         (lookup_field_queue_p): Likewise.
809 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
811         * class.c (layout_class_type): Reuse tail padding when laying out
812         virtual bases.
814 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
816         * rtti.c (qualifier_flags): Fix thinko.
818 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
820         Remove traditional C constructs 1/n.
821         * cp-tree.h (init_method, set_mangled_name_for_decl,
822         build_opfncall, hack_identifier, make_thunk, use_thunk,
823         synthesize_method, implicitly_declare_fn,
824         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
825         maybe_clone_body): Remove use of PARAMS.
827         * method.c (do_build_assign_ref, do_build_copy_constructor,
828         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
829         Likewise.
830         (synthesize_method): Use 'bool' type and constants instead of
831         'int'.
832         (locate_copy): Likewise.
833         (implicitly_declare_fn): Likewise.
835         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
836         Remove old-style declaration.
837         (maybe_clone_body): Use 'bool' type and constants.
839 2002-11-21  Glen Nakamura  <glen@imodulo.com>
841         PR c++/8342
842         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
843         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
844         of the branches of a COND_EXPR.
846 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
848         * pt.c (for_each_template_parm): Free allocated memory.
849         * search.c (is_subobject_of_p_1): New function.
850         (is_subobject_of_p): Avoid walking virtual bases multiple times.
852 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
854         * g++spec.c (lang_specific_spec_functions): New.
856 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
858         * ChangeLog: Follow spelling conventions.
859         * class.c: Likewise.
860         * decl2.c: Likewise.
862 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
864         * search.c (dfs_push_decls): Do not try to reorder elements
865         3..n of method_vec if method_vec has only two elements.
866         Reverse order of two tests to avoid accessing unallocated
867         memory.
869 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
871         * class.c (dfs_find_final_overrider): Adjust so that the most
872         derived object is a binfo, rather than a class type.
873         (find_final_overrider): Likewise.
874         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
875         (add_vcall_offset): Likewise.
877 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
879         PR c++/8389
880         * pt.c (instantiate_template): Push class scope for member
881         functions.
882         (get_mostly_instantiated_function_type): Likewise.  Don't call
883         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
884         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
885         * mangle.c (write_encoding, write_unqualified_name): Adjust.
887 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
889         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
890         vcall offfsets.  Split out ...
891         (add_vcall_offset): ... new function.
893         PR c++/8338
894         * pt.c (for_each_template_parm): Add htab parameter.
895         (process_partial_specialization): Adjust call.
896         (push_template_decl_real): Likewise.
897         (pair_fn_data): Add visited.
898         (for_each_template_parm_r): Avoid walking duplicates more than
899         once.
900         (uses_template_parms): Adjust call to for_each_template_parm.
902 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
904         * class.c (add_implicitly_declared_members): Put implicitly
905         declared functions at the end of TYPE_METHODs when -fabi-version
906         is at least 2.
908 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
910         * decl2.c (finish_file): Correct spelling.
912 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
914         * call.c (build_special_member_call): Do not try to lookup VTTs by
915         name.
916         * class.c (vtbl_init_data): Add generate_vcall_entries.
917         (get_vtable_decl): Do not look up virtual tables by name.
918         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
919         (set_primary_base): Do not set CLASSTYPE_RTTI.
920         (determine_primary_base): Likewise.
921         (get_matching_virtual): Remove.
922         (get_vcall_index): New function.
923         (update_vtable_entry_for_fn): Do not try to use virtual thunks
924         when they are not required.  Assign vcall indices at this point.
925         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
926         Do update dynamic_classes.
927         (build_vtt): Do not add VTTs to the symbol table.
928         (build_ctor_vtbl_group): Likewise.
929         (build_vtbl_initializer): Simplify handling of vcall indices.
930         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
931         for the most derived class.
932         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
933         the vtable.
934         * cp-tree.h (dynamic_classes): New macro.
935         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
936         (CLASSTYPE_RTTI): Remove.
937         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
938         (CLASSTYPE_VCALL_INDICES): New macro.
939         (CLASSTYPE_VTABLES): Likewise.
940         (BV_USE_VCALL_INDEX_P): Remove.
941         (build_vtable_path): Remove.
942         * decl2.c (finish_vtable_vardecl): Remove.
943         (key_method): Remove #if 0'd code.
944         (finish_vtable_vardecl): Rename to ...
945         (maybe_emit_vtables): ... this.
946         (finish_file): Use it.
947         * search.c (look_for_overrides_here): Update comment.
949 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
951         PR c/7353 redux
952         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
954 2002-10-30  Jason Merrill  <jason@redhat.com>
956         PR c++/8186
957         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
958         * call.c (convert_for_arg_passing): Set it.
959         * except.c (stabilize_throw_expr): Recurse for such an arg.
961 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
963         * cp-tree.h (lang_decl_flags): Remove init_priority.
964         (lang_decl): Add delta.
965         (GLOBAL_INIT_PRIORITY): Remove.
966         (THUNK_DELTA): Revise definition.
967         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
968         * dump.c (cp_dump_tree): Don't dump it.
970 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
972         PR c++/8160
973         * typeck2.c (process_init_constructor): Call complete_array_type.
975         PR c++/8149
976         * decl.c (make_typename_type): Issue errors about invalid results.
978 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
980         Core issue 287, PR c++/7639
981         * cp-tree.h (lang_type_class): Add decl_list field.
982         (CLASSTYPE_DECL_LIST): New macro.
983         (maybe_add_class_template_decl_list): Add declaration.
984         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
985         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
986         (maybe_add_class_template_decl_list): New function.
987         (add_implicitly_declared_members): Use it.
988         * decl.c (maybe_process_template_type_declaration): Likewise.
989         (pushtag): Likewise.
990         * friend.c (add_friend): Likewise.
991         (make_friend_class): Likewise.
992         * semantics.c (finish_member_declaration): Likewise.
993         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
994         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
995         to process members and friends in the order of declaration.
997 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
999         PR c++/8287
1000         * decl.c (finish_destructor_body): Create the label to jump to
1001         when returning from a destructor here.
1002         (finish_function_body): Rather than here.
1004 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
1006         PR c++/7266
1007         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
1008         SCOPE_REF is not null before dereferencing it.
1010 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
1012         * call.c (build_over_call): Use DECL_CONTEXT, not
1013         DECL_VIRTUAL_CONTEXT.
1014         * class.c (modify_vtable_entry): Don't mess with
1015         DECL_VIRTUAL_CONTEXT.
1016         (set_vindex): Remove.
1017         (set_primary_base): Remove vfuns_p parameter.
1018         (determine_primary_base): Likewise.
1019         (modify_all_vtables): Likewise.
1020         (layout_class_type): Likewise.  Adjust calls to other functions
1021         accordingly.
1022         (finish_struct_1): Adjust calls to modified functions.  Set
1023         DECL_VINDEX here.
1024         * cp-tree.h (lang_type_class): Remove vsize.
1025         (CLASSTYPE_VSIZE): Remove.
1026         (lang_decl): Remove thunks.
1027         (DECL_THUNKS): Adjust.
1028         (DECL_VIRTUAL_CONTEXT): Remove.
1029         (duplicate_decls): Don't copy it.
1030         * pt.c (build_template_decl): Don't set it.
1031         (tsubst_decl): Likewise.
1032         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
1034         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
1035         (build_vtable_entry): Remove.
1036         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
1037         (lang_decl): Add thunks.
1038         (DECL_THUNKS): New macro.
1039         * decl.c (duplicate_decls): Copy it.
1040         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
1041         * semantics.c (emit_associated_thunks): Simplify.
1043 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
1045         PR c++/7228
1046         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
1047         lang_type structure exists before accessing field.
1048         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
1049         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
1050         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
1051         * class.c (check_field_decls): Use new macros.
1052         * typeck2.c (process_init_constructor): Remove redundant check for
1053         existence of lang_type structure.
1055 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
1057         * class.c (end_of_base): New method.
1058         (end_of_class): Use it.  Check indirect virtual bases.
1060         * class.c (check_field_decls): Fix typo.
1062 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
1064         PR c++/8067
1065         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
1066         related variables.
1068         PR c++/7679
1069         * spew.c (next_token): Do not return an endless stream of
1070         END_OF_SAVED_INPUT tokens.
1071         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
1072         the cached token stream.
1073         (snarf_defarg): Likewise.
1075 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
1077         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
1078         variably_modified_type_p.
1079         * cp-tree.h: Remove prototype of variably_modified_type_p.
1080         * tree.c (variably_modified_type_p): Remove; now implemented
1081         in language-independent code.
1083 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
1085         PR c++/6579
1086         * spew.c (snarf_parenthesized_expression): New function.
1087         (snarf_block): Use it.
1089 2002-10-22  Richard Henderson  <rth@redhat.com>
1091         * method.c (use_thunk): Always compute vcall_value; assert that
1092         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
1093         for vcall thunks as well.
1095 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
1097         * class.c (empty_base_at_nonzero_offset_p): New function.
1098         (layout_nonempty_base_or_field): Do not check for conflicts when
1099         laying out a virtual base using the GCC 3.2 ABI.
1100         (build_base_field): Correct checking for presence of empty classes
1101         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
1103         * class.c (include_empty_classes): Use normalize_rli.
1104         (layout_class_type): Likewise.
1106         * decl.c (reshape_init): Tweak handling of character arrays.
1108         PR c++/8218
1109         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
1110         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
1111         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
1112         (check_field_decls): Likewise.
1113         (layout_class_type): Likewise.
1114         (finish_struct_1): Initialize it.
1115         (walk_subobject_offsets): Use it to prune searches.
1117 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
1119         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
1120         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
1121         TARGET_ASM_OUTPUT_MI_THUNK in comments.
1123 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
1125         * decl.c (start_decl): Point users of the old initialized-
1126         typedef extension at __typeof__.
1128 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
1130         * Make-lang.in (method.o): Depend on TARGET_H.
1131         * method.c (target.h): Include it.
1132         (use_thunk): Use target hooks.  Use vcall thunks, if available.
1134 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
1136         * class.c (base_derived_from): Make sure return value is a bool.
1138 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
1140         * class.c (find_final_overrider_data_s): Remove overriding_fn and
1141         overriding_base.
1142         (dfs_base_derived_from): New function.
1143         (base_derived_from): Likewise.
1144         (dfs_find_final_overrider): Use base_derived_from.
1145         (find_final_overrider): Adjust.
1147 2002-10-18  Jason Merrill  <jason@redhat.com>
1149         PR c++/8080
1150         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
1151         with condition decls in a template.
1153 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
1155         * class.c (add_method): Compare template parms too.
1157 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
1159         PR c++/7584
1160         * class.c (handle_using_decl): Allow the declaration used to be
1161         from an ambiguous base.
1163         * pt.c (convert_template_argument): Revert this change:
1164                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
1165                 * pt.c (convert_template_argument): Do not fold non-type
1166                 template rguments when inside a template.
1168         * init.c (expand_default_init): Handle brace-enclosed initializers
1169         correctly.
1171 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
1173         * mangle.c (write_expression): Correct handling of enumeration
1174         constants.
1175         (write_template_arg): Likewise.
1176         * pt.c (convert_template_argument): Do not fold non-type template
1177         arguments when inside a template.
1179         PR c++/7478
1180         * cvt.c (convert_to_reference): Allow references as the incoming
1181         type.
1183 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
1185         PR c++/7524
1186         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
1187         build_qualified_type.
1189 2002-10-15  Richard Henderson  <rth@redhat.com>
1191         * error.c (dump_expr): Use real_to_decimal directly, and with
1192         the new arguments.
1194 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
1196         * decl.c (reshape_init): Fix typo.
1198         * cp-tree.h (operator_name_info_t): Add arity.
1199         * lex.c (init_operators): Initialize it.
1200         * mangle.c (write_conversion_operator_name): New function.
1201         (write_unqualified_name): Use it.
1202         (write_template_args): Accept template arguments as a TREE_LIST.
1203         (write_expression): Adjust handling of qualified names to match
1204         specification.
1206 2002-10-15  Jason Merrill  <jason@redhat.com>
1208         * call.c (call_builtin_trap): New fn.
1209         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
1210         (build_call): Don't set current_function_returns_abnormally outside
1211         a function.
1213 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
1215         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
1216         clear CLASSTYPE_EMPTY_P.
1217         (build_base_field): Likewise.
1218         (build_base_fields): Likewise.
1219         (check_bases_and_members): Likewise.
1220         (create_vtbl_ptr): Likewise.
1221         (layout_class_type): Likewise.  Ensure that empty classes have
1222         size zero when used as base classes in the 3.2 ABI.
1223         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
1224         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
1225         parameter.
1226         (is_empty_class): Correct definition when using post-3.2 ABI.
1227         * cp-tree.h (lang_type_class): Add empty_p.
1228         (CLASSTYPE_EMPTY_P): New macro.
1230 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
1232         * init.c (build_delete): Do not apply save_expr for arrays.
1233         (build_vec_delete): Likewise.
1235 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
1237         * decl.c (layout_var_decl): Call layout_decl even for variables
1238         whose type is an array with unspecified bounds.
1240         PR c++/7176
1241         * lex.c (do_identifier): Add another option for the parsing
1242         parameter.
1243         * parse.y (do_id): Use it.
1245 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1247         PRs C++/6803, C++/7721 and C++/7803
1248         * decl.c (grokdeclarator): Gracefully handle template-name as
1249         decl-specifier.
1251 2002-10-11  Jason Molenda  <jmolenda@apple.com>
1253         * init.c (build_field_list): Provide uses_unions_p with a default
1254         value.
1256 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
1258         PR c++/5661
1259         * cp-tree.h (variably_modified_type_p): New function.
1260         (grokdeclarator) Tighten check for variably modified types as
1261         fields.
1262         * pt.c (convert_template_argument): Do not allow variably modified
1263         types as template arguments.
1264         * tree.c (variably_modified_type_p): New function.
1266         * NEWS: Document removal of "new X = ..." extension.
1267         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
1268         brace-enclosed initializers.
1269         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
1270         (initialize_local_var): Remove declaration.
1271         (expand_static_init): Likewise.
1272         * decl.c (next_initializable_field): New function.
1273         (reshape_init): Likewise.
1274         (check_initializer): Use them.  Build dynamic initializer for
1275         aggregates here too.
1276         (initialize_local_var): Simplify, and incorporate cleanup
1277         insertion code as well.
1278         (destroy_local_var): Remove.
1279         (cp_finish_decl): Tidy.
1280         (expand_static_init): Fold checks for whether or not a variable
1281         needs initialization into this function.  Simplify.
1282         * decl2.c (do_static_initialization): Simplify.
1283         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
1284         be done for us automatically.
1285         (expand_default_init): Handle brace-enclosed initializers
1286         correctly.
1287         (expand_aggr_init_1): Remove RTL-generation code.
1288         (build_vec_init): Remove "new X = ..." support.
1289         * parse.y (new_initializer): Likewise.
1290         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
1291         brace-enclosed initializer.
1292         (create_pseudo_type_info): Likewise.
1293         * typeck2.c (store_init_value): Don't try to handle digest_init
1294         being called more than once.
1295         (digest_init): Tidy handling of brace-enclosed initializers.
1297 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1299         * decl.c (typename_hash): Use htab_hash_pointer.
1301 2002-10-10  Jim Wilson  <wilson@redhat.com>
1303         * decl.c (duplicate_decls): Don't call decl_attributes.
1305 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
1307         PR c/7353
1308         * decl.c (start_decl): Unconditionally issue error for
1309         'typedef foo = bar'.
1310         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
1311         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
1313 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1315         * decl2.c (prune_vtable_vardecl): Delete unused function.
1317 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
1319         PR c++/7754
1320         * decl2.c (finish_anon_union): Do not expand anonymous unions when
1321         procesing template functions.
1322         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
1323         type. Call layout_decl.
1324         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
1326 2002-10-07  Richard Henderson  <rth@redhat.com>
1328         * decl2.c, pt.c: Revert c++/7754 fix.
1330 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1332         PR c++/7804
1333         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
1335 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
1337         PR c++/7931
1338         * pt.c (for_each_template_parm_r): Handle BASELINKs.
1340         PR c++/7754
1341         * decl2.c (finish_anon_union): Do not expand anonymous unions when
1342         procesing template functions.
1343         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
1344         type. Call layout_decl.
1345         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
1347 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
1349         PR c++/8006
1350         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
1351         template parameters.
1352         (globals): Add entity and need_abi_warning.
1353         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
1354         CLASSTYPE_TEMPLATE_INFO.
1355         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
1356         TYPE_TI_TEMPLATE.
1357         (write_prefix): Handle typename types correctly.
1358         (write_template_prefix): Handle template template parameters
1359         correctly.
1360         (start_mangling): Add entity parameter.
1361         (finish_mangling): Warn about names whose mangling will change.
1362         (mangle_decl_string): Adjust.
1363         (mangle_type_string): Likewise.
1364         (mangle_special_for_type): Likewise.
1365         (mangle_ctor_vtbl_for_type): Likewise.
1366         (mangle_thunk): Likewise.
1367         (mangle_guard_variable): Likewise.
1368         (mangle_ref_init_variable): Likewise.
1370 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
1372         PR c++/7188.
1373         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
1374         * cp-tree.h (emit_base_init): Rename to ....
1375         (emit_mem_initializers): ... this.
1376         (expand_member_init): Change prototype.
1377         * init.c (perform_member_init): Compute explicit, rather than
1378         requiring it as a parameter.
1379         (sort_member_init): Rename to ...
1380         (sort_mem_initializers): ... this.  Process bases and data members
1381         together.
1382         (sort_base_init): Remove.
1383         (emit_base_init): Rename to ...
1384         (emit_mem_initializers): ... this.
1385         (expand_aggr_vbase_init_1): Remove.
1386         (construct_virtual_bases): Rename to ...
1387         (construct_virtual_base): ... this.
1388         (expand_member_init): Rework handling of base initializers.
1389         * method.c (do_build_copy_constructor): Use
1390         finish_mem_initializers.
1391         * parse.y (member_init): Adjust calls to expand_member_init.
1392         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
1393         (tsubst_initializer_list): Use expand_member_init.
1394         * semantics.c (finish_mem_intiailizers): Simplify.
1396 2002-10-02  Matt Austern  <austern@apple.com>
1397         * decl.c (walk_vtables_r): Fixed typo that caused result to
1398         never get a nonzero value.
1400 2002-10-02  Roger Sayle  <roger@eyesopen.com>
1402         PR optimization/6627
1403         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
1404         from here, and move it to tree.h.
1405         * decl.c (cxx_init_decl_processing): If storing the vbit
1406         in function pointers, ensure that force_align_functions_log
1407         is atleast one.
1409 2002-10-02  Matt Austern  <austern@apple.com>
1411         * class.c (check_field_decls): Changed warning about const member
1412         variables so that it doesn't get issued for a class aggregate.
1414 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
1416         * decl.c (cp_finish_decl): Make sure array types are laid out,
1417         even if the array bounds are unknown.
1419 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
1421         * class.c (build_vtbl_initializer): Change build_c_cast
1422         to build1.
1424 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
1426         * decl.c (cp_finish_decl): Make sure array types are laid out,
1427         even if the array bounds are unknown.
1429         * decl.c (cp_finish_decl): Correct check for dynamic
1430         initialization of thread-local storage.
1432 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
1434         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
1435         overloaded.
1437 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
1439         * class.c (build_vtbl_initializer): Add cast.
1440         (add_vcall_offset_vtbl_entries_1):
1441         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
1443 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
1445         * class.c (walk_subobject_offsets): Correct the calculation of
1446         offsets for virtual bases.  Correct the counting of array
1447         elements.
1448         (layout_nonempty_base_or_field): Simplify.  Correct the
1449         calculation of offsets to be propagated through the binfo
1450         hierarchy.
1451         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
1452         Add the FIELD_DECL to TYPE_FIELDS.
1453         (build_base_fields): Adjust accordingly.
1454         (layout_virtual_bases): Use build_base_field.
1455         (end_of_class): Return a tree, not an integer.
1456         (warn_about_ambiguous_direct_bases): Rename to ...
1457         (warn_about_ambiguous_bases): ... this.
1458         (include_empty_classes): New function.
1459         (layout_class_type): Create an alternative version of the type to
1460         be used when as a base class type.  Do not call
1461         finish_record_layout until we are done laying out the class.
1462         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
1463         as_base.
1464         (CLASSTYPE_SIZE): Reimplement.
1465         (CLASSTYPE_SIZE_UNIT): Likewise.
1466         (CLASSTYPE_ALIGN): Likweise.
1467         (CLASSTYPE_USER_ALIGN): Likewise.
1468         (CLASSTYPE_AS_BASE): New macro.
1469         (DECL_INITIALIZED_P): Likewise.
1470         (extract_init): Remove prototype.
1471         (build_forced_zero_init): Rename to ...
1472         (build_zero_init): ... this.
1473         (force_store_init_value): Remove.
1474         * decl.c (obscure_complex_init): Remove.
1475         (duplicate_decls): Copy DECL_INITIALIZED_P.
1476         (check_initializer): Do not leave junk in DECL_INITIAL.
1477         (cp_finish_decl): Handle zero-initialization of entities with
1478         static storage duration.
1479         * expr.c (extract_init): Remove.
1480         * init.c (build_forced_zero_init): Remove.
1481         (build_zero_init): New function.
1482         (build_default_init): Use it.
1483         (build_field_list): Skip FIELD_DECLs for base subobjects.
1484         (push_base_cleanups): Likewise.
1485         * method.c (do_build_assign_ref): Likewise.
1486         (synthesize_exception_spec): Likewise.
1487         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
1488         (regenerate_decl_from_template): To not set DECL_INITIAL for a
1489         static data member whose initialization took place in its class.
1490         (instantiate_decl): Do not pass an initializer to cp_finish_decl
1491         in that situation.
1492         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
1493         (dfs_unuse_fields): Likewise.
1494         * tree.c (pod_type_p): Handle error_mark_node.
1495         (zero_init_p): Likewise.
1496         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
1497         subobjects.
1498         * typeck2.c (store_init_value): Remove #if 0'd code.
1499         (force_store_init_value): Remove.
1500         (process_init_constructor): Use build_zero_init.
1502 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
1504         PR c++/7788
1505         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
1507 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
1509         * cp-tree.h: Fix comment typos.
1510         * decl.c: Likewise.
1511         * pt.c: Likewise.
1513 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
1515         * cp/class.c (contains_empty_class_p): New method.
1516         (walk_subobject_offsets): Correct computation of field offset.
1517         (layout_empty_base): Correct placement of emtpy base classes.
1518         (layout_class_type): Warn about ABI changes.
1520 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
1522         * cp/class.c (layout_virtual_bases): Do not round the size of the
1523         type to a multiple of the alignment before laying out virtual bases.
1524         (layout_class_type): Correct handling of bit-fields that are wider
1525         than their type inside unions.  Round the size of the type to a
1526         even number of bytes when computing the size without virtual
1527         bases.
1528         * cp/cp-tree.h (abi_version_at_least): New macro.
1530 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
1532         * ChangeLog: Follow spelling conventions.
1533         * ChangeLog.2: Likewise.
1534         * call.c: Likewise.
1535         * class.c: Likewise.
1536         * cp-tree.h: Likewise.
1537         * cvt.c: Likewise.
1538         * decl.c: Likewise.
1539         * decl2.c: Likewise.
1540         * except.c: Likewise.
1541         * friend.c: Likewise.
1542         * g++spec.c: Likewise.
1543         * init.c: Likewise.
1544         * lex.c: Likewise.
1545         * mangle.c: Likewise.
1546         * method.c: Likewise.
1547         * operators.def: Likewise.
1548         * optimize.c: Likewise.
1549         * pt.c: Likewise.
1550         * rtti.c: Likewise.
1551         * search.c: Likewise.
1552         * semantics.c: Likewise.
1553         * spew.c: Likewise.
1554         * tree.c: Likewise.
1555         * typeck.c: Likewise.
1557 2002-09-18  Devang Patel  <dpatel@apple.com>
1559         * cp/cp-tree.h: New prototype for walk_vtabls().
1560         * cp/decl.c (walk_vtables_r): New function.
1561         (struct cp_binding_level): Add new members, namespaces,
1562         names_size and vtables.
1563         (add_decl_to_level): Add decl in namespaces or vtables
1564         chain, if conditions match.
1565         (walk_vtables): New function.
1566         (walk_namespaces_r): Travers separate namespace chain
1567         for namespace decls.
1568         (wrapup_globals_for_namespace): Use names_size instead
1569         of list_length().
1570         * cp/decl2.c (finish_file): Use walk_vtables() instead of
1571         walk_globals() to walk vtable decls.
1573 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
1575         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
1576         ICE with invalid pointers & references.
1578 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
1580         * Make-lang.in: Remove all references to the demangler.
1581         * cxxfilt.c: Moved to binutils.
1583 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
1585         PR c++/7718
1586         * pt.c (tsubst_decl): Remove assert.
1588         Remove DR 295 implementation.
1589         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
1590         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
1591         about ignoring volatile qualifiers.
1593         * search.c (lookup_member): Correct documentation.
1595 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
1597         * cp-tree.h (union lang_tree_node): Add chain_next option.
1599 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
1601         * parse.y (parse_finish_call_expr): Check lookup_member result.
1603         PR c++/7015
1604         * semantic.c (finish_asm_stmt): Fix operand/output_operands
1605         thinko.
1606         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
1608 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
1610         PR c++/7919
1611         * call.c (build_over_call): Convert this pointer for fns found by
1612         using decls.
1614 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
1616         * ChangeLog: Follow spelling conventions.
1617         * ChangeLog.1: Likewise.
1619 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
1621         PR c++/7768
1622         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
1624 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
1626         * error.c: Fix comment formatting.
1627         * except.c: Likewise.
1628         * expr.c: Likewise.
1629         * friend.c: Likewise.
1630         * g++spec.c: Likewise.
1631         * init.c: Likewise.
1632         * lex.c: Likewise.
1633         * mangle.c: Likewise.
1634         * method.c: Likewise.
1635         * optimize.c: Likewise.
1636         * pt.c: Likewise.
1637         * rtti.c: Likewise.
1638         * search.c: Likewise.
1639         * semantics.c: Likewise.
1640         * spew.c: Likewise.
1641         * tree.c: Likewise.
1642         * typeck.c: Likewise.
1643         * typeck2.c: Likewise.
1645 2002-09-13  Matt Austern  <austern@apple.com>
1647         PR C++/7828
1648         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
1649         * cp/call.c: Change call-by-const-reference mechanism to use
1650         non_cast_lvalue_p when deciding whether the create a temporary.
1651         We need a temporary when passing, e.g. (long) x by const ref.
1653 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
1655         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
1657 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
1659         * decl.c: Fix comment formatting.
1660         * decl2.c: Likewise.
1662 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
1664         * call.c: Fix comment formatting.
1665         * class.c: Likewise.
1666         * cp-lang.c: Likewise.
1667         * cp-tree.h: Likewise.
1668         * cvt.c: Likewise.
1670 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
1672         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
1673         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
1674         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
1675         minor adjustments (use version_string, eliminate yet another
1676         duplicate of xmalloc)
1678 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1680         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
1682 2002-09-05  Jason Merrill  <jason@redhat.com>
1684         * typeck2.c (add_exception_specifier): Only pedwarn for an
1685         incomplete type.
1686         (require_complete_eh_spec_types): New fn.
1687         (cxx_incomplete_type_diagnostic): Also support pedwarning.
1688         * typeck.c (complete_type_or_diagnostic): Likewise.
1689         * call.c (build_call): Call require_complete_eh_spec_types.
1690         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
1691         on an incomplete type.
1693 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
1695         * decl.c (start_cleanup_fn): Clear interface_only before
1696         start_function, restore it afterwards.
1698 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
1700         * cp-tree.h (finish_builtin_type): Remove.
1701         * decl2.c (finish_builtin_type): Move to common code.
1702         * decl.c (build_ptrmemfunc_type): Adjust.
1703         * rtti.c (create_pseudo_type_info): Adjust.
1704         (create_tinfo_types): Adjust.
1706 2002-08-31  Jason Merrill  <jason@redhat.com>
1708         * cp-lang.c (cp_expr_size): Allow initialization from a
1709         CONSTRUCTOR.
1711 2002-08-30  Richard Henderson  <rth@redhat.com>
1713         PR opt/7515
1714         * tree.c: Include target.h.
1715         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
1716         don't bind locally.
1717         * Makefile.in (tree.o): Update.
1719 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
1721         * class.c (layout_virtual_bases): Warn about bugs in G++ that
1722         result in incorrect object layouts.
1723         (layout_class_type): Likewise.
1725 2002-08-24  Matt Austern  <austern@apple.com>
1727         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
1728         are allowable.
1729         (real_lvalue_p): Update caller.
1730         (lvalue_p): Ditto.
1731         (non_cast_lvalue_or_else): New.
1732         * tree.h: Declare it.
1733         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
1735 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
1737         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
1738         and COND_EXPR specially; fix error message output.
1740 2002-08-22  Jason Merrill  <jason@redhat.com>
1742         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
1743         * semantics.c (nullify_returns_r): Likewise.
1745 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1747         Fix PR/7621
1748         * typeck.c (finish_class_member_access_expr): Diagnose cases where
1749         name lookup finds nothing.
1751 2002-08-15  Jason Merrill  <jason@redhat.com>
1753         * semantics.c (finish_then_clause): Remove redundant assignment.
1754         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
1755         extra binding level outside the if/switch statement.
1756         (finish_while_cond, finish_for_cond): Rewrite complex condition
1757         into the loop body.
1759 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
1761         * parse.y (sizeof, alignof, typeof): New non-terminals to
1762         increment skip_evaluation.  Replace terminals with them and
1763         decrement skip_evaluation at the end of rules using them.
1764         * decl2.c (mark_used): Don't assemble_external if
1765         skipping evaluation.
1767 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
1769         Fix PR/7504
1770         * parse.y (parse_finish_call_expr): Handle incomplete
1771         type used to name a scope.
1773 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1775         PR c++/7598
1776         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
1777         regression caused by my 2002-08-08 patch.
1779 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
1781         * decl.c (pushdecl_class_level): Honor requests to bind names to
1782         OVERLOADs.
1784 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1786         * decl2.c (build_call_from_tree): Fix uninitialized variable.
1787         * parse.y (parse_finish_call_expr): Likewise.
1788         * repo.c (old_args, old_dir, old_main): Const-ify.
1790 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
1792         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
1793         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
1794         * optimize.c (maybe_clone_body): Likewise.
1795         * pt.c (tsubst_enum): Likewise.
1796         (lookup_template_class): Likewise.
1797         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
1799 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
1801         * lang-specs.h: Remove -ansi.
1803 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
1805         * tree.c (maybe_dummy_object): Replace // with /* */
1807 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
1809         * call.c (standard_conversion): Use build_ptrmem_type.
1810         * cp-tree.h (build_ptrmem_type): New function.
1811         (adjust_result_of_qualified_name_lookup): Likewise.
1812         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
1813         static data members.
1814         (build_ptrmem_type): New function.
1815         (grokdeclarator): Do not use build_offset_type when encountering a
1816         qualified name.
1817         * parse.y (parse_finish_call_expr): Use
1818         adjust_result_of_qualified_name_lookup.
1819         * search.c (adjust_result_of_qualified_name_lookup): New function.
1820         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
1821         accessing OFFSET_TYPEs directly.
1823 2002-08-08  Mike Stump  <mrs@apple.com>
1825         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
1826         (type_decays_to): Likewise.
1827         * class.c (find_final_overrider): Likewise.
1828         (maybe_note_name_used_in_class): Likewise.
1829         * decl.c (current_tmpl_spec_kind): Likewise.
1830         (add_binding): Likewise.
1831         (push_class_binding): Likewise.
1832         (duplicate_decls): Likewise.
1833         (layout_var_decl): Likewise.
1834         (grokfndecl): Likewise.
1835         (grokdeclarator): Likewise.
1836         (check_default_argument): Likewise.
1837         * decl2.c (handle_class_head): Likewise.
1838         * error.c (dump_template_decl): Likewise.
1839         * init.c (build_offset_ref): Likewise.
1840         * pt.c (check_specialization_scope): Likewise.
1841         (determine_specialization): Likewise.
1842         (check_explicit_specialization): Likewise.
1843         (maybe_check_template_type): Likewise.
1844         (process_partial_specialization): Likewise.
1845         (check_default_tmpl_args): Likewise.
1846         (push_template_decl_real): Likewise.
1847         (convert_template_argument): Likewise.
1848         (try_class_unification): Likewise.
1849         (get_bindings_real): Likewise.
1850         (do_decl_instantiation): Likewise.
1851         * semantics.c (begin_function_definition): Likewise.
1852         (finish_member_declaration): Likewise.
1853         (check_multiple_declarators): Likewise.
1854         * typeck.c (comp_array_types): Likewise.
1855         (comptypes): Likewise.
1856         (expr_sizeof): Likewise.
1857         (build_binary_op): Likewise.
1858         (dubious_conversion_warnings): Likewise.
1859         (check_return_expr): Likewise.
1861 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
1863         * typeck.c (build_class_member_access_expr): Do not return
1864         error_mark_node when no error has occurred.
1866 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
1868         * typeck.c (build_component_addr): Remove.
1869         (build_unary_op): Just check it's not a bitfield, and then build
1870         an ADDR_EXPR.
1872 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
1874         * class.c (convert_to_base): Correct check for error_mark_node.
1875         (create_vtable_ptr): Remove unused VFUNS_P parm.
1877 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
1879         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
1881 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
1883         Rework build_component_ref.
1884         * call.c (build_vfield_ref): Do not go through build_component_ref.
1885         (build_field_call): Use build_class_member_access_expr.
1886         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
1887         (build_object_call): Likewise.
1888         * class.c (convert_to_base): New function.
1889         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
1890         (instantiate_type): Handle BASELINKs.
1891         * cp-tree.def (BASELINK): New tree code.
1892         * cp-tree.h (BASELINK_P): Reimplement.
1893         (SET_BASELINK_P): Remove.
1894         (BASELINK_BINFO): Reimplement.
1895         (BASELINK_FUNCTIONS): Likewise.
1896         (BASELINK_ACCESS_BINFO): Likewise.
1897         (BASELINK_OPTYPE): Likewise.
1898         (convert_to_base): New function.
1899         (name_p): Likewise.
1900         (build_object_ref): Remove.
1901         (build_component_ref_1): Likewise.
1902         (build_component_ref): Likewise.
1903         (build_x_component_ref): Likewise.
1904         (build_class_member_access_expr): New function.
1905         (finish_class_member_access_expr): Likewise.
1906         (build_ptrmemfunc_access_expr): Likewise.
1907         * decl.c (grokdeclarator): Handle BASELINKs.
1908         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
1909         finish_class_member_access_expr.
1910         (arg_assoc): Handle BASELINKs.
1911         (do_class_using_decl): Likewise.
1912         * error.c (dump_decl): Likewise.
1913         (dump_expr): Use build_ptrmemfunc_access_expr.
1914         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
1915         destructors.
1916         (build_throw): Use BASELINK_FUNCTIONS.
1917         * init.c (perform_member_init): Use
1918         build_class_member_access_expr.
1919         (build_offset_ref): Handle BASELINKs.  Use
1920         build_class_member_access_expr.
1921         * method.c (hack_identifier): Likewise.
1922         * parse.y (do_id): Use BASELINK, not TREE_LIST.
1923         (primary): Remove uses of build_object_ref.
1924         * pt.c (lookup_template_function): Handle BASELINKs.
1925         (resolve_overloaded_unification): Likewise.
1926         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
1927         (lookup_field): Use BASELINK, not TREE_LIST.
1928         (lookup_fnfiels): Likewise.
1929         (setup_class_bindings): Likewise.
1930         * semantics.c (finish_object_call_expr): Do not use
1931         build_method_call when we already know what function is being
1932         called.
1933         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
1934         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
1935         TREE_CHAIN.
1936         (name_p): New function.
1937         * typeck.c (build_object_ref): Remove.
1938         (build_component_ref_1): Likewise.
1939         (build_x_component_ref): Likewise.
1940         (build_class_member_access_expr): New function.
1941         (finish_class_member_access_expr): Likewise.
1942         (build_ptrmemfunc_access_expr): Likewise.
1943         (get_member_function_from_ptrfunc): Use
1944         build_ptrmemfunc_access_expr.
1945         (build_binary_op): Likewise.
1946         (build_unary_op): Likewise.
1947         (build_ptrmemfunc): Likewise.
1948         (pfn_from_ptrmemfunc): Likewise.
1949         * typeck2.c (build_m_component_ref): Adjust comment.
1951 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
1953         * Make-lang.in (CXX_C_OBJS): Update.
1954         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
1955         * cp-tree.h (cxx_decode_option): Remove.
1956         * decl2.c (compare_options, lang_f_options, unsupported_options,
1957         cxx_decode_option): Remove.
1959 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
1961         * typeck.c (build_x_unary_op): Handle pointer-to-member.
1963 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
1965         * class.c: Don't include obstack.h.
1966         (popclass):
1967         * decl2.c: Delete bogus comment.
1968         * error.c: Don't include obstack.h.
1969         * except.c: Likewise.
1970         (dump_type): Correct comment.
1971         * method.c: Don't include obstack.h.
1972         * tree.c: Likewise.
1974 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
1976         Fix PR/2213
1977         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
1978         expressions to pointer-to-data-member of pointer-to-member-functions.
1980 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
1982         * cvt.c (ocp_convert): Delete obsolete code.
1983         * parse.y (permanent_obstack): Delete declaration.
1984         * pt.c (permanent_obstack): Delete declaration.
1985         * repo.c (permanent_obstack): Delete declaration.
1986         (open_repo_file): Use xmalloc instead of permanent_obstack.
1987         (init_repo): Use xstrdup instead of permanent_obstack.
1989 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
1991         * cp-tree.h (VF_DERIVED_VALUE): Remove.
1992         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
1994 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
1996         PR 7470.
1997         C++ ABI change - vfunc ordering.
1998         * class.c (add_virtual_function): Remove.
1999         (dfs_modify_all_vtables): Take list of all declared
2000         virtuals. Assign all that are not in primary base.
2001         (check_for_override): Adjust comments.
2002         (create_vtable_ptr): Take single list of virtuals. Build chain
2003         of declared virtuals here.
2004         (layout_class_type): Take single list of virtuals. Adjust.
2005         (finish_struct_1): Keep virtuals on single list. Adjust.
2007 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
2009         * init.c (build_member_call): Use build_new_method_call, not
2010         build_method_call.
2012 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
2014         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
2016 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
2018         * call.c (build_method_call): Issue a more helpful error message
2019         about ambiguous method names.
2021 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
2023         * tree.c (build_shared_int_cst): Make cache file scope, and
2024         GTY it.
2026 2002-08-02  Jason Merrill  <jason@redhat.com>
2028         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
2029         (cp_expr_size): New fn.
2030         * call.c (build_over_call): Lose empty class hackery.
2031         (convert_arg_to_ellipsis): Promote non-POD warning to error.
2032         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
2034         * semantics.c (expand_body): Do tree optimization in the function
2035         context, too.
2037 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
2039         * cp-tree.h: Move all warning and flag declarations to c-common.h.
2040         * decl.c: Move all warning and flag variables to c-common.c.
2041         * decl2.c: Move all warning and flag variables to c-common.c.
2042         * lex.c (flag_digraphs): Remove.
2043         (warn_traditional): Now in c-common.c.
2045 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
2047         * call.c (build_field_call): Do not look up the field by name.
2048         (build_method_call): Simplify.
2049         (struct z_candidate): Add access_path and conversion_path.  Remove
2050         basetype_path.
2051         (convert_class_to_reference): Adjust use of
2052         add_function_candidate.
2053         (add_candidate): Add conversion_path argument.
2054         (add_function_candidate): Use it.
2055         (add_conv_dndidate): Likewise.
2056         (build_builtin_candidate): Likewise.
2057         (add_template_candidate_real): Add conversion_path argument.
2058         (add_template_conv_candidate): Likewise.
2059         (add_template_candidate): Likewise.
2060         (build_user_type_conversion_1): Use it.
2061         (build_new_function_call): Remove name lookup code.  Adjust use of
2062         add_template_candidate and add_function_candidate.
2063         (build_new_op): Likewise.
2064         (convert_like_real): Use build_special_member_call.
2065         (build_over_call): Use cand->conversion_path.
2066         (build_special_member_call): New method.
2067         (build_new_method_call): Remove name lookup code.
2068         * cp-tree.def (OFFSET_REF): Update documentation.
2069         (TEMPLATE_ID_EXPR): Likewise.
2070         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
2071         (BASELINK_OPTYPE): Likewise.
2072         (build_new_method_call): Adjust prototype.
2073         (build_special_member_call): New method.
2074         (build_baselink): New method.
2075         (build_offset_ref_call_from_tree): Likewise.
2076         (build_call_from_tree): Likewise.
2077         (finish_qualified_call_expr): Remove.
2078         (finish_call_expr): Adjust prototype.
2079         (build_x_function_call): Remove.
2080         * cvt.c (ocp_convert): Use build_special_member_call.
2081         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
2082         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
2083         CALL_EXPR.
2084         (build_offset_ref_call_from_tree): New function.
2085         (build_call_from_tree): Likewise.
2086         * init.c (expand_cleanup): Use build_special_member_call.
2087         (expand_default_init): Likewise.
2088         (build_member_call): Use finish_call_expr.
2089         (build_new_1): Use build_special_member_call.
2090         (push_base_cleanups): Likewise.
2091         * method.c (do_build_assign_ref): Likewise.
2092         * parse.y (template_id): Do not pass a COMPONENT_REF to
2093         lookup_template_function.
2094         (primary): Use parse_finish_call_epxr, not finish_call_expr.
2095         (parse_finish_call_expr): New function.
2096         * pt.c (lookup_template_function): Add assertions.
2097         * search.c (lookup_base): Allow T to be a binfo.
2098         (build_baselink): New function.
2099         (lookup_member): Use it.
2100         * semantics.c (finish_call_expr): Do not do name lookup.
2101         (finish_object_call_expr): Remove #if 0'd code.
2102         (finish_qualified_call_expr): Remove.
2103         * typeck.c (build_x_function_call): Remove.
2104         (build_static_case): Use build_special_member_call.
2105         * typeck2.c (build_functional_cast): Likewise.
2107 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
2109         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
2111 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
2113         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
2115 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
2117         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
2118         documentation.
2120 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
2122         * cp-tree.h: Comment typo fix.
2124 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
2126         * spew.c (space_for_token): Allocate zeroed memory for a new token
2127         chunk.
2129 2002-07-27  Roger Sayle  <roger@eyesopen.com>
2131         * decl.c (builtin_function_1): No need to explicitly mark
2132         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
2134 2002-07-27  Roger Sayle  <roger@eyesopen.com>
2136         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
2138 2002-07-26  Jason Merrill  <jason@redhat.com>
2140         * call.c (build_over_call): Likewise.
2141         (cp_convert_parm_for_inlining): New fn.
2142         (convert_for_arg_passing): New fn.
2143         (convert_default_arg, build_over_call): Use it.
2144         (type_passed_as): New fn.
2145         * pt.c (tsubst_decl): Use it.
2146         * decl2.c (cp_build_parm_decl): New fn.
2147         (build_artificial_parm): Use it.
2148         (start_static_storage_duration_function): Likewise.
2149         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
2150         (grokparms): Don't mess with DECL_ARG_TYPE.
2151         * typeck.c (convert_arguments): Use convert_for_arg_passing.
2152         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
2153         Define.
2154         * cp-tree.h: Declare new fns.
2156 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
2158         * cp-tree.h (flag_operator_names): Remove.
2159         * decl2.c (flag_operator_names): Remove.
2160         (lang_f_options): Remove operator-names.
2161         * lex.c (D_OPNAME): Remove.
2162         (reswords): Remove operator names.
2163         (rid_to_yy): Remove operator names.
2164         (init_reswords): No need to handle D_OPNAME.
2165         * spew.c (read_process_identifier): There are no operator
2166         names.
2168 2002-07-26  Jason Merrill  <jason@redhat.com>
2170         * dump.c (cp_dump_tree): Call c_dump_tree.
2171         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
2173 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
2175         * error.c (print_whitespace): Remove.
2176         * g++spec.c (LIBUNWIND): Move.
2177         * mangle.c (mangled_position, write_signed_number): Remove.
2179 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
2181         * decl2.c (cxx_decode_option): Similarly.
2183 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
2185         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
2186         (cxx_sizeof_or_alignof_type): Take a third argument.
2187         (cxx_sizeof): Adjust definition.
2188         (cxx_alignof): Likewise.
2189         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
2190         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
2191         complaining.
2192         (c_sizeof_nowarn): Remove definition.
2193         (build_unary_op): Use cxx_sizeof_nowarn.
2195 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
2197         * tree.c (cp_build_qualified_type_real): When copying
2198         pointer-to-method types, unshare the record that holds
2199         the cached pointer-to-member-function type.
2201 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
2203         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
2205 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
2207         Fix PR/7363:
2208         * typeck.c (cxx_sizeof_or_alignof_type): New function.
2209         (c_sizeof): Remove definition.
2210         (expr_sizeof): Use cxx_sizeof.
2211         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
2212         * decl.c (finish_destructor_body): Use cxx_sizeof.
2213         * semantics.c (finish_alignof): Likewise.
2214         (finish_alignof): Use cxx_alignof.
2215         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
2216         (cxx_sizeof_or_alignof_type): Declare.
2217         (my_friendly_assert): Move to ../c-common.h.
2219 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
2221         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
2223 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2225         PR c++/7347, c++/7348
2226         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
2227         * decl.c (make_typename_type): Use it.
2228         (make_unbound_class_template): Likewise.
2229         (lookup_name_real): Don't call type_access_control if scope is
2230         template parameter dependent.
2231         * parse.y (template_arg): Call make_unbound_class_template with
2232         tf_parsing set.
2233         (nest_name_specifier): Call make_typename_type with tf_parsing set.
2234         (typename_sub0): Likewise.
2235         (typename_sub1): Likewise.
2236         (instantiate_decl): Push class scope.
2237         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
2238         for both static variable and member function template.
2239         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
2240         and arguments.
2241         * search.c (type_access_control): Do type access for TEMPLATE_DECL
2242         too.
2244 2002-07-20  Roger Sayle  <roger@eyesopen.com>
2246         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
2247         test by using positive_option.  Make whitespace consistent.
2249 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
2251         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
2252         members with 'locus'.  Adjust use throughout.
2253         (struct feed):  Likewise.
2254         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
2255         Adjust use.
2256         (snarf_defarg): Use error(), not error_with_file_and_line().
2258 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
2260         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
2261         cpp_options is included.
2263 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2265         PR c++/2862, c++/2863
2266         * pt.c (determine_specialization): Compare the length of
2267         TYPE_ARG_TYPES.  Tidy.
2269 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2271         PR c++/3797
2272         * decl.c (duplicate_decls): Don't propagate inlining parameters from
2273         olddecl to newdecl when newdecl is a specialization of the
2274         instantiation olddecl.
2276 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2278         PR c++/4802, c++/5387
2279         * decl.c (make_typename_type): Use enforce_access.
2281 2002-07-17  Scott Snyder <snyder@fnal.gov>
2283         PR c++/7320
2284         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
2286 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
2288         * class.c (add_method): Correct handling of conversion operators.
2290 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
2292         PR c++/7224
2293         * class.c (add_method): Simplify.
2295 2002-07-11  Jason Merrill  <jason@redhat.com>
2297         PR c++/7279
2298         * tree.c (cp_copy_res_decl_for_inlining): Also copy
2299         TREE_ADDRESSABLE.
2301 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
2303         * pt.c (template_parm_this_level_p, push_template_decl_real):
2304         Pass depth as int pointer.
2306 2002-07-11  Tim Josling  <tej@melbpc.org.au>
2308         Remove front end hard coding from gengtype.c.
2310         * config-lang.in (gtfiles): Add files needed for this front end.
2312 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
2314         * cp-tree.h (unqualified_name_lookup_error): Declare it.
2315         (begin_function_definition): Adjust prototype.
2316         * lex.c (unqualified_name_lookup_error): New function, split out
2317         from ...
2318         (do_identifier): ... here.
2319         * parse.y (parse_begin_function_definition): New function.
2320         (fn.def1): Use it.
2321         * semantics.c (begin_function_definition): Accept decl-specifiers
2322         and attributes as separate parameters.
2324 2002-07-10  Jason Merrill  <jason@redhat.com>
2326         PR c++/6255
2327         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
2328         modifying the old one.
2330 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
2332         * cp-tree.h (constructor_name_p): Declare it.
2333         (check_template_template_default_arg): Likewise.
2334         * class.c (handle_using_decl): Use constructor_name_p.
2335         * decl.c (grokdeclarator): Likewise.
2336         * decl2.c (constructor_name_p): Define it.
2337         * init.c (build_member_call): Use constructor_name_p.
2338         * parse.y (template_parm): Use check_template_template_default_arg.
2339         * pt.c (check_explicit_specialization): Use constructor_name_p.
2340         * semantics.c (check_template_template_default_arg): New function.
2342 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2344         * pt.c (can_complete_type_without_circularity): Add static to
2345         function definition.
2347 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
2349         * cp-tree.h (have_extern_spec): Declare it
2350         * decl.c (have_extern_spec): Define it.
2351         (start_decl): Eliminate use of used_extern_spec.
2352         (start_function): Likewise.
2353         * parse.y (have_extern_spec): Remove declaration.
2354         (used_extern_spec): Likewise.
2355         (frob_specs): Eliminate use of used_extern_spec.
2356         (.hush_warning): Likewise.
2358 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
2360         * Make-lang.in (cp/parse.o): Depend on decl.h.
2361         * cp-tree.h (do_decl_instantiation): Change prototype.
2362         * parse.y: Include decl.h.
2363         (parse_decl_instantiation): New function.
2364         (explicit_instantiation): Use it.
2365         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
2366         and DECLSPECS.
2368 2002-07-07  Roger Sayle  <roger@eyesopen.com>
2370         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
2371         constructor and destructor tests when passed a TEMPLATE_DECL.
2373 2002-07-05  Jason Merrill  <jason@redhat.com>
2375         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
2376         pointers.
2378         PR optimization/7145
2379         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
2381 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
2383         Repair damage on weak-impared targets caused by my previous patch.
2384         * cp-tree.h (import_export_tinfo): Add parameter.
2385         * decl2.c (import_export_tinfo): Add parameter, post adjust
2386         DECL_COMDAT.
2387         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
2388         import_export_tinfo.
2390 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2392         PR c++/6944
2393         * init.c (build_aggr_init): Remove qualifiers of init before calling
2394         build_vec_init.
2395         (build_vec_init): Flatten multi-dimensional array during cleanup.
2396         (build_vec_delete_1): Abort if the type of each element is array.
2398 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
2400         * pt.c (instantiate_class_template): Fix typo.
2402 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2404         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
2405         by CVS conflict in my last patch.
2407 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2409         PR c++/6716
2410         * pt.c (can_complete_type_without_circularity): New function.
2411         (instantiate_class_template): Use it.
2412         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
2413         message due to incomplete fields.
2415 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
2417         PR c++/7112
2418         * mangle.c (write_expression): Add mangling for sizeof when
2419         applied to a type.
2420         * operators.def: Remove stale comment.
2422 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
2424         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
2425         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
2426         (tinfo_decl_type): Replace with ...
2427         (type_info_ptr_type): ... this.
2428         (import_export_tinfo): Declare.
2429         (tinfo_decl_p): Rename to ...
2430         (unemitted_tinfo_decl_p): ... this.
2431         * decl2.c (import_export_decl): Break out tinfo handling into ...
2432         (import_export_tinfo): ... here. New function.
2433         (finish_file): Adjust.
2434         * rtti.c (TINFO_REAL_NAME): New macro.
2435         (init_rtti_processing): Create the tinfo types.
2436         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
2437         (get_tinfo_decl): Adjust.
2438         (get_tinfo_ptr): New function.
2439         (get_type_id): Use it.
2440         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
2441         (ptr_initializer): Use get_tinfo_ptr.
2442         (ptm_initializer): Likewise.
2443         (synthesize_tinfo_var): Break into ...
2444         (get_pseudo_ti_init): ... this. Just create the initializer.
2445         (get_pseudo_ti_desc): .. and this.
2446         (create_real_tinfo_var): Remove.
2447         (create_pseudo_type_info): Don't create the vtable decl here.
2448         (get_vmi_pseudo_type_info): Remove.
2449         (create_tinfo_types): Adjust.
2450         (tinfo_decl_p): Rename to ...
2451         (unemitted_tinfo_decl_p): ... here. Adjust.
2452         (emit_tinfo_decl): Adjust. Create the initializer.
2454 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
2456         PR c++/6695
2457         * pt.c (tsubst_friend_class): Substitute into the context of the
2458         friend before using it.
2460 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
2462         * cp-tree.h (xref_tag): Change prototype.
2463         (handle_class_head): Likewise.
2464         (build_x_component_ref): Likewise.
2465         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
2466         (xref_tag): Take attributes as a separate parameter.
2467         (xref_tag_from_type): Adjust call to xref_tag.
2468         * decl2.c (build_expr_from_tree): Adjust call to
2469         build_x_component_ref.
2470         (handle_class_head): Take attributes as a separate parameter.
2471         * parse.y (parse_xref_tag): New function.
2472         (parse_handle_class_head): Likewise.
2473         (primary): Use parse_xref_tag.
2474         (class_head_decl): Use parse_handle_class_head.
2475         (class_head_defn): Likewise.
2476         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
2477         (build_dynamic_cast_1): Likewise.
2478         (create_pseudo_type_info): Likewise.
2479         (emit_support_tinfos): Likewise.
2480         * typeck.c (build_object_ref): Adjust call to
2481         build_x_component_ref.
2482         (build_x_component_ref): Remove protect parameter.
2484 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
2486         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
2487         * class.c (handle_using_decl): Likewise.
2488         (instantiate_type): Likewise.
2489         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
2490         (xref_basetypes): Change prototype.
2491         (begin_mem_initializers): New function.
2492         (get_overloaded_fn): Likewise.
2493         * decl.c (xref_basetypes): Simplify.
2494         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
2495         * init.c (build_offset_ref): Likewise.
2496         * parse.y (base_init): Use begin_mem_initializers().
2497         (structsp): Adjust call to xref_basetypes.
2498         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
2499         (instantiate_class_template): Adjust call to xref_basetypes.
2500         * semantics.c (begin_mem_initializers): New function.
2501         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
2502         (really_overlaoded_fn): Likewise.
2503         (get_overloaded_fn): New function.'
2504         (get_first_fn): USe BASELINK_FUNCTIONS.
2506 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
2508         * cp-tree.h (SCALAR_TYPE_P): New macro.
2509         (check_for_out_of_scope_variable): New function.
2510         (at_class_scope_p): Likewise.
2511         (finish_fname): Likewise.
2512         * class.c (finish_struct): Use at_function_scope_p.
2513         * decl.c (check_for_out_of_scope_variable): New function, split
2514         out from do_identifier.
2515         (finish_enum): Use at_function_scope_p.
2516         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
2517         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
2518         (primary): Use at_function_scope_p.
2519         * search.c (at_class_scope_p): New function.
2520         * semantics.c (finish_fname): Likewise.
2521         (check_multiple_declarators): Use at_function_scope_p.
2523 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
2525         * parse.y (parse_scoped_id): New function.
2526         (primary): Use it.
2527         * cp-tree.h (do_scoped_id): Adjust declaration.
2528         * lex.c (do_scoped_id): Remove call to yylex.
2529         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
2530         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
2531         expanding it inline.
2533 2002-06-23  Matt Thomas  <matt@3am-software.com>
2535         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
2536         "#if VMS_TARGET".
2538 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2540         * mangle.c (integer_type_codes): Const-ify.
2542 2002-06-20  Richard Henderson  <rth@redhat.com>
2544         PR c++/6747
2545         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
2546         Call put_var_into_stack.
2548 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2550         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
2551         array size calculation.
2553 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2555         PR c++/6892
2556         * pt.c (tsubst_expr): Handle FILE_STMT.
2558 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2560         PR c++/6723
2561         * pt.c (lookup_template_class): Don't build complete argument of
2562         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
2563         argument.
2565 2002-06-19  Akim Demaille  <akim@epita.fr>
2567         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
2568         decl.h's TYPENAME.
2569         * spew.c, lex.c: Adjust.
2570         * parse.y (explicit_instantiation): Add empty action to override
2571         the default $$ = $1 where it introduces a type clash.
2573 2002-06-14  Jason Merrill  <jason@redhat.com>
2575         * semantics.c (begin_for_stmt): Push the 'for' scope before
2576         adding the FOR_STMT.
2578         C++ ABI changes.
2579         * class.c (build_base_field): Set DECL_PACKED.
2580         (layout_class_type): Don't use tail padding of PODs.
2581         * mangle.c (write_unqualified_name): Fix template conversion op
2582         mangling.
2584 2002-06-16  Richard Henderson  <rth@redhat.com>
2586         PR opt/6793
2587         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
2588         after template instantiation.
2590 2002-06-16  Richard Henderson  <rth@redhat.com>
2592         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
2594 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
2596         * cp-tree.h (compiler_error): Remove declaration.
2597         * lex.c (compiler_error): Remove definition.
2599 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
2601         * g++spec.c (LIBUNWIND): New.
2602         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
2604 2002-06-13  Jessica Han  <jessica@cup.hp.com>
2606         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
2607         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
2608         (build_vbase_offset_vtbl_entries): Likewise.
2609         * rtti.c (build_headof): Likewise.
2610         (get_tinfo_decl_dynamic): Likewise.
2611         (create_pseudo_type_info): Likewise.
2613 2002-06-12  Stan Shebs  <shebs@apple.com>
2615         * mpw-config.in: Remove file, no longer used.
2616         * mpw-make.sed: Ditto.
2618 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
2620         * decl2.c: Update call to cpp_handle_option.
2622 2002-06-07  H.J. Lu  (hjl@gnu.org)
2624         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
2626 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
2628         * error.c (cp_error_at): Fix typo.
2630 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
2632         * error.c (cp_diagnostic_starter): Adjust call.
2633         (maybe_print_instantiation_context): Change prototype to take a
2634         'diagnostic_info *'.
2635         (print_instantiation_full_context): Likewise.
2636         (print_instantiation_partial_context): Likewise.
2637         (cp_diagnostic_starter): Likewise.
2638         (cp_diagnostic_finalizer): Likewise.
2639         (cp_print_error_function): Likewise.
2640         (cp_printer): Take a secondary parameter as a 'text_info *'.
2641         Remove output_state savings.  Adjust calls.
2643 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
2645         * pt.c (inline_parm_levels): Mark for GC.
2647         * mangle.c (start_mangling): Allocate G.substitutions here...
2648         (init_mangle): ... rather than here.
2649         (finish_mangling): Clear the varray pointer when done with it.
2650         * spew.c (yylexstring): Don't use VARRAY_FREE.
2651         * search.c (bfs_walk): Don't use VARRAY_FREE.
2652         * decl2.c (pending_statics): Use gengtype to mark.
2653         (deferred_fns): Likewise.
2654         (ssdf_decls): Likewise.
2655         (init_decl2): Delete.
2656         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
2657         (cxx_init_decl_processing): Don't call init_decl2.
2658         (cxx_pop_function_context): Don't use VARRAY_FREE.
2659         * cp-tree.h (struct saved_scope): No need for special marking
2660         of varrays.
2661         (struct language_function): Likewise.
2662         (local_classes): Use gengtype to mark.
2663         (init_decl2): Delete prototype.
2664         * class.c (init_class_processing): Don't use
2665         ggc_add_tree_varray_root.
2666         (build_vtbl_initializer): Don't use VARRAY_FREE.
2668         * decl.c (typename_compare): Don't use same_type_p.
2670         * decl.c: Include hashtab.h instead of hash.h.
2671         (typename_hash): Update to use htab_h.
2672         (typename_compare): Likewise.
2673         (typename_htab): Use gengtype to mark.
2674         (build_typename_type): Update to use htab_h.
2675         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
2677         * Make-lang.in (gt-cp-tree.h): New rule.
2678         (cp/tree.o): Depend on gt-cp-tree.h.
2679         * config-lang.in (gtfiles): Add cp/tree.c.
2680         * tree.c: Include gt-cp-tree.h.
2681         (list_hash_table): Use gengtype to mark.
2682         (init_tree): Use gengtype to mark trees.
2684         * Make-lang.in (cp/decl.o): Add debug.h dependency.
2685         * call.c (struct z_candidate): Use gengtype.
2686         (USER_CONV_CAND): Use WRAPPER_ZC.
2687         (convert_class_to_reference): Use build_zc_wrapper.
2688         (build_type_conversion_1): Likewise.
2689         (build_over_call): Use WRAPPER_ZC.
2690         (add_warning): Use build_zc_wrapper.
2691         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
2692         * cp-tree.h (struct lang_identifier): Use gengtype.
2693         (struct template_parm_index_s): Likewise.
2694         (struct ptrmem_cst): Likewise.
2695         (struct tree_binding): Likewise.
2696         (struct tree_overload): Likewise.
2697         (struct tree_srcloc): Likewise.
2698         (struct tree_wrapper): Likewise.  Also modify to have a pointer
2699         to struct z_candidate rather than void.
2700         (enum cp_tree_node_structure_enum): New.
2701         (union lang_tree_node): New.
2702         (cxx_mark_tree): Delete prototype.
2703         (cp_tree_node_structure): New prototype.
2704         (build_ptr_wrapper): Delete prototype.
2705         (build_int_wrapper): Delete prototype.
2706         (build_zc_wrapper): New prototype.
2707         * decl.c: Include debug.h
2708         (cxx_mark_tree): Delete.
2709         (cp_tree_node_structure): New.
2710         * tree.c (build_ptr_wrapper): Delete.
2711         (build_int_wrapper): Delete.
2712         (build_zc_wrapper): New.
2714         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
2715         Correct typo.  Patch from k_fukui@highway.ne.jp.
2717         * semantics.c (current_stmt_tree): Update for change to
2718         struct language_function.
2719         (finish_mem_initializers): Likewise.
2720         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
2721         * cp-tree.h (struct language_function): Rename from
2722         cp_language_function.  Change all uses.
2723         (cp_function_chain): Don't need to cast.
2725         * class.c (duplicate_tag_error): Reset discriminator.
2726         (check_bases_and_members): Update for data structure changes.
2727         * cp-tree.h (struct lang_id2): Use gengtype.
2728         (flagged_type_tree): Likewise.
2729         (SET_LANG_ID): Use GGC on struct lang_id2.
2730         (struct cp_language_function): Use gengtype.  Remove field
2731         'x_vcalls_possible_p'.
2732         (current_vcalls_possible_p): Delete.
2733         (struct lang_type_header): New.
2734         (struct lang_type_class): Rename from struct lang_type.  Include
2735         struct lang_type_header.
2736         (struct lang_type_ptrmem): New.
2737         (struct lang_type): New.
2738         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
2739         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
2740         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
2741         (struct lang_decl_flags): Use gengtype.  Add discriminators.
2742         (struct lang_decl): Use gengtype.  Add and use discriminators.
2743         Update the macros that reference moved fields.
2744         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
2745         (SET_DECL_THUNK_P): Set discriminator too.
2746         (clear_inline_text_obstack): Delete prototype.
2747         (finish_inline_definitions): Delete prototype.
2748         (mark_pending_inlines): Delete prototype.
2749         (lang_check_failed): New prototype.
2750         * decl.c (struct named_label_use_list): Use gengtype.
2751         (struct named_label_list): Likewise.
2752         (mark_binding_level): Delete.
2753         (mark_named_label_lists): Delete.
2754         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
2755         (cxx_init_decl_processing): Use generated marker routine.
2756         (begin_destructor_body): Delete dead set to
2757         current_vcalls_possible_p.
2758         (mark_lang_function): Delete.
2759         (mark_cp_function_context): Delete.
2760         (lang_mark_tree): Use generated marker routines.
2761         * decl2.c (start_objects): Set discriminator when setting
2762         GLOBAL_INIT_PRIORITY.
2763         * lex.c (retrofit_lang_decl): Set discriminators.
2764         (copy_lang_type): Update for changes to lang_type structure.
2765         (cp_make_lang_type): Set discriminator.
2766         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
2767         * search.c: Include ggc.h.
2768         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
2769         (finish_inline_definitions): Delete.
2770         * spew.c (struct token): Use gengtype.
2771         (struct token_chunk): New.
2772         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
2773         (struct feed): Use gengtype.
2774         (feed_obstack): Delete.
2775         (feed): Mark as GC root.
2776         (pending_inlines): Mark as GC root.
2777         (pending_inlines_tail): Likewise.
2778         (processing_these_inlines): Likewise.
2779         (token_obstack): Make static.
2780         (first_token): Likewise.
2781         (init_spew): Don't initialize deleted things; use gengtype for roots.
2782         (clear_inline_text_obstack): Delete.
2783         (feed_input): Use GC for struct feed.  Update for changes to
2784         struct unparsed_text.
2785         (mark_pending_inlines): Delete.
2786         (next_token): Rename from add_token.  Change all callers.  Update
2787         for changes to struct unparsed_text.
2788         (space_for_token): New.
2789         (remove_last_token): New.
2790         (alloc_unparsed_text): New.
2791         (snarf_block): Take an unparsed_text.  Update for changes to struct
2792         unparsed_text.
2793         (snarf_method): Update for changes to struct unparsed_text.
2794         (snarf_defarg): Update for changes to struct unparsed_text.
2795         * tree.c (lang_check_failed): New.
2797         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
2798         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
2799         (cp/spew.o): Add dependency on gt-<filename>.h.
2800         (cp/decl2.o): Add dependency on gt-<filename>.h.
2801         (cp/call.o): Add dependency on gt-<filename>.h.
2802         (cp/pt.o): Add dependency on gt-<filename>.h.
2803         (cp/repo.o): Add dependency on gt-<filename>.h.
2804         (cp/parse.o): Add dependency on gt-<filename>.h.
2805         * call.c: Use gengtype for roots.
2806         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
2807         decl2.c parse.y pt.c repo.c spew.c.
2808         * cp-tree.h: Use gengtype for roots.
2809         (struct saved_scope): Use GGC, gengtype.
2810         (cp_parse_init): Delete prototype.
2811         (init_pt): Delete prototype.
2812         * decl.c: Use gengtype for roots.
2813         (mark_saved_scope): Delete.
2814         (cxx_init_decl_processing): Don't call deleted initilisation
2815         routines.
2816         (signed_size_zero_node): Delete, unused.
2817         * decl.h: Use gengtype for roots.
2818         * decl2.c: Use gengtype for roots.
2819         * lex.h: Use gengtype for roots.
2820         * parse.y: Use gengtype for roots.
2821         (cp_parse_init): Delete.
2822         * pt.c: Use gengtype for roots.
2823         (init_pt): Delete.
2824         * repo.c: Use gengtype for roots.
2825         * spew.c: Use gengtype for roots.
2827         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
2828         (cp/decl.o): Add dependency on gtype-cp.h.
2829         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
2830         Include gtype-cp.h.  Allow for filename changes.
2832         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
2833         (cp/decl.o): Add cp/gt-decl.h dependency.
2834         * config-lang.in (gtfiles): New.
2835         * tree.h: Rename struct binding_level to struct cp_binding_level.
2836         * decl.c: Rename struct binding_level to struct cp_binding_level.
2837         Include cp/gt-decl.h.
2838         (struct cp_binding_level): Use gengtype.
2839         (make_binding_level): Use GGC on struct cp_binding_level.
2840         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
2841         (cxx_init_decl_processing): Mark free_binding_level as
2842         deletable.
2844         * decl.c (mark_cp_function_context): Update calling sequence.
2846         * decl.c (start_function): Don't free 'struct
2847         cp_language_function'.
2848         (pop_cp_function_context): Likewise.
2849         (save_function_data): Allocate it using GC.
2850         * semantics.c (genrtl_start_function): Don't free 'struct
2851         cp_language_function'.
2853 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
2855         * lang-specs.h: Use cpp_debug_options.
2857 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
2859         * mangle.c, tree.c: Include real.h.
2860         * Make-lang.in: Update dependency lists.
2862 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
2864         * lex.c: Don't include c-lex.h.
2865         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
2867 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
2869         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
2871 2002-05-22  Richard Henderson  <rth@redhat.com>
2873         * decl.c (obscure_complex_init): Check for VAR_DECL
2874         before using DECL_THREAD_LOCAL.
2876 2002-05-22  Richard Henderson  <rth@redhat.com>
2878         * decl.c (check_tag_decl): Handle RID_THREAD.
2879         (obscure_complex_init): Reject run-time init of tls.
2880         (grokvardecl, grokdeclarator): Handle RID_THREAD.
2881         * lex.c (reswords): Add __thread.
2882         (rid_to_yy): Map RID_THREAD to SCSPEC.
2884 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
2886         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
2887         * cp-tree.h (cxx_post_options): Kill.
2888         * cp-lex.c (cxx_post_options): Kill.
2890 2002-05-21  Richard Henderson  <rth@redhat.com>
2892         * lex.c (rid_to_yy): Add RID_THREAD.
2894 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
2896         * init.c (build_vec_init): Test for trivial copy-assignment when
2897         copy-assigning arrays.
2899 2002-05-20  Andreas Jaeger  <aj@suse.de>
2901         * init.c (build_default_init): Remove unused variable.
2903 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
2905         * call.c (any_strictly_viable): New.
2906         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
2908 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2910         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
2912 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2914         PR c++/186, DR 259
2915         * pt.c (do_decl_instantiation): Don't complain explicit
2916         instantiation after explicit specialization.
2917         (do_type_instantiation): Likewise.
2919 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
2921         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
2922         renamed from...
2923         (complete_type_or_else): ... this.  Redefined as macro.
2924         (cxx_incomplete_type_diagnostic): Declare.
2925         (cxx_incomplete_type_error): Define as macro.
2926         * init.c (build_delete): Warn about incomplete types other than
2927         void, and use the built-in operator delete for them.
2928         * typeck.c (complete_type_or_diagnostic): Renamed from
2929         complete_type_or_else.  Added warn_only argument, passed to...
2930         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
2931         warnings or errors depending on new warn_only argument.  Renamed
2932         from...
2933         (cxx_incomplete_type_error): ... this.  New implementation in
2934         terms of cxx_incomplete_type_diagnostic.
2936 2002-05-18  Jason Merrill  <jason@redhat.com>
2938         PR c++/6611
2939         * decl2.c (import_export_decl): If we clear
2940         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
2942 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2944         PR c++/6620
2945         * pt.c (verify_class_unification): Don't check if PARM is template
2946         parameter dependent.  Simplify.
2947         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
2948         parameter dependent expression.
2950 2002-05-14  Jason Merrill  <jason@redhat.com>
2952         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
2953         Do set DECL_COMDAT.
2954         (synthesize_tinfo_var): Take the public decl.
2955         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
2956         (emit_tinfo_decl): Adjust.  Call import_export_decl.
2957         * decl2.c (import_export_decl): Simplify tinfo decl handling.
2959 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
2961         * cp-tree.h (struct lang_type): Added non_zero_init.
2962         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
2963         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
2964         * class.c (check_field_decls): Test non_zero_init.
2965         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
2966         zero-to-NULL conversions.
2967         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
2968         type that needs zero-initialization without zeros.
2969         (check_initializer_decl): Compute zero-initializer for types
2970         that require a non-trivial one.
2971         * init.c (build_forced_zero_init): New function.
2972         (build_default_init): Use it.
2973         * tree.c (zero_init_p): New function.
2974         * typeck2.c (force_store_init_value): New function.
2975         (process_init_constructor): Create non-trivial zero-initializers
2976         for array members and class fields.
2978 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
2980         * lang-specs.h: Remove redundant -lang-c++.
2982 2002-05-13  Jason Merrill  <jason@redhat.com>
2984         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
2985         (fixed_type_or_null): See through reference vars.
2986         (build_base_path): Vtable contents are constant.
2987         * typeck.c (get_member_function_from_ptrfunc): Likewise.
2989 2002-05-12  Jason Merrill  <jason@redhat.com>
2991         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
2992         structs are safe.
2994 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
2996         * cp-tree.h (flag_ansi): Remove.
2997         * decl2.c (flag_ansi): Remove.
2998         (cxx_decode_option): Set flag_iso and flag_undef.
3000 2002-05-09  Jason Merrill  <jason@redhat.com>
3002         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
3003         Use subtraction rather than a bitmask to get the index.
3004         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
3006         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
3008 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
3010         * Make-lang.in (decl2.o): Update.
3011         * cp-tree.h (warn_multichar): Remove.
3012         * decl2.c: Include c-common.h.
3013         (warn_multichar): Remove.
3015 2002-05-03  Jason Merrill  <jason@redhat.com>
3017         * tree.c (build_cplus_array_type): Only const and volatile get
3018         special handling.
3020         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
3022 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
3024         ABI change, returning simple classes from functions.
3025         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
3026         TYPE_HAS_TRIVIAL_INIT_REF is false or
3027         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
3029 2002-04-30  Jason Merrill  <jason@redhat.com>
3031         PR debug/6436
3032         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
3033         anonymous class with a typedef if there are attributes.
3035 2002-04-29  Paul Eggert  <eggert@twinsun.com>
3037         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
3039 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
3041         PR c++/6477
3042         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
3043         non-NULL first.
3045 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
3047         PR c++/6492
3048         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
3049         enter that scope before name lookup.
3051         PR c++/6486
3052         * method.c (do_build_copy_constructor): Avoid building
3053         cv-qualified reference types.
3055 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
3057         PR c++/5719
3058         * decl.c (grok_op_properties): Assignment ops don't have to return
3059         by value. operator% should.
3061 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
3063         PR c/6343
3064         * decl.c (duplicate_decls): Call merge_weak.
3066 2002-04-26  Richard Henderson  <rth@redhat.com>
3068         * parse.y (malloced_yyss, malloced_yyvs): New.
3069         (yyoverflow): Re-add.  Set them.
3070         (free_parser_stacks): New.
3072 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
3074         PR c++/6497
3075         * method.c (do_build_assign_ref): Pass a derivation to
3076         build_method_call when calling base class assignment operators.
3078 2002-04-26  Richard Henderson  <rth@redhat.com>
3080         * parse.y (yyoverflow): Revert.
3082 2002-04-26  Richard Henderson  <rth@redhat.com>
3084         PR c/3581
3085         * parse.y (string): Remove.  Update all uses to use STRING
3086         instead, and not call combine_strings.
3087         * rtti.c (tinfo_name): Use fix_string_type.
3088         * semantics.c (finish_asm_stmt): Don't call combine_strings.
3089         * spew.c (yylexstring): New.
3090         (read_token): Use it.
3092 2002-04-25  Richard Henderson  <rth@redhat.com>
3094         PR c/2161
3095         * parse.y (yyoverflow): New.
3097 2002-04-25  Jason Merrill  <jason@redhat.com>
3099         PR c++/5607
3100         * search.c (check_final_overrider): No longer static.
3101         * class.c (update_vtable_entry_for_fn): Call it.
3102         * cp-tree.h: Adjust.
3104 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3106         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
3107         * cp-tree.h (cxx_set_yydebug): Die.
3108         * lex.c (YYDEBUG): Get from c-lex.h.
3109         (cxx_set_yydebug): Remove.
3110         * parse.y: Include c-lex.h.
3111         (YYDEBUG): Get from c-lex.h.
3113 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
3115         PR c++/6438.
3116         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
3117         void.
3119 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
3121         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
3122         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
3123         Redefine.
3124         * cp-tree.h (cp_attribute_table): Rename.
3125         * decl.c (lang_attribute_table): Remove declaration.
3126         (cxx_init_decl_processing): Don't set it.
3127         * tree.c (cp_attribute_table): Rename.
3129 2002-04-24  Jason Merrill  <jason@redhat.com>
3131         PR c++/6331
3132         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
3133         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
3134         The pedwarn for array assignment is now unconditional.
3135         * tree.c (build_cplus_array_type_1): Still process simple array types
3136         normally in templates.
3138         PR c++/6395
3139         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
3140         stuff for comdats.
3142 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
3144         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
3145         node with attributes.
3147 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
3149         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
3150         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
3152 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
3154         PR c++/6256:
3155         * pt.c (tsubst_friend_class): Handle templates with explicit
3156         nested names.
3158         PR c++/6331:
3159         * typeck.c (merge_types): Remember the cv-qualification of pointer
3160         types when merging them.
3162 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3164         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
3165         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
3166         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
3167         cxx_mark_function_context): New.
3168         * decl.c (push_cp_function_context, pop_cp_function_context,
3169         mark_cp_function_context): Rename for consistency.
3170         (cxx_init_decl_processing): Don't set old hooks.
3172 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
3174         * call.c (convert_type_from_ellipsis): Rename, update.
3175         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
3176         * cp-tree.h (convert_type_from_ellipsis): Rename.
3177         * decl.c (cxx_init_decl_processing): Don't set hook.
3179 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
3181         * call.c (build_new_method_call): Update.
3182         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
3183         * cp-tree.h (cxx_incomplete_type_error): New.
3184         * decl.c (grokdeclarator, grokparms): Update.
3185         * decl2.c (check_classfn): Update.
3186         * pt.c (tsubst): Update.
3187         * typeck.c (complete_type_or_else, expr_sizeof,
3188         decay_conversion): Update.
3189         * typeck2.c (incomplete_type_error): Rename.
3190         (add_exception_specifier): Update.
3192 2002-04-18  Jason Merrill  <jason@redhat.com>
3194         PR c++/5658
3195         * search.c (setup_class_bindings): A class template qualifies as a
3196         type binding.
3198 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
3200         PR c++/6316
3201         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
3202         before expanding.
3204 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
3206         * init.c (begin_init_stmts): Remove commented out code.
3207         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
3208         * semantics.c (begin_gobal_stmt_expr): Adjust call to
3209         expand_start_stmt_expr.
3211 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
3213         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
3214         dso_handle itself, to __cxa_atexit.
3216 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3218         * error.c (cxx_print_error_function): Adjust call to macros.
3220 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
3222         * class.c (layout_virtual_bases): Do all dsize computation on trees.
3224 2002-04-14  Jason Merrill  <jason@redhat.com>
3226         * typeck.c (get_member_function_from_ptrfunc): Don't do
3227         gratuitious division and multiplication on
3228         ptrmemfunc_vbit_in_delta targets.
3230 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
3232         PR c++/5373.
3233         * semantics.c (finish_expr_stmt): Remember the type of the
3234         expression before any conversions are performed.
3236 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
3238         PR c++/5189.
3239         * call.c (add_template_candidate_real): Do not treat member
3240         templates as copy constructors.
3242 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
3244         * decl.c (duplicate_decls): Do not copy the RTL for a variable
3245         declaration if the old variable had an incomplete type and the new
3246         variable does not.
3247         (complete_vars): Do not call layout_decl for completed variables.
3249 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
3251         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
3252         with an explicit one.
3253         (follow_tag_typedef): New.
3254         (lookup_tag): Use it to extract the tag of an explicit typedef.
3255         (xref_tag): Likewise.
3257 2002-04-11  Andrew Haley  <aph@redhat.com>
3259         * typeck.c (type_after_usual_arithmetic_conversions):
3260         If two types have the same variant, return immediately.
3261         When two floating-point operands are the same precision:
3262           convert to float if one of the operands is float;
3263           if neither operand is one of the standard types, return the type
3264           of the first operand.
3266 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
3268         PR c++/5507
3269         * decl.c (make_typename_type): Remove implicit typenameness.
3271 2002-04-09  Jason Merrill  <jason@redhat.com>
3273         PR optimization/6189
3274         * semantics.c (genrtl_start_function): Don't free
3275         DECL_SAVED_FUNCTION_DATA for inline functions.
3277         * init.c (build_member_call): For now, don't convert to
3278         intermediate base if it would cause an error.
3280 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
3282         * parse.y (namespace_qualifier, maybe_identifier,
3283         begin_explicit_instantiation, end_explicit_instantiation,
3284         apparent_template_type, .finish_template_type,
3285         do_id, maybe_init, defarg_again, component_decl_1):
3286         Add ending ';', in accordance with POSIX.
3288 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
3290         PR c++/5571
3291         * class.c (layout_class_type): Remember incomplete static
3292         variables.
3293         (finish_struct_1): Call complete_vars, not
3294         hack_incomplete_structures.
3295         * cp-tree.h (hack_incomplete_structures): Rename to ...
3296         (complete_vars): ... this.
3297         (struct saved_scope): Remove incomplete.
3298         (namespace_scope_incomplete): Remove.
3299         * decl.c (struct binding_level): Remove incomplete.
3300         (incomplete_vars): New variable.
3301         (mark_binding_level): Don't mark incomplete.
3302         (print_binding_level): Don't print it.
3303         (mark_saved_scope): Don't mark incomplete.
3304         (pushdecl): Use maybe_register_incopmlete_var.
3305         (cxx_init_decl_processing): Register incomplete_vars for GC.
3306         (start_decl_1): Clarify error message.
3307         (hack_incomplete_vars): Remove.
3308         (maybe_register_incomplete_var): New function.
3309         (complete_vars): Likewise.
3311 2002-04-06  Jason Merrill  <jason@redhat.com>
3313         PR c++/4934
3314         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
3315         set before checking it.
3317         PR c++/525
3318         * init.c (build_member_call): Use build_scoped_ref.
3319         (resolve_offset_ref): Likewise.
3320         * call.c (build_scoped_method_call): Likewise.
3321         * tree.c (maybe_dummy_object): Kludge around current_class_type being
3322         wrong.
3323         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
3324         * cp-tree.h: Adjust.
3326         * init.c (push_base_cleanups): Just use build_scoped_method_call.
3328         PR c++/6179
3329         * method.c (implicitly_declare_fn): Pass unqualified type to
3330         synthesize_exception_spec.
3332 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
3334         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
3335         * cvt.c: Update comment.
3336         * init.c (expand_cleanup_for_base): Update.
3337         * semantics.c (finish_parenthesized_expr): Update.
3338         * typeck.c (cp_truthvalue_conversion): Update.
3340 2002-04-04  Jason Merrill  <jason@redhat.com>
3342         * semantics.c (finish_eh_cleanup): New fn.
3343         * cp-tree.h: Add prototype.
3344         * init.c (perform_member_init, expand_cleanup_for_base): Use
3345         finish_eh_cleanup.
3346         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
3347         * cp-tree.h: Remove references.
3348         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
3349         * dump.c (cp_dump_tree): Likewise.
3350         * pt.c (tsubst_expr): Likewise.
3351         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
3352         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
3353         * tree.c (cp_statement_code_p): Likewise.
3355         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
3357         PR c++/5636
3358         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
3359         cleanup for nrv.
3361         PR c++/5104
3362         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
3363         specifiers.
3364         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
3366 2002-04-03  Richard Henderson  <rth@redhat.com>
3368         * cp-lang.c (cxx_warn_unused_global_decl): New.
3369         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
3371 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
3373         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
3374         * tree.c (init_tree): Don't set hook.
3376 2002-04-03  Roger Sayle  <roger@eyesopen.com>
3378         PR c++/5998:
3379         * decl.c (duplicate_decls): Don't mess with assembler names when
3380         redeclaring builtin functions as static.
3382 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3384         * call.c (build_addr_func): Update.
3385         * class.c (resolve_address_of_overloaded_function): Update.
3386         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
3387         * cp-tree.h (cxx_mark_addressable): New.
3388         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
3389         * decl2.c (build_cleanup): Update.
3390         * except.c (build_throw): Update.
3391         * init.c (resolve_offset_ref): Update.
3392         * pt.c (convert_nontype_argument): Update.
3393         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
3394         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
3395         unary_complex_lvalue): Update.
3396         (mark_addressable): Rename.
3398 2002-04-01  Roger Sayle  <roger@eyesopen.com>
3400         PR c++/5998:
3401         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
3402         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
3403         but follow the SET_DECL_RTL idiom used elsewhere in the function.
3405 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3407         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3408         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
3409         * decl.c (grokdeclarator): Update.
3410         * mangle.c (write_integer_cst): Update.
3411         * typeck.c (build_binary_op): Update.
3413 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
3415         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
3416         * lex.c (cxx_init): Don't set hook.
3418 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
3420         * Make-lang.in (error.o): Update.
3421         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
3422         * cp-tree.h (struct diagnostic_context): Predeclare.
3423         (cxx_print_error_function): New.
3424         * error.c: Include langhooks-def.h.
3425         (lang_print_error_function): Rename.  Update.
3426         (init_error): Don't set hook.
3428 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
3430         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
3431         Redefine.
3432         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
3433         * decl.c (finish_enum): Similarly.
3434         * error.c (dump_type): Similarly.
3435         * lex.c (cxx_init): Similarly.
3436         * mangle.c (write_builtin_type): Similarly.
3437         * typeck.c (comptypes): Similarly.
3439 2002-03-28  Roger Sayle  <roger@eyesopen.com>
3441         PR c++/5998:
3442         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
3443         in the g++ front-end.
3444         (duplicate_decl): Allow redefinition of anticipated built-ins.
3445         Fix inlining problem by over-writing the old DECL_RTL.
3446         (lookup_namespace_name): Fail to find an identifier in the
3447         specified namespace if its still anticipated.
3448         (builtin_function_1): New function split out from builtin_function
3449         to create a builtin in the current namespace with given context.
3450         (builtin_function): Call builtin_function_1 to define the
3451         appropriate builtins in both the std and global namespaces.
3452         (select_decl): Don't test for anticipated decls here.
3453         (unqualified_namespace_lookup): Instead ignore them whilst
3454         searching through scopes and namespaces.
3455         * decl2.c (do_nonmember_using_decl): If a using declaration
3456         specifies an anticipated built-in function, mark it as no longer
3457         anticipated in that scope.
3458         (ambiguous_decl):  Avoid resolving to an anticipated decl.
3459         * lex.c (do_scoped_id): Fail to find an identifier in the global
3460         namespace if its still anticipated.
3462 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
3464         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
3465         * cp-tree.h (cp_make_lang_type): Rename.
3466         * lex.c (cp_make_lang_type): Rename.
3467         (make_aggr_type): Update.
3468         * tree.c (init_tree): Don't set make_lang_type_fn.
3470 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
3472         PR c++/6073
3473         * class.c (finish_struct_1): Update static field's DECL_MODE even
3474         if its type is a variant of t.
3476 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
3478         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
3479         * cp-tree.h (cxx_insert_default_attributes): New.
3480         * decl.c (insert_default_attributes): Rename.
3482 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
3484         PR c++/4884
3485         * call.c (build_op_delete_call): Allow for the fact the placement
3486         may be a COMPOUND_EXPR.
3488 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
3490         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
3491         * cp-tree.h (init_cplus_expand): Remove.
3492         (cxx_expand_expr): New.
3493         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
3494         fix prototype.
3495         (init_cplus_expand): Remove.
3496         * lex.c (cxx_init): Don't call init_cplus_expand.
3498 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
3500         PR c++/4884.
3501         * init.c (build_new_1): Allow for the fact the result of
3502         build_function_call may be a COMPOUND_EXPR.
3504 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
3506         PR c++/5682
3507         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
3508         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
3509         (dfs_skip_nonprimary_vbases_markedp): Remove.
3510         * search.c (get_shared_vbase_if_not_primary): Remove.
3511         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
3512         (dfs_skip_nonprimary_vbases_markedp): Remove.
3513         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
3514         (dfs_marked_real_bases_queue_p): Likewise.
3516 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
3518         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
3519         * cp-tree.h (cxx_mark_tree): New.
3520         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
3522 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3524         * cp-tree.h (cxx_maybe_build_cleanup): New.
3525         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
3526         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
3527         * tree.c (build_target_expr): Update.
3528         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
3530 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
3532         * decl2.c (cxx_decode_option): Handle -E.
3533         * lang-specs.h (default_compilers): Preprocess with cc1plus.
3534         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
3536 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
3538         PR c++/6037
3539         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
3541 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3543         * error.c (dump_type): Be careful about implicit typenames.
3545 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3547         PR C++/3656
3548         * semantics.c (finish_base_specifier): Handle erronous base
3549         classes.
3551 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
3553         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
3554         REAL_IS_NOT_DOUBLE.
3556 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
3558         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
3559         an index into the vtable_entry array regardless of
3560         TARGET_PTRMEMFUNC_VBIT_LOCATION.
3562 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
3564         * tree.c (cp_cannot_inline_tree_fn): Same.
3566 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
3568         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
3569         insert_block, getdecls, global_bindings_p): New.
3571 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
3573         PR c++/4361
3574         * mangle.c (struct globals) Add internal_mangling_p member.
3575         (write_template_param): Do internal mangling, if needed.
3576         (mangle_conv_op_name_for_type): Request internal mangling.
3578 2002-03-20  Jason Merrill  <jason@redhat.com>
3580         PR c++/2136
3581         * init.c (build_delete): Check access for a member op delete here.
3582         * decl2.c (delete_sanity): Not here.
3584 2002-03-19  Jason Merrill  <jason@redhat.com>
3586         PR c++/5118
3587         * class.c (get_vfield_name): Use the constructor_name.
3589 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3591         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
3592         * cp-tree.h (lang_printable_name): Rename.
3593         * error.c (lang_decl_name): Use new hook.
3594         * lex.c (cxx_init): Remove old hook.
3595         * pt.c (tsubst_decl): Use new hook.
3596         * tree.c (lang_printable_name): Rename.
3598 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
3600         PR c++/3882
3601         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
3602         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
3603         only after recording the declaration.
3605 2002-03-18  Jason Merrill  <jason@redhat.com>
3607         PR c++/2039
3608         * init.c (resolve_offset_ref): Hand off to build_component_ref.
3610         PR c++/4222, c++/5995
3611         * call.c (build_over_call): Fix empty class logic.
3613         PR c++/3870
3614         * cp-tree.h (struct saved_scope): Add last_parms field.
3615         * decl.c (maybe_push_to_top_level): Save last_function_parms.
3616         (pop_from_top_level): Restore it.
3618         PR c++/4377
3619         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
3620         NON_LVALUE_EXPRs.
3622         PR c++/4003
3623         * pt.c (tsubst_friend_function): Use decl_namespace_context.
3625         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
3626         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
3627         type with a nontrivial destructor.
3629 2002-03-17  Jason Merrill  <jason@redhat.com>
3631         PR c++/4460
3632         * class.c (build_base_path): Virtual base layout is fixed in
3633         in-charge [cd]tors.
3635 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
3637         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
3638         * parse.y (yyparse): Remove macro.
3640 2002-03-17  Jason Merrill  <jason@redhat.com>
3642         PR c++/5757
3643         * init.c (build_new_1): Pass the right pointer to op delete.
3645 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
3647         PR c++/4361
3648         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
3649         conversion operators go.
3650         (struct lang_decl_flags): Add template_conv_p and unused
3651         bitfields.
3652         (DECL_TEMPLATE_CONV_FN_P): New macro.
3653         * call.c (build_user_type_conversion_1): Don't check second type
3654         conversion of overload set first.
3655         * class.c (add_method): Make sure templated conversion operators
3656         all end up on slot 2.
3657         * lex.c (do_identifier): A conversion operator token might be
3658         satisfied by a templated conversion operator.
3659         * pt.c (check_explicit_specialization): Use
3660         CLASSTYPE_FIRST_CONVERSION_SLOT.
3661         (template_parm_this_level_p): New function.
3662         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
3663         * search.c (lookup_fnfields_1): Template conversions will be on
3664         the first slot.
3665         * typeck.c (build_component_ref): Preserve the type of an
3666         conversion operator name on the overload type.
3667         (build_x_function_call): Retrieve the conversion operator name.
3669 2002-03-15  Richard Henderson  <rth@redhat.com>
3671         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
3673 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
3675         * cp-tree.h (CLEANUP_DECL): Remove.
3676         (CLEANUP_EXPR): Likewise.
3677         * decl.c (destroy_local_var): Simplify.
3678         (maybe_build_cleanup): Tidy.
3679         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
3680         * semantics.c (cp_expand_stmt): Likewise.
3681         * cp/tree.c (cp_statement_code_p): Likewise.
3683 2002-03-15  Jason Merrill  <jason@redhat.com>
3685         PR c++/5857
3686         * decl.c (duplicate_decls): Use merge_types instead of common_type.
3687         * typeck.c (common_type): Just hand off to
3688         type_after_usual_arithmetic_conversions and
3689         composite_pointer_type.
3690         (merge_types): New fn.
3691         (commonparms): Use it instead of common_type.
3692         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
3693         (composite_pointer_type): Also handle attributes.
3694         * cp-tree.h: Declare merge_types.
3696         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
3697         variables.
3698         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
3700 2002-03-14  Richard Henderson  <rth@redhat.com>
3702         * decl.c: Include c-pragma.h.
3703         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
3704         * Make-lang.in: Update dependencies.
3706 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
3708         PR c++/5908
3709         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
3710         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
3712 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
3714         * mangle.c (write_builtin_type): Handle 128-bit integers even if
3715         they are not a standard integer type.
3717 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
3719         * cp-tree.h (init_init_processing): Remove declaration.
3720         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
3721         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
3723 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3725         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
3726         Define.
3727         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
3728         tree_code_length.
3729         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
3730         cplus_tree_code_name): Delete.
3731         (cxx_init): Don't call add_c_tree_codes, instead set
3732         lang_unsafe_for_reeval.  Don't try to copy into the various
3733         tree_code arrays.
3735 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
3737         PR c++/5659
3738         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
3739         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
3740         definitions.
3742 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
3744         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
3745         DR209 is now not a defect.
3746         * cp-tree.h (skip_type_access_control): Remove.
3747         * decl.c (grokdeclarator): Do type access control for friend
3748         declarations.
3749         * semantics.c (decl_type_access_control): Don't reset
3750         current_type_lookups.
3751         (save_type_access_control): Always save the lookups.
3752         (skip_type_access_control): Remove.
3753         (finish_class_definition): Don't change type_lookups.
3755 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
3757         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
3758         It is incorrect.
3759         * typeck.c (build_static_cast): Compare non-qualified types
3760         with pointer to member conversions.
3762 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
3763             Daniel Berlin  <dan@dberlin.org>
3765         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
3766         (cxx_get_alias_set): Use it.
3768 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3770         * cp-tree.h (stabilize_expr): Prototype.
3772 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
3774         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
3775         conditional return void.
3777 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
3779         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
3780         * cp-tree.h (cxx_unsave): New.
3781         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
3782         (init_tree): Update.
3784 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3786         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
3787         explicit sizeof/sizeof.
3788         * decl2.c (cxx_decode_option): Likewise.
3789         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
3791 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
3793         PR c++/775
3794         * decl.c (lookup_tag): Only reject enum/class mismatch, not
3795         class/union mismatch.
3796         * parse.y (check_class_key): New function.
3797         (structsp): Call it.
3799 2002-03-01  Michael Matz  <matz@suse.de>
3801         * typeck.c (cp_pointer_int_sum): Complete inner type which is
3802         used later by size_in_bytes().
3804 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
3806         * cp-tree.h:  Require __GNUC__ to be #defined.
3807         (build_init):  Add missing prototype.
3809 2002-03-01  Jason Merrill  <jason@redhat.com>
3811         * except.c: Don't include decl.h or obstack.h.  Do include
3812         tree-inline.h.
3813         (build_throw): Destroy temporaries from the thrown
3814         expression before calling __cxa_throw.  Construct a thrown
3815         temporary directly into the exception object.
3816         (stabilize_throw_expr): New function.
3817         (wrap_cleanups_r): New function.
3818         * tree.c (stabilize_expr): New function.
3819         * init.c (build_init): New function.
3820         * Make-lang.in (cp/except.o): Adjust .h deps.
3822 2002-02-28  Jason Merrill  <jason@redhat.com>
3824         * search.c (lookup_base_r): Don't clear is_non_public just because
3825         we found a friendly scope.
3827         * decl.c (finish_function): Only warn about missing return
3828         statement with -Wreturn-type.
3830 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
3832         * class.c (build_clone): Update.
3833         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
3834         * cp-tree.h (cxx_dup_lang_specific_decl): New.
3835         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
3836         (copy_decl): Update.
3837         * method.c (make_thunk): Update.
3839 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
3841         * decl2.c: Delete traditional-mode-related code copied from
3842         the C front end but not used, or used only to permit the
3843         compiler to link.
3845 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
3847         PR c++/4093
3848         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
3849         to void.
3851 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
3853         PR other/5746
3854         * semantics.c (finish_switch_cond): Don't call get_unwidened
3855         if error_mark_node.
3857 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
3859         PR c++/2645, DR 295
3860         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
3861         tf_keep_type_decl.
3862         (make_typename_type): Use tsubst_flags_t.
3863         * decl.c (make_typename_type): Adjust. Return non-artificial
3864         TYPE_DECLs, if required.
3865         (grokdeclarator): Simplify CVR qualification handling. Allow bad
3866         qualifiers on typedef types.
3867         * decl2.c (handle_class_head): Adjust make_typename_type call.
3868         * parse.y (nested_name_specifier): Likewise.
3869         (typename_sub0): Likewise.
3870         (typename_sub1): Likewise.
3871         * pt.c (convert_template_argument): Adjust make_typename_type
3872         return value.
3873         (tsubst): Adjust cp_build_qualified_type_real calls.
3874         (check_cv_quals_for_unify): Cope with allowing bad qualifications
3875         on template type parms.
3876         (instantiate_decl): Recheck substitutions to give warnings on bad
3877         qualifications.
3878         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
3880 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
3882         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
3884         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
3885         unless DECL_ALWAYS_INLINE.
3887 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
3889         * typeck.c (cp_pointer_int_sum): Renamed from
3890         pointer_int_sum, call pointer_int_sum.
3892 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
3894         * decl.c (duplicate_decls): Return 0 if issued error about
3895         redeclaration.
3897 2002-02-19  Jason Merrill  <jason@redhat.com>
3899         ABI change: Mangle `void (A::*)() const' as
3900         M1AKFvvE, not MK1AFvvE.
3901         * mangle.c (write_function_type): Write cv-quals for member
3902         function type here.
3903         (write_pointer_to_member_type): Not here.
3905 2002-02-18  Jason Merrill  <jason@redhat.com>
3907         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
3908         (do_decl_instantiation): Likewise.
3910 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
3912         PR c++/5685
3913         * decl.c (duplicate_decls): Make warning unconditional
3914         if duplicate default argument declarations are present.
3916 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
3918         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
3919         shortening.
3921 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
3923         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
3924         remove incorrect comment. Move #if 0'd code to common path. Use
3925         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
3927 2002-02-13  Jason Merrill  <jason@redhat.com>
3929         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
3930         (finish_function): Don't warn if current_function_returns_null.
3932         * typeck2.c (digest_init): Do handle values of vector type.
3934         * typeck2.c (digest_init, process_init_constructor): Treat vectors
3935         like arrays.
3937 2002-02-11  Jason Merrill  <jason@redhat.com>
3939         * parse.y (reserved_declspecs): Don't handle attributes.
3940         (reserved_typespecquals): Handle them here.
3941         * Make-lang.in (parse.c): Adjust expected conflicts.
3943 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
3945         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
3946         instead of compstmt.
3947         (compstmt_or_stmtexpr): Renamed from compstmt.
3948         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
3950 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
3952         Rename instantiate_type_flags to tsubst_flags_t & expand use.
3953         * cp-tree.h (instantiate_type_flags): Rename to ...
3954         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
3955         add tf_warning flag.
3956         (instantiate_type): Adjust prototype.
3957         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
3958         do_type_instantiation, cp_build_qualified_type_real): Likewise.
3959         cp_build_qualified_type: Adjust.
3960         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
3961         tf_*.
3962         * call.c (standard_conversion): Rename itf_* to tf_*.
3963         (reference_binding): Likewise.
3964         (convert_like_real): Likewise.
3965         * cvt.c (cp_convert_to_pointer): Likewise.
3966         (convert_to_reference): Likewise.
3967         * decl.c (lookup_namespace_name): Use tf_* flags.
3968         (make_typename_type): Likewise.
3969         (grokdeclarator): Likewise.
3970         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
3971         (coerce_template_template_parms, convert_template_argument,
3972         coerce_template_parms, maybe_get_template_decl_from_type_decl,
3973         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
3974         instantiate_class_template, tsubst_template_arg_vector,
3975         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
3976         tsubst_decl, tsubst_arg_types, tsubst_function_type,
3977         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
3978         instantiate_template, fn_type_unification,
3979         resolve_overloaded_unification, verify_class_unification,
3980         unify, get_bindings_real, do_type_instantiation,
3981         regenerate_decl_from_template, instantiate_decl,
3982         tsubst_initializer_list, tsubst_enum,
3983         get_mostly_instantiated_function_type,
3984         invalid_nontype_parm_type_p): Likewise.
3985         * tree.c (cp_build_qualified_type_real): Likewise.
3986         * typeck.c (build_binary_op): Rename itf_* to tf_*.
3987         (build_ptrmemfunc): Likewise.
3988         (convert_for_assignment): Likewise.
3990 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
3992         PR c++/109
3993         * decl.c (grokdeclarator): Allow friend declarations from
3994         dependent types.
3995         * decl2.c (handle_class_head): Don't push into template parm contexts.
3996         * pt.c (push_template_decl_real): Template parm contexts are never
3997         being defined.
3999 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
4001         * class.c: Include target.h.
4002         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
4003         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
4004         bit-field layout.
4005         * Make-lang.in: Adjust deps.
4007 2002-02-05  Jason Merrill  <jason@redhat.com>
4009         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
4011 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
4013         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
4014         (finish_switch_cond): Set SWITCH_TYPE.
4016 2002-02-04  Richard Henderson  <rth@redhat.com>
4018         * method.c (use_thunk): Always initialize the block tree.  Reindent.
4019         * semantics.c (expand_body): Emit thunks after function, not before.
4021 2002-02-04  Jason Merrill  <jason@redhat.com>
4023         * decl.c (start_function): Call cplus_decl_attributes immediately
4024         after grokdeclarator.
4026         * decl.c (start_function): Combine DECL_RESULT handling code.
4028 2002-02-03  Jason Merrill  <jason@redhat.com>
4030         * xref.c: Remove.
4031         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
4032         (cp/xref.o): Remove dependencies.
4033         * class.c (finish_struct_1, check_methods): Don't call xref fns.
4034         (finish_struct_1): Likewise.
4035         * friend.c (make_friend_class): Likewise.
4036         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
4037         * spew.c (read_process_identifier): Likewise.
4039 2002-02-01  Jason Merrill  <jason@redhat.com>
4041         PR c++/4872
4042         * decl.c (finish_function): Warn about a non-void function with
4043         no return statement and no abnormal exit.
4044         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
4045         (current_function_returns_abnormally): New macro.
4046         * call.c (build_call): Set it.
4048         * typeck.c (build_component_ref): Always complain about offsetof
4049         constructs on non-PODs.  Only make it an error for members of
4050         virtual bases.
4052         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
4053         (dump_function_decl): Always dump parms.
4055         * decl2.c (finish_static_data_member_decl): Complain about a local
4056         class with a static data member.
4058         PR c++/4286
4059         * search.c (lookup_field_1): Don't xref a static data member
4060         just because we looked it up.
4062 2002-01-31  Jason Merrill  <jason@redhat.com>
4064         * Make-lang.in (parse.c): Handle .output file.
4066         PR c++/3395
4067         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
4068         not TREE_TYPE.
4069         * semantics.c (finish_class_definition): Adjust.
4071         Allow attributes in parms and casts.
4072         * parse.y (named_parm): Don't strip attrs.
4073         (declmods): Remove 'attributes' production.
4074         (nonempty_cv_qualifiers): Accept attributes.
4075         (ATTRIBUTE): Give precedence.
4076         * decl.c (groktypename): Handle attributes.
4077         (grokparms): Likewise.
4079 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
4081         * decl2.c (cxx_decode_option): Pass 0 as last argument to
4082         cpp_handle_option.
4083         * lang-specs.h: Use cpp_unique_options instead of cpp_options
4084         when used together with cc1_options.
4086 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
4088         PR c++/5132
4089         * typeck2.c (digest_init): Make sure non-array core type is
4090         instantiated.
4091         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
4092         constructor, rather than build a new one.
4093         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
4094         PURPOSE of constructor elts.
4096 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
4098         * Make-lang.in (parse.c): Adjust expected number of
4099         shift-reduce conflicts.
4100         (decl.o): Depend on diagnostic.h.
4101         * decl.c: Include diagnostic.h.
4102         (grokdeclarator): Check for null pointer.
4103         (finish_function): Don't abort when
4104         current_binding_level->parm_flag != 1, if errors have
4105         occurred; throw away the statement tree and extra binding
4106         levels, and continue.
4107         * lex.c (note_list_got_semicolon): Check for null pointer.
4108         * method.c (hack_identifier): Just return error_mark_node if
4109         value is error_mark_node.
4110         * parse.y (primary: TYPEID(type_id)): No need to use
4111         TYPE_MAIN_VARIANT here.
4112         (handler_seq): Accept an empty list of catch clauses and
4113         generate a fake handler block to avoid later crashes.
4114         (ansi_raise_identifier): Accept the error token too.
4115         * semantics.c (begin_class_definition,
4116         finish_class_definition): Check for error_mark_node.
4118 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
4120         * typeck2.c (friendly_abort): Delete definition.
4121         * cp-tree.h (friendly_abort): Don't prototype.
4122         (my_friendly_assert): Use fancy_abort.
4124 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4126         * cp-tree.h (my_friendly_abort): Remove.
4128 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
4130         * spew.c (pending_inlines, pending_inlines_tail,
4131         processing_these_inlines): Make static.
4132         (mark_pending_inlines): Remove static.
4133         (begin_parsing_inclass_inline): If in function, save pi
4134         for GC to cp_function_chain->unparsed_inlines instead.
4135         (process_next_inline): Likewise.
4136         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
4137         (mark_pending_inlines): Add prototype.
4138         * decl.c (spew_debug): Remove unused extern.
4139         (mark_lang_function): Call mark_pending_inlines.
4141 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4143         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
4144         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
4145         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
4146         Change my_fancy_abort() to abort().
4148 2002-01-23  Jason Merrill  <jason@redhat.com>
4150         PR c++/5453
4151         * class.c (fixed_type_or_null): Fix thinko.
4153         PR c++/3331
4154         * init.c (resolve_offset_ref): Use build_indirect_ref.
4156         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
4158 2002-01-22  Jason Merrill  <jason@redhat.com>
4160         * parse.y (function_body): Suppress the block for the outermost
4161         curly braces.
4162         * decl.c (pushdecl): Don't try to skip it.
4163         (begin_function_body): Keep the block we create, not the next one.
4164         * init.c (emit_base_init): Don't mess with keep_next_level.
4166         * class.c (build_base_path): Tweak formatting.
4168 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
4170         Fix regression introduced with patch for c++/775
4171         * parse.y (class_head_defn): Check for template specializations
4172         with a different class-key.
4174 2002-01-17  Jason Merrill  <jason@redhat.com>
4176         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
4177         (begin_function_body): Call them and keep_next_level.
4178         * init.c (emit_base_init): Call keep_next_level.
4179         * semantics.c (setup_vtbl_ptr): Lose.
4180         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
4181         (vtbls_set_up_p): Lose.
4182         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
4183         * method.c (do_build_copy_constructor): Likewise.
4184         (synthesize_method): Call finish_mem_initializers.
4185         * parse.y (nodecls): Likewise.
4187         * error.c (dump_type_suffix): Print the exception specs before
4188         recursing.
4189         (dump_function_decl): Here, too.
4191         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
4193 2002-01-10  Ira Ruben   <ira@apple.com>
4195         PR c++/907
4196         * decl.c (start_method): Handle attrlist.
4198 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
4200         * decl2.c (max_tinst_depth): Increase default limit to 500.
4202 2002-01-10  Graham Stott  <grahams@redhat.com>
4204         * spew.c (YYCHAR): Uppercase macro parameter and add
4205         parenthesis.
4206         (YYCODE): Likewise.
4207         (NAME): Uppercase macro parameter.
4209 2002-01-09  Graham Stott  <grahams@redhat.com>
4211         * decl.h (grokdeclarator): Wrap long line.
4213         * semantics.c (FINISH_COND): Uppercase macro paramaters and
4214         add parenthesis.
4216 2002-01-08  Graham Stott  <grahams@redhat.com>
4218         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
4219         (PALLOC): Uppercase macro parameter and whitespace.
4220         (SALLOC): Uppercase macro parameter.
4221         (SFREE): Uppercase macros parameter, add parenthese and
4222         whitespace.
4223         (STREQL): Uppercase macro parameter and whitespace.
4224         (STRNEQ): Likewise.
4225         (STRLSS): Likewise.
4226         (STRLEQ): Likewise.
4227         (STRGTR): Likewise.
4228         (STRGEQ): Likewise.
4230         * call.c (convert_like): Add parenthesis and wrap.
4231         (convert_like_with_context): Likewise.
4232         (ICS_RANK): Whitespace.
4233         (NEED_TEMPORARY_P): Remove parenthesis.
4235         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
4236         whitespace.
4237         (VTT_MARKED_BINFO_P): Likewise.
4239         * decl.c (BINDING_LEVEL): Add parenthesis.
4240         (DEF_OPERATOR): Likewise.
4242         * mangle.c (MANGLE_TRACE): Add parenthesis.
4243         (MANGLE_TRACE_TREE): Likewise.
4244         (write_signed_number): Likewise.
4245         (write_unsigned_number): Likewise.
4247         * pt.c (ccat): Uppercase macro parameter.
4248         (cat): Likewise
4250         * search.c (SET_BINFO_ACCESS): Add parenthesis.
4252 2002-01-07  Jason Merrill  <jason@redhat.com>
4254         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
4255         to pedwarn.
4257         PR c++/3536
4258         * method.c (make_thunk): If !flag_weak, give the thunk the
4259         function's linkage.
4260         (use_thunk): Here, too.
4262 2002-01-07  Graham Stott  <grahams@redhat.com>
4264         * error.c: Update copyright date.
4265         (print_scope_operator): Add parenthesis.
4266         (print_left_paren): Likewise.
4267         (print_right_paren): Likewise.
4268         (print_left_bracket): Likewise.
4269         (print_right_bracket): Likewise.
4270         (print_template_argument_list_start): Likewise.
4271         (print_template_argument_list_end): Likewise.
4272         (print_non_consecutive_character): Likewise.
4273         (print_tree_identifier): Likewise.
4274         (print_identifier): Likewise.
4275         (NEXT_CODE): Uppercase macro parameter.
4276         (ident_fndecl): Delete unused.
4277         (GLOBAL_THING): Likewise.
4279 2002-01-06  Graham Stott  <grahams@redhat.com>
4281         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
4282         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
4283         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
4284         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
4285         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
4286         (C_IS_RESERVED_WORD): Uppercase macro parameter.
4287         (C_RID_YYCODE) Likewise.
4288         (ptrmem_cst): Use rtx.
4289         (LOCAL_BINDING_P): Add whitespace.
4290         (INHERITED_VALUE_BINDING_P): Likewise.
4291         (BINDING_SCOPE): Wrap long line.
4292         (BINDING_HAS_LEVEL_P): Remove parenthesis.
4293         (BINDING_VALUE): Wrap long line.
4294         (BINDING_TYPE): Whitespace.
4295         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
4296         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
4297         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
4298         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
4299         (same_type_p): Uppercase macro parameters.
4300         (same_type_ignoring_top_level_qualifiers_p): Likewise.
4301         (OVL_FUNCTION): Wrap long line.
4302         (OVL_CHAIN): Whitespace.
4303         (OVL_CURRENT): Add parenthesis and whitespace.
4304         (OVL_NEXT): Whitespace.
4305         (OVL_USED): Likewise.
4306         (IDENTIFIER_TYPE_VALUE): Likewise.
4307         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
4308         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
4309         (LANG_ID_FIELD): Whitespace.
4310         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
4311         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
4312         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
4313         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
4314         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
4315         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
4316         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
4317         (IDENTIFIER_VIRTUAL_P): Likewise.
4318         (IDENTIFIER_OPNAME_P): Likewise.
4319         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
4320         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
4321         (C_SET_EXP_ORIGINAL_CODE): Likewise.
4322         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
4323         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
4324         (IS_AGGR_TYPE): Uppercase macro parameter.
4325         (CLASS_TYPE_P): Likewise.
4326         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
4327         (IS_AGGR_TYPE_2): Whitespace.
4328         (TAGGED_TYPE_P): Uppercase macro parameter.
4329         (TYPE_BUILT_IN): Whitespace.
4330         (TYPE_FOR_JAVA): Likewise.
4331         (FUNCTION_ARG_CHAIN): Remove parenthesis.
4332         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
4333         (FUNCTION_FIRST_USER_PARAM): Likewise.
4334         (PROMOTES_TO_AGGR_TYPE): Whitespace.
4335         (DERIVED_FROM_P): Add parenthesis and wrap.
4336         (UNIQUELY_DERIVED_FROM_P): Likewise.
4337         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
4338         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
4339         (CLASSTYPE_USE_TEMPLATE): Whitespace.
4340         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
4341         (TYPE_GETS_DELETE): Add parenthesis.
4342         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
4343         (TYPE_HAS_ASSIGN_REF): Likewise,
4344         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
4345         (TYPE_HAS_INIT_REF): Likewise.
4346         (TYPE_HAS_CONST_INIT_REF): Likewise.
4347         (TYPE_BEING_DEFINED): Likewise.
4348         (TYPE_LANG_SPECIFIC): Likewise.
4349         (CLASSTYPE_RTTI): Likewise.
4350         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
4351         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
4352         (TYPE_OVERLOADS_ARROW): Likewise.
4353         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
4354         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
4355         (CLASSTYPE_METHOD_VEC): Likewise.
4356         (CLASSTYPE_MARKED_N): Likewise.
4357         (CLASSTYPE_MARKED): Likewise.
4358         (CLASSTYPE_MARKED2): Likewise.
4359         (CLASSTYPE_MARKED3): Likewise.
4360         (CLASSTYPE_MARKED4): Likewise.
4361         (CLASSTYPE_MARKED5): Likewise.
4362         (CLASSTYPE_MARKED6): Likewise.
4363         (SET_CLASSTYPE_MARKED): Whitespace.
4364         (CLEAR_CLASSTYPE_MARKED): Likewise.
4365         (SET_CLASSTYPE_MARKED2): Likewise.
4366         (CLEAR_CLASSTYPE_MARKED2): Likewise.
4367         (SET_CLASSTYPE_MARKED3): Likewise.
4368         (CLEAR_CLASSTYPE_MARKED3): Likewise.
4369         (SET_CLASSTYPE_MARKED4): Likewise.
4370         (CLEAR_CLASSTYPE_MARKED4): Likewise.
4371         (SET_CLASSTYPE_MARKED5): Likewise.
4372         (CLEAR_CLASSTYPE_MARKED5): Likewise.
4373         (SET_CLASSTYPE_MARKED6): Likewise.
4374         (CLEAR_CLASSTYPE_MARKED6): Likewise.
4375         (CLASSTYPE_TAGS): Likewise.
4376         (CLASSTYPE_VSIZE): Likewise.
4377         (CLASSTYPE_VBASECLASSES): Likewise.
4378         (CANONICAL_BINFO): Add parenthesis.
4379         (CLASSTYPE_SIZE(NODE): Likewise.
4380         (CLASSTYPE_SIZE_UNIT): Likewise.
4381         (CLASSTYPE_ALIGN(NODE): Likewise.
4382         (CLASSTYPE_USER_ALIGN): Likewise.
4383         (TYPE_JAVA_INTERFACE): Likewise.
4384         (CLASSTYPE_PURE_VIRTUALS): Likewise.
4385         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
4386         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
4387         (CLASSTYPE_HAS_MUTABLE): Likewise.
4388         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
4389         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
4390         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
4391         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
4392         (CLASSTYPE_INTERFACE_ONLY): Likewise.
4393         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
4394         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
4395         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
4396         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
4397         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
4398         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
4399         (BINFO_UNSHARED_MARKED): Whitespace.
4400         (BINFO_MARKED): Whitespace and wrap.
4401         (SET_BINFO_MARKED): Likewise.
4402         (CLEAR_BINFO_MARKED): Likewise.
4403         (BINFO_VTABLE_PATH_MARKED): Likewise.
4404         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
4405         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
4406         (BINFO_SUBVTT_INDEX): Remove parenthesis.
4407         (BINFO_VPTR_INDEX): Likewise.
4408         (BINFO_PRIMARY_BASE_OF): Likewise,
4409         (CLASSTYPE_VFIELDS): Whitespace.
4410         (VF_DERIVED_VALUE): Wrap long line.
4411         (NAMESPACE_LEVEL): Whitespace.
4412         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
4413         (DEFARG_POINTER): Whitespace.
4414         (DECL_NEEDED_P): Remove parenthesis.
4415         (DECL_LANGUAGE): Whitespace.
4416         (SET_DECL_LANGUAGE): Add parenthesis.
4417         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
4418         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
4419         (DECL_IN_AGGR_P): Whitespace.
4420         (DECL_FRIEND_P): Likewise.
4421         (DECL_BEFRIENDING_CLASSES): Likewise.
4422         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
4423         (DECL_NONCONVERTING_P): Whitespace.
4424         (DECL_PURE_VIRTUAL_P): Likewise.
4425         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
4426         (DECL_PENDING_INLINE_INFO): Whitespace.
4427         (DECL_SORTED_FIELDS): Likewise.
4428         (DECL_DEFERRED_FN): Likewise.
4429         (DECL_TEMPLATE_INFO): Likewise.
4430         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
4431         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
4432         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
4433         (TMPL_ARGS_LEVEL): Likewise.
4434         (SET_TMPL_ARGS_LEVEL): Likewise.
4435         (INNERMOST_TEMPLATE_PARMS): Whitespace.
4436         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
4437         (INTEGRAL_CODE_P(CODE): Add parenthesis.
4438         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
4439         (TYPE_HAS_CONSTRUCTOR): Whitespace.
4440         (TREE_HAS_CONSTRUCTOR): Likewise.
4441         (TYPE_HAS_DESTRUCTOR): Likewise.
4442         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
4443         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
4444         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
4445         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
4446         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
4447         (TYPE_PTRMEMFUNC_P): Likewise.
4448         (TYPE_PTRMEMFUNC_FLAG): Likewise.
4449         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
4450         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
4451         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
4452         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
4453         (DECL_ACCESS): Whitespace.
4454         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
4455         (DECL_GLOBAL_DTOR_P): Likewise.
4456         (GLOBAL_INIT_PRIORITY): Likewise.
4457         (DECL_TEMPLATE_PARMS): Likewise.
4458         (DECL_TEMPLATE_RESULT): Likewise.
4459         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
4460         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
4461         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
4462         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
4463         (PRIMARY_TEMPLATE_P): Add parenthesis.
4464         (DECL_USE_TEMPLATE): Whitespace.
4465         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
4466         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
4467         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
4468         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
4469         (CALL_DECLARATOR_PARMS): Remove parenthesis.
4470         (CALL_DECLARATOR_QUALS): Likewise.
4471         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
4472         (TEMP_NAME_P): Wrap.
4473         (VFIELD_NAME_P): Likewise.
4474         (B_SET): Uppercase macro parameters and add parenthesis.
4475         (B_CLR): Likewise.
4476         (B_TST): Likewise.
4477         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
4478         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
4479         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
4480         (same_or_base_type_p): Likewise.
4481         (cp_deprecated): Likewise.
4483 2002-01-05  Richard Henderson  <rth@redhat.com>
4485         * semantics.c (expand_body): Revert last change.
4487 2002-01-04  Jason Merrill  <jason@redhat.com>
4489         PR c++/4122
4490         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
4491         lost primary.
4493         * class.c (build_vtbl_initializer): Check for a lost primary
4494         before calculating the vtable entry to throw away.
4496 2002-01-02  Jason Merrill  <jason@redhat.com>
4498         * semantics.c (expand_body): Call outlining_inline_function when
4499         emitting an inline function out of line.
4501 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4503         PR c++/5116, c++/764 reversion
4504         * call.c (build_new_op): Revert the instantiations. They are
4505         incorrect.
4507 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4509         PR c++/5089
4510         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
4512 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4514         PR c++/3716
4515         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
4516         (tsubst, case POINTER_TYPE): Handle pmfs here.
4517         (tsubst, case OFFSET_TYPE): Check it is not an offset to
4518         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
4520 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4522         PR c++/35
4523         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
4524         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
4525         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
4526         PARM_DECL.
4527         (tsubst_template_parms): Break up loop statements.
4528         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
4529         parm PARM_DECLs don't get promoted.
4531 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4533         PR c++/5123
4534         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
4535         (build_x_function_call): Cope with a COMPONENT_REF containing a
4536         TEMPLATE_ID_EXPR.
4538 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4540         PR c++/5213
4541         * pt.c (convert_template_argument): Be more careful determining
4542         when RECORD_TYPE templates are or are not templates.
4544 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4546         PR c++/775
4547         * cp-tree.h (handle_class_head): Adjust prototype.
4548         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
4549         parameters. Use for all class heads.
4550         * parse.y (named_class_head_sans_basetype, named_class_head,
4551         named_complex_class_head_sans_basetype,
4552         named_class_head_sans_basetype_defn,
4553         unnamed_class_head): Remove.
4554         (class_head, class_head_apparent_template): Recognize class heads
4555         (class_head_decl, class_head_defn): New reductions. Process class
4556         heads.
4557         (structsp): Adjust class definition and class declaration
4558         reductions.
4559         (maybe_base_class_list): Give diagnostic on empty list.
4561 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4563         PR c++/4379
4564         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
4565         single non-static member.
4566         (unary_complex_lvalue): If it cannot be a pointer to member, don't
4567         make it so. Check it is not pointer to reference.
4569 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4571         PR c++/5132
4572         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
4573         are processing a template decl.
4575 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4577         PR c++/5116, c++/764
4578         * call.c (build_new_op): Make sure template class operands are
4579         instantiated. Simplify arglist construction.
4581 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
4583         * call.c (build_user_type_conversion_1): Use my_friendly_assert
4584         rather than if ... abort.
4585         * cvt.c (convert_to_reference): Likewise.
4586         * semantics.c (setup_vtbl_ptr): Likewise.
4587         * pt.c (lookup_template_class): Comment typo.
4589 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
4591         PR c++/5125
4592         * pt.c (push_template_decl_real): Make sure DECL has
4593         DECL_LANG_SPECIFIC.
4595 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
4597         PR c++/335
4598         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
4599         for non-reference fields.
4600         * typeck.c (require_complete_type): Use resolve_offset_ref).
4602 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
4604         PR c++/196
4605         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
4607 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
4609         PR c++/160
4610         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
4611         up. Don't stabilize_references when initializing a reference.
4613 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4615         * decl2.c (lang_f_options): Const-ify.
4617 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
4619         * config-lang.in (diff_excludes): Remove.
4621 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
4623         PR c++/90
4624         * typeck.c (build_function_call_real): Use original function
4625         expression for errors.
4627 2001-12-18  Jason Merrill  <jason@redhat.com>
4629         PR c++/3242
4630         * class.c (add_method): Do compare 'this' quals when trying to match a
4631         used function.  Don't defer to another used function.
4633 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
4635         * pt.c (instantiate_clone): Remove, fold into ...
4636         (instantiate_template): ... here. Simplify by removing mutual
4637         recursion.
4638         * typeck2.c (build_m_component_ref): Don't cv qualify the function
4639         pointed to by a pointer to function.
4640         * class.c (delete_duplicate_fields_1): Typo.
4642 2001-12-18  Jason Merrill  <jason@redhat.com>
4644         C++ ABI change: destroy value arguments in caller.
4645         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
4646         create an extra binding level for the parameters.
4647         * decl.c (store_parm_decls): Don't do parameter cleanups.
4649 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
4651         * call.c (build_new_method_call): Use '%#V'.
4652         * error.c (cv_to_string): Use V parameter to determine padding.
4654 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
4656         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
4657         spellings in messages.
4659 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
4661         * cp-tree.h: Delete #defines for cp_error, cp_warning,
4662         cp_pedwarn, and cp_compiler_error.
4663         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
4664         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
4665         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
4666         typeck2.c: Change calls to the above macros to use their
4667         language-independent equivalents: error, warning, pedwarn, and
4668         internal_error respectively.
4670 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
4672         * decl2.c (finish_file): Remove back_end_hook.
4674 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
4676         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
4677         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
4678         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
4680 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
4682         * lang-options.h: Use American spelling in messages.
4684 2001-12-13  Jason Merrill  <jason@redhat.com>
4686         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
4688         Use cleanups to run base and member destructors.
4689         * init.c (push_base_cleanups): New function, split out from...
4690         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
4691         * decl.c (finish_destructor_body): Move vbase destruction code to
4692         push_base_cleanups.
4693         (begin_function_body, finish_function_body): New fns.
4694         (finish_function): Move [cd]tor handling and call_poplevel to
4695         finish_function_body.
4696         (pushdecl): Skip the new level.
4697         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
4698         (setup_vtbl_ptr): Call push_base_cleanups.
4699         * method.c (synthesize_method): Call {begin,end}_function_body.
4700         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
4701         * cp-tree.h: Declare new fns.
4702         * parse.y (function_body, .begin_function_body): New nonterminals.
4703         (fndef, pending_inline, function_try_block): Use function_body.
4704         (ctor_initializer_opt, function_try_block): No longer has a value.
4705         (base_init): Remove .set_base_init token.
4706         (.set_base_init, compstmt_or_error): Remove.
4707         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
4709         * optimize.c (maybe_clone_body): Fix parameter updating.
4711 2001-12-12  Jason Merrill  <jason@redhat.com>
4713         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
4714         * semantics.c (genrtl_start_function): Don't pass
4715         parms_have_cleanups or push an extra binding level.
4716         (genrtl_finish_function): Lose cleanup_label cruft.
4718         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
4719         (ctor_label): Remove.
4720         * semantics.c (finish_return_stmt): Lose ctor_label support.
4721         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
4722         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
4723         dtor_label.
4725         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
4726         check for [cd]tors.
4727         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
4729         * decl.c (finish_function): Check VMS_TARGET, not VMS.
4731         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
4732         (end_cleanup_fn): And poplevel.
4734         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
4735         if we're in a template.
4737 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
4739         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
4740         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
4741         THIS_NAME_P): Delete.
4742         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
4743         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
4744         with internal naming scheme.
4745         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
4747 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
4749         * decl.c (grokdeclarator): Deprecated implicit typename use.
4751 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
4753         PR g++/51
4754         * parse.y (frob_specs): Indicate it is a language linkage which
4755         contained the extern.
4756         * decl.c (grokdeclarator): Allow extern language linkage with
4757         other specifiers.
4759 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
4761         PR g++/72
4762         * decl.c (add_binding): Don't reject duplicate typedefs involving
4763         template parameters.
4765 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
4767         * parse.y, semantics.c: Similarly.
4769 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
4771         PR g++/87
4772         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
4773         (copy_args_p): Rename to ...
4774         (copy_fn_p): ... here.
4775         (grok_special_member_properties): New function.
4776         (grok_op_properties): Lose VIRTUALP parameter.
4777         (copy_assignment_arg_p): Remove.
4778         * call.c (build_over_call): Use copy_fn_p.
4779         * decl.c (grokfndecl): Reformat. Adjust call to
4780         grok_op_properties.
4781         (copy_args_p): Rename to ...
4782         (copy_fn_p): ... here. Reject template functions. Check for pass
4783         by value.
4784         (grok_special_member_properties): Remember special functions.
4785         (grok_ctor_properties): Don't remember them here, just check.
4786         (grok_op_properties): Likewise.
4787         (start_method): Call grok_special_member_properties.
4788         * decl2.c (grokfield): Likewise.
4789         (copy_assignment_arg_p): Remove.
4790         (grok_function_init): Don't remember abstract assignment here.
4791         * pt.c (instantiate_class_template): Call
4792         grok_special_member_properties.
4793         (tsubst_decl): Adjust grok_op_properties call.
4795 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
4797         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
4798         RID_TYPES_COMPATIBLE_P.
4800 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4802         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
4803         call to build_aggr_init.
4804         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
4806 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
4808         * parse.y: Replace uses of the string non-terminal with STRING.
4809         Don't perform string concatentaion here.
4810         (string): Remove non-terminal.
4811         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
4813 2001-12-05  Jason Merrill  <jason@redhat.com>
4815         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
4816         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
4817         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
4818         * pt.c (push_tinst_level): No longer static.
4819         * cp-tree.h: Declare them.
4821         * init.c (resolve_offset_ref): Don't check access for the base
4822         conversion to access a FIELD_DECL.
4824         * cp-tree.h (TYPE_REFFN_P): New macro.
4825         * decl.c (bad_specifiers): Check it, too.
4827         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
4828         on the __*_type_info type if we haven't seen a definition.
4830 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
4832         * decl.c: Include c-common.h.
4833         (shadow_warning): Move to c-common.c.
4835 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4837         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
4839 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
4841         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
4843 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
4845         PR g++/164
4846         * init.c (sort_base_init): Allow binfos to be directly specified.
4847         * method.c (do_build_copy_constructor): Explicitly convert to the
4848         base instance.
4849         (do_build_assign_ref): Likewise.
4851 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
4853         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
4854         declaration and initialization.
4856 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
4858         * typeck2.c: Remove leading capital from diagnostic messages, as
4859         per GNU coding standards.
4861 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
4863         PR c++/3394
4864         * decl.c (xref_basetypes): Handle attributes between
4865         'class' and name.
4867 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
4869         PR g++/3381
4870         * parse.y (named_complex_class_head_sans_basetype): Add new
4871         reduction.
4872         * Make-lang.in (parse.c): Adjust expected conflict count.
4874 2001-12-03  Jason Merrill  <jason@redhat.com>
4876         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
4877         immediate binfos for our virtual bases.
4879 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
4881         * call.c (build_java_interface_fn_ref): Similarly.
4882         * except.c (is_admissible_throw_operand): Similarly.
4883         * init.c (build_java_class_ref): Similarly.
4884         * xref.c (open_xref_file): Similarly.
4886 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4888         * class.c (finish_struct): Remove trailing periods from messages.
4889         * decl.c (check_tag_decl): Similarly.
4890         * lex.c (cxx_set_yydebug): Similarly.
4891         * typeck2.c (friendly_abort): Similarly.
4893 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
4895         PR c++/3048
4896         * cp-tree.h (ovl_member): Remove.
4897         * decl2.c (merge_functions): Handle extern "C" functions
4898         specially.
4899         * tree.c (ovl_member): Remove.
4901 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
4903         PR c++/4842
4904         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
4905         FUNCTION_DECL, as input.
4906         (mark_overriders): Remove.
4907         (warn_hidden): Rework for the new ABI.
4909 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
4911         PR c++/3471
4912         * call.c (convert_like_real): Do not build additional temporaries
4913         for rvalues of class type.
4915 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
4917         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
4918         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
4919         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
4920         (DERIVED_FROM_P): Likewise.
4921         (enum base_access): Renumber, add ba_quiet bit mask.
4922         (get_binfo): Remove.
4923         (get_base_distance): Remove.
4924         (binfo_value): Remove.
4925         (ACCESSIBLY_DERIVED_FROM_P): Remove.
4926         * call.c (standard_conversion): Use lookup_base.
4927         * class.c (strictly_overrides): Likewise.
4928         (layout_virtual_bases): Likewise.
4929         (warn_about_ambiguous_direct_bases): Likewise.
4930         (is_base_of_enclosing_class): Likewise.
4931         (add_vcall_offset_vtbl_entries_1): Likewise.
4932         * cvt.c (build_up_reference): Adjust comment.
4933         * init.c (build_member_call): Reformat.
4934         * search.c (get_binfo): Remove.
4935         (get_base_distance_recursive): Remove.
4936         (get_base_distance): Remove.
4937         (lookup_base_r): Tweak.
4938         (lookup_base): Add ba_quiet control. Complete the types here.
4939         (covariant_return_p): Use lookup_base.
4940         * tree.c (binfo_value): Remove.
4941         (maybe_dummy_object): Use lookup_base.
4942         * typeck.c (build_static_cast): Use lookup_base.
4943         (get_delta_difference): Likewise.
4944         * typeck2.c (binfo_or_else): Use lookup_base.
4945         (build_scoped_ref): Add back error_mark_check.
4946         (build_m_component_ref): Use lookup_base.
4948 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
4950         * Make-lang.in (c++.generated-manpages): New dummy target.
4952 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4954         * Make-lang.in (cp-lang.o): Depends on c-common.h.
4955         * cp-lang.c (c-common.h): Include.
4956         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
4957         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
4958         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
4960 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
4962         * decl2.c (c_language): Move to c-common.c.
4963         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
4964         functions.
4965         (cxx_init): Update.
4967 2001-11-26  Jason Merrill  <jason@redhat.com>
4969         * call.c (joust): Remove COND_EXPR hack.
4971 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
4973         * search.c (lookup_base_r): Declare bk in variable declaration
4974         space.
4976 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
4978         PR g++/3145
4979         * class.c (build_vbase_pointer): Remove.
4980         (build_vbase_path): Remove.
4981         (build_base_path): New function.
4982         * cp-tree.h (base_access, base_kind): New enumerations.
4983         (build_base_path): Declare.
4984         (convert_pointer_to_real): Remove.
4985         (convert_pointer_to): Remove.
4986         (lookup_base): Declare.
4987         (convert_pointer_to_vbase): Remove.
4988         * call.c (build_scoped_method_call): Use lookup_base &
4989         build_base_path instead of convert_pointer_to_real,
4990         get_base_distance & get_binfo.
4991         (build_over_call): Likewise.
4992         * cvt.c (cp_convert_to_pointer): Likewise.
4993         (convert_to_pointer_force): Likewise.
4994         (build_up_reference): Likewise.
4995         (convert_pointer_to_real): Remove.
4996         (convert_pointer_to): Remove.
4997         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
4998         instead of convert_pointer_to_vbase & build_vbase_path.
4999         (emit_base_init): Use build_base_path instead of
5000         convert_pointer_to_real.
5001         (expand_virtual_init): Lose unrequired conversions.
5002         (resolve_offset_ref): Use lookup_base and build_base_path
5003         instead of convert_pointer_to.
5004         * rtti.c (build_dynamic_cast_1): Use lookup_base &
5005         build_base_path instead of get_base_distance & build_vbase_path.
5006         * search.c (get_vbase_1): Remove.
5007         (get_vbase): Remove.
5008         (convert_pointer_to_vbase): Remove.
5009         (lookup_base_r): New function.
5010         (lookup_base): New function.
5011         * typeck.c (require_complete_type): Use lookup_base &
5012         build_base_path instead of convert_pointer_to.
5013         (build_component_ref): Likewise.
5014         (build_x_function_call): Likewise.
5015         (get_member_function_from_ptrfunc): Likewise.
5016         (build_component_addr): Likewise.
5017         * typeck2.c (build_scoped_ref): Likewise.
5019 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5021         * cp-tree.h (CP_TYPE_QUALS): Removed.
5022         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
5023         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
5024         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
5025         * dump.c (cp_dump_tree): Use void* dump_info argument to match
5026         lang-hooks prototype.
5027         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
5028         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
5029         CP_TYPE_QUALS changed to cp_type_quals.
5030         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
5031         (CXX_C_OBJS): Remove c-dump.o.
5033 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
5035         PR c++/3637
5036         * pt.c (lookup_template_class): Ensure that all specializations
5037         are registered on the list corresponding to the most general
5038         template.
5040 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
5042         * call.c (non_reference): Add documentation.
5043         (convert_class_to_reference): Do not strip reference types
5044         from conversion operators.
5045         (maybe_handle_ref_bind): Simplify.
5046         (compare_ics): Correct handling of references.
5048 2001-11-19  John Wilkinson <johnw@research.att.com>
5050         * dump.c (dump_op): New function.
5051         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
5052         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
5053         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
5055 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
5057         PR4629
5058         * semantics.c (finish_sizeof): Make sure that expression created
5059         while processing a template do not have a type.
5060         (finish_alignof): Likewise.
5061         * typeck.c (c_sizeof): Likewise.
5062         (expr_sizeof): Likewise.
5064 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5066         * lex.c (cxx_finish): Call c_common_finish.
5067         (finish_parse): Remove.
5069 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5071         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
5072         when displaying error message about missing array bounds.
5074 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5076         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
5077         CONST_CAST_EXPR.
5078         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
5080 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
5082         * cp-tree.h (print_class_statistics): Restore.
5084 2001-11-15  Jason Merrill  <jason@redhat.com>
5086         * method.c (use_thunk): Don't emit debugging information for thunks.
5088         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
5089         * decl.c (make_typename_type): Handle getting a class template.
5090         * search.c (lookup_field_r): A class template is good enough for
5091         want_type.
5093         * call.c (convert_like_real): Only use cp_convert for the bad part.
5094         (standard_conversion): Also allow bad int->enum.
5095         * typeck.c (ptr_reasonably_similar): Also allow functions to
5096         interconvert.  Pointers to same-size integers are reasonably
5097         similar.
5099         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
5100         give it void type.
5102 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
5104         PR g++/3154
5105         * init.c (sort_base_init): Remove unreachable code.
5106         (expand_member_init): Adjust comment to reflect reality. Simplify
5107         and remove unreachable code.
5109 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
5111         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
5112         (cxx_init): Update prototype.
5113         * decl.c (init_decl_processing): Rename.  Move null node init
5114         to its creation time.
5115         * lex.c (cxx_init_options): Update.
5116         (cxx_init): Combine with old init_parse; also call
5117         cxx_init_decl_processing.
5119 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
5121         * decl.c (check_initializer): Try to complete the type of an
5122         array element before checking whether it's complete.  Don't
5123         complain about arrays with complete element types but an
5124         unknown size.
5125         (cp_finish_decl): Build the hierarchical constructor before
5126         calling maybe_deduce_size_from_array_init.
5128 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
5130         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
5132 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
5134         PR g++/4206
5135         * parse.y (already_scoped_stmt): Remove.
5136         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
5138 2001-11-12  H.J. Lu <hjl@gnu.org>
5140         * cvt.c (ocp_convert): Don't warn the address of a weak
5141         function is always `true'.
5143 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5145         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
5146         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
5147         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
5148         * cp-tree.h (print_class_statistics): Remove.
5149         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
5150         cxx_print_identifier, cxx_set_yydebug): New.
5151         * lex.c (set_yydebug): Rename c_set_yydebug.
5152         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
5153         lang_print_xnode): Rename.
5154         * tree.c (print_lang_statistics): Rename.
5156 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5158         * class.c (dump_array): Fix format specifier warning.
5160 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5162         * cp-lang.c (LANG_HOOKS_NAME): Override.
5163         (struct lang_hooks): Constify.
5164         * lex.c (cxx_init_options): Update.
5165         (lang_identify): Remove.
5166         * parse.y (language_string): Remove.
5168 2001-11-08  Andreas Franck  <afranck@gmx.de>
5170         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
5171         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
5172         suggested by autoconf.
5173         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
5174         (c++.install-common): Use the transformed target alias names.
5176 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
5178         * Make-lang.in: Update.
5179         * cp-lang.c: Include langhooks-def.h.
5181 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5183         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
5185 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5187         * lex.c (copy_lang_type): Add static prototype.
5189 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5191         * pt.c (unify): Handle SCOPE_REF.
5193 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
5195         * tree.c (cp_copy_res_decl_for_inlining): Adjust
5196         DECL_ABSTRACT_ORIGIN for the return variable.
5198 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
5200         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
5202 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
5204         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
5205         semantics.c, spew.c: Fix spelling errors.
5207 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5209         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
5211 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
5213         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
5214         pop_everything.
5216 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5218         * cp-lang.c (cxx_get_alias_set): New function.
5219         Point LANG_HOOKS_GET_ALIAS_SET to it.
5221 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5223         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
5224         * cp-tree.h (make_unbound_class_template): Prototype new function.
5225         * decl.c (make_unbound_class_template): New function.
5226         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
5227         * error.c (dump_type): Likewise.
5228         * mangle.c (write_type): Likewise.
5229         * parse.y (template_parm): Likewise.
5230         (template_argument): Use make_unbound_class_template.
5231         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
5232         (tsubst): Likewise.
5233         (tsubst_copy): Likewise.
5234         (unify): Likewise.
5235         * tree.c (walk_tree): Likewise.
5236         * typeck.c (comptypes): Likewise.
5238 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5240         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
5241         extra calls into fewer ones.
5243 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
5245         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
5246         Warn when merging inline with attribute noinline.
5247         (start_decl, start_function): Warn if inline and attribute
5248         noinline appear in the same declaration.
5250 2001-10-16  H.J. Lu <hjl@gnu.org>
5252         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
5253         for tree checking disabled.
5255 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
5257         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
5258         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
5260 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
5262         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
5263         (unify): Only handle MINUS_EXPR specially if the above flag is set
5264         and the subtracted constant is 1.  Clear the flag on recursive calls.
5265         Set it when unifying the maximum value in an INTEGER_TYPE's range.
5267 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
5269         * decl.c (bad_specifiers): Don't allow exception specifications
5270         on any typedefs.
5272 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
5274         * cp/lex.c (init_cp_pragma): Similarly.
5276 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5278         * pt.c (lookup_template_class): Build complete template arguments
5279         for BOUND_TEMPLATE_TEMPLATE_PARM.
5281 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5283         * cp-tree.h (TYPE_BINFO): Update comment.
5284         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
5285         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
5286         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
5287         (copy_type): Prototype new function.
5288         * lex.c (copy_lang_decl): Gather tree node statistics.
5289         (copy_lang_type): New function.
5290         (copy_type): Likewise.
5291         (cp_make_lang_type): Create lang_type for
5292         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
5293         and BOUND_TEMPLATE_TEMPLATE_PARM.
5294         * pt.c (tsubst): Use copy_type instead of copy_node.
5295         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
5297 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5299         * pt.c (determine_specialization): Ignore functions without
5300         DECL_TEMPLATE_INFO.
5302 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
5304         PR g++/4476
5305         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
5307 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
5309         * typeck2.c (store_init_value): Don't re-digest a bracketed
5310         initializer.
5312         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
5313         ANON_AGGR_TYPE_P.
5315 2001-10-11  Richard Henderson  <rth@redhat.com>
5317         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
5318         of an asm statement.
5319         (build_vtbl_ref_1): Split out from build_vtbl_ref.
5320         (build_vfn_ref): Use it to handle vtable descriptors before
5321         calling build_vtable_entry_ref.
5322         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
5324 2001-10-10  Richard Henderson  <rth@redhat.com>
5326         * parse.y (asm_operand): Allow named operands.
5327         * semantics.c (finish_asm_stmt): Tweek for changed location
5328         of the operand constraint.
5330 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
5332         * call.c (standard_conversion): Add bad conversion between
5333         integers and pointers.
5334         (convert_like_real): Don't use convert_for_initialization for bad
5335         conversions; complain here and use cp_convert.
5336         (build_over_call): Don't handle bad conversions specially.
5337         (perform_implicit_conversion): Allow bad conversions.
5338         (can_convert_arg_bad): New fn.
5339         * cp-tree.h: Declare it.
5340         * typeck.c (convert_for_assignment): Use it.
5341         (ptr_reasonably_similar): Any target type is similar to void.
5343 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
5345         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
5346         (cp/cp-lang.o): New rule.
5347         * cp-tree.h: Declare hooks.
5348         * tree.c: Make hooks non-static.
5349         (init_tree): Don't initialize hooks here.
5350         * lex.c: Likewise.  Move definition of lang_hooks to...
5351         * cp-lang.c: ... new file.
5353 2001-10-08  Richard Henderson  <rth@redhat.com>
5355         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
5356         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
5358 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5360         * class.c (build_vtable_entry_ref): Const-ify.
5361         * decl.c (predefined_identifier,
5362         initialize_predefined_identifiers): Likewise.
5363         * init.c (build_new_1): Likewise.
5364         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
5365         Likewise.
5367 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
5369         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
5370         (INSNS_PER_STMT): Likewise.
5371         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
5372         (copy_body, initialize_inlined_parameters): Likewise.
5373         (declare_return_variable, inlinable_function_p): Likewise.
5374         (expand_call_inline, expand_calls_inline): Likewise.
5375         (optimize_inline_calls, clone_body): Likewise.
5376         * tree.c (walk_tree): Moved to ../tree-inline.c.
5377         (walk_tree_without_duplicates): Likewise.
5378         (copy_tree_r, remap_save_expr): Likewise.
5380 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
5382         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
5383         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
5384         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
5385         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
5386         (flag_inline_trees): Moved declaration to ../tree-inline.h.
5387         (walk_tree): Moved declaration to ../tree-inline.h.
5388         (walk_tree_without_duplicates, copy_tree_r): Likewise.
5389         (remap_save_expr): Likewise.
5390         * decl.c: Include tree-inline.h.
5391         (lang_mark_tree): Don't mark inlined_fns.
5392         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
5393         * optimize.c: Include tree-inline.h.
5394         (optimize_inline_calls): Move declaration to ../tree.h, as
5395         non-static.
5396         (remap_decl): Use language-independent constructs and hooks.
5397         (remap_block, copy_body_r, declare_return_variable): Likewise.
5398         (inlinable_function_p): Likewise.  Don't test for
5399         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
5400         no longer language-specific.
5401         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
5402         call of dump_function to...
5403         (optimize_function): Here...
5404         (clone_body): New function, extracted from...
5405         (maybe_clone_body): ... here.  Build decl_map locally and pass
5406         it on to clone_body.
5407         * pt.c, semantics.c: Include tree-inline.h.
5408         * tree.c: Likewise.
5409         (cp_walk_subtrees): New language-specific hook for tree inlining.
5410         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
5411         cp_is_overload_p, cp_auto_var_in_fn_p,
5412         cp_copy_res_decl_for_inlining): Likewise.
5413         (walk_tree): Move language-specific constructs into...
5414         (cp_walk_subtrees): this new function.
5415         (copy_tree_r): Use language-independent constructs and hooks.
5416         (init_tree): Initialize tree inlining hooks.
5417         (remap_save_expr): Adjust prototype so that the declaration
5418         does not require the definition of splay_tree.
5420 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5422         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
5423         to build the declaration instead of the declaration itself.
5425 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
5427         * decl2.c (cxx_decode_option): Add 'else'.
5429         * spew.c (end_input): No longer static.
5430         * cp-tree.h: Declare it.
5431         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
5433 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
5435         * call.c (build_over_call), typeck.c (build_function_call_real):
5436         Pass type attributes to check_function_format rather than name or
5437         assembler name.  Don't require there to be a name or assembler
5438         name to check formats.
5440 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
5442         * decl.c (init_decl_processing): Don't call
5443         init_function_format_info.  Initialize lang_attribute_table
5444         earlier.
5445         (builtin_function): Call decl_attributes.
5446         (insert_default_attributes): New.
5448 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
5450         * decl.c (grokdeclarator): Copy array typedef handling from C
5451         frontend.
5453         * decl.c (grokdeclarator): Copy too-large array handling from C
5454         frontend.
5456 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
5458         * config-lang.in (target_libs): Added target-gperf, so that we
5459         don't try to build it if C++ is disabled.
5461 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
5463         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
5464         (cp/errfn.o): Delete rule.
5465         (cp/error.o): Depend on flags.h.
5466         * errfn.c: Delete file.
5467         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
5468         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
5469         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
5470         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
5471         internal_error respectively.  Make cp_deprecated into a macro.
5472         Don't define cp_printer typedef or declare cp_printers.
5473         * error.c: Include flags.h.
5474         Delete: struct tree_formatting_info, print_function_argument_list,
5475         print_declaration, print_expression, print_function_declaration,
5476         print_function_parameter, print_type_id, print_cv_qualifier_seq,
5477         print_type_specifier_seq, print_simple_type_specifier,
5478         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
5479         print_parameter_declaration_clause, print_exception_specification,
5480         print_nested_name_specifier, and definition of cp_printers.
5481         (locate_error): New function.
5482         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
5483         rewritten in terms of locate_error and diagnostic.c.
5484         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
5485         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
5486         (init_error): Adjust to match.
5488 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5490         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
5492 2001-09-21  Richard Henderson  <rth@redhat.com>
5494         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
5495         (build_vtbl_initializer): Likewise.
5496         (build_vfn_ref): New.
5497         * cp-tree.h: Declare it.
5498         * call.c (build_over_call): Use it.
5499         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
5500         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
5502 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
5504         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
5506 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
5508         Table-driven attributes.
5509         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
5510         * decl2.c (cplus_decl_attributes): Only take one attributes
5511         parameter.
5512         * cp-tree.c (cplus_decl_attributes): Update prototype.
5513         * class.c (finish_struct), decl.c (start_decl, start_function),
5514         decl2.c (grokfield), friend.c (do_friend), parse.y
5515         (parse_bitfield): Update calls to cplus_decl_attributes.
5516         * decl.c (grokdeclarator): Take a pointer to a single ordinary
5517         attribute list.
5518         * decl.h (grokdeclarator): Update prototype.
5519         * decl2.c (grokfield): Take a single ordinary attribute list.
5520         * friend.c (do_friend): Likewise.
5521         * decl.c (shadow_tag, groktypename, start_decl,
5522         start_handler_parms, grokdeclarator, grokparms, start_function,
5523         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
5524         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
5525         (process_template_parm, do_decl_instantiation): Pass single
5526         ordinary attribute lists around.
5527         * decl.c (grokdeclarator): Correct handling of nested attributes.
5528         Revert the patch
5529         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
5530                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
5531                 not the left.
5532         .
5533         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
5534         (cp_attribute_table): Declare.
5535         * decl.c (valid_lang_attribute): Don't define.
5536         (lang_attribute_table): Define.
5537         (init_decl_processing): Initialize lang_attribute_table instead of
5538         valid_lang_attribute.
5539         * tree.c (cp_valid_lang_attribute): Remove.
5540         (handle_java_interface_attribute, handle_com_interface_attribute,
5541         handle_init_priority_attribute): New functions.
5542         (cp_attribute_table): New array.
5543         * decl2.c (import_export_class): Don't use
5544         targetm.valid_type_attribute.
5546 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5548         * Make-lang.in (cp/error.o): Depend on real.h
5549         * error.c: #include "real.h"
5551 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5553         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
5554         xmalloc/strcpy/strcat.
5556 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5558         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
5559         Const-ification.
5560         * pt.c (tsubst_decl): Likewise.
5562 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5564         * decl2.c (lang_f_options): Const-ification.
5565         * lex.c (cplus_tree_code_name): Likewise.
5566         * spew.c (yyerror): Likewise.
5568 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
5570         PR c++/3986
5571         * class.c (force_canonical_binfo_r): Check & move an indirect
5572         primary base first.
5573         (force_canonical_binfo): Check that it's not already
5574         canonical.
5575         (mark_primary_virtual_base): Remove BINFO parameter.
5576         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
5578 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
5580         Remove TYPE_NONCOPIED_PARTS.
5581         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
5582         CLASSTYPE_PURE_VIRTUALS.
5583         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
5584         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
5585         (layout_class_type): Don't call fixup_inline_methods here ...
5586         (finish_struct_1): ... call it here.
5588 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
5590         * decl.c (duplicate_decls): Remove code deadling with
5591         DECL_SAVED_INSNS.
5592         * decl2.c (finish_file): Likewise.
5593         * pt.c (instantiate_decl): Likewise.
5594         * semantics.c (expand_body): Don't defer local functions if
5595         they wouldn't be deferred for some other reason.  Don't
5596         generate RTL for functions that will not be emitted.
5597         (genrtl_start_function): Remove code deadling with
5598         DECL_SAVED_INSNS.
5599         (genrtl_finish_function): Likewise.
5601 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
5603         PR c++/4203
5604         * call.c (build_over_call): Do not optimize any empty base
5605         construction.
5607 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5609         * error.c (dump_template_decl): Output template parameters
5610         together with their specifiers.
5611         Output `class' prefix for template template parameter.
5612         (dump_decl): Fix formatting.
5614 2001-08-30  Kurt Garloff  <garloff@suse.de>
5616         * optimize.c (inlinable_function_p): Allow only smaller single
5617         functions. Halve inline limit after reaching recursive limit.
5619 2001-08-30  Joern Rennecke <amylaar@redhat.com>
5620             Jason Merrill  <jason_merrill@redhat.com>
5622         * class.c (build_vtable_entry_ref): Subtract in char*, not
5623         ptrdiff_t.
5625 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
5627         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
5628         (build_cplus_array_type): Use cp_build_qualified_type, not
5629         TYPE_MAIN_VARIANT, to get an unqualified version.
5631         * decl2.c (grok_alignof): Lose.
5632         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
5633         * typeck.c (c_alignof): Lose.
5634         * semantics.c (finish_sizeof, finish_alignof): New.
5635         * parse.y: Use them.
5636         * cp-tree.h: Declare them.
5638 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
5640         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
5641         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
5642         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
5644 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
5646         * typeck2.c (add_exception_specifier): Only require complete type if
5647         not in processing template declaration.
5649 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5651         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
5652         GNU_xref_start_scope and GNU_xref_end_scope.
5654         * tree.c (TYPE_HASH): Moved to ../tree.h.
5656 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
5658         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
5659         on COMPOUND_EXPRs.
5661 2001-08-14  Richard Henderson  <rth@redhat.com>
5663         * class.c, cp-tree.h (build_vfn_ref): Remove.
5664         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
5666 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
5668         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
5669         empty class assignment as having side-effects to avoid
5670         spurious warnings.
5672 2001-08-13  Zack Weinberg  <zackw@panix.com>
5674         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
5675         * except.c: Include libfuncs.h.
5677 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5679         * decl.c (grokdeclarator): Clarify diagnostic message.
5681 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5683         * decl2.c (do_nonmember_using_decl): Replace using directive
5684         with using declaration in the error message.
5686 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5688         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
5689         criterion to avoid rebuilding expression tree instead of
5690         processing_template_decl.
5692 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
5694         Support named return value optimization for inlines, too.
5695         * decl.c (finish_function): Nullify returns here.
5696         * semantics.c (genrtl_start_function): Not here.
5697         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
5698         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
5699         Also nullify the CLEANUP_STMT for the nrv.
5700         * cp-tree.h: Declare it.
5701         * optimize.c (declare_return_variable): Replace the nrv with the
5702         return variable.
5703         * typeck.c (check_return_expr): Be more flexible on alignment check.
5704         Ignore cv-quals when checking for a matching type.
5706 2001-08-09  Richard Henderson  <rth@redhat.com>
5708         * decl2.c (finish_objects): Use target hooks instead of
5709         assemble_constructor and assemble_destructor.
5711 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5713         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
5715 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
5717         PR c++/3820
5718         Stop using TYPE_NONCOPIED_PARTS.
5719         * call.c (build_over_call): Be careful when copy constructing
5720         or assigning to an empty class.
5721         * class.c (check_bases_and_members): It has a
5722         COMPLEX_ASSIGN_REF if it has a vptr.
5723         (layout_class_type): Don't add empty class padding to
5724         TYPE_NONCOPIED_PARTS.
5725         (finish_struct_1): Don't add the VFIELD either.
5726         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
5727         initialization.
5729 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
5731         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
5733 2001-08-06  Richard Henderson  <rth@redhat.com>
5735         * decl2.c (finish_objects): Pass a symbol_ref and priority to
5736         assemble_{constructor,destructor}.  Remove priority handling.
5738 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5740         Don't allow template-id in using-declaration.
5741         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
5742         (do_class_using_decl): Likewise.
5744 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
5746         * cp/spew.c (read_token): No need to pop buffers.
5748 2001-08-02  Stan Shebs  <shebs@apple.com>
5750         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
5751         (fnaddr_from_vtable_entry): Remove decl.
5752         * method.c (use_thunk): Update comment.
5754 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
5756         * repo.c (get_base_filename): Change return value to const char
5757         pointer.
5759 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
5761         Kill -fhonor-std.
5762         * NEWS: Document.
5763         * cp-tree.h (flag_honor_std): Remove.
5764         (CPTI_FAKE_STD): Remove.
5765         (std_node): Remove comment about it being NULL.
5766         (fake_std_node): Remove.
5767         * decl.c (in_fake_std): Remove.
5768         (walk_namespaces_r): Remove fake_std_node check.
5769         (push_namespace): Remove in_fake_std code.
5770         (pop_namespace): Likewise.
5771         (lookup_name_real): Remove fake_std_node check.
5772         (init_decl_processing): Always create std_node. Always add
5773         std:: things there.
5774         (builtin_function): Always put non '_' fns in std.
5775         * decl2.c (flag_honor_std): Remove.
5776         (lang_f_options): Remove honor-std.
5777         (unsupported_options): Add honor-std.
5778         (set_decl_namespace): Remove fake_std_node check.
5779         (validate_nonmember_using_decl): Likewise.
5780         (do_using_directive): Likewise.
5781         (handle_class_head): Likewise.
5782         * dump.c (cp_dump_tree): Likewise.
5783         * except.c (init_exception_processing): Adjust.
5784         * init.c (build_member_call): Remove fake_std_node check.
5785         (build_offset_ref): Likewise.
5786         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
5787         * rtti.c (init_rtti_processing): Adjust.
5789 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
5791         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
5792         operand while calling cp_tree_equal.
5794 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
5796         The 3.0 ABI no longer has vbase pointer fields.
5797         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
5798         FORMAT_VBASE_NAME): Remove.
5799         * method.c (do_build_copy_constructor): Adjust.
5800         (do_build_assign_ref): Adjust.
5801         * search.c (lookup_field_r): Adjust.
5802         * typeck.c (build_component_ref): Adjust.
5804         The 3.0 ABI always has a vtable pointer at the start of every
5805         polymorphic class.
5806         * rtti.c (build_headof_sub): Remove.
5807         (build_headof): Adjust.
5808         (get_tinfo_decl_dynamic): No need to check flag_rtti
5809         here. Adjust.
5810         (create_real_tinfo_var): Explain why we need a hidden name.
5812 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
5814         PR c++/3631
5815         * class.c (update_vtable_entry_for_fn): The fixed adjustment
5816         of a virtual thunk should be from declaring base.
5818 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
5820         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
5821         the shared virtual base, so preserving inheritance graph order.
5823 2001-07-30  Andreas Jaeger  <aj@suse.de>
5825         * decl2.c: Remove unused var global_temp_name_counter.
5827 2001-07-28  Richard Henderson  <rth@redhat.com>
5829         * method.c (pending_inlines): Remove.
5831 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
5833         * class.c (mark_primary_virtual_base): Don't adjust base
5834         offsets here.
5835         (dfs_unshared_virtual_bases): Adjust them here.
5836         (mark_primary_bases): Explain why we adjust at the end.
5838 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
5840         * class.c (finish_struct_1): When copying the primary base's
5841         VFIELD, make sure we find it is at offset zero.
5843 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5845         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
5846         tsubst_expr for default template arguments.
5848 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
5850         PR c++/3621
5851         * spew.c (yylex): Only copy the token's lineno, if it is
5852         nonzero.
5854 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
5856         PR c++/3624
5857         * call.c (resolve_args): Simplify, call
5858         convert_from_reference.
5859         (build_new_op): Resolve and convert from reference ARG1
5860         earlier. Adjust ARG2 & ARG3 resolve and conversion.
5862 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
5864         * decl.c (last_function_parm_tags): Remove.
5865         (current_function_parm_tags): Remove.
5866         (init_decl_processing): Adjust.
5867         (start_function): Adjust.
5868         (store_parm_decls): Adjust.
5870         PR c++/3152
5871         * decl.c (grokdeclarator): Detect when a function typedef is
5872         declaring a function, and create last_function_parms correctly.
5874 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
5876         * call.c (joust): Only prefer a non-builtin candidate to a builtin
5877         one if they have the same signature.
5879         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
5880         it rather than toplevel_bindings_p.  Give it a mangled name if static.
5881         (convert_to_reference): Adjust.
5882         * decl2.c (get_temp_name): Lose.
5883         * mangle.c (mangle_ref_init_variable): New fn.
5884         (mangle_guard_variable): Strip the ref-init header.
5885         * cp-tree.h: Adjust.
5886         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
5887         initializer.
5888         (grok_reference_init): Always use DECL_INITIAL.
5890 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5892         PR c++/3416
5893         * call.c (build_conditional_expr): Recheck args after
5894         conversions.
5895         * cp-tree.h (build_conditional_expr): Move to correct file.
5896         * typeck.c (decay_conversion): Diagnose any unknown types
5897         reaching here.
5898         (build_binary_op): Don't do initial decay or default
5899         conversions on overloaded functions.
5900         (build_static_cast): Don't do a decay conversion here.
5902 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5904         PR c++/3543
5905         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
5906         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
5908 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5910         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
5911         (create_vtbl_ptr): ... here.
5913 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5915         * class.c (build_vbase_offset_vbtl_entries): Look for
5916         non-primary base of which we are a sub vtable.
5918 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
5920         * semantics.c (finish_this_expr):  Remove unused code.
5922 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
5924         Simplify rtti, now we've only one ABI.
5925         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
5926         CPTI_TINFO_VAR_ID.
5927         (tinfo_decl_id, tinfo_var_id): Remove.
5928         (get_typeid_1): Remove.
5929         * rtti.c
5930         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
5931         (typeid_ok_p): New function.
5932         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
5933         (get_tinfo_decl): Remove old abi documentation.
5934         (tinfo_from_decl): Remove.
5935         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
5936         (get_typeid_1): Remove.
5937         (get_base_offset): Remove.
5938         (synthesize_tinfo_var): Absorb get_base_offset.
5939         (create_real_tinfo_var): Don't use tinfo_decl_id.
5941 2001-07-23  Graham Stott  <grahams@redhat.com>
5943         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
5944         variable has_two_argument_delete_p.
5946 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
5948         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
5949         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
5950         (CPTI_INDEX_IDENTIFIER): Remove.
5951         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
5952         (delta2_identifier): Remove.
5953         (index_identifier): Remove.
5954         (pfn_or_delta2_identifier): Remove.
5955         (flag_vtable_thunks): Remove.
5956         (VTABLE_DELTA2_NAME): Remove.
5957         (VTABLE_INDEX_NAME): Remove.
5958         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
5959         (vfunc_ptr_type_node): Adjust.
5960         (VTABLE_NAME_PREFIX): Adjust.
5961         (build_vfn_ref): Lose first parameter.
5962         (fixup_all_virtual_upcast_offsets): Remove.
5963         * decl.c (initialize_predefined_identifiers): Remove
5964         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
5965         (init_decl_processing): Remove no-vtable-thunk code.
5966         * decl2.c (flag_vtable_thunks): Remove.
5967         (mark_vtable_entries): Remove no-vtable-thunk code.
5968         * error.c (dump_decl): Remove no-vtable-thunk code.
5969         (dump_expr): Adjust ptr to member function code.
5970         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
5971         code.
5972         * rtti.c (build_headof): Remove no-vtable-thunk code.
5973         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
5974         * search.c (get_base_distance): Remove expand_upcast_fixups case.
5975         (virtual_context) Remove.
5976         (expand_upcast_fixups): Remove.
5977         (fixup_virtual_upcast_offsets): Remove.
5978         (fixup_all_virtual_upcast_offsets): Remove.
5979         * typeck.c (get_member_function_from_ptrfunc): Remove
5980         no-vtable-thunk code.
5981         * call.c (build_over_call): Adjust call to build_vfn_ref.
5982         * class.c (build_vfn_ref): Lose first parameter. Remove
5983         no-vtable-thunk code.
5984         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
5985         (build_vtable_entry): Remove no-vtable-thunk code.
5987 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
5989         Remove old-abi remnants. Remove comments about old abi
5990         behavior. Remove references to 'new-abi' in comments.
5991         * cp-tree.h: Adjust comments.
5992         (vbase_offsets_in_vtable_p): Delete.
5993         (vcall_offsets_in_vtable_p): Delete.
5994         (vptrs_present_everywhere_p): Delete.
5995         (all_overridden_vfuns_in_vtables_p): Delete.
5996         (merge_primary_and_secondary_vtables_p): Delete.
5997         (TYPE_CONTAINS_VPTR_P): Adjust.
5998         (VTT_NAME_PREFIX): Remove.
5999         (CTOR_VTBL_NAME_PREFIX): Remove.
6000         (init_vbase_pointers): Remove.
6001         * class.c: Adjust coments.
6002         (build_vbase_pointer_fields): Delete.
6003         (build_vbase_pointer): Remove old-abi code.
6004         (build_secondary_vtable): Likewise.
6005         (modify_all_vtables): Likewise.
6006         (create_vtable_ptr): Likewise.
6007         (layout_class_type): Likewise.
6008         (finish_struct_1): Likewise.
6009         (finish_vtbls): Likewise.
6010         (dfs_finish_vtbls): Delete.
6011         (build_vbase_offset_vtbl_entries): Remove old-abi code.
6012         * cvt.c: Adjust comments.
6013         * decl.c: Adjust comments.
6014         * decl2.c: Adjust comments.
6015         * init.c: Adjust comments.
6016         (construct_virtual_bases): Remove old-abi code.
6017         * lang-specs.h: Remove -fno-new-abi.
6018         * mangle.c: Adjust comments.
6019         * rtti.c: Adjust comments.
6020         (get_base_offset): Remove old-abi-code.
6021         * search.c: Adjust comments.
6022         (dfs_init_vbase_pointers): Remove.
6023         (dfs_vtable_path_unmark): Remove.
6024         (init_vbase_pointers): Remove.
6025         * semantics.c: Adjust comments.
6026         (emit_associated_thunks): Remove old-abi code.
6027         * typeck.c: Adjust comments.
6029 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
6031         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
6032         params.h.
6034 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
6036         * class.c (finish_struct_anon): Forbid nested classes.
6038 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
6040         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
6041         * optimize.c: Include debug.h.
6042         (maybe_clone_body): Use debug hook.
6043         * semantics.c: Include debug.h.
6044         (expand_body): Use debug hook.
6046 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
6048         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
6050 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
6052         * class.c (type_requires_array_cookie): New function.
6053         (check_methods): Don't try to figure out whether the type needs a
6054         cookie here.
6055         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
6056         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
6057         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
6058         * pt.c (instantiate_class_template): Don't set
6059         TYPE_VEC_DELETE_TAKES_SIZE.
6060         * NEWS: Document ABI changes from GCC 3.0.
6062 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
6063             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
6065         * NEWS (Changes in GCC 3.0): Fix typo.
6067 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6069         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
6070         which attributes are to be attached, and a flags argument.  Update
6071         call to decl_attributes.
6072         (grokfield): Update call to decl_attributes.
6073         * class.c (finish_struct): Update call to cplus_decl_attributes.
6074         * cp-tree.h (cplus_decl_attributes): Update prototype.
6075         * decl.c (start_decl, grokdeclarator, start_function): Update
6076         calls to decl_attributes and cplus_decl_attributes.
6077         * friend.c (do_friend): Update call to cplus_decl_attributes.
6078         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
6080 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
6082         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
6083         for `register' variables with an asm-specification.
6085 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
6087         * semantics.c (finish_asm_stmt): Mark the output operands
6088         to an asm addressable, if necessary.
6090 2001-07-11  Ben Elliston  <bje@redhat.com>
6092         * Revert this change -- there is a subtle bug.
6094         PR c++/80
6095         * decl.c (finish_enum): New "attributes" argument; pass it to
6096         cplus_decl_attributes.  Use a narrower type if the enum is packed.
6097         * cp-tree.h (finish_enum): Adjust prototype.
6098         * parse.y (enum_head): New non-terminal.
6099         (structsp): Use it. Enums now may be preceded or followed by
6100         optional attributes -- pass their chained tree to finish_enum().
6101         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
6103 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
6105         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
6106         variables.
6108 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
6110         * semantics.c (cp_expand_stmt): Fix for null
6111         current_function_return_value.
6113 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
6115         * call.c (build_op_delete_call): Initialize fn.
6116         (convert_like_real): Delete conditional.
6117         (joust): Initialize *w and *l.
6118         * class.c: Add prototype for binfo_ctor_vtable.
6119         (get_primary_binfo): Initialize result.
6120         * init.c (build_java_class_ref): Initialize name.
6122 2001-07-09  Erik Rozendaal  <dlr@acm.org>
6124         * typeck.c (unary_complex_lvalue): Do not duplicate the
6125         argument to modify, pre-, or post-increment when used as an
6126         lvalue and when the argument has side-effects.
6128 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6130         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
6131         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
6132         cplus_decl_attributes even if attrs is NULL.
6133         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
6135 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6137         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
6138         calls to decl_attributes.
6140 2001-07-06  Ira Ruben   <ira@apple.com>
6142         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
6143         be DECL_TEMPLATE_RESULT.
6145 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6147         * cp-tree.h (copy_template_template_parm): Rename to ...
6148         (bind_template_template_parm): ... here.
6149         * tree.c (copy_template_template_parm): Rename to ...
6150         (bind_template_template_parm): ... here.  Remove the case when
6151         NEWARGS is NULL_TREE.
6152         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
6153         BOUND_TEMPLATE_TEMPLATE_PARM.
6154         * pt.c (lookup_template_class): Adjust.
6156 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
6158         * cvt.c (convert_lvalue): New fn.
6159         * cp-tree.h: Declare it.
6160         * method.c (do_build_assign_ref): Use it.
6161         (do_build_copy_constructor): Convert parm to base types
6162         before calling base constructors.
6164         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
6165         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
6166         optimize.
6167         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
6169 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
6171         * optimize.c (optimize_inline_calls): New function, broken out
6172         of ...
6173         (optimize_function): ... here. Call it. Don't inline if it is
6174         a thunk.
6175         (dump_function): Print name of dump flag causing this dump.
6176         * semantics.c (expand_body): Move thunk inline check to
6177         optimize_function.
6179 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6181         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
6182         (comptypes): Use target.comp_type_attributes.
6184 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
6186         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
6188 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6190         * error.c (lang_print_error_function): Add a `diagnostic_context *'
6191         parameter. Tweak.
6193 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6195         * decl2.c (import_export_class): Update.
6197 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6199         * error.c (init_error): Adjust settings.
6201 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6203         * error.c (init_error): Adjust settings.
6205 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
6207         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
6208         return pointers to data members by reference rather than by value.
6210 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
6212         Implement the Named Return Value optimization.
6213         * cp-tree.h (struct cp_language_function): Add x_return_value.
6214         (current_function_return_value): Now a macro.
6215         * decl.c: Don't define it.
6216         (define_label, finish_case_label): Don't clear it.
6217         (init_decl_processing): Don't register it with GC.
6218         * semantics.c (genrtl_finish_function): Don't check it for
6219         no_return_label.  Copy the RTL from the return value to
6220         current_function_return_value and walk, calling...
6221         (nullify_returns_r): ...this new fn.
6222         * typeck.c (check_return_expr): Set current_function_return_value.
6224 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
6226         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
6227         sharing a ctor vtable with.  Merge code for cases 1 and 2.
6228         (binfo_ctor_vtable): New fn.
6229         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
6231 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
6233         * class.c (dfs_find_final_overrider): Fix logic.
6235         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
6236         virtual thunk instead of non-virtual.
6237         (get_matching_virtual): Uncomment.
6239         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
6240         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
6241         PARM, not ARG.
6243 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
6245         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
6246         we've not emerged from the hierarchy of RTTI_BINFO on reaching
6247         a non-virtual base.
6249 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
6251         * NEWS: Update release number.
6253 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
6255         PR c++/3130, c++/3131, c++/3132
6256         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
6257         * class.c (force_canonical_binfo_r): Move
6258         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
6259         virtual bases unless they're primary and what they're primary
6260         too has been moved.
6261         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
6262         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
6263         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
6264         derived binfo.
6265         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
6266         (layout_nonempty_base_or_field): Add most derived type
6267         parameter. Adjust.
6268         (layout_empty_base): Likewise.
6269         (build_base_field): Likewise.
6270         (build_base_fields): Likewise.
6271         (propagate_binfo_offsets): Add most derived type
6272         parameter. Skip non canonical virtual bases too.
6273         (dfs_set_offset_for_unshared_vbases): Don't skip primary
6274         bases. Do skip canonical bases.
6275         (layout_virtual_bases): Adjust.
6276         (layout_class_type): Adjust.
6277         (dfs_get_primary_binfo): Build list of virtual primary base
6278         candidates.
6279         (get_primary_binfo): Check that the shared virtual primary
6280         base candidate was found first.
6281         (accumulate_vtbl_inits): Don't do anything for non-vptr
6282         containing binfos. For case 1 primary virtual bases, keep
6283         checking that we've not emerged from the hierarchy of RTTI_BINFO.
6285 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
6287         PR c++/3089
6288         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
6289         hierarchy looking for primary bases for a ctor
6290         vtable. Recursively call oneself, if we meet our primary via
6291         this route and haven't met it yet via inheritance graph order.
6293 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
6295         * lang-options.h: Emit documentation for -fno-honor-std, not
6296         -fhonor-std.
6298 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
6300         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
6301         Don't clobber delta.
6302         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
6304 2001-06-10  Mark Mitchell <mark@codesourcery.com>
6305             Gabriel Dos Reis  <gdr@codesourcery.com>
6307         * Make-lang.in (cp/call.o): Depend on diagnostic.h
6308         (cp/typeck.o): Depend on diagnostic.h
6309         (cp/typeck2.o): Depend on diagnostic.h
6310         (cp/repo.o): Depend on dignostic.h
6311         * typeck.c: #include diagnostic.h
6312         (convert_for_initialization): Remove extern declaration for
6313         warningcount and errorcount.
6315         * call.c: #include diagnostic.h
6316         (convert_like_real): Remove extern declaration for warnincount and
6317         errorcount.
6319         * repo.c: #include diagnostic.h
6320         * typeck2.c: #include diagnostic.h
6322 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
6324         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
6325         in previous change.
6327 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
6329         PR c++/2929
6330         * friend.c (do_friend): Use push_decl_namespace for classes at
6331         namespace scope.
6333 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
6334             Jason Merrill <jason_merrill@redhat.com>
6336         PR c++/3061
6337         * class.c (build_secondary_vtable): Use assert, rather than an error
6338         message.
6339         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
6340         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
6341         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
6342         Don't set BINFO_VTABLE for a primary virtual base.
6344 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
6346         * decl.c (duplicate_decls): Update source position information
6347         when a template function is defined.
6349 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
6351         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
6353 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
6355         PR c++/2914
6356         * decl.c (pushtag): Don't push into a complete type's scope.
6358 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
6360         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
6361         (struct lang_decl_flags): Lose generate_with_vtable_p.
6362         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
6363         * class.c (copy_virtuals): Adjust.
6364         * decl2.c (mark_vtable_entries): Adjust.
6365         * method.c (make_thunk, build_vtable_entry): Adjust.
6366         * class.c (update_vtable_entry_for_fn): Only look as far as the
6367         first defining class.
6368         (build_vtbl_initializer): Put nothing in the slot for a function only
6369         defined in a lost primary virtual base.
6370         (add_vcall_offset_vtbl_entries_1): Use the same code for
6371         the lost primary case and the normal case.
6372         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
6373         (get_vfield_offset, get_derived_offset): Lose.
6374         (dfs_find_final_overrider): Use look_for_overrides_here.
6375         (get_matching_virtual): New fn.
6376         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
6377         not BV_VCALL_INDEX.
6378         * search.c (look_for_overrides_here): Split out from...
6379         (look_for_overrides_r): Here.
6381         * class.c (find_final_overrider): Return error_mark_node on error.
6383         * decl2.c (key_method): #if 0 accidental change.
6385 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6387         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
6388         (build_over_call): Likewise.
6389         * decl.c (grokparms): Likewise.
6390         * pt.c (tsubst_decl): Likewise.
6391         * typeck.c (convert_arguments): Likewise.
6393 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
6395         * semantics.c (begin_class_definition): Robustify.
6397         * pt.c (instantiate_decl): Tell the repository code about the
6398         clones, not the cloned functions.
6399         * repo.c (repo_template_used): Explicitly instantiate the cloned
6400         function, not the clones.
6402 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
6404         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
6405         ICS_BAD_FLAG on created conversion.
6406         (compare_ics): Break out rank.
6408 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
6410         * decl.c (xref_tag): Remove extraneous %s on dependent name
6411         lookup warning.
6413 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
6415         * class.c (layout_vtable_decl): Fix off by one error on
6416         build_index_type.
6417         (build_vtt): Likewise.
6418         (build_ctor_vtbl_group): Likewise.
6420 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
6422         * class.c (maybe_indent_hierarchy): New function.
6423         (dump_class_hierarchy_r): Add flags. Dump extra binfo
6424         information, if enabled. Use maybe_indent_hierarchy. Adjust
6425         output format.
6426         (dump_class_hierarchy): Adjust prototype. Adjust output format.
6427         (dump_array, dump_vtable, dump_vtt): New functions.
6428         (finish_struct_1): Adjust hierarchy dumping.
6429         (initialize_vtable): Call dump_vtable.
6430         (build_vtt): Call dump_vtt.
6431         (build_ctor_vtbl_group): Call dump_vtable.
6432         * decl2.c (flag_dump_class_layout): Remove.
6433         (cxx_decode_option): Remove dump translation unit
6434         and dump class hierarchy check. Call dump_switch_p.
6435         (finish_file): Adjust dumping.
6436         (dump.c): Only dump base classes if not TDF_SLIM.
6437         Only dump namespace members if not TDF_SLIM.
6438         * optimize.c (dump_function): New function.
6439         (optimize_function): Call dump_function.
6440         * semantics.c (expand_body): Use dump_enabled_p.
6442 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
6444         PR g++/2936
6445         Part missed from first commit
6446         * decl2.c (finish_anon_union): Copy context.
6448 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
6450         PR g++/2936
6451         * optimize.c (remap_decl): Remap anonymous aggregate members too.
6453 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
6455         PR g++/2823
6456         * semantics.c (expand_body): Don't optimize thunks.
6458 2001-05-25  Sam TH  <sam@uchicago.edu>
6460         * cp-tree.h lex.h: Fix header include guards.
6462 2001-05-25  Mark Mitchell <mark@codesourcery.com>
6464         * decl.c (init_decl_processing): Tweak.
6466 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
6468         * decl.c (duplicate_decls): Tidy.
6469         (init_decl_processing): Always set flag_no_builtin.
6471 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
6473         PR c++/2184
6474         * decl2.c (do_local_using_decl): Push the decls, even in a
6475         template.
6477 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
6479         * optimize.c (initialize_inlined_parameters): Don't set
6480         TREE_READONLY for a VAR_DECL taking the place of an inlined
6481         PARM_DECL.
6483 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
6485         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
6486         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
6487         attribute.
6489 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
6491         * parse.y: Refer to compound literals as such, not as
6492         constructor-expressions.
6494 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
6496         * call.c (build_op_delete_call): Ignore exception-specifications
6497         when looking for matching delete operators.
6498         * init.c (build_new_1): Compute whether or not the allocation
6499         function used is a placement allocation function or not, and
6500         communicate this information to build_op_delete_call.
6502 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
6504         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
6505         (build_vtbl_ref): Adjust.
6506         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
6507         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
6508         Re-add vtable-gc.
6509         (unsupported_options): Correspondingly.
6511         * decl2.c (maybe_make_one_only): Check flag_weak, not
6512         supports_one_only().
6514         * cp-tree.def (START_CATCH_STMT): Lose.
6515         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
6516         * tree.c (cp_statement_code_p): Don't case it.
6517         * semantics.c (cp_expand_stmt): Likewise.
6518         * cp-tree.h (START_CATCH_TYPE): Lose.
6519         (HANDLER_TYPE): New.
6520         * except.c (expand_start_catch_block): Don't start any blocks.
6521         Return the type.
6522         (expand_end_catch_block): Don't end any blocks.
6523         * parse.y (handler): Don't pass anything from finish_handler_parms
6524         to finish_handler.
6525         * pt.c (tsubst_expr): Likewise.
6526         * semantics.c (begin_handler): Call note_level_for_catch here.
6527         (finish_handler_parms): Don't return anything.
6528         (genrtl_catch_block, begin_catch_block): Lose.
6529         (genrtl_handler): Call expand_start_catch here.
6531 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
6533         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
6534         (get_vtable_decl, build_vtt): Not here.
6536 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
6538         PR c++/2781
6539         * optimize.c (update_cloned_parm): Copy addressability and other
6540         flags.
6542 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6544         * pt.c (determine_specialization): Ignore artificial functions.
6546 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
6548         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
6549         (C_RID_CODE): Remove.
6550         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
6551         (init_parse): Don't do it here.
6553 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
6555         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
6556         function declaration to avoid stripping the symbol's attributes.
6558 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
6560         * decl.c (pushdecl): Adjust error string.
6561         (xref_tag): Adjust friend class injection warning. Remove the
6562         inherited name from the class shadowed scope.
6564 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
6566         * except.c (cp_protect_cleanup_actions): New function.
6567         (init_exception_processing): Don't set protect_cleanup_actions
6568         here.  Do set lang_protect_cleanup_actions.
6570 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
6572         * spew.c (read_token): Call yyerror on all unexpected tokens.
6574 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
6576         * init.c (member_init_ok_or_else): Take a tree rather than
6577         string for name.
6578         (expand_member_init): Adjust.
6580 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
6582         * decl.c (duplicate_decls): Suppress warning about duplicate
6583         decls if the first decl is a friend.
6585 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
6587         * except.c (choose_personality_routine): Export.  Add
6588         explanatory comment.  Take an enum languages, not a boolean.
6589         (initialize_handler_parm): Adjust to match.
6590         * cp-tree.h: Prototype choose_personality_routine.
6591         * lex.c (handle_pragma_java_exceptions): New function.
6592         (init_cp_pragma): Register #pragma GCC java_exceptions.
6594 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6596         * method.c (build_mangled_C99_name): Remove unused prototype.
6598 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
6600         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
6601         * typeck.c (get_member_function_from_ptrfunc,
6602         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
6603         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
6605         Reverted Geoff Keating's 2001-05-03's patch.
6607 2001-05-11  Ira Ruben   <ira@apple.com>
6609         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
6611 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
6613         * cp-tree.h (finish_label_expr, lookup_label): Delete.
6614         * parse.y: Update for '&&'; don't issue warning here.
6615         * semantics.c (finish_label_expr): Delete.
6617 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
6619         * splay-tree.h (splay_tree_max): New function.
6620         (splay_tree_min): Likewise.
6622 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
6624         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
6625         (pfn_vflag_identifier): Define.
6626         Update comment about layout of pointer functions.
6627         (build_ptrmemfunc1): Update prototype.
6628         (expand_ptrmemfunc_cst): Update prototype.
6629         * decl.c (initialize_predefined_identifiers): Initialize
6630         pfn_vflag_identifier.
6631         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
6632         an extra field to the type.
6633         * expr.c (cplus_expand_constant): Pass 'flag' between
6634         expand_ptrmemfunc_cst and build_ptrmemfunc1.
6635         * typeck.c (get_member_function_from_ptrfunc): When
6636         FUNCTION_BOUNDARY < 16, look at additional field to determine
6637         if a pointer-to-member is a real pointer or a vtable offset.
6638         (build_ptrmemfunc1): Add new parameter to contain extra field.
6639         (build_ptrmemfunc): Pass the extra field around.
6640         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
6641         (pfn_from_ptrmemfunc): Ignore the extra field.
6643 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
6645         * cp-tree.h (flag_inline_trees): Update documentation.
6646         * decl.c (init_decl_processing): Adjust handling of
6647         flag_inline_functions and flag_inline_trees to support -O3.
6648         (grokfndecl): Set DECL_INLINE on all functions if that's what
6649         the user requested.
6650         (save_function_data): Clear DECL_INLINE in
6651         current_function_cannot_inline is non-NULL.
6652         * decl2.c (flag_inline_trees): Update documentation.
6654 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
6656         * dump.c (cp_dump_tree, USING_STMT case): New case.
6657         * tree.c (cp_statement_code_p): Add USING_STMT.
6658         * decl2.c (do_using_directive): Add the using directive statement.
6660         * tree.c (walk_tree): Reformat an if block.
6662 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
6664         * decl.c (compute_array_index_type): Don't try to do anything with
6665         the indices when processing a template.
6667 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6669         * call.c: NULL_PTR -> NULL.
6670         * class.c: Likewise.
6671         * cvt.c: Likewise.
6672         * decl.c: Likewise.
6673         * decl2.c: Likewise.
6674         * except.c: Likewise.
6675         * init.c: Likewise.
6676         * rtti.c: Likewise.
6677         * search.c: Likewise.
6678         * tree.c: Likewise.
6679         * typeck.c: Likewise.
6680         * typeck2.c: Likewise.
6682 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
6684         * decl2.c (do_using_directive): Revert previous patch.
6686 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6688         * cp-tree.def (USING_STMT): New statement node.
6689         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
6690         * decl2.c (do_using_directive): Add USING_STMT to statement
6691         tree. Don't emit errors when processing template decl.
6692         * pt.c (tsubst_expr, USING_STMT case): New case.
6693         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
6695 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6697         * call.c (build_new_op): Convert args from reference here.
6698         (build_conditional_expr): Don't convert here.
6700 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6702         * spew.c (last_token_id): New static variable.
6703         (read_token): Set it here.
6704         (yyerror): Use it here.
6706 2001-04-30  Richard Henderson  <rth@redhat.com>
6708         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
6709         * decl.c: Likewise.
6711 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
6713         * gxxint.texi: Remove.
6714         * Make-lang.in: Remove all traces of gxxint.texi.
6716 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
6718         * decl2.c (start_static_initialization_or_destruction): Correct
6719         logic to handle the -fno-use-cxa-atexit case.
6721 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
6723         * optimize.c (update_cloned_parm): New function.
6724         (maybe_clone_body): Use it.  Update the `this' parameter too.
6726 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6728         * decl2.c (unsupported_options): Add new-abi.
6729         * lang-options.h: Remove no longer supported options.
6731 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
6733         * except.c (can_convert_eh): Don't check template parms,
6734         typename types etc.
6736 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
6738         * optimize.c (maybe_clone_body): Copy parameter names and locations.
6740 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
6742         * cp-tree.h (adjust_clone_args): Prototype new function.
6743         * class.c (adjust_clone_args): New function.
6744         * decl.c (start_function): Call it for in charge ctors.
6746 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
6748         * method.c (use_thunk): Make sure that thunks really are emitted
6749         when requested.
6751 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
6753         * mangle.c (write_chars): New macro.
6754         (hwint_to_ascii): New function
6755         (write_number): Use it.
6756         (write_integer_cst): Deal with really big numbers.
6758 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
6760         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
6761         the clone.
6763 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
6765         * decl.c (grokdeclarator): Set context of namespace scope
6766         TYPE_DECLS.
6768 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
6770         * cp/optimize.c: Include hashtab.h.
6771         (struct inline_data): Add tree_pruner.
6772         (expand_call_inline, expand_calls_inline): Use it when calling
6773         walk_tree.
6774         (optimize_function): Initialize and free tree_pruner.
6776 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
6778         Lazy __FUNCTION__ generation.
6779         * cp-tree.def (FUNCTION_NAME): Remove.
6780         * cp-tree.h (function_name_declared_p): Remove.
6781         (cp_fname_init): Prototype.
6782         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
6783         don't call declare_function_name. Call start_fname_decls.
6784         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
6785         clobber the line number.
6786         (cp_fname_init): New function.
6787         (start_function): Call start_fname_decls.
6788         (finish_function): Call finish_fname_decls.
6789         * lex.c (reswords): Add slots for __FUNCTION__ et al.
6790         (rid_to_yy): Add mappings for __FUNCTION__ et al.
6791         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
6792         * parse.y (VAR_FUNC_NAME): New token.
6793         (primary): Add VAR_FUNC_NAME.
6794         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
6795         generation.
6796         (tsubst, FUNCTION_NAME case): Remove.
6797         (tsubst_copy, FUNCTION_NAME case): Remove.
6798         (tsubst_expr, DECL_STMT case): Be careful with a
6799         DECL_PRETTY_FUNCTION_P.
6800         (instantiate_decl): Remove function_name_declared_p.
6801         * semantics.c (begin_compound_statement): Don't call
6802         declare_function_name here.
6803         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
6804         (finish_translation_unit): Call finish_fname_decls.
6805         (expand_body): Remove function_name_declared_p.
6806         * typeck2.c (digest_init): Allow any ERROR_MARK.
6808 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
6810         * pt.c (tsubst_decl): Use VOID_TYPE_P.
6811         * semantics.c: Fix some typos.
6813 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
6815         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
6817 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6819         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
6821 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
6823         * except.c (build_throw): Wrap the initialization of the exception
6824         object in a MUST_NOT_THROW_EXPR.
6825         (do_free_exception): #if 0.
6827 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
6829         * cp-tree.h (finish_enum): Change prototype.
6830         * decl.c (finish_enum): Reorganize.
6831         * parse.y (structsp): Adjust calls to finish_enum.
6833 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
6835         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
6836         't' case.
6838 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
6840         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
6841         (layout_empty_base): Return at end flag.
6842         (build_base_field): Likewise.
6843         (build_base_fields): Likewise.
6844         (layout_virtual_bases): Don't add 1 to eoc value.
6845         (end_of_class): Use full size for empty bases.
6846         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
6847         empty bases. Don't add 1 to eoc value. Only add trailing padding
6848         if we're an empty class with no empty bases.
6849         (dump_class_hierarchy): Dump size and alignment.
6851 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
6853         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
6854         ICS_BAD_FLAG.
6856 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
6858         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
6859         is found, look first if name does not match the structure name.
6861 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
6863         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
6864         set.
6865         (SET_DECL_LANGUAGE): New macro.
6866         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
6867         (pushdecl): Likewise.
6868         (build_library_fn_1): Likewise.
6869         (build_cp_library_fn): Likewise.
6870         (grokfndecl): Likewise.
6871         (grokvardecl): Mark `extern "C"' variables as having C linkage.
6872         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
6873         * lex.c (retrofit_lang_decl): Likewise.
6874         * mangle.c (mangle_decl_string): Don't mangle the names of
6875         variables declared with C language linkage.
6876         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
6878 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6880         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
6881         flag_access_control from uninitialized storage.
6883 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
6885         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
6886         * mangle.c (write_pointer_to_member_type): Fix mangling of
6887         pointers to cv-qualified member function types.
6889         * init.c (build_delete): Create a SAVE_EXPR for the address if
6890         we're going to use it more than once.
6892 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
6894         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
6895         (expand_ptremfunc_cst): Change prototype.
6896         (delta2_from_ptrmemfunc): Remove.
6897         * expr.c (cplus_expand_constant): Adjust call to
6898         expand_ptrmemfunc_cst.
6899         * typeck.c (build_ptrmemfunc1): Simplify.
6900         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
6901         results in a constant.
6902         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
6903         (delta2_from_ptrmemfunc): Remove.
6904         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
6906 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
6908         * cp-tree.h (decl_namespace_list): New macro.
6909         (struct saved_scope): Add decl_ns_list.
6910         * decl.c (mark_saved_scope): Mark it.
6911         * decl2.c: Lose static decl_namespace_list.
6912         (init_decl2): Don't save it.
6914 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6916         * cp-tree.h (warn_return_type, yylex): Delete redundant
6917         declarations.
6919         * decl.c (current_class_depth, global_namespace): Likewise.
6921         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
6923         * repo.c (flag_use_repository): Likewise.
6925 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6927         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
6928         set_block, pushdecl, getdecls, gettags, init_decl_processing,
6929         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
6930         lvalue_or_else, print_lang_statistics, comp_target_types,
6931         unsigned_type, signed_type, signed_or_unsigned_type,
6932         build_function_call, mark_addressable, incomplete_type_error):
6933         Delete redundant declarations.
6935 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
6937         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
6938         (TYPE_ANONYMOUS_P): New macro.
6939         (TAGGED_TYPE_P): New macro.
6940         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
6941         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
6942         * tree.c (no_linkage_helper): Likewise.
6943         * semantics.c (begin_class_definition): Likewise.
6944         * pt.c (convert_template_argument): Likewise.
6945         * lex.c (check_for_missing_semicolon): Likewise.
6947 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
6949         * class.c (dfs_unshared_virtual_bases): New function.
6950         (mark_primary_bases): Call it.
6951         (check_bases): Ignore virtual bases when determining
6952         nearly-emptiness.
6954 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
6956         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
6958 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
6960         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
6961         cloned function to the clone.
6963 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6965         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
6967         * semantics.c: Include expr.h.
6969 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
6971         * method.c (implicitly_declare_fn): Commonize code for copy ctor
6972         and assignment op. Set TREE_USED for parameter.
6974 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
6976         * class.c (find_final_overrider_data): Add `candidates'.
6977         (dfs_find_final_overrider): Don't issue error messages
6978         prematurely.
6979         (find_final_overrider): Issue error messages here.
6980         (build_base_field): Don't warn about amgibuous direct bases here.
6981         (warn_about_ambiguous_direct_bases): New function.
6982         (layout_class_type): Use it.
6984 2001-04-10  Richard Henderson  <rth@redhat.com>
6986         * typeck.c (build_array_ref): Push the array reference inside
6987         COMPOUND_EXPR and COND_EXPR.
6989 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
6991         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
6992         * decl.c (duplicate_decls): Adjust accordingly.
6993         (maybe_commonize_var): Likewise.
6994         (grokfndecl): Likewise.
6995         (start_function): Likewise.
6996         (start_method): Likewise.
6997         * decl2.c (key_method): Likewise.
6998         (import_export_decl): Likewise.
6999         * method.c (implicitly_declare_fn): Likewise.
7000         * optimize.c (maybe_clone_body): Likewise.
7002 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
7004         * lang-specs.h: Add __DEPRECATED.
7006 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
7008         * search.c (get_dynamic_cast_base_type): When building a new
7009         constant, set its type to ssizetype.
7011 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
7013         * optimize.c (expand_call_inline): Only add newly inlined statements
7014         into inlined_stmts.
7016 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
7018         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
7019         (OPERATOR_FORMAT): Likewise.
7020         (OPERATOR_TYPENAME_FORMAT): Likewise.
7021         * operators.def: Remove old name-mangling information.
7022         * decl.c (grok_op_properties): Adjust accordingly.
7023         * lex.c (init_operators): Likewise.
7024         * rtti.c (get_tinfo_decl): Issue error messages about types that
7025         have variable size.
7027 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
7029         * decl2.c (import_export_decl): Don't call import_export_class
7030         when processing an inline member function.
7031         * semantics.c (expand_body): Call import_export_decl before
7032         emitting inline functions.
7034 2001-03-28  Richard Henderson  <rth@redhat.com>
7036         IA-64 ABI Exception Handling:
7037         * cp-tree.def (EH_SPEC_BLOCK): New.
7038         (MUST_NOT_THROW_EXPR): New.
7039         * cp-tree.h: Update changed function declarations.
7040         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
7041         (CPTI_CALL_UNEXPECTED): New.
7042         (struct cp_language_function): Rename x_eh_spec_try_block
7043         to x_eh_spec_block.
7044         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
7045         * decl.c (current_binding_level): If no current function
7046         bindings, revert to scope_chain.
7047         (initialize_predefined_identifiers): Remove __cp_push_exception.
7048         (store_parm_decls): Use begin_eh_spec_block.
7049         (finish_function): Use finish_eh_spec_block.
7050         (mark_lang_function): Update for name changes.
7051         * decl2.c (finish_file): No mark_all_runtime_matches.
7052         * dump.c (cp_dump_tree): Handle new tree codes.
7053         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
7054         * except.c (catch_language_init, catch_language): Remove.
7055         (init_exception_processing): Don't set language code.
7056         Initialize call_unexpected_node, protect_cleanup_actions,
7057         eh_personality_libfunc, lang_eh_runtime_type.
7058         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
7059         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
7060         (prepare_eh_type): Split out type canonicalizations ...
7061         (build_eh_type_type): ... from here.
7062         (build_eh_type_type_ref): Remove.
7063         (mark_all_runtime_matches): Remove.
7064         (build_exc_ptr): New.
7065         (do_begin_catch, do_end_catch): New.
7066         (do_pop_exception): Remove.
7067         (build_terminate_handler): Remove.
7068         (choose_personality_routine): Split out language choice from ...
7069         (initialize_handler_parm): ... here.
7070         Use MUST_NOT_THROW_EXPR.
7071         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
7072         exception object handling.
7073         (expand_start_eh_spec, expand_end_eh_spec): Remove.
7074         (expand_exception_blocks, alloc_eh_object): Remove.
7075         (begin_eh_spec_block, finish_eh_spec_block): New.
7076         (do_allocate_exception, do_free_exception): New.
7077         (expand_throw): Merge into ...
7078         (build_throw): ... here.  Update for abi.
7079         * expr.c (cplus_expand_expr): No expand_internal_throw.
7080         Handle MUST_NOT_THROW_EXPR.
7081         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
7082         * semantics.c (*) Update for except.h name changes.
7083         (genrtl_try_block): No protect_with_terminate.
7084         (genrtl_eh_spec_block): New.
7085         (genrtl_handler): Don't emit the goto here.
7086         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
7087         (genrtl_finish_function): Don't expand_exception_blocks.
7088         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
7090 2001-03-28  Richard Henderson  <rth@redhat.com>
7092         * decl.c (struct named_label_list): Rename eh_region to
7093         in_try_scope, add in_catch_scope.
7094         (struct binding_level): Rename eh_region to is_try_scope,
7095         add is_catch_scope.
7096         (note_level_for_try): Rename from note_level_for_eh.
7097         (note_level_for_catch): New.
7098         (poplevel): Copy both is_try_scope and is_catch_scope to
7099         the named_label_list struct.
7100         (check_previous_goto_1): Don't check for catch block via
7101         DECL_ARTIFICIAL; use in_try_scope instead.
7102         (check_goto): Likewise.
7103         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
7104         * except.c (expand_start_catch_block): Call note_level_for_catch.
7105         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
7107 2001-03-27  Richard Henderson  <rth@redhat.com>
7109         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
7110         exceptions_via_longjmp.
7112 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
7114         * pt.c (check_default_tmpl_args):  Make error messages clearer.
7116 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
7118         * error.c:  Also undefine 'A' macro used for cp_printers definition.
7120 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7122         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
7124 2001-03-26  Mike Yang <yang@research.att.com>
7125             Mark Mitchell  <mark@codesourcery.com>
7127         * dump.c (dump_access): New function.
7128         (cp_dump_tree): Use it.  Dump basetype information for class
7129         types.
7131 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
7133         * Makefile.in (optimize.o): Depend on params.h.
7134         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
7135         (init_decl_processing): Set flag_no_inline when doing
7136         inlining-on-trees.
7137         * optimize.c: Include params.h.
7138         (struct inline_data): Improve documentation of FNS.  Add
7139         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
7140         (INSNS_PER_STMT): New macro.
7141         (remap_block): Use CLONING_P.
7142         (inlinable_function_p): Don't inline big functions.
7143         (expand_call_inline): Keep track of how much inlining we've done.
7144         (optimize_function): Set FIRST_INLINED_FN.
7145         (maybe_clone_body): Set CLONING_P.
7146         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
7147         tree nodes.
7148         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
7149         rest_of_compilation.  Clear DECL_RTL for local variables
7150         afterwards.
7151         (clear_decl_rtl): New function.
7153 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
7155         Implement DR 209
7156         * cp-tree.h (skip_type_access_control,
7157         reset_type_access_control): Prototype.
7158         * decl.c (grokdeclarator): Access of friends is not checked.
7159         * parse.y (component_decl_list): Reset type access control.
7160         * semantics.c (decl_type_access_control): Clear
7161         current_type_lookups.
7162         (save_type_access_control): Don't save if not deferring.
7163         (skip_type_access_control, reset_type_access_control): New
7164         functions.
7165         (begin_class_definition): Do type access control for basetypes.
7166         Start deferred access control.
7167         (finish_class_definition): Resume immediate access control if
7168         this is a local class.
7170 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7172         * class.c (add_method): Use memcpy/memmove, not bcopy.
7174         * decl.c (duplicate_decls): Likewise.
7176 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
7178         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
7179         not `_'.
7181 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
7183         * decl.c (local_names): Define.
7184         (push_local_name): New.
7185         (grok_reference_init): Return init if initializing static reference
7186         variable with non-constant instead of emitting it.
7187         Move expand_static_init call to cp_finish_decl.
7188         (layout_var_decl): Call push_local_name.
7189         (maybe_commonize_var): Allow inlining functions even if they have
7190         static local variables, use comdat_linkage for them if flag_weak.
7191         (check_initializer): Call obscure_complex_init if
7192         grok_reference_init returned nonzero.
7193         (save_function_data): Clear x_local_names.
7194         (pop_cp_function_context): Free x_local_names.
7195         (mark_inlined_fns): Remove.
7196         (mark_lang_function): Mark x_local_names.
7197         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
7198         Mark inlined_fns as tree, remove call to mark_inlined_fns.
7199         * class.c (alter_access): Ensure DECL_ACCESS is never set if
7200         DECL_DISCRIMINATOR_P.
7201         * cp-tree.h (cp_language_function): Add x_local_names.
7202         (lang_decl_flags): Add discriminator into u2.
7203         (lang_decl_inlined_fns): Remove.
7204         (lang_decl): inlined_fns is now a TREE_VEC.
7205         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
7206         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
7207         TREE_VEC, not a custom structure.
7208         (optimize_function): Likewise.
7209         * mangle.c (discriminator_for_local_entity): Discriminate among
7210         VAR_DECL local entities.
7211         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
7212         is not valid.
7214 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
7216         Add support for Java interface method calls.
7217         * cp-tree.h (struct lang_type): Add java_interface flag.
7218         (TYPE_JAVA_INTERFACE): New macro.
7219         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
7220         by setting TYPE_JAVA_INTERFACE.
7221         * call.c (java_iface_lookup_fn): New static.
7222         (build_over_call): If calling a method declared in a
7223         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
7224         expression which resolves the function address.
7225         (build_java_interface_fn_ref): New function.
7227 2001-03-22  Richard Henderson  <rth@redhat.com>
7229         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
7230         * except.c: Don't include it.
7232 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7233             based on an idea from Joe Buck <jbuck@synopsys.com>
7235         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
7236         New nonterminals.
7237         (data_def, component_decl): Add reductions to bad_decl.
7239 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
7241         * method.c (do_build_assign_ref): Don't use build_modify_expr for
7242         anonymous aggregates, since they don't have assignment operator
7243         method.
7244         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
7245         assignment operators for anonymous structure fields.
7247 2001-03-21  Jason Merrill  <jason@redhat.com>
7249         * pt.c (instantiate_decl): Abort if we see a member constant
7250         instantiation that doesn't already have its initializer.
7251         Downgrade explicit instantiation without definition to pedwarn.
7253         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
7254         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
7255         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
7257         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
7258         (pending_vtables): Remove.
7259         * decl2.c (pending_vtables): Remove.
7260         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
7261         CLASSTYPE_VTABLE_NEEDS_WRITING.
7262         (import_export_class): Likewise.
7263         (init_decl2): Don't mark pending_vtables.
7264         * lex.c (handle_pragma_vtable): Just sorry.
7265         * pt.c (instantiate_class_template): Don't mess with
7266         CLASSTYPE_VTABLE_NEEDS_WRITING.
7267         (mark_class_instantiated): Likewise.
7268         * ptree.c (print_lang_type): Don't print it.
7269         * semantics.c (begin_class_definition): Don't set it.
7271         * pt.c (template_tail): Replace with last_pending_template.
7272         (maybe_templates, maybe_template_tail): Remove.
7273         (add_pending_template): Adjust.
7274         (instantiate_pending_templates): Adjust.
7276         * cp-tree.h (struct saved_scope): Remove lang_stack field.
7277         (current_lang_stack): Remove.
7278         * decl.c (maybe_push_to_top_level): Don't initialize it.
7279         (duplicate_decls): Use current_lang_depth.
7280         (xref_basetypes): Likewise.
7281         * class.c (current_lang_depth): New fn.
7282         (push_lang_context): Use more varray functionality.
7283         (pop_lang_context): Likewise.
7285         * error.c (GLOBAL_THING): Always use '__'.
7287 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
7289         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
7291         * mangle.c (mangle_decl_string): Mangle the names of overloaded
7292         operators, even when they have `extern "C"' linkage.
7294 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
7296         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
7297         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7298         where it's not necessary.
7299         (add_method): Remove optimization involving comparison of
7300         DECL_ASSEMBLER_NAME.
7301         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
7302         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7303         where it's not necessary.
7304         (check_methods): Likewise.
7305         (build_clone): Likewise.
7306         (built_vtt): Likewise.
7307         * cp-tree.h (DECL_NEEDED_P): Likewise.
7308         * decl.c (pushtag): Likewise.
7309         (duplicate_decls): Likewise.
7310         (pushdecl): Likewise.
7311         (builtin_function): Likewise.
7312         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
7313         (build_cp_library_fn): Likewise.
7314         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
7315         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7316         where it's not necessary.
7317         (make_rtl_for_nonlocal_decl): Likewise.
7318         (cp_finish_decl): Likewise.
7319         (grokfndecl): Likewise.
7320         (grokvardecl): Likewise.
7321         (grokdeclarator): Likewise.
7322         (start_function): Likewise.
7323         (cp_missing_return_ok_p): Likewise.
7324         * decl2.c (grokclassfn): Likewise.
7325         (check_classfn): Likewise.
7326         (finish_static_data_member_decl): Likewise.
7327         (grokfield): Likewise.
7328         * error.c (GLOBAL_IORD_P): Remove.
7329         (dump_global_iord): Improve output.
7330         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
7331         * except.c (nothrow_libfn_p): Summarily reject any function not in
7332         namespace-scope.
7333         * init.c (build_java_class_ref): Don't explicitly set
7334         DECL_ASSEMBLER_NAME after calling mangle_decl.
7335         * mangle.c (mangle_decl_string): Handle extern "C" functions.
7336         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
7337         * method.c (set_mangled_name_for_decl): Don't explicitly set
7338         DECL_ASSEMBLER_NAME after calling mangle_decl.
7339         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
7340         IDENTIFIER_GLOBAL_VALUE for the thunk.
7341         * pt.c (set_mangled_name_for_template_decl): Remove.
7342         (check_explicit_specialization): Don't use it.
7343         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
7344         (tsubst_friend_function): Likewise.
7345         (tsubst_decl): Likewise.
7346         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
7347         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
7348         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7349         where it's not necessary.
7350         (tinfo_base_init): Likewise.
7351         (create_real_tinfo_var): Likewise.
7352         * search.c (looup_field_1): Likewise.
7353         * semantics.c (finish_named_return_value): Likewise.
7354         * tree.c (init_tree): Set lang_set_decl_assembler_name.
7356 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
7358         Correct semantics restrictions checking in throw-expression.
7359         * except.c (is_admissible_throw_operand): New function.
7360         (build_throw): Use it.
7362 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
7364         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
7365         and its ilk.
7367 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
7369         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
7370         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
7371         * decl.c (duplicate_decls): Likewise.
7372         (builtin_function): Likewise.
7373         (build_library_fn): Likewise.
7374         (build_cp_library_fn): Likewise.
7375         (check_initializer): Likewise.
7376         (cp_finish_decl): Likewise.
7377         * decl2.c (grokfield): Likewise.
7378         (grok_function_init): Remove #if 0'd code.
7379         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
7380         * friend.c (do_friend): Likewise.
7381         * init.c (get_temp_regvar): Likewise.
7382         * method.c (make_thunk): Likewise.
7383         * pt.c (tsubst_friend_function): Likewise.
7384         (tsubst_decl): Likewise.
7385         (regenerate_decl_from_template): Likewise.
7386         * semantics.c (genrtl_named_return_value): Likewise.
7387         (expand_body): Likewise.
7388         (genrtl_finish_function): Likewise.
7389         * tree.c (cp_tree_equal): Likewise.
7391 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
7393         * call.c (convert_like_real): Add extra semantics to INNER
7394         parameter. Don't convert to temporary if a user conversion
7395         gives us an lvalue that we're about to bind to a reference.
7396         Set INNER to indicate pending reference binding on recursive
7397         calls.
7399 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
7401         * cp/lex.c: Delete duplicate pending_lang_change.
7403 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
7405         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
7406         Similarly.
7407         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
7408         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
7410 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
7412         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
7414 2001-03-08  Stan Shebs  <shebs@apple.com>
7416         * cp-tree.h (set_identifier_local_value): Remove unused decl.
7418 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
7420         * spew.c: Remove references to CPP_OSTRING.
7422 2001-03-06  Andrew Haley  <aph@redhat.com>
7424         * typeck.c (convert_arguments): Check that we have an fndecl.
7426 2001-03-05  Andrew Haley  <aph@redhat.com>
7428         * typeck.c (convert_arguments): Don't do ellipsis conversion for
7429         __built_in_constant_p.
7431 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
7433         * typeck.c (build_static_cast): Allow enum to enum conversions
7434         as per DR 128.
7436 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
7438         * class.c (check_field_decls): Pointers to member do not a
7439         non-pod struct make, as per DR 148.
7441 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
7443         * call.c (joust): cp_pedwarn when using gnu extension concerning
7444         worst conversion sequences.
7446 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
7448         * decl.c: Replace all uses of 'boolean' with 'bool'.
7450 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
7452         * lang-specs.h: Add zero initializer for cpp_spec field to
7453         all array elements that need one.  Don't put an #ifdef inside
7454         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
7455         use it.
7457 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
7459         Implement using decls inside template functions.
7460         * decl2.c (validate_nonmember_using_decl): Don't special case
7461         fake_std_node in the global namespace. Don't reject early when
7462         processing a template.
7463         (do_local_using_decl): Add to statement tree. Don't do further
7464         processing when building a template.
7465         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
7467 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
7469         * decl2.c (do_nonmember_using_decl): Don't complain if we find
7470         same function. Do complain about ambiguating extern "C"
7471         declarations.
7473 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
7475         Remove floating point and complex type template constant parms.
7476         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
7477         COMPLEX_TYPE extensions.
7478         (invalid_nontype_parm_type_p): Likewise.
7480 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
7482         * except.c (call_eh_info): Revert "match_function"'s type.
7484 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
7486         Fix ctor vtable vcall offsets.
7487         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
7488         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
7489         (get_matching_base): Remove.
7490         (get_original_base): New function.
7491         (build_vtbl_initializer): Initialize vid.rtti_binfo.
7492         Use a virtual thunk for a ctor vtable with an index
7493         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
7494         primary base within a constructor vtable. Only set
7495         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
7496         when primary base has been lost.
7497         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
7499 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
7501         * call.c (joust): Ensure more_specialized()'s argument length
7502         parameter has correct value for constructors.
7504 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
7506         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
7508         * decl.c (mark_inlined_fns): Prototype.
7510 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
7512         * spew.c (yylex): Correct handling of friends.
7514 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
7516         * mangle.c (write_encoding): Pass write_function_type the
7517         FUNCTION_DECL for the function being encoded.
7518         (write_function_type): Pass it along to write_bare_function_type.
7519         (write_bare_function_type): Pass it along to write_method_parms.
7520         (write_method_parms): Don't mangle the compiler-generated
7521         parameters to a constructor or destructor.
7523 2001-02-22  Andreas Jaeger  <aj@suse.de>
7525         * optimize.c: Include toplev.h for
7526         note_deferral_of_defined_inline_function prototype.
7528 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
7530         * cp-tree.h (struct lang_decl_inlined_fns): New.
7531         (struct lang_decls): Add inlined_fns.
7532         (DECL_INLINED_FNS): New macro.
7533         * optimize.c (struct inline_data): Add inlined_fns.
7534         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
7535         (inlinable_function_p): Likewise, fix typo in comment,
7536         function is not inlinable if it already inlined function currently
7537         being optimized.
7538         (expand_call_inline): Add fn to inlined_fns if necessary.
7539         (optimize_function): Initialize inlined_fns.
7540         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
7541         * decl.c (mark_inlined_fns): New function.
7542         (lang_mark_tree): Call it.
7544 2001-02-21  Jason Merrill  <jason@redhat.com>
7546         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
7547         (DECL_UNINLINABLE): Move to middle-end.
7549         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
7550         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
7551         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
7552         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
7553         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
7555         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
7556         second parm of op=.
7558 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
7560         * decl2.c (set_decl_namespace): Allow explicit instantiations in
7561         any namespace.
7563 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7565         * optimize.c (expand_call_inline): Don't walk subtrees of type
7566         nodes.
7568 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
7570         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
7571         for a destructor.
7573 2001-02-18  Jason Merrill  <jason@redhat.com>
7575         Do put the VTT parameter in DECL_ARGUMENTS.
7576         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
7577         (current_vtt_parm): New macro.
7578         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
7579         (DECL_HAS_VTT_PARM_P): New macro.
7580         (DECL_VTT_PARM): Remove.
7581         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
7582         * decl.c (duplicate_decls): Only copy the operator code if
7583         appropriate.
7584         (start_function): Set current_vtt_parm.
7585         (lang_mark_tree): Don't mark vtt_parm.
7586         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
7587         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
7588         * class.c (build_clone): Maybe remove the VTT parm.
7589         * optimize.c (maybe_clone_body): Set up the VTT parm.
7590         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
7591         * call.c (build_over_call): Just allow the VTT arg.
7592         * method.c (make_thunk): Don't set DECL_VTT_PARM.
7593         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
7594         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
7595         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
7596         * error.c (dump_function_decl): Likewise.
7597         * call.c (build_user_type_conversion_1, convert_like_real): Abort
7598         if we try to call a constructor with in-charge or VTT parms.
7599         * method.c (skip_artificial_parms_for): New fn.
7600         * call.c (add_function_candidate, build_over_call): Call it.
7601         * call.c (build_new_method_call): Use current_vtt_parm.
7602         * init.c (expand_virtual_init): Likewise.
7603         * class.c (same_signature_p): No longer static.
7604         * cp-tree.h: Declare it.
7605         * search.c (look_for_overrides_r): Use it.
7607 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
7609         * cp-tree.h (new_abi_rtti_p): Remove.
7610         (name_mangling_version): Likewise.
7611         (flag_do_squangling): Likewise.
7612         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
7613         * decl.c (grokfndecl): Likewise.
7614         * decl2.c (name_mangling_version): Remove.
7615         (flag_do_squangling): Likewise.
7616         (lang_f_options): Remove `squangle'.
7617         (unsupported_options): Add `squangle'.
7618         (cxx_decode_option): Issue a warning about uses of
7619         -fname-mangling-version.
7620         (finish_file): Remove old ABI support.
7621         * pt.c (check_explicit_specialization): Likewise.
7622         (tsubst_decl): Likewise.
7623         * rtti.c (init_rtti_processing): Likewise.
7624         (build_headof): Likewise.
7625         (get_tinfo_decl_dynamic): Likewise.
7626         (tinfo_from_decl): Likewise.
7627         (build_dynamic_cast_1): Likewise.
7628         (synthesize_tinfo_var): Likewise.
7629         * init.c (build_new): Allow enumeration types for the array-bounds
7630         in a direct-new-declarator.
7632         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
7634         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
7635         TREE_PROTECTED from the template being specialized.
7637 2001-02-17  Jason Merrill  <jason@redhat.com>
7639         * decl2.c (build_artificial_parm): Set TREE_READONLY.
7641         * decl.c (bad_specifiers): Allow throw specs on things with
7642         pointer-to-function or -member-function type.
7643         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
7644         a pmf.
7646 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
7648         * call.c (check_dtor_name): Handle template names correctly.
7650 2001-02-16  Jason Merrill  <jason@redhat.com>
7652         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
7653         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
7654         * optimize.c (maybe_clone_body): Don't substitute it.
7655         * call.c (build_new_method_call): Check in_chrg instead.
7656         * init.c (expand_virtual_init): Likewise.
7658 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
7660         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
7661         class-type introduces at least a type-name.
7663 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
7665         * call.c (convert_like_real): Create a temporary for non-lvalue.
7667 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
7669         * cp-tree.h: Fix typos in comments.
7671 2001-02-16  Jason Merrill  <jason@redhat.com>
7673         * optimize.c (remap_block): If we're compiling a clone, pass the
7674         new block to insert_block.
7676 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
7678         * semantics.c (finish_asm_stmt): Robustify.
7680 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
7682         * pt.c (push_template_decl_real): Don't remangle the name of a
7683         class template.
7685 2001-02-15  Jim Meyering  <meyering@lucent.com>
7687         * Make-lang.in (c++.install-common): Depend on installdirs.
7688         (c++.install-info): Likewise.
7689         (c++.install-man): Likewise.
7691 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
7693         * typeck2.c (build_m_component_ref): Robustify.
7695 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
7697         * friend.c (do_friend): Don't take the nested [template] class
7698         into account when deciding whether to warn about the friend
7699         function not referring to a template function.
7701 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
7703         * typeck.c (build_unary_op): Clarify error message.
7705 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
7707         * parse.y (component_constructor_declarator): allow optional
7708         parentheses around constructor class name.
7710 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7712         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
7713         section.
7714         * init.c (emit_base_init): Remove incorrect comment about
7715         virtual bases.
7716         * method.c (make_thunk): Fix comment alignment.
7718 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7720         Kill remnants of this is variable.
7721         * cp-tree.h (flag_this_is_variable): Remove.
7722         * decl2.c (flag_this_is_variable): Remove.
7723         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
7724         (build_vbase_path): The path is non-static, even in a cdtor.
7725         (resolves_to_fixed_type_p): Add additional return value.
7726         * search.c (init_vbase_pointers): Adjust.
7727         * tree.c (lvalue_p_1): Adjust.
7728         * typeck.c (mark_addressable): Adjust.
7730 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7732         * pt.c (unify): Don't check cv quals of array types.
7734 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7736         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
7737         check whether we already have the type.
7739 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
7741         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
7742         * call.c (build_op_delete_call): Simplify to remove duplicate
7743         code.
7744         * class.c (clone_function_decl): Don't build the deleting variant
7745         of a non-virtual destructor.
7746         * decl.c (finish_destructor_body): Don't call delete if this is a
7747         non-virtual destructor.
7748         * init.c (build_delete): Explicitly call `operator delete' when
7749         deleting an object with a non-virtual destructor.
7751 2001-02-13  Jason Merrill  <jason@redhat.com>
7753         * lang-specs.h: Add more __EXCEPTIONS.
7755 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
7757         * typeck2.c (process_init_constructor): Check
7758         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
7760 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
7762         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
7763         Remove spurious information in comment. Allow further
7764         adjustments of REFERENCE_TYPE args.
7766 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
7768         * errfn.c (cp_deprecated): Tweak diagnostic text.
7769         * parse.y (new_initializer): Deprecate initializer lists
7770         extension.
7772 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
7774         Remove old ABI support.
7776 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
7778         * decl2.c (flag_vtable_thunks): Always set it to 1.
7779         (flag_new_abi): Likewise.
7780         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
7782         * Makefile.in (g++spec.o): Fix typo.
7784 2001-02-09  Jason Merrill  <jason@redhat.com>
7786         * lang-specs.h: Restore definition of __EXCEPTIONS.
7788 2001-02-08  Jason Merrill  <jason@redhat.com>
7790         * search.c (shared_member_p): New function.
7791         (lookup_field_r): Use it.
7792         * cp-tree.h (SHARED_MEMBER_P): Remove.
7794         * method.c (process_overload_item): Handle template-dependent array
7795         bounds.
7796         * pt.c (type_unification_real): If we end up with undeduced nontype
7797         parms, try again.
7799         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
7800         types.
7802         * typeck2.c (friendly_abort): Don't say anything if we have
7803         earlier errors or sorries.
7805         * decl.c (check_tag_decl): Notice attempts to redefine bool and
7806         wchar_t.  Ignore if in_system_header.
7808         * decl.c (maybe_push_cleanup_level): New fn...
7809         (start_decl_1): ...split out from here.
7810         * cvt.c (build_up_reference): Use it.
7811         * cp-tree.h: Declare it.
7813 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
7815         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
7816         spec.
7818 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
7820         * pt.c (lookup_template_class): Make sure it's a primary
7821         template or template_template_parm when called from the parser.
7822         (instantiate_template_class): Add assertion.
7824 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
7826         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
7827         from error_mark_node.
7829 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
7831         Fix specification and implementation bugs in V3 ABI
7832         construction vtables.
7833         * cp-tree.h (flag_dump_class_layout): New flag.
7834         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
7835         (BINFO_LOST_PRIMARY_P): New flag.
7836         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
7837         (BINFO_PRIMARY_MARKED_P): Rename to ...
7838         (BINFO_PRIMARY_P): ... here.
7839         (binfo_via_virtual): New prototype.
7840         * decl2.c (flag_dump_class_layout): New flag.
7841         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
7842         use `=' as a file name separator.
7843         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
7844         bases.
7845         (build_vtbl_address): If this is a virtual primary base, then
7846         get the vtbl of what it is ultimately primary for.
7847         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
7848         for BINFO_PRIMARY_P.
7849         (dfs_skip_nonprimary_vbases_markedp): Likewise.
7850         (get_shared_vbase_if_not_primary): Likewise.
7851         (dfs_get_pure_virtuals): Likewise.
7852         (expand_upcast_fixups): Likewise.
7853         (fixup_virtual_upcast_offsets): Likewise.
7854         (dfs_find_vbase_instance): Likewise.
7855         (find_vbase_instance): Likewise.
7856         (binfo_from_vbase): Adjust comment to reflect reality.
7857         (binfo_via_virtual): New function.
7858         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
7859         for binfo walking during VTT construction.
7860         (dfs_mark_primary_bases): Remove.
7861         (force_canonical_binfo_r): New function.
7862         (force_canonical_binfo): New function.
7863         (mark_primary_virtual_base): New function.
7864         (mark_primary_bases): Walk in inheritance graph order, use
7865         mark_primary_virtual_base.
7866         (determine_primary_base): Use some more intermediate variables.
7867         (dfs_find_final_overrider): Don't check for overriding along a
7868         virtual path.
7869         (dfs_modify_vtables): Walk into primary virtual bases too.
7870         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
7871         (build_base_fields): Likewise.
7872         (dfs_set_offset_for_unshared_vbases): Likewise.
7873         (layout_virtual_bases): Likewise.
7874         (end_of_class): Likewise.
7875         (finish_struct_1): Call dump_class_hierarchy, if requested.
7876         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
7877         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
7878         (dump_class_hierarchy): Add file parameter. Append to file, if
7879         required.
7880         (finish_vtbls): Adjust accumulate_vtbl_inits call.
7881         Use canonical base for virtual bases.
7882         (build_vtt): Add more comments. Adjust build_vtt_inits call.
7883         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
7884         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
7885         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
7886         virtual VTTs.
7887         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
7888         from DATA.  We want virtual primary bases and all bases via virtual.
7889         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
7890         virtual base when not a construction vtable.
7891         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
7892         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
7893         Use canonical bases when processing virtual bases.
7894         (accumulate_vtbl_inits): We're interested in any base via a
7895         virtual path.
7896         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
7897         within a construction vtable, determine what is being overridden.
7898         (build_vtbl_initializer): Add more comments
7899         (add_vcall_offset_vtbl_entries_1): Adjust comment.
7900         (build_rtti_vtbl_entries): Check if the base has lost its
7901         primary.
7903 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
7905         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
7907 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7909         * decl.c (pushdecl): Call abort instead of fatal.
7910         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
7911         * init.c (build_new_1): Likewise.
7912         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
7913         * decl.c (build_typename_type): hash_table_init now returns void.
7914         decl.c (init_decl_processing): Make an error non-fatal.
7916 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
7918         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
7919         Document.
7920         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
7921         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
7922         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
7923         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
7924         * decl.c (maybe_commonize_var): Use the new name-mangling where
7925         appropriate.
7926         * decl2.c (comdat_linkage): Enhance comments.  Make all
7927         compiler-generated things static, if COMDAT is not available.
7928         (get_tinfo_decl): Do not make typeinfo objects that belong in the
7929         library COMDAT.
7930         (tinfo_base_init): Use the correct mangled name for typeinfo
7931         strings, and push them into the global scope.
7932         (typeinfo_in_lib_p): New function.
7933         (synthesize_tinfo_var): Use it.
7934         (create_real_tinfo_var): Likewise.
7936 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
7938         * decl.c (push_class_binding): Use context_for_name_lookup instead
7939         of CP_DECL_CONTEXT.
7940         * search.c (context_for_name_lookup): Remove static.  Check for NULL
7941         context in the loop.
7942         * cp-tree.h (context_for_name_lookup): Add prototype.
7944 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
7946         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
7947         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
7948         Remove.
7949         * call.c (convert_class_to_reference, build_user_type_conversion_1,
7950         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
7952 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
7954         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
7955         of macros used when compiling g++spec.c.
7956         * g++spec.c (lang_specific_driver): Link with the shared
7957         libgcc by default.
7959 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7961         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
7962         make_reference_declarator, make_call_declarator), method.c
7963         (implicitly_declare_fn), parse.y (namespace_using_decl,
7964         notype_unqualified_id, expr_or_declarator, new_type_id,
7965         after_type_declarator, direct_after_type_declarator,
7966         notype_declarator, complex_notype_declarator,
7967         complex_direct_notype_declarator, qualified_id,
7968         notype_qualified_id, overqualified_id, direct_new_declarator,
7969         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
7970         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
7971         instead of build_parse_node.
7973 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7975         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
7976         (minus_one_node): Moved to top level gcc directory.  Renamed
7977         to integer_minus_one_node.
7979         * init.c (init_init_processing): Don't set minus_one_node.
7980         (build_vec_init): Use integer_minus_one_node.
7982         * rtti.c (get_tinfo_decl_dynamic): Likewise.
7984 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
7986         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
7987         identical and they would be replaced with constant, remove
7988         MODIFY_EXPR from the tree.
7990 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7992         * Make-lang.in: Remove all dependencies on defaults.h.
7993         * call.c: Don't include defaults.h.
7994         * decl.c: Likewise.
7995         * decl2.c: Likewise.
7996         * except.c: Likewise.
7997         * pt.c: Likewise.
7998         * rtti.c: Likewise.
7999         * tree.c: Likewise.
8000         * typeck.c: Likewise.
8002 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
8004         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
8005         operators even in "C" linkage.
8006         * method.c (set_mangled_name_for_decl): Likewise.
8007         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
8008         overloaded operators in "C" linkage.
8010 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
8012         * pt.c (tsubst_decl): Remove IN_DECL parameter.
8013         (tsubst_arg_types): Check parameter is not void.
8014         (tsubst): Adjust tsubst_decl call.
8016 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
8018         * call.c (add_builtin_candidate): Quote std properly, from
8019         previous change.
8021 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8023         * pt.c (check_explicit_specialization): Clone constructors and
8024         destructors.
8026 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
8028         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
8029         indicates anything special about template depth. Make sure we
8030         only count the user visible template classes.
8032 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
8034         * call.c (build_conv): Typo in comment.
8035         (add_builtin_candidate): Add more explanation.
8036         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
8037         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
8038         when we have enumeral types.
8039         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
8040         candidates for relops and eqops.
8041         (joust): Simplify control flow. Allow a non-template user
8042         function to hide a builtin.
8044 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
8046         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
8047         (more_specialized): Add deduction parameter.
8048         * call.c (joust): Adjust more_specialized call.
8049         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
8050         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
8051         (get_bindings_order): Remove.
8052         (get_bindings_real): Add DEDUCE parameter.
8053         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
8054         REFERENCE_TYPE jig for DEDUCE_ORDER.
8055         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
8056         maybe_adjust_types_for_deduction.
8057         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
8058         directly.
8059         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
8060         (check_cv_quals_for_unify): Use new unify qualifier flags.
8061         (unify): Clear new unify qualifier flags.
8062         (get_bindings_real): Add DEDUCE parameter.
8063         (get_bindings): Adjust call to get_bindings_real.
8064         (get_bindings_overload): Likewise.
8065         (most_specialized_instantiation): Adjust call to
8066         more_specialized.
8068 2001-01-19  Jason Merrill  <jason@redhat.com>
8070         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
8072         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
8073         -fnew-abi.
8075 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
8077         * decl2.c (arg_assoc_class): Fix double iteration logic.
8079 2001-01-19  Jason Merrill  <jason@redhat.com>
8081         * init.c (build_delete): Always call convert_force to strip cv-quals.
8083         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
8084         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
8085         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
8087 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8089         * search.c (get_vbase_1): Count only virtual bases.
8091 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8093         * class.c (duplicate_tag_error): Robustify flag clearing.
8095 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8097         * cp-tree.h (lookup_template_class): Add complain parm.
8098         * decl.c (lookup_namespace_name): Adjust call to
8099         lookup_template_class.
8100         (make_typename_type): Likewise.
8101         * semantics.c (finish_template_type): Likewise.
8102         * pt.c (lookup_template_class): Add complain parm. Adjust.
8103         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
8104         (tsubst): Likewise.
8106 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8108         * pt.c (copy_default_args_to_explicit_spec): Preserve
8109         object's CV quals. Reorganize.
8111 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8113         * typeck.c (build_modify_expr): Say `initialization' for
8114         INIT_EXPRs.
8115         * init.c (build_default_init): Convert to enumeral type, if
8116         needed.
8118 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
8120         * parse.y (nomods_initdcl0): Properly set things up for
8121         initdcl0_innards.
8123 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8125         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
8126         (type_unification_real): Set it.
8127         (unify): Use it.
8129 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8131         * decl.c (finish_destructor_body): Convert to vbase pointer here.
8133 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8135         * semantics.c (begin_class_definition): Check we're not inside a
8136         template parm list.
8138 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8140         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
8141         BASELINK_P.
8143 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8145         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
8146         * call.c (build_over_call): Add comment.
8148 2001-01-16 Daniel Berlin <dberlin@redhat.com>
8150         * cvt.c (ocp_convert): Handle vector type conversion
8151         * typeck2.c (digest_init): Handle vector type initializations
8153 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
8155         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
8156           was given.
8158 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
8160         * pt.c (check_nontype_parm): Rename to ...
8161         (invalid_nontype_parm_type_p): ... here.
8162         (process_template_parm): Adjust.
8163         (convert_template_argument): Adjust.
8165 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
8167         * pt.c (check_nontype_parm): New function.
8168         (process_template_parm): Use it.
8169         (convert_template_argument): Use it.
8170         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
8171         member.
8173 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
8175         * tree.c: Add defaults.h
8176         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
8177         * Make-lang.in (cp/tree.o): Add defaults.h.
8179 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8181         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
8183 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8185         * g++.1: Change to be ".so man1/gcc.1".
8187 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8189         * Make-lang.in (c++.info, c++.install-info): Build and install g++
8190         internals info.
8191         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
8192         ($(srcdir)/cp/g++int.info): New target.
8193         * gxxint.texi: Add info directory entry.  Use @@ in email address.
8194         * .cvsignore: Update.
8196 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
8198         * typeck.c (build_c_cast): Do template processing earlier.
8199         Always pedwarn on array casts.
8201 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
8203         * friend.c (make_friend_class): Make sure a templated class is
8204         actually a template.
8206 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8208         * decl2.c (get_guard): Set linkage from guarded decl.
8210 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8212         * call.c (convert_default_arg): Check for unprocessed
8213         DEFAULT_ARG.
8214         * cp-tree.h (replace_defarg): Move to spew.c.
8215         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
8216         spew.c, which is where they really are.
8217         (done_pending_defargs): Declare.
8218         (unprocessed_defarg_fn): Declare.
8219         * decl.c (replace_defarg): Move to spew.c
8220         * parse.y (structsp): Call done_pending_defargs.
8221         * spew.c (defarg_fns): Rearrange list structure.
8222         (defarg_fnsdone): New static variable.
8223         (defarg_depfns): New static variable.
8224         (init_spew): Adjust.
8225         (add_defarg_fn): Store the type in TREE_TYPE.
8226         (do_pending_defargs): Detect and deal with ordering constraints
8227         and circularity.
8228         (done_pending_defargs): New function.
8229         (unprocessed_defarg_fn): New function.
8230         (replace_defarg): Moved from decl.c. Robustify. Don't save
8231         if circularity detected.
8233 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8235         * pt.c (unify): Check array has a domain, before checking
8236         whether it is variable sized.
8238 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8240         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
8241         parameters with pointers to arrays of unknown bound.
8243 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8245         * parse.y (template_parm_header, template_spec_header): New
8246         reductions. Split out from ...
8247         (template_header): ... here. Use them.
8248         (template_template_parm): Use template_parm_header.
8249         * semantics.c (finish_template_template_parm): Add assert.
8251 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
8253         * mangle.c (write_builtin_type): Fix thinko.
8255         * pt.c (copy_default_args_to_explicit_spec_1): New function.
8256         (copy_default_args_to_explicit_spec): Likewise.
8257         (check_explicit_specialization): Use it.
8259         * class.c (finish_struct_1):  Remove last argument in call to
8260         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
8261         * decl.c (builtin_function): Likewise.
8262         (build_cp_library_fn): Likewise.
8263         (check_initializer): Likewise.
8264         (make_rtl_for_nonlocal_decl): Likewise.
8265         (cp_finish_decl): Likewise.
8266         (start_function): Likewise.
8267         * decl2.c (finish_anon_union): Likewise.
8268         * friend.c (do_friend): Likewise.
8269         * init.c (build_java_class_ref): Likewise.
8270         * method.c (make_thunk): Likewise.
8271         * pt.c (tsubst_friend_function): Likewise.
8272         * semantics.c (expand_body): Likewise.
8274 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
8276         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
8277         looking at DECL_CLONED_FUNCTION for non-functions.
8279 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
8281         * error.c (dump_template_parameter): Use parm to determine how
8282         to print default value.
8284 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
8286         * class.c (duplicate_tag_error): Clear more flags.
8288 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
8290         * call.c (build_new_method_call): Use binfo_for_vbase.
8292 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
8294         * cp-tree.h (flag_cond_mismatch): Don't declare.
8295         * decl2.c (flag_cond_mismatch): Don't define.
8296         (lang_f_options): Remove cond-mismatch.
8297         (unsupported_options): Add cond-mismatch.
8299 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
8301         * class.c (handle_using_decl): Reject using of constructor name
8302         of sourcing class. Allow injecting of a method with same name as
8303         nested class. Fixup error messages.
8305 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
8307         * decl2.c (lang_decode_option): Handle -Wformat=2.
8309 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
8311         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
8312         initialized_in_class.
8313         (DECL_DEFINED_IN_CLASS_P): Rename to ...
8314         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
8315         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
8316         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
8317         * pt.c (check_default_tmpl_args): Adjust for
8318         DECL_INITIALIZED_IN_CLASS_P.
8319         (instantiate_class_template): Likewise.
8320         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
8322         * class.c (finish_struct): Constify saved_filename.
8324 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
8326         * class.c (duplicate_tag_error): Adjust diagnostic.
8327         (finish_struct): Locally set location to start of struct.
8328         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
8330 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
8332         * decl.c (struct binding_level): Adjust class_shadowed comments
8333         to reflect reality.
8334         (push_class_level_binding): Adjust comments to reflect reality.
8335         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
8336         Don't set TREE_VALUE on the class_shadowed list.
8338 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8340         * decl2.c (acceptable_java_type): Allow references too.
8341         * init.c (build_java_class_ref): When using the new ABI, search
8342         `class$' and have it mangled with `mangle_decl.'
8343         * mangle.c (write_java_integer_type_codes): New function.
8344         (write_builtin_type): Detect and mangle Java integer and real
8345         types.
8347 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
8349         * decl2.c (grokfield): Don't accept `asm' specifiers for
8350         non-static data members.
8352 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8354         * expr.c (cplus_expand_expr): Don't reset `target'.
8356 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
8358         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
8360 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
8362         * parse.y (template_datadef): Check for error_mark_node.
8364 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
8366         * cp-tree.def (DEFAULT_ARG): Make `x' class.
8368 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
8370         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
8371         (record_builtin_type): Make non-static.
8372         (flag_short_double): Don't declare.
8373         (init_decl_processing): Remove the creation of many tree nodes now
8374         in c_common_nodes_and_builtins.
8375         (build_void_list_node): New function.
8376         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
8377         * cp-tree.h (flag_short_wchar): Don't declare.
8379 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
8381         * call.c (build_conv): Don't use build1 for USER_CONV.
8382         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
8384 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
8386         * lex.c (lang_init): Call c_common_lang_init.
8388 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
8390         * search.c (lookup_fnfields_here): Remove.
8391         (look_for_overrides_r): Use lookup_fnfields_1.
8392         Ignore functions from using declarations.
8394 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
8396         Implement exceptions specifiers for implicit member functions.
8397         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
8398         * method.c (synthesize_exception_spec): New function.
8399         (locate_dtor, locate_ctor, locate_copy): New functions.
8400         (implicitly_declare_fn): Generate the exception spec too.
8401         * search.c (check_final_overrider): Check artificial functions
8402         too.
8403         * typeck2.c (merge_exception_specifiers): New function.
8405 2001-01-03  Jason Merrill  <jason@redhat.com>
8407         * init.c (build_default_init): New fn.
8408         (perform_member_init): Split out from here.
8409         (build_new_1): Use it.  Simplify initialization logic.
8410         (build_vec_init): Take an array, rather than a pointer and maxindex.
8411         Speed up simple initializations.  Don't clean up if we're assigning.
8412         * cp-tree.h: Adjust.
8413         * decl2.c (do_static_initialization): Remove TREE_VEC case.
8414         * parse.y (new_initializer): Return void_zero_node for ().
8415         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
8416         * typeck2.c (digest_init): Only complain about user-written
8417         CONSTRUCTORs.
8419 2000-12-22  Mike Stump  <mrs@wrs.com>
8421         * decl2.c: (max_tinst_depth): Increase to 50.
8423 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
8425         * class.c (invalidate_class_lookup_cache): Zero the
8426         previous_class_values.
8427         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
8428         TREE_INT_CST_HIGH.
8429         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
8430         * decl.c (free_bindings): New variable.
8431         (push_binding): Don't create a new binding if we have one on the
8432         free list.
8433         (pop_binding): Put old bindings on the free list.
8434         (init_decl_processing): Use size_int, not build_int_2.
8435         Register free_bindings as a GC root.
8436         (cp_make_fname_decl): Use size_int, not build_int_2.
8437         (push_inline_template_parms_recursive): Likewise.
8438         (end_template_parm_list): Likewise.
8439         (for_each_template_parm): Do not use walk_tree_without_duplicates.
8440         (tsubst_template_parms): Use size_int, not build_int_2.
8441         (tsubst): Likewise.
8442         * rtti.c (get_vmi_pseudo_type_info): Likewise.
8444 2001-01-02  Richard Henderson  <rth@redhat.com>
8446         * parse.y (asm): Set ASM_INPUT_P.
8448 2001-01-02  Jason Merrill  <jason@redhat.com>
8450         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
8451         for v3 ABI.
8453         * typeck.c (cp_truthvalue_conversion): New fn.
8454         * cvt.c (ocp_convert): Use it.
8456         * cp-tree.h: Lose c-common.c decls.
8458         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
8459         * cvt.c (convert_to_void): Use type_unknown_p.
8461         * typeck.c (strip_all_pointer_quals): Also strip quals from
8462         pointer-to-member types.
8464         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
8465         parse.y as C.
8467         * call.c (build_new_method_call): Do evaluate the object parameter
8468         when accessing a static member.
8469         * typeck.c (build_component_ref): Likewise.
8471 2001-01-02  Andreas Jaeger  <aj@suse.de>
8473         * decl.c (cp_missing_noreturn_ok_p): New.
8474         (init_decl_processing): Set lang_missing_noreturn_ok_p.
8476 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
8478         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
8480 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
8482         * class.c (pushclass): Remove #if 0'd code.
8483         * cp-tree.h (overload_template_name): Remove.
8484         * decl.c (store_bindings): Simplify.
8485         (pop_from_top_level): Likewise.
8486         * pt.c (overload_template_name): Remove.
8487         (instantiate_decl): Don't call push_to_top_level if it's not
8488         needed.
8490 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
8492         * pt.c (register_local_specialization): Don't return a value.
8493         (lookup_template_class): Use move-to-front heuristic when looking
8494         up template instantiations.
8495         (instantiate_decl): Only push_to_top_level when we're actually
8496         going to instantiate the template.
8498 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
8500         * search.c (binfo_for_vtable): Return least derived class, not
8501         most.  Handle secondary vtables.
8503 2000-12-22  Jason Merrill  <jason@redhat.com>
8505         * pt.c (more_specialized): Don't optimize len==0.
8506         (fn_type_unification): If we're adding the return type, increase len.
8508         * typeck.c (build_binary_op): Fix pmf comparison logic.
8510         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
8511         DECL_STATIC_FUNCTION_P.
8513         * semantics.c (genrtl_finish_function): Don't try to jump to
8514         return_label unless it exists.
8516         In partial ordering for a call, ignore parms for which we don't have
8517         a real argument.
8518         * call.c (joust): Pass len to more_specialized.
8519         (add_template_candidate_real): Strip 'this', pass len.
8520         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
8521         (get_bindings_order): New fn.  Pass len down.
8522         (get_bindings_real): Strip 'this', pass len.
8523         (fn_type_unification): Likewise.
8524         (type_unification_real): Succeed after checking 'len' args.
8525         (most_specialized_instantiation): Lose explicit_args parm.
8526         * class.c (resolve_address_of_overloaded_function): Strip 'this',
8527         pass len.
8529 2000-12-21  Jason Merrill  <jason@redhat.com>
8531         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
8532         DECL_TEMPLATE_RESULT.
8534         * search.c (lookup_field_r): Call lookup_fnfields_1, not
8535         lookup_fnfields_here.
8537         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
8539         * call.c (build_object_call): Also allow conversions that return
8540         reference to pointer to function.
8541         (add_conv_candidate): Handle totype being ref to ptr to fn.
8542         (build_field_call): Also allow members of type reference to function.
8543         Lose support for calling pointer to METHOD_TYPE fields.
8545         * error.c (dump_expr): Handle *_CAST_EXPR.
8547         * typeck2.c (build_scoped_ref): Always convert to the naming class.
8549         * tree.c (break_out_cleanups): Lose.
8550         * cp-tree.h: Remove prototype.
8551         * typeck.c (build_component_ref): Don't break_out_cleanups.
8552         (build_compound_expr): Likewise.
8553         * semantics.c (finish_expr_stmt): Likewise.
8555 2000-12-20  Richard Henderson  <rth@redhat.com>
8557         * cp-tree.h: Update declarations.
8558         * decl.c (finish_case_label): Return the new stmt node.
8559         * semantics.c (finish_goto_stmt): Likewise.
8560         (finish_expr_stmt, finish_return_stmt): Likewise.
8561         (finish_break_stmt, finish_continue_stmt): Likewise.
8562         (finish_asm_stmt): Likewise.
8563         * parse.y (already_scoped_stmt): Set STMT_LINENO.
8564         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
8565         (simple_if, simple_stmt): Return the new stmt node.
8566         (save_lineno): New.
8568 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
8570         * cp-tree.h: Don't declare warn_long_long.
8572 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8574         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
8575         IS_AGGR_TYPE.
8577 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8579         * pt.c (unify): Handle when both ARG and PARM are
8580         BOUND_TEMPLATE_TEMPLATE_PARM.
8582 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8584         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
8585         DECL_TEMPLATE_PARM_P.
8587 2000-12-15  Jason Merrill  <jason@redhat.com>
8589         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
8591         * init.c (build_new_1): Don't strip quals from type.
8593         * decl.c (pushdecl): Don't check for linkage on a non-decl.
8595         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
8597         * call.c (build_new_function_call): Lose space before paren in
8598         error message.
8599         (build_new_method_call): Likewise.
8601         * typeck2.c (build_m_component_ref): Propagate quals from datum.
8603 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8605         * pt.c (check_explicit_specialization): Propagate default
8606         function arguments to explicit specializations.
8608 2000-12-13  DJ Delorie  <dj@redhat.com>
8610         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
8611         and <? operators.
8613 2000-12-08  Jason Merrill  <jason@redhat.com>
8615         * error.c (dump_function_name): Don't let the user see __comp_ctor.
8617         Clean up copy-initialization in overloading code.
8618         * call.c (build_user_type_conversion_1): Die if we are asked to
8619         convert to the same or a base type.
8620         (implicit_conversion): Avoid doing so.  Lose reference binding code.
8621         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
8622         direct-initialization.  Also do direct-init part of copy-init.
8623         (build_user_type_conversion): Don't provide context to convert_like.
8624         * cvt.c (ocp_convert): build_user_type_conversion will now provide
8625         the constructor call for copy-init.
8627         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
8628         instantiation of a member template.
8629         (do_decl_instantiation): Not here.
8631 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
8633         * class.c (check_field_decls): Don't special case anonymous
8634         fields in error messages.
8635         (note_name_declared_in_class): Use %D on diagnostic.
8637         * tree.c (pod_type_p): Use strip_array_types.
8638         (cp_valid_lang_attribute): Likewise.
8639         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
8640         multiple evaluations.
8641         (cp_has_mutable_p): Use strip_array_types.
8643 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
8645         * cp-tree.h (sufficient_parms_p): Declare new function.
8646         * call.c (sufficient_parms_p): New function, broken out of ...
8647         (add_function_candidate): ... here. Use it.
8648         (add_conv_candidate): Use it.
8649         * decl.c (grok_ctor_properties): Use it.
8651 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
8653         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
8655 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
8657         * decl2.c (lang_decode_option): Handle -Wformat-security.
8659 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8661         * pt.c (verify_class_unification): New function.
8662         (get_class_bindings): Use it.
8663         (try_class_unification): Tidy.
8664         (unify): Handle when argument of a template-id is not
8665         template parameter dependent.
8666         (template_args_equal): Handle when TREE_CODE's do not match.
8668 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
8670         * lang-specs.h (c++): When invoking the stand-alone preprocessor
8671         for -save-temps, pass all relevant -Defines to it, and then don't
8672         pass them to cc1plus.
8674 2000-12-05  Will Cohen  <wcohen@redhat.com>
8676         * decl.c (finish_case_label): Cleared
8677         more_cleanups_ok in surrounding function scopes.
8678         (define_label): Likewise.
8680 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
8682         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
8683         (get_matching_virtual): Remove.
8684         (look_for_overrides): Declare new function.
8685         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
8686         DECL_VINDEX here.
8687         * class.c (check_for_override): Move base class iteration code
8688         to look_for_overrides.
8689         * search.c (next_baselink): Remove.
8690         (get_virtuals_named_this): Remove.
8691         (get_virtual_destructor): Remove.
8692         (tree_has_any_destructors_p): Remove.
8693         (struct gvnt_info): Remove.
8694         (check_final_overrider): Remove `virtual' from error messages.
8695         (get_matching_virtuals): Remove. Move functionality to ...
8696         (look_for_overrides): ... here, and ...
8697         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
8698         to be overriding.
8700 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
8702         * typeck.c (get_delta_difference): If via a virtual base,
8703         return zero.
8704         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
8705         adjustment.
8707 2000-12-04  Richard Henderson  <rth@redhat.com>
8709         * error.c (dump_tree): Use output_add_string not OB_PUTS.
8711 2000-12-04  Jason Merrill  <jason@redhat.com>
8713         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
8714         (write_builtin_type): Pass intSI_type_node and the like through
8715         type_for_mode.
8716         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
8717         Pass intSI_type_node and the like through type_for_mode.
8718         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
8719         * pt.c (tsubst, unify): Likewise.
8720         * tree.c (walk_tree): Likewise.
8721         * error.c (dump_type): Likewise.
8722         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
8724         * Make-lang.in: Tweak top comment for emacs.
8725         (cp/TAGS): Restore.
8727         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
8729         * class.c (clone_function_decl): Robustify.
8731 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
8733         * decl.c (store_bindings): Only search in the non modified
8734         old_bindings for duplicates.
8736 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
8738         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
8739         TYPE_POLYMORPHIC_P.
8741         * typeck.c (build_static_cast): Remove unused variable.
8743 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8745         * pt.c: Fix typo in comment.
8747 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
8749         * decl2.c (warn_format): Remove definition.
8750         (lang_decode_option): Handle -Wformat-nonliteral,
8751         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
8753 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
8755         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
8756         (init_decl_processing): Don't create string_type_node,
8757         const_string_type_node, wint_type_node, intmax_type_node,
8758         uintmax_type_node, default_function_type, ptrdiff_type_node and
8759         unsigned_ptrdiff_type_node.  Adjust position of call to
8760         c_common_nodes_and_builtins.
8761         (identifier_global_value): New function.
8763 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
8765         * call.c (standard_conversion): Reject pointer to member
8766         conversions from ambiguous, inaccessible or virtual bases.
8767         * typeck.c (build_static_cast): Don't check pointers to members
8768         specially.
8770 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
8772         * method.c (do_build_copy_constructor): Preserve cv
8773         qualifications when accessing source object members.
8774         (do_build_assign_ref): Likewise. Remove separate diagnostics for
8775         unnamed fields.
8777 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
8779         * method.c (do_build_assign_ref): Construct appropriately
8780         CV-qualified base reference. Don't allow const casts in base
8781         conversion.
8783 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
8785         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
8786         incomplete return type.
8788 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8790         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
8791         * semantics.c (finish_base_specifier): Accept a _TYPE not a
8792         _DECL.
8794 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8796         * spew.c (yyerror): Cope if yylval.ttype is NULL.
8798 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8800         * decl.c (grokdeclarator): Diagnose undefined template contexts.
8802 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8804         * decl.c (grokdeclarator): Do type access control on friend
8805         class.
8807 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
8809         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
8810         bison parser ickiness.
8811         * pt.c (tsubst_friend_function): Enter namespace scope when
8812         tsubsting the function name.
8813         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
8815 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
8817         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
8818         * cvt.c (cp_convert_to_pointer): Add force parameter.
8819         Allow conversions via virtual base if forced.
8820         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
8821         (ocp_convert): Likewise.
8822         * search.c (binfo_from_vbase): Return the virtual base's binfo.
8823         * typeck.c (get_delta_difference): Adjust handling of virtual
8824         bases.
8826 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
8828         * tree.c (struct list_hash): Remove.
8829         (list_hash_table): Make it be an htab.
8830         (struct list_proxy): New type.
8831         (list_hash_eq): New function.
8832         (list_hash_pieces): Renamed from ...
8833         (list_hash): ... this.
8834         (list_hash_lookup): Remove.
8835         (list_hash_add): Remove.
8836         (hash_tree_cons): Use the generic hashtable.
8837         (mark_list_hash): Remove.
8838         (init_tree): Create the hashtable.
8840 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
8842         * method.c (build_mangled_C9x_name): Rename to
8843         build_mangled_C99_name.  Change C9X references in comments to
8844         refer to C99.
8846 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
8848         * parse.y (unary_expr): Move VA_ARG from here ...
8849         (primary): ... to here.
8851 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
8853         * semantics.c (finish_id_expr): If type is error_mark, return
8854         error_mark.
8856 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
8858         * pt.c (lookup_template_class): Simplify loop exit constructs.
8859         Cope when there is no partial instantiation of a template
8860         template member.
8862 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
8864         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
8866 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
8868         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
8869         prefix.
8871         * pt.c (do_decl_instantiate): Explicitly clone constructors and
8872         destructors that haven't already been cloned.
8874 2000-11-20  Richard Henderson  <rth@redhat.com>
8876         * parse.y (yyparse_1): Rename the parser entry point.
8878 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
8880         * mangle.c (write_name): Use <unscoped-name> for names directly in
8881         function scope.
8882         (write_unscoped_name): Accept names directly in function scope.
8884 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
8886         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
8887         * parse.y (extdef): Add EXPORT reduction.
8888         * spew.c (yylex): Don't skip export here.
8890 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
8892         * decl.c (init_decl_processing): Correct name of pure virtual
8893         function under the new ABI.
8894         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
8895         (throw_bad_typeid): Likewise for bad typeid function.
8897 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
8899         * decl.c (grokparms): Don't even function types of `void' type,
8900         either.
8901         * mangle.c (write_type): Don't crash when confronted with the
8902         error_mark_node.
8904         * decl.c (grokparms): Don't create parameters of `void' type.
8906 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
8908         * lex.c (mark_impl_file_chain): Delete.
8909         (init_parse): Remove call to ggc_add_string_root.  No need to
8910         ggc_strdup a string constant.  Do not add impl_file_chain to GC
8911         roots.
8912         (handle_pragma_implementation): No need to ggc_strdup main_filename.
8914 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
8916         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
8918 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
8920         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
8921         * decl.c (grokdeclarator): Don't reject void parms here.
8922         (require_complete_types_for_parms): Simplify, use
8923         complete_type_or_else.
8924         (grokparms): Remove bitrot. Remove funcdef parm.
8925         Deal with ellipsis parm lists here.
8926         * semantics.c (finish_parmlist): Don't append void_list_node
8927         here. Set PARMLIST_ELLIPSIS_P.
8929 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
8931         * typeck2.c (incomplete_type_error): Reorganize to avoid
8932         excessive diagnostics.
8934 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
8936         * lex.c (struct impl_files, internal_filename): Constify a char *.
8938 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
8940         * mangle.c (write_special_name_constructor): Don't generate
8941         assembler junk when confronted with an old-style constructor.
8942         (write_special_name_destructor): Likewise.
8943         (mangle_decl_string): Do it here instead.
8945 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
8947         * call.c (op_error): Make error messages clearer.
8949 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
8951         * decl.c (wrapup_globals_for_namespace): Don't mark things
8952         TREE_ASM_WRITTEN when they're not.
8954 2000-11-15  Jason Merrill  <jason@redhat.com>
8956         * typeck2.c (friendly_abort): Uncount the error before handing
8957         off to fancy_abort.
8959 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
8961         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
8963 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
8965         * class.c (build_vtbl_initializer): Fix typo in comment.
8966         * typeck.c (expr_sizeof): Don't crash on errors.
8968 2000-11-14  Jim Wilson  <wilson@redhat.com>
8970         * lang-specs.h: Add %2 after %(cc1_options).
8972 2000-11-14  Richard Henderson  <rth@redhat.com>
8974         * typeck.c (c_sizeof): Be strict about casting result value
8975         back to c_size_type_node.
8976         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
8978 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8980         * typeck.c (build_unary_op): Use boolean_increment from
8981         c-common.c, moving the relevant code there.
8983 2000-11-11  Jason Merrill  <jason@redhat.com>
8985         * typeck.c (mark_addressable): Don't call put_var_into_stack.
8987         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
8988         in inlines.
8990 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8992         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
8993         * lex.c (copy_lang_decl): Likewise.
8995 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
8997         * dump.c (cp_dump_tree): Don't dump function bodies here.
8999         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
9000         (dump.o): Update dependency list.
9001         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
9002         (flag_dump_translation_unit): Likewise.
9003         (CP_TYPE_QUALS): Adjust definition.
9004         (DECL_C_BIT_FIELD): Remove.
9005         (SET_DECL_C_BIT_FIELD): Likewise.
9006         (CLEAR_DECL_C_BIT_FIELD): Likewise.
9007         (add_maybe_template): Likewise.
9008         (strip_array_types): Likewise.
9009         (dump_node_to_file): Likewise.
9010         (cp_dump_tree): New function.
9011         * decl.c (init_decl_processing): Set lang_dump_tree.
9012         * decl2.c (flag_dump_translation_unit): Remove.
9013         * dump.c: Move most of it to ../c-dump.c.
9014         (cp_dump_tree): New function.
9015         * pt.c (add_maybe_template): Remove.
9016         * typeck.c (strip_array_types): Likewise.
9018 2000-11-07  Eric Christopher  <echristo@redhat.com>
9020         * decl.c (init_decl_processing): Change definition of
9021         __wchar_t to wchar_t.  Remove artificial declaration of
9022         wchar_t.
9023         * lex.c: Change instances of __wchar_t to wchar_t.
9025 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
9027         * lex.c (do_identifier): Don't lookup_name for operators.
9028         * parse.y (operator): Save looking_for_typename.
9029         (unoperator): Restore it.
9030         * spew.c (frob_opname): Use nth_token for lookahead.
9032 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
9034         * decl.c (grok_op_properties): Always use coerce_new_type and
9035         coerce_delete_type.
9036         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
9037         exception specification. Tidy up.
9038         (coerce_delete_type): Preserve exception specification. Tidy up.
9040 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
9042         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
9043         (push_binding_level), error.c (cp_tree_printer), pt.c
9044         (process_partial_specialization, tsubst_template_arg_vector),
9045         search.c (lookup_member): Use memset () instead of bzero ().
9047 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
9049         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
9051 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
9053         * Make-lang.in (c++.distdir): Remove.
9055 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
9057         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
9058         declarations from different namespaces to be combined.
9060 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
9062         * decl.c: Include tm_p.h.
9064 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
9066         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
9068 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9070         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
9071         (build_overload_value), repo.c (open_repo_file), xref.c
9072         (open_xref_file): Use strchr () and strrchr () instead of index ()
9073         and rindex ().
9075 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
9077         * call.c (build_over_call): Call fold on the CALL_EXPR.
9079 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
9081         * error.c (dump_template_decl): Separate template hearders with
9082         space not comma.
9084 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
9086         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
9087         TS_* flags with corresponding TFF_*.  Adjust prototypes of
9088         functions (which used to take a tree_string_flags) to take an int.
9090         * cp-tree.h (enum tree_string_flags): Remove
9091         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
9092         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
9093         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
9094         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
9095         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
9096         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
9097         (type_as_string, decl_as_string, expr_as_string,
9098         context_as_string): Adjust prototype.
9100         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
9101         instead of TS_PLAIN.
9103         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
9104         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
9105         plain `0'.
9107 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
9109         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
9110         (linkage_kind): New enumeration.
9111         (decl_linkage): New function.
9112         * decl2.c (comdat_linkage): Extend comment.
9113         * error.c (dump_function_decl): Print the arguments used to
9114         instantiate a template, even when not printing the type of the
9115         function.
9116         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
9117         not TREE_PUBLIC, to test for external linkage.
9118         * tree.c (decl_linkage): New function.
9120 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
9122         * pt.c (instantiate_decl): Always instantiate static data members
9123         initialized in-class.
9125 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
9127         * Make-lang.in: Move all build rules here from Makefile.in,
9128         adapt to new context.  Wrap all rules that change the current
9129         directory in parentheses.  Expunge all references to $(P).
9130         When one command depends on another and they're run all at
9131         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
9132         all object-file generation rules.  Delete obsolete variables.
9134         * Makefile.in: Delete.
9135         * config-lang.in: Delete outputs= line.
9137 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
9139         * error.c (dump_function_decl): Print no space between
9140         `ptr-operator' the `type-specifier' of the return type.
9141         (dump_type_prefix): Make sure we put space at the appropriate
9142         place.
9144 2000-10-23  Jason Merrill  <jason@redhat.com>
9146         * call.c (equal_functions): Also call decls_match for extern "C" fns.
9148 2000-10-22  Jason Merrill  <jason@redhat.com>
9150         * call.c (build_conditional_expr): Use ocp_convert to force
9151         rvalue conversion.
9153 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
9155         * call.c (standard_conversion): Use RVALUE_CONVs for all
9156         expressions that satisfy lvalue_p, not just those that satisfy
9157         real_lvalue_p.
9159         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
9161         * typeck.c (c_sizeof): Return an expression of `size_t' type,
9162         not one with TYPE_IS_SIZETYPE set.
9163         (dubious_conversion_warnings): Remove special-case code.
9165 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
9167         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
9168         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
9169         (dump_type_prefix): Print vector-of-int as 'int vector'.
9170         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
9171         * tree.c (walk_tree): Handle VECTOR_TYPE.
9173         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
9175 2000-10-21  Jason Merrill  <jason@redhat.com>
9177         * parse.y (operator): Set got_object from got_scope.
9178         Set looking_for_typename.
9179         * decl.c (lookup_name_real): Clear val after setting from_obj.
9180         Reorganize diagnostic.
9182 2000-10-20  Jason Merrill  <jason@redhat.com>
9184         * tree.c (walk_tree): Don't walk into default args.
9186         * error.c (dump_expr): Use host_integerp.
9188 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
9190         * typeck2.c (abstract_virtuals_error): Use "because" instead of
9191         "since" in error message.
9193 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9195         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
9197 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
9199         * decl.c (revert_static_member_fn): Fixed typo.
9201 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
9203         * class.c (subobject_offset_fn): New type.
9204         (dfs_record_base_offsets): Remove.
9205         (record_base_offsets): Likewise.
9206         (dfs_search_base_offsets): Likewise.
9207         (record_subobject_offset): New function.
9208         (check_subobject_offset): Likewise.
9209         (walk_subobject_offsets): Likewise.
9210         (record_subobject_offsets): Likewise.
9211         (layout_conflict_p): Reimplement.
9212         (layout_nonempty_base_or_field): Correct handling of type
9213         conflicts during layout.
9214         (layout_empty_base): Likewise.
9215         (build_base_field): Adjust to handle new representation of empty
9216         base offset table.
9217         (build_base_fields): Likewise.
9218         (layout_virtual_bases): Likewise.
9219         (splay_tree_compare_integer_csts): New function.
9220         (layout_class_type): Use a splay_tree, rather than a varray, to
9221         represent the offsets of empty bases.
9223         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
9224         * decl.c (select_decl): Don't return declarations that are
9225         DECL_ANTICIPATED.
9227 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
9229         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
9230         (fake_std_node): New macro.
9231         * decl.c (in_std): Rename to ...
9232         (in_fake_std): ... this.
9233         (flag_no_builtin): Remove.
9234         (flag_no_nonansi_builtin): Likewise.
9235         (walk_namespaces_r): Use fake_std_node.
9236         (push_namespace): Use std_identifier.
9237         (pop_namespace): Use in_fake_std.
9238         (lookup_name_real): Use fake_std_node.
9239         (init_decl_processing): When -fhonor-std, create the `std'
9240         namespace.  Don't create a dummy fake_std_node in that case.
9241         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
9242         (builtin_function): Put builtins whose names don't begin
9243         with `_' in the std namespace.
9244         * decl2.c (flag_no_builtin): Remove.
9245         (flag_no_nonansi_builtin): Likewise.
9246         (set_decl_namespace): Use fake_std_node.
9247         (validate_nonmember_using_decl): Likewise.
9248         (do_using_directive): Likewise.
9249         (handle_class_head): Likewise.
9250         * dump.c (dequeue_and_dump): Likewise.
9251         * except.c (init_exception_processing): Use std_identifier.
9252         * init.c (build_member_call): Use fake_std_node.
9253         * rtti.c (init_rtti_processing): Use std_identifier.
9255 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
9257         * cp-tree.h (back_end_hook): Remove declaration.
9258         * decl2.c (back_end_hook): Remove definition.
9260         * dump.c (dequeue_and_dump): Dump TREE_USED.
9262 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
9264         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
9266 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
9268         * decl.c (WINT_TYPE): Define.
9269         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
9270         c_size_type_node, signed_size_type_node and wint_type_node.
9272 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
9274         * decl2.c (warn_missing_format_attribute): New variable.
9275         (lang_decode_option): Decode -Wmissing-format-attribute.
9277 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
9279         * typeck.c (qualify_type): Remove.
9280         (composite_pointer_type): Fix handling of conversions to `cv void*'.
9282 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9284         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
9286 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9288         * Makefile.in (parse.c, parse.h): Create atomically.
9290 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
9292         * class.c (current_obstack): Remove.
9293         * decl.c (ggc_p): Remove.
9294         (start_decl): Don't use decl_tree_cons.
9295         (grokdeclarator): Don't use build_decl_list.
9296         (start_function): Don't use decl_tree_cons.
9297         (finish_function): Don't mess with obstacks.
9298         * decl2.c (grok_x_components): Don't use build_decl_list.
9299         * lex.c (make_call_declarator): Don't call decl_tree_cons.
9300         (implicitly_declare_fn): Don't call build_decl_list.
9301         * parse.y (frob_specs): Don't call build_decl_list or
9302         decl_tree_cons.
9303         (expr_or_declarator_intern): Don't call decl_tree_cons.
9304         (primary): Don't call build_decl_list.
9305         (fcast_or_absdcl): Likewise.
9306         (typed_declspecs): Don't call decl_tree_cons.
9307         (reserved_declspecs): Don't call build_decl_list.
9308         (declmods): Likewise.
9309         (reserved_typespecquals): Likewise.
9310         (aggr): Likewise.
9311         (new_type_id): Likewise.
9312         (cv_qualifiers): Likewise.
9313         (after_type_declarator_intern): Likewise.
9314         (notype_declarator_intern): Likewise.
9315         (absdcl_intern): Likewise.
9316         (named_parm): Likewise.
9317         * pt.c (most_specialized_class): Likewise.
9318         * repo.c (temporary_obstack): Make it a structure, not a pointer.
9319         (init_repo): Initialize it.
9320         * search.c (current_obstack): Remove.
9321         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
9323 2000-10-09  Richard Henderson  <rth@cygnus.com>
9325         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
9326         (c++ language support bits for libgcc): Remove.
9327         (c++.clean): Remove cplib2.txt cleanup.
9328         * config-lang.in (headers, lib2funcs): Remove.
9330         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
9331         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
9332         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
9333         * inc/new.h, inc/typeinfo: Remove files.
9335 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
9337         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
9338         defined.
9339         (init_decl_processing): Initialize intmax_type_node and
9340         uintmax_type_node.
9342 2000-10-06  Richard Henderson  <rth@cygnus.com>
9344         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
9345         (original_result_rtx): Remove.
9346         * decl.c (save_function_data): Don't clear x_result_rtx.
9347         (mark_lang_function): Don't mark it either.
9348         * expr.c (fixup_result_decl): Remove.
9349         * semantics.c (genrtl_named_return_value): Frob the return decl
9350         before calling emit_local_var.
9351         (genrtl_finish_function): Don't call fixup_result_decl.
9352         Always emit the jump to return_label.
9354 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
9356         * pt.c (lookup_template_class): Set current access for enum.
9357         (tsubst_enum): Set file & line for enum decl.
9359         * spew.c (yylex): Remove unused variable.
9361 2000-10-05  Richard Henderson  <rth@cygnus.com>
9363         * semantics.c (genrtl_finish_function): Don't init or check
9364         can_reach_end; remove noreturn and return value checks.
9366 2000-10-05  Tom Tromey  <tromey@cygnus.com>
9368         * init.c (build_java_class_ref): Use `build_static_name' with a
9369         suffix, not a prefix, to build the class object's name.
9371 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
9373         * cp-tree.h (access_kind): Fix comment typo.
9374         * decl2.c (grokfield): Fix diagnostic typo.
9375         * semantics.c (finish_template_type): Fix comment typo.
9376         (finish_qualified_object_call_expr): Likewise.
9378 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
9380         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
9381         tsubsting fails.
9383 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
9385         * spew.c (frob_id): New static function.
9386         (frob_opname): Use it.
9387         (yylex): Use it.
9389 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
9391         * decl.c (lang_mark_false_label_stack): Remove.
9392         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
9394 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
9396         * gxxint.texi: Use @email for formatting email addresses.
9398 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
9400         * error.c: Remove direct obstack manipulation.  Replace with
9401         output_buffer-based formatting.  Adjust calls to removed macros.
9402         (obstack_chunk_alloc, obstack_chunk_free): Remove.
9403         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
9404         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
9406 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
9408         * ir.texi: Move to ../c-tree.texi.
9410 2000-09-20  Jason Merrill  <jason@redhat.com>
9412         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
9414 2000-09-21  Andreas Jaeger  <aj@suse.de>
9416         * errfn.c: Move declaration of cp_printer and cp_printers to ...
9417         * cp-tree.h: ... here.
9419         * error.c: Remove declaration of cp_printer.
9421 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
9423         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
9425 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
9427         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
9428         users.
9430 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
9432         * decl.c (start_function): Robustify.
9434 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9436         * cp-tree.h (check_function_format): Accept a `status' parameter.
9438         * call.c, typeck.c: Updates calls to `check_function_format'.
9440 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
9442         * decl2.c (handle_class_head): Always push some scope even
9443         in the error case.
9445 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
9447         * cp-tree.h (struct cp_language_function): Remove
9448         x_scope_stmt_stack and name_declared.
9449         (current_scope_stmt_stack): Remove.
9450         (function_name_declared_p): New macro.
9451         (struct lang_decl_flags): Use c_lang_decl as a base class.
9452         (context): Remove.
9453         (struct lang_decl): Replace saved_tree with context.
9454         (DECL_FRIEND_CONTEXT): Adjust accordingly.
9455         (SET_DECL_FRIEND_CONTEXT): Likewise.
9456         (DECL_VIRTUAL_CONTEXT): Likewise.
9457         (DECL_SAVED_TREE): Remove.
9458         (C_DECLARED_LABEL_FLAG): Likewise.
9459         (cplus_expand_expr_stmt): Don't declare.
9460         (add_decl_stmt): Likewise.
9461         (add_scope_stmt): Likewise.
9462         * decl.c (mark_stmt_tree): Remove.
9463         (case_compare): Likewise.
9464         (finish_case_label): Use c_add_case_label.
9465         (init_decl_processing): Set more language-specific hooks.
9466         (build_enumerator): Fix typo in comment.
9467         (cplus_expand_expr_stmt): Remove.
9468         (mark_lang_function): Use mark_c_language_function.
9469         (lang_mark_tree): Use c_mark_lang_decl.
9470         * decl2.c: Change order of inclusion.
9471         * except.c: Likewise.
9472         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
9473         back on c_expand_expr.
9474         * friend.c: Include expr.h.
9475         * init.c: Change order of inclusion.
9476         * Makefile.in: Update dependencies.
9477         * lex.h (free_lang_decl_chain): Remove.
9478         * optimize.c (maybe_clone_body): Use function_name_declared_p.
9479         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
9480         it doesn't exist.
9481         (instantiate_decl): Use function_name_declared_p.
9482         * semantics.c (lang_expand_expr_stmt): Remove.
9483         (set_current_function_name_declared): Likewise.
9484         (current_function_name_declared): Likewise.
9485         (begin_compound_stmt): Use function_name_declared_p.
9486         (add_decl_stmt): Remove.
9487         (setup_vtbl_ptr): Use function_name_declared_p.
9488         (add_scope_stmt): Remove.
9489         (current_scope_stmt_stack): New function.
9490         (cp_expand_stmt): Don't handle SCOPE_STMTs.
9491         (expand_body): Use function_name_declared_p.
9492         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
9493         * typeck.c: Change order of includes.
9494         (convert_sequence): Remove.
9496 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
9498         * lex.c (reswords): Add _Complex.
9500 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9502         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
9504 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
9506         * init.c (begin_init_stmts): Don't use // comments.
9508 2000-09-12  Jason Merrill  <jason@redhat.com>
9510         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
9511         all non-extern arrays.
9513         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
9514         typenames, too.  Downgrade complaint to pedwarn.
9515         (xref_tag): Warn about surprising behavior of 'friend struct T'.
9516         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
9517         'class This::Inherited'.
9519 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
9521         * decl.c (finish_case_label): Given the LABEL_DECL a
9522         DECL_CONTEXT.
9524 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
9526         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
9527         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
9528         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
9529         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
9530         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
9531         New macros.
9532         (sorry_for_unsupported_tree, print_scope_operator,
9533         print_left_paren, print_right_paren, print_left_bracket,
9534         print_right_bracket, print_whitespace): Likewise.
9535         (aggr_variety): Rename to class_key_or_enum.
9536         (print_type): Rename to print_type_id.
9537         (print_type_specifier_seq, print_simple_type_specifier,
9538         print_elaborated_type_specifier,
9539         print_rest_of_abstract_declarator,
9540         print_parameter_declaration_clause, print_exception_specification,
9541         print_nested_name_specifier, print_template_id,
9542         typedef_original_name,  print_template_argument_list_start,
9543         print_template_argument_list_end): New functions.
9545 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
9547         * ir.texi: Add more documentation.
9549 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
9551         * cp-tree.h (struct saved_scope): Remove x_function_parms.
9552         (current_function_parms): Don't define.
9553         (struct cp_language_function): Remove parms_stored.
9554         (current_function_just_assigned_this): Don't define.
9555         (current_function_parms_stored): Likewise.
9556         (static_ctors): Declare.
9557         (static_dtors): Likewise.
9558         (SF_EXPAND): Don't define.
9559         (expand_start_early_try_stmts): Remove declaration.
9560         (store_parm_decls): Likewise.
9561         * decl.c (static_ctors): Don't declare.
9562         (static_dtors): Likewise.
9563         (struct binding_level): Remove this_block.
9564         (poplevel): Remove dead code.
9565         (set_block): Likewise.
9566         (mark_binding_level): Don't mark this_block.
9567         (mark_saved_scope): Don't mark x_function_parms.
9568         (init_decl_processing): Don't add current_function_parms as a GC
9569         root.
9570         (check_function_type): Change prototype.
9571         (start_function): Remove RTL-generation code.
9572         (expand_start_early_try_stmts): Remove.
9573         (store_parm_decls): Give it internal linkage.  Remove
9574         RTL-generation code.
9575         (finish_function): Remove RTL-generation code.
9576         * decl2.c (static_ctors): Fix formatting.
9577         (static_dtors): Likewise.
9578         * method.c (use_thunk): Don't call store_parm_decls.
9579         (synthesize_method): Likewise.
9580         * optimize.c (maybe_clone_body): Likewise.
9581         * parse.y (fn.def2): Likewise.
9582         (.set_base_init): Likewise.
9583         (nodecls): Likewise.
9584         * pt.c (instantiate_decl): Likewise.
9585         * rtti.c (synthesize_tinfo_fn): Likewise.
9586         * semantics.c (genrtl_try_block): Simplify.
9587         (expand_body): Use genrtl_start_function and
9588         genrtl_finish_function.
9589         (genrtl_start_function): New function.
9590         (genrtl_finish_function): Likewise.
9592 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
9594         * error.c (cp_tree_printer, case 'P'): Append break.
9596 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
9598         * cp-tree.h (frob_opname): Declare.
9599         * parse.y (saved_scopes): New static variable.
9600         (cp_parse_init): Adjust.
9601         (do_id): If lastiddecl is NULL, do do_identifier.
9602         (operator): Save scope information.
9603         (unoperator): New reduction. Restore scope information.
9604         (operator_name): Append unoperator. Call frob_opname.
9605         * spew.c (frob_opname): Define.
9607 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
9609         * decl.c, rtti.c: Include defaults.h if not already included.
9610         Don't define the *_TYPE_SIZE macros.
9612 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
9614         * cp-tree.h (push_switch): Change prototype.
9615         (check_cp_case_value): Remove declaration.
9616         (decl_constant_value): Likewise.
9617         * decl.c (struct cp_switch): Add switch_stmt and cases.
9618         (case_compare): New function.
9619         (push_switch): Set switch_stmt.  Initialize cases.
9620         (pop_switch): Clean up cases.
9621         (define_case_label): Rename to ...
9622         (finish_case_label): ... this.  Do semantic analysis for case
9623         labels here.
9624         (start_function): Correct comment.
9625         * decl2.c (check_cp_case_value): Remove.
9626         * expr.c (do_case): Remove.
9627         * pt.c (tsubst_expr): Adjust call to finish_case_label.
9628         * semantics.c (genrtl_do_poplevel): Remove declaration.
9629         (RECHAIN_STMTS): Remove.
9630         (finish_break_stmt): Use build_break_stmt.
9631         (finish_continue_stmt): Use build_continue_stmt.
9632         (finish_switch_cond): Adjust condition here, rater than in
9633         c_expand_start_case.
9634         (finish_case_label): Remove.
9635         * typeck.c (c_expand_return): Remove.
9636         (c_expand_start_case): Likewise.
9638 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
9640         * ir.texi: Document type nodes.
9642 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
9644         * cp-tree.h (init_cp_semantics): Declare.
9645         (genrtl_try_block): Don't declare.
9646         (genrtl_handler): Likewise.
9647         (genrtl_catch_block): Likewise.
9648         (genrtl_ctor_stmt): Likewise.
9649         (genrtl_subobject): Likewise.
9650         (genrtl_do_poplevel): Likewise.
9651         (genrtl_named_return_value): Likewise.
9652         * lex.c (init_parse): Call init_cp_semantics.
9653         * semantics.c (genrtl_try_block): Give it internal linkage.
9654         (genrtl_handler): Likewise.
9655         (genrtl_catch_block): Likewise.
9656         (genrtl_ctor_stmt): Likewise.
9657         (genrtl_subobject): Likewise.
9658         (genrtl_do_poplevel): Likewise.
9659         (genrtl_named_return_value): Likewise.
9660         (lang_expand_stmt): Rename to ...
9661         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
9662         (init_cp_semantics): Define.
9664         * decl.c (initialize_local_var): Remove RTL-generating code.
9665         * semantics.c (genrtl_try_block): Fix formatting.
9667         Move statement-tree facilities from C++ to C front-end.
9668         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
9669         (void_zero_node): Remove.
9670         (stmt_tree): Likewise.
9671         (scope_chain): Adjust.
9672         (language_function): Rename to cp_language_function.
9673         (cp_function_chain): Adjust.
9674         (current_stmt_tree): Remove.
9675         (last_tree): Likewise.
9676         (last_expr_type): Likewise.
9677         (struct lang_decl): Adjust.
9678         (STMT_IS_FULL_EXPR_P): Remove.
9679         (add_tree): Remove.
9680         (begin_stmt_tree): Likewise.
9681         (finish_stmt_tree): Likewise.
9682         (walk_tree_fn): Likewise.
9683         (walk_stmt_tree): Likewise.
9684         * class.c (finish_struct): Replace use of add_tree with add_stmt.
9685         * decl.c (mark_stmt_tree): Adjust type.
9686         (init_decl_processing): Don't build void_zero_node.
9687         (initialize_local_var): Adjust usage of current_stmt_tree.
9688         (finish_enum): Use add_stmt, not add_tree.
9689         (save_function_data): Adjust use of language_function.
9690         (finish_constructor_body): Use add_stmt, not add_tree.
9691         (finish_destructor_body): Likewise.
9692         (push_cp_function_context): Adjust use of language_function.
9693         (pop_cp_function_context): Likewise.
9694         (mark_lang_function): Likewise.
9695         (mark_cp_function_context): Likewise.
9696         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
9697         (build_vec_init): Likewise.
9698         * semantics.c (SET_LAST_STMT): Remove.
9699         (RECHAIN_STMTS): Don't use it.
9700         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
9701         (current_stmt_tree): Define.
9702         (add_tree): Remove.
9703         (finish_goto_stmt): Use add_stmt, not add_tree.
9704         (finish_expr_stmt): Likewise.
9705         (begin_if_stmt): Likewise.
9706         (finish_then_clause): Likewise.
9707         (begin_while_stmt): Likewise.
9708         (begin_do_stmt): Likewise.
9709         (finish_return_stmt): Likewise.
9710         (begin_for_stmt): Likewise.
9711         (finish_break_stmt): Likewise.
9712         (finish_continue_stmt): Likewise.
9713         (begin_switch_stmt): Likewise.
9714         (finish_case_label): Likewise.
9715         (begin_try_block): Likewise.
9716         (begin_function_try_block): Likewise.
9717         (begin_handler): Likewise.
9718         (begin_catch_block): Likewise.
9719         (begin_compound_stmt): Likewise.
9720         (begin_asm_stmt): Likewise.
9721         (finish_asm_stmt): Likewise.
9722         (finish_label_stmt): Likewise.
9723         (add_decl_stmt): Likewise.
9724         (finish_subobject): Likewise.
9725         (finish_decl_cleanup): Likewise.
9726         (finish_named_return_value): Likewise.
9727         (setup_vtbl_ptr): Likewise.
9728         (add_scope_stmt): Likewise.
9729         (finish_stmt_expr): Likewise.
9730         (prune_unused_decls): Remove.
9731         (begin_stmt_tree): Likewise.
9732         (finish_stmt_tree): Likewise.
9733         (prep_stmt): Adjust use of current_stmt_tree.
9734         (lang_expand_stmt): Likewise.
9735         * tree.c (statement_code_p): Remove.
9736         (cp_statement_code_p): New function.
9737         (walk_stmt_tree): Remove.
9738         (init_tree): Set lang_statement_code_p.
9740 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
9742         Integrated preprocessor.
9744         * Make-lang.in, Makefile.in: Remove all references to input.c,
9745         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
9746         * gxx.gperf, hash.h, input.c: Delete.
9747         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
9748         initialized properly.
9750         * class.c (fixup_pending_inline): Take a tree, not a
9751         struct pending_inline *.  All callers changed.
9752         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
9753         RID_PROTECTED entries in ridpointers[] array here.
9754         * decl.c (duplicate_decls): Do not refer to struct
9755         pending_inline.
9756         (record_builtin_type, init_decl_processing): Use RID_MAX not
9757         CP_RID_MAX.
9758         (grokdeclarator): Use C_IS_RESERVED_WORD.
9759         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
9760         cpplib.
9761         (grok_x_components): Do not inspect pending_inlines chain.
9763         * cp-tree.h (struct lang_identifier): Add rid_code entry.
9764         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
9765         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
9766         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
9767         TIME_IDENTIFIER_FILEINFO): Kill.
9768         Update prototypes.
9769         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
9770         single 32-bit word.
9771         * parse.y: Call do_pending_inlines unconditionally.
9772         reinit_parse_for_method is now snarf_method.  fn.defpen is no
9773         longer necessary.  Remove unnecessary <itype> annotation on
9774         SCOPE.  Do not refer to end_of_file or struct pending_inline.
9775         * semantics.c (begin_inline_definitions): Call
9776         do_pending_inlines unconditionally.
9778         * lex.c: Remove all code now shared with C front end.
9779         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
9780         into the get_identifier table.  Rewrite pragma handling to
9781         work with the registry.  Move code to save tokens for later
9782         processing to spew.c.
9784         * spew.c: Rewrite everything in terms of token streams instead
9785         of text.  Move routines here from lex.c / input.c as
9786         appropriate.  GC-mark trees hanging off the pending inlines
9787         chain.
9789 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
9791         * NEWS: Mention that the named return value extension has been
9792         deprecated.
9793         * cp-tree.h (original_result_rtx): Define.
9794         (TREE_REFERENCE_EXPR): Remove.
9795         (DECL_VPARENT): Likewise.
9796         (pushdecl_nonclass_level): Likewise.
9797         (store_return_init): Likewise.
9798         (reinit_lang_specific): Likewise.
9799         (genrtl_named_return_value): Change prototype.
9800         * decl.c (original_result_rtx): Remove.
9801         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
9802         Do not generate RTL for local variables here.
9803         (store_return_init): Remove.
9804         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
9805         store_return_init.
9806         (finish_named_return_value): Adjust accordingly.  Warn that this
9807         extension is deprecated.
9808         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
9810 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9812         * pt.c (type_unification_real): Replace switch with if.
9813         (unify): Tsubst non-type parms before comparing.
9815 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9817         * error.c (dump_typename): New function, broken out of ...
9818         (dump_type): ... here. Use it.
9819         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
9821 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9823         * init.c (build_offset_ref): Deal with namespace scoped
9824         TEMPLATE_ID_EXPRs.
9826 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9828         * class.c (resolve_address_of_overloaded_function): Add
9829         explanation message.
9830         * decl.c (define_case_label): Reformat explanation.
9831         * decl2.c (finish_static_data_member_decl): Likewise.
9832         (grokfield): Likewise.
9833         * friend.c (do_friend): Likewise.
9835 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
9837         * tree.c (walk_tree): Expose tail recursion.
9838         (walk_stmt_tree): New function.
9839         * cp-tree.h: Prototype walk_stmt_tree.
9840         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
9841         the BLOCKs directly.  If a BLOCK has no variables after
9842         pruning, discard it.
9843         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
9844         restore the line number.
9846 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
9848         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
9849         (pt.o): Remove dependency on HTAB_H.
9850         * cp-tree.h: Include hashtab.h.
9851         (walk_tree): Change prototype.
9852         (walk_tree_without_duplicates): New function.
9853         * decl.c (check_default_argument): Use it.
9854         * optimize.c (remap_decl): Adjust calls to walk_tree.
9855         (copy_body): Likewise.
9856         (expand_calls_inline): Likewise.
9857         (calls_setjmp_p): Use walk_tree_without_duplicates.
9858         * pt.c: Don't include hashtab.h.
9859         (for_each_template_parm): Use walk_tree_without_duplicates.
9860         * semantics.c (finish-stmt_tree): Likewise.
9861         (expand_body): Likewise.
9862         * tree.c (walk_tree): Add additional parameter.
9863         (walk_tree_without_duplicates): New function.
9864         (count_trees): Use it.
9865         (verify_stmt_tree): Adjust call to walk_tree.
9866         (find_tree): Use walk_tree_without_duplicates.
9867         (no_linkage_check): Likewise.
9868         (break_out_target_exprs): Adjust call to walk_tree.
9869         (cp_unsave): Likewise.
9871 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9873         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
9874         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
9875         * cp-tree.h (TYPE_BINFO): Adjust comment.
9876         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
9877         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
9878         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
9879         (TYPE_TEMPLATE_INFO): Likewise.
9880         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
9881         * class.c (push_nested_class): Likewise.
9882         * decl.c (lookup_name_real): Likewise.
9883         (grokdeclarator): Likewise.
9884         (grok_op_properties): Likewise.
9885         (xref_tag): Likewise.
9886         (xref_basetypes): Likewise.
9887         * decl2.c (constructor_name_full): Likewise.
9888         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
9889         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
9890         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
9891         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9892         (dump_type_suffix): Likewise.
9893         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
9894         instead.
9895         (get_aggr_from_typedef): Likewise.
9896         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
9897         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9898         (write_template_parm): Likewise.
9899         (write_template_template_parm): Check tree code instead of
9900         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9901         * method.c (build_overload_nested_name): Add
9902         BOUND_TEMPLATE_TEMPLATE_PARM.
9903         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
9904         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9905         * pt.c (convert_template_argument): Check tree code instead of
9906         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9907         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
9908         (for_each_template_parm): Adjust comment.
9909         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
9910         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9911         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
9912         template_args_equal to compare template template parameter cases.
9913         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9914         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
9915         instead.
9916         * tree.c (copy_template_template_parm): Decide whether to create
9917         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
9918         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9919         (copy_tree_r): Likewise.
9920         * typeck.c (comptypes): Likewise.  Check tree code instead of
9921         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9923 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
9925         * decl.c (finish_function): Move the code for handling functions
9926         marked with the constructor and destructor attributes inside the
9927         expand_p block.
9929 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
9931         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
9933 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
9935         * pt.c (lookup_template_class): Remove abort.
9936         * tree.c (get_type_decl): Allow error_mark_node.
9938 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
9940         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
9941         TEMPLATE_ID_EXPRs.
9943 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
9945         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
9946         new ABI mangling.
9948 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
9950         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
9951         union tag mismatch error reporting.
9953 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
9955         * call.c (build_scoped_method_call): Check it is not a namespace.
9957 2000-08-30  Jason Merrill  <jason@redhat.com>
9959         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
9961         * tree.c (bot_manip): Check TREE_CONSTANT rather than
9962         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
9963         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
9965         * decl.c (start_function): Always call make_function_rtl.
9967 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
9969         * semantics.c (prune_unused_decls): New function.
9970         (finish_stmt_tree): Call it via walk_tree.
9972 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
9974         * class.c (build_secondary_vtable): Constify a char *.
9975         * decl.c (init_decl_processing): Initialize function_id_node,
9976         pretty_function_id_node, and func_id_node.
9977         * input.c (struct input_source): Constify 'str'.
9978         (feed_input): Constify first argument.
9979         * mangle.c (write_identifier): Constify argument.
9980         * pt.c (mangle_class_name_for_template): Constify argument.
9982 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
9984         * typeck.c (mark_addressable): Remove code that pokes around in
9985         RTL.
9987 2000-08-28  Jason Merrill  <jason@redhat.com>
9989         * lex.c (file_name_nondirectory): Move to toplev.c.
9991         * cp-tree.h (LOCAL_CLASS_P): New macro.
9992         * class.c (finish_struct_1): Use it.
9994 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
9996         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
9997         (write_encoding): Pass another argument to write_name.
9998         (write_name): Add ignore_local_scope parameter.  Fix handling of
9999         local names.
10000         (write_nested_name): Use write_unqualified_name.
10001         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
10002         (write_template_prefix): Use write_unqualified_name.
10003         (write_component): Remove.
10004         (write_local_name): Add parameter.  Use direct local entity to
10005         discriminator calculation.
10006         (write_class_enum_type): Pass another argument to write_name.
10007         (write_template_template_arg): Likewise.
10008         (make_guard_variable): Likewise.
10010 2000-08-27  Jason Merrill  <jason@redhat.com>
10012         * decl.c (pushdecl): Matching decls for local externs are found in
10013         the current level.  Propagate linkage information from previous
10014         declarations.
10016 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10018         * ir.texi (Expressions): Fix typo.
10020 2000-08-25  Greg McGary  <greg@mcgary.org>
10022         * tree.c (init_tree): Use ARRAY_SIZE.
10024 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
10026         * error.c (cp_tree_printer): Rework.
10028 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
10030         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
10031         dyn-string.o.
10032         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
10033         (cp-demangle.o): Remove target.
10034         (dyn-string.o): Likewise.
10036         * decl.c (grokfndecl): Require that `main' return an `int'.
10037         * mangle.c (write_encoding): Don't mangle return types for
10038         conversion functions.
10040 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
10042         * error.c (tree_formatting_info): New data type.
10043         (tree_being_formatted): New macro.
10044         (tree_formatting_flags): Likewise.
10045         (put_whitespace): Likewise.
10046         (print_tree_identifier): Likewise.
10047         (print_identifier): Likewise.
10048         (cp_tree_printer, print_function_argument_list, print_declaration,
10049         print_expression, print_function_declaration,
10050         print_function_parameter, print_type, print_cv_qualifier): New
10051         functions.
10052         (init_error): Initialize lang_printer.
10054 2000-08-24  Jason Merrill  <jason@redhat.com>
10056         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
10057         adjustment necessary.
10059 2000-08-24  Greg McGary  <greg@mcgary.org>
10061         * cp-tree.h (MAIN_NAME_P): Remove macro.
10063 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
10065         * error.c (print_instantiation_context): Don't forget to flush the
10066         buffer.
10068 2000-08-23  Jason Merrill  <jason@redhat.com>
10070         * typeck.c (build_ptrmemfunc): Save the input pmf.
10072         * method.c (process_modifiers): Use same_type_p.
10074 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
10076         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
10077         * mangle.c (write_function_type): Change prototype.
10078         (write_encoding): Don't mangle return types for
10079         constructors or destructors.
10080         (write_type): Adjust call to write_function_type.
10081         * pt.c (instantiate_template): Instantiate alternate entry points
10082         when instantiating the main function.
10084 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
10086         * error.c (cp_print_error_function): Don't use embedded '\n' in
10087         output_printf.
10089 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
10091         * decl.c (init_decl_processing): Remove bogus initialization.
10092         * error.c (lang_print_error_function): Restore here.
10093         (init_error): Initialize print_error_function.
10095 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10097         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
10099 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
10101         * Makefile.in (error.o): Depends on diagnostic.h
10103         * cp-tree.h (problematic_instantiation_changed,
10104         record_last_problematic_instantiation, current_instantiation,
10105         print_instantiation_context): Declare.
10106         (maybe_print_template_context): Remove.
10108         * decl.c (init_decl_processing): Set print_error_function to NULL.
10109         (lang_print_error_function): Remove, since we're using a new
10110         machinery.
10112         * error.c: #include diagnostic.h
10113         (function_category): New function.
10114         (cp_diagnostic_starter): Likewise.
10115         (cp_diagnostic_finalizer): Likewise.
10116         (cp_print_error_function): Likewise.
10117         (maybe_print_instantiation_context): Likewise.
10118         (print_instantiation_full_context): Likewise.
10119         (print_instantiation_partial_context): Likewise.
10120         (print_instantiation_context): Define.
10121         (init_error): Initialize diagnostic pager and finalizer.
10123         * pt.c (problematic_instantiation_changed): Define.
10124         (record_last_problematic_instantiation): Likewise.
10125         (current_instantiation): Likewise.
10126         (maybe_print_template_context): Remove.
10127         (print_template_context): Likewise.
10128         (current_tinst_level): Make static to reflect Brendan Kehoe's
10129         change of 1995-04-13.
10130         (push_tinst_level): Call print_instantiation_context.
10132 2000-08-21  Nix  <nix@esperi.demon.co.uk>
10134         * lang-specs.h: Do not process -o or run the assembler if
10135         -fsyntax-only.
10137 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
10139         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
10140         variables.
10141         * decl2.c (lang_decode_option): Disable gettext attributes for
10142         -ansi.
10144 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
10146         * lex.c (lang_init_options): Default diagnostic message maximum
10147         length to 80, when line-wrapping.
10149 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
10151         * class.c (build_vtbl_initializer): Clear the entire
10152         vtbl_init_data.  Start keeping track of the functions for which we
10153         have created vcall offsets here.
10154         (dfs_build_vcall_offset_vtbl_entries): Remove.
10155         (build_vcall_offset_vtbl_entries): Reimplement.
10156         (add_vcall_offset_vtbl_entries_r): New function.
10157         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
10158         computing when vcall offsets are necessary.
10160 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10162         * decl.c (member_function_or_else): Use cp_error ... %T.
10163         (grokdeclarator): Likewise.
10164         (start_method): Likewise.
10165         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
10167 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10169         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
10170         TYPE_DECLs.
10172 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10174         * cp-tree.h (PTRMEM_OK_P): New macro.
10175         (itf_ptrmem_ok): New enumeration value.
10176         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
10177         argument. Diagnose implicit pointer to member.
10178         (instantiate_type): Don't diagnose implicit pointer to member
10179         here. Pass itf_ptrmem_ok if ok. Adjust calls to
10180         resolve_address_of_overloaded_function.
10181         * init.c (build_offset_ref): Set PTRMEM_OK_P.
10182         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
10183         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
10184         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
10185         (build_unary_op): Deal with single non-static member in
10186         microsoft-land.
10188 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10190         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
10192 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10194         * cp-tree.h (enum_name_string): Remove prototype.
10195         (report_case_error): Remove prototype.
10196         * cp/typeck2.c (enum_name_string): Remove.
10197         (report_case_error): Remove.
10198         * error.c (dump_expr): Deal with enum values directly.
10199         Correctly negate integer constant.
10201 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10203         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
10204         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
10205         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
10206         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
10207         (__cxa_vec_new): Use __cxa_vec_new2.
10208         (__cxa_vec_delete): Use __cxa_vec_delete2.
10210 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10212         * vec.cc (__cxa_vec_new): Set "C" linkage.
10213         (__cxa_vec_ctor): Likewise.
10214         (__cxa_vec_cctor): Likewise.
10215         (__cxa_vec_dtor): Likewise.
10216         (__cxa_vec_delete): Likewise.
10217         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
10218         (__cxa_vec_ctor): Likewise.
10219         (__cxa_vec_cctor): Likewise.
10220         (__cxa_vec_dtor): Likewise.
10221         (__cxa_vec_delete): Likewise.
10223 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10225         * class.c (instantiate_type): Reinstate local variable
10226         deleted in previous change.
10228         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
10229         itf_no_attributes.
10231 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10233         * cp-tree.h (instantiate_type_flags): New enumeration.
10234         (instantiate_type): Change parameter.
10235         * class.c (instantiate_type): Adjust prototype. Adjust.
10236         * call.c (standard_conversion): Adjust instantiate_type call.
10237         (reference_binding): Likewise.
10238         (build_op_delete_call): Likewise.
10239         (convert_like_real): Likewise.
10240         * cvt.c (cp_convert_to_pointer): Likewise.
10241         (convert_to_reference): Likewise.
10242         * pt.c (convert_nontype_argument): Likewise.
10243         * typeck.c (build_binary_op): Likewise.
10244         (build_ptrmemfunc): Likewise.
10245         (convert_for_assignment): Likewise.
10247 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10249         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
10250         (current_aggr): Define.
10251         * decl.c (grokdeclarator): Make sure a friend class is an
10252         elaborated type specifier.
10253         * parse.y (current_aggr): Remove static definition.
10254         (cp_parse_init): Adjust.
10255         (structsp): Clear and restore current_aggr.
10256         (component_decl_list): Clear current_aggr.
10258         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
10259         aggregate tag on the typename's context.
10261         * pt.c (tsubst_friend_class): Return error_mark_node, if
10262         parms becomes NULL.
10263         (instantiate_class_template): Ignore error_mark_node friend types.
10265 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
10267         * cvt.c (warn_ref_binding): New static function, broken out of ...
10268         (convert_to_reference): ... here. Use it.
10270 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10272         * parse.y (template_arg): Add rule for template qualified with
10273         global scope.
10275 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10277         * decl2.c (add_function): Reorganize.
10278         (arg_assoc): Do not consider function template decls.
10280 2000-08-11  Jason Merrill  <jason@redhat.com>
10282         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
10283         looking inside.
10285 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10287         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
10288         (lookup_nested_tag): Likewise.
10290         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
10291         can be produced.
10293 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10295         * parse.y (named_complex_class_head_sans_basetype): Remove
10296         always true if.
10298 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10300         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
10301         explicit TEMPLATE_ID_EXPR args.
10302         (build_expr_from_tree, case CALL_EXPR): Likewise.
10304 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10306         * decl.c (check_tag_decl): Diagnose typename's which don't
10307         declare anything.
10309 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
10311         * init.c (build_aggr_init): Reject bogus array initializers
10312         early.
10314 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
10316         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
10317         runtime.
10318         * cp/tinfo.cc (__dynamic_cast): Likewise.
10319         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
10321 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
10323         * cvt.c (convert_to_pointer_force): Fix error message when
10324         attempting to cast from ambiguous base.
10326 2000-08-08  Jason Merrill  <jason@redhat.com>
10328         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
10329         (tsubst_template_arg_vector): Likewise.
10331         * decl2.c (build_anon_union_vars): Choose the largest field; don't
10332         assume that one will be as large as the union.
10334 2000-08-07  Kazu Hirata  <kazu@hxi.com>
10336         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
10337         * decl.c (pop_labels): Likewise.
10339 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
10341         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
10342         specifications.
10343         (__pointer_to_member_type_info): Likewise.
10344         (__base_class_info): Likewise.
10345         (__class_type_info): Likewise.
10346         (__si_class_type_info): Likewise.
10347         (__vmi_class_type_info): Likewise.
10348         * tinfo.cc (__si_class_type_info::__do_find_public_src):
10349         Changed member names to match specifications.
10350         (__vmi_class_type_info::__do_find_public_src): Likewise.
10351         (__si_class_type_info::__do_dyncast): Likewise.
10352         (__vmi_class_type_info::__do_dyncast): Likewise.
10353         (__si_class_type_info::__do_upcast): Likewise.
10354         (__vmi_class_type_info::__do_upcast): Likewise.
10355         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
10356         (__pbase_type_info::__pointer_catch): Likewise.
10357         (__pointer_type_info::__pointer_catch): Likewise.
10358         (__pointer_to_member_type_info::__pointer_catch): Likewise.
10360 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
10362         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
10363         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
10364         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
10366 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
10368         * cp-tree.h (add_method): Change prototype.
10369         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
10370         Don't double the size of the method vector in the error case.
10371         (handle_using_decl): Adjust call to add_method.
10372         (add_implicitly_declared_members): Likewise.
10373         (clone_function_decl): Likewise.
10374         * decl2.c (check_classfn): Likewise.
10375         * semantics.c (finish_member_declaration): Likewise.
10377 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10379         * decl.c (flag_isoc94): New variable.
10381 2000-08-02  Jason Merrill  <jason@redhat.com>
10383         * pt.c (do_type_instantiation): Add complain parm; don't complain
10384         if called recursively.
10385         * cp-tree.h, parse.y: Adjust.
10387 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
10389         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
10390         -Wno-strict-prototypes.
10392         * g++spec.c: Adjust type of second argument to
10393         lang_specific_driver, and update code as necessary.
10395         * cp-tree.h: Don't prototype min_precision here.
10396         (my_friendly_assert): Cast expression to void.
10397         * semantics.c (do_poplevel): Initialize scope_stmts.
10399 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
10401         * cp-tree.h (DECL_NEEDED_P): Tweak.
10403 2000-07-28  Jason Merrill  <jason@redhat.com>
10405         * lang-specs.h: Use %i in rule for .ii files.
10407 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
10409         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
10411 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
10413         Allow indirect primary bases.
10414         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
10415         primary_base.
10416         (CLASSTYPE_VFIELD_PARENT): Remove.
10417         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
10418         (BINFO_PRIMARY_BINFO): Remove.
10419         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
10420         (BINFO_VBASE_PRIMARY_P): Likewise.
10421         (BINFO_PRIMARY_BASE_OF): New macro.
10422         (BINFO_INDIRECT_PRIMARY_P): Likewise.
10423         (get_primary_binfo): New function.
10424         * decl.c (lang_mark_tree): Make lang_type::primary_base.
10425         * class.c (vcall_offset_data_s): Rename to ...
10426         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
10427         and add ctor_vtbl_p.
10428         (get_derived_offset): Use get_primary_binfo.
10429         (dfs_mark_primary_bases): Adjust handling of virtual primary
10430         bases.
10431         (mark_primary_bases): Likewise.
10432         (set_primary_base): Take a binfo, not an integer, as a
10433         representation of the primary base.
10434         (indirect_primary_base_p): Remove.
10435         (determine_primary_base): Adjust for indirect primary bases.
10436         (dfs_find_final_overrider): Fix typo in coment.
10437         (update_vtable_entry_for_fn): Use get_primary_binfo.
10438         (layout_nonempty_base_or_field): Tweak.
10439         (build_base_fields): Adjust for new primary base semantics.
10440         (dfs_propagate_binfo_offsets): Remove.
10441         (propagate_binfo_offsets): Rewrite.
10442         (dfs_set_offset_for_shared_vbases): Remove.
10443         (layout_virtual_bases): Don't use it.
10444         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
10445         ABI.
10446         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
10447         CLASSTYPE_VFIELD_PARENT.
10448         (dfs_get_primary_binfo): New function.
10449         (get_primary_binfo): Likewise.
10450         (dump_class_hierarchy_r): Tweak printing of primary bases.
10451         (build_vtbl_initializer): Fix typo in comments.  Use
10452         vtbl_init_data.
10453         (build_vcall_and_vbase_vtbl_entries): Likewise.
10454         (build_vbaes_offset_vtbl_entries): Likewise.
10455         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
10456         BV_VCALL_INDEX to handle indirect primary bases.
10457         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
10458         (build_rtti_vtbl_entries): Likewise.
10459         * search.c (get_shared_vbase_if_not_primary): Tweak.
10460         (find_vbase_instance): Likewise.
10461         (binfo_for_vtable): Simplify.
10462         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
10463         (make_binfo): Make it have 11 entries.
10465 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
10467         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
10468         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
10469         ascertaining primaryness.
10470         (G): Remove template_args.
10471         (decl_is_template_id): New function.
10472         (write_encoding): Use decl_is_template_id.
10473         (write_name): Likewise.  Handle type_decls.  Get main variant of
10474         type decls.
10475         (write_nested_name): Likewise.
10476         (write_prefix): Likewise.
10477         (write_template_prefix): Likewise.
10478         (write_special_name_constructor): Remove defunct production from
10479         comment.
10480         (write_bare_function_type): Remove comment about absent parameter.
10481         (write_template_template_arg): Add missing grammar production to
10482         comment.
10484 2000-07-27  Jason Merrill  <jason@redhat.com>
10486         * decl.c (duplicate_decls): If common_type produces a non-typedef
10487         type for a typedef, just use the old type.
10489 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
10491         * cp-tree.h (function_depth): Declare.
10492         (verify_stmt_tree): Likewise.
10493         (find_tree): Likewise.
10494         * decl.c (function_depth): Give it external linkage.
10495         * optimize.c (optimize_function): Increment and decrement it.
10496         * tree.c (verify_stmt_tree_r): New function.
10497         (verify_stmt_tree): Likewise.
10498         (find_tree_r): Likewise.
10499         (find_tree): Likewise.
10501 2000-07-27  Jason Merrill  <jason@redhat.com>
10503         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
10504         TYPE_PTRMEMFUNC_P.
10505         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
10507 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
10509         * decl.c (start_cleanup_fn): Mark the function as `inline'.
10510         * decl2.c (get_guard): Call cp_finish_decl, not
10511         rest_of_decl_compilation, for local guards.
10512         * lex.c (do_identifier): Remove unused variable.
10514 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
10516         * parse.y:  Add missing ';'.
10518 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
10520         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
10521         of `extern "C++"'.
10523 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10525         Kill strict_prototype. Backwards compatibility only for
10526         non NO_IMPLICIT_EXTERN_C systems.
10527         * cp-tree.h (flag_strict_prototype): Remove.
10528         (strict_prototype): Remove.
10529         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
10530         * decl.c (maybe_push_to_top_level): Adjust.
10531         (pop_from_top_level): Adjust.
10532         (decls_match): Only allow sloppy parm matching for ancient
10533         system headers.
10534         (init_decl_processing): Adjust.
10535         (grokdeclarator): Adjust.
10536         * decl2.c (flag_strict_prototype): Remove.
10537         (strict_prototype): Remove.
10538         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
10539         (lang_f_options): Remove "strict-prototype".
10540         (unsupported-options): Add "strict-prototype".
10541         * lex.c (do_identifier): Adjust.
10542         (do_scoped_id): Adjust.
10543         * parse.y (empty_parms): Adjust.
10544         * class.c (push_lang_context): Adjust.
10545         (pop_lang_context): Adjust.
10546         * typeck.c (comp_target_parms): Adjust.
10548 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10550         * decl.c (poplevel): Deal with anonymous variables at for scope.
10551         (maybe_inject_for_scope_var): Likewise.
10553 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
10555         * decl.c: Remove all signal handling code, now done in toplev.c.
10557 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
10559         * decl.c (make_rtl_for_nonlocal_decl): Rework.
10561         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
10562         correctly.
10564 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
10566         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
10567         Define my_friendly_assert and my_friendly_abort as macros
10568         which may call friendly_abort.  Prototype friendly abort, not
10569         my_friendly_abort or my_friendly_assert.
10570         * decl.c (signal_catch): Report the signal caught in the error
10571         message.  Call fatal directly.
10572         * typeck2.c (ack, my_friendly_assert): Delete.
10573         (my_friendly_abort): Rename to friendly_abort.  Expect file,
10574         line, and function parameters.  Report the abort code, then
10575         call fancy_abort.  Do not mask an abort if errors have
10576         already occurred.
10578 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
10580         * typeck.c (comp_target_parms): Remove obsolete parameter.
10581         (comp_target_types): Adjust.
10583 2000-07-17  Jason Merrill  <jason@redhat.com>
10585         * typeck.c (mark_addressable): Never set TREE_USED.
10586         * call.c (build_call): Don't abort on calls to library functions
10587         that have been declared normally.
10589         * typeck.c (build_binary_op): Fix grammar in warning.
10591         * exception.cc (__eh_free): Fix prototype.
10593         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
10595         * decl.c (pushdecl): Handle seeing an OVERLOAD in
10596         IDENTIFIER_NAMESPACE_VALUE.
10598 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
10600         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
10601         * method.c (use_thunk): Correct handling of vcall offsets.
10603 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
10605         * .cvsignore: parse.h and parse.c have no cp- prefix.
10607 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
10609         * .cvsignore: New file.
10611 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
10613         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
10615 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
10617         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
10618         * parse.c: Remove.
10619         * parse.h: Likewise.
10621 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
10623         * class.c (layout_class_type): Add pointers to virtual bases after
10624         base classes under the old ABI.
10626 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
10628         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
10629         (finish_continue_stmt): Likewise.
10630         (begin_for_stmt): Remove call to note_level_for_for.
10631         (finish_goto_stmt): Change call from build_min_nt
10632         to build_stmt.
10633         (finish_expr_stmt): Likewise.
10634         (begin_if_stmt): Likewise.
10635         (begin_while_stmt): Likewise.
10636         (finish_while_stmt): Likewise.
10637         (finish_return_stmt): Likewise.
10638         (begin_for_stmt): Likewise.
10639         (finish_for_stmt): Likewise.
10640         (finish_break_stmt): Likewise.
10641         (begin_switch_stmt): Likewise.
10642         (finish_case_label): Likewise.
10643         (genrtl_try_block): Likewise.
10644         (begin_try_block): Likewise.
10645         (begin_handler): Likewise.
10646         (begin_compound_stmt): Likewise.
10647         (finish_asm_stmt): Likewise.
10648         (finish_label_stmt): Likewise.
10649         (add_decl_stmt): Likewise.
10650         (finish_subobject): Likewise.
10651         (finish_decl_cleanup): Likewise.
10652         (finish_named_return_value): Likewise.
10653         (setup_vtbl_ptr): Likewise.
10654         (add_scope_stmt): Likewise.
10655         * decl.c (finish_constructor_body): Likewise.
10656         (finish_destructor_body): Likewise.
10657         * optimize.c (copy_body_r): Likewise.
10658         (initialize_inlined_parameters): Likewise.
10659         (declare_return_variable): Likewise.
10660         (expand_call_inline): Likewise.
10662 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
10664         * semantics.c (expand_body): Sync interface information
10665         at the end of function body expansion.
10667 2000-07-09  Jason Merrill  <jason@redhat.com>
10669         * init.c (build_new_1): Bail early if the call to new fails.
10671         * decl.c (compute_array_index_type): Check specifically for
10672         an INTEGER_CST, not just TREE_CONSTANT.
10674         * decl.c (duplicate_decls): Don't call duplicate_decls on
10675         the DECL_TEMPLATE_RESULT.
10676         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
10677         codes.
10679         * error.c (dump_template_bindings): Don't crash if we had an
10680         invalid argument list.
10682         * typeck.c (c_expand_start_case): Do narrowing here.
10683         * semantics.c (finish_switch_cond): Not here.
10685 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
10687         * parse.y (asm_clobbers): Do string concatenation.
10689 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
10691         * decl.c (pushtag): Don't put local classes in template functions
10692         on the local_classes list.
10694 2000-07-04  Scott Snyder  <snyder@fnal.gov>
10696         * decl2.c (get_guard): Add missing return for old ABI local
10697         variable case.
10699 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
10701         * cp-tree.h (char_type_p): New function.
10702         * decl.c (init_decl_processing): Don't initialize
10703         signed_wchar_type_node or unsigned_wchar_type_node.
10704         (complete_array_type): Handle brace-enclosed string-constants.
10705         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
10706         * tree.c (char_type_p): New function.
10707         * typeck2.c (digest_init): Use char_type_p.
10709 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
10711         * pt.c (tsubst): Don't layout type, if it's error_mark.
10713 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
10715         * pt.c (instantiate_pending_templates): Reset template level.
10717 2000-07-05  Jason Merrill  <jason@redhat.com>
10719         * call.c (joust): Don't complain about `operator char *()' beating
10720         `operator const char *() const'.
10722 2000-07-04  scott snyder  <snyder@fnal.gov>
10723             Jason Merrill  <jason@redhat.com>
10725         * repo.c (repo_get_id): Handle the case where a class with virtual
10726         bases has a null TYPE_BINFO_VTABLE.
10728 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
10729             Jason Merrill  <jason@redhat.com>
10731         * parse.y (member_init): Just pass in the type.
10732         * init.c (expand_member_init): Handle getting a type.
10734 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10735             Jason Merrill  <jason@redhat.com>
10737         * decl.c (finish_function): Warn if a function has no return
10738         statement.
10739         Suggested by Andrew Koenig.
10740         * typeck.c (check_return_expr): Do set current_function_returns_value
10741         if we got an error_mark_node.
10743 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
10745         * decl2.c (push_decl_namespace): Push the original namespace.
10747 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
10749         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
10750         * semantics.c (begin_class_definition): Clear it.
10752 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
10754         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
10755         (genrtl_expr_stmt): Likewise.
10756         (genrtl_decl_stmt): Likewise.
10757         (genrtl_if_stmt): Likewise.
10758         (genrtl_while_stmt): Likewise.
10759         (genrtl_do_stmt): Likewise.
10760         (genrtl_return_stmt): Likewise.
10761         (genrtl_for_stmt): Likewise.
10762         (genrtl_break_stmt): Likewise.
10763         (genrtl_continue_stmt): Likewise.
10764         (genrtl_scope_stmt): Likewise.
10765         (genrtl_switch_stmt): Likewise.
10766         (genrtl_case_label): Likewise.
10767         (genrtl_begin_compound_stmt): Likewise.
10768         (genrtl_finish_compound_stmt): Likewise.
10769         (genrtl_compound_stmt): Likewise.
10770         (genrtl_asm_stmt): Likewise.
10772         * init.c (begin_init_stmts): Remove call to
10773         genrtl_begin_compound_stmt.
10774         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
10776         * semantics.c (lang_expand_stmt): Changed call to
10777         genrtl_compound_stmt to ignore return value.
10779 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
10781         * mangle.c (canonicalize_for_substitution): Return the canonical
10782         variant of a type.
10784         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
10785         TYPE_DECL.
10786         * typeck.c (commonparms): Remove obstack manipulations.
10788 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
10790         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
10792         * Makefile.in (OBJS): Added ../c-semantics.o.
10793         (OBJDEPS): Likewise.
10795         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
10796         ../c-common.h.
10797         (struct stmt_tree): Added comment.
10798         (current_function_name_declared): Removed.
10799         (stmts_are_full_exprs_p): Likewise.
10800         (genrtl_do_pushlevel): Likewise.
10801         (genrtl_clear_out_block): Likewise.
10802         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
10803         (DECL_ANON_UNION_ELEMS): Likewise.
10804         (emit_local_var): Likewise.
10805         (make_rtl_for_local_static): Likewise.
10806         (do_case): Likewise.
10807         (expand_stmt): Likewise.
10808         (genrtl_decl_cleanup): Likewise.
10809         (c_expand_asm_operands): Likewise.
10810         (c_expand_return): Likewise.
10811         (c_expand_start_case): Likewise.
10813         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
10814         (emit_local_var): Likewise.
10815         (initialize_local_var): Change reference to
10816         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
10817         Change reference to stmts_are_full_exprs_p to
10818         current_stmt_tree->stmts_are_full_exprs_p.
10819         (push_cp_function_context): Likewise.
10821         * expect.c (expand_throw): Change reference to
10822         stmts_are_full_exprs_p.
10824         * init.c (build_aggr_init): Change reference to
10825         stmts_are_full_exprs_p.
10826         (build_vec_init): Likewise.
10828         * optimize.c (maybe_clone_body): Change reference to
10829         current_function_name_declared to
10830         cp_function_chain->name_declared.
10832         * pt.c (instantiate_decl): Change reference to
10833         current_function_name_declared to
10834         cp_function_chain->name_declared.
10836         * semantics.c (expand_cond): Moved declaration to c-common.h.
10837         (genrtl_do_pushlevel): Moved to c-semantics.c.
10838         (genrtl_clear_out_block): Likewise.
10839         (genrtl_goto_stmt): Likewise.
10840         (genrtl_expr_stmt): Likewise.
10841         (genrtl_decl_stmt): Likewise.
10842         (gerntl_if_stmt): Likewise.
10843         (genrtl_while_stmt): Likewise.
10844         (genrtl_do_stmt): Likewise.
10845         (genrtl_return_stmt): Likewise.
10846         (genrtl_for_stmt): Likewise.
10847         (genrtl_break_stmt): Likewise.
10848         (genrtl_continue_stmt): Likewise.
10849         (genrtl_scope_stmt): Likewise.
10850         (genrtl_switch_stmt): Likewise.
10851         (genrtl_case_label): Likewise.
10852         (genrtl_begin_compound_stmt): Likewise.
10853         (genrtl_finish_compound_stmt): Likewise.
10854         (genrtl_compound_stmt): Likewise.
10855         (genrtl_asm_stmt): Likewise.
10856         (genrtl_decl_cleanup): Likewise.
10857         (expand_cond): Likewise.
10858         (expand_stmt): Renamed to ...
10859         (lang_expand_stmt): ... this.
10860         (lang_expand_expr_stmt): Initialize.
10861         (set_current_function_name_declared): Likewise.
10862         (stmts_are_full_exprs_p): Likewise.
10863         (current_function_name_declared): Likewise.
10864         (anon_aggr_type_p): Likewise.
10865         (do_poplevel): Change reference to
10866         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
10867         Change reference to stmts_are_full_exprs_p to
10868         current_stmt_tree->stmts_are_full_exprs_p.
10869         (add_tree): Likewise.
10870         (finish_expr_stmt): Likewise.
10871         (prep_stmt): Likewise.
10872         (lang_expand_stmt): Likewise.
10873         (begin_compound_stmt): Change reference to
10874         current_function_name_declared to
10875         cp_function_chain->name_declared and call to
10876         current_function_name_declared().
10877         (setup_vtbl_ptr): Likewise.
10878         (genrtl_do_poplevel): Removed.
10880 2000-06-30  Jason Merrill  <jason@redhat.com>
10882         * init.c (init_init_processing): Go back to aligning like
10883         double_type_node for old ABI.
10884         (get_cookie_size): Make cookie larger if we get a type that needs
10885         more alignment.
10886         (build_vec_delete): Call it.
10888         * typeck.c (qualify_type_recursive): New fn.
10889         (composite_pointer_type): Use it.
10890         (build_binary_op): Use composite_pointer_type.
10892 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
10893             Jason Merrill  <jason@redhat.com>
10895         * typeck.c (check_return_expr): Don't complain about returning
10896         NULL from operator new if -fcheck-new.
10897         * cp-tree.h: Declare flag_check_new here.
10898         * init.c: Not here.
10900 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
10902         * mangle.c (find_substitution): Use same_type_p.
10903         (write_encoding): Don't check for substitutions.
10905 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
10907         * parse.y (expr_no_comma_rangle): New non-terminal.
10908         (template_parm): Use it for default parameter case.
10909         (template_arg): Use it.
10910         (expr_no_commas): Remove commented out undefined extensions.
10911         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
10912         * parse.h, parse.c: Rebuilt.
10914 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
10916         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
10917         (finish_asm_stmt): Do it here, instead.
10919         * cp-tree.h (ridpointers): Don't declare.
10920         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
10921         (record_builtin_java_type): Likewise.
10922         (init_decl_processing): Likewise.
10923         * lex.c: Move inclusion of lex.h.
10924         (ridpointers): Don't define.
10925         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
10926         RID_MAX.
10927         * lex.h (enum rid): Rename to ...
10928         (enum cp_rid): ... this.
10929         (ridpointers): Don't declare.
10930         * parse.y: Move inclusion of lex.h.
10931         * parse.c: Regenerated.
10932         * spew.c: Move inclusion of lex.h.
10934         * cp-tree.h (struct language_function): Remove temp_name_counter.
10935         (temp_name_counter): Remove.
10936         (get_temp_name): Change prototype.
10937         (get_guard): New function.
10938         (get_guard_cond): Likewise.
10939         (set_guard): Likewise.
10940         * cvt.c (build_up_reference): Adjust call to get_temp_name.
10941         * decl.c (expand_static_init): Use get_guard and friends to
10942         implement guard variables.
10943         * decl2.c (get_temp_name): Assume that the variables created are
10944         always static.
10945         (get_sentry): Rename to ...
10946         (get_guard): ... this.  Implement new ABI guard variables.
10947         (get_guard_bits): New function.
10948         (get_guard_cond): Likewise.
10949         (set_guard): Likewise.
10950         (start_static_initialization_or_destruction): Use them.
10951         (do_static_initialization): Replace sentry with guard throughout.
10952         (do_static_destruction): Likewise.
10953         * init.c (create_temporary_var): Add comment.
10955 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
10957         * mangle.c (find_substitution): Use same_type_p.
10958         (write_encoding): Don't check for substitutions.
10960 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
10962         * parse.y (expr_no_comma_rangle): New non-terminal.
10963         (template_parm): Use it for default parameter case.
10964         (template_arg): Use it.
10965         (expr_no_commas): Remove commented out undefined extensions.
10966         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
10967         * parse.h, parse.c: Rebuilt.
10969 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
10971         * cp-tree.h (flag_const_strings): Remove.
10972         (warn_parentheses): Likewise.
10973         (warn_format): Likewise.
10974         (common_type): Likewise.
10975         (default_conversion): Likewise.
10976         (build_binary_op): Likewise.
10977         (cp_build_binary_op): New macro.
10978         * call.c (build_new_op): Use cp_build_binary_op instead of
10979         build_binary_op.
10980         * class.c (build_vtable_entry_ref): Likewise.
10981         * decl.c (expand_static_init): Likewise.
10982         (compute_array_index_type): Likewise.
10983         (build_enumerator): Likewise.
10984         * decl2.c (delete_sanity): Likewise.
10985         (start_static_initialization_or_destruction): Likewise.
10986         * error.c (dump_type_suffix): Likewise.
10987         * init.c (resolve_offset_ref): Likewise.
10988         (build_new): Likewise.
10989         (build_new_1): Likewise.
10990         (build_vec_delete_1): Likewise.
10991         (build_vec_init): Likewise.
10992         (build_delete): Likewise.
10993         * rtti.c (synthesize_tinfo_fn): Likewise.
10994         (synthesize_tinfo_var): Likewise.
10995         * search.c (expand_upcast_fixups): Likewise.
10996         (fixup_all_virtual_upcast_offsets): Likewise.
10997         * typeck.c (build_array_ref): Likewise.
10998         (get_member_function_from_ptrfunc): Likewise.
10999         (build_binary_op): Add parameter.
11000         (pointer_int_sum): Use cp_build_binary_op.
11001         (pointer_diff): Likewise.
11002         (build_modify_expr): Likewise.
11003         (get_delta_difference): Likewise.
11004         (build_ptrmemfunc): Likewise.
11006 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
11008         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
11009         * decl.c (create_implicit_typedef): Adjust.
11010         * decl2.c (build_artificial_parm): Adjust.
11011         * method.c (implicitly_declare_fn): Adjust.
11012         * pt.c (push_inline_template_parms_recursive): Adjust.
11013         (process_template_parm): Adjust.
11014         (overloaded_template_name): Adjust.
11015         * semantics.c (finish_template_template_parm): Adjust.
11017 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
11019         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
11020         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
11021         where to emit thunks.
11022         (build_vtt): Adjust call to build_vtt_inits.
11023         (build_vtt_inits): Add parameter to indicate whether or not
11024         sub-VTTs for virtual bases should be included.  Adjust handling of
11025         construction vtables.
11026         (get_matching_base): New function.
11027         (dfs_build_vtt_inits): Rename to ...
11028         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
11029         construction vtables.
11030         (dfs_fixup_binfo_vtbls): Likewise.
11031         (build_ctor_vtbl_groups): Build construction vtables for virtual
11032         bases, too.
11033         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
11034         to build construction vtbls.
11035         (dfs_accumulate_vtbl_inits): Adjust handling of
11036         construction vtables.
11038         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
11039         types correctly.
11041 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
11043         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
11045 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
11047         * search.c (hides): Remove.
11048         (is_subobject_of_p): Add most_derived parameter. Use
11049         CANONICAL_BINFO.
11050         (lookup_field_queue_p): Adjust.
11051         (lookup_field_r): Adjust.
11053 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
11055         * decl2.c (handle_class_head): Bash typedefs to the type's main
11056         decl.
11058 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
11060         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
11061         (begin_global_stmt_expr): ... this.
11062         (genrtl_finish_stmt_expr): Rename to ...
11063         (finish_global_stmt_expr): ... this.
11064         * init.c (begin_init_stmts): Adjust calls.
11065         (finish_init_stmts): Likewise.
11066         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
11067         (begin_global_stmt_expr): ... this.
11068         (genrtl_finish_stmt_expr): Rename to ...
11069         (finish_global_stmt_expr): ... this.
11071 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11073         * search.c (lookup_member): Fix typo in comment.
11075 2000-06-24  Jason Merrill  <jason@redhat.com>
11077         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
11078         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
11080 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11082         * parse.y (complex_direct_notype_declarator): Support global_scope.
11083         * Makefile.in: Adjust conflict count.
11085 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11087         * parse.y (template_arg): Convert TEMPLATE_DECL
11088         that is a template template parameter to
11089         TEMPLATE_TEMPLATE_PARM here.
11091         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
11092         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
11093         (copy_template_template_parm): Adjust prototype.
11094         * decl.c (grokdeclarator): Remove dead code.
11095         * pt.c (process_template_parm): Tidy.
11096         (lookup_template_class): Construct nodes in
11097         copy_template_template_parm.
11098         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
11099         lookup_template_class.  Use TYPE_TI_TEMPLATE.
11100         * tree.c (copy_template_template_parm): Add NEWARGS
11101         parameter.
11102         (mapcar): Adjust call to copy_template_template_parm.
11103         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
11104         * method.c (build_template_template_parm_names): Change error
11105         code to avoid compilation warning.
11107         * gxxint.texi: Document template template parameter
11108         name mangling.
11110 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
11112         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
11113         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
11114         (cp-demangle.o): New rule.
11115         (dyn-string.o): Likewise.
11116         * inc/cxxabi.h (__cxa_demangle): New declaration.
11118 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
11120         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
11121         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
11122         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
11123         a tree, not an int.
11124         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
11125         (make_thunk): Change prototype.
11126         (emit_thunk): Rename to use_thunk.
11127         (mangle_thunk): Change prototype.
11128         * class.c (get_derived_offset): Simplify.
11129         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
11130         BV_GENERATE_THUNK_WITH_VTABLE_P.
11131         (build_primary_vtable): Simplify.
11132         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
11133         (dfs_find_base): Remove.
11134         (update_vtable_entry_for_fn): Correct bug in finding the base
11135         where a virtual function was first declared.  Figure out whether
11136         or not to emit a vcall-thunk with the vtables in which it appears.
11137         Correct logic for deciding whether to use an ordinary thunk, or a
11138         vcall thunk.
11139         (finish_struct_1): Remove unnecssary code.
11140         (build_vtbl_initializer): Use ssize_int for the running counter of
11141         negative indices.
11142         (build_vtbl_initializer): Only use vcall thunks where necessary.
11143         Mark thunks as needing to be emitted with their vtables, or not.
11144         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
11145         indices.  Use size_binop.
11146         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
11147         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
11148         size_binop.
11149         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
11150         (build_vtable_entry): Mark thunks as needing to be emitted with
11151         their vtables, or not.
11152         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
11153         * decl2.c (mark_vtable_entries): Use use_thunk instead of
11154         emit_thunk.
11155         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
11156         information.
11157         * error.c (dump_expr): Use BV_FN.
11158         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
11159         not an int.
11160         * method.c (make_thunk): Likewise.
11161         (emit_thunk): Rename to use_thunk.  Allow callers to decide
11162         whether or not to actually emit the thunk.  Adjust for changes in
11163         representation of vcall offsets.
11164         * search.c (dfs_get_pure_virtuals): Use BV_FN.
11165         * semantics.c (emit_associated_thunks): New function.
11166         (expand_body): Use it.
11167         * ir.texi: Adjust decriptions of thunks.
11169 2000-06-22  Jason Merrill  <jason@redhat.com>
11171         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
11172         (tsubst_friend_function): Copy it here.
11174         * decl.c (grok_op_properties): Fix typo.
11176         * decl2.c (delete_sanity): Clarify warning, avoid failure on
11177         deleting void*.
11179         * pt.c (check_explicit_specialization): Clarify error.
11181         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
11182         an old OVERLOAD when we're declaring a non-function.
11183         (pushdecl, destroy_local_var): Check for error_mark_node.
11184         (warn_extern_redeclared_static): Also bail early if
11185         we're a CONST_DECL.
11186         (push_overloaded_decl): Ignore an old error_mark_node.
11188 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
11190         * call.c (build_x_va_arg): Check if in a template decl.
11191         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
11193 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11195         * class.c (push_lang_context): TYPE_NAME gets you to the Java
11196         types DECLs.
11197         * decl.c (check_goto): Computed gotos assumed OK.
11199 2000-06-20  Jason Merrill  <jason@redhat.com>
11201         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
11202         for which we don't need to look for instantiations.
11204 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
11206         * parse.y (program): Always call finish_translation_unit.
11207         * parse.c, parse.h: Rebuilt.
11209 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
11211         * method.c: Don't include hard-reg-set.h.
11213 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
11215         * rtti.c (get_base_offset): Cope when vbase field is in a base.
11217 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
11219         * call.c (build_conditional_expr): Use VOID_TYPE_P.
11220         * cvt.c (cp_convert_to_pointer): Likewise.
11221         (convert_to_void): Likewise.
11222         * error.c (dump_expr): Likewise.
11223         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
11224         * init.c (build_delete): Likewise.
11225         * method.c (emit_thunk): Likewise.
11226         * optmize.c (declare_return_variable): Likewise.
11227         * rtti.c (get_tinfo_decl_dynamic): Likewise.
11228         (get_typeid): Likewise.
11229         (build_dynamic_cast_1): Likewise.
11230         * typeck.c (composite_pointer_type): Likewise.
11231         (common_type): Likewise.
11232         (build_indirect_ref): Likewise.
11233         (build_binary_op): Likewise.
11234         (build_x_compound_expr): Likewise.
11235         (check_return_expr): Likewise.
11236         * typeck2.c (add_exception_specifier): Likewise.
11238         * mangle.c (write_method_parms): Use direct comparison for end
11239         of parmlist.
11241 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
11243         * cp-tree.h (genrtl_try_block): Declare function.
11244         (genrtl_handler): Likewise.
11245         (genrtl_catch_block): Likewise.
11246         (genrtl_ctor_stmt): Likewise.
11247         (genrtl_subobject): Likewise.
11248         (genrtl_decl_cleanup): Likewise.
11249         (genrtl_do_poplevel): Likewise.
11250         (genrtl_do_pushlevel): Likewise.
11251         (genrtl_clear_out_block): Likewise.
11252         (genrtl_goto_stmt): Likewise.
11253         (genrtl_expr_stmt): Likewise.
11254         (genrtl_decl_stmt): Likewise.
11255         (genrtl_if_stmt): Likewise.
11256         (genrtl_while_stmt): Likewise.
11257         (genrtl_do_stmt): Likewise.
11258         (genrtl_return_stmt): Likewise.
11259         (genrtl_for_stmt): Likewise.
11260         (genrtl_break_stmt): Likewise.
11261         (genrtl_continue_stmt): Likewise.
11262         (genrtl_scope_stmt): Likewise.
11263         (genrtl_switch_stmt): Likewise.
11264         (genrtl_case_label): Likewise.
11265         (genrtl_begin_compound_stmt): Likewise.
11266         (genrtl_finish_compound_stmt): Likewise.
11267         (genrtl_compound_stmt): Likewise.
11268         (genrtl_asm_stmt): Likewise.
11269         (genrtl_named_return_value): Likewise.
11270         (genrtl_begin_stmt_expr): Likewise.
11271         (genrtl_finish_stmt_expr): Likewise.
11272         (finish_for_stmt): Removed first argument.
11273         (finish_switch_stmt): Likewise.
11275         * semantics.c (genrtl_try_block): Define function.
11276         (genrtl_handler): Likewise.
11277         (genrtl_catch_block): Likewise.
11278         (genrtl_ctor_stmt): Likewise.
11279         (genrtl_subobject): Likewise.
11280         (genrtl_decl_cleanup): Likewise.
11281         (genrtl_do_poplevel): Likewise.
11282         (genrtl_do_pushlevel): Likewise.
11283         (genrtl_clear_out_block): Likewise.
11284         (genrtl_goto_stmt): Likewise.
11285         (genrtl_expr_stmt): Likewise.
11286         (genrtl_decl_stmt): Likewise.
11287         (genrtl_if_stmt): Likewise.
11288         (genrtl_while_stmt): Likewise.
11289         (genrtl_do_stmt): Likewise.
11290         (genrtl_return_stmt): Likewise.
11291         (genrtl_for_stmt): Likewise.
11292         (genrtl_break_stmt): Likewise.
11293         (genrtl_continue_stmt): Likewise.
11294         (genrtl_scope_stmt): Likewise.
11295         (genrtl_switch_stmt): Likewise.
11296         (genrtl_case_label): Likewise.
11297         (genrtl_begin_compound_stmt): Likewise.
11298         (genrtl_finish_compound_stmt): Likewise.
11299         (genrtl_compound_stmt): Likewise.
11300         (genrtl_asm_stmt): Likewise.
11301         (genrtl_named_return_value): Likewise.
11302         (genrtl_begin_stmt_expr): Likewise.
11303         (genrtl_finish_stmt_expr): Likewise.
11304         (finish_for_stmt): Removed first argument and generate rtl
11305         specific code.
11306         (finish_switch_stmt): Likewise.
11307         (do_poplevel): Removed generate rtl specific code.
11308         (do_pushlevel): Likewise.
11309         (add_tree): Likewise.
11310         (finish_goto_stmt): Likewise.
11311         (finish_expr_stmt): Likewise.
11312         (begin_if_stmt): Likewise.
11313         (finish_if_stmt_cond): Likewise.
11314         (finish_then_clause): Likewise.
11315         (begin_else_clause): Likewise.
11316         (finish_else_clause): Likewise.
11317         (finish_if_stmt): Likewise.
11318         (clear_out_block): Likewise.
11319         (begin_while_stmt): Likewise.
11320         (finish_while_stmt_cond): Likewise.
11321         (finish_while_stmt): Likewise.
11322         (begin_do_stmt): Likewise.
11323         (finish_do_body): Likewise.
11324         (finish_do_stmt): Likewise.
11325         (finish_return_stmt): Likewise.
11326         (begin_for_stmt): Likewise.
11327         (finish_for_init_stmt): Likewise.
11328         (finish_for_cond): Likewise.
11329         (finish_for_expr): Likewise.
11330         (finish_break_stmt): Likewise.
11331         (finish_continue_stmt): Likewise.
11332         (begin_switch_stmt): Likewise.
11333         (finish_switch_cond): Likewise.
11334         (finish_case_label): Likewise.
11335         (begin_try_block): Likewise.
11336         (begin_function_try_block): Likewise.
11337         (finish_try_block): Likewise.
11338         (finish_cleanup_try_block): Likewise.
11339         (finish_cleanup): Likewise.
11340         (finish_function_try_block): Likewise.
11341         (finish_handler_sequence): Likewise.
11342         (finish_function_handler_sequence): Likewise.
11343         (begin_handler): Likewise.
11344         (finish_handler_parms): Likewise.
11345         (begin_catch_block): Likewise.
11346         (finish_handler): Likewise.
11347         (begin_compound_stmt): Likewise.
11348         (finish_compound_stmt): Likewise.
11349         (finish_asm_stmt): Likewise.
11350         (finish_label_stmt): Likewise.
11351         (finish_label_decl): Likewise.
11352         (finish_subobject): Likewise.
11353         (finish_decl_cleanup): Likewise.
11354         (finish_named_return_value): Likewise.
11355         (begin_stmt_expr): Likewise.
11356         (finish_stmt_expr): Likewise.
11358         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
11359         to call genrtl_expr_stmt when appropriate.
11361         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
11362         begin_compound_expr to call genrtl_begin_stmt_expr and
11363         genrtl_begin_compound_expr when appropriate.
11364         (finish_init_stmts): Changed calls to finish_compound_expr and
11365         finish_stmt_expr to call genrtl_finish_compound_expr and
11366         genrtl_finish_stmt_expr when appropriate.
11367         (expand_default_init): Changed call to finish_expr_stmt to call
11368         genrtl_expr_stmt when appropriate.
11369         (build_vec_init): Likewise.
11371         * parse.y (simple_stmt): Removed first argument from call to
11372         finish_for_stmt. Removed first argument from call to
11373         finish_switch_stmt.
11375         * parse.c: Regenerated.
11377         * pt.c (tsubst_expr): Removed first argument from call to
11378         finish_for_stmt. Removed first argument from call to
11379         finish_switch_stmt.
11381 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
11383         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
11384         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
11386         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
11387         (cplus_tree_code_length[]): Likewise.
11388         (cplus_tree_code_name[]): Likewise.
11389         (init_parse): Added call to add_c_tree_codes. Changed
11390         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
11392 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
11394         * cp-tree.h (finish_mem_initializers): Declare.
11395         (count_trees): Likewise.
11396         * parse.y (base_init): Use finish_mem_initializers.
11397         * semantics.c (finish_mem_initializers): New function.
11399         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
11400         the number of trees.
11401         (n_trees): Remove.
11402         (count_trees): Don't use it.
11404 2000-06-15  Jason Merrill  <jason@redhat.com>
11406         * tree.c (count_trees): New debugging function.
11408         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
11409         * init.c (build_member_call): Pull out the name of a DECL.
11411         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
11412         * semantics.c (expand_body): Push to TV_INTEGRATION here.
11413         * optimize.c (optimize_function): Not here.
11414         * pt.c (instantiate_decl): Push to TV_PARSE.
11416 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
11418         * cp-tree.h (struct language_function): Remove x_base_init_list
11419         and x_member_init_list.
11420         (current_base_init_list): Remove.
11421         (current_member_init_list): Likewise.
11422         (setup_vtbl_ptr): Change prototype.
11423         (emit_base_init): Likewise.
11424         (expand_member_init): Likewise.
11425         (reinit_parse_for_function): Remove.
11426         * decl.c (save_function_data): Don't clear x_base_init_list and
11427         x_member_init_list.
11428         (mark_language_function): Don't mark them.
11429         * init.c (perform_member_init): Tweak comment.
11430         (sort_member_init): Take the list of initializers as an argument.
11431         (sort_base_init): Likewise.
11432         (emit_base_init): Likewise.
11433         (expand_member_init): Return the initializer.  Don't use global
11434         variables.
11435         * lex.c (reinit_parse_for_function): Remove.
11436         * method.c (build_template_parm_names): Correct substitution.
11437         (do_build_copy_constructor): Don't use current_member_init_list
11438         and current_base_init_list.
11439         (synthesize_method): Likewise.
11440         * parse.y (base_init): Split mem-initializers into
11441         base-initializers and field-initializers.
11442         (member_init_list): Build up the list here.
11443         (member_init): Return the initializer.
11444         (fn.depfn): Don't use reinit_parse_for_function.
11445         * parse.c: Regenerated.
11446         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
11447         ERROR_MARK.
11448         (tsubst_expr): Don't use current_member_init_list
11449         and current_base_init_list.
11450         (tsubst_expr_values): Rename to ...
11451         (tsubst_initializer_list): ... this.  Use convert_from_reference.
11452         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
11453         and current_base_init_list.
11454         (begin_function_definition): Don't call reinit_parse_for_function.
11456         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
11458         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
11459         correctly.
11461         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
11463 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
11465         * cp-tree.h (IF_COND): Move to c-common.h.
11466         (THEN_CLAUSE): Likewise.
11467         (ELSE_CLAUSE): Likewise.
11468         (WHILE_COND): Likewise.
11469         (WHILE_BODY): Likewise.
11470         (DO_COND): Likewise.
11471         (DO_BODY): Likewise.
11472         (RETURN_EXPR): Likewise.
11473         (EXPR_STMT_EXPR): Likewise.
11474         (FOR_INIT_STMT): Likewise.
11475         (FOR_COND): Likewise.
11476         (FOR_EXPR): Likewise.
11477         (FOR_BODY): Likewise.
11478         (SWITCH_COND): Likewise.
11479         (SWITCH_BODY): Likewise.
11480         (CASE_LOW): Likewise.
11481         (CASE_HIGH): Likewise.
11482         (GOTO_DESTINATION): Likewise.
11483         (COMPOUND_BODY): Likewise.
11484         (ASM_CV_QUAL): Likewise.
11485         (ASM_STRING): Likewise.
11486         (ASM_OUTPUTS): Likewise.
11487         (ASM_INPUTS): Likewise.
11488         (ASM_CLOBBERS): Likewise.
11489         (DECL_STMT_DECL): Likewise.
11490         (STMT_EXPR_STMT): Likewise.
11491         (LABEL_STMT_LABEL): Likewise.
11492         (SCOPE_BEGIN_P): Likewise.
11493         (SCOPE_END_P): Likewise.
11494         (SCOPE_STMT_BLOCK): Likewise.
11495         (SCOPE_NULLIFIED_P): Likewise.
11496         (SCOPE_NO_CLEANUPS_P): Likewise.
11497         (SCOPE_PARTIAL_P): Likewise.
11498         (ASM_VOLATILE_P): Likewise.
11499         (STMT_LINENO): Likewise.
11500         (STMT_LINENO_FOR_FN_P): Likewise.
11502         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
11503         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
11504         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
11505         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
11506         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
11508         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
11510         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
11511         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
11513         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
11514         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
11515         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
11517 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
11519         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
11520         * class.c (dfs_find_final_overrider): Set it appropriately.
11521         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
11522         avoid unneeded secondary vptrs.
11524 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
11526         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
11527         (check_bitfield_decl, check_field_decl): Likewise.
11528         (build_vtbl_or_vbase_field, build_base_field): Likewise.
11529         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
11530         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
11531         (xfer_tag, finish_enum): Likewise.
11532         * decl2.c (finish_builtin_type): Likewise.
11533         * init.c (init_init_processing): Likewise.
11534         * pt.c (instantiate_class_template): Likewise.
11535         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
11536         * cp-tree.h (struct lang_type): Add user_align member.
11537         (CLASSTYPE_USER_ALIGN): Define.
11539 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
11541         * Make-lang.in (c++.install-common): Install g++-cross in
11542         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
11543         $(target_alias)-g++ and $(target_alias)-c++.
11545 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
11547         * class.c (vcall_offset_data_s): Add last_init and fns.
11548         (overrides): Rename to same_signature_p.
11549         (dfs_find_final_overrider): Adjust accordingly.
11550         (mark_overriders): Likewise.
11551         (warn_hidden): Likewise.
11552         (build_vtbl_initializer): Reorganize machinery for building things
11553         at negative offsets.
11554         (build_vcall_and_vbase_vtbl_entries): Likewise.
11555         (build_vbase_offset_vtbl_entries): Likewise.
11556         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
11557         offset entries.  Do not create two entries for functions with the
11558         same signature.
11559         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
11560         (build_rtti_vtbl_entries): Reorganize machinery for building things
11561         at negative offsets.
11563         * optimize.c (expand_call_inline): Don't recurse into the code
11564         used to initialize the parameters more than once.
11566 2000-06-11  Mark Mitchell <mark@codesourcery.com>
11568         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
11569         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
11570         (find_substitution): Only use the `Sa' substitution for
11571         std::allocator, not instantiations of it.
11572         (write_template_prefix): Move comment.  Only use a TREE_LIST to
11573         represent substitutions for a member template.
11574         (write_array_type): Mangle array dimensions correctly.
11575         * optimize.c (maybe_clone_body): Copy more information from the
11576         cloned function.
11577         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
11578         on the regenerated declaration.
11580 2000-06-11  Chip Salzenberg  <chip@valinux.com>
11581             Mark Mitchell <mark@codesourcery.com>
11583         * class.c (build_vtable): Clarify comment.
11584         (build_ctor_vtbl_group): Pass the most derived type to
11585         build_vtable.
11587 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11589         * decl2.c (compare_options): Don't needlessly cast away const-ness.
11591 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
11593         * decl.c (add_binding): Handle duplicate declarations of external
11594         variables.
11596 2000-06-09  Chip Salzenberg  <chip@valinux.com>
11597             Mark Mitchell <mark@codesourcery.com>
11599         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
11600         argument.
11601         (write_signed_number): New macro.
11602         (write_unsigned_number): Likewise.
11603         (write_source_name): Use them.
11604         (write_number): Handle signed and unsigned values.
11605         (write_integer_cst): Use tree_int_cst_sgn, and use
11606         write_unsigned_number or write_signed_number as appropriate.
11607         (write_discriminator): Use write_unsigned_number or
11608         write_signed_number as appropriate.
11609         (write_template_arg_literal): Likewise.
11610         (write_array_type): Use tree_low_cst.
11611         (write_template_parm):  Use write_unsigned_number or
11612         write_signed_number as appropriate.
11613         (write_substitution): Adjust call to write_number.
11614         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
11615         (write_expression): Handle non-type template arguments of
11616         reference type correctly.
11617         (mangle_thunk): Use write_signed_number.
11619 2000-06-09  Chip Salzenberg  <chip@valinux.com>
11621         * mangle.c (find_substition): Don't mangle objects with typename
11622         substitutions (e.g. "cin" as "Si").
11624 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
11626         * call.c (add_candidate): Use ggc_alloc_cleared.
11627         * decl.c (lookup_label): Likewise.
11628         * lex.c (retrofit_lang_decl): Likewise.
11630 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
11632         * semantics.c (expand_body): Push to TV_EXPAND.
11633         * optimize.c (optimize_function): Push to TV_INTEGRATION.
11634         * decl.c (start_function): Always call announce_function.
11636         * tinfo2.cc: Just declare abort.
11638 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
11640         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
11641         whenever @ is a symbolic name.
11643 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
11645         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
11647 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
11649         * decl.c (pushdecl): Look up functions by DECL_NAME, not
11650         DECL_ASSEMBLER_NAME.
11652 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
11654         * decl2.c (c_language): Define.
11656 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
11658         * lex.c (lang_init_options): Tweak.
11660         * decl2.c: Remove #inclusion of diagnostic.h
11661         (lang_decode_option): Move diagnostic formatting options to
11662         toplevel.
11664         * lang-options.h: Remove documentation for diagnostic options.
11666         * Makefile.in (lex.o): Depends upon diagnostic.h
11668 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
11670         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
11671         the same DECL_RESULT, it's not a redefinition.
11672         * pt.c (tsubst_decl): Remove code to handle illegal
11673         specializations.
11675 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
11677         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
11679 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
11681         * search.c (maybe_suppress_debug_info): Don't check
11682         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
11684         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
11685         here if extern_p.
11687         Remember instantiation context in deferred instantiations.
11688         * cp-tree.h (struct tinst_level): Remove.
11689         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
11690         * pt.c (current_tinst_level): Now a tree.
11691         (print_template_context, push_tinst_level, pop_tinst_level,
11692         tinst_for_decl): Adjust.
11693         (reopen_tinst_level): New fn.
11694         (init_pt): Register current_tinst_level as a root.
11695         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
11696         of the pending templates list.
11697         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
11698         * lex.c (extract_interface_info): Adjust.
11699         * decl2.c (warn_if_unknown_interface): Adjust.
11701 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
11703         * class.c (indirect_primary_base_p): New function.
11704         (determine_primary_base): Use it.
11706 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
11708         Update new-abi dynamic cast algorithm.
11709         * tinfo.cc (__class_type_info::__dyncast_result): Add
11710         whole_details. Adjust constructor.
11711         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
11712         Avoid unnecessary searching.
11713         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
11715 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11717         * decl.c (init_decl_processing): Don't call record_component_aliases.
11718         * tree.c (build_cplus_array_type_1): Likewise.
11720 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
11722         * ir.texi: Correct typo.
11723         * mangle.c (write_expression): Handle non-type template arguments
11724         with reference type.
11725         * method.c (build_overload_value): Likewise.
11726         * pt.c (convert_nontype_argument): Explicitly represent conversion
11727         to a reference with an ADDR_EXPR.
11728         (unify): Always unify arguments in left-to-right order.
11730 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
11731             Mark Mitchell  <mark@codesourcery.com>
11733         * Make-lang.in (CXX_SRCS): Add mangle.c.
11734         * Makefile.in (CXX_OBJS): Add mangle.o.
11735         (mangle.o): New rule.
11737         * class.c (local_classes): New variable.
11738         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
11739         (get_vtt_name): Use mangle_vtt_name for new ABI.
11740         (init_class_processing): Initialize local_classes.
11741         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
11742         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
11743         (std_identifier): New macro.
11744         (DECL_VOLATILE_MEMFUNC_P): New macro.
11745         (DECL_NAMESPACE_STD_P): Likewise.
11746         (local_classes): Declare.
11747         (get_mostly_instantiated_function_type): Declare.
11748         (init_mangle): Declare.
11749         (mangle_decl): Likewise.
11750         (mangle_type_string): Likewise.
11751         (mangle_type): Likewise.
11752         (mangle_typeinfo_for_type): Likewise.
11753         (mangle_typeinfo_string_for_type): Likewise.
11754         (mangle_vtbl_for_type): Likewise.
11755         (mangle_vtt_for_type): Likewise.
11756         (mangle_ctor_vtbl_for_type): Likewise.
11757         (mangle_thunk): Likewise.
11758         (mangle_conv_op_name_for_type): Likewise.
11759         (mangle_guard_variable): Likewise.
11760         * decl.c (pushtag): Keep track of local classes.
11761         (initialize_predefined_identifiers): Initialize std_identifier.
11762         (init_decl_processing): Use std_identifier.
11763         (start_decl): Don't treat instantiations as specializations.
11764         (grokdeclarator): Likewise.
11765         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
11766         name for fully-instantiated templates.
11767         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
11768         destructors with the new ABI.
11769         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
11770         (grokfield): Use mangle_type for new ABI.
11771         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
11772         (get_sentry): Use mangle_guard_variable for new ABI.
11773         (start_static_initialization_or_destruction): Likewise.
11774         * expr.c (extract_aggr_init): Remove.
11775         (extract_scalar_init): Likewise.
11776         (extract_init): Remove #if 0'd code.
11777         * mangle.c: New function.
11778         * method.c (build_mangled_name): Assert not flag_new_abi.
11779         (build_static_name): Likewise.
11780         (build_decl_overload_real): Likewise.
11781         (build_typename_overload): Likewise.
11782         (build_overload_with_type): Likewise.
11783         (build_overload_name): Likewise.
11784         (get_ctor_vtbl_name): Likewise.
11785         (start_squangling): Likewise.
11786         (get_id_2): Likewise.
11787         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
11788         (init_method): Call init_mangle for new ABI.
11789         (make_thunk): Call mangle_thunk for new ABI.
11790         * operators.def: Correct new ABI manglings for the `%' operator.
11791         Add `::' operator.
11792         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
11793         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
11794         (lookup_template_class): Call mangle_decl for new ABI.
11795         (get_mostly_instantiated_function_type): New function.
11796         (set_mangled_name_for_template_decl): Use it.
11797         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
11798         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
11799         conversion op names.
11800         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
11801         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
11802         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
11803         mangle_typeinfo_string_for_type.
11805 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
11807         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
11808         (INNERMOST_TEMPLATE_ARGS): New macro.
11809         (innermost_args): Remove.
11810         (get_innermost_template_args): New function.
11811         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
11812         * error.c (dump_function_decl): Be caution when using
11813         most_general_template.
11814         * method.c (build_template_parm_names):  Use
11815         INNERMOST_TEMPLATE_ARGS.
11816         * pt.c (add_to_template_args): Tidy comment
11817         (get_innermost_template_args): New function.
11818         (check_explicit_specialization): Clear DECL_INITIAL for a new
11819         specialization.
11820         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
11821         Tidy.
11822         (push_template_decl): Always register specializations of the most
11823         general template.
11824         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
11825         (coerce_template_parms): Likewise.
11826         (lookup_template_class): Likewise.
11827         (innermost_args): Remove.
11828         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
11829         (tsubst_decl): Handle tricky specializations.  Use
11830         get_innermost_template_args.
11831         (instantiate_template): Simplify handling of partial
11832         instantiations.
11833         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
11834         (most_general_template): Reimplement, in a more straightforward
11835         manner.
11836         (regenerate_decl_from_template): Tweak formatting.  Use
11837         TMPL_ARGS_DEPTH for clarity.
11838         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
11840         * dump.c (dequeue_and_dump): Dump information about thunks.
11842 2000-06-01  Richard Henderson  <rth@cygnus.com>
11844         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
11846 2000-06-01  Richard Henderson  <rth@cygnus.com>
11848         * decl2.c (unsupported_options): Fix typo, make const.
11849         (lang_decode_option): Fix bsearch argument order.
11851 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
11853         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
11854         on FIELD_DECLs.
11856 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11858         * cp-tree.h (c_get_alias_set): Deleted.
11859         * Makefile.in (decl.o): Include ../expr.h.
11860         * decl.c (expr.h): Include.
11861         (init_decl_processing): Call record_component_aliases for arrays.
11862         (grokdeclarator): Likewise.
11863         Set TREE_ADDRESSABLE for fields that aren't bitfields.
11864         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
11866 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
11868         Remove guiding declaration support.
11869         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
11870         (flag_guiding_decls): Remove.
11871         * call.c (build_user_type_conversion_1): Remove support for
11872         guiding decls.
11873         (build_new_function_call): Likewise.
11874         (build_new_op): Likewise.
11875         (build_new_method_call): Likewise.
11876         * decl.c (start_function): Likewise.
11877         * friend.c (is_friend): Likewise.
11878         (do_friend): Likewise.
11879         * decl2.c ((flag_dump_translation_unit): Make it const.
11880         (flag_guiding_decls): Remove.
11881         (unsupported_options): New variable
11882         (compare_options): New function.
11883         (lang_decode_option): Use them.
11885         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
11887         * method.c (mangle_expression): Adjust test for legal expression
11888         operators.
11890         * pt.c (instantiate_decl): Save and restore the local
11891         specializations list.
11893 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
11895         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
11897 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
11899         * call.c (add_template_candidate_real): Handle member template
11900         constructors for classes with virtual bases.
11901         (build_user_type_conversion_1): Use in_charge_arg_for_name.
11902         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
11904         * ir.texi: Update thunk documentation.
11906         * call.c (joust): Fix handling of overloaded builtin operators.
11908 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
11910         * cp-tree.h (DECL_ANTICIPATED): New macro.
11911         Document new use of DECL_LANG_FLAG_7.
11912         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
11913         in the user namespace.
11914         * lex.c (do_identifier): If the identifier's declaration has
11915         DECL_ANTICIPATED on, it has not yet been declared.  But do not
11916         replace it with an ordinary implicit declaration.
11918         * tinfo2.cc: Include stdlib.h.
11920 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
11922         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
11923         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
11924         CLASSTYPE_ALIGN.
11926 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
11928         * decl2.c (lang_decode_option): Use skip_leading_substring instead
11929         of plain strncmp.
11931 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
11933         * operators.def (<?): Duplicated, should have been...
11934         (>?): this.  Fixed.
11936 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
11937             Mark Mitchell  <mark@codesourcery.com>
11939         * cp-tree.h (ansi_opname): Make it a macro.
11940         (ansi_assopname): Likewise.
11941         (struct lang_decl_flags): Add assignment_operator_p.
11942         (struct lang_decl): Add operator_code.
11943         (DECL_VTT_PARM): Adjust.
11944         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
11945         overloaded operator.
11946         (SET_OVERLOADED_OPERATOR_CODE): New macro.
11947         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
11948         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
11949         (opname_tab): Remove.
11950         (assignop_tab): Likewise.
11951         (operator_name_info_t): New type.
11952         (operator_name_info): New variable.
11953         (assignment_operator_name_info): Likewise.
11954         (build_cp_library_fn): Remove declaration.
11955         (push_cp_library_fn): Likewise.
11956         (operator_name_string): Likewise.
11957         (build_decl_overload): Likewise.
11958         * call.c (print_z_candidates): Simplify.
11959         (build_object_call): Adjust usage of ansi_opname.  Use
11960         DECL_OVERLOADED_OPERATOR_P.
11961         (op_error): Adjust operator name lookup.
11962         (build_conditional_expr): Adjust usage of ansi_opname.
11963         (build_new_op): Likewise.
11964         (build_op_delete_call): Likewise.
11965         (build_over_call): Likewise.
11966         (joust): Use DECL_OVERLOADED_OPERATOR_P.
11967         * decl.c (duplicate_decls): Copy operator_code.
11968         (init_decl_processing): Adjust parameters to push_cp_library_fn.
11969         (builtin_function): Adjust parameters to build_library_fn_1.
11970         (build_library_fn_1): Accept an overloaded operator code.
11971         (build_library_fn): Pass ERROR_MARK.
11972         (build_cp_library_fn): Accept an overloaded operator code.
11973         (push_cp_library_fn): Likewise.
11974         (grokfndecl): Tweak.
11975         (grokdeclarator): Simplify code to compute names of overloaded
11976         operators.  Adjust use of ansi_opname.
11977         (ambi_op_p): Work on tree_codes, not identifiers.
11978         (unary_op_p): Likewise.
11979         (grok_op_properties): Likewise.
11980         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
11981         (lang_mark_tree): Don't try to mark the operator_code.
11982         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
11983         * error.c (dump_decl): Remove special handling for operator
11984         names.
11985         (dump_function_name): Likewise.
11986         (dump_expr): Adjust name lookup of operators.
11987         (op_to_string): Simplify.
11988         (assop_to_string): Likewise.
11989         * init.c (build_new_1): Adjust use of ansi_opname.
11990         * lex.c (opname_tab): Remove.
11991         (assignop_tab): Likewise.
11992         (ansi_opname): Likewise.
11993         (ansi_assopname): Likewise.
11994         (operator_name_string): Likewise.
11995         (reinit_lang_specific): Likewise.
11996         (operator_name_info): New variable.
11997         (assignment_operator_name_info): Likewise.
11998         (init_operators): New function.
11999         (init_parse): Use it.
12000         (do_identifier): Adjust use of ansi_opname.
12001         * method.c (mangle_expression): Don't use ansi_opname for
12002         mangling.
12003         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
12004         (build_decl_overload): Remove.
12005         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
12006         (do_build_assign_ref): Adjust use of ansi_opname.
12007         (synthesize_method): Likewise.
12008         (implicitly_declare_fn): Likewise.
12009         * operators.def: New file.
12010         * parse.y (operator): Adjust use of ansi_opname.
12011         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
12012         (set_mangled_name_for_template_decl): Don't play games with
12013         current_namespace.
12014         (special_function_p): Adjust use of ansi_opname.
12015         * typeck.c (check_return_expr): Likewise.
12016         * Make-lang.in (cc1plus): Depend on operators.def.
12017         * Makefile.in (lex.o): Likewise.
12018         (decl.o): Likewise.
12020 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
12022         * Make-lang.in (cplib2.ready): Eradicate.
12024 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12026         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
12027         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
12028         (built_min, cp_tree_equal): Likewise.
12030 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
12032         * class.c (layout_nonempty_base_or_field): Replace
12033         `record_layout_info' with `record_layout_info_s'.
12035 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
12037         Fix goto checking.
12038         * cp-tree.h (struct language_function): x_named_labels is now
12039         a struct named_label_list*.
12040         * decl.c (struct named_label_use_list): Renamed from...
12041         (struct named_label_list): ...this.  New struct.
12042         (push_binding_level): Don't set eh_region.
12043         (note_level_for_eh): New fn.
12044         (pop_label): Take label and old value directly.
12045         (pop_labels): Adjust for new named_labels format.
12046         (lookup_label): Likewise.
12047         (poplevel): Note characteristics of a binding level containing a
12048         named label.  Mess with named label lists earlier.
12049         (mark_named_label_lists): New fn.
12050         (mark_lang_function): Call it.
12051         (use_label): New fn, split out from...
12052         (make_label_decl): ...here.  Don't call it.
12053         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
12054         check_previous_gotos): New fns, split out from...
12055         (define_label): ...here.
12056         (check_switch_goto): New fn.
12057         (define_case_label): Call it.
12058         (check_goto): New fn.
12059         * semantics.c (finish_goto_stmt): Call it and use_label.
12060         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
12061         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
12063 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
12065         * class.c (build_vtable_entry_ref): Correct usage of
12066         get_vtbl_decl_for_binfo.
12068         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
12069         * method.c (implicitly_declare_fn): Not here.
12071 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
12073         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
12074         (CPTI_PTMD_DESC_TYPE): ... here.
12075         (ptmd_desc_type_node): Rename to ...
12076         (ptm_desc_type_node): ... here.
12077         * decl.c: Likewise.
12078         * rtti.c (ptmd_initializer): Rename to ...
12079         (ptm_initializer): ... here.
12080         (sythesize_tinfo_var): Adjust. Deal with pointer to member
12081         function.
12082         (create_tinfo_types): Adjust.
12084 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
12086         Finish implementation of VTTs.
12087         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
12088         CPTI_VTT_PARM_IDENTIFIER.
12089         (vtt_parm_identifier): New macro.
12090         (vtt_parm_type): Likewise.
12091         (BINFO_SUBVTT_INDEX): Likewise.
12092         (BINFO_VPTR_INDEX): Likewise.
12093         (struct lang_decl): Add vtt_parm.
12094         (DECL_VTT_PARM): New macro.
12095         (DECL_USE_VTT_PARM): Likewise.
12096         (DECL_NEEDS_VTT_PARM_P): Likewise.
12097         (get_vtt_name): Declare.
12098         (build_artificial_parm): Likewise.
12099         (fixup_all_virtual_upcast_offsets): Likewise.
12100         (expand_indirect_vtbls_init): Remove.
12101         * call.c (build_new_method_call): Pass the vtt to subobject
12102         constructors and destructors.
12103         * class.c (get_vtt_name): Give it external linkage.
12104         (build_clone): Handle the magic VTT parameters for clones.
12105         (clone_function_decl): Fix typo in comment.
12106         (build_vtt): Keep track of the indices in the VTTs where various
12107         entities are stored.
12108         (build_vtt_inits): Likewise.
12109         (dfs_build_vtt_inits): Likewise.
12110         (build_ctor_vtbl_group): Tweak type of construction vtables.
12111         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
12112         primary bases, when building construction vtables.
12113         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
12114         (initialize_predefined_identifiers): Add vtt_parm_identifier.
12115         (init_decl_processing): Initialize vtt_parm_type.
12116         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
12117         (lang_mark_tree): Make vtt_parm.
12118         * decl2.c (build_artificial_parm): New function.
12119         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
12120         (grokclassfn): Use build_artificial_parm.
12121         * init.c (initialize_vtbl_ptrs): Call
12122         fixup_all_virtual_upcast_offsets directly.
12123         (perform_member_init): Use the complete subobject destructor for
12124         member cleanups.
12125         (build_vtbl_address): New function.
12126         (expand_virtual_init): Handle VTTs.
12127         * optimize (maybe_clone_body): Likewise.
12128         * search.c (fixup_all_virtual_upcast_offsets): Give it external
12129         linkage.
12130         (expand_indirect_vtbls_init): Remove.
12131         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
12132         * tree.c (make_binfo): Make them bigger.
12134 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
12136         * inc/cxxabi.h (__pbase_type_info): Define, based on
12137         __pointer_type_info.
12138         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
12139         (__pointer_to_member_type_info): Likewise.
12140         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
12141         (__pointer_to_member_type_info::__is_pointer_p): Remove.
12142         (__pointer_type_info::__do_catch): Rename to ...
12143         (__pbase_type_info::__do_catch): ... here. Adjust.
12144         (__pbase_type_info::__pointer_catch): Implement.
12145         (__pointer_type_info::__pointer_catch): Adjust.
12146         (__pointer_to_member_type_info::__pointer_catch): Adjust.
12148 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
12150         * tinfo.h (__user_type_info::contained_virtual_p): New
12151         predicate.
12152         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
12153         shaped hierarchy.
12154         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
12155         diamond shaped hierarchy. Add early out for mixed diamond and
12156         duplicate shaped hierarchy.
12158 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
12160         * cp-tree.h (build_delete): Change prototype.
12161         (build_vec_delete): Likewise.
12162         * call.c (build_scoped_method_call): Use special_function_kind
12163         values to indicate the kind of destruction to be done.
12164         (build_method_call): Likewise.
12165         * decl.c (finish_destructor_body): Likewise.
12166         (maybe_build_cleanup_1): Likewise.  Rename to ...
12167         (maybe_build_cleanup): ... this.
12168         * decl2.c (delete_sanity): Use special_function_kind
12169         values to indicate the kind of destruction to be done.
12170         (build_cleanup): Likewise.
12171         * init.c (perform_member_init): Likewise.
12172         (build_vec_delete_1): Likewise.
12173         (build_dtor_call): Simplify.
12174         (build_delete): Use special_function_kind
12175         values to indicate the kind of destruction to be done.
12176         (build_vbase_delete): Likewise.
12177         (build_vec_delete): Likewise.
12179         * init.c (sort_member_init): Fix typo in error message generation
12180         code.
12182 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
12184         * semantics.c (begin_class_definition): make the packed
12185         attribute be sensitive to the "-fpack-struct" command line flag
12187 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
12189         Update new-abi upcast algorithm.
12190         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
12191         prototype and meaning of return value.
12192         (__si_class_type_info::__do_upcast): Likewise.
12193         (__vmi_class_type_info::__do_upcast): Likewise.
12194         * tinfo.cc (__class_type_info::__upcast_result): Replace
12195         whole2dst with part2dst. Adjust ctor.
12196         (__class_type_info::__do_upcast): Adjust call of worker function.
12197         (__class_type_info::__do_upcast): Adjust.
12198         (__si_class_type_info::__do_upcast): Adjust. Use parent's
12199         __do_upcast.
12200         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
12201         virtual base in diamond hierarchy bug.
12203 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
12205         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
12206         and bitfield to tinfo_fn_p.
12207         (DECL_TINFO_FN_P): Adjust.
12208         (SET_DECL_TINFO_FN_P): Likewise.
12209         (DECL_MUTABLE_P): Likewise.
12210         (DECL_C_BIT_FIELD): Likewise.
12211         (SET_DECL_C_BIT_FIELD): Likewise.
12212         (CLEAR_DECL_C_BIT_FIELD): Likewise.
12213         (DECL_UNINLINABLE): Likewise.
12214         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
12215         (handle_using_decl): Remove assertion.
12216         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
12217         to build FIELD_DECLs.
12218         (build_base_field): Likewise.
12219         (layout_class_type): Likewise.
12220         * decl.c (init_decl_processing): Likewise.
12221         (build_ptrmemfunc_type): Likewise.
12222         (grokdeclarator): Likewise.
12223         * decl2.c (grok_x_components): Likewise.
12224         * except.c (call_eh_info): Likewise.
12225         * init.c (init_init_processing): Likewise.
12226         * rtti.c (expand_class_desc): Likewise.
12227         (create_pseudo_type_info): Likewise.
12228         (get_vmi_pseudo_type_info): Likewise.
12229         (create_tinfo_types): Likewise.
12230         * ptree.c (print_lang_decl): Adjust.
12231         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
12232         before checking DECL_MUTABLE_P.
12234         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
12235         parameters for template functions.
12236         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
12237         destructors as well as constructors.
12239 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
12241         * class.c (build_ctor_vtbl_group): Set inits.
12242         * optimize.c (maybe_clone_body): Set DECL_INLINE and
12243         DECL_THIS_INLINE appropriately for clones.
12245         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
12246         (DECL_CONV_FN_P): Simplify.
12247         (DECL_OPERATOR): Remove.
12248         (language_to_string): Declare.
12249         * decl.c (duplicate_decls): Fix typo in comment.
12250         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
12251         (grok_op_properties): Use DECL_CONV_FN_P instead of
12252         IDENTIFIER_TYPENAME_P.
12253         * dump.c (dequeue_and_dump): Dump the language linkage of
12254         declarations.
12255         * error.c (language_to_string): Give it external linkage.
12256         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
12257         (implicitly_declare_fn): Set DECL_LANGUAGE.
12258         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
12259         IDENTIFIER_TYPENAME_P.
12260         (tsubst_decl): Likewise.
12261         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
12262         * semantics.c (finish_member_declaration): Don't mark members of
12263         classes declared in an extern "C" region as extern "C".
12265 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12267         * decl2.c (qualified_lookup_using_namespace): Look through
12268         namespace aliases.
12270         * decl.c (push_using_decl): Return the old decl on namespace level.
12272 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
12274         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
12275         (VTT_NAME_PREFIX): New macro.
12276         (CTOR_VTBL_NAME_PREFIX): Likewise.
12277         (get_ctor_vtbl_name): New function.
12278         * class.c (get_vtable_name): Simplify.
12279         (get_vtt_name): New function.
12280         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
12281         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
12282         when a virtual base becomes primary.
12283         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
12284         VTTs.
12285         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
12286         additional parameters.
12287         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
12288         (initialize_array): New function.
12289         (build_vtt): Likewise.
12290         (build_vtt_inits): Likewise.
12291         (dfs_build_vtt_inits): Likewise.
12292         (dfs_fixup_binfo_vtbls): Likewise.
12293         (build_ctor_vtbl_group): Likewise.
12294         (initialize_vtable): Use initialize_array.
12295         (accumulate_vtbl_inits): Reimplement to handle construction
12296         vtables.
12297         (dfs_accumulate_vtbl_inits): Likewise.
12298         (bulid_vtbl_initializer): Adjust parameter name.
12299         * method.c (build_typename_overload): Remove #if 0'd code.
12300         (get_ctor_vtbl_name): New function.
12301         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
12302         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
12304         * cp-tree.h (struct lang_type): Remove search_slot.
12305         (CLASSTYPE_SEARCH_SLOT): Remove.
12306         (emit_base_init): Change prototype.
12307         (initialize_vtbl_ptrs): Likewise.
12308         (expand_indirect_vtbls_init): Likewise.
12309         (clear_search_slots): Remove.
12310         * decl.c (lang_mark_tree): Don't mark search_slot.
12311         * init.c (initialize_vtbl_ptrs): Simplify.
12312         (emit_base_init): Likewise.
12313         * search.c (struct vbase_info): Document decl_ptr.
12314         (convert_pointer_to_single_level): Remove.
12315         (dfs_find_vbases): Remove.
12316         (dfs_init_base_pointers): Simplify.
12317         (dfs_clear_vbase_slots): Remove.
12318         (dfs_vtable_path_unmark): New function.
12319         (init_vbase_pointers): Simplify.
12320         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
12321         (expand_indirect_vtbls_init): Simplify.  Don't call
12322         mark_all_temps_used.
12323         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
12324         initialize_vtbl_ptrs.
12326 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
12328         * except.c: Add static prototypes.
12330 2000-05-20  H.J. Lu  <hjl@gnu.org>
12332         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
12334 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
12336         Don't create a separate copy of virtual bases for the
12337         CLASSTYPE_VBASECLASSES list.
12338         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
12339         (BINFO_FOR_VBASE): Remove.
12340         (CANONICAL_BINFO): Adjust.
12341         (binfo_for_vbase): New function.
12342         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
12343         instead of BINFO_FOR_VBASE.
12344         (build_vbase_pointer): Likewise.
12345         (build_secondary_vtable): Likewise.
12346         (dfs_mark_primary_bases): Likewise.
12347         (mark_primary_bases): Likewise.
12348         (layout_nonempty_base_or_field): Likewise.
12349         (dfs_set_offset_for_shared_vbases): Likewise.
12350         (dfs_set_offset_for_unshared_vbases): Likewise.
12351         (layout_virtual_bases): Likewise.  Adjust for changes to the
12352         CLASSTYPE_VBASECLASSES list.
12353         (dump_class_hierarchy_r): Use binfo_for_vbase
12354         instead of BINFO_FOR_VBASE.
12355         (dump_class_hierarchy): Likewise.
12356         (finish_vtbls): Likewise.
12357         (build_vtbl_initializer): Adjust for changes to the
12358         CLASSTYPE_VBASECLASSES list.
12359         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
12360         * decl.c (finish_destructor_body): Adjust for changes to the
12361         CLASSTYPE_VBASECLASSES list.
12362         * init.c (sort_base_init): Use binfo_for_vbase.
12363         (construct_virtual_bases): Adjust for changes to the
12364         CLASSTYPE_VBASECLASSES list.
12365         (expand_member_init): Use binfo_for_vbase.
12366         (build_vbase_delete):  Adjust for changes to the
12367         CLASSTYPE_VBASECLASSES list.
12368         * method.c (do_build_copy_constructor): Likewise.
12369         * rtti.c (get_base_offset): Use binfo_for_vbase.
12370         (expand_class_desc): Remove #if 0'd code.
12371         * search.c (struct vbase_info): Remove vbase_types.
12372         (get_base_distance):  Use binfo_for_vbase.
12373         (lookup_field_queue_p): Use CANONICAL_BINFO.
12374         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
12375         (get_pure_virtuals): Adjust for changes to the
12376         CLASSTYPE_VBASECLASSES list.
12377         (dfs_find_vbases): Use binfo_for_vbase.
12378         (dfs_init_vbase_pointers): Likewise.
12379         (init_vbase_pointers): Don't initialize vi.vbase_types.
12380         (virtual_context): Use binfo_for_vbase.
12381         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
12382         CLASSTYPE_VBASECLASSES list.
12383         (expand_indirect_vtbls_init): Simplify.
12384         (dfs_get_vbase_types): Don't replicate virtual bases.
12385         (find_vbase_instance): Use binfo_for_vbase.
12386         (binfo_for_vbase): New function.
12387         * typeck.c (get_delta_difference): Use binfo_for_vbase.
12389 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
12391         * decl2.c (finish_anon_union): Generalize error messages to handle
12392         anonymous structures.
12393         * init.c (perform_member_init): Remove `name' parameter.
12394         (build_field_list): New function.
12395         (sort_member_init): Handle anonymous union initialization order
12396         correctly.  Check for multiple initializations of the same union.
12397         (emit_base_init): Don't look up fields by name here.
12398         (expand_member_init): Record the result of name lookup for future
12399         reference.
12400         * typeck.c (build_component_ref): Fix formatting.
12402 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
12404         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
12405         * typeck.c (build_x_compound_expr): Replace warn_unused with
12406         warn_unused_value.
12408         * decl2.c (lang_decode_option): Update -Wall unused flags by
12409         calling set_Wunused.
12411 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
12413         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
12414         * init.c (dfs_vtable_path_unmark): Remove.
12415         * search.c (marked_new_vtable_p): Likewise.
12416         (unmarked_new_vtable_p): Likewise.
12417         (dfs_search_slot_nonempty_p): Likewise.
12418         (dfs_mark): Likewise.
12419         (dfs_vtable_path_unmark): Likewise.
12420         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
12421         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
12422         (dfs_init_vbase_pointers): Remove special-case new ABI code.
12423         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
12424         (init_vbase_pointers): Simplify.
12425         (expand_indirect_vtbls_init): Likewise.
12427         * class.c (copy_virtuals): New function.
12428         (build_primary_table): Use it.
12429         (build_secondary_vtable): Likewise.
12430         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
12431         indicate that no vcall offset is required.
12432         (add_virtual_function): Likewise.
12433         (modify_all_vtables): Likewise.
12434         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
12435         (dfs_accumulate_vtbl_inits): Likewise.
12436         (build_vtbl_initializer): Make changes to handle construction
12437         vtables.
12438         (dfs_build_vcall_offset_vtbl_entries): Likewise.
12439         (build_rtti_vtbl_entries): Likewise.
12440         (build_vtable_entries): Handle a NULL vcall_index.
12442 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
12444         * decl2.c (lang_decode_option): Fix thinko.
12446 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
12448         * except.c (check_handlers): New fn.
12449         * cp-tree.h: Declare it.
12450         * semantics.c (finish_handler_sequence): Call it.
12451         (finish_function_handler_sequence): Likewise.
12452         (finish_handler_parms): Set TREE_TYPE on the handler.
12453         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
12454         * search.c (get_base_distance_recursive): If protect>1, ignore
12455         special access.
12456         (get_base_distance): Don't reduce watch_access.
12458 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
12460         * lex.c: #include diagnostic.h.
12461         (lang_init_options): Set default prefixing rules.
12463         * lang-options.h: Add -fdiagnostics-show-location=.
12465         * decl2.c: #include diagnostic.h.
12466         (lang_decode_option): Handle -fdiagnostics-show-location=.
12468 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
12470         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
12471         * vec.cc: Revert my 2000-05-07 change.
12473 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
12475         * class.c (check_field_decls): Complain about non-static data
12476         members with same name as class in class with constructor.
12478 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
12480         * decl.c (grokdeclarator): Allow non-static data members with
12481         same name as class.
12483 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
12485         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
12486         and pending_inline.filename.  Update prototypes.
12487         * decl.c (define_label): Constify filename parameter.
12488         * decl2.c (warn_if_unknown_interface): Constify local char *.
12489         * input.c Constify input_source.filename. Don't declare
12490         input_filename or lineno.  Constify filename parameter to feed_input.
12491         * lex.c (init_parse): Constify parameter and return value.
12492         (cp_pragma_interface, cp_pragma_implementation): Constify
12493         filename argument.
12494         (reinit_parse_for_method, reinit_parse_for_block,
12495         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
12496         Constify local char *.
12497         * pt.c: Don't declare lineno or input_filename.
12498         (print_template_context, tsubst_friend_function, tsubst_decl,
12499         tsubst, instantiate_decl): Constify local char *.
12500         * semantics.c (expand_body): Constify local char *.
12501         * tree.c (build_srcloc): Constify filename parameter.
12502         * typeck.c (c_expand_asm_operands): Constify filename
12503         parameter.
12505 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
12507         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
12508         offsetof expansion.
12510 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
12512         * inc/cxxabi.h:  Fix typos in comment.
12513         (__base_class_info::__offset): Use a static_cast.
12515 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
12517         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
12518         of std::size_t and std::ptrdiff_t respectively.
12519         * tinfo.cc: Likewise.
12520         * vec.cc: Likewise.
12522 2000-05-06  Richard Henderson  <rth@cygnus.com>
12524         * typeck.c (build_c_cast): Don't warn integer->pointer size
12525         mismatch for constants.
12527 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
12529         * rtti.c (ptmd_initializer): Set non-public, if class is
12530         incomplete.
12532         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
12533         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
12534         __cxa_vec_delete): Likewise.
12535         * tinfo.cc (__dynamic_cast): Likewise.
12536         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
12537         __cxa_vec_delete): Likewise.
12539 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
12541         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
12542         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
12543         (lang_decl_flags): Add vcall_offset.
12544         (THUNK_VCALL_OFFSET): Use it.
12545         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
12546         * method.c (make_thunk): Create the lang_decl here, not in
12547         emit_thunk.
12548         (emit_thunk): Make generic thunks into ordinary functions once
12549         they have been fed to expand_body.
12550         * semantics.c (expand_body): Set current_function_is_thunk here.
12552 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12554         * class.c (update_vtable_entry_for_fn): Prototype.
12556         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
12557         and `tmpl'.
12559         * search.c (dfs_build_inheritance_graph_order): Prototype.
12561 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
12563         * cp-tree.h (special_function_kind): Add various kinds of
12564         destructors.
12565         (special_function_p): New function.
12566         * class.c (overrides): Don't let one kind of destructor override
12567         another.
12568         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
12569         whether or not to instantiate a template.
12570         * tree.c (special_function_p): Define.
12572 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
12574         * cp-tree.def (THUNK_DECL): Remove.
12575         * cp-tree.h (DECL_THUNK_P): New macro.
12576         (DECL_NON_THUNK_FUNCTION_P): Likewise.
12577         (DECL_EXTERN_C_FUNCTION_P): Likewise.
12578         (SET_DECL_THUNK_P): Likewise.
12579         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
12580         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
12581         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
12582         * decl.c (decls_match): Use DECL_EXTERN_C_P.
12583         (duplicate_decls): Likewise.
12584         (pushdecl): Likewise.  Adjust thunk handling.
12585         (grokfndecl): Use DECL_EXTERN_C_P.
12586         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
12587         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
12588         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
12589         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
12590         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
12591         DECL_NO_STATIC_CHAIN.
12592         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
12593         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
12594         * search.c (covariant_return_p): Remove THUNK_DECL handling.
12595         * ir.texi: Update.
12597 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
12599         * tree.c (walk_tree): Set lineno.
12601 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
12603         * exception.cc: Update license notice.
12604         * new.cc: Likewise.
12605         * new1.cc: Likewise.
12606         * new2.cc: Likewise.
12607         * tinfo.cc: Likewise.
12608         * tinfo2.cc: Likewise.
12609         * vec.cc: Likewise.
12610         * inc/cxxabi.h: Likewise.
12611         * inc/exception: Likewise.
12612         * inc/new: Likewise.
12613         * inc/new.h: Likewise.
12614         * inc/typeinfo: Likewise.
12616 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
12618         * tree.c (build_target_expr_with_type): If we already have a
12619         TARGET_EXPR, just return it.
12621         * optimize.c (initialize_inlined_parameters): Don't generate an
12622         EXPR_STMT if we can just use DECL_INITIAL.
12623         * decl.c (emit_local_var): Only make the initialization a
12624         full-expression if stmts_are_full_exprs_p.
12626 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
12628         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
12629         macro.
12630         * call.c (standard_conversion): Use it.
12631         (direct_reference_binding): Likewise.
12632         (build_over_call): Likewise.
12633         (is_properly_derived_from): Likewise.
12634         (compare_ics): Likewise.
12635         * class.c (resolves_to_fixed_type_p): Likewise.
12636         * optimize.c (declare_return_variable): Likewise.
12637         * pt.c (is_specialization_of): Likewise.
12638         (unify): Likewise.
12639         * typeck.c (comp_target_parms): Likeiwse.
12640         (build_static_cast): Likewise.
12641         (build_reinterpret_cast): Likewise.
12642         (build_const_cast): Likewise.
12643         (comp_ptr_ttypes_real): Likewise.
12644         (comp_ptr_ttypes_const): Likewise.
12645         * typeck2.c (process_init_constructor): Likewise.
12647 2000-04-30  Scott Snyder <snyder@fnal.gov>
12649         * decl.c (finish_destructor_body): Use the base destructor when
12650         destroying virtual bases.
12652 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
12654         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
12655         STMT_EXPRs.
12656         * optimize.c (struct inline_data): Add target_exprs field.
12657         (declare_return_variable): When a function returns an aggregate,
12658         use the variable declared in the TARGET_EXPR as the remapped
12659         DECL_RESULT.
12660         (expand_call_inline): Update the pending target_exprs stack.
12661         (optimize_function): Initialize the stack.
12663         * decl2.c (finish_file): Fix typo in comment.
12665         * method.c (emit_thunk): Don't try to return a `void' value.
12667         * optimize.c (initialize_inlined_parameters): If the parameter is
12668         addressable, we need to make a new VAR_DECL, even if the
12669         initializer is constant.
12671 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
12673         * decl.c (grok_op_properties): Add an extra check of argtypes.
12675 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
12677         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
12678         variables.
12679         (initialize_inlined_parameters): Try to avoid creating new
12680         VAR_DECLs.
12682 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
12684         * lex.c (my_get_run_time): Remove.
12685         (init_filename_times): Use get_run_time instead of my_get_run_time.
12686         (check_newline): Likewise.
12687         (dump_time_statistics): Likewise.
12688         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
12689         of computing elapsed time explicitly.
12691 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
12693         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
12694         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
12695         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
12696         before calling decl_constant_value.
12697         * class.c (check_bitfield_decl): Likewise.
12698         * cvt.c (ocp_convert): Likewise.
12699         (convert): Likewise.
12700         * decl.c (compute_array_index_type): Likewise.
12701         (build_enumerator): Likewise.
12702         * decl2.c (check_cp_case_value): Likewise.
12703         * pt.c (convert_nontype_argument): Likewise.
12704         (tsubst): Likewise.
12705         * typeck.c (decay_conversion): Likewise.
12706         (build_compound_expr): Likewise.
12707         (build_reinterpret_cast): Likewise.
12708         (build_c_cast): Likewise.
12709         (convert_for_assignment): Likewise.
12711 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
12713         * decl.c (finish_function): Don't play games with DECL_INLINE.
12715 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
12717         * ir.texi: Correct typo.
12719 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12721         * decl.c (grokdeclarator): Reject VLAs as members.
12723 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
12725         * call.c (standard_conversion): Accept conversion between
12726         COMPLEX_TYPEs.
12728         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
12730 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
12732         * decl2.c (finish_file): Remove double setup for accounting
12733         compile time.
12735 2000-04-24  Robert Lipe <robertlipe@usa.net>
12737         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
12739 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
12741         * new.cc (set_new_handler): Needs to be in std::.
12743 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
12745         * cp-tree.h (lang_decl): Remove pretty_function_p.
12746         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
12747         language-specific node.
12748         * decl.c (cp_make_fname_decl): Use build_decl, not
12749         build_lang_decl, to build the variables.
12750         (grokvardecl): Don't call build_lang_decl for local variables in
12751         templates.
12752         (grokdeclarator): Don't call build_lang_decl for local type
12753         declarations in templates.
12754         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
12755         zero'd memory, rather than calling memset.
12756         * pt.c: Include hashtab.h.
12757         (local_specializations): New variable.
12758         (retrieve_local_specialization): Use it.
12759         (register_local_specialization): Likewise.
12760         (tsubst_decl): Don't assume local variables have
12761         DECL_LANG_SPECIFIC.
12762         (instantiate_decl): Set up local_specializations.
12763         * Makefile.in (HTAB_H): New variable.
12765 2000-04-23  Richard Henderson  <rth@cygnus.com>
12767         * typeck.c (c_expand_asm_operands): Restore the original
12768         contents of the output list.
12770 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
12772         * ir.texi:  Document complex number representation.
12774 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12776         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
12777         (target_incomplete_p): New function.
12778         (tinfo_base_init): Create comdat NTBS name variable.
12779         (ptr_initializer): Add non_public parameter. Calculate it.
12780         (ptmd_initializer): Likewise.
12781         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
12782         (create_real_tinfo_var): Add non_public parameter. Use it.
12783         Push proxy into global namespace.
12784         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
12785         New enumeration.
12786         * inc/typeinfo (type_info::before, type_info::operator==):
12787         Compare __name addresses.
12789         * tinfo2.cc: Remove new-abi builtins comment.
12791 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
12793         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
12795         * call.c (joust): Exit early if we get the same function, too.
12797         * decl2.c (key_method): Return NULL_TREE for template classes.
12798         (import_export_class): Don't need to check for template classes.
12800 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
12802         * lex.c: Remove references to cccp.c.
12804 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
12806         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
12807         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
12808         (DECL_DESTRUCTOR_P): Use destructor_attr.
12809         (DECL_CONST_MEMFUNC_P): Reimplement.
12810         (DECL_VOLATILE_MEMFUNC_P): Remove.
12811         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
12812         (overrides): Use DECL_DESTRUCTOR_P.
12813         (check_for_override): Likewise.
12814         * decl.c (start_function): Likewise.
12815         * decl2.c (grokfclassfn): Likewise.
12816         (check_classfn): Likewise.
12817         (grok_function_init): Likewise.
12819 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
12821         * decl2.c (grokfield): Issue error on illegal data member
12822         declaration.
12824 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
12826         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
12828 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
12830         * class.c (build_vtable_entry): Don't build thunks for type-info
12831         functions.
12833 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
12835         * decl.c (decls_match): Allow a redeclaration of a builtin to
12836         specify args while the builtin did not.
12838 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
12840         * cp-tree.def (THUNK_DECL): Add to documentation.
12841         * cp-tree.h (flag_huge_objects): Declare.
12842         * class.c (modify_vtable_entry): Tidy.
12843         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
12844         Calculate delta appropriately for the new ABI.
12845         (dfs_modify_vtables): Use it.
12846         (modify_all_vtables): Fix thinko in code to add overriding copies
12847         of functions to primary vtables.
12848         (build_clone): Fix typo in comment.
12849         (clone_function_decl): Correct order of destructors in vtable.
12850         (build_vbase_offset_vtbl_entries): Adjust comment.
12851         (dfs_vcall_offset_queue_p): Remove.
12852         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
12853         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
12854         (build_vtable_entry): Correct check for pure virtual functions.
12855         Don't declare flag_huge_objects.
12856         * decl.c (flag_huge_objects): Remove declaration.
12857         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
12858         Use int_size_in_bytes.
12859         (emit_thunk): Handle vcall offset thunks.
12861 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12863         * decl2.c (parse_time, varconst_time): Delete declarations.
12864         (finish_file): Delete LINENO declaration.
12865         START_TIME and THIS_TIME now long.
12867 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
12869         * class.c (build_base_field): Reformat comment.
12871         * inc/cxxabi.h (stddef.h): Comment inclusion.
12872         (__base_class_info::__offset): Comment shift.
12874 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
12876         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
12877         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
12878         (cp_push_exception_identifier): New macro.
12879         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
12880         (DECL_BASE_DESTRUCTOR_P): Likewise.
12881         (DECL_DELETING_DESTRUCTOR_P): Likewise.
12882         (get_vtbl_decl_for_binfo): Fix formatting.
12883         (in_charge_arg_for_name): New macro.
12884         (maybe_build_cleanup_and_delete): Remove declaration.
12885         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
12886         (in_charge_arg_for_name): New function.
12887         (build_new_method_call): Use it.  Handle cloned destructors.
12888         (build_clone): Don't make the base constructor virtual.
12889         Automatically defer generated functions.
12890         (clone_function_decl): Handle destructors, too.
12891         (clone_constructors_and_destructors): Likewise.
12892         (create_vtable_ptr): Don't create a vtable entry for a cloned
12893         function.
12894         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
12895         (initialize_predefined_identifiers): Update appropriately.
12896         (finish_destructor_body): Simplify.
12897         (maybe_build_cleanup_and_delete): Remove.
12898         * except.c (expand_throw): Handle new-ABI destructors.
12899         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
12900         (build_dtor_call): New function.
12901         (build_delete): Use it.  Simplify.
12902         * optimize.c (maybe_clone_body): Handle destructors.
12903         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
12905         * exception.cc (cleanup_fn): New typedef.
12906         (CALL_CLEANUP): New macro.
12907         (cp_eh_info): Use them.
12908         (__cp_push_exception): Likewise.
12909         (__cp_pop_exception): Likewise.
12911 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
12913         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
12914         (complete_dtor_identifier): New macro.
12915         (CLASSTYPE_FIRST_CONVERSION): Remove.
12916         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
12917         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
12918         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
12919         (CLASSTYPE_CONSTRUCTORS): Likewise.
12920         (CLASSTYPE_DESTRUCTORS): Likewise.
12921         (lang_decl): Add cloned_function.
12922         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
12923         (DECL_BASE_CONSTRUCTOR_P): Likewise.
12924         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
12925         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
12926         (DECL_CLONED_FUNCTION_P): Likewise.
12927         (DECL_CLONED_FUNCTION): Likewise.
12928         (clone_function_decl): Declare.
12929         (maybe_clone_body): Likewise.
12930         * call.c (build_user_type_conversion_1): Call complete object
12931         constructors in the new ABI.
12932         (build_new_method_call): Don't add in-charge parameters under the
12933         new ABI.
12934         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
12935         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
12936         CLASSTYPE_DESTRUCTOR_SLOT.
12937         (build_clone): New function.
12938         (clone_function_decl): Likewise.
12939         (clone_constructors_and_destructors): Likewise.
12940         (check_bases_and_members): Use it.
12941         * decl.c (iniitialize_predefined_identifiers): Initialize
12942         complete_dtor_identifier.
12943         (finish_function): Don't add extra code to a clone.
12944         (lang_mark_tree): Mark cloned_function.
12945         * decl2.c (mark_used): Don't bother trying to instantiate things
12946         we synthesized.
12947         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
12948         * method.c (set_mangled_name_for_decl): Don't treat clones as
12949         constructors.
12950         (synthesize_method): Sythesize cloned functions, not the clones.
12951         * optimize.c (inline_data): Update comment on ret_label.
12952         (remap_block): Don't assume DECL_INITIAL exists.
12953         (copy_body_r): Allow ret_label to be NULL.
12954         (maybe_clone_body): Define.
12955         * pt.c (tsubst_decl): Handle clones.
12956         (instantiate_clone): New function.
12957         (instantiate_template): Use it.
12958         (set_mangled_name_for_template_decl): Don't treat clones as
12959         constructors.
12960         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
12961         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
12962         * semantics.c (expand_body): Clone function bodies as necessary.
12964         * optimize.c (remap_decl): Avoid sharing structure for arrays
12965         whose size is only known at run-time.
12966         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
12968         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
12969         to has_in_charge_parm_p.
12970         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
12971         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
12972         (DECL_COPY_CONSTRUCTOR_P): New macro.
12973         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
12974         (build_user_type_conversion_1): Likewise.
12975         (convert_like_real): Likewise.
12976         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
12977         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
12978         (copy_args_p): Likewise.
12979         (grok_ctor_properties): Likewise.
12980         (start_function): Likewise.
12981         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
12982         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
12983         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
12984         * method.c (do_build_copy_constructor): Use
12985         DECL_HAS_IN_CHARGE_PARM_P.
12986         (synthesize_method): Likewise.
12987         * pt.c (instantiate_template): Remove goto.
12988         * tree.c (build_cplus_method_type): Remove mention of obstacks in
12989         comment.
12991         * cp-tre.h (finish_function): Change prototype.
12992         * decl.c (end_cleanup_fn): Adjust caller.
12993         (finish_function): Take only one parameter.
12994         * decl2.c (finish_objects): Adjust caller.
12995         (finish_static_storage_duration_function): Likewise.
12996         * method.c (emit_thunk): Likewise.
12997         * parse.y: Likewise.
12998         * parse.c: Regenerated.
12999         * pt.c (instantiate_decl): Likewise.
13000         * rtti.c (synthesize_tinfo_fn): Likewise.
13001         * semantics.c (expand_body): Likewise.
13003         * cp-tree.h (copy_decl): New function.
13004         * class.c (finish_struct_1): Use it.
13005         * lex.c (copy_decl): Define it.
13006         * pt.c (tsubst_decl): Likewise.
13007         * tree.c (copy_template_template_parm): Likewise.
13009         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
13010         has_nonpublic_assign_ref.
13011         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
13012         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
13013         * class.c (finish_struct_methods): Don't set
13014         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
13015         (interface_only): Don't declare.
13016         (interface_unknown): Likewise.
13018 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13020         * tree.h (HAVE_TEMPLATES): Remove definition.
13021         * lang-options.h (-fthis-is-variable): Remove documentation.
13023 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
13025         * class.c (instantiate_type): Handle object-relative template-id.
13027         * semantics.c (finish_expr_stmt): Call convert_to_void here.
13028         * decl.c (cplus_expand_expr_stmt): Not here.
13030         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
13031         Initialize exprtype earlier.
13033         * parse.y (fn.def1): Check for defining types in return types.
13035         * decl.c (check_tag_decl): Notice extra fundamental types.
13036         Diagnose empty decls in classes, too.
13038         * decl.c (grokdeclarator): Don't override an anonymous name if no
13039         declarator was given.
13041         * cvt.c (convert_to_void): Call resolve_offset_ref.
13043         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
13045         * decl2.c (decl_namespace): Handle getting a type.
13047         * typeck.c (build_c_cast): Re-enable warning for cast between
13048         pointer and integer of different size.
13050 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
13052         * inc/cxxabi.h (__pointer_type_info): Add restrict and
13053         incomplete flags.
13054         (__pointer_type_info::__pointer_catch): New virtual function.
13055         (__pointer_to_member_type_info): Derive from
13056         __pointer_type_info. Adjust.
13057         (__pointer_to_member_type_info::__do_catch): Remove.
13058         (__pointer_to_member_type_info::__is_pointer_p): Declare.
13059         (__pointer_to_member_type_info::__pointer_catch): Declare.
13060         * rtti.c (qualifier_flags): Add restrict flag.
13061         (ptmd_initializer): Reorder members.
13062         (create_tinfo_types): Expand comments. Reorder
13063         ptmd_desc_type_node members.
13064         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
13065         Implement.
13066         (__pointer_type_info::__do_catch): Move specific code into
13067         __pointer_catch. Call it.
13068         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
13069         specific catch checking. Fix void conversion check.
13070         (__pointer_to_member_type_info::__do_catch): Remove.
13071         (__pointer_to_member_type_info::__pointer_catch): Implement.
13073 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13075         * lex.c (init_parse): Remove traces of classof and headof.
13076         * decl2.c (flag_operator_names): Default to 1.
13077         (lang_decode_option): Do not set it for -ansi.
13079 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
13081         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
13082         (DECL_MAIN_VARIANT): Remove.
13083         * decl.c (duplicate_decls): Don't set it.
13084         (start_function): Likewise.
13085         (lang_mark_tree): Don't mark it.
13086         * decl2.c (defer_fn): Don't use it.
13087         * lex.c (retrofit_lang_decl): Don't set it.
13088         * pt.c (tsubst_decl): Likewise.
13089         * ptree.c (print_lang_decl): Don't print it.
13090         * typeck.c (mark_addressable): Don't use it.
13092 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
13094         * vec.cc: Include <new> and <exception>.
13095         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
13096         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
13097         terminate.
13098         (__cxa_vec_delete): Catch dtor exceptions.
13100 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
13102         Prepend __ to implementation defined names.
13103         * inc/typeinfo (type_info): Rename _name to __name.
13104         (type_info::type_info): Rename parameter.
13105         (type_info::operator==, type_info::operator!=,
13106         type_info::before): Likewise.
13107         (type_info::is_pointer_p, type_info::is_function_p,
13108         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
13109         parameters.
13110         * inc/cxxabi.h
13111         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
13112         (__pointer_type_info::__pointer_type_info): Likewise.
13113         (__pointer_type_info::is_pointer_p,
13114         __pointer_type_info::do_catch): Prepend __. Rename parameters.
13115         (__array_type_info::__array_type_info): Rename parameters.
13116         (__function_type_info::__function_type_info): Likewise.
13117         (__function_type_info::is_function_p): Prepend __.
13118         (__enum_type_info::__enum_type_info): Rename parameters.
13119         (__pointer_to_member_type_info::__pointer_to_member_type_info):
13120         Likewise.
13121         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
13122         parameters.
13123         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
13124         (__class_type_info::__class_type_info): Rename parameters.
13125         (__class_type_info::sub_kind): Prepend __. Adjust member names.
13126         (__class_type_info::upcast_result,
13127         __class_type_info::dyncast_result): Prepend __. Move definition
13128         into tinfo.cc.
13129         (__class_type_info::do_upcast, __class_type_info::do_catch,
13130         __class_type_info::find_public_src,
13131         __class_type_info::do_dyncast,
13132         __class_type_info::do_find_public_src): Prepend __. Rename
13133         parameters.
13134         (__si_class_type_info::__si_class_type_info): Rename parameters.
13135         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
13136         __si_class_type_info::do_find_public_src): Prepent __. Rename
13137         parameters.
13138         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
13139         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
13140         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
13141         parameters.
13142         (__dynamic_cast): Rename parameters.
13143         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
13144         type_info::do_catch, type_info::do_upcast): Prepend __.
13145         (contained_p, public_p, virtual_p, contained_public_p,
13146         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
13147         (__class_type_info::do_catch,
13148         __class_type_info::do_upcast): Prepend __. Adjust.
13149         (__class_type_info::__upcast_result,
13150         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
13151         Adjust.
13152         (__class_type_info::find_public_src): Prepend __. Adjust.
13153         (__class_type_info::do_find_public_src,
13154         __si_class_type_info::do_find_public_src,
13155         __vmi_class_type_info::do_find_public_src): Likewise.
13156         (__class_type_info::do_dyncast,
13157         __si_class_type_info::do_dyncast,
13158         __vmi_class_type_info::do_dyncast): Likewise.
13159         (__class_type_info::do_upcast,
13160         __si_class_type_info::do_upcast,
13161         __vmi_class_type_info::do_upcast): Likewise.
13162         (__dynamic_cast): Adjust.
13163         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
13164         (__function_type_info::is_function_p): Likewise.
13165         (__pointer_type_info::do_catch): Likewise. Adjust.
13166         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
13167         (__throw_type_match_rtti_2): Adjust.
13168         (__is_pointer): Adjust.
13170 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
13172         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
13173         (complete_ctor_identifier): New macro.
13174         (special_function_kind): Add sfk_copy_constructor and
13175         sfk_assignment_operator.
13176         (LOOKUP_HAS_IN_CHARGE): Remove.
13177         (cons_up_default_function): Rename to ...
13178         (implicitly_declare_fn): ... this.
13179         * call.c (build_new_method_call): Add in-charge parameters for
13180         constructors here.
13181         * class.c (add_implicitly_declared_members): Change parameter name
13182         from cant_have_assignment to cant_have_const_assignment.
13183         Replace calls to cons_up_default_function to implicitly_declare_fn.
13184         * cvt.c (ocp_convert): Use complete_ctor_identifier.
13185         * decl.c (initialize_predefined_identifiers): Initialize it.
13186         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
13187         complex expression.
13188         * init.c (expand_default_init): Don't calculate the in-charge
13189         parameter here.
13190         (build_new_1): Likewise.
13191         * lex.c (cons_up_default_function): Move to method.c.
13192         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
13193         (implicitly_declare_fn): New function.
13194         * typeck.c (build_static_cast): Use complete_ctor_identifier.
13195         (build_modify_expr): Likewise.
13196         * typeck2.c (build_functional_cast): Likewise.
13198         Under the new ABI, constructors don't return `this'.
13199         * cp-tree.h (warn_reorder): Declare.
13200         (special_function_kind): New enum.
13201         (global_base_init_list): Remove declaration.
13202         (emit_base_init): Don't return a value.
13203         (check_base_init): Don't declare.
13204         (is_aggr_typedef): Likewise.
13205         * decl.c (check_special_function_return_type): New function.
13206         (return_types): Remove.
13207         (grokdeclarator): Use check_special_function_return_type.
13208         (start_function): Don't initialize ctor_label under the new ABI.
13209         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
13210         * init.c (begin_init_stmts): Move to top of file.
13211         (finish_init_stmts): Likewise.
13212         (warn_reorder): Don't declare.
13213         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
13214         value.
13215         (check_base_init): Remove.
13216         (is_aggr_typedef): Likewise.
13217         (build_new_1): Don't use the return value of a constructor.
13218         * semantics.c (setup_vtbl_ptr): Don't use the return value
13219         of emit_base_init.
13220         * typeck.c (check_return_expr): Don't magically convert return
13221         statements into `return this' in constructors under the new ABI.
13223         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
13224         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
13225         (base_ctor_identifier): New macro.
13226         (base_dtor_identifier): Likewise.
13227         (deleting_dtor_identifier): Likewise.
13228         * decl.c: Don't include obstack.h.
13229         (obstack_chunk_alloc): Don't define.
13230         (obstack_chunk_free): Likewise.
13231         (struct predefined_identifier): New type.
13232         (initialize_predefined_identifiers): New function.
13233         (init_decl_processing): Use it.
13234         (debug_temp_inits): Remove.
13235         (start_method): Don't call preserve_data.
13236         (hack_incomplete_structures): Update comment.
13237         * init.c (init_init_processing): Don't initialize
13238         nelts_identifier.
13239         (build_offset_rf): Remove dead code.
13240         (build_delete): Use CLASSTYPE_N_BASECLASSES.
13241         * search.c (init_search_processing): Don't initialize
13242         vptr_identifier.
13244 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13246         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
13247         some sign_compare warnings.
13249 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
13251         Rename abi::__vmi_class_type_info members.
13252         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
13253         base_list, detail_masks members to vmi_flags, vmi_base_count,
13254         vmi_bases and vmi_flags_masks respectively.
13255         (__vmi_class_type_info::vmi_flags_masks): Rename
13256         details_unknown_mask to flags_unknown_mask.
13257         * tinfo.cc (__class_type_info::do_upcast): Adjust.
13258         (__vmi_class_type_info::do_find_public_src): Adjust.
13259         (__vmi_class_type_info::do_dyncast): Adjust.
13260         (__vmi_class_type_info::do_upcast): Adjust.
13262 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
13264         * tinfo.cc (convert_to_base): New function.
13265         (get_vbase_offset): Remove. Move into convert_to_base.
13266         (__vmi_class_type_info::do_find_public_src): Adjust.
13267         (__vmi_class_type_info::do_dyncast): Adjust.
13268         (__vmi_class_type_info::do_upcast): Adjust.
13270 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
13272         * tinfo.cc (operator=): Use __builtin_strcmp.
13273         * tinfo2.cc (before): Likewise.
13275 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
13277         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
13278         (DECL_SAVED_INLINE): Rename to ...
13279         (DECL_DEFERRED_FN): ... this.
13280         (in_function_p): Remove declaration.
13281         (mark_inline_for_output): Rename to ...
13282         (defer_fn): ... this.
13283         * decl.c (finish_function): Adjust call to mark_inline_for_output.
13284         (in_function_p): Remove definition.
13285         * decl2.c (saved_inlines): Rename to ...
13286         (deferred_fns): ... this.
13287         (saved_inlines_used): Rename to ...
13288         (deferred_fns_used): ... this.
13289         (mark_inline_for_output): Rename to ...
13290         (defer_fn): ... this.
13291         (finish_file): Adjust accordingly.
13292         (init_decl2): Likewise.
13293         * lex.c (cons_up_default_function): Likewise.
13294         * pt.c (mark_decl_instantiated): Likewise.
13295         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
13296         circumstances.
13297         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
13298         * semantics.c (expand_body): Defer more functions.
13300 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
13302         * vec.cc: New file.
13303         * Make-lang.in (CXX_LIB2FUNCS): Add it.
13304         (vec.o): Build it.
13305         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13306         __cxa_vec_delete): Declare.
13308 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
13310         * rtti.c (dfs_class_hint_mark): New static function.
13311         (dfs_class_hint_unmark): New static function.
13312         (class_hint_flags): Use them.
13314 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
13316         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
13318 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
13320         * cp-tree.h (instantiate_decl): Change prototype.
13321         * decl2.c (mark_used): Adjust call.
13322         * optimize.c (inlinable_function_p): Adjust handling of templates.
13323         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
13324         (do_type_instantiation): Likewise.
13325         (instantiate_decl): Defer more templates.
13326         (instantiate_pending_templates): Adjust logic to handle inline
13327         friend functions.
13329         * Makefile.in (GGC_H): New variable.  Use it throughout in place
13330         of ggc.h.
13332         * call.c: Don't include obstack.h.  Include ggc.h.
13333         (obstack_chunk_alloc): Don't define.
13334         (obstack_chunk_free): Likewise.
13335         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
13336         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
13337         (pop_switch): Free it.
13339         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
13341         * dump.c (dequeue_and_dump): Don't try to print the bit_position
13342         if we don't have a DECL_FIELD_OFFSET.
13344 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
13346         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
13347         special_function_p.
13349 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13351         * cfns.gperf (hash, libc_name_p): Prototype.
13353         * rtti.c (build_dynamic_cast_1): Constification.
13355         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
13357         * semantics.c (deferred_type_access_control): Prototype.
13359 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
13361         Correct many new ABI issues regarding vbase and vcall offset
13362         layout.
13363         * cp-tree.h (BINFO_VTABLE): Document.
13364         (struct lang_type): Tweak formatting.
13365         (BINFO_PRIMARY_BINFO): Add to documentation.
13366         (CLASSTYPE_VSIZE): Fix typo in comment.
13367         (CLASSTYPE_VBASECLASSES): Update documentation.
13368         (BINFO_VBASE_MARKED): Remove.
13369         (SET_BINFO_VBASE_MARKED): Likewise.
13370         (CLEAR_BINFO_VBASE_MARKED): Likewise.
13371         (BINFO_FIELDS_MARKED): Remove.
13372         (SET_BINFO_FIELDS_MARKED): Likewise.
13373         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
13374         (enum access_kind): New enumeration.
13375         (num_extra_vtbl_entries): Remove declaration.
13376         (size_extra_vtbl_entries): Likewise.
13377         (get_vtbl_decl_for_binfo): New function.
13378         (dfs_vbase_unmark): Remove declaration.
13379         (mark_primary_bases): Likewise.
13380         * class.c (SAME_FN): Remove.
13381         (struct vcall_offset_data_s): Move definition.
13382         (build_vbase_pointer): Use `build', not `build_binary_op', to
13383         access the vbase pointer under the new ABI.
13384         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
13385         (build_primary_vtable): Likewise.
13386         (dfs_mark_primary_bases): Move here from search.c.
13387         (mark_primary_bases): Likewise.
13388         (determine_primary_bases): Under the new ABI, don't make a base
13389         class a primary base just because we don't yet have any virtual
13390         functions.
13391         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
13392         (num_vfun_entries): Remove.
13393         (dfs_count_virtuals): Likewise.
13394         (num_extra_vtbl_entries): Likewise.
13395         (size_extra_vtbl_entries): Likewise.
13396         (layout_virtual_bases): Iterate in inheritance graph order under
13397         the new ABI.
13398         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
13399         indicate that a vfield is present.
13400         (init_class_processing): Initialize access_public_node, etc., from
13401         ak_public, etc.
13402         (get_vtbl_decl_for_binfo): New function.
13403         (dump_class_hierarchy_r): Likewise.
13404         (dump_class_hierarchy): Use it.
13405         (finish_vtbls): Build the vtbls in inheritance graph order.
13406         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
13407         (initialize_vtable): Use get_vtbl_decl_for_binfo.
13408         (accumulate_vtbl_inits): Add comments explaining why a pre-order
13409         walk is required.
13410         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
13411         where the vptr points, even for primary vtables.
13412         (build_vtbl_initializer): Adjust handling of vbase and vcall
13413         offsets.
13414         (build_vcall_and_vbase_vtable_entries): New function.
13415         (dfs_build_vbase_offset_vtbl_entries): Remove.
13416         (build_vbase_offset_vtbl_entries): Reimplement.
13417         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
13418         were already handled in a primary base class vtable.
13419         (build_vcall_offset_vtbl_entries): Adjust.
13420         (build_rtti_vtbl_entries): Adjust.
13421         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
13422         * init.c (expand_virtual_init): Simplify.
13423         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
13424         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
13425         * search.c (BINFO_ACCESS): New macro.
13426         (SET_BINFO_ACCESS): Likewise.
13427         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
13428         (access_in_type): Likewise.
13429         (dfs_accessible_p): Likewise.
13430         (protected_accessible_p): Likewise.
13431         (lookup_fnfields_1): Adjust documentation.
13432         (dfs_mark_primary_bases): Move to class.c
13433         (mark_primary_bases): Likewise.
13434         (dfs_vbase_unmark): Remove.
13435         (virtual_context): Use BINFO_FOR_VBASE.
13436         (dfs_get_vbase_types): Simplify.
13437         (dfs_build_inheritance_graph_order): New function.
13438         (get_vbase_types): Use it.
13439         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
13441         * tinfo.cc (get_vbase_offset): New function.
13442         (__vmi_class_type_info::do_find_public_src): Use it.
13443         (__vmi_class_type_info::do_dyncast): Likewise.
13444         (__vmi_class_type_info::do_upcast): Likewise.
13446 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
13448         * lang-specs.h: Pass -fno-show-column to the preprocessor.
13450 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
13452         * rtti.c (class_hint_flags): Rename flags.
13453         (class_initializer): Remove flags.
13454         (synthesize_tinfo_var): Combine offset and flags. Add flags
13455         for __vmi_class_type_info.
13456         (create_tinfo_types): Remove flags from __class_type_info and
13457         __si_class_type_info. Merge flags and offset from
13458         base_class_type_info.
13459         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
13460         (__base_class_info::is_virtual_p): Adjust.
13461         (__base_class_info::is_public_p): Adjust.
13462         (__base_class_info::offset): New accessor.
13463         (__class_type_info::details): Remove member.
13464         (__class_type_info::__class_type_info): Lose details.
13465         (__class_type_info::detail_masks): Remove.
13466         (__si_class_type_info::__si_class_type_info): Lose details.
13467         (__vmi_class_type_info::details): New member.
13468         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
13469         (__vmi_class_type_info::detail_masks): New member.
13470         * tinfo.cc (__class_type_info::do_upcast): Initialize result
13471         with unknown_details_mask.
13472         (__vmi_class_type_info::do_find_public_src): Adjust
13473         (__vmi_class_type_info::do_dyncast): Adjust.
13474         (__vmi_class_type_info::do_upcast): Set result details, if
13475         needed. Adjust.
13476         (__dynamic_cast): Temporarily #if out optimization.
13478 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
13480         * rtti.c (get_tinfo_decl): Mark used.
13481         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
13482         mark as dealt with, if we output it.
13484 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
13486         * class.c: Reorganize to put virtual function table initialization
13487         machinery at the end of the file.
13489 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
13491         * class.c (finish_struct): Use bitsize_zero_node.
13492         * pt.c (instantiate_class_template): Likewise.
13494 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
13496         Put RTTI entries at negative offsets in new ABI.
13497         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
13498         vbase offset at index -3, not -1.
13499         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
13500         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
13501         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
13502         (build_rtti_vtbl_entries): New function.
13503         (set_rtti_entry): Remove.
13504         (build_primary_vtable): Don't use it.
13505         (build_secondary_vtable): Likewise.
13506         (start_vtable): Remove.
13507         (first_vfun_index): New function.
13508         (set_vindex): Likewise.
13509         (add_virtual_function): Don't call start_vtable.  Do call
13510         set_vindex.
13511         (set_primary_base): Rename parameter.
13512         (determine_primary_base): Likewise.
13513         (num_vfun_entries): Don't use skip_rtti_stuff.
13514         (num_extra_vtbl_entries): Include RTTI information.
13515         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
13516         (skip_rtti_stuff): Remove.
13517         (dfs_modify_vtables): Don't use it.
13518         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
13519         (layout_nonempty_base_or_field): Update size handling.
13520         (create_vtable_ptr): Tweak.
13521         (layout_class_type): Adjust parameter names.
13522         (finish_struct_1): Simplify.
13523         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
13524         (skip_rtti_stuff): Remove.
13525         (first_vfun_index): New function.
13526         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
13527         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
13528         (marked_vtable_pathp): Declare.
13529         (unmarked_vtable_pathp): Likewise.
13530         * error.c (dump_expr): Use first_vfun_index to calculate vtable
13531         offsets.
13532         * rtti.c (build_headof): Look for RTTI at negative offsets.
13533         (get_tinfo_decl_dynamic): Likewise.
13534         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
13535         here.
13536         (create_pseudo_type_info): Do it here instead.  Adjust so that
13537         vptr points at first virtual function.
13538         * search.c (marked_vtable_pathp): Make it global.
13539         (unmarked_vtable_pathp): Likewise.
13540         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
13541         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
13542         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
13543         (get_pure_virtuals): Likewise.
13544         (expand_upcast_fixups): Likewise.
13545         * tree.c (debug_binfo): Likewise.
13546         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
13547         negative offset.
13549 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13551         * class.c (check_field_decl): Fix typo.
13552         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
13553         (check_methods): Likewise.
13554         (check_field_decls): Likewise.
13555         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
13556         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
13557         Use DECL_RESULT_FLD, not DECL_RESULT.
13558         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
13559         * lex.c (identifier_type): Likewise.
13560         * pt.c (determine_specialization, lookup_template_class): Likewise.
13561         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
13562         (resolve_overloaded_unification, more_specialized): Likewise.
13563         * semantics.c (finish_member_declaration): Likewise.
13564         * typeck.c (build_x_function_call): Likewise.
13566 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
13568         * class.c (layout_empty_base): Handle empty bases with non-byte
13569         alignment.
13570         (build_base_field): Likewise.
13571         (layout_virtual_bases): Likewise.
13573         * class.c (finish_struct_1): Fix typo in this change:
13575         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13577 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
13579         * decl.c (grokdeclarator): Count partial specializations when
13580         keeping track of how many template classes have been seen.
13582         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
13584 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13586         * class.c (build_vbase_pointer_fields): layout_field now place_field.
13587         (get_vfield_offset): Use byte_position.
13588         (set_rtti_entry): Set OFFSET to ssizetype zero.
13589         (get_binfo_offset_as_int): Deleted.
13590         (dfs_record_base_offsets): Use tree_low_cst.
13591         (dfs_search_base_offsets): Likewise.
13592         (layout_nonempty_base_or_field): Reflect changes in RLI format
13593         and call byte_position.
13594         (layout_empty_base): Convert offset to ssizetype.
13595         (build_base_field): use rli_size_unit_so_far.
13596         (dfs_propagate_binfo_offsets): Do computation in proper type.
13597         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
13598         (layout_class_type): Reflect changes in RLI names and fields.
13599         (finish_struct_1): Set DECL_FIELD_OFFSET.
13600         * dump.c (dequeue_and_dump): Call bit_position.
13601         * expr.c (cplus_expand_constant): Use byte_position.
13602         * rtti.c (expand_class_desc): Use bitsize_one_node.
13603         * typeck.c (build_component_addr): Use byte_position and don't
13604         special case for zero offset.
13606 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
13608         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
13610         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
13611         tinfo object.
13612         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
13613         vtable.
13615 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13617         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
13618         DECL_P macros.
13619         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
13620         make_typename_type, check_initializer, cp_finish_decl,
13621         xref_tag): Likewise.
13622         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
13623         decl_namespace, arg_assoc_template_arg, arg_assoc,
13624         validate_nonmember_using_decl, do_class_using_decl): Likewise.
13625         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
13626         args_to_string): Likewise.
13627         * friend.c (is_friend): Likewise.
13628         * lex.c (note_got_semicolon, note_list_got_semicolon,
13629         is_global): Likewise.
13630         * method.c (build_overload_nested_name, build_overload_value,
13631         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
13632         * parse.y (typename_sub, typename_sub1): Likewise.
13633         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
13634         process_partial_specialization, convert_template_argument,
13635         template_args_equal, add_pending_template, lookup_template_class,
13636         for_each_template_parm_r, maybe_fold_nontype_arg,
13637         tsubst, instantiate_template, type_unification_real, unify,
13638         instantiate_pending_templates, set_mangled_name_for_template_decl):
13639         Likewise.
13640         * repo.c (repo_get_id, repo_template_used): Likewise.
13641         * search.c (lookup_field_1): Likewise.
13642         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
13643         * xref.c (classname): Likewise.
13645 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
13647         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
13648         (CANONICAL_BINFO): New macro.
13649         (BINFO_NEW_VTABLE_MARKED): Use it.
13650         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
13651         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
13652         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
13653         not TREE_TYPE.
13654         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13655         (build_secondary_vtable): Likewise.
13656         (dfs_finish_vtbls): Likewise.
13657         (dfs_accumulate_vtbl_inits): Likewise.
13658         (accumulate_vtbl_inits): New function.
13659         (finish_vtbls): Make sure that virtual bases come after
13660         non-virtual bases in the vtable group.
13661         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
13662         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13663         * search.c (struct vbase_info): Move definition.
13664         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13665         (unmarked_new_vtable_p): Likewise.
13666         (dfs_mark_vtable_path): Remove.
13667         (dfs_mark_new_vtable): Remove.
13668         (dfs_unmark_new_vtable): Likewise.
13669         (dfs_clear_search_slot): Likewise.
13670         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
13671         (dfs_clear_vbase_slots): Likewise.
13672         (init_vbase_pointers): LIkewise.
13674 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
13676         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
13677         SIZETYPE to a non-SIZETYPE.
13679 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
13681         * class.c (layout_virtual_bases): Adjust names in conditionally
13682         compiled code.
13684         * class.c (record_base_offsets): New function.
13685         (layout_conflict_p): Likewise.
13686         (layout_nonempty_base_or_field): Use it.
13687         (layout_empty_base): New function.
13688         (build_base_field): Use it.
13689         (build_base_fields): Update comment.
13690         (layout_virtual_bases): Fold in a little code form
13691         layout_basetypes.  Use layout_empty_base.
13692         (layout_basetypes): Remove.
13693         (end_of_class): New function.
13694         (layout_class_type): Use it.  Adjust.
13696         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
13697         (fntype_p): Remove.
13698         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
13699         comment.
13700         (dfs_skip_nonprimary_vbases_markedp): Likewise.
13701         * typeck.c (fntype_p): Remove.
13703         * cp-tree.h (TI_SPEC_INFO): Remove.
13704         (CLASSTYPE_TI_SPEC_INFO): Likewise.
13705         * pt.c (process_partial_specialization): Likewise.
13707         * class.c (build_base_field): Fix thinko in computation of binfo
13708         offsets.
13710         * tree.c (mark_local_for_remap_p): Mark variables declared in
13711         TARGET_EXPRs as well.
13713 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
13715         * typeck.c (require_complete_type, complete_type,
13716         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
13717         build_array_ref, convert_arguments, pointer_diff,
13718         build_x_unary_op, build_unary_op, build_c_cast,
13719         build_modify_expr): Use COMPLETE_TYPE_P etc.
13720         * call.c (is_complete, convert_like_real,
13721         build_new_method_call): Likewise.
13722         * class.c (build_vbase_pointer_fields, check_bases,
13723         build_base_field, finish_struct_1, pushclass): Likewise.
13724         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
13725         * decl.c (maybe_process_template_type_declaration, pushtag,
13726         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
13727         layout_var_decl, check_initializer, cp_finish_decl,
13728         grokdeclarator, require_complete_types_for_parms,
13729         grok_op_properties, xref_tag, xref_basetypes,
13730         check_function_type): Likewise.
13731         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
13732         * friend.c (do_friend): Likewise.
13733         * init.c (build_offset_ref): Likewise.
13734         * parse.y (structsp): Likewise.
13735         * pt.c (maybe_process_partial_specialization,
13736         tsubst_friend_function, instantiate_class_template, tsubst,
13737         do_type_instantiation, instantiate_pending_templates): Likewise.
13738         * repo.c (repo_get_id): Likewise.
13739         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
13740         synthesize_tinfo_var, emit_support_tinfos): Likewise.
13741         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
13742         * semantics.c (begin_class_definition): Likewise.
13743         * tree.c (build_cplus_method_type): Likewise.
13744         * typeck2.c (digest_init, build_functional_cast,
13745         add_exception_specifier): Likewise.
13746         * parse.h, parse.c: Regenerated.
13748 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
13750         * inc/cxxabi.h: New header file. Define new-abi entry points.
13751         (__pointer_type_info::target): Rename member to ...
13752         (__pointer_type_info::type): ... here.
13753         (__base_class_info::type): Rename member to ...
13754         (__base_class_info::base): ... here.
13755         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
13756         * cp-tree.h (CPTI_ABI): New global tree enumeration.
13757         (abi_node): New global tree node.
13758         * decl.c (abi_node): Document.
13759         (init_decl_processing): Initialize abi_node.
13760         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
13761         (get_vmi_pseudo_type_info): Likewise.
13762         (create_tinfo_types): Likewise.
13763         (emit_support_tinfos): Likewise.
13764         * tinfo.h (cxxabi.h): Include for new-abi.
13765         Move rtti class definitions to new header file.
13766         * tinfo.cc (abi): Use the namespace.
13767         (std): Move new abi rtti classes from here ...
13768         (__cxxabiv1): ... to here.
13769         * tinfo2.cc (cxxabi.h): Include for new-abi.
13770         Move rtti class definitions to new header file.
13771         (std): Move new abi rtti classes from here ...
13772         (__cxxabiv1): ... to here.
13773         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
13774         namespace.
13776 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
13777             Jason Merrill  <jason@casey.cygnus.com>
13779         * method.c (build_overload_int): Use host_integerp.
13781 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13783         * init.c (build_offset_ref): Handle the case of a templated member
13784         function.
13786 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13788         * except.c (expand_exception_blocks): Clear catch_clauses_last.
13790 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
13792         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
13793         * class.c (check_bitfield_decl): Turn illegal bitfields into
13794         non-bitfields.
13795         (dfs_propagate_binfo_offsets): Adjust for new size_binop
13796         semantics.
13797         (dfs_offset_for_unshared_vbases): Likewise.
13798         * cvt.c (cp_convert_to_pointer): Convert NULL to a
13799         pointer-to-member correctly under the new ABI.
13800         * expr.c (cplus_expand_constant): Don't use cp_convert when
13801         turning an offset into a pointer-to-member.
13802         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
13803         when dereferencing them under the new ABI.
13804         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
13805         of pointers-to-members under the new ABI.
13807         * class.c (check_bitfield_decl): Remove restriction on really long
13808         bitfields.
13809         (layout_class_type): Implement new ABI handling of bitfields
13810         longer than their types.
13812 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13814         * parse.y (extdefs): Call ggc_collect.
13815         * parse.c: Regenerated.
13817 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
13819         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
13820         (note_name_declared_in_class): Use OVL_CURRENT to get at a
13821         potential overload.
13823 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13825         * class.c (build_vbase_path): Use integer_zerop.
13826         (build_vtable_entry): Use tree_low_cst.
13827         (get_vfield_offset): Use bit_position.
13828         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
13829         Use tree_low_cst.
13830         (check_bitfield_decl): Set DECL_SIZE using convert.
13831         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
13832         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
13833         Use tree_low_cst.
13834         (finish_struct_1): Use bit_position.
13835         (dump_class_hierarchy): Use tree_low_cst.
13836         * cp-tree.h (min_precision): Add declaration.
13837         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
13838         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
13839         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
13840         * expr.c (cplus_expand_constant): Use bit_position.
13841         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
13842         * rtti.c (get_base_offset): Use bit_position.
13843         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
13844         host_integerp, and tree_low_cst.
13845         (pointer_int_sum): Use integer_zerop.
13846         (build_component_addr): Use bit_position.
13848 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
13850         * typeck.c (require_complete_type): Don't assume size_zero_node.
13851         (complete_type_or_else): Likewise.
13853 2000-03-16  Steven Grady <grady@digitaldeck.com>
13854             Jason Merrill  <jason@casey.cygnus.com>
13856         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
13858 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
13860         * decl2.c (grokfield): Bail out if type is error_mark_node.
13862 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
13864         * tinfo2.cc (__ptr_to_member_data): Rename to ...
13865         (__pointer_to_member_data): ... here. Adjust.
13866         * rtti.c (create_tinfo_types): Adjust.
13868 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
13870         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
13871         * decl.c (ref_desc_type_node): Undocument.
13872         * rtti.c (ptr_ref_initializer): Rename to ...
13873         (ptr_initializer): ... here. Adjust comments.
13874         (ptmd_initializer): Fix comment thinko.
13875         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
13876         (create_tinfo_types): Remove ref_desc_type_node init.
13877         * tinfo2.cc (__reference_type_info): Remove.
13879 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
13881         * decl.c (cp_finish_decl): Remove obsolete comment.
13883         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
13885 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
13887         * cp-tree.h: Tweak documentation.
13888         * class.c (build_vbase_pointer_fields): Layout the fields, too.
13889         (avoid_overlap): Remove.
13890         (get_binfo_offset_as_int): New function.
13891         (dfs_serach_base_offsets): Likewise.
13892         (layout_nonempty_base_or_field): Likewise.
13893         (build_base_field): Layout fields here.  Avoid placing two objects
13894         of the same type at the same address, under the new ABI.
13895         (build_base_fields): Adjust accordingly.
13896         (create_vtable_ptr): Return the new field, but don't attach it to
13897         TYPE_FIELDS.
13898         (remove_base_field): Remove.
13899         (remove_base_fields): Remove.
13900         (layout_basetypes): Adjust accordingly.
13901         (layout_class_type): Call layout_field for each field, rather than
13902         just making a wholesale call to layout_type.
13904 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
13906         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
13908 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
13910         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
13912         * except.c (dtor_nothrow): New fn.
13913         (do_pop_exception): Use it.  Take type parm.
13914         (push_eh_cleanup): Take type parm.
13915         (expand_start_catch_block): Pass it.
13916         (build_eh_type_type_ref): Accept null type.
13918 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
13920         * cp-tree.h (revert_static_member_fn): Change prototype.
13921         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
13922         (grok_op_properties): Likewise.
13923         (start_function): Likewise.
13924         (revert_static_member_fn): Simplify.
13925         * pt.c (check_explicit_specialization): Adjust call to
13926         revert_static_member_fn.
13928 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
13930         * cp-tree.h (scope_kind): New type.
13931         (tmpl_spec_kind): Likewise.
13932         (declare_pseudo_global_level): Remove.
13933         (pseudo_global_level_p): Rename to template_parm_scope_p.
13934         (pushlevel): Remove declaration.
13935         (begin_scope): New function.
13936         (finish_scope): Likewise.
13937         (current_tmpl_spec_kind): Likewise.
13938         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
13939         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
13940         Add template_spec_p.
13941         (toplevel_bindings_p): Adjust.
13942         (declare_pseudo_global_level): Remove.
13943         (pseudo_global_level_p): Rename to template_parm_scope_p.
13944         (current_tmpl_spec_kind): New function.
13945         (begin_scope): Likewise.
13946         (finish_scope): Likewise.
13947         (maybe_push_to_top_level): Adjust.
13948         (maybe_process_template_type_declaration): Likewise.
13949         (pushtag): Likewise.
13950         (pushdecl_nonclass_level): Likewise.
13951         (lookup_tag): Likewise.
13952         (grokfndecl): Handle member template specializations.  Share
13953         constructor and non-constructor code.
13954         * decl2.c (check_classfn): Handle member template specializations.
13955         * pt.c (begin_template_parm_list): Use begin_scope.
13956         (begin_specialization): Likewise.
13957         (end_specialization): Likewise.
13958         (check_explicit_specialization): Use current_tmpl_spec_kind.
13959         Handle member template specializations.
13960         (end_template_decl): Use finish_scope.  Remove call to
13961         get_pending_sizes.
13962         (push_template_decl_real): Remove bogus error message.
13963         (tsubst_decl): Fix typo in code contained in comment.
13964         (instantiate_template): Handle member template specializations.
13965         (most_general_template): Likewise.
13967 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
13969         * lex.c (whitespace_cr): Compress consecutive calls to warning().
13970         (do_identifier): Ditto for error().
13972         * pt.c (convert_nontype_argument): Ditto for cp_error().
13973         (convert_template_argument): Ditto for cp_pedwarn().
13975 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
13977         * exception.cc (__check_null_eh_spec): New fn.
13978         * except.c (expand_end_eh_spec): Call it if the spec is throw().
13980 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
13982         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
13983         * except.c (expand_end_eh_spec): Add the return type.
13984         * rtti.c (throw_bad_cast): Add the parmtypes.
13985         (throw_bad_typeid): Likewise.
13987         * semantics.c (expand_stmt): Only leave out rtl for unused
13988         artificials, and set DECL_IGNORED_P on them as well.
13989         * decl.c (wrapup_globals_for_namespace): Likewise.
13991 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
13993         * decl.c (maybe_commonize_var): Skip all artificial decls.
13994         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
13996 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
13998         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
13999         * cp-tree.h: Declare flag_enforce_eh_specs.
14000         * decl.c (store_parm_decls, finish_function): Check it.
14002         C library functions don't throw.
14003         * Makefile.in (cfns.h): New target.
14004         (except.o): Depend on it.
14005         * Make-lang.in (cc1plus): Depend on cfns.gperf.
14006         * cfns.gperf: New file.
14007         * cfns.h: Generated.
14008         * except.c: Include it.
14009         (nothrow_libfn_p): New fn.
14010         * decl.c (grokfndecl): Use it.
14011         * cp-tree.h: Declare it.
14013         * decl.c (push_overloaded_decl_1, auto_function,
14014         define_function): Lose.
14015         (build_library_fn_1): New static fn.
14016         (builtin_function): Use it.
14017         (get_atexit_node): Use build_library_fn_ptr.
14018         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
14019         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
14020         push_void_library_fn, push_throw_library_fn): New fns.
14021         * cp-tree.h: Declare them.
14022         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
14023         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
14024         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
14025         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
14026         * rtti.c (build_runtime_decl): Lose.
14027         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
14028         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
14029         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
14031         * call.c (build_call): Remove result_type parm.
14032         Call mark_used on unused artificial fns.
14033         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
14035 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
14037         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
14038         appropriate.
14039         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
14040         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
14041         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
14042         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
14043         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
14044         expand_generic_desc): Likewise.
14046 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14048         * exception.cc (__cp_pop_exception): Cleanup the original object.
14050 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14052         * decl.c (grok_op_properties): Merge conversion to void warning
14053         with other silly op warnings.
14055 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
14057         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
14058         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
14060 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14062         * decl.c (cp_make_fname_decl): New function.
14063         (wrapup_globals_for_namespace): Don't emit unused static vars.
14064         (init_decl_processing): Remove comment about use of
14065         array_domain_type. Set make_fname_decl.
14066         (cp_finish_decl): Remove __FUNCTION__ nadgering.
14067         * semantics.c (begin_compound_stmt): Remove
14068         current_function_name_declared flagging.
14069         (expand_stmt): Don't emit unused local statics.
14070         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
14071         specially.
14073 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14075         * typeck.c (convert_for_assignment): Don't look at array
14076         initializer.
14077         * call.c (convert_like_real): Likewise.
14079 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
14081         Add initial support for '\uNNNN' specifier.
14082         * lex.c (read_ucs): New fn.
14083         (readescape, skip_white_space): Call it.
14084         (is_extended_char, is_extended_char_1): New fns.
14085         (utf8_extend_token): New fn, #if 0'd out.
14086         (real_yylex): Treat extended chars like letters.
14088         * search.c (note_debug_info_needed): Walk the bases even if we
14089         weren't deferring the type itself.
14091 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14093         * decl2.c (finish_objects): Constify a char*.
14095         * method.c (emit_thunk): Likewise.
14097 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
14099         * typeck.c (dubious_conversion_warnings): Look through
14100         REFERENCE_TYPE.
14102 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14104         * class.c (dfs_modify_vtables): I is now unsigned.
14105         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
14106         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
14107         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
14108         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14109         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
14110         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
14111         Call integer_all_onesp.
14112         * typeck2.c (process_init_constructor): Use compare_tree_int.
14114         * lang-specs.h (as): Don't call if -syntax-only.
14116 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
14118         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
14119         RTL_EXPR_HAS_NO_SCOPE after all.
14121 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
14123         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
14124         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
14125         RTL_EXPR_HAS_NO_SCOPE.
14127         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
14128         later.
14130         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
14132 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
14134         * call.c (convert_like): Macrofy.
14135         (convert_like_with_context): New macro.
14136         (convert_like_real): Renamed from convert_like.  Add calling
14137         context parameters, for diagnostics. Add recursive flag.  Call
14138         dubious_conversion_warnings for outer conversion.
14139         (build_user_type_conversion): Use convert_like_with_context.
14140         (build_over_call): Likewise. Don't warn about dubious
14141         conversions here. Adjust convert_default_arg calls.
14142         (convert_default_arg): Add context parameters for diagnostics.
14143         Pass through to convert_like_with_context.
14144         * cp-tree.h (convert_default_arg): Add context parameters.
14145         (dubious_conversion_warnings): Prototype new function.
14146         * typeck.c (convert_arguments): Adjust convert_default_arg call.
14147         (dubious_conversion_warnings): New function, broken
14148         out of convert_for_assignment.
14149         (convert_for_assignment): Adjust.
14151 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
14153         * decl2.c (key_method): Break out from...
14154         (import_export_vtable, import_export_class): ...here.
14156         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
14157         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
14159         * search.c (note_debug_info_needed, dfs_debug_mark,
14160         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
14161         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
14163 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
14165         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
14166         typos.
14168 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
14170         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
14171         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
14172         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
14173         (lang_type): Split gets_new into has_new and has_array_new.
14174         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14175         (TYPE_GETS_NEW): Split into ...
14176         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
14177         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
14178         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
14179         (build_op_new_call): Don't declare.
14180         (build_new_1): Likewise.
14181         * call.c (build_op_new_call): Remove.
14182         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
14183         instead of TYPE_NEEDS_DESTRUCTOR.
14184         (finish_struct_bits): Likewise.
14185         (add_implicitly_declared_members): Likewise.
14186         (check_field_decl): Likewise.
14187         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
14188         correctly under the new ABI.
14189         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
14190         instead of TYPE_NEEDS_DESTRUCTOR.
14191         (initialize_local_var): Likewise.
14192         (destroy_local_var): Likewise.
14193         (cp_finish_decl): Likewise.
14194         (register_dtor_fn): Likewise.
14195         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
14196         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
14197         TYPE_VEC_DELETE_TAKES_SIZE here.
14198         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
14199         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
14200         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14201         (finish_destructor_body): Likewise.
14202         (maybe_build_cleanup_1): Likewise.
14203         * decl2.c (do_static_destruction): Likewise.
14204         * init.c (build_new_1): Make it static.
14205         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14206         (expand_cleanup_for_base): Likewise.
14207         (get_cookie_size): New function.
14208         (build_new_1): Handle array-new cookies correctly under the new
14209         ABI.
14210         (build_vec_delete_1): Likewise.
14211         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14212         (build_delete): Likewise.
14213         (build_vec_delete): Handle array-new cookies correctly under the new
14214         ABI.
14215         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14216         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
14217         TYPE_HAS_ARRAY_NEW_OPERATOR.
14218         * ptree.c (print_lang_type): Check them.
14219         * search.c (context_for_name_lookup): Fix typo in comment.
14220         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14221         * tree.c (break_out_cleanups): Likewise.
14222         (build_cplus_array_test_1): Likewise.
14223         (cp_build_qualified_type_real): Likewise.
14224         * typeck.c (complete_type): Likewise.
14226         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
14227         the command-line, not the end.
14229 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
14231         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
14233 2000-03-02  Tom Tromey  <tromey@cygnus.com>
14235         * cp-tree.h (build_java_class_ref): Declare.
14236         * init.c (build_java_class_ref): No longer static.
14237         * except.c (expand_throw): Generate a Java-style `throw' if the
14238         thrown object is a "Java" object.
14239         (initialize_handler_parm): Generate a Java-style lookup of
14240         exception info if the caught object is a "Java" object.
14241         (catch_language, catch_language_init): New globals.
14242         (decl_is_java_type): New function.
14243         (expand_start_catch_block): Don't call push_eh_info() or
14244         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
14245         class reference to build_catch_block.
14247 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14249         * typeck.c (comptypes): Treat sizetype like its language equivalent.
14251 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
14253         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
14254         to merge reference/pointer code and fix incorrect warnings.
14256 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
14258         * search.c (protected_accessible_p): Use context_for_name_lookup.
14260         * init.c (construct_virtual_bases): Fix thinko.
14261         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
14263 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
14265         * decl.c (current_function_decl): Move to toplev.c.
14267 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
14269         * pt.c (fn_type_unification): Unify return type, whenever
14270         provided.
14271         (get_bindings_real): Only pass return type when necessary.
14272         Remove explicit return type check.
14273         * class.c (resolve_address_of_overloaded_function): Pass desired
14274         return type to fn_type_unification.
14276 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14278         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
14279         DECL_FIELD_SIZE.
14280         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
14281         DECL_FIELD_SIZE.
14282         * rtti.c (expand_class_desc): Likewise.
14283         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
14284         (THUNK_VCALL_OFFSET): Likewise.
14285         (THUNK_DELTA): Reflect changes in ../tree.h.
14287 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
14289         * search.c (protected_accessible_p): Also allow the access if
14290         the member is public in DERIVED.  Lose TYPE parm.
14291         (friend_accessible_p): Lose TYPE parm.
14292         (accessible_p): Adjust.
14294 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14296         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
14297         on things that are not sizes; ssize_binop deleted.
14298         Call size_diffop when appropriate.
14299         (dfs_build_vcall_offset_vtbl_entries): Likewise.
14300         (build_primary_vtable, build_secondary_vtable): Likewise.
14301         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
14302         Variable I is HOST_WIDE_INT.
14303         (get_vfield_offset): Pass proper types to size_binop.
14304         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
14305         (finish_struct_1): Likewise.
14306         (skip_rtti_stuff): Arg N is now pointer to signed.
14307         (layout_class_type): Use size_zero_node.
14308         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
14309         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
14310         * decl.c (complete_arry_type): Pass proper types to size_binop.
14311         (xref_basetypes): BINFO_OFFSET is sizetype.
14312         * error.c (dump_expr): Don't use size_binop non-sizes.
14313         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
14314         * init.c (construct_virtual_bases): Fix type error.
14315         (build_vec_delete_1): Pass proper type to size_binop and don't
14316         fold result.
14317         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
14318         * rtti.c (get_base_offset): Pass proper type to size_binop.
14319         * search.c (dfs_find_vbases): Fix type error.
14320         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
14321         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
14322         * tree.c (debug_binfo): Variable N is signed.
14323         Use HOST_WIDE_INT_PRINT_DEC.
14324         * typeck.c (comptypes): sizetype is same as equivalent integer type.
14325         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
14326         size_one_node and size_zero_node.
14327         (c_alignof): Use size_one_node.
14328         (build_component_addr): Pass proper types to size_binop.
14329         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
14331 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
14333         Implement class scope using-declarations for functions.
14334         * class.c (handle_using_decl): Call add_method for used functions.
14335         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
14336         (add_method): Used functions are hidden by local functions.
14337         (check_bases_and_members): Handle using-decls before finalizing
14338         CLASSTYPE_METHOD_VEC.
14339         * call.c (add_function_candidate): Add ctype parm; if nonzero,
14340         override the type of 'this' accordingly.
14341         (add_template_candidate, add_template_candidate_real): Add ctype parm.
14342         (convert_class_to_reference, build_user_type_conversion_1,
14343         build_new_function_call, build_object_call, build_new_op,
14344         build_new_method_call): Pass ctype parm.
14346         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
14347         the baselink.
14348         * call.c (convert_class_to_reference, build_user_type_conversion_1,
14349         build_new_function_call, build_object_call, build_new_op,
14350         build_new_method_call, build_op_delete_call): Don't get basetype_path
14351         from a baselink.
14352         * typeck.c (build_component_ref): Likewise.
14353         * init.c (build_offset_ref): Likewise.
14354         (resolve_offset_ref): Don't call enforce_access.
14355         Call build_scoped_ref.
14356         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
14357         would cause an error or if -pedantic.
14358         * class.c (alter_access): Lose binfo parm.
14360 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
14362         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
14363         types.
14365 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
14367         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
14368         pseudo_type_info creation into the std namespace
14370 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
14372         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
14373         (import_export_class): Remove declaration.
14374         * decl2.c (import_export_class): Make it static.
14375         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
14376         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
14377         EXPR_WITH_FILE_LOCATION.
14378         * lex.c (check_newline): Tweak filename/lineno setting.
14379         * semantics.c (begin_while_stmt): Fix typo in comment.
14381 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14383         * lang-options.h (-fmessage-length=): Add missing option.
14385         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
14387 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
14389         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
14391 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
14393         * optimize.c (expand_call_inline): Emit the return label before
14394         evaluating the return value.
14396 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
14398         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
14399         than duplicating functionality here.
14400         * optimize.c: Include input.h.
14401         (expand_call_inline): Use push_srcloc and pop_srcloc.
14402         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
14403         * parse.c: Regenerated.
14404         * Makefile.in (lex.o): Depend on input.h.
14405         (optimize.o): Likewise.
14407 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
14409         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
14410         function type, rather than ICE.
14412 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
14414         * decl.c (grokdeclarator): Call decl_type_access_control.
14415         * parse.y (parse_end_decl): Don't call decl_type_access_control if
14416         decl is null.
14418 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
14420         * decl.c (decls_match): Remove obsolete static member nadgering.
14422 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14424         * decl.c (grokdeclarator): Change ANSI to ISO.
14425         * lex.c (consume_string, readescape, do_identifier): Likewise.
14426         (parse_float, real_yylex): Likewise.
14427         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
14428         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
14429         new_type_id, maybe_label_decls, simple_stmt,
14430         for.init.statement): Likewise.
14431         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
14432         * semantics.c (finish_named_return_value): Likewise.
14433         * parse.c: Regenerate.
14435 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
14437         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
14438         (CPTI_CLASS_STAR_TYPE): Remove.
14439         (vtable_index_type): Likewise.
14440         (class_star_type_node): Remove.
14441         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
14442         (build_binary_op_nodefault): Remove.
14443         * call.c (build_new_op): Use build_binary_op instead of
14444         build_binary_op_nodefault.
14445         * decl.c (init_decl_processing): Remove class_star_type_node
14446         initialization.  Make delta_type_node ptrdiff_type_node under the
14447         new ABI.  Initialize vtable_index_type.
14448         (build_ptrmemfunc_type): Build different structures for the new
14449         ABI.
14450         (build_enumerator): Use build_binary_op instead of
14451         build_binary_op_nodefault.
14452         * method.c (build_overload_value): Mangle pointers-to-members
14453         appropriately under the new ABI.
14454         * typeck.c (build_array_ref): Use build_binary_op instead of
14455         build_binary_op_nodefault.
14456         (get_member_function_from_ptrfunc): Adjust for the new ABI.
14457         (build_binary_op_nodefault): Rename to ...
14458         (build_binary_op): ... this.  Remove old version.  Adjust for
14459         pointer-to-member comparisons under the new ABI.
14460         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
14461         (build_ptrmemfunc): Adjust for the new ABI.
14462         (expand_ptrmemfunc_cst): Likewise.
14463         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
14464         (pfn_from_ptrmemfunc): Adjust for the new ABI.
14466 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
14468         * call.c (build_object_call): Compress consecutive calls to
14469         cp_error.
14470         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
14471         (build_op_delete_call): Adjust message formatting.
14473         * class.c (check_bases): Compress consecutive calls to
14474         cp_pedwarn.
14475         (finish_struct_anon): Say 'ISO C++'.
14477         * decl.c (start_decl): Same here.
14478         (grok_reference_init): Likewise.
14479         (grokfndecl): Correct message formatting.
14480         (grokfndecl): Improve diagnostic.
14481         (check_static_variable_definition): Likewise. Say 'ISO C++'
14482         (compute_array_index_type): Say 'ISO C++'
14483         (create_array_type_for_decl): Compress consecutive calls to
14484         cp_error.
14485         (grokdeclarator): Say 'ISO C++'
14486         (grok_op_properties): Likewise.
14488         * decl2.c (delete_sanity): Clairify diagnostic.
14489         (check_member_template): Same here.
14490         (grok_function_init): Use consistent terminology.
14492         * expr.c (do_case): Say 'ISO C++'
14494         * friend.c (do_friend): Compress consecutive calls to warning.
14496 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
14498         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
14499         * class.c (build_secondary_vtable): Reorganize.  Don't create a
14500         new vtable under the new ABI.
14501         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
14502         computing the size.
14503         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
14504         the initializing elements.
14505         (initialize_vtable): New function.
14506         (dfs_finish_vtbls): Use it.
14507         (dfs_accumulate_vtbl_inits): New function.
14508         (finish_vtbls): Merge primary and secondary vtables under the new
14509         ABI.
14510         (finish_struct_1): Remove redundant call to layout_vtable_decl.
14511         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
14512         aren't VAR_DECLs.
14514         * class.c (build_vtable): New function, split out from ...
14515         (get_vtable_decl): ... here, and ...
14516         (build_secondary_vtable): ... here.
14518         * pt.c (tsubst_decl): Fix formatting.
14520 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14522         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
14523         (avoid_overlap, build_base_field): Likewise.
14524         (build_base_field, build_base_fields, is_empty_class):
14525         Test DECL_SIZE with integer_zero.
14526         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
14527         * cp-tree.h (struct lang_type): New field size_unit.
14528         (CLASSTYPE_SIZE_UNIT): New macro.
14529         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
14530         (cp_finish_decl): Delete -Wlarger-than processing.
14531         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
14532         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
14533         * tree.c (make_binfo): binfo vector is one entry longer.
14534         (walk_tree): Walk DECL_SIZE_UNIT.
14536 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
14538         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
14539         comment.
14540         (build_vtable_entry): Don't assume all vtable entries are
14541         functions.
14542         (build_vtbl_initializer): Adjust accordingly.
14543         (get_vtable_decl): Fix formatting.
14545 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
14547         * semantics.c (deferred_type_access_control): Walk the entire
14548         type_lookups list.
14549         (save_type_access_control): Rename from
14550         initial_deferred_type_access_control.  Just remember the value.
14551         (decl_type_access_control): New fn.
14552         (begin_function_definition): Use deferred_type_access_control, after
14553         we've started the function.  Set type_lookups to error_mark_node.
14554         * parse.y (frob_specs, fn.def1): Adjust.
14555         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
14556         (parse_end_decl, parse_bitfield0, parse_method): New fns.
14557         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
14558         (after_type_component_declarator0): Likewise.
14559         (after_type_component_declarator): Likewise.
14560         (notype_component_declarator): Likewise.
14561         * cp-tree.h: Adjust.
14563         * decl.c (redeclaration_error_message): Allow redeclaration of
14564         namespace-scope decls.
14566 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
14568         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
14570 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
14572         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
14573         * decl2.c (grokclassfn): Likewise.
14575         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
14577         * decl2.c (lang_decode_option): Don't set default message length
14578         here.
14579         * lex.c (lang_init_options): Set it here.
14581 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
14583         Make DECL_CONTEXT mean the class in which a member function was
14584         declared, even for a virtual function.
14585         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
14586         (DECL_FRIEND_CONTEXT): New macro.
14587         (DECL_REAL_CONTEXT): Remove.
14588         (SET_DECL_FRIEND_CONTEXT): Likewise.
14589         (DECL_VIRTUAL_CONTEXT): Adjust.
14590         (DECL_CLASS_SCOPE_P): Use TYPE_P.
14591         (add_friends): Remove.
14592         (hack_decl_function_context): Likewise.
14593         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
14594         CP_DECL_CONTEXT.
14595         (build_over_call): Fix indentation.  Use DECL_CONTEXT
14596         instead of DECL_CLASS_CONTEXT.
14597         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
14598         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
14599         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14600         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
14601         (build_base_field): Likewise.
14602         (finish_struct_1): Likewise.
14603         (build_self_reference): Likewise.
14604         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
14605         DECL_REAL_CONTEXT.
14606         (pushtag): Use decl_function_context, not
14607         hack_decl_function_context.
14608         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
14609         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
14610         (pushdecl): Remove bogus code.
14611         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
14612         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
14613         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14614         Use decl_function_context, nothack_decl_function_context.
14615         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
14616         (grokdeclarator): Likewise.  Use decl_function_context, not
14617         hack_decl_function_context.
14618         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
14619         (start_function): Use DECL_FRIEND_CONTEXT, not
14620         DECL_CLASS_CONTEXT.  Use decl_function_context, not
14621         hack_decl_function_context.
14622         (finish_function): Use decl_function_context, not
14623         hack_decl_function_context.
14624         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
14625         DECL_CLASS_CONTEXT.
14626         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
14627         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
14628         (grokfield): Likewise.
14629         (finish_builtin_type): Likewise.
14630         (finish_vtable_vardec): Use decl_function_context, not
14631         hack_decl_function_context.
14632         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14633         (start_static_initialization_or_destruction): Likewise.
14634         (finish_static_initialization_or_destruction): Likewise.
14635         (mark_used): Adjust logic for deciding when to synthesize methods.
14636         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
14637         DECL_REAL_CONTEXT.
14638         * error.c (dump_function_decl): Use DECL_CONTEXT, not
14639         DECL_CLASS_CONTEXT.
14640         * friend.c (is_friend): Likewise.
14641         (add_friends): Remove.
14642         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
14643         * lex.c (begin_definition_of_inclass_inline): Use
14644         decl_function_context, not hack_decl_function_context.
14645         (process_next_inline): Likewise.
14646         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
14647         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
14648         DECL_CLASSS_CONTEXT.
14649         (hack_identifier): Likewise.
14650         (synthesize_method):  Use decl_function_context, not
14651         hack_decl_function_context.
14652         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
14653         DECL_REAL_CONTEXT.
14654         (is_member_template): Use decl_function_context, not
14655         hack_decl_function_context.  Use DECL_CONTEXT, not
14656         DECL_CLASS_CONTEXT.
14657         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
14658         DECL_CLASS_CONTEXT.
14659         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
14660         DECL_REAL_CONTEXT.
14661         (push_template_decl_real): Likewise.
14662         (instantiate_class_template): Don't call add_friends.
14663         (tsubst_default_argument): Use DECL_CONTEXT, not
14664         DECL_REAL_CONTEXT.
14665         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
14666         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14667         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
14668         DECL_CLASS_CONTEXT.
14669         * repo.c (repo_inline_used): Likewise.
14670         * search.c (current_scope): Adjust for new _CONTEXT macros.
14671         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
14672         DECL_REAL_CONTEXT.
14673         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14674         (lookup_fnfields_here):Likewise.
14675         (check_final_overrider): Likewise.
14676         (init_vbase_pointers): Likewise.
14677         (virtual_context): Likewise.
14678         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
14679         (expand_body): Use decl_function_context, not
14680         hack_decl_function_context.
14681         * tree.c (hack_decl_function_context): Remove.
14682         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
14683         DECL_CLASS_CONTEXT.
14684         * typeck2.c (error_not_base_type): Likewise.
14686 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
14688         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
14690 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14692         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
14694 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
14696         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
14698 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
14700         * decl2.c (lang_decode_option): Enable automatic line wrapping.
14702 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
14704         * parse.y (frob_specs): Split out...
14705         (parse_decl): From here.
14706         (fn.def2): Call initial_deferred_type_access_control.
14707         (after_type_component_declarator0): Call frob_specs.
14708         (notype_component_declarator0): Likewise.
14709         * search.c (friend_accessible_p): Nested classes are friends of their
14710         enclosing classes.
14712 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
14714         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
14715         used to create an implicit temporary.
14717         * class.c (dfs_modify_vtables): Tweak calculation of functions to
14718         override.
14720 2000-02-08  Nathan Sidwell  <nathan@acm.org>
14722         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
14723         strip array element qualifiers too.
14725 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
14727         * decl.c (store_parm_decls): Don't build cleanups for parameters
14728         while processing_template_decl.
14730 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
14732         * cp-tree.h (struct saved_scope): Add incomplete field.
14733         (namespace_scope_incomplete): New macro.
14734         * decl.c (pushdecl): Use it.
14735         (hack_incomplete_structures): Use it.  See through artificial
14736         binding levels.
14737         (mark_saved_scope): Mark it.
14739         Implement access control for nested types.
14740         * search.c (type_access_control): New fn.
14741         (accessible_p): Now we do perform access control for types.
14742         * semantics.c (deferred_type_access_control): New fn.
14743         (initial_deferred_type_access_control): New fn.
14744         (begin_function_definition): Call it.  Add lookups parm.
14745         * decl.c (struct binding_level): Add this_class field.
14746         (pushlevel_class): Set it.
14747         (mark_binding_level): Mark it.
14748         (lookup_name_real): Use it.  Call type_access_control.
14749         (mark_saved_scope): Mark lookups field.
14750         * cp-tree.h (flagged_type_tree): Add lookups field.
14751         (struct saved_scope): Add lookups field.
14752         (type_lookups): New macro.
14753         * parse.y (declmods): Now <ftype>.
14754         (parse_decl): Add lookups parm.  Call
14755         initial_deferred_type_access_control.
14756         (lang_extdef): Clear type_lookups.
14757         (typed_declspecs, declmods, typespec): Set lookups field.
14758         (initdcl): Call deferred_type_access_control.
14759         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
14760         component_decl_1, named_parm): Adjust.
14761         * friend.c (is_friend): Nested classes are friends of their
14762         enclosing classes.
14764         * class.c (currently_open_derived_class): New fn.
14765         * method.c (hack_identifier): Use it.
14767         * lex.c (do_identifier): Remove obsolete code.
14769         * parse.y (typed_typespecs): Propagate new_type_flag properly.
14771 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
14773         * tinfo.h: Remove apostrophes from C++ comment (xgettext
14774         thinks this file is plain C).
14776 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14778         * Makefile.in (call.o): Depend on $(EXPR_H).
14780         * call.c: Include "expr.h".
14782         * class.c (dump_class_hierarchy): Add prototype.
14784         * search.c (dfs_get_pure_virtuals): Likewise.
14786 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
14788         * parse.y (simple_stmt): Allow :: token in asm parameter list.
14789         * parse.c: Rebuilt.
14791 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
14793         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
14794         Store it in DECL_FCONTEXT.
14795         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
14797 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
14799         * tinfo.h (old abi): #include "tconfig.h".
14800         * tinfo.cc (convert_to_base): Move into old abi section.
14802 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
14804         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
14805         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
14806         (BINFO_PRIMARY_BINFO): New macro.
14807         (BF_DELTA): Rename to ...
14808         (BV_DELTA): ... this.
14809         (BF_VCALL_INDEX): Rename to ...
14810         (BV_VCALL_INDEX): ... this.
14811         (BF_FN): Rename to ...
14812         (BV_FN): ... this.
14813         * class.c (build_vbase_path): Adjust for changes to reverse_path.
14814         (set_rtti_entry): Rename BF_ macros to BV_ variants.
14815         (modify_vtable_entry): Simplify.
14816         (add_virtual_function): Rename BF_ macros to BV_ variants.
14817         (build_vtable_initializer): Likewise.
14818         (get_class_offset_1): Remove.
14819         (dfs_get_class_offset): Likewise.
14820         (get_class_offset): Likewise.
14821         (dfs_find_final_overrider): New function.
14822         (find_final_overrider): Likewise.
14823         (modify_one_vtable): Remove.
14824         (dfs_find_base): New function.
14825         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
14826         find_final_overrider.
14827         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
14828         virtuals.
14829         (dfs_fixup_vtable_deltas): Remove.
14830         (override_one_vtable): Remove.
14831         (merge_overrides): Likewise.
14832         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
14833         unreal chilren of virtual bases.
14834         (finish_struct_1): Don't use merge_overrides.  Don't use
14835         dfs_fixup_vtable_deltas.
14836         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
14837         BINFOs.
14839 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
14840             Jason Merrill  <jason@yorick.cygnus.com>
14842         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
14844 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
14846         * exception.cc (__throw_bad_typeid): Add missing std::.
14848 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14850         * cp-tree.h (make_thunk): PROTO -> PARAMS.
14852 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
14854         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
14856         Runtime support for new-abi rtti.
14857         * inc/typeinfo (type_info::operator!=): Define in class.
14858         (type_info::before, type_info::name, type_info::operator==,
14859         type_info::operator!=): Define new ABI implementations.
14860         (type_info::is_pointer_p, type_info::is_function_p): Declare
14861         new virtual functions.
14862         (type_info::do_catch, type_info::do_upcast): Likewise.
14864         * tinfo.h (__base_class_info): Define new class.
14865         (__class_type_info): Likewise.
14866         (__si_class_type_info): Likewise.
14867         (__vmi_class_type_info): Likewise.
14868         (__dynamic_cast): Prototype.
14870         * tinfo.cc: Conditionalize old and new rtti mechanisms.
14871         (type_info::is_pointer_p): Define new function.
14872         (type_info::is_function_p): Likewise.
14873         (type_info::do_catch): Likewise.
14874         (type_info::do_upcast): Likewise.
14875         (vtable_prefix): New structure for vtable access.
14876         (adjust_pointer): Define new template function.
14877         (contained_p, public_p, virtual_p, contained_public_p,
14878         contained_nonpublic_p, contained_nonvirtual_p): Define new
14879         functions.
14880         (nonvirtual_base_type): New local variable.
14881         (__class_type_info::~__class_type_info): Define.
14882         (__si_class_type_info::~__si_class_type_info): Likewise.
14883         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
14884         (__class_type_info::do_catch): Define new function.
14885         (__class_type_info::do_upcast): Likewise.
14886         (__class_type_info::find_public_src): Likewise.
14887         (__class_type_info::do_find_public_src): Likewise.
14888         (__si_class_type_info::do_find_public_src): Likewise.
14889         (__vmi_class_type_info::do_find_public_src): Likewise.
14890         (__class_type_info::do_dyncast): Likewise.
14891         (__si_class_type_info::do_dyncast): Likewise.
14892         (__vmi_class_type_info::do_dyncast): Likewise.
14893         (__class_type_info::do_upcast): Likewise.
14894         (__si_class_type_info::do_upcast): Likewise.
14895         (__vmi_class_type_info::do_upcast): Likewise.
14896         (__dynamic_cast): Likewise.
14898         * tinfo2.cc (__fundamental_type_info): Define new class.
14899         (__pointer_type_info): Likewise.
14900         (__reference_type_info): Likewise.
14901         (__array_type_info): Likewise.
14902         (__function_type_info): Likewise.
14903         (__enum_type_info): Likewise.
14904         (__ptr_to_member_type_info): Likewise.
14905         (__fundamental_type_info::~__fundamental_type_info): Define.
14906         (__pointer_type_info::~__pointer_type_info): Likewise.
14907         (__reference_type_info::~__reference_type_info): Likewise.
14908         (__array_type_info::~__array_type_info): Likewise.
14909         (__function_type_info::~__function_type_info): Likewise.
14910         (__enum_type_info::~__enum_type_info): Likewise.
14911         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
14912         (__pointer_type_info::do_catch): Define new function.
14913         (__ptr_to_member_type_info::do_catch): Define new function.
14915         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
14916         (__is_pointer): Likewise.
14918         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
14920 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
14922         * cp/class.c (build_vtable): Rename to build_primary_vtable.
14923         (prepare_fresh_vtable): Rename to build_secondary_vtable.
14924         (make_new_vtable): New function.
14925         (modify_vtable_entry): Handle generation of new vtables correctly.
14926         (modify_one_vtable): Remove unused parameter.
14927         (dfs_fixup_vtable_deltas): Likewise.
14928         (override_one_vtable): Use build_secondary_vtable.
14929         (finish_struct_1): Use build_primary_vtable and
14930         build_secondary_vtable.
14932 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
14934         * cp/decl.c: Adjust variable names, comments, help strings.
14936 2000-01-29  Nathan Sidwell  <nathan@acm.org>
14938         * new2.cc (operator delete[]): Use operator delete, don't assume
14939         implementation.
14941 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
14943         * class.c (build_vtbl_initializer): Add argument to
14944         build_vtable_entry call.
14946 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
14948         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
14949         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
14950         (BF_DELTA): New macro.
14951         (BF_VCALL_INDEX): Likewise.
14952         (BF_FN): Likewise.
14953         (THUNK_VCALL_OFFSET): Likewise.
14954         (make_thunk): Change prototype.
14955         * class.c (build_vtable_entry): Integrate
14956         build_vtable_entry_for_fn.  Handle vcall indices.
14957         (build_vtable_entry_for_fn): Remove.
14958         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
14959         BF_VCALL_INDEX, BF_FN.
14960         (modify_vtable_entry): Integrate common code from
14961         modify_one_vtable and dfs_fixup_vtable_deltas.
14962         (add_virtual_function): Set BF_VCALL_INDEX.
14963         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
14964         and BF_FN.
14965         (modify_one_vtable): Simplify.
14966         (dfs_fixup_vtable_deltas): Likewise.
14967         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
14968         * method.c (make_thunk): Handle vcall indices.
14970 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
14972         Compiler side new abi rtti (not enabled).
14973         * cp-tree.h (new_abi_rtti_p): New macro.
14974         (emit_support_tinfos): Prototype new function.
14975         (tinfo_decl_p): Likewise.
14976         (emit_tinfo_decl): Likwise.
14977         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
14978         macros.
14979         (doing_runtime): New local static.
14980         (init_rtti_processing): Add new-abi initializer.
14981         (get_tinfo_decl): Add new-abi logic.
14982         (tinfo_from_decl): Likewise.
14983         (build_dynamic_cast_1): Likewise.
14984         (qualifier_flags): New static function.
14985         (tinfo_base_init): Likewise.
14986         (generic_initializer): Likewise.
14987         (ptr_ref_initializer): Likewise.
14988         (ptmd_initializer): Likewise.
14989         (class_hint_flags): Likewise.
14990         (class_initializer): Likewise.
14991         (synthesize_tinfo_var): Likewise.
14992         (create_real_tinfo_var): Likewise.
14993         (create_pseudo_type_info): Likewise.
14994         (get_vmi_pseudo_type_info): Likewise.
14995         (create_tinfo_types): Likewise.
14996         (emit_support_tinfos): New global function.
14997         (tinfo_decl_p): New global predicate.
14998         (emit_tinfo_decl): New global function.
14999         * class.c (set_rtti_entry): Generalize for old and new rtti.
15000         (build_vtbl_initializer): Likewise.
15001         * decl2.c (finish_file): Likewise.
15003 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
15005         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
15006         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
15008 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
15010         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
15011         for scopes.
15013 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
15015         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
15017 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
15019         * optimize.c (calls_setjmp_r): Supply new argument
15020         to special_function_p.
15022 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15024         * call.c: PROTO -> PARAMS.
15025         * class.c: Likewise.
15026         * cp-tree.h: Likewise.
15027         * cvt.c: Likewise.
15028         * decl.c: Likewise.
15029         * decl.h: Likewise.
15030         * decl2.c: Likewise.
15031         * dump.c: Likewise.
15032         * errfn.c: Likewise.
15033         * error.c: Likewise.
15034         * except.c: Likewise.
15035         * expr.c: Likewise.
15036         * init.c: Likewise.
15037         * input.c: Likewise.
15038         * lex.c: Likewise.
15039         * lex.h: Likewise.
15040         * method.c: Likewise.
15041         * optimize.c: Likewise.
15042         * parse.y: Likewise.
15043         * pt.c: Likewise.
15044         * repo.c: Likewise.
15045         * rtti.c: Likewise.
15046         * search.c: Likewise.
15047         * semantics.c: Likewise.
15048         * spew.c: Likewise.
15049         * tree.c: Likewise.
15050         * typeck.c: Likewise.
15051         * typeck2.c: Likewise.
15052         * xref.c: Likewise.
15054 2000-01-25  Richard Henderson  <rth@cygnus.com>
15056         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
15058 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
15060         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
15061         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
15062         (struct vcall_offset_data_s): New type.
15063         (dfs_vcall_offset_queue_p): New function.
15064         (dfs_build_vcall_offset_vtbl_entries): Likewise.
15065         (build_vcall_offset_vtbl_entries): Likewise.
15066         (layout_vtable_decl): Likewise.
15067         (num_vfun_entries): Likewise.
15068         (num_extra_vtbl_entries): Add the entries for vcall offsets.
15069         (build_vtbl_initializer): Likewise.
15070         (dfs_finish_vtabls): Use layout_vtable_decl.
15071         (modify_one_vtables): Always duplicate vtables under the new ABI.
15072         (finish_struct_1): Use layout_vtable_decl.
15074 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15076         * decl.c (member_function_or_else): Change third arg from a format
15077         specifier to an `enum overload_flags'.  Callers changed.
15079 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15081         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
15082         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
15083         build_const_cast, get_delta_difference, check_return_expr): Avoid
15084         ANSI string concatenation usage.
15086 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
15088         * class.c (layout_class_type): Put the fields required to make a
15089         class non-empty at the end, not the beginning, of the TYPE_FIELDs
15090         list.
15092 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
15094         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
15095         template.
15097         * decl2.c (mark_used): Do instantiate inlines that have been
15098         explicitly instantiated.
15100 2000-01-24  Richard Henderson  <rth@cygnus.com>
15102         * call.c (build_over_call): Use expand_tree_builtin.
15103         * typeck.c (build_function_call_real): Likewise.
15104         (build_binary_op_nodefault): Handle unordered compares.
15106 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
15108         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
15109         cp_tree_index values.
15110         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
15111         New global node #defines for them.
15112         * rtti.c (call_void_fn): Replace with ...
15113         (build_runtime_decl): ... new static function.
15114         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
15115         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
15116         (build_dynamic_cast_1): Always produce correctly typed result.
15117         Explicitly produce type_info addresses. Use dynamic_cast_node.
15118         * exception.cc (__throw_bad_cast): Return `void *'.
15119         (__throw_bad_typeid): Return `const type_info &'.
15121 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
15123         * cp-tree.h (get_vtable_decl): Prototype new function.
15124         * class.c (get_vtable_decl): New function. Broken out from ...
15125         (build_vtable): ... here. Use it.
15126         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
15127         by get_vtable_decl.
15129 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
15131         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
15132         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
15133         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
15134         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
15135         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
15136         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
15137         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
15138         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
15139         (CPTI_TINFO_VAR_ID): New enumeration.
15140         (__tp_desc_type_node, __access_mode_type_node,
15141         __bltn_desc_type_node, __user_desc_type_node,
15142         __class_desc_type_node, __ptr_desc_type_node,
15143         __attr_desc_type_node, __func_desc_type_node,
15144         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
15145         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
15146         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
15147         enum_desc_type_node, class_desc_type_node,
15148         si_class_desc_type_node, vmi_class_desc_type_node,
15149         ptmd_desc_type_node, base_desc_type_node): New #defines.
15150         (tinfo_fn_id, tinfo_fn_type): Rename to ...
15151         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
15152         (tinfo_var_id): New enumeration.
15153         (DECL_TINFO_FN_P): Augment comment.
15154         * decl.c (cp_global_trees): Adjust documentation.
15155         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
15156         tinfo_decl_type and tinfo_var_id.
15157         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
15158         (build_typeid): Remove unused variable.
15159         (get_tinfo_var): Use tinfo_var_id.
15160         (tinfo_name): New static function.
15161         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
15162         (tinfo_from_decl): Likewise.
15163         (get_base_offset): New static function, broken out of
15164         expand_class_desc.
15165         (expand_si_desc): Use tinfo_name.
15166         (expand_class_desc): Likewise. Lose local static variable.
15167         Use base_desc_type_node. Use get_base_offset.
15168         (expand_ptr_desc): Use tinfo_name.
15169         (expand_attr_desc): Likewise.
15170         (expand_generic_desc): Likewise.
15172         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
15173         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
15175 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
15177         * cp-tree.h (__eprintf): Remove declaration.
15178         * tree.c (__eprintf): Remove definition.
15180 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
15181             Mark Mitchell  <mark@codesourcery.com>
15183         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
15184         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
15186 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
15188         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
15190 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
15192         * cp-tree.h (register_dtor_fn): New function.
15193         * decl.c (destroy_local_static): Rename to ...
15194         (register_dtor_fn): ... this.  Give it external linkage.
15195         (expand_static_init): Use it.
15196         * decl2.c (do_static_initialization): Likewise, if using
15197         __cxa_atexit.
15198         (do_static_destruction): Check that __cxa_atexit is not in use.
15199         (finish_file): Don't call do_static_destruction if using
15200         __cxa_atexit.
15202         * typeck.c (convert_arguments): Restore two-message error
15203         reporting.
15205 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
15207         Remap dynamic cast hint values to be consistent across ABIs.
15208         * search.c (dynamic_cast_base_recurse): Remap generated value.
15209         (get_dynamic_cast_base_type): Adjust documentation.
15210         * tinfo.h (__user_type_info::dyncast): Likewise.
15211         (__user_type_info::find_public_subobj): Remap BOFF meaning.
15212         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
15213         (__class_type_info::do_dyncast): Likewise.
15214         (__class_type_info::do_find_public_subobj): Likewise.
15215         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
15217 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
15219         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
15221         * typeck2.c (incomplete_type_error): Restore previous
15222         cp_error and cp_error_at call sequence.
15224 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
15226         * class.c (dump_class_hierarchy): Make format agree with argument;
15227         cast pointer to unsigned long and print with %lx.
15229 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
15231         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
15233         * typeck.c (composite_pointer_type, common_type,
15234         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
15235         build_function_call_real, convert_arguments,
15236         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
15237         build_unary_op, mark_addressable, build_compound_expr,
15238         build_static_cast, build_reinterpret_cast, build_const_cast,
15239         build_c_cast, build_modify_expr, get_delta_difference,
15240         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
15241         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
15242         into a single one.
15243         * typeck2.c (readonly_error, abstract_virtuals_error,
15244         process_init_constructor, check_for_new_type): Likewise.
15246 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
15248         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
15249         VAR_DECLs.
15251 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
15253         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
15254         (build_x_typeid): Likewise.
15255         (get_tinfo_fn): Likewise.
15256         (get_tinfo_fn_unused): Rename to ...
15257         (get_tinfo_decl): ... here.
15258         * rtti.c (build_headof): Replace logic error with assertion.
15259         (get_tinfo_fn_dynamic): Rename to ...
15260         (get_tinfo_decl_dynamic): ... here. Make static. Use
15261         complete_type_or_else.
15262         (build_x_typeid): Move into ...
15263         (build_typeid): ... here. Adjust call to
15264         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
15265         throw_bad_typeid expression.
15266         (get_tinfo_fn_unused): Rename to ...
15267         (get_tinfo_decl): ... here. Adjust comment.
15268         (get_tinfo_fn): Delete.
15269         (tinfo_from_decl): New static function.
15270         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
15271         (get_typeid): Use complete_type_or_else.
15272         (build_dynamic_cast_1): Adjust calls to
15273         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
15274         * parse.y (primary): Adjust call to build_typeid.
15275         * except.c (build_eh_type_type_ref): Adjust call to
15276         get_tinfo_decl. Mark as used.
15277         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
15278         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
15279         * parse.c: Regenerated.
15281 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
15283         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
15284         calling convention.
15285         (resolves_to_fixed_type_p): Document calling convention.
15286         * rtti.c (build_x_typeid): Initialize NONNULL.
15288         * cp-tree.h (build_shared_int_cst): New function.
15289         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
15290         * class.c (modify_vtable_entry): Likewise.
15291         (add_virtual_function): Split out code to generated shared
15292         INTEGER_CSTs to build_share_int_cst.
15293         (modify_all_vtables): Handle all the overridden functions here.
15294         Add overridden functions from non-primary virtual bases to the
15295         primary vtable.
15296         (finish_struct_1): Adjust call to modify_all_vtables.  Add
15297         overridden functions from non-primary bases to the vtable.
15298         * tree.c (build_shared_int_cst): New function.
15300         * cp-tree.h (scratchalloc): Remove.
15301         (build_scratch_list): Likewise.
15302         * call.c (convert_class_to_reference): Replace build_scratch_list
15303         and build_expr_list with build_tree_list.
15304         (add_candidate): Replace scratchalloc with expralloc.  Note memory
15305         leak.
15306         (build_user_type_conversion_1):  Replace build_scratch_list
15307         and build_expr_list with build_tree_list.
15308         (build_new_op): Likewise.
15309         (build_op_delete_call): Likewise.
15310         (convert_like): Likewise.
15311         * cvt.c (ocp_convert): Likewise.
15312         * decl.c (start_decl): Likewise.
15313         (start_function): Likewise.
15314         (finish_destructor_body): Likewise.
15315         (maybe_build_cleanup_1): Likewise.
15316         * decl2.c (reparse_decl_as_expr): Likewise.
15317         * init.c (perform_member_init): Likewise.
15318         (expand_cleanup_for_base): Likewise.
15319         (build_builtin_delete_call): Likewise.
15320         (build_new_1): Likewise.
15321         (build_delete): Likewise.
15322         * method.c (do_build_assign_ref): Likewise.
15323         * parse.y (already_scoped_stmt): Likewise.
15324         (nontrivial_exprlist): Likewise.
15325         (net_initializer): Likewise.
15326         (initlist): Likewise.
15327         * parse.c: Regenerated.
15328         * rtti.c (build_x_typeid): Likewise.
15329         (build_dynamic_cast_1): Likewise.
15330         * typeck.c (build_x_compound_expr): Likewise.
15331         (build_static_cast): Likewise.
15332         (build_modify_expr): Likewise.
15334         * cp-tree.h (DECL_VINDEX): Add documentation.
15335         * class.c (build_vtable_entry): Likewise.
15336         (start_vtable): Add comment.
15337         (add_virtual_function): Replace pending_hard_virtuals with
15338         overridden_virtuals and pending_virtuals with new_virtuals.
15339         Replace redundant assignments with assertions.
15340         (check_for_override): Add comment.
15341         (check_bases_and_members): Replace pending_hard_virtuals with
15342         overridden_virtuals and pending_virtuals with new_virtuals.
15343         (create_vtbl_ptr): Likewise.
15344         (layout_class_type): Likewise.
15345         (finish_struct_1): Likewise.  Add comments.
15347 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
15349         * class.c (finish_struct_1): Replace redundant code with
15350         assertions.
15352         * cp-tree.h (flag_new_abi): Move.
15353         (flag_use_cxa_atexit): Likewise.
15354         (flag_honor_std): Likewise.
15355         (flag_rtti): Likewise.
15356         (vbase_offsets_in_vtable_p): Define.
15357         (vptrs_present_everywhere_p): Likewise.
15358         (TYPE_CONTAINS_VPTR_P): Likewise.
15359         (dfs_walk_real): Declare.
15360         * class.c (build_vbase_pointer_fields): Check
15361         vbase_offsets_in_vtable_p.
15362         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
15363         BINFO_VPTR_FIELD.
15364         (build_vbase_offset_vtbl_entries): Simplify.
15365         (build_vbase_offset_vtbl_entries): Adjust.
15366         (build_vbase_pointer): Add ability to look up vbase offsets in
15367         vtable.
15368         (start_vtable): New function.
15369         (add_virtual_function): Use it.
15370         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
15371         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
15372         (build_vtbl_initializer): Take the type of the complete object as
15373         input.  Use it to correctly calculate vbase offsets.
15374         (dfs_finish_vtbls): Pass the complete type to
15375         build_vtbl_initializer.
15376         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
15377         (create_vtable_ptr): Create a vtable even if there are no
15378         new virtual functions, under the new ABI.
15379         (finish_struct_1): Likewise.
15380         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
15381         * decl.c (exapnd_static_init): Remove call to
15382         preserve_initializer.
15383         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
15384         vtables.
15385         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
15386         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
15387         (construct_virtual_bases): Don't initialize virtual base pointers
15388         under the new ABI.
15389         (build_aggr_init): Clean up comment.
15390         (expand_aggr_init_1): Likewise.
15391         * rtti.c (expand_class_desc): Store the virtual function table
15392         index where the vbase offset lives in the offset field.
15393         * search.c (dfs_walk_real): Make it global.
15394         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
15395         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
15397         * tinfo.h (USItype): Make it signed under the new ABI.
15398         * tinfo.cc (convert_to_base): New function.  Encapsulate base
15399         conversion logic here.
15400         (__class_type_info::do_upcast): Use it.
15401         (__class_type_info::do_dyncast): Likewise.
15402         (__class_type_info::do_find_public_subobj): Likewise.
15404         * init.c (construct_virtual_bases): Don't look up the addresses of
15405         virtual bases at run-time.
15407         * class.c (build_vbase_pointer): Relocate.
15408         (build_vbase_pointer_fields): Likewise.
15409         (dfs_build_vbase_offset_vtbl_entries): Likewise.
15410         (build_vbase_offset_vtbl_entries): Likewise.
15412         * decl.c (init_decl_processing): Complain if -fnew-abi
15413         -fno-vtable-thunks is used.
15415         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
15416         flag_new_abi.
15418 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
15420         * cp-tree.h (num_extra_vtbl_entries): New function.
15421         (size_extra_vtbl_entries): Likewise.
15422         (dfs_vtable_path_unmark): Likewise.
15423         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
15424         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
15425         * class.c (num_extra_vtbl_entries): New function.
15426         (size_extra_vtbl_entries): Likewise.
15427         (dfs_build_vbase_offset_vtbl_entries): New function.
15428         (build_vbase_offset_vtbl_entries): Likewise.
15429         (build_vtbl_initializer): Use it.
15430         (finish_struct_1): Adjust vtable sizes (using
15431         num_extra_vtbl_entries).
15432         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
15433         THUNK_DECL is non-NULL before expanding it.
15434         * init.c (expand_virtual_init): Adjust the vtable pointer by
15435         size_extra_vtbl_entries before storing it.
15436         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
15437         Handle TREE_LIST parameters here, not in the dfs_* functions.
15438         (dfs_unmarked_real_bases_queue_p): Adjust.
15439         (dfs_marked_real_bases_queue_p): Likewise.
15440         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
15441         (dfs_vtable_path_marked_real_bases_queue_p): New function.
15442         (dfs_vtable_path_unmark): Likewise.
15444 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
15446         * optimize.c (copy_body_r): Clear the operand three of a
15447         TARGET_EXPR when copying it.
15449 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15451         * method.c (build_decl_overload_real): Check whether we are in ::
15452         before returning __builtin_new/delete.
15454 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
15456         * pt.c (tsubst_friend_function): Improve comment.
15457         (instantiate_decl): Avoid crashing when a "nested" function is
15458         instantiated from the top level.
15460         * dump.c (dqeueue_and_dump): Dump
15461         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
15463 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15465         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
15467 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
15469         * g++spec.c (lang_specific_driver): Add -fnew-abi if
15470         ENABLE_NEW_GXX_ABI defined.
15471         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
15472         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
15473         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
15475 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
15477         * decl.c (start_cleanup_fn): Call pushdecl.
15479         * call.c (convert_class_to_reference): Fix typos.
15480         (build_conditional_expr): Handle errors gracefully.
15481         * class.c (push_nested_class): Likewise.
15482         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
15483         (DECL_THIS_EXTERN): Use it.
15484         (DECL_THIS_STATIC): Likewise.
15485         * cvt.c (convert_to_void): Handle errors gracefully.
15486         (build_expr_type_conversion): Likewise.
15487         * decl.c (maybe_push_decl): Likewise.
15488         (start_decl_1): Likewise.
15489         (require_complete_types_for_parms): Likewise.
15490         * parse.y (structsp): Likewise.
15491         (base_class): Likewise.
15492         * parse.c: Regenerated.
15493         * pt.c (finish_member_template_decl): Likewise.
15494         * typeck.c (decay_conversion): Likewise.
15496         * cp-tree.h (dfs_skip_vbases): New function.
15497         (find_vbase_instance): Likewise.
15498         * class.c (determine_primary_base): Allow a nearly empty base to
15499         serve as a primary base class under the new ABI.
15500         (get_class_offset_1): Rename to ...
15501         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
15502         messages here.
15503         (get_class_offset): Use it.  Issue error messages here.
15504         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
15505         find the right copies of virtual bases.
15506         (fixup_vtable_deltas1): Rename to ...
15507         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
15508         bases as primary bases.
15509         (fixup_vtable_deltas): Remove.
15510         (override_one_vtable): Handle virtual bases as primary bases.
15511         (merge_overrides): Likewise.
15512         (finish_struct_1): Likewise.
15513         (dump_class_hierarchy): Dump primary-ness of bases as well.
15514         * search.c (mark_primary_bases): Use a pre-order traversal to
15515         handle primary virtual bases.
15516         (dfs_skip_vbases): New fiunction.
15517         (expand_upcast_fixups): Adjust to handle primary virtual bases.
15518         (fixup_virtual_upcast_offsets): Likewise.
15519         (fixup_all_virtual_upcast_offsets): Likewise.
15520         (dfs_find_vbase_instances): New function.
15521         (find_vbase_instance): Likewise.
15523 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
15525         * lex.c (DIR_SEPARATOR): Delete macro.
15527 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
15529        * decl2.c (lang_decode_option): Handle automatic line wrapping
15530        option.
15532 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
15534         * friend.c (do_friend): Don't resolve scopes when processing
15535         template declarations, even if the qualifying scope doesn't
15536         involve template parameters.
15538 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
15540         * class.c (dfs_modify_vtables_queue_p): Remove.
15541         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
15542         and dfs_marked_real_bases_queue_p instead of
15543         dfs_modify_vtables_queue_p.
15545         * class.c (build_vbase_path): Simplify.
15546         (dfs_propagate_binfo_offsets): New function.
15547         (propagate_binfo_offsets): Use it.
15548         (remove_base_field): Simplify.
15549         (dfs_set_offset_for_vbases): Remove.
15550         (dfs_set_offset_for_shared_vbases): New function.
15551         (dfs_set_offset_for_unshared_vbases): Likewise.
15552         (layout_virtual_bases): Use them.
15553         (layout_basetypes): Don't call propagate_binfo_offsets.
15554         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
15555         for the vbases.
15557         * class.c (build_base_field): New function, split out from ...
15558         (build_base_fields): ... here.  Use it.  Allocate primary bases
15559         first, under the new ABI.
15560         (get_vtable_entry): Remove.
15561         (remove_base_field): New function, split out from ...
15562         (remove_base_fields): ... here.  Adjust since primary bases come
15563         first under the new ABI.
15565         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
15566         (initialize_vtbl_ptrs): New function.
15567         (expand_indirect_vtbls_init): Change prototype.
15568         (convert_pointer_to_vbase): Declare.
15569         * init.c (expand_direct_vtbls_init): Remove.
15570         (dfs_initialize_vtbl_ptrs): New function.
15571         (initialize_vtbl_ptrs): Likewise.
15572         (emit_base_init): Use initialize_vtbl_ptrs.
15573         * search.c (convert_pointer_to_vbase): Make it global.
15574         (expand_indirect_vtbls_init): Remove vtable initialization code.
15575         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
15577         * class.c (dfs_finish_vtbls): New function.
15578         (finish_vtbls): Use it.
15579         (dump_class_hierarchy): New function.
15581         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
15582         (BINFO_VBASE_PRIMARY_P): New macro.
15583         (BINFO_VIRTUALS): Add to documentation.
15584         (SET_BINFO_PRIMARY_MARKED_P): Remove.
15585         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
15586         (dfs_mark_primary_bases_queue_p): Likewise.
15587         (dfs_unmarked_real_bases_queue_p): New function.
15588         (dfs_marked_real_bases_queue_p): Likewise.
15589         * search.c (dfs_mark_primary_bases): Adjust.
15590         (mark_primary_bases): Likewise.
15591         (get_shared_vbase_if_not_primary): New function.
15592         (dfs_unmarked_real_bases_queue_p): Likewise.
15593         (dfs_marked_real_bases_queue_p): Likewise.
15594         (dfs_get_pure_virtuals): Simplify.
15595         (get_pure_virtuals): Likewise.
15597 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15599         * lex.c: Include tm_p.h.
15601 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
15603         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
15605 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
15607         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
15608         * pt.c (instantiate_decl): Defer comdat templates that might not be
15609         needed.
15611         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
15612         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
15613         (finish_file): Likewise.
15615         * decl2.c (import_export_class): Undo 12/14 change.
15617         * error.c (dump_decl): operator new, not operatornew.
15619         * class.c (field_decl_cmp): A nontype is "greater" than a type.
15620         * search.c (lookup_field_1): Look for the last field with the
15621         desired name.
15623 2000-01-05  Nathan Sidwell  <nathan@acm.org>
15625         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
15626         FUNCTION_DECL.
15628 2000-01-05  Nathan Sidwell  <nathan@acm.org>
15630         * typeck.c (build_static_cast): Don't strip target qualifiers
15631         when casting from a class.
15633 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15635         * class.c (warn_hidden): Initialize variable `fndecl'.
15637 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
15639         * decl.c (flag_isoc9x): New variable to be able to use code in
15640         c-common.c.  For now always zero.
15642 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
15644         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
15645         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
15646         or unshare_base_binfos for virtual bases here.
15647         * search.c (dfs_get_vbase_types): Do it here.
15648         (get_vbase_types): Adjust.
15650 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
15652         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
15653         (BINFO_PRIMARY_MARKED_P): Use flag 5.
15654         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
15655         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
15656         (unmark_primary_bases): Remove declaration.
15657         (unmarkedp): Declare.
15658         (dfs_vbase_unmark): Likewise.
15659         * class.c (determine_primary_base): Return immediately if there
15660         are no base classes.  Call mark_primary_bases here.
15661         (modify_all_direct_vtables): Remove.
15662         (modify_all_indirect_vtables): Remove.
15663         (dfs_modify_vtables_queue_p): New function.
15664         (dfs_modify_vtables): New function.
15665         (modify_all_vtables): Use them.
15666         (build_base_fields): Build FIELD_DECLs for primary virtual base
15667         classes.
15668         (create_vtable_ptr): Don't call determine_primary_base here.
15669         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
15670         (dfs_set_offset_for_vbases): ... this.
15671         (layout_virtual_bases): Use it.
15672         (layout_class_type): Call determine_primary_base here.
15673         * search.c (unmarkedp): Make it global.
15674         (shared_marked_p): Simplify.
15675         (shared_unmarked_p): Likewise.
15676         (dfs_primary_bases_queue_p): Remove.
15677         (dfs_unmark_primary_bases): Likewise.
15678         (unmark_primary_bases): Likewise.
15679         (mark_primary_bases): Simplify.
15680         (get_pure_virtuals): Don't call mark_primary_bases here.
15681         (dfs_vbase_unmark): New function.
15682         (get_vbase_types): Simplify.
15684         * class.c (struct base_info): Remove.
15685         (determine_primary_base): Take has_virtual_p rather than a
15686         base_info as input.  Don't calculate max_has_virtual.
15687         (finish_struct_bits): Remove max_has_virtual argument.
15688         (create_vtable_ptr): Remove max_has_virtual_p argument.
15689         (layout_virtual_bases): Remove max argument.
15690         (layout_basetypes): Likewise.
15691         (layout_class_type): Remove max_has_virtual_p argument.
15692         (finish_struct_1): Remove max_has_virtual.
15694         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
15695         (layout_basetypes): Remove.
15696         * class.c (propagate_binfo_offsets): Moved here from tree.c.
15697         Update to handle primary virtual bases.
15698         (remove_base_fields): New function, split out from
15699         layout_basetypes.
15700         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
15701         (layout_virtual_bases): New function, split out from
15702         layout_basetypes.  Update to handle primary virtual bases.
15703         (layout_basetypes): Moved here from tree.c.  Use
15704         remove_base_fields and layout_virtual_bases.
15705         * search.c (dfs_mark_primary_bases_queue_p): New function.
15706         (mark_primary_bases): Use it.
15707         * tree.c (CEIL): Remove.
15708         (propagate_binfo_offsets): Remove.
15709         (layout_basetypes): Remove.
15711 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
15713         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
15714         (BINFO_PRIMARY_MARKED_P): New macro.
15715         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
15716         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
15717         (mark_primary_bases): New function.
15718         (unmark_primary_bases): Likewise.
15719         * search.c (get_abstract_virtuals_1): Remove.
15720         (dfs_mark_primary_bases): New function.
15721         (mark_primary_bases): Likewise.
15722         (dfs_unmark_primary_bases): Likewise.
15723         (unmark_primary_bases): Likewise.
15724         (dfs_get_pure_virtuals): Likewise.
15726 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
15728         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
15729         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
15730         (modify_one_vtable): Adjust.
15731         (fixup_vtable_deltas1): Likewise.
15732         (override_one_vtable): Likewise.
15733         * search.c (get_abstract_virtuals_1): Likewise.
15734         (get_pure_virtuals): Likewise.
15735         (expand_upcast_fixups): Likewise.
15736         * tree.c (debug_binfo): Likewise.
15738         * class.c (build_vtable): Don't return a value.  Don't rebuild
15739         vtables for bases that have already been handled.
15740         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
15741         already been handled.
15742         (modify_one_vtable): Adjust accordingly.
15743         (fixup_vtable_deltas1): Likewise.
15744         (finish_struct_1): Likewise.
15746 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15748         * call.c (build_new_method_call): Also check destructors.