OSDN Git Service

* cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
2
3         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C 
4         front end.
5
6 2003-01-03  Matt Austern  <austern@apple.com>
7
8         * cp-tree.h (struct lang_type_class): add field for key method
9         (cp_global_trees): rename dynamic_classes to keyed_classes
10         (key_method): add definition
11         * class.c (finish_struct_1): compute class's key method, and add
12         the class to keyed_classes list if there is no key method.
13         * decl.c (finish_function): add class to keyed_classes list if we
14         see a definition of the class's key method.
15         * pt.c (instantiate_class_template): add template specialization
16         of a dynamic class to keyed_classes list.
17         * decl2.c (key_method): remove
18         (finish_file): iterate only through keyed_classes list when
19         deciding whether to emit vtables, remove class from its list after
20         we do the emission.
21         
22 2003-01-02  Jason Merrill  <jason@redhat.com>
23
24         * call.c (build_conditional_expr): Stabilize lvalues properly.
25         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
26         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
27         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
28
29         * call.c (convert_like_real): Call decl_constant_value for an
30         IDENTITY_CONV even if there are no more conversions.
31
32         * cvt.c (build_up_reference): Don't push unnamed temps.
33
34         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
35
36         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
37         for a backend struct.
38
39         * except.c (wrap_cleanups_r, build_throw): Make
40         MUST_NOT_THROW_EXPRs void.
41         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
42
43         * init.c (build_vec_delete_1): Pre-evaluate the base address.
44
45         * init.c (get_temp_regvar): Simplify logic.
46
47         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
48         our replacement is a decl.
49
50         * decl.c (cp_make_fname_decl): Push the decls inside the
51         outermost scope.
52
53 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
54
55         PR c++/45, c++/3784
56         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
57         the same too.
58
59 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
60
61         * parser.c (struct cp_parser): Add access_checks_lists field
62         (cp_parser_simple_declaration): Use.
63         (cp_parser_init_declarator): Likewise. 
64
65 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
66
67         * parser.c (cp_parser_declaration): Accept the __extension__
68         keyword before the declaration.
69
70         PR c++/2843
71         * parser.c (cp_parser_parameter_declaration): Allow attributes to
72         appear after the declarator.
73
74         * call.c (build_new_method_call): Fix typo in message format
75         string.
76
77 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
78
79         * parser.c (cp_lexer_next_token_is): Declare it inline.
80         (cp_lexer_set_source_position_from_token): Likewise.
81         (cp_lexer_debugging_p): Likewise.
82         (cp_parser_parsing_tentatively): Likewise.
83         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
84         to the cp_lexer_peek_token.
85
86         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
87         expression.
88
89 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
90
91         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
92         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
93         cp/repo.c: Fix copyright years.
94
95 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
96
97         * lex.c: Remove superfluous include of cpplib.h.
98         (CONSTRAINT): Define without conditions.
99         (init_cp_pragma): Use c_register_pragma.
100
101 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
102
103         * .cvsignore: Remove.
104
105 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
106
107         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
108           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
109           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
110           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
111           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
112           copyright header.
113         * lex.h: parse.y is dead, so don't mention it.  Also replace the
114           copyright header with the default GNU copyright header.
115
116 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
117
118         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
119         (lookup_name_namespace_only): Likewise.
120         (begin_only_namespace_names): Likewise.
121         (end_only_namespace_names): Likewise.
122         * decl.c (only_namespace_names): Remove.
123         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
124         (lookup_name_real): Do not check only_namespace_names.
125         (lookup_name_namespace_only): Remove.
126         (begin_only_namespace_names): Likewise.
127         (end_only_namespace_names): Likewise.
128         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
129         nested-name-specifiers more gracefully.
130         (cp_parser_class_or_namespace_name): Avoid looking up namespace
131         names when they cannot possibly appear.
132         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
133         (cp_parser_elaborated_type_specifier): Likewise.
134         (cp_parser_namespace_name): Only look for namespace names.
135         (cp_parser_lookup_name): Add is_namespace parameter.
136         (cp_parser_lookup_name_simple): Adjust call to
137         cp_parser_lookup_name.
138
139         * parser.c (cp_parser_dependent_type_p): Fix thinko.
140
141 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
142
143         * .cvsignore: Update.
144
145 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
146
147         * class.c (modify_vtable_entry): Remove unused variable.
148         (get_vcall_index): Always expect a non-thunk.
149         (update_vtable_entry_for_fn): Combine covariant adjustments, when
150         overriding a thunk. Pass get_vcall_index a non-thunk.
151
152         * decl2.c (finish_file): Mark undefined inlines as extern.
153
154 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
155
156         * cp-tree.def (RETURN_INIT): Remove.
157         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
158         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
159         (note_level_for_for): Remove.
160         (note_level_for_try): Likewise.
161         (note_level_for_catch): Likewise.
162         (finish_named_return_value): Likewise.
163         (do_pushlevel): Change prototype.
164         (pending_lang_change): Remove.
165         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
166         sk_for.
167         (note_level_for_for): Remove.
168         (note_level_for_try): Likewise.
169         (note_level_for_catch): Likewise.
170         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
171         * parser.c (cp_parser_context_free_list): Make it "deletable".
172         (cp_parser_template_argument): Remove misleading comment.
173         * pt.c (tsubst_expr): Remove RETURN_INIT code.
174         * semantics.c (genrtl_named_return_value): Remove.
175         (do_pushlevel): Take a scope kind as an argument.
176         (begin_if_stmt): Adjust.
177         (begin_while_stmt): Likewise.
178         (begin_for_stmt): Likewise.
179         (finish_for_init_stmt): Likewise.
180         (begin_switch_stmt): Likewise.
181         (begin_handler): Likewise.
182         (begin_compound_stmt): Likewise.
183         (finish_named_return_value): Remove.
184         (cp_expand_stmt): Remove RETURN_INIT case.
185         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
186
187 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
188
189         PR c++/9112
190         * parser.c (cp_parser_direct_declarator): Handle erroneous
191         parenthesized declarators correctly.
192
193 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
194
195         * cp-tree.h (pending_lang_change): Declare.
196
197 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
198
199         * parser.c (cp_parser_context_free_list): New variable.
200         (cp_parser_context_new): Use it.
201         (cp_parser_error): Check return code from
202         cp_parser_simulate_error.
203         (cp_parser_simulate_error): Return a value.
204         (cp_parser_id_expression): Optimize common case.
205         (cp_parser_class_name): Likewise.
206         (cp_parser_class_specifier): Adjust call to
207         cp_parser_late_parsing_default_args.
208         (cp_parser_lookup_name): Optimize common case.
209         (cp_parser_late_parsing_for_member): Adjust call to
210         cp_parser_late_parsing_default_args.
211         (cp_parser_late_parsing_default_args): Add scope parameter.
212         (cp_parser_require): Avoid creating the error message unless it's
213         needed.
214         (cp_parser_parse_definitely): Place free'd contexts on the free
215         list.
216
217         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
218
219 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
220
221         * parser.c (cp_parser_parameter_declaration_clause): Treat system
222         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
223
224 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
225
226         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
227         GCC, not GNU CC.
228
229 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
230
231         * parse.y: Remove.
232         * spew.c: Likewise.
233         * Make-lang.in (gt-cp-spew.h): Remove.
234         * cp-tree.h (do_pending_lang_change): Remove.
235         (do_identifier): Change prototype.
236         (finish_id_expr): Remove.
237         * decl.c (lookup_name_real): Remove yylex variable.
238         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
239         * lex.c (init_cpp_parse): Remove.
240         (reduce_cmp): Likewise.
241         (token_cmp): Likewise.
242         (yychar): Likewise.
243         (lastiddecl): Likewise.
244         (token_count): Likewise.
245         (reduce_count): Likewise.
246         (yyhook): Likewise.
247         (print_parse_statistics): Likewise.
248         (do_pending_lang_change): Likewise.
249         (do_identifier): Remove parsing parameter.
250         * lex.h (lastiddecl): Remove.
251         (looking_for_typename): Remove.
252         (looking_for_template): Likewise.
253         (pending_lang_change): Likewise.
254         (yylex): Likewise.
255         * semantics.c (finish_id_expr): Remove.
256
257         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
258         thread" correctly.
259
260 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
261
262         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
263         end, not the C front end.
264
265 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
266
267         * cp-tree.h (THUNK_TARGET): New macro.
268         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
269         (finish_thunk): Remove offset parms.
270         * class.c (find_final_overrider): Look through thunks.
271         (get_vcall_index): Use THUNK_TARGET.
272         (update_vtable_entry_for_fn): Look through thunks. Set covariant
273         fixed offset here. Adjust finish_thunk call.
274         (build_vtbl_initializer): Adjust finish_thunk calls.
275         * mangle.c (mangle_call_offset): Remove superfluous if.
276         (mangle_thunk): Adjust.
277         * method.c (make_thunk): Adjust.
278         (finish_thunk): Adjust.
279         (thunk_adjust): Remove assert.
280         (use_thunk): Use THUNK_TARGET
281         * dump1.c (cp_dump_tree): Adjust thunk dumping.
282
283         PR c++/9054
284         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
285         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
286
287 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
288
289         Remove traditional C constructs 4/n.
290         * decl2.c (grok_method_quals, warn_if_unknown_interface,
291         grok_x_components, cp_build_parm_decl, build_artificial_parm,
292         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
293         delete_sanity, check_member_template, check_java_method,
294         check_classfn, finish_static_data_member_decl, grokfield,
295         grokbitfield, grokoptypename, grok_function_init,
296         cplus_decl_attributes, constructor_name, defer_fn,
297         build_anon_union_vars, finish_anon_union, coerce_new_type,
298         coerce_delete_type, comdat_linkage, maybe_make_one_only,
299         key_method, import_export_vtable, import_export_class,
300         output_vtable_inherit, import_export_decl, import_export_tinfo,
301         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
302         set_guard, start_objects, finish_objects,
303         start_static_storage_duration_function,
304         finish_static_storage_duration_function, get_priority_info,
305         start_static_initialization_or_destruction,
306         finish_static_initialization_or_destruction,
307         do_static_initialization, do_static_destruction,
308         prune_vars_needing_no_initialization, write_out_vars,
309         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
310         add_using_namespace, merge_functions, ambiguous_decl,
311         lookup_using_namespace, lookup_using_namespace,
312         qualified_lookup_using_namespace, set_decl_namespace,
313         decl_namespace, current_decl_namespace, push_decl_namespace,
314         pop_decl_namespace, push_scope, pop_scope, add_function,
315         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
316         lookup_arg_dependent, do_namespace_alias,
317         validate_nonmember_using_decl, do_nonmember_using_decl,
318         do_toplevel_using_decl, do_local_using_decl,
319         do_class_using_decl, do_using_directive, check_default_args,
320         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
321         * parser.c (cp_parser_class_head): Use booleanss.
322         * decl.c (walk_globals, walk_vtables): Likewise.
323         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
324         walk_globals): Change return type from 'int' to 'bool'.
325         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
326         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
327         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
328         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
329         qualifier_flags, tinfo_base_init, generic_initializer,
330         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
331         dfs_class_hint_unmark, class_hint_flags, class_initializer,
332         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
333         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
334         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
335         * repo.c (repo_compile_flags, repo_template_declared,
336         repo_template_defined, repo_class_defined, repo_get_id,
337         repo_template_used, repo_vtable_used, repo_inline_used,
338         repo_tinfo_used, repo_template_instantiated, extract_string,
339         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
340         finish_repo): Likewise.
341         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
342         cxx_print_xnode): Likewise..
343         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
344         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
345         * cxxfilt.c (demangle_it, print_demangler_list, usage,
346         standard_symbol_characters, hp_symbol_characters, main, fatal):
347         Likewise.
348         (strip_underscore):  Change type from 'int' to 'bool'.
349         (main): Use boolean constants.
350
351 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
352
353         Remove traditional C constructs 3/n.
354         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
355         build_up_reference, warn_ref_binding, convert_to_reference,
356         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
357         convert_to_void, convert, convert_force, build_type_conversion,
358         build_expr_type_conversion, type_promotes_to,
359         perform_qualification_conversions): Use C90 prototyping style.
360         * decl2.c (grok_array_decl): Use boolean constant.
361         (delete_sanity): Likewise.
362         * typeck.c (build_unary_op): Likewise.
363         * semantics.c (finish_switch_cond): Likewise.
364         * parser.c (cp_parser_direct_new_declarator): Likewise.
365         * init.c (build_new): Likewise.
366
367 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
368
369         * Make-lang.in (po-generated): Remove parse.c.
370         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
371         ($(srcdir)/cp/parse.h): Remove target.
372         ($(srcdir)/cp/parse.c): Likewise.
373         (gt-cp-parse.h): Likewise.
374         (gt-cp-parser.h): New target.
375         (c++.distclean): Do not remove parse.output.
376         (c++.maintainer-clean): Do not remove parse.c or parse.h.
377         (cp/spew.o): Remove target.
378         (cp/lex.o): Adjust dependencies.
379         (cp/pt.o): Likewise.
380         (cp/parse.o): Likewise.
381         (cp/TAGS): Do not mention parse.c.
382         (cp/parser.o): New target.
383         * NEWS: Mention the new parser.
384         * call.c (build_scoped_method_call): Simplify.
385         (build_method_call): Likewise.
386         (build_new_function_call): Adjust calls to add_function_candidate
387         and add_template_candidate.
388         (build_new_op): Improve handling of erroroneous operands.
389         (convert_default_arg): Remove circular argument processing.
390         (name_as_c_string): New function.
391         (build_new_method_call): Use it.
392         (perform_implicit_conversion): Use error_operand_p.
393         * class.c (finish_struct_anon): Use constructor_name_p.
394         (check_field_decls): Likewise.
395         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
396         (resolve_address_of_overloaded_function): Likewise.
397         (instantiate_type): Tweak pointer-to-member handling.
398         (get_primary_binfo): Remove incorrect assertion.
399         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
400         * cp-tree.h (DEFARG_TOKENS): New macro.
401         (default_arg): New structure.
402         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
403         (lang_tree_node): Add default_arg.
404         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
405         (type_info_ref_type): New macro.
406         (saved_scope): Make processing_explicit_instantiation a boolean.
407         (check_access): New field.
408         (unparsed_text): Remove.
409         (language_function): Remove unparsed_inlines.
410         (error_operand_p): New macro.
411         (lang_decl): Adjust pending_inline_info.
412         (DEFARG_POINTER): Remove.
413         (tag_types): Add typenames.
414         (lookup_ualified_name): Declare.
415         (lookup_name_real): Likewise.
416         (shadow_tag): Adjust prototype.
417         (get_scope_of_declarator): Declare it.
418         (process_next_inline): Remove it.
419         (check_for_missing_semicolon): Likewise.
420         (maybe_get_template_decl_from_type_decl): Declare it.
421         (finish_label_stmt): Adjust prototype.
422         (finish_non_static_data_meber): Declare it.
423         (finish_pseudo_destructor_call_expr): Rename to ...
424         (finish_pseudo_destructor_expr): ... this.
425         (finish_compound_literal): Declare it.
426         (begin_inline_definitions): Remove it.
427         (init_spew): Remove.
428         (peekyylex): Likewise.
429         (arbitrate_lookup): Likewise.
430         (frob_opname): Likewise.
431         (maybe_snarf_defarg): Likewise.
432         (add_defarg_fn): Likewise.
433         (do_pending_defargs): Likewise.
434         (done_pending_defargs): Likewise.
435         (unprocessed_defarg_fn): Likewise.
436         (replace_defarg): Likewise.
437         (end_input): Likewise.
438         (get_overloaded_fn): Likewise.
439         * cvt.c (convert_to_reference): Improve error handling.
440         * decl.c (lookup_name_real): Do not declare it static.
441         (maybe_push_to_top_level): Set check_access.
442         (identifier_type_value): Adjust call to lookup_name_real.
443         (lookup_qualified_name): New method.
444         (lookup_name_real): Remove special-case parsing code.
445         (lookup_name-nonclass): Adjust call to lookup_name_real.
446         (lookup_name_namespace_only): Likewise.
447         (lookup_name): Likewise.
448         (check_tag_decl): Return the type declared.
449         (shadow_tag): Likewise.
450         (register_dtor_fn): Tweak check_access.
451         (grokfndecl): Use constructor_name_p.
452         (get_scope_of_declarator): New function.
453         (grokdeclarator): Obscure tweaks for slightly different declarator
454         representations.
455         (start_method): Return error_mark_node to indicate failure.
456         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
457         * decl2.c (constructor_name_full): Simplify.
458         (constructor_name): Use it.
459         (build_expr_from_tree): Adjust for changes to do new parser.
460         (push_scope): Improve robustness.
461         (validate_nonmember_using_decl): Process declarations, not names.
462         (do_class_using_decl): Likewise.
463         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
464         here.
465         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
466         * expr.c (cxx_expand_expr): Handle BASELINKs.
467         * init.c (member_init_ok_or_else): Issue more errors.
468         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
469         * lex.c: Do not include parse.h.
470         (yypring): Do not declare.
471         (yylval): Likewise.
472         (make_reference_declarator): Remove error-generating code.
473         (rid_to_yy): Remove.
474         (cxx_init): Do not call init_spew.
475         (yypring): Remove.
476         (check_for_missing_semicolon): Remove.
477         * lex.h (got_scope): Remove.
478         (got_object): Remove.
479         * method.c (hack_identifier): Use finish_non_static_data_member.
480         (implicitly_declare_fn): Adjust use of constructor_name.
481         * parser.c: New file.
482         * pt.c (parse.h): Do not include it.
483         (maybe_get_template_decl_from_template): Do not declare it.
484         (finish_member_template_decl): Tweak.
485         (begin_explicit_instantiation): Adjust for
486         processing_explicit_instantiation being boolean.
487         (end_explicit_instantiation): Likewise.
488         (maybe_process_partial_specialization): Tighten specialization
489         test.
490         (retrieve_local_specialization): Adjust ue of hash table.
491         (eq_local_specializations): New function.
492         (register_local_specialization): Likewise.
493         (push_template_decl_real): Remove unnecessary test.
494         (maybe_get_template_decl_from_type_decl): Don't make it static.
495         (for_each_template_parm_r): Handle TYPEOF_TYPE.
496         (tsubst_copy): Use retrieive_local_specialization to handle
497         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
498         Handle COMPONENT_REFs with pseudo-destructor-expressions.
499         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
500         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
501         (unify): Tweak handling of CONST_DECLs.
502         (regenerate_decl_from_template): Use push_nested_class.
503         (template_for_substitution): New funciton.
504         (instantiate_decl): Use it.  Register parameters as local
505         specializations.
506         * rtti.c (init_rtti_processing): Set type_info_ref_type.
507         (build_typeid): Use it.
508         (get_typeid): Likeise.
509         * search.c (accessible_p): Use check_access, not
510         flag_access_control.
511         (adjust_result_of_qualified_name_lookup): Pay attention to the
512         context_class.
513         * semantics.c (finish_asm_stmt): Adjust error handling.
514         (finish_label_stmt): Return the statement.
515         (finish_non_static_data_member): New function.
516         (finish_class_expr): Handle BASELINKs.
517         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
518         (finish_object_call_expr): Simplify handling during templates.
519         (finish_pseudo_destructor_call_expr): Rename to ...
520         (finish_pseudo_dtor_expr): ... this.
521         (finish_compound_literal): New function.
522         (begin_inline_definitions): Remove.
523         (finish_sizeof): Remove special template handling.
524         * spew.c: Do not include parse.h.
525         * tree.c (get_overloaded_fn): Remove.
526         * typeck.c (build_class_member_access_expr): Handle
527         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
528         (lookup_destructor): New function.
529         (finish_class_member_access_expr): Use it.
530         (convert_arguments): Simplify.
531         (build_unary_op): Handle BASELINKs.
532
533 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
534
535         PR c++/4803
536         * decl2.c (mark_used): Defer inline functions.
537         (finish_file): Merge deferred_fns loops. Check all used
538         inline functions have a definition.
539         * method.c (make_thunk): Thunks are not inline.
540
541         PR c++/5116, c++/764
542         * call.c (build_new_op): Make sure template class operands are
543         instantiated.
544
545 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
546
547         PR C++/7964
548         * cp-tree.h (resolve_scoped_fn_name): Prototype.
549         * call.c (resolve_scoped_fn_name): New function. Deal with
550         more template expansion. Broken out of ...
551         * parse.y (parse_finish_call_expr): ... here. Call it.
552         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
553         resolve_scoped_fn_name and build_call_from_tree.
554
555         PR c++/9053
556         * decl.c (duplicate_decls): Templates may be disambiguated by
557         return type.
558
559         PR c++/8702
560         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
561         conversion operators on failure.
562
563 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
564
565         Remove traditional C constructs 2/n.
566         * call.c (tourney, build_field_call, equal_functions, joust,
567         compare_ics, build_over_call, build_java_interface_fn_ref,
568         convert_like_real, op_error, build_object_call, resolve_args,
569         build_vfield_ref, check_dtor_name, build_scoped_method_call,
570         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
571         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
572         standard_conversion, reference_related_p,
573         reference_compatible_p, convert_class_to_reference,
574         direct_reference_binding, reference_binding,
575         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
576         add_template_conv_candidate, any_viable, any_strictly_viable,
577         build_this, splice_viable, print_z_candidates,
578         build_user_type_conversion, build_new_function_call,
579         conditional_conversion, build_conditional_expr, build_new_op,
580         build_op_delete_call, enforce_access, call_builtin_trap,
581         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
582         convert_default_arg, type_passed_as, convert_for_arg_passing,
583         in_charge_arg_for_name, is_properly_derived_from,
584         maybe_handle_implicit_object, maybe_handle_ref_bind,
585         source_type, add_warning, can_convert, can_convert_arg,
586         perform_implicit_conversion, can_convert_arg_bad,
587         initialize_reference, add_conv_candidate,
588         add_template_candidate_real, add_template_candidate): Ansify.
589
590 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
591
592         PR c++/8572
593         * cp-tree.h (grokoptypename): Add SCOPE parameter.
594         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
595         if in a template scope.
596         * parse.y (unoperator): Return the scope.
597         (operator_name): Adjust grokoptypename call.
598
599 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
600
601         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
602         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
603         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
604
605 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
606
607         * ChangeLog: Fix a typo.
608         * class.c: Fix comment typos.
609         * cp-tree.h: Likewise.
610
611 2002-12-18  Jason Merrill  <jason@redhat.com>
612
613         Handle anonymous unions at the tree level.
614         C++ ABI change: Mangle anonymous unions using the name of their
615         first named field (by depth-first search).  Should not cause
616         binary compatibility problems, though, as the compiler previously
617         didn't emit anything for affected unions.
618         * cp-tree.def (ALIAS_DECL): New tree code.
619         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
620         first field, not the largest.
621         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
622         push the decl, and write it out at namespace scope.
623         * decl.c (lookup_name_real): See through an ALIAS_DECL.
624         (pushdecl): Add namespace bindings for ALIAS_DECLs.
625         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
626         of a decl which doesn't have one.
627         * typeck.c (build_class_member_access_expr): Don't recurse if
628         we already have the type we want.
629
630 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
631
632         PR c++/8099
633         * friend.c (make_friend_class): Allow partial specialization
634         when declaration is not a template friend.
635
636 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
637
638         PR c++/3663
639         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
640         TREE_PROTECTED to created decl nodes.
641
642 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
643
644         * class.c (build_base_field): Do not set DECL_PACKED on the
645         FIELD_DECL.
646
647 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
648
649         * cp-tree.h (struct tree_srcloc): Use location_t.
650         (SOURCE_LOCUS): New.
651         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
652
653 2002-12-17  Jason Merrill  <jason@redhat.com>
654
655         * decl.c (finish_function): Also complain about no return in
656         templates.
657         * semantics.c (finish_return_stmt): Also call check_return_expr in
658         templates.
659         * typeck.c (check_return_expr): In a template, just remember that we
660         saw a return.
661
662 2002-12-16  Jason Merrill  <jason@redhat.com>
663
664         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
665         of the CALL_EXPR.
666
667         * semantics.c (do_pushlevel): Call pushlevel after adding the
668         SCOPE_STMT.
669         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
670         * parse.y (function_body): Go back to using compstmt.
671         * decl.c (pushdecl): Skip another level to get to the parms level.
672
673         * call.c (build_new_method_call): Use is_dummy_object to determine
674         whether or not to evaluate the object parameter to a static member
675         function.
676
677 2002-12-14  Jason Merrill  <jason@redhat.com>
678
679         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
680         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
681         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
682         don't bother with an AGGR_INIT_EXPR.
683         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
684         just generate a new decl normally.  Take return slot parm.
685         * cp-tree.h: Adjust prototype.
686
687 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
688
689         PR C++/8031
690         * cvt.c (convert_to_pointer_force): Don't try comparing against
691         erronous type.
692
693 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
694
695         * cp-tree.h: Have the multiple-include guards around
696         the entire file.
697
698 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
699
700         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
701         for SPEW_DEBUG.
702         (snarf_method): Same.
703         (snarf_defarg): Same.
704
705 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
706
707         PR c++/8372
708         * pt.c (tsubst_copy): Handle destructor names more correctly.
709
710 2002-12-10  Matt Austern   <austern@apple.com>
711
712         * cp-tree.h: get rid of needs_virtual_reinit bit.
713
714 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
715
716         * NEWS: Document removal of in-class initialization extension for
717         static data members of non-arithmetic, non-enumeration type.
718         * decl.c (check_static_variable_definition): Do not allow that
719         extension.
720         * decl2.c (grokfield): Do not call digest_init when processing
721         templates.
722
723 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
724
725         * error.c (dump_expr): Fix format specifier warning.
726
727 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
728
729         * class.c (finish_struct_1): Correct comment.
730         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
731
732 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
733
734         PR C++/8799
735         * error.c (dump_expr): Don't ever try to dump a non-existent
736         expression.
737
738 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
739
740         Implement covariant returns.
741         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
742         (struct lang_decl_flags): Add this_thunk_p flag.
743         Rename vcall_offset to virtual_offset.
744         (struct lang_decl): Rename delta to fixed_offset.
745         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
746         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
747         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
748         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
749         (make_thunk): Add this_adjusting arg.
750         (finish_thunk): Declare.
751         (mangle_thunk): Add this_adjusting arg.
752         * class.c (get_vcall_index): Use base function for lookup.
753         (update_vtable_entry_for_fn): Generate covariant thunk.
754         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
755         (build_vtbl_initializer): Use base function for lookup.
756         Finish covariant thunk here. Adjust thunk generation.
757         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
758         Adjust thunk dumping.
759         * mangle.c (mangle_call_offset): New function.
760         (mangle_thunk): Adjust for covariant thunks.
761         * method.c (make_thunk): Adjust. Do not set name here.
762         (finish_thunk): New function. Set name here.
763         (use_thunk): Generate covariant thunks too.
764         (thunk_adjust): New function.
765         * search.c (covariant_return_p): Remove. Fold into ...
766         (check_final_overrider): ... here. Simplify.
767         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
768
769 2002-12-03  Jason Merrill  <jason@redhat.com>
770
771         PR c++/8674
772         * call.c (build_over_call): Check specifically for TARGET_EXPR
773         when eliding.
774
775         PR c++/8461, c++/8625
776         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
777         (cp_convert_parm_for_inlining): Remove.
778         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
779         Remove.
780         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
781         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
782
783         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
784         an ambiguous conversion.
785
786 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
787
788         PR c++/8688
789         * decl.c (reshape_init): Handle erroneous initializers.
790
791 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
792
793         PR c++/8720
794         * spew.c (remove_last_token): Make sure that last_chunk is set
795         correctly.
796
797         PR c++/8615
798         * error.c (dump_expr): Handle character constants with
799         TREE_OVERFLOW set.
800
801 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
802
803         DR 180
804         * decl.c (grokdeclarator): Require class-key for all friend class.
805         Output the correct type and context in the error message.
806
807 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
808
809         PR c++/5919
810         * pt.c (unify): Use variably_modified_type_p to test validity of
811         template argument types.
812
813         PR c++/8727
814         * cp-tree.h (lang_type_class): Add typeinfo_var.
815         (CLASSTYPE_TYPEINFO_VAR): New macro.
816         * rtti.c (get_tinfo_decl): Use it.
817
818         PR c++/8663
819         * init.c (expand_member_init): Always get the main variant of a
820         base class.
821
822 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
823
824         PR c++/8332
825         PR c++/8493
826         * decl.c (cxx_init_decl_processing): Use size_type_node, not
827         c_size_type_node.
828         * decl2.c (coerce_new_type): Likewise.
829         * except.c (do_allocate_exception): Likewise.
830
831 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
832
833         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
834         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
835         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
836         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
837         typeck2.c: Include coretypes.h and tm.h.
838         * Make-lang.in: Update dependencies.
839
840 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
841
842         PR c++/8227
843         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
844         (check_initializer): Validate the type of the initialized
845         variable, even if the initializer is absent.
846         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
847
848         PR c++/8214
849         * typeck.c (convert_for_assignment): Do not use
850         decl_constant_value on the operand.
851
852         PR c++/8511
853         * pt.c (instantiate_decl): Handle template friends defined outside
854         of the class correctly.
855
856 2002-11-29  Joe Buck <jbuck@synopsys.com>
857
858         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
859         anonymous structs.
860
861 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
862
863         * class.c (walk_subobject_offsets): Recur on binfos as well as on
864         types.
865         (layout_nonempty_base_or_field): Pass it a binfo when processing a
866         base class.
867         (layout_empty_base): Likewise.
868         (build_base_field): Likewise.
869
870 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
871
872         * class.c (build_base_field): Make sure we get the canonical base
873         when descending through primary bases.
874
875 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
876
877         * decl.c (check_initializer): Don't error on initialisation of
878         a scalar with a brace-enclosed expression.
879
880 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
881
882         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
883         (template_parms_equal): Remove prototype.
884         * typeck.c (buuld_indirect_ref): Reformat.
885
886 2002-11-25  Jason Merrill  <jason@redhat.com>
887
888         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
889         and a DO_STMT.
890
891 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
892
893         * tree.c (cp_build_qualified_type_real): Correct handling of
894         array types.
895         * class.c (walk_subobject_offsets): Fix thinko.
896         (build_base_field): Record offsets of empty bases in primary
897         virtual bases.
898         (layout_class_type): Record offsets of empty bases in fields.
899
900         * search.c (is_subobject_of_p_1): Fix thinko.
901         (lookup_field_queue_p): Likewise.
902
903 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
904
905         * class.c (layout_class_type): Reuse tail padding when laying out
906         virtual bases.
907
908 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
909
910         * rtti.c (qualifier_flags): Fix thinko.
911
912 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
913
914         Remove traditional C constructs 1/n.
915         * cp-tree.h (init_method, set_mangled_name_for_decl,
916         build_opfncall, hack_identifier, make_thunk, use_thunk,
917         synthesize_method, implicitly_declare_fn,
918         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
919         maybe_clone_body): Remove use of PARAMS.
920
921         * method.c (do_build_assign_ref, do_build_copy_constructor,
922         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
923         Likewise.
924         (synthesize_method): Use 'bool' type and constants instead of
925         'int'.
926         (locate_copy): Likewise.
927         (implicitly_declare_fn): Likewise.
928
929         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
930         Remove old-style declaration.
931         (maybe_clone_body): Use 'bool' type and constants.
932
933 2002-11-21  Glen Nakamura  <glen@imodulo.com>
934
935         PR c++/8342
936         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
937         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
938         of the branches of a COND_EXPR.
939
940 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
941
942         * pt.c (for_each_template_parm): Free allocated memory.
943         * search.c (is_subobject_of_p_1): New function.
944         (is_subobject_of_p): Avoid walking virtual bases multiple times.
945
946 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
947
948         * g++spec.c (lang_specific_spec_functions): New.
949
950 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
951
952         * ChangeLog: Follow spelling conventions.
953         * class.c: Likewise.
954         * decl2.c: Likewise.
955
956 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
957
958         * search.c (dfs_push_decls): Do not try to reorder elements
959         3..n of method_vec if method_vec has only two elements.
960         Reverse order of two tests to avoid accessing unallocated
961         memory.
962
963 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
964
965         * class.c (dfs_find_final_overrider): Adjust so that the most
966         derived object is a binfo, rather than a class type.
967         (find_final_overrider): Likewise.
968         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
969         (add_vcall_offset): Likewise.
970
971 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
972
973         PR c++/8389
974         * pt.c (instantiate_template): Push class scope for member
975         functions.
976         (get_mostly_instantiated_function_type): Likewise.  Don't call
977         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
978         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
979         * mangle.c (write_encoding, write_unqualified_name): Adjust.
980
981 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
982
983         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
984         vcall offfsets.  Split out ...
985         (add_vcall_offset): ... new function.
986
987         PR c++/8338
988         * pt.c (for_each_template_parm): Add htab parameter.
989         (process_partial_specialization): Adjust call.
990         (push_template_decl_real): Likewise.
991         (pair_fn_data): Add visited.
992         (for_each_template_parm_r): Avoid walking duplicates more than
993         once.
994         (uses_template_parms): Adjust call to for_each_template_parm.
995
996 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
997
998         * class.c (add_implicitly_declared_members): Put implicitly
999         declared functions at the end of TYPE_METHODs when -fabi-version
1000         is at least 2.
1001
1002 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
1003
1004         * decl2.c (finish_file): Correct spelling.
1005
1006 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
1007
1008         * call.c (build_special_member_call): Do not try to lookup VTTs by
1009         name.
1010         * class.c (vtbl_init_data): Add generate_vcall_entries.
1011         (get_vtable_decl): Do not look up virtual tables by name.
1012         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
1013         (set_primary_base): Do not set CLASSTYPE_RTTI.
1014         (determine_primary_base): Likewise.
1015         (get_matching_virtual): Remove.
1016         (get_vcall_index): New function.
1017         (update_vtable_entry_for_fn): Do not try to use virtual thunks
1018         when they are not required.  Assign vcall indices at this point.
1019         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
1020         Do update dynamic_classes.
1021         (build_vtt): Do not add VTTs to the symbol table.
1022         (build_ctor_vtbl_group): Likewise.
1023         (build_vtbl_initializer): Simplify handling of vcall indices.
1024         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
1025         for the most derived class.
1026         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
1027         the vtable.
1028         * cp-tree.h (dynamic_classes): New macro.
1029         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
1030         (CLASSTYPE_RTTI): Remove.
1031         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
1032         (CLASSTYPE_VCALL_INDICES): New macro.
1033         (CLASSTYPE_VTABLES): Likewise.
1034         (BV_USE_VCALL_INDEX_P): Remove.
1035         (build_vtable_path): Remove.
1036         * decl2.c (finish_vtable_vardecl): Remove.
1037         (key_method): Remove #if 0'd code.
1038         (finish_vtable_vardecl): Rename to ...
1039         (maybe_emit_vtables): ... this.
1040         (finish_file): Use it.
1041         * search.c (look_for_overrides_here): Update comment.
1042
1043 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
1044
1045         PR c/7353 redux
1046         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
1047
1048 2002-10-30  Jason Merrill  <jason@redhat.com>
1049
1050         PR c++/8186
1051         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
1052         * call.c (convert_for_arg_passing): Set it.
1053         * except.c (stabilize_throw_expr): Recurse for such an arg.
1054
1055 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
1056
1057         * cp-tree.h (lang_decl_flags): Remove init_priority.
1058         (lang_decl): Add delta.
1059         (GLOBAL_INIT_PRIORITY): Remove.
1060         (THUNK_DELTA): Revise definition.
1061         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
1062         * dump.c (cp_dump_tree): Don't dump it.
1063
1064 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
1065
1066         PR c++/8160
1067         * typeck2.c (process_init_constructor): Call complete_array_type.
1068
1069         PR c++/8149
1070         * decl.c (make_typename_type): Issue errors about invalid results.
1071
1072 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1073
1074         Core issue 287, PR c++/7639
1075         * cp-tree.h (lang_type_class): Add decl_list field.
1076         (CLASSTYPE_DECL_LIST): New macro.
1077         (maybe_add_class_template_decl_list): Add declaration.
1078         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
1079         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
1080         (maybe_add_class_template_decl_list): New function.
1081         (add_implicitly_declared_members): Use it.
1082         * decl.c (maybe_process_template_type_declaration): Likewise.
1083         (pushtag): Likewise.
1084         * friend.c (add_friend): Likewise.
1085         (make_friend_class): Likewise.
1086         * semantics.c (finish_member_declaration): Likewise.
1087         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
1088         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
1089         to process members and friends in the order of declaration.
1090
1091 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
1092
1093         PR c++/8287
1094         * decl.c (finish_destructor_body): Create the label to jump to
1095         when returning from a destructor here.
1096         (finish_function_body): Rather than here.
1097
1098 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
1099
1100         PR c++/7266
1101         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
1102         SCOPE_REF is not null before dereferencing it.
1103
1104 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
1105
1106         * call.c (build_over_call): Use DECL_CONTEXT, not
1107         DECL_VIRTUAL_CONTEXT.
1108         * class.c (modify_vtable_entry): Don't mess with
1109         DECL_VIRTUAL_CONTEXT.
1110         (set_vindex): Remove.
1111         (set_primary_base): Remove vfuns_p parameter.
1112         (determine_primary_base): Likewise.
1113         (modify_all_vtables): Likewise.
1114         (layout_class_type): Likewise.  Adjust calls to other functions
1115         accordingly.
1116         (finish_struct_1): Adjust calls to modified functions.  Set
1117         DECL_VINDEX here.
1118         * cp-tree.h (lang_type_class): Remove vsize.
1119         (CLASSTYPE_VSIZE): Remove.
1120         (lang_decl): Remove thunks.
1121         (DECL_THUNKS): Adjust.
1122         (DECL_VIRTUAL_CONTEXT): Remove.
1123         (duplicate_decls): Don't copy it.
1124         * pt.c (build_template_decl): Don't set it.
1125         (tsubst_decl): Likewise.
1126         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
1127
1128         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
1129         (build_vtable_entry): Remove.
1130         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
1131         (lang_decl): Add thunks.
1132         (DECL_THUNKS): New macro.
1133         * decl.c (duplicate_decls): Copy it.
1134         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
1135         * semantics.c (emit_associated_thunks): Simplify.
1136
1137 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
1138
1139         PR c++/7228
1140         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
1141         lang_type structure exists before accessing field.
1142         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
1143         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
1144         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
1145         * class.c (check_field_decls): Use new macros.
1146         * typeck2.c (process_init_constructor): Remove redundant check for
1147         existence of lang_type structure.
1148
1149 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
1150
1151         * class.c (end_of_base): New method.
1152         (end_of_class): Use it.  Check indirect virtual bases.
1153
1154         * class.c (check_field_decls): Fix typo.
1155
1156 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
1157
1158         PR c++/8067
1159         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
1160         related variables.
1161
1162         PR c++/7679
1163         * spew.c (next_token): Do not return an endless stream of
1164         END_OF_SAVED_INPUT tokens.
1165         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
1166         the cached token stream.
1167         (snarf_defarg): Likewise.
1168
1169 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
1170
1171         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
1172         variably_modified_type_p.
1173         * cp-tree.h: Remove prototype of variably_modified_type_p.
1174         * tree.c (variably_modified_type_p): Remove; now implemented
1175         in language-independent code.
1176
1177 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
1178
1179         PR c++/6579
1180         * spew.c (snarf_parenthesized_expression): New function.
1181         (snarf_block): Use it.
1182
1183 2002-10-22  Richard Henderson  <rth@redhat.com>
1184
1185         * method.c (use_thunk): Always compute vcall_value; assert that
1186         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
1187         for vcall thunks as well.
1188
1189 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
1190
1191         * class.c (empty_base_at_nonzero_offset_p): New function.
1192         (layout_nonempty_base_or_field): Do not check for conflicts when
1193         laying out a virtual base using the GCC 3.2 ABI.
1194         (build_base_field): Correct checking for presence of empty classes
1195         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
1196
1197         * class.c (include_empty_classes): Use normalize_rli.
1198         (layout_class_type): Likewise.
1199
1200         * decl.c (reshape_init): Tweak handling of character arrays.
1201
1202         PR c++/8218
1203         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
1204         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
1205         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
1206         (check_field_decls): Likewise.
1207         (layout_class_type): Likewise.
1208         (finish_struct_1): Initialize it.
1209         (walk_subobject_offsets): Use it to prune searches.
1210
1211 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
1212
1213         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
1214         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
1215         TARGET_ASM_OUTPUT_MI_THUNK in comments.
1216
1217 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
1218
1219         * decl.c (start_decl): Point users of the old initialized-
1220         typedef extension at __typeof__.
1221
1222 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
1223
1224         * Make-lang.in (method.o): Depend on TARGET_H.
1225         * method.c (target.h): Include it.
1226         (use_thunk): Use target hooks.  Use vcall thunks, if available.
1227
1228 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
1229
1230         * class.c (base_derived_from): Make sure return value is a bool.
1231
1232 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
1233
1234         * class.c (find_final_overrider_data_s): Remove overriding_fn and
1235         overriding_base.
1236         (dfs_base_derived_from): New function.
1237         (base_derived_from): Likewise.
1238         (dfs_find_final_overrider): Use base_derived_from.
1239         (find_final_overrider): Adjust.
1240
1241 2002-10-18  Jason Merrill  <jason@redhat.com>
1242
1243         PR c++/8080
1244         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
1245         with condition decls in a template.
1246
1247 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
1248
1249         * class.c (add_method): Compare template parms too.
1250
1251 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
1252
1253         PR c++/7584
1254         * class.c (handle_using_decl): Allow the declaration used to be
1255         from an ambiguous base.
1256
1257         * pt.c (convert_template_argument): Revert this change:
1258                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
1259                 * pt.c (convert_template_argument): Do not fold non-type
1260                 template rguments when inside a template.
1261
1262         * init.c (expand_default_init): Handle brace-enclosed initializers
1263         correctly.
1264
1265 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
1266
1267         * mangle.c (write_expression): Correct handling of enumeration
1268         constants.
1269         (write_template_arg): Likewise.
1270         * pt.c (convert_template_argument): Do not fold non-type template
1271         arguments when inside a template.
1272
1273         PR c++/7478
1274         * cvt.c (convert_to_reference): Allow references as the incoming
1275         type.
1276
1277 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
1278
1279         PR c++/7524
1280         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
1281         build_qualified_type.
1282
1283 2002-10-15  Richard Henderson  <rth@redhat.com>
1284
1285         * error.c (dump_expr): Use real_to_decimal directly, and with
1286         the new arguments.
1287
1288 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
1289
1290         * decl.c (reshape_init): Fix typo.
1291
1292         * cp-tree.h (operator_name_info_t): Add arity.
1293         * lex.c (init_operators): Initialize it.
1294         * mangle.c (write_conversion_operator_name): New function.
1295         (write_unqualified_name): Use it.
1296         (write_template_args): Accept template arguments as a TREE_LIST.
1297         (write_expression): Adjust handling of qualified names to match
1298         specification.
1299
1300 2002-10-15  Jason Merrill  <jason@redhat.com>
1301
1302         * call.c (call_builtin_trap): New fn.
1303         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
1304         (build_call): Don't set current_function_returns_abnormally outside
1305         a function.
1306
1307 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
1308
1309         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
1310         clear CLASSTYPE_EMPTY_P.
1311         (build_base_field): Likewise.
1312         (build_base_fields): Likewise.
1313         (check_bases_and_members): Likewise.
1314         (create_vtbl_ptr): Likewise.
1315         (layout_class_type): Likewise.  Ensure that empty classes have
1316         size zero when used as base classes in the 3.2 ABI.
1317         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
1318         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
1319         parameter.
1320         (is_empty_class): Correct definition when using post-3.2 ABI.
1321         * cp-tree.h (lang_type_class): Add empty_p.
1322         (CLASSTYPE_EMPTY_P): New macro.
1323
1324 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
1325
1326         * init.c (build_delete): Do not apply save_expr for arrays.
1327         (build_vec_delete): Likewise.
1328
1329 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
1330
1331         * decl.c (layout_var_decl): Call layout_decl even for variables
1332         whose type is an array with unspecified bounds.
1333
1334         PR c++/7176
1335         * lex.c (do_identifier): Add another option for the parsing
1336         parameter.
1337         * parse.y (do_id): Use it.
1338
1339 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1340
1341         PRs C++/6803, C++/7721 and C++/7803
1342         * decl.c (grokdeclarator): Gracefully handle template-name as
1343         decl-specifier.
1344
1345 2002-10-11  Jason Molenda  <jmolenda@apple.com>
1346
1347         * init.c (build_field_list): Provide uses_unions_p with a default
1348         value.
1349
1350 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
1351
1352         PR c++/5661
1353         * cp-tree.h (variably_modified_type_p): New function.
1354         (grokdeclarator) Tighten check for variably modified types as
1355         fields.
1356         * pt.c (convert_template_argument): Do not allow variably modified
1357         types as template arguments.
1358         * tree.c (variably_modified_type_p): New function.
1359
1360         * NEWS: Document removal of "new X = ..." extension.
1361         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
1362         brace-enclosed initializers.
1363         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
1364         (initialize_local_var): Remove declaration.
1365         (expand_static_init): Likewise.
1366         * decl.c (next_initializable_field): New function.
1367         (reshape_init): Likewise.
1368         (check_initializer): Use them.  Build dynamic initializer for
1369         aggregates here too.
1370         (initialize_local_var): Simplify, and incorporate cleanup
1371         insertion code as well.
1372         (destroy_local_var): Remove.
1373         (cp_finish_decl): Tidy.
1374         (expand_static_init): Fold checks for whether or not a variable
1375         needs initialization into this function.  Simplify.
1376         * decl2.c (do_static_initialization): Simplify.
1377         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
1378         be done for us automatically.
1379         (expand_default_init): Handle brace-enclosed initializers
1380         correctly.
1381         (expand_aggr_init_1): Remove RTL-generation code.
1382         (build_vec_init): Remove "new X = ..." support.
1383         * parse.y (new_initializer): Likewise.
1384         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
1385         brace-enclosed initializer.
1386         (create_pseudo_type_info): Likewise.
1387         * typeck2.c (store_init_value): Don't try to handle digest_init
1388         being called more than once.
1389         (digest_init): Tidy handling of brace-enclosed initializers.
1390
1391 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1392
1393         * decl.c (typename_hash): Use htab_hash_pointer.
1394
1395 2002-10-10  Jim Wilson  <wilson@redhat.com>
1396
1397         * decl.c (duplicate_decls): Don't call decl_attributes.
1398
1399 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
1400
1401         PR c/7353
1402         * decl.c (start_decl): Unconditionally issue error for
1403         'typedef foo = bar'.
1404         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
1405         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
1406
1407 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1408
1409         * decl2.c (prune_vtable_vardecl): Delete unused function.
1410
1411 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
1412
1413         PR c++/7754
1414         * decl2.c (finish_anon_union): Do not expand anonymous unions when
1415         procesing template functions.
1416         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
1417         type. Call layout_decl.
1418         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
1419
1420 2002-10-07  Richard Henderson  <rth@redhat.com>
1421
1422         * decl2.c, pt.c: Revert c++/7754 fix.
1423
1424 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1425
1426         PR c++/7804
1427         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
1428
1429 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
1430
1431         PR c++/7931
1432         * pt.c (for_each_template_parm_r): Handle BASELINKs.
1433
1434         PR c++/7754
1435         * decl2.c (finish_anon_union): Do not expand anonymous unions when
1436         procesing template functions.
1437         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
1438         type. Call layout_decl.
1439         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
1440
1441 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
1442
1443         PR c++/8006
1444         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
1445         template parameters.
1446         (globals): Add entity and need_abi_warning.
1447         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
1448         CLASSTYPE_TEMPLATE_INFO.
1449         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
1450         TYPE_TI_TEMPLATE.
1451         (write_prefix): Handle typename types correctly.
1452         (write_template_prefix): Handle template template parameters
1453         correctly.
1454         (start_mangling): Add entity parameter.
1455         (finish_mangling): Warn about names whose mangling will change.
1456         (mangle_decl_string): Adjust.
1457         (mangle_type_string): Likewise.
1458         (mangle_special_for_type): Likewise.
1459         (mangle_ctor_vtbl_for_type): Likewise.
1460         (mangle_thunk): Likewise.
1461         (mangle_guard_variable): Likewise.
1462         (mangle_ref_init_variable): Likewise.
1463
1464 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
1465
1466         PR c++/7188.
1467         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
1468         * cp-tree.h (emit_base_init): Rename to ....
1469         (emit_mem_initializers): ... this.
1470         (expand_member_init): Change prototype.
1471         * init.c (perform_member_init): Compute explicit, rather than
1472         requiring it as a parameter.
1473         (sort_member_init): Rename to ...
1474         (sort_mem_initializers): ... this.  Process bases and data members
1475         together.
1476         (sort_base_init): Remove.
1477         (emit_base_init): Rename to ...
1478         (emit_mem_initializers): ... this.
1479         (expand_aggr_vbase_init_1): Remove.
1480         (construct_virtual_bases): Rename to ...
1481         (construct_virtual_base): ... this.
1482         (expand_member_init): Rework handling of base initializers.
1483         * method.c (do_build_copy_constructor): Use
1484         finish_mem_initializers.
1485         * parse.y (member_init): Adjust calls to expand_member_init.
1486         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
1487         (tsubst_initializer_list): Use expand_member_init.
1488         * semantics.c (finish_mem_intiailizers): Simplify.
1489
1490 2002-10-02  Matt Austern  <austern@apple.com>
1491         * decl.c (walk_vtables_r): Fixed typo that caused result to
1492         never get a nonzero value.
1493
1494 2002-10-02  Roger Sayle  <roger@eyesopen.com>
1495
1496         PR optimization/6627
1497         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
1498         from here, and move it to tree.h.
1499         * decl.c (cxx_init_decl_processing): If storing the vbit
1500         in function pointers, ensure that force_align_functions_log
1501         is atleast one.
1502
1503 2002-10-02  Matt Austern  <austern@apple.com>
1504
1505         * class.c (check_field_decls): Changed warning about const member
1506         variables so that it doesn't get issued for a class aggregate.
1507
1508 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
1509
1510         * decl.c (cp_finish_decl): Make sure array types are laid out,
1511         even if the array bounds are unknown.
1512
1513 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
1514
1515         * class.c (build_vtbl_initializer): Change build_c_cast
1516         to build1.
1517
1518 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
1519
1520         * decl.c (cp_finish_decl): Make sure array types are laid out,
1521         even if the array bounds are unknown.
1522
1523         * decl.c (cp_finish_decl): Correct check for dynamic
1524         initialization of thread-local storage.
1525
1526 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
1527
1528         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
1529         overloaded.
1530
1531 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
1532
1533         * class.c (build_vtbl_initializer): Add cast.
1534         (add_vcall_offset_vtbl_entries_1):
1535         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
1536
1537 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
1538
1539         * class.c (walk_subobject_offsets): Correct the calculation of
1540         offsets for virtual bases.  Correct the counting of array
1541         elements.
1542         (layout_nonempty_base_or_field): Simplify.  Correct the
1543         calculation of offsets to be propagated through the binfo
1544         hierarchy.
1545         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
1546         Add the FIELD_DECL to TYPE_FIELDS.
1547         (build_base_fields): Adjust accordingly.
1548         (layout_virtual_bases): Use build_base_field.
1549         (end_of_class): Return a tree, not an integer.
1550         (warn_about_ambiguous_direct_bases): Rename to ...
1551         (warn_about_ambiguous_bases): ... this.
1552         (include_empty_classes): New function.
1553         (layout_class_type): Create an alternative version of the type to
1554         be used when as a base class type.  Do not call
1555         finish_record_layout until we are done laying out the class.
1556         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
1557         as_base.
1558         (CLASSTYPE_SIZE): Reimplement.
1559         (CLASSTYPE_SIZE_UNIT): Likewise.
1560         (CLASSTYPE_ALIGN): Likweise.
1561         (CLASSTYPE_USER_ALIGN): Likewise.
1562         (CLASSTYPE_AS_BASE): New macro.
1563         (DECL_INITIALIZED_P): Likewise.
1564         (extract_init): Remove prototype.
1565         (build_forced_zero_init): Rename to ...
1566         (build_zero_init): ... this.
1567         (force_store_init_value): Remove.
1568         * decl.c (obscure_complex_init): Remove.
1569         (duplicate_decls): Copy DECL_INITIALIZED_P.
1570         (check_initializer): Do not leave junk in DECL_INITIAL.
1571         (cp_finish_decl): Handle zero-initialization of entities with
1572         static storage duration.
1573         * expr.c (extract_init): Remove.
1574         * init.c (build_forced_zero_init): Remove.
1575         (build_zero_init): New function.
1576         (build_default_init): Use it.
1577         (build_field_list): Skip FIELD_DECLs for base subobjects.
1578         (push_base_cleanups): Likewise.
1579         * method.c (do_build_assign_ref): Likewise.
1580         (synthesize_exception_spec): Likewise.
1581         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
1582         (regenerate_decl_from_template): To not set DECL_INITIAL for a
1583         static data member whose initialization took place in its class.
1584         (instantiate_decl): Do not pass an initializer to cp_finish_decl
1585         in that situation.
1586         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
1587         (dfs_unuse_fields): Likewise.
1588         * tree.c (pod_type_p): Handle error_mark_node.
1589         (zero_init_p): Likewise.
1590         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
1591         subobjects.
1592         * typeck2.c (store_init_value): Remove #if 0'd code.
1593         (force_store_init_value): Remove.
1594         (process_init_constructor): Use build_zero_init.
1595
1596 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
1597
1598         PR c++/7788
1599         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
1600
1601 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
1602
1603         * cp-tree.h: Fix comment typos.
1604         * decl.c: Likewise.
1605         * pt.c: Likewise.
1606
1607 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
1608
1609         * cp/class.c (contains_empty_class_p): New method.
1610         (walk_subobject_offsets): Correct computation of field offset.
1611         (layout_empty_base): Correct placement of emtpy base classes.
1612         (layout_class_type): Warn about ABI changes.
1613
1614 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
1615
1616         * cp/class.c (layout_virtual_bases): Do not round the size of the
1617         type to a multiple of the alignment before laying out virtual bases.
1618         (layout_class_type): Correct handling of bit-fields that are wider
1619         than their type inside unions.  Round the size of the type to a
1620         even number of bytes when computing the size without virtual
1621         bases.
1622         * cp/cp-tree.h (abi_version_at_least): New macro.
1623
1624 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
1625
1626         * ChangeLog: Follow spelling conventions.
1627         * ChangeLog.2: Likewise.
1628         * call.c: Likewise.
1629         * class.c: Likewise.
1630         * cp-tree.h: Likewise.
1631         * cvt.c: Likewise.
1632         * decl.c: Likewise.
1633         * decl2.c: Likewise.
1634         * except.c: Likewise.
1635         * friend.c: Likewise.
1636         * g++spec.c: Likewise.
1637         * init.c: Likewise.
1638         * lex.c: Likewise.
1639         * mangle.c: Likewise.
1640         * method.c: Likewise.
1641         * operators.def: Likewise.
1642         * optimize.c: Likewise.
1643         * pt.c: Likewise.
1644         * rtti.c: Likewise.
1645         * search.c: Likewise.
1646         * semantics.c: Likewise.
1647         * spew.c: Likewise.
1648         * tree.c: Likewise.
1649         * typeck.c: Likewise.
1650
1651 2002-09-18  Devang Patel  <dpatel@apple.com>
1652
1653         * cp/cp-tree.h: New prototype for walk_vtabls().
1654         * cp/decl.c (walk_vtables_r): New function.
1655         (struct cp_binding_level): Add new members, namespaces,
1656         names_size and vtables.
1657         (add_decl_to_level): Add decl in namespaces or vtables
1658         chain, if conditions match.
1659         (walk_vtables): New function.
1660         (walk_namespaces_r): Travers separate namespace chain
1661         for namespace decls.
1662         (wrapup_globals_for_namespace): Use names_size instead
1663         of list_length().
1664         * cp/decl2.c (finish_file): Use walk_vtables() instead of
1665         walk_globals() to walk vtable decls.
1666
1667 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
1668
1669         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
1670         ICE with invalid pointers & references.
1671
1672 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
1673
1674         * Make-lang.in: Remove all references to the demangler.
1675         * cxxfilt.c: Moved to binutils.
1676
1677 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
1678
1679         PR c++/7718
1680         * pt.c (tsubst_decl): Remove assert.
1681
1682         Remove DR 295 implementation.
1683         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
1684         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
1685         about ignoring volatile qualifiers.
1686
1687         * search.c (lookup_member): Correct documentation.
1688
1689 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
1690
1691         * cp-tree.h (union lang_tree_node): Add chain_next option.
1692
1693 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
1694
1695         * parse.y (parse_finish_call_expr): Check lookup_member result.
1696
1697         PR c++/7015
1698         * semantic.c (finish_asm_stmt): Fix operand/output_operands
1699         thinko.
1700         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
1701
1702 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
1703
1704         PR c++/7919
1705         * call.c (build_over_call): Convert this pointer for fns found by
1706         using decls.
1707
1708 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
1709
1710         * ChangeLog: Follow spelling conventions.
1711         * ChangeLog.1: Likewise.
1712
1713 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
1714
1715         PR c++/7768
1716         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
1717
1718 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
1719
1720         * error.c: Fix comment formatting.
1721         * except.c: Likewise.
1722         * expr.c: Likewise.
1723         * friend.c: Likewise.
1724         * g++spec.c: Likewise.
1725         * init.c: Likewise.
1726         * lex.c: Likewise.
1727         * mangle.c: Likewise.
1728         * method.c: Likewise.
1729         * optimize.c: Likewise.
1730         * pt.c: Likewise.
1731         * rtti.c: Likewise.
1732         * search.c: Likewise.
1733         * semantics.c: Likewise.
1734         * spew.c: Likewise.
1735         * tree.c: Likewise.
1736         * typeck.c: Likewise.
1737         * typeck2.c: Likewise.
1738
1739 2002-09-13  Matt Austern  <austern@apple.com>
1740
1741         PR C++/7828
1742         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
1743         * cp/call.c: Change call-by-const-reference mechanism to use
1744         non_cast_lvalue_p when deciding whether the create a temporary.
1745         We need a temporary when passing, e.g. (long) x by const ref.
1746
1747 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
1748
1749         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
1750
1751 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
1752
1753         * decl.c: Fix comment formatting.
1754         * decl2.c: Likewise.
1755
1756 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
1757
1758         * call.c: Fix comment formatting.
1759         * class.c: Likewise.
1760         * cp-lang.c: Likewise.
1761         * cp-tree.h: Likewise.
1762         * cvt.c: Likewise.
1763
1764 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
1765
1766         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
1767         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
1768         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
1769         minor adjustments (use version_string, eliminate yet another
1770         duplicate of xmalloc)
1771
1772 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1773
1774         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
1775
1776 2002-09-05  Jason Merrill  <jason@redhat.com>
1777
1778         * typeck2.c (add_exception_specifier): Only pedwarn for an
1779         incomplete type.
1780         (require_complete_eh_spec_types): New fn.
1781         (cxx_incomplete_type_diagnostic): Also support pedwarning.
1782         * typeck.c (complete_type_or_diagnostic): Likewise.
1783         * call.c (build_call): Call require_complete_eh_spec_types.
1784         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
1785         on an incomplete type.
1786
1787 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
1788
1789         * decl.c (start_cleanup_fn): Clear interface_only before
1790         start_function, restore it afterwards.
1791
1792 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
1793
1794         * cp-tree.h (finish_builtin_type): Remove.
1795         * decl2.c (finish_builtin_type): Move to common code.
1796         * decl.c (build_ptrmemfunc_type): Adjust.
1797         * rtti.c (create_pseudo_type_info): Adjust.
1798         (create_tinfo_types): Adjust.
1799
1800 2002-08-31  Jason Merrill  <jason@redhat.com>
1801
1802         * cp-lang.c (cp_expr_size): Allow initialization from a
1803         CONSTRUCTOR.
1804
1805 2002-08-30  Richard Henderson  <rth@redhat.com>
1806
1807         PR opt/7515
1808         * tree.c: Include target.h.
1809         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
1810         don't bind locally.
1811         * Makefile.in (tree.o): Update.
1812
1813 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
1814
1815         * class.c (layout_virtual_bases): Warn about bugs in G++ that
1816         result in incorrect object layouts.
1817         (layout_class_type): Likewise.
1818
1819 2002-08-24  Matt Austern  <austern@apple.com>
1820
1821         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
1822         are allowable.
1823         (real_lvalue_p): Update caller.
1824         (lvalue_p): Ditto.
1825         (non_cast_lvalue_or_else): New.
1826         * tree.h: Declare it.
1827         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
1828
1829 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
1830
1831         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
1832         and COND_EXPR specially; fix error message output.
1833
1834 2002-08-22  Jason Merrill  <jason@redhat.com>
1835
1836         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
1837         * semantics.c (nullify_returns_r): Likewise.
1838
1839 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1840
1841         Fix PR/7621
1842         * typeck.c (finish_class_member_access_expr): Diagnose cases where
1843         name lookup finds nothing.
1844
1845 2002-08-15  Jason Merrill  <jason@redhat.com>
1846
1847         * semantics.c (finish_then_clause): Remove redundant assignment.
1848         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
1849         extra binding level outside the if/switch statement.
1850         (finish_while_cond, finish_for_cond): Rewrite complex condition
1851         into the loop body.
1852
1853 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
1854
1855         * parse.y (sizeof, alignof, typeof): New non-terminals to
1856         increment skip_evaluation.  Replace terminals with them and
1857         decrement skip_evaluation at the end of rules using them.
1858         * decl2.c (mark_used): Don't assemble_external if
1859         skipping evaluation.
1860
1861 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
1862
1863         Fix PR/7504
1864         * parse.y (parse_finish_call_expr): Handle incomplete
1865         type used to name a scope.
1866
1867 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1868
1869         PR c++/7598
1870         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
1871         regression caused by my 2002-08-08 patch.
1872
1873 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
1874
1875         * decl.c (pushdecl_class_level): Honor requests to bind names to
1876         OVERLOADs.
1877
1878 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1879
1880         * decl2.c (build_call_from_tree): Fix uninitialized variable.
1881         * parse.y (parse_finish_call_expr): Likewise.
1882         * repo.c (old_args, old_dir, old_main): Const-ify.
1883
1884 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
1885
1886         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
1887         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
1888         * optimize.c (maybe_clone_body): Likewise.
1889         * pt.c (tsubst_enum): Likewise.
1890         (lookup_template_class): Likewise.
1891         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
1892
1893 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
1894
1895         * lang-specs.h: Remove -ansi.
1896
1897 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
1898
1899         * tree.c (maybe_dummy_object): Replace // with /* */
1900
1901 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
1902
1903         * call.c (standard_conversion): Use build_ptrmem_type.
1904         * cp-tree.h (build_ptrmem_type): New function.
1905         (adjust_result_of_qualified_name_lookup): Likewise.
1906         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
1907         static data members.
1908         (build_ptrmem_type): New function.
1909         (grokdeclarator): Do not use build_offset_type when encountering a
1910         qualified name.
1911         * parse.y (parse_finish_call_expr): Use
1912         adjust_result_of_qualified_name_lookup.
1913         * search.c (adjust_result_of_qualified_name_lookup): New function.
1914         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
1915         accessing OFFSET_TYPEs directly.
1916
1917 2002-08-08  Mike Stump  <mrs@apple.com>
1918
1919         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
1920         (type_decays_to): Likewise.
1921         * class.c (find_final_overrider): Likewise.
1922         (maybe_note_name_used_in_class): Likewise.
1923         * decl.c (current_tmpl_spec_kind): Likewise.
1924         (add_binding): Likewise.
1925         (push_class_binding): Likewise.
1926         (duplicate_decls): Likewise.
1927         (layout_var_decl): Likewise.
1928         (grokfndecl): Likewise.
1929         (grokdeclarator): Likewise.
1930         (check_default_argument): Likewise.
1931         * decl2.c (handle_class_head): Likewise.
1932         * error.c (dump_template_decl): Likewise.
1933         * init.c (build_offset_ref): Likewise.
1934         * pt.c (check_specialization_scope): Likewise.
1935         (determine_specialization): Likewise.
1936         (check_explicit_specialization): Likewise.
1937         (maybe_check_template_type): Likewise.
1938         (process_partial_specialization): Likewise.
1939         (check_default_tmpl_args): Likewise.
1940         (push_template_decl_real): Likewise.
1941         (convert_template_argument): Likewise.
1942         (try_class_unification): Likewise.
1943         (get_bindings_real): Likewise.
1944         (do_decl_instantiation): Likewise.
1945         * semantics.c (begin_function_definition): Likewise.
1946         (finish_member_declaration): Likewise.
1947         (check_multiple_declarators): Likewise.
1948         * typeck.c (comp_array_types): Likewise.
1949         (comptypes): Likewise.
1950         (expr_sizeof): Likewise.
1951         (build_binary_op): Likewise.
1952         (dubious_conversion_warnings): Likewise.
1953         (check_return_expr): Likewise.
1954
1955 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
1956
1957         * typeck.c (build_class_member_access_expr): Do not return
1958         error_mark_node when no error has occurred.
1959
1960 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
1961
1962         * typeck.c (build_component_addr): Remove.
1963         (build_unary_op): Just check it's not a bitfield, and then build
1964         an ADDR_EXPR.
1965
1966 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
1967
1968         * class.c (convert_to_base): Correct check for error_mark_node.
1969         (create_vtable_ptr): Remove unused VFUNS_P parm.
1970
1971 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
1972
1973         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
1974
1975 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
1976
1977         Rework build_component_ref.
1978         * call.c (build_vfield_ref): Do not go through build_component_ref.
1979         (build_field_call): Use build_class_member_access_expr.
1980         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
1981         (build_object_call): Likewise.
1982         * class.c (convert_to_base): New function.
1983         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
1984         (instantiate_type): Handle BASELINKs.
1985         * cp-tree.def (BASELINK): New tree code.
1986         * cp-tree.h (BASELINK_P): Reimplement.
1987         (SET_BASELINK_P): Remove.
1988         (BASELINK_BINFO): Reimplement.
1989         (BASELINK_FUNCTIONS): Likewise.
1990         (BASELINK_ACCESS_BINFO): Likewise.
1991         (BASELINK_OPTYPE): Likewise.
1992         (convert_to_base): New function.
1993         (name_p): Likewise.
1994         (build_object_ref): Remove.
1995         (build_component_ref_1): Likewise.
1996         (build_component_ref): Likewise.
1997         (build_x_component_ref): Likewise.
1998         (build_class_member_access_expr): New function.
1999         (finish_class_member_access_expr): Likewise.
2000         (build_ptrmemfunc_access_expr): Likewise.
2001         * decl.c (grokdeclarator): Handle BASELINKs.
2002         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
2003         finish_class_member_access_expr.
2004         (arg_assoc): Handle BASELINKs.
2005         (do_class_using_decl): Likewise.
2006         * error.c (dump_decl): Likewise.
2007         (dump_expr): Use build_ptrmemfunc_access_expr.
2008         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
2009         destructors.
2010         (build_throw): Use BASELINK_FUNCTIONS.
2011         * init.c (perform_member_init): Use
2012         build_class_member_access_expr.
2013         (build_offset_ref): Handle BASELINKs.  Use
2014         build_class_member_access_expr.
2015         * method.c (hack_identifier): Likewise.
2016         * parse.y (do_id): Use BASELINK, not TREE_LIST.
2017         (primary): Remove uses of build_object_ref.
2018         * pt.c (lookup_template_function): Handle BASELINKs.
2019         (resolve_overloaded_unification): Likewise.
2020         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
2021         (lookup_field): Use BASELINK, not TREE_LIST.
2022         (lookup_fnfiels): Likewise.
2023         (setup_class_bindings): Likewise.
2024         * semantics.c (finish_object_call_expr): Do not use
2025         build_method_call when we already know what function is being
2026         called.
2027         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
2028         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
2029         TREE_CHAIN.
2030         (name_p): New function.
2031         * typeck.c (build_object_ref): Remove.
2032         (build_component_ref_1): Likewise.
2033         (build_x_component_ref): Likewise.
2034         (build_class_member_access_expr): New function.
2035         (finish_class_member_access_expr): Likewise.
2036         (build_ptrmemfunc_access_expr): Likewise.
2037         (get_member_function_from_ptrfunc): Use
2038         build_ptrmemfunc_access_expr.
2039         (build_binary_op): Likewise.
2040         (build_unary_op): Likewise.
2041         (build_ptrmemfunc): Likewise.
2042         (pfn_from_ptrmemfunc): Likewise.
2043         * typeck2.c (build_m_component_ref): Adjust comment.
2044
2045 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
2046
2047         * Make-lang.in (CXX_C_OBJS): Update.
2048         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
2049         * cp-tree.h (cxx_decode_option): Remove.
2050         * decl2.c (compare_options, lang_f_options, unsupported_options,
2051         cxx_decode_option): Remove.
2052
2053 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
2054
2055         * typeck.c (build_x_unary_op): Handle pointer-to-member.
2056
2057 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
2058
2059         * class.c: Don't include obstack.h.
2060         (popclass):
2061         * decl2.c: Delete bogus comment.
2062         * error.c: Don't include obstack.h.
2063         * except.c: Likewise.
2064         (dump_type): Correct comment.
2065         * method.c: Don't include obstack.h.
2066         * tree.c: Likewise.
2067
2068 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
2069
2070         Fix PR/2213
2071         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
2072         expressions to pointer-to-data-member of pointer-to-member-functions.
2073
2074 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
2075
2076         * cvt.c (ocp_convert): Delete obsolete code.
2077         * parse.y (permanent_obstack): Delete declaration.
2078         * pt.c (permanent_obstack): Delete declaration.
2079         * repo.c (permanent_obstack): Delete declaration.
2080         (open_repo_file): Use xmalloc instead of permanent_obstack.
2081         (init_repo): Use xstrdup instead of permanent_obstack.
2082
2083 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
2084
2085         * cp-tree.h (VF_DERIVED_VALUE): Remove.
2086         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
2087
2088 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
2089
2090         PR 7470.
2091         C++ ABI change - vfunc ordering.
2092         * class.c (add_virtual_function): Remove.
2093         (dfs_modify_all_vtables): Take list of all declared
2094         virtuals. Assign all that are not in primary base.
2095         (check_for_override): Adjust comments.
2096         (create_vtable_ptr): Take single list of virtuals. Build chain
2097         of declared virtuals here.
2098         (layout_class_type): Take single list of virtuals. Adjust.
2099         (finish_struct_1): Keep virtuals on single list. Adjust.
2100
2101 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
2102
2103         * init.c (build_member_call): Use build_new_method_call, not
2104         build_method_call.
2105
2106 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
2107
2108         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
2109
2110 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
2111
2112         * call.c (build_method_call): Issue a more helpful error message
2113         about ambiguous method names.
2114
2115 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
2116
2117         * tree.c (build_shared_int_cst): Make cache file scope, and
2118         GTY it.
2119
2120 2002-08-02  Jason Merrill  <jason@redhat.com>
2121
2122         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
2123         (cp_expr_size): New fn.
2124         * call.c (build_over_call): Lose empty class hackery.
2125         (convert_arg_to_ellipsis): Promote non-POD warning to error.
2126         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
2127
2128         * semantics.c (expand_body): Do tree optimization in the function
2129         context, too.
2130
2131 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
2132
2133         * cp-tree.h: Move all warning and flag declarations to c-common.h.
2134         * decl.c: Move all warning and flag variables to c-common.c.
2135         * decl2.c: Move all warning and flag variables to c-common.c.
2136         * lex.c (flag_digraphs): Remove.
2137         (warn_traditional): Now in c-common.c.
2138
2139 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
2140
2141         * call.c (build_field_call): Do not look up the field by name.
2142         (build_method_call): Simplify.
2143         (struct z_candidate): Add access_path and conversion_path.  Remove
2144         basetype_path.
2145         (convert_class_to_reference): Adjust use of
2146         add_function_candidate.
2147         (add_candidate): Add conversion_path argument.
2148         (add_function_candidate): Use it.
2149         (add_conv_dndidate): Likewise.
2150         (build_builtin_candidate): Likewise.
2151         (add_template_candidate_real): Add conversion_path argument.
2152         (add_template_conv_candidate): Likewise.
2153         (add_template_candidate): Likewise.
2154         (build_user_type_conversion_1): Use it.
2155         (build_new_function_call): Remove name lookup code.  Adjust use of
2156         add_template_candidate and add_function_candidate.
2157         (build_new_op): Likewise.
2158         (convert_like_real): Use build_special_member_call.
2159         (build_over_call): Use cand->conversion_path.
2160         (build_special_member_call): New method.
2161         (build_new_method_call): Remove name lookup code.
2162         * cp-tree.def (OFFSET_REF): Update documentation.
2163         (TEMPLATE_ID_EXPR): Likewise.
2164         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
2165         (BASELINK_OPTYPE): Likewise.
2166         (build_new_method_call): Adjust prototype.
2167         (build_special_member_call): New method.
2168         (build_baselink): New method.
2169         (build_offset_ref_call_from_tree): Likewise.
2170         (build_call_from_tree): Likewise.
2171         (finish_qualified_call_expr): Remove.
2172         (finish_call_expr): Adjust prototype.
2173         (build_x_function_call): Remove.
2174         * cvt.c (ocp_convert): Use build_special_member_call.
2175         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
2176         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
2177         CALL_EXPR.
2178         (build_offset_ref_call_from_tree): New function.
2179         (build_call_from_tree): Likewise.
2180         * init.c (expand_cleanup): Use build_special_member_call.
2181         (expand_default_init): Likewise.
2182         (build_member_call): Use finish_call_expr.
2183         (build_new_1): Use build_special_member_call.
2184         (push_base_cleanups): Likewise.
2185         * method.c (do_build_assign_ref): Likewise.
2186         * parse.y (template_id): Do not pass a COMPONENT_REF to
2187         lookup_template_function.
2188         (primary): Use parse_finish_call_epxr, not finish_call_expr.
2189         (parse_finish_call_expr): New function.
2190         * pt.c (lookup_template_function): Add assertions.
2191         * search.c (lookup_base): Allow T to be a binfo.
2192         (build_baselink): New function.
2193         (lookup_member): Use it.
2194         * semantics.c (finish_call_expr): Do not do name lookup.
2195         (finish_object_call_expr): Remove #if 0'd code.
2196         (finish_qualified_call_expr): Remove.
2197         * typeck.c (build_x_function_call): Remove.
2198         (build_static_case): Use build_special_member_call.
2199         * typeck2.c (build_functional_cast): Likewise.
2200
2201 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
2202
2203         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
2204
2205 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
2206
2207         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
2208
2209 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
2210
2211         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
2212         documentation.
2213
2214 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
2215
2216         * cp-tree.h: Comment typo fix.
2217
2218 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
2219
2220         * spew.c (space_for_token): Allocate zeroed memory for a new token
2221         chunk.
2222
2223 2002-07-27  Roger Sayle  <roger@eyesopen.com>
2224
2225         * decl.c (builtin_function_1): No need to explicitly mark
2226         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
2227
2228 2002-07-27  Roger Sayle  <roger@eyesopen.com>
2229
2230         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
2231
2232 2002-07-26  Jason Merrill  <jason@redhat.com>
2233
2234         * call.c (build_over_call): Likewise.
2235         (cp_convert_parm_for_inlining): New fn.
2236         (convert_for_arg_passing): New fn.
2237         (convert_default_arg, build_over_call): Use it.
2238         (type_passed_as): New fn.
2239         * pt.c (tsubst_decl): Use it.
2240         * decl2.c (cp_build_parm_decl): New fn.
2241         (build_artificial_parm): Use it.
2242         (start_static_storage_duration_function): Likewise.
2243         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
2244         (grokparms): Don't mess with DECL_ARG_TYPE.
2245         * typeck.c (convert_arguments): Use convert_for_arg_passing.
2246         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
2247         Define.
2248         * cp-tree.h: Declare new fns.
2249
2250 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
2251
2252         * cp-tree.h (flag_operator_names): Remove.
2253         * decl2.c (flag_operator_names): Remove.
2254         (lang_f_options): Remove operator-names.
2255         * lex.c (D_OPNAME): Remove.
2256         (reswords): Remove operator names.
2257         (rid_to_yy): Remove operator names.
2258         (init_reswords): No need to handle D_OPNAME.
2259         * spew.c (read_process_identifier): There are no operator
2260         names.
2261
2262 2002-07-26  Jason Merrill  <jason@redhat.com>
2263
2264         * dump.c (cp_dump_tree): Call c_dump_tree.
2265         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
2266
2267 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
2268
2269         * error.c (print_whitespace): Remove.
2270         * g++spec.c (LIBUNWIND): Move.
2271         * mangle.c (mangled_position, write_signed_number): Remove.
2272
2273 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
2274
2275         * decl2.c (cxx_decode_option): Similarly.
2276
2277 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
2278
2279         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
2280         (cxx_sizeof_or_alignof_type): Take a third argument.
2281         (cxx_sizeof): Adjust definition.
2282         (cxx_alignof): Likewise.
2283         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
2284         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
2285         complaining.
2286         (c_sizeof_nowarn): Remove definition.
2287         (build_unary_op): Use cxx_sizeof_nowarn.
2288
2289 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
2290
2291         * tree.c (cp_build_qualified_type_real): When copying
2292         pointer-to-method types, unshare the record that holds
2293         the cached pointer-to-member-function type.
2294
2295 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
2296
2297         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
2298
2299 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
2300
2301         Fix PR/7363:
2302         * typeck.c (cxx_sizeof_or_alignof_type): New function.
2303         (c_sizeof): Remove definition.
2304         (expr_sizeof): Use cxx_sizeof.
2305         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
2306         * decl.c (finish_destructor_body): Use cxx_sizeof.
2307         * semantics.c (finish_alignof): Likewise.
2308         (finish_alignof): Use cxx_alignof.
2309         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
2310         (cxx_sizeof_or_alignof_type): Declare.
2311         (my_friendly_assert): Move to ../c-common.h.
2312
2313 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
2314
2315         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
2316
2317 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2318
2319         PR c++/7347, c++/7348
2320         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
2321         * decl.c (make_typename_type): Use it.
2322         (make_unbound_class_template): Likewise.
2323         (lookup_name_real): Don't call type_access_control if scope is
2324         template parameter dependent.
2325         * parse.y (template_arg): Call make_unbound_class_template with
2326         tf_parsing set.
2327         (nest_name_specifier): Call make_typename_type with tf_parsing set.
2328         (typename_sub0): Likewise.
2329         (typename_sub1): Likewise.
2330         (instantiate_decl): Push class scope.
2331         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
2332         for both static variable and member function template.
2333         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
2334         and arguments.
2335         * search.c (type_access_control): Do type access for TEMPLATE_DECL
2336         too.
2337
2338 2002-07-20  Roger Sayle  <roger@eyesopen.com>
2339
2340         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
2341         test by using positive_option.  Make whitespace consistent.
2342
2343 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
2344
2345         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
2346         members with 'locus'.  Adjust use throughout.
2347         (struct feed):  Likewise.
2348         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
2349         Adjust use.
2350         (snarf_defarg): Use error(), not error_with_file_and_line().
2351
2352 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
2353
2354         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
2355         cpp_options is included.
2356
2357 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2358
2359         PR c++/2862, c++/2863
2360         * pt.c (determine_specialization): Compare the length of
2361         TYPE_ARG_TYPES.  Tidy.
2362
2363 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2364
2365         PR c++/3797
2366         * decl.c (duplicate_decls): Don't propagate inlining parameters from
2367         olddecl to newdecl when newdecl is a specialization of the
2368         instantiation olddecl.
2369
2370 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2371
2372         PR c++/4802, c++/5387
2373         * decl.c (make_typename_type): Use enforce_access.
2374
2375 2002-07-17  Scott Snyder <snyder@fnal.gov>
2376
2377         PR c++/7320
2378         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
2379
2380 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
2381
2382         * class.c (add_method): Correct handling of conversion operators.
2383
2384 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
2385
2386         PR c++/7224
2387         * class.c (add_method): Simplify.
2388
2389 2002-07-11  Jason Merrill  <jason@redhat.com>
2390
2391         PR c++/7279
2392         * tree.c (cp_copy_res_decl_for_inlining): Also copy
2393         TREE_ADDRESSABLE.
2394
2395 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
2396
2397         * pt.c (template_parm_this_level_p, push_template_decl_real):
2398         Pass depth as int pointer.
2399
2400 2002-07-11  Tim Josling  <tej@melbpc.org.au>
2401
2402         Remove front end hard coding from gengtype.c.
2403
2404         * config-lang.in (gtfiles): Add files needed for this front end.
2405
2406 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
2407
2408         * cp-tree.h (unqualified_name_lookup_error): Declare it.
2409         (begin_function_definition): Adjust prototype.
2410         * lex.c (unqualified_name_lookup_error): New function, split out
2411         from ...
2412         (do_identifier): ... here.
2413         * parse.y (parse_begin_function_definition): New function.
2414         (fn.def1): Use it.
2415         * semantics.c (begin_function_definition): Accept decl-specifiers
2416         and attributes as separate parameters.
2417
2418 2002-07-10  Jason Merrill  <jason@redhat.com>
2419
2420         PR c++/6255
2421         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
2422         modifying the old one.
2423
2424 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
2425
2426         * cp-tree.h (constructor_name_p): Declare it.
2427         (check_template_template_default_arg): Likewise.
2428         * class.c (handle_using_decl): Use constructor_name_p.
2429         * decl.c (grokdeclarator): Likewise.
2430         * decl2.c (constructor_name_p): Define it.
2431         * init.c (build_member_call): Use constructor_name_p.
2432         * parse.y (template_parm): Use check_template_template_default_arg.
2433         * pt.c (check_explicit_specialization): Use constructor_name_p.
2434         * semantics.c (check_template_template_default_arg): New function.
2435
2436 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2437
2438         * pt.c (can_complete_type_without_circularity): Add static to
2439         function definition.
2440
2441 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
2442
2443         * cp-tree.h (have_extern_spec): Declare it
2444         * decl.c (have_extern_spec): Define it.
2445         (start_decl): Eliminate use of used_extern_spec.
2446         (start_function): Likewise.
2447         * parse.y (have_extern_spec): Remove declaration.
2448         (used_extern_spec): Likewise.
2449         (frob_specs): Eliminate use of used_extern_spec.
2450         (.hush_warning): Likewise.
2451
2452 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
2453
2454         * Make-lang.in (cp/parse.o): Depend on decl.h.
2455         * cp-tree.h (do_decl_instantiation): Change prototype.
2456         * parse.y: Include decl.h.
2457         (parse_decl_instantiation): New function.
2458         (explicit_instantiation): Use it.
2459         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
2460         and DECLSPECS.
2461
2462 2002-07-07  Roger Sayle  <roger@eyesopen.com>
2463
2464         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
2465         constructor and destructor tests when passed a TEMPLATE_DECL.
2466
2467 2002-07-05  Jason Merrill  <jason@redhat.com>
2468
2469         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
2470         pointers.
2471
2472         PR optimization/7145
2473         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
2474
2475 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
2476
2477         Repair damage on weak-impared targets caused by my previous patch.
2478         * cp-tree.h (import_export_tinfo): Add parameter.
2479         * decl2.c (import_export_tinfo): Add parameter, post adjust
2480         DECL_COMDAT.
2481         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
2482         import_export_tinfo.
2483
2484 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2485
2486         PR c++/6944
2487         * init.c (build_aggr_init): Remove qualifiers of init before calling
2488         build_vec_init.
2489         (build_vec_init): Flatten multi-dimensional array during cleanup.
2490         (build_vec_delete_1): Abort if the type of each element is array.
2491
2492 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
2493
2494         * pt.c (instantiate_class_template): Fix typo.
2495
2496 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2497
2498         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
2499         by CVS conflict in my last patch.
2500
2501 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2502
2503         PR c++/6716
2504         * pt.c (can_complete_type_without_circularity): New function.
2505         (instantiate_class_template): Use it.
2506         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
2507         message due to incomplete fields.
2508
2509 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
2510
2511         PR c++/7112
2512         * mangle.c (write_expression): Add mangling for sizeof when
2513         applied to a type.
2514         * operators.def: Remove stale comment.
2515
2516 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
2517
2518         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
2519         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
2520         (tinfo_decl_type): Replace with ...
2521         (type_info_ptr_type): ... this.
2522         (import_export_tinfo): Declare.
2523         (tinfo_decl_p): Rename to ...
2524         (unemitted_tinfo_decl_p): ... this.
2525         * decl2.c (import_export_decl): Break out tinfo handling into ...
2526         (import_export_tinfo): ... here. New function.
2527         (finish_file): Adjust.
2528         * rtti.c (TINFO_REAL_NAME): New macro.
2529         (init_rtti_processing): Create the tinfo types.
2530         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
2531         (get_tinfo_decl): Adjust.
2532         (get_tinfo_ptr): New function.
2533         (get_type_id): Use it.
2534         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
2535         (ptr_initializer): Use get_tinfo_ptr.
2536         (ptm_initializer): Likewise.
2537         (synthesize_tinfo_var): Break into ...
2538         (get_pseudo_ti_init): ... this. Just create the initializer.
2539         (get_pseudo_ti_desc): .. and this.
2540         (create_real_tinfo_var): Remove.
2541         (create_pseudo_type_info): Don't create the vtable decl here.
2542         (get_vmi_pseudo_type_info): Remove.
2543         (create_tinfo_types): Adjust.
2544         (tinfo_decl_p): Rename to ...
2545         (unemitted_tinfo_decl_p): ... here. Adjust.
2546         (emit_tinfo_decl): Adjust. Create the initializer.
2547
2548 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
2549
2550         PR c++/6695
2551         * pt.c (tsubst_friend_class): Substitute into the context of the
2552         friend before using it.
2553
2554 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
2555
2556         * cp-tree.h (xref_tag): Change prototype.
2557         (handle_class_head): Likewise.
2558         (build_x_component_ref): Likewise.
2559         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
2560         (xref_tag): Take attributes as a separate parameter.
2561         (xref_tag_from_type): Adjust call to xref_tag.
2562         * decl2.c (build_expr_from_tree): Adjust call to
2563         build_x_component_ref.
2564         (handle_class_head): Take attributes as a separate parameter.
2565         * parse.y (parse_xref_tag): New function.
2566         (parse_handle_class_head): Likewise.
2567         (primary): Use parse_xref_tag.
2568         (class_head_decl): Use parse_handle_class_head.
2569         (class_head_defn): Likewise.
2570         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
2571         (build_dynamic_cast_1): Likewise.
2572         (create_pseudo_type_info): Likewise.
2573         (emit_support_tinfos): Likewise.
2574         * typeck.c (build_object_ref): Adjust call to
2575         build_x_component_ref.
2576         (build_x_component_ref): Remove protect parameter.
2577
2578 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
2579
2580         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
2581         * class.c (handle_using_decl): Likewise.
2582         (instantiate_type): Likewise.
2583         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
2584         (xref_basetypes): Change prototype.
2585         (begin_mem_initializers): New function.
2586         (get_overloaded_fn): Likewise.
2587         * decl.c (xref_basetypes): Simplify.
2588         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
2589         * init.c (build_offset_ref): Likewise.
2590         * parse.y (base_init): Use begin_mem_initializers().
2591         (structsp): Adjust call to xref_basetypes.
2592         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
2593         (instantiate_class_template): Adjust call to xref_basetypes.
2594         * semantics.c (begin_mem_initializers): New function.
2595         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
2596         (really_overlaoded_fn): Likewise.
2597         (get_overloaded_fn): New function.'
2598         (get_first_fn): USe BASELINK_FUNCTIONS.
2599
2600 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
2601
2602         * cp-tree.h (SCALAR_TYPE_P): New macro.
2603         (check_for_out_of_scope_variable): New function.
2604         (at_class_scope_p): Likewise.
2605         (finish_fname): Likewise.
2606         * class.c (finish_struct): Use at_function_scope_p.
2607         * decl.c (check_for_out_of_scope_variable): New function, split
2608         out from do_identifier.
2609         (finish_enum): Use at_function_scope_p.
2610         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
2611         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
2612         (primary): Use at_function_scope_p.
2613         * search.c (at_class_scope_p): New function.
2614         * semantics.c (finish_fname): Likewise.
2615         (check_multiple_declarators): Use at_function_scope_p.
2616
2617 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
2618
2619         * parse.y (parse_scoped_id): New function.
2620         (primary): Use it.
2621         * cp-tree.h (do_scoped_id): Adjust declaration.
2622         * lex.c (do_scoped_id): Remove call to yylex.
2623         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
2624         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
2625         expanding it inline.
2626
2627 2002-06-23  Matt Thomas  <matt@3am-software.com>
2628
2629         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
2630         "#if VMS_TARGET".
2631
2632 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2633
2634         * mangle.c (integer_type_codes): Const-ify.
2635
2636 2002-06-20  Richard Henderson  <rth@redhat.com>
2637
2638         PR c++/6747
2639         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
2640         Call put_var_into_stack.
2641
2642 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2643
2644         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
2645         array size calculation.
2646
2647 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2648
2649         PR c++/6892
2650         * pt.c (tsubst_expr): Handle FILE_STMT.
2651
2652 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2653
2654         PR c++/6723
2655         * pt.c (lookup_template_class): Don't build complete argument of
2656         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
2657         argument.
2658
2659 2002-06-19  Akim Demaille  <akim@epita.fr>
2660
2661         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
2662         decl.h's TYPENAME.
2663         * spew.c, lex.c: Adjust.
2664         * parse.y (explicit_instantiation): Add empty action to override
2665         the default $$ = $1 where it introduces a type clash.
2666
2667 2002-06-14  Jason Merrill  <jason@redhat.com>
2668
2669         * semantics.c (begin_for_stmt): Push the 'for' scope before
2670         adding the FOR_STMT.
2671
2672         C++ ABI changes.
2673         * class.c (build_base_field): Set DECL_PACKED.
2674         (layout_class_type): Don't use tail padding of PODs.
2675         * mangle.c (write_unqualified_name): Fix template conversion op
2676         mangling.
2677
2678 2002-06-16  Richard Henderson  <rth@redhat.com>
2679
2680         PR opt/6793
2681         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
2682         after template instantiation.
2683
2684 2002-06-16  Richard Henderson  <rth@redhat.com>
2685
2686         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
2687
2688 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
2689
2690         * cp-tree.h (compiler_error): Remove declaration.
2691         * lex.c (compiler_error): Remove definition.
2692
2693 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
2694
2695         * g++spec.c (LIBUNWIND): New.
2696         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
2697
2698 2002-06-13  Jessica Han  <jessica@cup.hp.com>
2699
2700         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
2701         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
2702         (build_vbase_offset_vtbl_entries): Likewise.
2703         * rtti.c (build_headof): Likewise.
2704         (get_tinfo_decl_dynamic): Likewise.
2705         (create_pseudo_type_info): Likewise.
2706
2707 2002-06-12  Stan Shebs  <shebs@apple.com>
2708
2709         * mpw-config.in: Remove file, no longer used.
2710         * mpw-make.sed: Ditto.
2711
2712 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
2713
2714         * decl2.c: Update call to cpp_handle_option.
2715
2716 2002-06-07  H.J. Lu  (hjl@gnu.org)
2717
2718         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
2719
2720 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
2721
2722         * error.c (cp_error_at): Fix typo.
2723
2724 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
2725
2726         * error.c (cp_diagnostic_starter): Adjust call.
2727         (maybe_print_instantiation_context): Change prototype to take a
2728         'diagnostic_info *'.
2729         (print_instantiation_full_context): Likewise.
2730         (print_instantiation_partial_context): Likewise.
2731         (cp_diagnostic_starter): Likewise.
2732         (cp_diagnostic_finalizer): Likewise.
2733         (cp_print_error_function): Likewise.
2734         (cp_printer): Take a secondary parameter as a 'text_info *'.
2735         Remove output_state savings.  Adjust calls.
2736
2737 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
2738
2739         * pt.c (inline_parm_levels): Mark for GC.
2740
2741         * mangle.c (start_mangling): Allocate G.substitutions here...
2742         (init_mangle): ... rather than here.
2743         (finish_mangling): Clear the varray pointer when done with it.
2744         * spew.c (yylexstring): Don't use VARRAY_FREE.
2745         * search.c (bfs_walk): Don't use VARRAY_FREE.
2746         * decl2.c (pending_statics): Use gengtype to mark.
2747         (deferred_fns): Likewise.
2748         (ssdf_decls): Likewise.
2749         (init_decl2): Delete.
2750         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
2751         (cxx_init_decl_processing): Don't call init_decl2.
2752         (cxx_pop_function_context): Don't use VARRAY_FREE.
2753         * cp-tree.h (struct saved_scope): No need for special marking
2754         of varrays.
2755         (struct language_function): Likewise.
2756         (local_classes): Use gengtype to mark.
2757         (init_decl2): Delete prototype.
2758         * class.c (init_class_processing): Don't use
2759         ggc_add_tree_varray_root.
2760         (build_vtbl_initializer): Don't use VARRAY_FREE.
2761
2762         * decl.c (typename_compare): Don't use same_type_p.
2763
2764         * decl.c: Include hashtab.h instead of hash.h.
2765         (typename_hash): Update to use htab_h.
2766         (typename_compare): Likewise.
2767         (typename_htab): Use gengtype to mark.
2768         (build_typename_type): Update to use htab_h.
2769         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
2770
2771         * Make-lang.in (gt-cp-tree.h): New rule.
2772         (cp/tree.o): Depend on gt-cp-tree.h.
2773         * config-lang.in (gtfiles): Add cp/tree.c.
2774         * tree.c: Include gt-cp-tree.h.
2775         (list_hash_table): Use gengtype to mark.
2776         (init_tree): Use gengtype to mark trees.
2777
2778         * Make-lang.in (cp/decl.o): Add debug.h dependency.
2779         * call.c (struct z_candidate): Use gengtype.
2780         (USER_CONV_CAND): Use WRAPPER_ZC.
2781         (convert_class_to_reference): Use build_zc_wrapper.
2782         (build_type_conversion_1): Likewise.
2783         (build_over_call): Use WRAPPER_ZC.
2784         (add_warning): Use build_zc_wrapper.
2785         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
2786         * cp-tree.h (struct lang_identifier): Use gengtype.
2787         (struct template_parm_index_s): Likewise.
2788         (struct ptrmem_cst): Likewise.
2789         (struct tree_binding): Likewise.
2790         (struct tree_overload): Likewise.
2791         (struct tree_srcloc): Likewise.
2792         (struct tree_wrapper): Likewise.  Also modify to have a pointer
2793         to struct z_candidate rather than void.
2794         (enum cp_tree_node_structure_enum): New.
2795         (union lang_tree_node): New.
2796         (cxx_mark_tree): Delete prototype.
2797         (cp_tree_node_structure): New prototype.
2798         (build_ptr_wrapper): Delete prototype.
2799         (build_int_wrapper): Delete prototype.
2800         (build_zc_wrapper): New prototype.
2801         * decl.c: Include debug.h
2802         (cxx_mark_tree): Delete.
2803         (cp_tree_node_structure): New.
2804         * tree.c (build_ptr_wrapper): Delete.
2805         (build_int_wrapper): Delete.
2806         (build_zc_wrapper): New.
2807
2808         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
2809         Correct typo.  Patch from k_fukui@highway.ne.jp.
2810
2811         * semantics.c (current_stmt_tree): Update for change to
2812         struct language_function.
2813         (finish_mem_initializers): Likewise.
2814         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
2815         * cp-tree.h (struct language_function): Rename from
2816         cp_language_function.  Change all uses.
2817         (cp_function_chain): Don't need to cast.
2818
2819         * class.c (duplicate_tag_error): Reset discriminator.
2820         (check_bases_and_members): Update for data structure changes.
2821         * cp-tree.h (struct lang_id2): Use gengtype.
2822         (flagged_type_tree): Likewise.
2823         (SET_LANG_ID): Use GGC on struct lang_id2.
2824         (struct cp_language_function): Use gengtype.  Remove field
2825         'x_vcalls_possible_p'.
2826         (current_vcalls_possible_p): Delete.
2827         (struct lang_type_header): New.
2828         (struct lang_type_class): Rename from struct lang_type.  Include
2829         struct lang_type_header.
2830         (struct lang_type_ptrmem): New.
2831         (struct lang_type): New.
2832         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
2833         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
2834         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
2835         (struct lang_decl_flags): Use gengtype.  Add discriminators.
2836         (struct lang_decl): Use gengtype.  Add and use discriminators.
2837         Update the macros that reference moved fields.
2838         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
2839         (SET_DECL_THUNK_P): Set discriminator too.
2840         (clear_inline_text_obstack): Delete prototype.
2841         (finish_inline_definitions): Delete prototype.
2842         (mark_pending_inlines): Delete prototype.
2843         (lang_check_failed): New prototype.
2844         * decl.c (struct named_label_use_list): Use gengtype.
2845         (struct named_label_list): Likewise.
2846         (mark_binding_level): Delete.
2847         (mark_named_label_lists): Delete.
2848         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
2849         (cxx_init_decl_processing): Use generated marker routine.
2850         (begin_destructor_body): Delete dead set to
2851         current_vcalls_possible_p.
2852         (mark_lang_function): Delete.
2853         (mark_cp_function_context): Delete.
2854         (lang_mark_tree): Use generated marker routines.
2855         * decl2.c (start_objects): Set discriminator when setting
2856         GLOBAL_INIT_PRIORITY.
2857         * lex.c (retrofit_lang_decl): Set discriminators.
2858         (copy_lang_type): Update for changes to lang_type structure.
2859         (cp_make_lang_type): Set discriminator.
2860         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
2861         * search.c: Include ggc.h.
2862         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
2863         (finish_inline_definitions): Delete.
2864         * spew.c (struct token): Use gengtype.
2865         (struct token_chunk): New.
2866         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
2867         (struct feed): Use gengtype.
2868         (feed_obstack): Delete.
2869         (feed): Mark as GC root.
2870         (pending_inlines): Mark as GC root.
2871         (pending_inlines_tail): Likewise.
2872         (processing_these_inlines): Likewise.
2873         (token_obstack): Make static.
2874         (first_token): Likewise.
2875         (init_spew): Don't initialize deleted things; use gengtype for roots.
2876         (clear_inline_text_obstack): Delete.
2877         (feed_input): Use GC for struct feed.  Update for changes to
2878         struct unparsed_text.
2879         (mark_pending_inlines): Delete.
2880         (next_token): Rename from add_token.  Change all callers.  Update
2881         for changes to struct unparsed_text.
2882         (space_for_token): New.
2883         (remove_last_token): New.
2884         (alloc_unparsed_text): New.
2885         (snarf_block): Take an unparsed_text.  Update for changes to struct
2886         unparsed_text.
2887         (snarf_method): Update for changes to struct unparsed_text.
2888         (snarf_defarg): Update for changes to struct unparsed_text.
2889         * tree.c (lang_check_failed): New.
2890
2891         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
2892         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
2893         (cp/spew.o): Add dependency on gt-<filename>.h.
2894         (cp/decl2.o): Add dependency on gt-<filename>.h.
2895         (cp/call.o): Add dependency on gt-<filename>.h.
2896         (cp/pt.o): Add dependency on gt-<filename>.h.
2897         (cp/repo.o): Add dependency on gt-<filename>.h.
2898         (cp/parse.o): Add dependency on gt-<filename>.h.
2899         * call.c: Use gengtype for roots.
2900         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
2901         decl2.c parse.y pt.c repo.c spew.c.
2902         * cp-tree.h: Use gengtype for roots.
2903         (struct saved_scope): Use GGC, gengtype.
2904         (cp_parse_init): Delete prototype.
2905         (init_pt): Delete prototype.
2906         * decl.c: Use gengtype for roots.
2907         (mark_saved_scope): Delete.
2908         (cxx_init_decl_processing): Don't call deleted initilisation
2909         routines.
2910         (signed_size_zero_node): Delete, unused.
2911         * decl.h: Use gengtype for roots.
2912         * decl2.c: Use gengtype for roots.
2913         * lex.h: Use gengtype for roots.
2914         * parse.y: Use gengtype for roots.
2915         (cp_parse_init): Delete.
2916         * pt.c: Use gengtype for roots.
2917         (init_pt): Delete.
2918         * repo.c: Use gengtype for roots.
2919         * spew.c: Use gengtype for roots.
2920
2921         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
2922         (cp/decl.o): Add dependency on gtype-cp.h.
2923         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
2924         Include gtype-cp.h.  Allow for filename changes.
2925
2926         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
2927         (cp/decl.o): Add cp/gt-decl.h dependency.
2928         * config-lang.in (gtfiles): New.
2929         * tree.h: Rename struct binding_level to struct cp_binding_level.
2930         * decl.c: Rename struct binding_level to struct cp_binding_level.
2931         Include cp/gt-decl.h.
2932         (struct cp_binding_level): Use gengtype.
2933         (make_binding_level): Use GGC on struct cp_binding_level.
2934         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
2935         (cxx_init_decl_processing): Mark free_binding_level as
2936         deletable.
2937
2938         * decl.c (mark_cp_function_context): Update calling sequence.
2939
2940         * decl.c (start_function): Don't free 'struct
2941         cp_language_function'.
2942         (pop_cp_function_context): Likewise.
2943         (save_function_data): Allocate it using GC.
2944         * semantics.c (genrtl_start_function): Don't free 'struct
2945         cp_language_function'.
2946
2947 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
2948
2949         * lang-specs.h: Use cpp_debug_options.
2950
2951 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
2952
2953         * mangle.c, tree.c: Include real.h.
2954         * Make-lang.in: Update dependency lists.
2955
2956 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
2957
2958         * lex.c: Don't include c-lex.h.
2959         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
2960
2961 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
2962
2963         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
2964
2965 2002-05-22  Richard Henderson  <rth@redhat.com>
2966
2967         * decl.c (obscure_complex_init): Check for VAR_DECL
2968         before using DECL_THREAD_LOCAL.
2969
2970 2002-05-22  Richard Henderson  <rth@redhat.com>
2971
2972         * decl.c (check_tag_decl): Handle RID_THREAD.
2973         (obscure_complex_init): Reject run-time init of tls.
2974         (grokvardecl, grokdeclarator): Handle RID_THREAD.
2975         * lex.c (reswords): Add __thread.
2976         (rid_to_yy): Map RID_THREAD to SCSPEC.
2977
2978 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
2979
2980         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
2981         * cp-tree.h (cxx_post_options): Kill.
2982         * cp-lex.c (cxx_post_options): Kill.
2983
2984 2002-05-21  Richard Henderson  <rth@redhat.com>
2985
2986         * lex.c (rid_to_yy): Add RID_THREAD.
2987
2988 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
2989
2990         * init.c (build_vec_init): Test for trivial copy-assignment when
2991         copy-assigning arrays.
2992
2993 2002-05-20  Andreas Jaeger  <aj@suse.de>
2994
2995         * init.c (build_default_init): Remove unused variable.
2996
2997 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
2998
2999         * call.c (any_strictly_viable): New.
3000         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
3001
3002 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3003
3004         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
3005
3006 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3007
3008         PR c++/186, DR 259
3009         * pt.c (do_decl_instantiation): Don't complain explicit
3010         instantiation after explicit specialization.
3011         (do_type_instantiation): Likewise.
3012
3013 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
3014
3015         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
3016         renamed from...
3017         (complete_type_or_else): ... this.  Redefined as macro.
3018         (cxx_incomplete_type_diagnostic): Declare.
3019         (cxx_incomplete_type_error): Define as macro.
3020         * init.c (build_delete): Warn about incomplete types other than
3021         void, and use the built-in operator delete for them.
3022         * typeck.c (complete_type_or_diagnostic): Renamed from
3023         complete_type_or_else.  Added warn_only argument, passed to...
3024         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
3025         warnings or errors depending on new warn_only argument.  Renamed
3026         from...
3027         (cxx_incomplete_type_error): ... this.  New implementation in
3028         terms of cxx_incomplete_type_diagnostic.
3029
3030 2002-05-18  Jason Merrill  <jason@redhat.com>
3031
3032         PR c++/6611
3033         * decl2.c (import_export_decl): If we clear
3034         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
3035
3036 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3037
3038         PR c++/6620
3039         * pt.c (verify_class_unification): Don't check if PARM is template
3040         parameter dependent.  Simplify.
3041         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
3042         parameter dependent expression.
3043
3044 2002-05-14  Jason Merrill  <jason@redhat.com>
3045
3046         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
3047         Do set DECL_COMDAT.
3048         (synthesize_tinfo_var): Take the public decl.
3049         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
3050         (emit_tinfo_decl): Adjust.  Call import_export_decl.
3051         * decl2.c (import_export_decl): Simplify tinfo decl handling.
3052
3053 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
3054
3055         * cp-tree.h (struct lang_type): Added non_zero_init.
3056         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
3057         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
3058         * class.c (check_field_decls): Test non_zero_init.
3059         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
3060         zero-to-NULL conversions.
3061         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
3062         type that needs zero-initialization without zeros.
3063         (check_initializer_decl): Compute zero-initializer for types
3064         that require a non-trivial one.
3065         * init.c (build_forced_zero_init): New function.
3066         (build_default_init): Use it.
3067         * tree.c (zero_init_p): New function.
3068         * typeck2.c (force_store_init_value): New function.
3069         (process_init_constructor): Create non-trivial zero-initializers
3070         for array members and class fields.
3071
3072 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
3073
3074         * lang-specs.h: Remove redundant -lang-c++.
3075
3076 2002-05-13  Jason Merrill  <jason@redhat.com>
3077
3078         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
3079         (fixed_type_or_null): See through reference vars.
3080         (build_base_path): Vtable contents are constant.
3081         * typeck.c (get_member_function_from_ptrfunc): Likewise.
3082
3083 2002-05-12  Jason Merrill  <jason@redhat.com>
3084
3085         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
3086         structs are safe.
3087
3088 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
3089
3090         * cp-tree.h (flag_ansi): Remove.
3091         * decl2.c (flag_ansi): Remove.
3092         (cxx_decode_option): Set flag_iso and flag_undef.
3093
3094 2002-05-09  Jason Merrill  <jason@redhat.com>
3095
3096         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
3097         Use subtraction rather than a bitmask to get the index.
3098         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
3099
3100         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
3101
3102 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
3103
3104         * Make-lang.in (decl2.o): Update.
3105         * cp-tree.h (warn_multichar): Remove.
3106         * decl2.c: Include c-common.h.
3107         (warn_multichar): Remove.
3108
3109 2002-05-03  Jason Merrill  <jason@redhat.com>
3110
3111         * tree.c (build_cplus_array_type): Only const and volatile get
3112         special handling.
3113
3114         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
3115
3116 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
3117
3118         ABI change, returning simple classes from functions.
3119         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
3120         TYPE_HAS_TRIVIAL_INIT_REF is false or
3121         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
3122
3123 2002-04-30  Jason Merrill  <jason@redhat.com>
3124
3125         PR debug/6436
3126         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
3127         anonymous class with a typedef if there are attributes.
3128
3129 2002-04-29  Paul Eggert  <eggert@twinsun.com>
3130
3131         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
3132
3133 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
3134
3135         PR c++/6477
3136         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
3137         non-NULL first.
3138
3139 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
3140
3141         PR c++/6492
3142         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
3143         enter that scope before name lookup.
3144
3145         PR c++/6486
3146         * method.c (do_build_copy_constructor): Avoid building
3147         cv-qualified reference types.
3148
3149 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
3150
3151         PR c++/5719
3152         * decl.c (grok_op_properties): Assignment ops don't have to return
3153         by value. operator% should.
3154
3155 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
3156
3157         PR c/6343
3158         * decl.c (duplicate_decls): Call merge_weak.
3159
3160 2002-04-26  Richard Henderson  <rth@redhat.com>
3161
3162         * parse.y (malloced_yyss, malloced_yyvs): New.
3163         (yyoverflow): Re-add.  Set them.
3164         (free_parser_stacks): New.
3165
3166 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
3167
3168         PR c++/6497
3169         * method.c (do_build_assign_ref): Pass a derivation to
3170         build_method_call when calling base class assignment operators.
3171
3172 2002-04-26  Richard Henderson  <rth@redhat.com>
3173
3174         * parse.y (yyoverflow): Revert.
3175
3176 2002-04-26  Richard Henderson  <rth@redhat.com>
3177
3178         PR c/3581
3179         * parse.y (string): Remove.  Update all uses to use STRING
3180         instead, and not call combine_strings.
3181         * rtti.c (tinfo_name): Use fix_string_type.
3182         * semantics.c (finish_asm_stmt): Don't call combine_strings.
3183         * spew.c (yylexstring): New.
3184         (read_token): Use it.
3185
3186 2002-04-25  Richard Henderson  <rth@redhat.com>
3187
3188         PR c/2161
3189         * parse.y (yyoverflow): New.
3190
3191 2002-04-25  Jason Merrill  <jason@redhat.com>
3192
3193         PR c++/5607
3194         * search.c (check_final_overrider): No longer static.
3195         * class.c (update_vtable_entry_for_fn): Call it.
3196         * cp-tree.h: Adjust.
3197
3198 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3199
3200         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
3201         * cp-tree.h (cxx_set_yydebug): Die.
3202         * lex.c (YYDEBUG): Get from c-lex.h.
3203         (cxx_set_yydebug): Remove.
3204         * parse.y: Include c-lex.h.
3205         (YYDEBUG): Get from c-lex.h.
3206
3207 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
3208
3209         PR c++/6438.
3210         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
3211         void.
3212
3213 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
3214
3215         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
3216         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
3217         Redefine.
3218         * cp-tree.h (cp_attribute_table): Rename.
3219         * decl.c (lang_attribute_table): Remove declaration.
3220         (cxx_init_decl_processing): Don't set it.
3221         * tree.c (cp_attribute_table): Rename.
3222
3223 2002-04-24  Jason Merrill  <jason@redhat.com>
3224
3225         PR c++/6331
3226         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
3227         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
3228         The pedwarn for array assignment is now unconditional.
3229         * tree.c (build_cplus_array_type_1): Still process simple array types
3230         normally in templates.
3231
3232         PR c++/6395
3233         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
3234         stuff for comdats.
3235
3236 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
3237
3238         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
3239         node with attributes.
3240
3241 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
3242
3243         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
3244         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
3245
3246 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
3247
3248         PR c++/6256:
3249         * pt.c (tsubst_friend_class): Handle templates with explicit
3250         nested names.
3251
3252         PR c++/6331:
3253         * typeck.c (merge_types): Remember the cv-qualification of pointer
3254         types when merging them.
3255
3256 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3257
3258         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
3259         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
3260         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
3261         cxx_mark_function_context): New.
3262         * decl.c (push_cp_function_context, pop_cp_function_context,
3263         mark_cp_function_context): Rename for consistency.
3264         (cxx_init_decl_processing): Don't set old hooks.
3265
3266 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
3267
3268         * call.c (convert_type_from_ellipsis): Rename, update.
3269         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
3270         * cp-tree.h (convert_type_from_ellipsis): Rename.
3271         * decl.c (cxx_init_decl_processing): Don't set hook.
3272
3273 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
3274
3275         * call.c (build_new_method_call): Update.
3276         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
3277         * cp-tree.h (cxx_incomplete_type_error): New.
3278         * decl.c (grokdeclarator, grokparms): Update.
3279         * decl2.c (check_classfn): Update.
3280         * pt.c (tsubst): Update.
3281         * typeck.c (complete_type_or_else, expr_sizeof,
3282         decay_conversion): Update.
3283         * typeck2.c (incomplete_type_error): Rename.
3284         (add_exception_specifier): Update.
3285
3286 2002-04-18  Jason Merrill  <jason@redhat.com>
3287
3288         PR c++/5658
3289         * search.c (setup_class_bindings): A class template qualifies as a
3290         type binding.
3291
3292 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
3293
3294         PR c++/6316
3295         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
3296         before expanding.
3297
3298 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
3299
3300         * init.c (begin_init_stmts): Remove commented out code.
3301         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
3302         * semantics.c (begin_gobal_stmt_expr): Adjust call to
3303         expand_start_stmt_expr.
3304
3305 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
3306
3307         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
3308         dso_handle itself, to __cxa_atexit.
3309
3310 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3311
3312         * error.c (cxx_print_error_function): Adjust call to macros.
3313
3314 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
3315
3316         * class.c (layout_virtual_bases): Do all dsize computation on trees.
3317
3318 2002-04-14  Jason Merrill  <jason@redhat.com>
3319
3320         * typeck.c (get_member_function_from_ptrfunc): Don't do
3321         gratuitious division and multiplication on
3322         ptrmemfunc_vbit_in_delta targets.
3323
3324 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
3325
3326         PR c++/5373.
3327         * semantics.c (finish_expr_stmt): Remember the type of the
3328         expression before any conversions are performed.
3329
3330 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
3331
3332         PR c++/5189.
3333         * call.c (add_template_candidate_real): Do not treat member
3334         templates as copy constructors.
3335
3336 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
3337
3338         * decl.c (duplicate_decls): Do not copy the RTL for a variable
3339         declaration if the old variable had an incomplete type and the new
3340         variable does not.
3341         (complete_vars): Do not call layout_decl for completed variables.
3342
3343 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
3344
3345         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
3346         with an explicit one.
3347         (follow_tag_typedef): New.
3348         (lookup_tag): Use it to extract the tag of an explicit typedef.
3349         (xref_tag): Likewise.
3350
3351 2002-04-11  Andrew Haley  <aph@redhat.com>
3352
3353         * typeck.c (type_after_usual_arithmetic_conversions):
3354         If two types have the same variant, return immediately.
3355         When two floating-point operands are the same precision:
3356           convert to float if one of the operands is float;
3357           if neither operand is one of the standard types, return the type
3358           of the first operand.
3359
3360 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
3361
3362         PR c++/5507
3363         * decl.c (make_typename_type): Remove implicit typenameness.
3364
3365 2002-04-09  Jason Merrill  <jason@redhat.com>
3366
3367         PR optimization/6189
3368         * semantics.c (genrtl_start_function): Don't free
3369         DECL_SAVED_FUNCTION_DATA for inline functions.
3370
3371         * init.c (build_member_call): For now, don't convert to
3372         intermediate base if it would cause an error.
3373
3374 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
3375
3376         * parse.y (namespace_qualifier, maybe_identifier,
3377         begin_explicit_instantiation, end_explicit_instantiation,
3378         apparent_template_type, .finish_template_type,
3379         do_id, maybe_init, defarg_again, component_decl_1):
3380         Add ending ';', in accordance with POSIX.
3381
3382 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
3383
3384         PR c++/5571
3385         * class.c (layout_class_type): Remember incomplete static
3386         variables.
3387         (finish_struct_1): Call complete_vars, not
3388         hack_incomplete_structures.
3389         * cp-tree.h (hack_incomplete_structures): Rename to ...
3390         (complete_vars): ... this.
3391         (struct saved_scope): Remove incomplete.
3392         (namespace_scope_incomplete): Remove.
3393         * decl.c (struct binding_level): Remove incomplete.
3394         (incomplete_vars): New variable.
3395         (mark_binding_level): Don't mark incomplete.
3396         (print_binding_level): Don't print it.
3397         (mark_saved_scope): Don't mark incomplete.
3398         (pushdecl): Use maybe_register_incopmlete_var.
3399         (cxx_init_decl_processing): Register incomplete_vars for GC.
3400         (start_decl_1): Clarify error message.
3401         (hack_incomplete_vars): Remove.
3402         (maybe_register_incomplete_var): New function.
3403         (complete_vars): Likewise.
3404
3405 2002-04-06  Jason Merrill  <jason@redhat.com>
3406
3407         PR c++/4934
3408         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
3409         set before checking it.
3410
3411         PR c++/525
3412         * init.c (build_member_call): Use build_scoped_ref.
3413         (resolve_offset_ref): Likewise.
3414         * call.c (build_scoped_method_call): Likewise.
3415         * tree.c (maybe_dummy_object): Kludge around current_class_type being
3416         wrong.
3417         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
3418         * cp-tree.h: Adjust.
3419
3420         * init.c (push_base_cleanups): Just use build_scoped_method_call.
3421
3422         PR c++/6179
3423         * method.c (implicitly_declare_fn): Pass unqualified type to
3424         synthesize_exception_spec.
3425
3426 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
3427
3428         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
3429         * cvt.c: Update comment.
3430         * init.c (expand_cleanup_for_base): Update.
3431         * semantics.c (finish_parenthesized_expr): Update.
3432         * typeck.c (cp_truthvalue_conversion): Update.
3433
3434 2002-04-04  Jason Merrill  <jason@redhat.com>
3435
3436         * semantics.c (finish_eh_cleanup): New fn.
3437         * cp-tree.h: Add prototype.
3438         * init.c (perform_member_init, expand_cleanup_for_base): Use
3439         finish_eh_cleanup.
3440         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
3441         * cp-tree.h: Remove references.
3442         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
3443         * dump.c (cp_dump_tree): Likewise.
3444         * pt.c (tsubst_expr): Likewise.
3445         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
3446         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
3447         * tree.c (cp_statement_code_p): Likewise.
3448
3449         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
3450
3451         PR c++/5636
3452         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
3453         cleanup for nrv.
3454
3455         PR c++/5104
3456         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
3457         specifiers.
3458         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
3459
3460 2002-04-03  Richard Henderson  <rth@redhat.com>
3461
3462         * cp-lang.c (cxx_warn_unused_global_decl): New.
3463         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
3464
3465 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
3466
3467         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
3468         * tree.c (init_tree): Don't set hook.
3469
3470 2002-04-03  Roger Sayle  <roger@eyesopen.com>
3471
3472         PR c++/5998:
3473         * decl.c (duplicate_decls): Don't mess with assembler names when
3474         redeclaring builtin functions as static.
3475
3476 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3477
3478         * call.c (build_addr_func): Update.
3479         * class.c (resolve_address_of_overloaded_function): Update.
3480         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
3481         * cp-tree.h (cxx_mark_addressable): New.
3482         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
3483         * decl2.c (build_cleanup): Update.
3484         * except.c (build_throw): Update.
3485         * init.c (resolve_offset_ref): Update.
3486         * pt.c (convert_nontype_argument): Update.
3487         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
3488         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
3489         unary_complex_lvalue): Update.
3490         (mark_addressable): Rename.
3491
3492 2002-04-01  Roger Sayle  <roger@eyesopen.com>
3493
3494         PR c++/5998:
3495         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
3496         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
3497         but follow the SET_DECL_RTL idiom used elsewhere in the function.
3498
3499 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3500
3501         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3502         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
3503         * decl.c (grokdeclarator): Update.
3504         * mangle.c (write_integer_cst): Update.
3505         * typeck.c (build_binary_op): Update.
3506
3507 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
3508
3509         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
3510         * lex.c (cxx_init): Don't set hook.
3511
3512 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
3513
3514         * Make-lang.in (error.o): Update.
3515         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
3516         * cp-tree.h (struct diagnostic_context): Predeclare.
3517         (cxx_print_error_function): New.
3518         * error.c: Include langhooks-def.h.
3519         (lang_print_error_function): Rename.  Update.
3520         (init_error): Don't set hook.
3521
3522 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
3523
3524         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
3525         Redefine.
3526         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
3527         * decl.c (finish_enum): Similarly.
3528         * error.c (dump_type): Similarly.
3529         * lex.c (cxx_init): Similarly.
3530         * mangle.c (write_builtin_type): Similarly.
3531         * typeck.c (comptypes): Similarly.
3532
3533 2002-03-28  Roger Sayle  <roger@eyesopen.com>
3534
3535         PR c++/5998:
3536         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
3537         in the g++ front-end.
3538         (duplicate_decl): Allow redefinition of anticipated built-ins.
3539         Fix inlining problem by over-writing the old DECL_RTL.
3540         (lookup_namespace_name): Fail to find an identifier in the
3541         specified namespace if its still anticipated.
3542         (builtin_function_1): New function split out from builtin_function
3543         to create a builtin in the current namespace with given context.
3544         (builtin_function): Call builtin_function_1 to define the
3545         appropriate builtins in both the std and global namespaces.
3546         (select_decl): Don't test for anticipated decls here.
3547         (unqualified_namespace_lookup): Instead ignore them whilst
3548         searching through scopes and namespaces.
3549         * decl2.c (do_nonmember_using_decl): If a using declaration
3550         specifies an anticipated built-in function, mark it as no longer
3551         anticipated in that scope.
3552         (ambiguous_decl):  Avoid resolving to an anticipated decl.
3553         * lex.c (do_scoped_id): Fail to find an identifier in the global
3554         namespace if its still anticipated.
3555
3556 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
3557
3558         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
3559         * cp-tree.h (cp_make_lang_type): Rename.
3560         * lex.c (cp_make_lang_type): Rename.
3561         (make_aggr_type): Update.
3562         * tree.c (init_tree): Don't set make_lang_type_fn.
3563
3564 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
3565
3566         PR c++/6073
3567         * class.c (finish_struct_1): Update static field's DECL_MODE even
3568         if its type is a variant of t.
3569
3570 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
3571
3572         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
3573         * cp-tree.h (cxx_insert_default_attributes): New.
3574         * decl.c (insert_default_attributes): Rename.
3575
3576 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
3577
3578         PR c++/4884
3579         * call.c (build_op_delete_call): Allow for the fact the placement
3580         may be a COMPOUND_EXPR.
3581
3582 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
3583
3584         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
3585         * cp-tree.h (init_cplus_expand): Remove.
3586         (cxx_expand_expr): New.
3587         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
3588         fix prototype.
3589         (init_cplus_expand): Remove.
3590         * lex.c (cxx_init): Don't call init_cplus_expand.
3591
3592 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
3593
3594         PR c++/4884.
3595         * init.c (build_new_1): Allow for the fact the result of
3596         build_function_call may be a COMPOUND_EXPR.
3597
3598 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
3599
3600         PR c++/5682
3601         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
3602         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
3603         (dfs_skip_nonprimary_vbases_markedp): Remove.
3604         * search.c (get_shared_vbase_if_not_primary): Remove.
3605         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
3606         (dfs_skip_nonprimary_vbases_markedp): Remove.
3607         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
3608         (dfs_marked_real_bases_queue_p): Likewise.
3609
3610 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
3611
3612         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
3613         * cp-tree.h (cxx_mark_tree): New.
3614         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
3615
3616 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3617
3618         * cp-tree.h (cxx_maybe_build_cleanup): New.
3619         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
3620         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
3621         * tree.c (build_target_expr): Update.
3622         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
3623
3624 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
3625
3626         * decl2.c (cxx_decode_option): Handle -E.
3627         * lang-specs.h (default_compilers): Preprocess with cc1plus.
3628         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
3629
3630 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
3631
3632         PR c++/6037
3633         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
3634
3635 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3636
3637         * error.c (dump_type): Be careful about implicit typenames.
3638
3639 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3640
3641         PR C++/3656
3642         * semantics.c (finish_base_specifier): Handle erronous base
3643         classes.
3644
3645 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
3646
3647         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
3648         REAL_IS_NOT_DOUBLE.
3649
3650 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
3651
3652         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
3653         an index into the vtable_entry array regardless of
3654         TARGET_PTRMEMFUNC_VBIT_LOCATION.
3655
3656 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
3657
3658         * tree.c (cp_cannot_inline_tree_fn): Same.
3659
3660 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
3661
3662         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
3663         insert_block, getdecls, global_bindings_p): New.
3664
3665 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
3666
3667         PR c++/4361
3668         * mangle.c (struct globals) Add internal_mangling_p member.
3669         (write_template_param): Do internal mangling, if needed.
3670         (mangle_conv_op_name_for_type): Request internal mangling.
3671
3672 2002-03-20  Jason Merrill  <jason@redhat.com>
3673
3674         PR c++/2136
3675         * init.c (build_delete): Check access for a member op delete here.
3676         * decl2.c (delete_sanity): Not here.
3677
3678 2002-03-19  Jason Merrill  <jason@redhat.com>
3679
3680         PR c++/5118
3681         * class.c (get_vfield_name): Use the constructor_name.
3682
3683 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3684
3685         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
3686         * cp-tree.h (lang_printable_name): Rename.
3687         * error.c (lang_decl_name): Use new hook.
3688         * lex.c (cxx_init): Remove old hook.
3689         * pt.c (tsubst_decl): Use new hook.
3690         * tree.c (lang_printable_name): Rename.
3691
3692 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
3693
3694         PR c++/3882
3695         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
3696         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
3697         only after recording the declaration.
3698
3699 2002-03-18  Jason Merrill  <jason@redhat.com>
3700
3701         PR c++/2039
3702         * init.c (resolve_offset_ref): Hand off to build_component_ref.
3703
3704         PR c++/4222, c++/5995
3705         * call.c (build_over_call): Fix empty class logic.
3706
3707         PR c++/3870
3708         * cp-tree.h (struct saved_scope): Add last_parms field.
3709         * decl.c (maybe_push_to_top_level): Save last_function_parms.
3710         (pop_from_top_level): Restore it.
3711
3712         PR c++/4377
3713         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
3714         NON_LVALUE_EXPRs.
3715
3716         PR c++/4003
3717         * pt.c (tsubst_friend_function): Use decl_namespace_context.
3718
3719         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
3720         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
3721         type with a nontrivial destructor.
3722
3723 2002-03-17  Jason Merrill  <jason@redhat.com>
3724
3725         PR c++/4460
3726         * class.c (build_base_path): Virtual base layout is fixed in
3727         in-charge [cd]tors.
3728
3729 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
3730
3731         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
3732         * parse.y (yyparse): Remove macro.
3733
3734 2002-03-17  Jason Merrill  <jason@redhat.com>
3735
3736         PR c++/5757
3737         * init.c (build_new_1): Pass the right pointer to op delete.
3738
3739 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
3740
3741         PR c++/4361
3742         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
3743         conversion operators go.
3744         (struct lang_decl_flags): Add template_conv_p and unused
3745         bitfields.
3746         (DECL_TEMPLATE_CONV_FN_P): New macro.
3747         * call.c (build_user_type_conversion_1): Don't check second type
3748         conversion of overload set first.
3749         * class.c (add_method): Make sure templated conversion operators
3750         all end up on slot 2.
3751         * lex.c (do_identifier): A conversion operator token might be
3752         satisfied by a templated conversion operator.
3753         * pt.c (check_explicit_specialization): Use
3754         CLASSTYPE_FIRST_CONVERSION_SLOT.
3755         (template_parm_this_level_p): New function.
3756         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
3757         * search.c (lookup_fnfields_1): Template conversions will be on
3758         the first slot.
3759         * typeck.c (build_component_ref): Preserve the type of an
3760         conversion operator name on the overload type.
3761         (build_x_function_call): Retrieve the conversion operator name.
3762
3763 2002-03-15  Richard Henderson  <rth@redhat.com>
3764
3765         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
3766
3767 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
3768
3769         * cp-tree.h (CLEANUP_DECL): Remove.
3770         (CLEANUP_EXPR): Likewise.
3771         * decl.c (destroy_local_var): Simplify.
3772         (maybe_build_cleanup): Tidy.
3773         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
3774         * semantics.c (cp_expand_stmt): Likewise.
3775         * cp/tree.c (cp_statement_code_p): Likewise.
3776
3777 2002-03-15  Jason Merrill  <jason@redhat.com>
3778
3779         PR c++/5857
3780         * decl.c (duplicate_decls): Use merge_types instead of common_type.
3781         * typeck.c (common_type): Just hand off to
3782         type_after_usual_arithmetic_conversions and
3783         composite_pointer_type.
3784         (merge_types): New fn.
3785         (commonparms): Use it instead of common_type.
3786         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
3787         (composite_pointer_type): Also handle attributes.
3788         * cp-tree.h: Declare merge_types.
3789
3790         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
3791         variables.
3792         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
3793
3794 2002-03-14  Richard Henderson  <rth@redhat.com>
3795
3796         * decl.c: Include c-pragma.h.
3797         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
3798         * Make-lang.in: Update dependencies.
3799
3800 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
3801
3802         PR c++/5908
3803         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
3804         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
3805
3806 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
3807
3808         * mangle.c (write_builtin_type): Handle 128-bit integers even if
3809         they are not a standard integer type.
3810
3811 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
3812
3813         * cp-tree.h (init_init_processing): Remove declaration.
3814         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
3815         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
3816
3817 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3818
3819         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
3820         Define.
3821         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
3822         tree_code_length.
3823         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
3824         cplus_tree_code_name): Delete.
3825         (cxx_init): Don't call add_c_tree_codes, instead set
3826         lang_unsafe_for_reeval.  Don't try to copy into the various
3827         tree_code arrays.
3828
3829 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
3830
3831         PR c++/5659
3832         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
3833         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
3834         definitions.
3835
3836 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
3837
3838         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
3839         DR209 is now not a defect.
3840         * cp-tree.h (skip_type_access_control): Remove.
3841         * decl.c (grokdeclarator): Do type access control for friend
3842         declarations.
3843         * semantics.c (decl_type_access_control): Don't reset
3844         current_type_lookups.
3845         (save_type_access_control): Always save the lookups.
3846         (skip_type_access_control): Remove.
3847         (finish_class_definition): Don't change type_lookups.
3848
3849 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
3850
3851         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
3852         It is incorrect.
3853         * typeck.c (build_static_cast): Compare non-qualified types
3854         with pointer to member conversions.
3855
3856 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
3857             Daniel Berlin  <dan@dberlin.org>
3858
3859         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
3860         (cxx_get_alias_set): Use it.
3861
3862 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3863
3864         * cp-tree.h (stabilize_expr): Prototype.
3865
3866 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
3867
3868         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
3869         conditional return void.
3870
3871 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
3872
3873         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
3874         * cp-tree.h (cxx_unsave): New.
3875         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
3876         (init_tree): Update.
3877
3878 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3879
3880         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
3881         explicit sizeof/sizeof.
3882         * decl2.c (cxx_decode_option): Likewise.
3883         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
3884
3885 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
3886
3887         PR c++/775
3888         * decl.c (lookup_tag): Only reject enum/class mismatch, not
3889         class/union mismatch.
3890         * parse.y (check_class_key): New function.
3891         (structsp): Call it.
3892
3893 2002-03-01  Michael Matz  <matz@suse.de>
3894
3895         * typeck.c (cp_pointer_int_sum): Complete inner type which is
3896         used later by size_in_bytes().
3897
3898 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
3899
3900         * cp-tree.h:  Require __GNUC__ to be #defined.
3901         (build_init):  Add missing prototype.
3902
3903 2002-03-01  Jason Merrill  <jason@redhat.com>
3904
3905         * except.c: Don't include decl.h or obstack.h.  Do include
3906         tree-inline.h.
3907         (build_throw): Destroy temporaries from the thrown
3908         expression before calling __cxa_throw.  Construct a thrown
3909         temporary directly into the exception object.
3910         (stabilize_throw_expr): New function.
3911         (wrap_cleanups_r): New function.
3912         * tree.c (stabilize_expr): New function.
3913         * init.c (build_init): New function.
3914         * Make-lang.in (cp/except.o): Adjust .h deps.
3915
3916 2002-02-28  Jason Merrill  <jason@redhat.com>
3917
3918         * search.c (lookup_base_r): Don't clear is_non_public just because
3919         we found a friendly scope.
3920
3921         * decl.c (finish_function): Only warn about missing return
3922         statement with -Wreturn-type.
3923
3924 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
3925
3926         * class.c (build_clone): Update.
3927         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
3928         * cp-tree.h (cxx_dup_lang_specific_decl): New.
3929         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
3930         (copy_decl): Update.
3931         * method.c (make_thunk): Update.
3932
3933 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
3934
3935         * decl2.c: Delete traditional-mode-related code copied from
3936         the C front end but not used, or used only to permit the
3937         compiler to link.
3938
3939 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
3940
3941         PR c++/4093
3942         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
3943         to void.
3944
3945 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
3946
3947         PR other/5746
3948         * semantics.c (finish_switch_cond): Don't call get_unwidened
3949         if error_mark_node.
3950
3951 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
3952
3953         PR c++/2645, DR 295
3954         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
3955         tf_keep_type_decl.
3956         (make_typename_type): Use tsubst_flags_t.
3957         * decl.c (make_typename_type): Adjust. Return non-artificial
3958         TYPE_DECLs, if required.
3959         (grokdeclarator): Simplify CVR qualification handling. Allow bad
3960         qualifiers on typedef types.
3961         * decl2.c (handle_class_head): Adjust make_typename_type call.
3962         * parse.y (nested_name_specifier): Likewise.
3963         (typename_sub0): Likewise.
3964         (typename_sub1): Likewise.
3965         * pt.c (convert_template_argument): Adjust make_typename_type
3966         return value.
3967         (tsubst): Adjust cp_build_qualified_type_real calls.
3968         (check_cv_quals_for_unify): Cope with allowing bad qualifications
3969         on template type parms.
3970         (instantiate_decl): Recheck substitutions to give warnings on bad
3971         qualifications.
3972         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
3973
3974 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
3975
3976         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
3977
3978         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
3979         unless DECL_ALWAYS_INLINE.
3980
3981 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
3982
3983         * typeck.c (cp_pointer_int_sum): Renamed from
3984         pointer_int_sum, call pointer_int_sum.
3985
3986 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
3987
3988         * decl.c (duplicate_decls): Return 0 if issued error about
3989         redeclaration.
3990
3991 2002-02-19  Jason Merrill  <jason@redhat.com>
3992
3993         ABI change: Mangle `void (A::*)() const' as
3994         M1AKFvvE, not MK1AFvvE.
3995         * mangle.c (write_function_type): Write cv-quals for member
3996         function type here.
3997         (write_pointer_to_member_type): Not here.
3998
3999 2002-02-18  Jason Merrill  <jason@redhat.com>
4000
4001         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
4002         (do_decl_instantiation): Likewise.
4003
4004 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4005
4006         PR c++/5685
4007         * decl.c (duplicate_decls): Make warning unconditional
4008         if duplicate default argument declarations are present.
4009
4010 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
4011
4012         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
4013         shortening.
4014
4015 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
4016
4017         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
4018         remove incorrect comment. Move #if 0'd code to common path. Use
4019         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
4020
4021 2002-02-13  Jason Merrill  <jason@redhat.com>
4022
4023         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
4024         (finish_function): Don't warn if current_function_returns_null.
4025
4026         * typeck2.c (digest_init): Do handle values of vector type.
4027
4028         * typeck2.c (digest_init, process_init_constructor): Treat vectors
4029         like arrays.
4030
4031 2002-02-11  Jason Merrill  <jason@redhat.com>
4032
4033         * parse.y (reserved_declspecs): Don't handle attributes.
4034         (reserved_typespecquals): Handle them here.
4035         * Make-lang.in (parse.c): Adjust expected conflicts.
4036
4037 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
4038
4039         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
4040         instead of compstmt.
4041         (compstmt_or_stmtexpr): Renamed from compstmt.
4042         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
4043
4044 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
4045
4046         Rename instantiate_type_flags to tsubst_flags_t & expand use.
4047         * cp-tree.h (instantiate_type_flags): Rename to ...
4048         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
4049         add tf_warning flag.
4050         (instantiate_type): Adjust prototype.
4051         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
4052         do_type_instantiation, cp_build_qualified_type_real): Likewise.
4053         cp_build_qualified_type: Adjust.
4054         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
4055         tf_*.
4056         * call.c (standard_conversion): Rename itf_* to tf_*.
4057         (reference_binding): Likewise.
4058         (convert_like_real): Likewise.
4059         * cvt.c (cp_convert_to_pointer): Likewise.
4060         (convert_to_reference): Likewise.
4061         * decl.c (lookup_namespace_name): Use tf_* flags.
4062         (make_typename_type): Likewise.
4063         (grokdeclarator): Likewise.
4064         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
4065         (coerce_template_template_parms, convert_template_argument,
4066         coerce_template_parms, maybe_get_template_decl_from_type_decl,
4067         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
4068         instantiate_class_template, tsubst_template_arg_vector,
4069         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
4070         tsubst_decl, tsubst_arg_types, tsubst_function_type,
4071         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
4072         instantiate_template, fn_type_unification,
4073         resolve_overloaded_unification, verify_class_unification,
4074         unify, get_bindings_real, do_type_instantiation,
4075         regenerate_decl_from_template, instantiate_decl,
4076         tsubst_initializer_list, tsubst_enum,
4077         get_mostly_instantiated_function_type,
4078         invalid_nontype_parm_type_p): Likewise.
4079         * tree.c (cp_build_qualified_type_real): Likewise.
4080         * typeck.c (build_binary_op): Rename itf_* to tf_*.
4081         (build_ptrmemfunc): Likewise.
4082         (convert_for_assignment): Likewise.
4083
4084 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
4085
4086         PR c++/109
4087         * decl.c (grokdeclarator): Allow friend declarations from
4088         dependent types.
4089         * decl2.c (handle_class_head): Don't push into template parm contexts.
4090         * pt.c (push_template_decl_real): Template parm contexts are never
4091         being defined.
4092
4093 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
4094
4095         * class.c: Include target.h.
4096         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
4097         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
4098         bit-field layout.
4099         * Make-lang.in: Adjust deps.
4100
4101 2002-02-05  Jason Merrill  <jason@redhat.com>
4102
4103         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
4104
4105 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
4106
4107         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
4108         (finish_switch_cond): Set SWITCH_TYPE.
4109
4110 2002-02-04  Richard Henderson  <rth@redhat.com>
4111
4112         * method.c (use_thunk): Always initialize the block tree.  Reindent.
4113         * semantics.c (expand_body): Emit thunks after function, not before.
4114
4115 2002-02-04  Jason Merrill  <jason@redhat.com>
4116
4117         * decl.c (start_function): Call cplus_decl_attributes immediately
4118         after grokdeclarator.
4119
4120         * decl.c (start_function): Combine DECL_RESULT handling code.
4121
4122 2002-02-03  Jason Merrill  <jason@redhat.com>
4123
4124         * xref.c: Remove.
4125         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
4126         (cp/xref.o): Remove dependencies.
4127         * class.c (finish_struct_1, check_methods): Don't call xref fns.
4128         (finish_struct_1): Likewise.
4129         * friend.c (make_friend_class): Likewise.
4130         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
4131         * spew.c (read_process_identifier): Likewise.
4132
4133 2002-02-01  Jason Merrill  <jason@redhat.com>
4134
4135         PR c++/4872
4136         * decl.c (finish_function): Warn about a non-void function with
4137         no return statement and no abnormal exit.
4138         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
4139         (current_function_returns_abnormally): New macro.
4140         * call.c (build_call): Set it.
4141
4142         * typeck.c (build_component_ref): Always complain about offsetof
4143         constructs on non-PODs.  Only make it an error for members of
4144         virtual bases.
4145
4146         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
4147         (dump_function_decl): Always dump parms.
4148
4149         * decl2.c (finish_static_data_member_decl): Complain about a local
4150         class with a static data member.
4151
4152         PR c++/4286
4153         * search.c (lookup_field_1): Don't xref a static data member
4154         just because we looked it up.
4155
4156 2002-01-31  Jason Merrill  <jason@redhat.com>
4157
4158         * Make-lang.in (parse.c): Handle .output file.
4159
4160         PR c++/3395
4161         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
4162         not TREE_TYPE.
4163         * semantics.c (finish_class_definition): Adjust.
4164
4165         Allow attributes in parms and casts.
4166         * parse.y (named_parm): Don't strip attrs.
4167         (declmods): Remove 'attributes' production.
4168         (nonempty_cv_qualifiers): Accept attributes.
4169         (ATTRIBUTE): Give precedence.
4170         * decl.c (groktypename): Handle attributes.
4171         (grokparms): Likewise.
4172
4173 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
4174
4175         * decl2.c (cxx_decode_option): Pass 0 as last argument to
4176         cpp_handle_option.
4177         * lang-specs.h: Use cpp_unique_options instead of cpp_options
4178         when used together with cc1_options.
4179
4180 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
4181
4182         PR c++/5132
4183         * typeck2.c (digest_init): Make sure non-array core type is
4184         instantiated.
4185         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
4186         constructor, rather than build a new one.
4187         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
4188         PURPOSE of constructor elts.
4189
4190 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
4191
4192         * Make-lang.in (parse.c): Adjust expected number of
4193         shift-reduce conflicts.
4194         (decl.o): Depend on diagnostic.h.
4195         * decl.c: Include diagnostic.h.
4196         (grokdeclarator): Check for null pointer.
4197         (finish_function): Don't abort when
4198         current_binding_level->parm_flag != 1, if errors have
4199         occurred; throw away the statement tree and extra binding
4200         levels, and continue.
4201         * lex.c (note_list_got_semicolon): Check for null pointer.
4202         * method.c (hack_identifier): Just return error_mark_node if
4203         value is error_mark_node.
4204         * parse.y (primary: TYPEID(type_id)): No need to use
4205         TYPE_MAIN_VARIANT here.
4206         (handler_seq): Accept an empty list of catch clauses and
4207         generate a fake handler block to avoid later crashes.
4208         (ansi_raise_identifier): Accept the error token too.
4209         * semantics.c (begin_class_definition,
4210         finish_class_definition): Check for error_mark_node.
4211
4212 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
4213
4214         * typeck2.c (friendly_abort): Delete definition.
4215         * cp-tree.h (friendly_abort): Don't prototype.
4216         (my_friendly_assert): Use fancy_abort.
4217
4218 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4219
4220         * cp-tree.h (my_friendly_abort): Remove.
4221
4222 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
4223
4224         * spew.c (pending_inlines, pending_inlines_tail,
4225         processing_these_inlines): Make static.
4226         (mark_pending_inlines): Remove static.
4227         (begin_parsing_inclass_inline): If in function, save pi
4228         for GC to cp_function_chain->unparsed_inlines instead.
4229         (process_next_inline): Likewise.
4230         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
4231         (mark_pending_inlines): Add prototype.
4232         * decl.c (spew_debug): Remove unused extern.
4233         (mark_lang_function): Call mark_pending_inlines.
4234
4235 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4236
4237         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
4238         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
4239         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
4240         Change my_fancy_abort() to abort().
4241
4242 2002-01-23  Jason Merrill  <jason@redhat.com>
4243
4244         PR c++/5453
4245         * class.c (fixed_type_or_null): Fix thinko.
4246
4247         PR c++/3331
4248         * init.c (resolve_offset_ref): Use build_indirect_ref.
4249
4250         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
4251
4252 2002-01-22  Jason Merrill  <jason@redhat.com>
4253
4254         * parse.y (function_body): Suppress the block for the outermost
4255         curly braces.
4256         * decl.c (pushdecl): Don't try to skip it.
4257         (begin_function_body): Keep the block we create, not the next one.
4258         * init.c (emit_base_init): Don't mess with keep_next_level.
4259
4260         * class.c (build_base_path): Tweak formatting.
4261
4262 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
4263
4264         Fix regression introduced with patch for c++/775
4265         * parse.y (class_head_defn): Check for template specializations
4266         with a different class-key.
4267
4268 2002-01-17  Jason Merrill  <jason@redhat.com>
4269
4270         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
4271         (begin_function_body): Call them and keep_next_level.
4272         * init.c (emit_base_init): Call keep_next_level.
4273         * semantics.c (setup_vtbl_ptr): Lose.
4274         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
4275         (vtbls_set_up_p): Lose.
4276         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
4277         * method.c (do_build_copy_constructor): Likewise.
4278         (synthesize_method): Call finish_mem_initializers.
4279         * parse.y (nodecls): Likewise.
4280
4281         * error.c (dump_type_suffix): Print the exception specs before
4282         recursing.
4283         (dump_function_decl): Here, too.
4284
4285         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
4286
4287 2002-01-10  Ira Ruben   <ira@apple.com>
4288
4289         PR c++/907
4290         * decl.c (start_method): Handle attrlist.
4291
4292 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
4293
4294         * decl2.c (max_tinst_depth): Increase default limit to 500.
4295
4296 2002-01-10  Graham Stott  <grahams@redhat.com>
4297
4298         * spew.c (YYCHAR): Uppercase macro parameter and add
4299         parenthesis.
4300         (YYCODE): Likewise.
4301         (NAME): Uppercase macro parameter.
4302
4303 2002-01-09  Graham Stott  <grahams@redhat.com>
4304
4305         * decl.h (grokdeclarator): Wrap long line.
4306
4307         * semantics.c (FINISH_COND): Uppercase macro paramaters and
4308         add parenthesis.
4309
4310 2002-01-08  Graham Stott  <grahams@redhat.com>
4311
4312         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
4313         (PALLOC): Uppercase macro parameter and whitespace.
4314         (SALLOC): Uppercase macro parameter.
4315         (SFREE): Uppercase macros parameter, add parenthese and
4316         whitespace.
4317         (STREQL): Uppercase macro parameter and whitespace.
4318         (STRNEQ): Likewise.
4319         (STRLSS): Likewise.
4320         (STRLEQ): Likewise.
4321         (STRGTR): Likewise.
4322         (STRGEQ): Likewise.
4323
4324         * call.c (convert_like): Add parenthesis and wrap.
4325         (convert_like_with_context): Likewise.
4326         (ICS_RANK): Whitespace.
4327         (NEED_TEMPORARY_P): Remove parenthesis.
4328
4329         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
4330         whitespace.
4331         (VTT_MARKED_BINFO_P): Likewise.
4332
4333         * decl.c (BINDING_LEVEL): Add parenthesis.
4334         (DEF_OPERATOR): Likewise.
4335
4336         * mangle.c (MANGLE_TRACE): Add parenthesis.
4337         (MANGLE_TRACE_TREE): Likewise.
4338         (write_signed_number): Likewise.
4339         (write_unsigned_number): Likewise.
4340
4341         * pt.c (ccat): Uppercase macro parameter.
4342         (cat): Likewise
4343
4344         * search.c (SET_BINFO_ACCESS): Add parenthesis.
4345
4346 2002-01-07  Jason Merrill  <jason@redhat.com>
4347
4348         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
4349         to pedwarn.
4350
4351         PR c++/3536
4352         * method.c (make_thunk): If !flag_weak, give the thunk the
4353         function's linkage.
4354         (use_thunk): Here, too.
4355
4356 2002-01-07  Graham Stott  <grahams@redhat.com>
4357
4358         * error.c: Update copyright date.
4359         (print_scope_operator): Add parenthesis.
4360         (print_left_paren): Likewise.
4361         (print_right_paren): Likewise.
4362         (print_left_bracket): Likewise.
4363         (print_right_bracket): Likewise.
4364         (print_template_argument_list_start): Likewise.
4365         (print_template_argument_list_end): Likewise.
4366         (print_non_consecutive_character): Likewise.
4367         (print_tree_identifier): Likewise.
4368         (print_identifier): Likewise.
4369         (NEXT_CODE): Uppercase macro parameter.
4370         (ident_fndecl): Delete unused.
4371         (GLOBAL_THING): Likewise.
4372
4373 2002-01-06  Graham Stott  <grahams@redhat.com>
4374
4375         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
4376         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
4377         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
4378         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
4379         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
4380         (C_IS_RESERVED_WORD): Uppercase macro parameter.
4381         (C_RID_YYCODE) Likewise.
4382         (ptrmem_cst): Use rtx.
4383         (LOCAL_BINDING_P): Add whitespace.
4384         (INHERITED_VALUE_BINDING_P): Likewise.
4385         (BINDING_SCOPE): Wrap long line.
4386         (BINDING_HAS_LEVEL_P): Remove parenthesis.
4387         (BINDING_VALUE): Wrap long line.
4388         (BINDING_TYPE): Whitespace.
4389         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
4390         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
4391         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
4392         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
4393         (same_type_p): Uppercase macro parameters.
4394         (same_type_ignoring_top_level_qualifiers_p): Likewise.
4395         (OVL_FUNCTION): Wrap long line.
4396         (OVL_CHAIN): Whitespace.
4397         (OVL_CURRENT): Add parenthesis and whitespace.
4398         (OVL_NEXT): Whitespace.
4399         (OVL_USED): Likewise.
4400         (IDENTIFIER_TYPE_VALUE): Likewise.
4401         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
4402         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
4403         (LANG_ID_FIELD): Whitespace.
4404         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
4405         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
4406         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
4407         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
4408         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
4409         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
4410         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
4411         (IDENTIFIER_VIRTUAL_P): Likewise.
4412         (IDENTIFIER_OPNAME_P): Likewise.
4413         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
4414         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
4415         (C_SET_EXP_ORIGINAL_CODE): Likewise.
4416         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
4417         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
4418         (IS_AGGR_TYPE): Uppercase macro parameter.
4419         (CLASS_TYPE_P): Likewise.
4420         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
4421         (IS_AGGR_TYPE_2): Whitespace.
4422         (TAGGED_TYPE_P): Uppercase macro parameter.
4423         (TYPE_BUILT_IN): Whitespace.
4424         (TYPE_FOR_JAVA): Likewise.
4425         (FUNCTION_ARG_CHAIN): Remove parenthesis.
4426         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
4427         (FUNCTION_FIRST_USER_PARAM): Likewise.
4428         (PROMOTES_TO_AGGR_TYPE): Whitespace.
4429         (DERIVED_FROM_P): Add parenthesis and wrap.
4430         (UNIQUELY_DERIVED_FROM_P): Likewise.
4431         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
4432         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
4433         (CLASSTYPE_USE_TEMPLATE): Whitespace.
4434         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
4435         (TYPE_GETS_DELETE): Add parenthesis.
4436         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
4437         (TYPE_HAS_ASSIGN_REF): Likewise,
4438         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
4439         (TYPE_HAS_INIT_REF): Likewise.
4440         (TYPE_HAS_CONST_INIT_REF): Likewise.
4441         (TYPE_BEING_DEFINED): Likewise.
4442         (TYPE_LANG_SPECIFIC): Likewise.
4443         (CLASSTYPE_RTTI): Likewise.
4444         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
4445         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
4446         (TYPE_OVERLOADS_ARROW): Likewise.
4447         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
4448         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
4449         (CLASSTYPE_METHOD_VEC): Likewise.
4450         (CLASSTYPE_MARKED_N): Likewise.
4451         (CLASSTYPE_MARKED): Likewise.
4452         (CLASSTYPE_MARKED2): Likewise.
4453         (CLASSTYPE_MARKED3): Likewise.
4454         (CLASSTYPE_MARKED4): Likewise.
4455         (CLASSTYPE_MARKED5): Likewise.
4456         (CLASSTYPE_MARKED6): Likewise.
4457         (SET_CLASSTYPE_MARKED): Whitespace.
4458         (CLEAR_CLASSTYPE_MARKED): Likewise.
4459         (SET_CLASSTYPE_MARKED2): Likewise.
4460         (CLEAR_CLASSTYPE_MARKED2): Likewise.
4461         (SET_CLASSTYPE_MARKED3): Likewise.
4462         (CLEAR_CLASSTYPE_MARKED3): Likewise.
4463         (SET_CLASSTYPE_MARKED4): Likewise.
4464         (CLEAR_CLASSTYPE_MARKED4): Likewise.
4465         (SET_CLASSTYPE_MARKED5): Likewise.
4466         (CLEAR_CLASSTYPE_MARKED5): Likewise.
4467         (SET_CLASSTYPE_MARKED6): Likewise.
4468         (CLEAR_CLASSTYPE_MARKED6): Likewise.
4469         (CLASSTYPE_TAGS): Likewise.
4470         (CLASSTYPE_VSIZE): Likewise.
4471         (CLASSTYPE_VBASECLASSES): Likewise.
4472         (CANONICAL_BINFO): Add parenthesis.
4473         (CLASSTYPE_SIZE(NODE): Likewise.
4474         (CLASSTYPE_SIZE_UNIT): Likewise.
4475         (CLASSTYPE_ALIGN(NODE): Likewise.
4476         (CLASSTYPE_USER_ALIGN): Likewise.
4477         (TYPE_JAVA_INTERFACE): Likewise.
4478         (CLASSTYPE_PURE_VIRTUALS): Likewise.
4479         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
4480         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
4481         (CLASSTYPE_HAS_MUTABLE): Likewise.
4482         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
4483         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
4484         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
4485         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
4486         (CLASSTYPE_INTERFACE_ONLY): Likewise.
4487         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
4488         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
4489         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
4490         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
4491         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
4492         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
4493         (BINFO_UNSHARED_MARKED): Whitespace.
4494         (BINFO_MARKED): Whitespace and wrap.
4495         (SET_BINFO_MARKED): Likewise.
4496         (CLEAR_BINFO_MARKED): Likewise.
4497         (BINFO_VTABLE_PATH_MARKED): Likewise.
4498         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
4499         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
4500         (BINFO_SUBVTT_INDEX): Remove parenthesis.
4501         (BINFO_VPTR_INDEX): Likewise.
4502         (BINFO_PRIMARY_BASE_OF): Likewise,
4503         (CLASSTYPE_VFIELDS): Whitespace.
4504         (VF_DERIVED_VALUE): Wrap long line.
4505         (NAMESPACE_LEVEL): Whitespace.
4506         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
4507         (DEFARG_POINTER): Whitespace.
4508         (DECL_NEEDED_P): Remove parenthesis.
4509         (DECL_LANGUAGE): Whitespace.
4510         (SET_DECL_LANGUAGE): Add parenthesis.
4511         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
4512         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
4513         (DECL_IN_AGGR_P): Whitespace.
4514         (DECL_FRIEND_P): Likewise.
4515         (DECL_BEFRIENDING_CLASSES): Likewise.
4516         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
4517         (DECL_NONCONVERTING_P): Whitespace.
4518         (DECL_PURE_VIRTUAL_P): Likewise.
4519         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
4520         (DECL_PENDING_INLINE_INFO): Whitespace.
4521         (DECL_SORTED_FIELDS): Likewise.
4522         (DECL_DEFERRED_FN): Likewise.
4523         (DECL_TEMPLATE_INFO): Likewise.
4524         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
4525         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
4526         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
4527         (TMPL_ARGS_LEVEL): Likewise.
4528         (SET_TMPL_ARGS_LEVEL): Likewise.
4529         (INNERMOST_TEMPLATE_PARMS): Whitespace.
4530         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
4531         (INTEGRAL_CODE_P(CODE): Add parenthesis.
4532         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
4533         (TYPE_HAS_CONSTRUCTOR): Whitespace.
4534         (TREE_HAS_CONSTRUCTOR): Likewise.
4535         (TYPE_HAS_DESTRUCTOR): Likewise.
4536         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
4537         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
4538         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
4539         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
4540         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
4541         (TYPE_PTRMEMFUNC_P): Likewise.
4542         (TYPE_PTRMEMFUNC_FLAG): Likewise.
4543         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
4544         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
4545         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
4546         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
4547         (DECL_ACCESS): Whitespace.
4548         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
4549         (DECL_GLOBAL_DTOR_P): Likewise.
4550         (GLOBAL_INIT_PRIORITY): Likewise.
4551         (DECL_TEMPLATE_PARMS): Likewise.
4552         (DECL_TEMPLATE_RESULT): Likewise.
4553         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
4554         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
4555         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
4556         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
4557         (PRIMARY_TEMPLATE_P): Add parenthesis.
4558         (DECL_USE_TEMPLATE): Whitespace.
4559         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
4560         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
4561         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
4562         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
4563         (CALL_DECLARATOR_PARMS): Remove parenthesis.
4564         (CALL_DECLARATOR_QUALS): Likewise.
4565         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
4566         (TEMP_NAME_P): Wrap.
4567         (VFIELD_NAME_P): Likewise.
4568         (B_SET): Uppercase macro parameters and add parenthesis.
4569         (B_CLR): Likewise.
4570         (B_TST): Likewise.
4571         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
4572         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
4573         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
4574         (same_or_base_type_p): Likewise.
4575         (cp_deprecated): Likewise.
4576
4577 2002-01-05  Richard Henderson  <rth@redhat.com>
4578
4579         * semantics.c (expand_body): Revert last change.
4580
4581 2002-01-04  Jason Merrill  <jason@redhat.com>
4582
4583         PR c++/4122
4584         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
4585         lost primary.
4586
4587         * class.c (build_vtbl_initializer): Check for a lost primary
4588         before calculating the vtable entry to throw away.
4589
4590 2002-01-02  Jason Merrill  <jason@redhat.com>
4591
4592         * semantics.c (expand_body): Call outlining_inline_function when
4593         emitting an inline function out of line.
4594
4595 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4596
4597         PR c++/5116, c++/764 reversion
4598         * call.c (build_new_op): Revert the instantiations. They are
4599         incorrect.
4600
4601 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4602
4603         PR c++/5089
4604         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
4605
4606 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4607
4608         PR c++/3716
4609         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
4610         (tsubst, case POINTER_TYPE): Handle pmfs here.
4611         (tsubst, case OFFSET_TYPE): Check it is not an offset to
4612         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
4613
4614 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4615
4616         PR c++/35
4617         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
4618         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
4619         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
4620         PARM_DECL.
4621         (tsubst_template_parms): Break up loop statements.
4622         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
4623         parm PARM_DECLs don't get promoted.
4624
4625 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4626
4627         PR c++/5123
4628         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
4629         (build_x_function_call): Cope with a COMPONENT_REF containing a
4630         TEMPLATE_ID_EXPR.
4631
4632 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4633
4634         PR c++/5213
4635         * pt.c (convert_template_argument): Be more careful determining
4636         when RECORD_TYPE templates are or are not templates.
4637
4638 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4639
4640         PR c++/775
4641         * cp-tree.h (handle_class_head): Adjust prototype.
4642         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
4643         parameters. Use for all class heads.
4644         * parse.y (named_class_head_sans_basetype, named_class_head,
4645         named_complex_class_head_sans_basetype,
4646         named_class_head_sans_basetype_defn,
4647         unnamed_class_head): Remove.
4648         (class_head, class_head_apparent_template): Recognize class heads
4649         (class_head_decl, class_head_defn): New reductions. Process class
4650         heads.
4651         (structsp): Adjust class definition and class declaration
4652         reductions.
4653         (maybe_base_class_list): Give diagnostic on empty list.
4654
4655 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4656
4657         PR c++/4379
4658         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
4659         single non-static member.
4660         (unary_complex_lvalue): If it cannot be a pointer to member, don't
4661         make it so. Check it is not pointer to reference.
4662
4663 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4664
4665         PR c++/5132
4666         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
4667         are processing a template decl.
4668
4669 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4670
4671         PR c++/5116, c++/764
4672         * call.c (build_new_op): Make sure template class operands are
4673         instantiated. Simplify arglist construction.
4674
4675 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
4676
4677         * call.c (build_user_type_conversion_1): Use my_friendly_assert
4678         rather than if ... abort.
4679         * cvt.c (convert_to_reference): Likewise.
4680         * semantics.c (setup_vtbl_ptr): Likewise.
4681         * pt.c (lookup_template_class): Comment typo.
4682
4683 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
4684
4685         PR c++/5125
4686         * pt.c (push_template_decl_real): Make sure DECL has
4687         DECL_LANG_SPECIFIC.
4688
4689 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
4690
4691         PR c++/335
4692         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
4693         for non-reference fields.
4694         * typeck.c (require_complete_type): Use resolve_offset_ref).
4695
4696 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
4697
4698         PR c++/196
4699         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
4700
4701 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
4702
4703         PR c++/160
4704         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
4705         up. Don't stabilize_references when initializing a reference.
4706
4707 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4708
4709         * decl2.c (lang_f_options): Const-ify.
4710
4711 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
4712
4713         * config-lang.in (diff_excludes): Remove.
4714
4715 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
4716
4717         PR c++/90
4718         * typeck.c (build_function_call_real): Use original function
4719         expression for errors.
4720
4721 2001-12-18  Jason Merrill  <jason@redhat.com>
4722
4723         PR c++/3242
4724         * class.c (add_method): Do compare 'this' quals when trying to match a
4725         used function.  Don't defer to another used function.
4726
4727 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
4728
4729         * pt.c (instantiate_clone): Remove, fold into ...
4730         (instantiate_template): ... here. Simplify by removing mutual
4731         recursion.
4732         * typeck2.c (build_m_component_ref): Don't cv qualify the function
4733         pointed to by a pointer to function.
4734         * class.c (delete_duplicate_fields_1): Typo.
4735
4736 2001-12-18  Jason Merrill  <jason@redhat.com>
4737
4738         C++ ABI change: destroy value arguments in caller.
4739         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
4740         create an extra binding level for the parameters.
4741         * decl.c (store_parm_decls): Don't do parameter cleanups.
4742
4743 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
4744
4745         * call.c (build_new_method_call): Use '%#V'.
4746         * error.c (cv_to_string): Use V parameter to determine padding.
4747
4748 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
4749
4750         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
4751         spellings in messages.
4752
4753 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
4754
4755         * cp-tree.h: Delete #defines for cp_error, cp_warning,
4756         cp_pedwarn, and cp_compiler_error.
4757         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
4758         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
4759         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
4760         typeck2.c: Change calls to the above macros to use their
4761         language-independent equivalents: error, warning, pedwarn, and
4762         internal_error respectively.
4763
4764 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
4765
4766         * decl2.c (finish_file): Remove back_end_hook.
4767
4768 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
4769
4770         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
4771         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
4772         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
4773
4774 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
4775
4776         * lang-options.h: Use American spelling in messages.
4777
4778 2001-12-13  Jason Merrill  <jason@redhat.com>
4779
4780         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
4781
4782         Use cleanups to run base and member destructors.
4783         * init.c (push_base_cleanups): New function, split out from...
4784         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
4785         * decl.c (finish_destructor_body): Move vbase destruction code to
4786         push_base_cleanups.
4787         (begin_function_body, finish_function_body): New fns.
4788         (finish_function): Move [cd]tor handling and call_poplevel to
4789         finish_function_body.
4790         (pushdecl): Skip the new level.
4791         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
4792         (setup_vtbl_ptr): Call push_base_cleanups.
4793         * method.c (synthesize_method): Call {begin,end}_function_body.
4794         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
4795         * cp-tree.h: Declare new fns.
4796         * parse.y (function_body, .begin_function_body): New nonterminals.
4797         (fndef, pending_inline, function_try_block): Use function_body.
4798         (ctor_initializer_opt, function_try_block): No longer has a value.
4799         (base_init): Remove .set_base_init token.
4800         (.set_base_init, compstmt_or_error): Remove.
4801         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
4802
4803         * optimize.c (maybe_clone_body): Fix parameter updating.
4804
4805 2001-12-12  Jason Merrill  <jason@redhat.com>
4806
4807         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
4808         * semantics.c (genrtl_start_function): Don't pass
4809         parms_have_cleanups or push an extra binding level.
4810         (genrtl_finish_function): Lose cleanup_label cruft.
4811
4812         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
4813         (ctor_label): Remove.
4814         * semantics.c (finish_return_stmt): Lose ctor_label support.
4815         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
4816         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
4817         dtor_label.
4818
4819         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
4820         check for [cd]tors.
4821         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
4822
4823         * decl.c (finish_function): Check VMS_TARGET, not VMS.
4824
4825         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
4826         (end_cleanup_fn): And poplevel.
4827
4828         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
4829         if we're in a template.
4830
4831 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
4832
4833         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
4834         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
4835         THIS_NAME_P): Delete.
4836         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
4837         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
4838         with internal naming scheme.
4839         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
4840
4841 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
4842
4843         * decl.c (grokdeclarator): Deprecated implicit typename use.
4844
4845 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
4846
4847         PR g++/51
4848         * parse.y (frob_specs): Indicate it is a language linkage which
4849         contained the extern.
4850         * decl.c (grokdeclarator): Allow extern language linkage with
4851         other specifiers.
4852
4853 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
4854
4855         PR g++/72
4856         * decl.c (add_binding): Don't reject duplicate typedefs involving
4857         template parameters.
4858
4859 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
4860
4861         * parse.y, semantics.c: Similarly.
4862
4863 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
4864
4865         PR g++/87
4866         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
4867         (copy_args_p): Rename to ...
4868         (copy_fn_p): ... here.
4869         (grok_special_member_properties): New function.
4870         (grok_op_properties): Lose VIRTUALP parameter.
4871         (copy_assignment_arg_p): Remove.
4872         * call.c (build_over_call): Use copy_fn_p.
4873         * decl.c (grokfndecl): Reformat. Adjust call to
4874         grok_op_properties.
4875         (copy_args_p): Rename to ...
4876         (copy_fn_p): ... here. Reject template functions. Check for pass
4877         by value.
4878         (grok_special_member_properties): Remember special functions.
4879         (grok_ctor_properties): Don't remember them here, just check.
4880         (grok_op_properties): Likewise.
4881         (start_method): Call grok_special_member_properties.
4882         * decl2.c (grokfield): Likewise.
4883         (copy_assignment_arg_p): Remove.
4884         (grok_function_init): Don't remember abstract assignment here.
4885         * pt.c (instantiate_class_template): Call
4886         grok_special_member_properties.
4887         (tsubst_decl): Adjust grok_op_properties call.
4888
4889 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
4890
4891         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
4892         RID_TYPES_COMPATIBLE_P.
4893
4894 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4895
4896         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
4897         call to build_aggr_init.
4898         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
4899
4900 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
4901
4902         * parse.y: Replace uses of the string non-terminal with STRING.
4903         Don't perform string concatentaion here.
4904         (string): Remove non-terminal.
4905         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
4906
4907 2001-12-05  Jason Merrill  <jason@redhat.com>
4908
4909         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
4910         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
4911         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
4912         * pt.c (push_tinst_level): No longer static.
4913         * cp-tree.h: Declare them.
4914
4915         * init.c (resolve_offset_ref): Don't check access for the base
4916         conversion to access a FIELD_DECL.
4917
4918         * cp-tree.h (TYPE_REFFN_P): New macro.
4919         * decl.c (bad_specifiers): Check it, too.
4920
4921         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
4922         on the __*_type_info type if we haven't seen a definition.
4923
4924 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
4925
4926         * decl.c: Include c-common.h.
4927         (shadow_warning): Move to c-common.c.
4928
4929 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4930
4931         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
4932
4933 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
4934
4935         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
4936
4937 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
4938
4939         PR g++/164
4940         * init.c (sort_base_init): Allow binfos to be directly specified.
4941         * method.c (do_build_copy_constructor): Explicitly convert to the
4942         base instance.
4943         (do_build_assign_ref): Likewise.
4944
4945 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
4946
4947         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
4948         declaration and initialization.
4949
4950 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
4951
4952         * typeck2.c: Remove leading capital from diagnostic messages, as
4953         per GNU coding standards.
4954
4955 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
4956
4957         PR c++/3394
4958         * decl.c (xref_basetypes): Handle attributes between
4959         'class' and name.
4960
4961 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
4962
4963         PR g++/3381
4964         * parse.y (named_complex_class_head_sans_basetype): Add new
4965         reduction.
4966         * Make-lang.in (parse.c): Adjust expected conflict count.
4967
4968 2001-12-03  Jason Merrill  <jason@redhat.com>
4969
4970         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
4971         immediate binfos for our virtual bases.
4972
4973 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
4974
4975         * call.c (build_java_interface_fn_ref): Similarly.
4976         * except.c (is_admissible_throw_operand): Similarly.
4977         * init.c (build_java_class_ref): Similarly.
4978         * xref.c (open_xref_file): Similarly.
4979
4980 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4981
4982         * class.c (finish_struct): Remove trailing periods from messages.
4983         * decl.c (check_tag_decl): Similarly.
4984         * lex.c (cxx_set_yydebug): Similarly.
4985         * typeck2.c (friendly_abort): Similarly.
4986
4987 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
4988
4989         PR c++/3048
4990         * cp-tree.h (ovl_member): Remove.
4991         * decl2.c (merge_functions): Handle extern "C" functions
4992         specially.
4993         * tree.c (ovl_member): Remove.
4994
4995 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
4996
4997         PR c++/4842
4998         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
4999         FUNCTION_DECL, as input.
5000         (mark_overriders): Remove.
5001         (warn_hidden): Rework for the new ABI.
5002
5003 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5004
5005         PR c++/3471
5006         * call.c (convert_like_real): Do not build additional temporaries
5007         for rvalues of class type.
5008
5009 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5010
5011         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
5012         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
5013         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
5014         (DERIVED_FROM_P): Likewise.
5015         (enum base_access): Renumber, add ba_quiet bit mask.
5016         (get_binfo): Remove.
5017         (get_base_distance): Remove.
5018         (binfo_value): Remove.
5019         (ACCESSIBLY_DERIVED_FROM_P): Remove.
5020         * call.c (standard_conversion): Use lookup_base.
5021         * class.c (strictly_overrides): Likewise.
5022         (layout_virtual_bases): Likewise.
5023         (warn_about_ambiguous_direct_bases): Likewise.
5024         (is_base_of_enclosing_class): Likewise.
5025         (add_vcall_offset_vtbl_entries_1): Likewise.
5026         * cvt.c (build_up_reference): Adjust comment.
5027         * init.c (build_member_call): Reformat.
5028         * search.c (get_binfo): Remove.
5029         (get_base_distance_recursive): Remove.
5030         (get_base_distance): Remove.
5031         (lookup_base_r): Tweak.
5032         (lookup_base): Add ba_quiet control. Complete the types here.
5033         (covariant_return_p): Use lookup_base.
5034         * tree.c (binfo_value): Remove.
5035         (maybe_dummy_object): Use lookup_base.
5036         * typeck.c (build_static_cast): Use lookup_base.
5037         (get_delta_difference): Likewise.
5038         * typeck2.c (binfo_or_else): Use lookup_base.
5039         (build_scoped_ref): Add back error_mark_check.
5040         (build_m_component_ref): Use lookup_base.
5041
5042 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
5043
5044         * Make-lang.in (c++.generated-manpages): New dummy target.
5045
5046 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5047
5048         * Make-lang.in (cp-lang.o): Depends on c-common.h.
5049         * cp-lang.c (c-common.h): Include.
5050         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
5051         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
5052         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
5053
5054 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5055
5056         * decl2.c (c_language): Move to c-common.c.
5057         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
5058         functions.
5059         (cxx_init): Update.
5060
5061 2001-11-26  Jason Merrill  <jason@redhat.com>
5062
5063         * call.c (joust): Remove COND_EXPR hack.
5064
5065 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
5066
5067         * search.c (lookup_base_r): Declare bk in variable declaration
5068         space.
5069
5070 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
5071
5072         PR g++/3145
5073         * class.c (build_vbase_pointer): Remove.
5074         (build_vbase_path): Remove.
5075         (build_base_path): New function.
5076         * cp-tree.h (base_access, base_kind): New enumerations.
5077         (build_base_path): Declare.
5078         (convert_pointer_to_real): Remove.
5079         (convert_pointer_to): Remove.
5080         (lookup_base): Declare.
5081         (convert_pointer_to_vbase): Remove.
5082         * call.c (build_scoped_method_call): Use lookup_base &
5083         build_base_path instead of convert_pointer_to_real,
5084         get_base_distance & get_binfo.
5085         (build_over_call): Likewise.
5086         * cvt.c (cp_convert_to_pointer): Likewise.
5087         (convert_to_pointer_force): Likewise.
5088         (build_up_reference): Likewise.
5089         (convert_pointer_to_real): Remove.
5090         (convert_pointer_to): Remove.
5091         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
5092         instead of convert_pointer_to_vbase & build_vbase_path.
5093         (emit_base_init): Use build_base_path instead of
5094         convert_pointer_to_real.
5095         (expand_virtual_init): Lose unrequired conversions.
5096         (resolve_offset_ref): Use lookup_base and build_base_path
5097         instead of convert_pointer_to.
5098         * rtti.c (build_dynamic_cast_1): Use lookup_base &
5099         build_base_path instead of get_base_distance & build_vbase_path.
5100         * search.c (get_vbase_1): Remove.
5101         (get_vbase): Remove.
5102         (convert_pointer_to_vbase): Remove.
5103         (lookup_base_r): New function.
5104         (lookup_base): New function.
5105         * typeck.c (require_complete_type): Use lookup_base &
5106         build_base_path instead of convert_pointer_to.
5107         (build_component_ref): Likewise.
5108         (build_x_function_call): Likewise.
5109         (get_member_function_from_ptrfunc): Likewise.
5110         (build_component_addr): Likewise.
5111         * typeck2.c (build_scoped_ref): Likewise.
5112
5113 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5114
5115         * cp-tree.h (CP_TYPE_QUALS): Removed.
5116         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
5117         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
5118         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
5119         * dump.c (cp_dump_tree): Use void* dump_info argument to match
5120         lang-hooks prototype.
5121         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
5122         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
5123         CP_TYPE_QUALS changed to cp_type_quals.
5124         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
5125         (CXX_C_OBJS): Remove c-dump.o.
5126
5127 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
5128
5129         PR c++/3637
5130         * pt.c (lookup_template_class): Ensure that all specializations
5131         are registered on the list corresponding to the most general
5132         template.
5133
5134 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
5135
5136         * call.c (non_reference): Add documentation.
5137         (convert_class_to_reference): Do not strip reference types
5138         from conversion operators.
5139         (maybe_handle_ref_bind): Simplify.
5140         (compare_ics): Correct handling of references.
5141
5142 2001-11-19  John Wilkinson <johnw@research.att.com>
5143
5144         * dump.c (dump_op): New function.
5145         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
5146         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
5147         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
5148
5149 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
5150
5151         PR4629
5152         * semantics.c (finish_sizeof): Make sure that expression created
5153         while processing a template do not have a type.
5154         (finish_alignof): Likewise.
5155         * typeck.c (c_sizeof): Likewise.
5156         (expr_sizeof): Likewise.
5157
5158 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5159
5160         * lex.c (cxx_finish): Call c_common_finish.
5161         (finish_parse): Remove.
5162
5163 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5164
5165         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
5166         when displaying error message about missing array bounds.
5167
5168 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5169
5170         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
5171         CONST_CAST_EXPR.
5172         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
5173
5174 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
5175
5176         * cp-tree.h (print_class_statistics): Restore.
5177
5178 2001-11-15  Jason Merrill  <jason@redhat.com>
5179
5180         * method.c (use_thunk): Don't emit debugging information for thunks.
5181
5182         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
5183         * decl.c (make_typename_type): Handle getting a class template.
5184         * search.c (lookup_field_r): A class template is good enough for
5185         want_type.
5186
5187         * call.c (convert_like_real): Only use cp_convert for the bad part.
5188         (standard_conversion): Also allow bad int->enum.
5189         * typeck.c (ptr_reasonably_similar): Also allow functions to
5190         interconvert.  Pointers to same-size integers are reasonably
5191         similar.
5192
5193         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
5194         give it void type.
5195
5196 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
5197
5198         PR g++/3154
5199         * init.c (sort_base_init): Remove unreachable code.
5200         (expand_member_init): Adjust comment to reflect reality. Simplify
5201         and remove unreachable code.
5202
5203 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
5204
5205         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
5206         (cxx_init): Update prototype.
5207         * decl.c (init_decl_processing): Rename.  Move null node init
5208         to its creation time.
5209         * lex.c (cxx_init_options): Update.
5210         (cxx_init): Combine with old init_parse; also call
5211         cxx_init_decl_processing.
5212
5213 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
5214
5215         * decl.c (check_initializer): Try to complete the type of an
5216         array element before checking whether it's complete.  Don't
5217         complain about arrays with complete element types but an
5218         unknown size.
5219         (cp_finish_decl): Build the hierarchical constructor before
5220         calling maybe_deduce_size_from_array_init.
5221
5222 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
5223
5224         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
5225
5226 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
5227
5228         PR g++/4206
5229         * parse.y (already_scoped_stmt): Remove.
5230         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
5231
5232 2001-11-12  H.J. Lu <hjl@gnu.org>
5233
5234         * cvt.c (ocp_convert): Don't warn the address of a weak
5235         function is always `true'.
5236
5237 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5238
5239         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
5240         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
5241         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
5242         * cp-tree.h (print_class_statistics): Remove.
5243         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
5244         cxx_print_identifier, cxx_set_yydebug): New.
5245         * lex.c (set_yydebug): Rename c_set_yydebug.
5246         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
5247         lang_print_xnode): Rename.
5248         * tree.c (print_lang_statistics): Rename.
5249
5250 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5251
5252         * class.c (dump_array): Fix format specifier warning.
5253
5254 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5255
5256         * cp-lang.c (LANG_HOOKS_NAME): Override.
5257         (struct lang_hooks): Constify.
5258         * lex.c (cxx_init_options): Update.
5259         (lang_identify): Remove.
5260         * parse.y (language_string): Remove.
5261
5262 2001-11-08  Andreas Franck  <afranck@gmx.de>
5263
5264         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
5265         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
5266         suggested by autoconf.
5267         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
5268         (c++.install-common): Use the transformed target alias names.
5269
5270 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
5271
5272         * Make-lang.in: Update.
5273         * cp-lang.c: Include langhooks-def.h.
5274
5275 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5276
5277         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
5278
5279 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5280
5281         * lex.c (copy_lang_type): Add static prototype.
5282
5283 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5284
5285         * pt.c (unify): Handle SCOPE_REF.
5286
5287 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
5288
5289         * tree.c (cp_copy_res_decl_for_inlining): Adjust
5290         DECL_ABSTRACT_ORIGIN for the return variable.
5291
5292 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
5293
5294         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
5295
5296 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
5297
5298         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
5299         semantics.c, spew.c: Fix spelling errors.
5300
5301 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5302
5303         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
5304
5305 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
5306
5307         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
5308         pop_everything.
5309
5310 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5311
5312         * cp-lang.c (cxx_get_alias_set): New function.
5313         Point LANG_HOOKS_GET_ALIAS_SET to it.
5314
5315 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5316
5317         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
5318         * cp-tree.h (make_unbound_class_template): Prototype new function.
5319         * decl.c (make_unbound_class_template): New function.
5320         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
5321         * error.c (dump_type): Likewise.
5322         * mangle.c (write_type): Likewise.
5323         * parse.y (template_parm): Likewise.
5324         (template_argument): Use make_unbound_class_template.
5325         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
5326         (tsubst): Likewise.
5327         (tsubst_copy): Likewise.
5328         (unify): Likewise.
5329         * tree.c (walk_tree): Likewise.
5330         * typeck.c (comptypes): Likewise.
5331
5332 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5333
5334         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
5335         extra calls into fewer ones.
5336
5337 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
5338
5339         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
5340         Warn when merging inline with attribute noinline.
5341         (start_decl, start_function): Warn if inline and attribute
5342         noinline appear in the same declaration.
5343
5344 2001-10-16  H.J. Lu <hjl@gnu.org>
5345
5346         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
5347         for tree checking disabled.
5348
5349 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
5350
5351         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
5352         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
5353
5354 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
5355
5356         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
5357         (unify): Only handle MINUS_EXPR specially if the above flag is set
5358         and the subtracted constant is 1.  Clear the flag on recursive calls.
5359         Set it when unifying the maximum value in an INTEGER_TYPE's range.
5360
5361 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
5362
5363         * decl.c (bad_specifiers): Don't allow exception specifications
5364         on any typedefs.
5365
5366 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
5367
5368         * cp/lex.c (init_cp_pragma): Similarly.
5369
5370 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5371
5372         * pt.c (lookup_template_class): Build complete template arguments
5373         for BOUND_TEMPLATE_TEMPLATE_PARM.
5374
5375 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5376
5377         * cp-tree.h (TYPE_BINFO): Update comment.
5378         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
5379         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
5380         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
5381         (copy_type): Prototype new function.
5382         * lex.c (copy_lang_decl): Gather tree node statistics.
5383         (copy_lang_type): New function.
5384         (copy_type): Likewise.
5385         (cp_make_lang_type): Create lang_type for
5386         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
5387         and BOUND_TEMPLATE_TEMPLATE_PARM.
5388         * pt.c (tsubst): Use copy_type instead of copy_node.
5389         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
5390
5391 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5392
5393         * pt.c (determine_specialization): Ignore functions without
5394         DECL_TEMPLATE_INFO.
5395
5396 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
5397
5398         PR g++/4476
5399         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
5400
5401 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
5402
5403         * typeck2.c (store_init_value): Don't re-digest a bracketed
5404         initializer.
5405
5406         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
5407         ANON_AGGR_TYPE_P.
5408
5409 2001-10-11  Richard Henderson  <rth@redhat.com>
5410
5411         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
5412         of an asm statement.
5413         (build_vtbl_ref_1): Split out from build_vtbl_ref.
5414         (build_vfn_ref): Use it to handle vtable descriptors before
5415         calling build_vtable_entry_ref.
5416         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
5417
5418 2001-10-10  Richard Henderson  <rth@redhat.com>
5419
5420         * parse.y (asm_operand): Allow named operands.
5421         * semantics.c (finish_asm_stmt): Tweek for changed location
5422         of the operand constraint.
5423
5424 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
5425
5426         * call.c (standard_conversion): Add bad conversion between
5427         integers and pointers.
5428         (convert_like_real): Don't use convert_for_initialization for bad
5429         conversions; complain here and use cp_convert.
5430         (build_over_call): Don't handle bad conversions specially.
5431         (perform_implicit_conversion): Allow bad conversions.
5432         (can_convert_arg_bad): New fn.
5433         * cp-tree.h: Declare it.
5434         * typeck.c (convert_for_assignment): Use it.
5435         (ptr_reasonably_similar): Any target type is similar to void.
5436
5437 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
5438
5439         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
5440         (cp/cp-lang.o): New rule.
5441         * cp-tree.h: Declare hooks.
5442         * tree.c: Make hooks non-static.
5443         (init_tree): Don't initialize hooks here.
5444         * lex.c: Likewise.  Move definition of lang_hooks to...
5445         * cp-lang.c: ... new file.
5446
5447 2001-10-08  Richard Henderson  <rth@redhat.com>
5448
5449         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
5450         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
5451
5452 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5453
5454         * class.c (build_vtable_entry_ref): Const-ify.
5455         * decl.c (predefined_identifier,
5456         initialize_predefined_identifiers): Likewise.
5457         * init.c (build_new_1): Likewise.
5458         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
5459         Likewise.
5460
5461 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
5462
5463         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
5464         (INSNS_PER_STMT): Likewise.
5465         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
5466         (copy_body, initialize_inlined_parameters): Likewise.
5467         (declare_return_variable, inlinable_function_p): Likewise.
5468         (expand_call_inline, expand_calls_inline): Likewise.
5469         (optimize_inline_calls, clone_body): Likewise.
5470         * tree.c (walk_tree): Moved to ../tree-inline.c.
5471         (walk_tree_without_duplicates): Likewise.
5472         (copy_tree_r, remap_save_expr): Likewise.
5473
5474 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
5475
5476         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
5477         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
5478         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
5479         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
5480         (flag_inline_trees): Moved declaration to ../tree-inline.h.
5481         (walk_tree): Moved declaration to ../tree-inline.h.
5482         (walk_tree_without_duplicates, copy_tree_r): Likewise.
5483         (remap_save_expr): Likewise.
5484         * decl.c: Include tree-inline.h.
5485         (lang_mark_tree): Don't mark inlined_fns.
5486         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
5487         * optimize.c: Include tree-inline.h.
5488         (optimize_inline_calls): Move declaration to ../tree.h, as
5489         non-static.
5490         (remap_decl): Use language-independent constructs and hooks.
5491         (remap_block, copy_body_r, declare_return_variable): Likewise.
5492         (inlinable_function_p): Likewise.  Don't test for
5493         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
5494         no longer language-specific.
5495         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
5496         call of dump_function to...
5497         (optimize_function): Here...
5498         (clone_body): New function, extracted from...
5499         (maybe_clone_body): ... here.  Build decl_map locally and pass
5500         it on to clone_body.
5501         * pt.c, semantics.c: Include tree-inline.h.
5502         * tree.c: Likewise.
5503         (cp_walk_subtrees): New language-specific hook for tree inlining.
5504         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
5505         cp_is_overload_p, cp_auto_var_in_fn_p,
5506         cp_copy_res_decl_for_inlining): Likewise.
5507         (walk_tree): Move language-specific constructs into...
5508         (cp_walk_subtrees): this new function.
5509         (copy_tree_r): Use language-independent constructs and hooks.
5510         (init_tree): Initialize tree inlining hooks.
5511         (remap_save_expr): Adjust prototype so that the declaration
5512         does not require the definition of splay_tree.
5513
5514 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5515
5516         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
5517         to build the declaration instead of the declaration itself.
5518
5519 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
5520
5521         * decl2.c (cxx_decode_option): Add 'else'.
5522
5523         * spew.c (end_input): No longer static.
5524         * cp-tree.h: Declare it.
5525         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
5526
5527 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
5528
5529         * call.c (build_over_call), typeck.c (build_function_call_real):
5530         Pass type attributes to check_function_format rather than name or
5531         assembler name.  Don't require there to be a name or assembler
5532         name to check formats.
5533
5534 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
5535
5536         * decl.c (init_decl_processing): Don't call
5537         init_function_format_info.  Initialize lang_attribute_table
5538         earlier.
5539         (builtin_function): Call decl_attributes.
5540         (insert_default_attributes): New.
5541
5542 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
5543
5544         * decl.c (grokdeclarator): Copy array typedef handling from C
5545         frontend.
5546
5547         * decl.c (grokdeclarator): Copy too-large array handling from C
5548         frontend.
5549
5550 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
5551
5552         * config-lang.in (target_libs): Added target-gperf, so that we
5553         don't try to build it if C++ is disabled.
5554
5555 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
5556
5557         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
5558         (cp/errfn.o): Delete rule.
5559         (cp/error.o): Depend on flags.h.
5560         * errfn.c: Delete file.
5561         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
5562         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
5563         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
5564         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
5565         internal_error respectively.  Make cp_deprecated into a macro.
5566         Don't define cp_printer typedef or declare cp_printers.
5567         * error.c: Include flags.h.
5568         Delete: struct tree_formatting_info, print_function_argument_list,
5569         print_declaration, print_expression, print_function_declaration,
5570         print_function_parameter, print_type_id, print_cv_qualifier_seq,
5571         print_type_specifier_seq, print_simple_type_specifier,
5572         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
5573         print_parameter_declaration_clause, print_exception_specification,
5574         print_nested_name_specifier, and definition of cp_printers.
5575         (locate_error): New function.
5576         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
5577         rewritten in terms of locate_error and diagnostic.c.
5578         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
5579         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
5580         (init_error): Adjust to match.
5581
5582 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5583
5584         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
5585
5586 2001-09-21  Richard Henderson  <rth@redhat.com>
5587
5588         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
5589         (build_vtbl_initializer): Likewise.
5590         (build_vfn_ref): New.
5591         * cp-tree.h: Declare it.
5592         * call.c (build_over_call): Use it.
5593         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
5594         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
5595
5596 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
5597
5598         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
5599
5600 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
5601
5602         Table-driven attributes.
5603         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
5604         * decl2.c (cplus_decl_attributes): Only take one attributes
5605         parameter.
5606         * cp-tree.c (cplus_decl_attributes): Update prototype.
5607         * class.c (finish_struct), decl.c (start_decl, start_function),
5608         decl2.c (grokfield), friend.c (do_friend), parse.y
5609         (parse_bitfield): Update calls to cplus_decl_attributes.
5610         * decl.c (grokdeclarator): Take a pointer to a single ordinary
5611         attribute list.
5612         * decl.h (grokdeclarator): Update prototype.
5613         * decl2.c (grokfield): Take a single ordinary attribute list.
5614         * friend.c (do_friend): Likewise.
5615         * decl.c (shadow_tag, groktypename, start_decl,
5616         start_handler_parms, grokdeclarator, grokparms, start_function,
5617         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
5618         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
5619         (process_template_parm, do_decl_instantiation): Pass single
5620         ordinary attribute lists around.
5621         * decl.c (grokdeclarator): Correct handling of nested attributes.
5622         Revert the patch
5623         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
5624                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
5625                 not the left.
5626         .
5627         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
5628         (cp_attribute_table): Declare.
5629         * decl.c (valid_lang_attribute): Don't define.
5630         (lang_attribute_table): Define.
5631         (init_decl_processing): Initialize lang_attribute_table instead of
5632         valid_lang_attribute.
5633         * tree.c (cp_valid_lang_attribute): Remove.
5634         (handle_java_interface_attribute, handle_com_interface_attribute,
5635         handle_init_priority_attribute): New functions.
5636         (cp_attribute_table): New array.
5637         * decl2.c (import_export_class): Don't use
5638         targetm.valid_type_attribute.
5639
5640 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5641
5642         * Make-lang.in (cp/error.o): Depend on real.h
5643         * error.c: #include "real.h"
5644
5645 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5646
5647         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
5648         xmalloc/strcpy/strcat.
5649
5650 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5651
5652         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
5653         Const-ification.
5654         * pt.c (tsubst_decl): Likewise.
5655
5656 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5657
5658         * decl2.c (lang_f_options): Const-ification.
5659         * lex.c (cplus_tree_code_name): Likewise.
5660         * spew.c (yyerror): Likewise.
5661
5662 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
5663
5664         PR c++/3986
5665         * class.c (force_canonical_binfo_r): Check & move an indirect
5666         primary base first.
5667         (force_canonical_binfo): Check that it's not already
5668         canonical.
5669         (mark_primary_virtual_base): Remove BINFO parameter.
5670         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
5671
5672 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
5673
5674         Remove TYPE_NONCOPIED_PARTS.
5675         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
5676         CLASSTYPE_PURE_VIRTUALS.
5677         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
5678         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
5679         (layout_class_type): Don't call fixup_inline_methods here ...
5680         (finish_struct_1): ... call it here.
5681
5682 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
5683
5684         * decl.c (duplicate_decls): Remove code deadling with
5685         DECL_SAVED_INSNS.
5686         * decl2.c (finish_file): Likewise.
5687         * pt.c (instantiate_decl): Likewise.
5688         * semantics.c (expand_body): Don't defer local functions if
5689         they wouldn't be deferred for some other reason.  Don't
5690         generate RTL for functions that will not be emitted.
5691         (genrtl_start_function): Remove code deadling with
5692         DECL_SAVED_INSNS.
5693         (genrtl_finish_function): Likewise.
5694
5695 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
5696
5697         PR c++/4203
5698         * call.c (build_over_call): Do not optimize any empty base
5699         construction.
5700
5701 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5702
5703         * error.c (dump_template_decl): Output template parameters
5704         together with their specifiers.
5705         Output `class' prefix for template template parameter.
5706         (dump_decl): Fix formatting.
5707
5708 2001-08-30  Kurt Garloff  <garloff@suse.de>
5709
5710         * optimize.c (inlinable_function_p): Allow only smaller single
5711         functions. Halve inline limit after reaching recursive limit.
5712
5713 2001-08-30  Joern Rennecke <amylaar@redhat.com>
5714             Jason Merrill  <jason_merrill@redhat.com>
5715
5716         * class.c (build_vtable_entry_ref): Subtract in char*, not
5717         ptrdiff_t.
5718
5719 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
5720
5721         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
5722         (build_cplus_array_type): Use cp_build_qualified_type, not
5723         TYPE_MAIN_VARIANT, to get an unqualified version.
5724
5725         * decl2.c (grok_alignof): Lose.
5726         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
5727         * typeck.c (c_alignof): Lose.
5728         * semantics.c (finish_sizeof, finish_alignof): New.
5729         * parse.y: Use them.
5730         * cp-tree.h: Declare them.
5731
5732 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
5733
5734         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
5735         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
5736         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
5737
5738 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
5739
5740         * typeck2.c (add_exception_specifier): Only require complete type if
5741         not in processing template declaration.
5742
5743 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5744
5745         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
5746         GNU_xref_start_scope and GNU_xref_end_scope.
5747
5748         * tree.c (TYPE_HASH): Moved to ../tree.h.
5749
5750 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
5751
5752         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
5753         on COMPOUND_EXPRs.
5754
5755 2001-08-14  Richard Henderson  <rth@redhat.com>
5756
5757         * class.c, cp-tree.h (build_vfn_ref): Remove.
5758         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
5759
5760 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
5761
5762         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
5763         empty class assignment as having side-effects to avoid
5764         spurious warnings.
5765
5766 2001-08-13  Zack Weinberg  <zackw@panix.com>
5767
5768         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
5769         * except.c: Include libfuncs.h.
5770
5771 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5772
5773         * decl.c (grokdeclarator): Clarify diagnostic message.
5774
5775 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5776
5777         * decl2.c (do_nonmember_using_decl): Replace using directive
5778         with using declaration in the error message.
5779
5780 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5781
5782         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
5783         criterion to avoid rebuilding expression tree instead of
5784         processing_template_decl.
5785
5786 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
5787
5788         Support named return value optimization for inlines, too.
5789         * decl.c (finish_function): Nullify returns here.
5790         * semantics.c (genrtl_start_function): Not here.
5791         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
5792         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
5793         Also nullify the CLEANUP_STMT for the nrv.
5794         * cp-tree.h: Declare it.
5795         * optimize.c (declare_return_variable): Replace the nrv with the
5796         return variable.
5797         * typeck.c (check_return_expr): Be more flexible on alignment check.
5798         Ignore cv-quals when checking for a matching type.
5799
5800 2001-08-09  Richard Henderson  <rth@redhat.com>
5801
5802         * decl2.c (finish_objects): Use target hooks instead of
5803         assemble_constructor and assemble_destructor.
5804
5805 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5806
5807         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
5808
5809 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
5810
5811         PR c++/3820
5812         Stop using TYPE_NONCOPIED_PARTS.
5813         * call.c (build_over_call): Be careful when copy constructing
5814         or assigning to an empty class.
5815         * class.c (check_bases_and_members): It has a
5816         COMPLEX_ASSIGN_REF if it has a vptr.
5817         (layout_class_type): Don't add empty class padding to
5818         TYPE_NONCOPIED_PARTS.
5819         (finish_struct_1): Don't add the VFIELD either.
5820         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
5821         initialization.
5822
5823 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
5824
5825         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
5826
5827 2001-08-06  Richard Henderson  <rth@redhat.com>
5828
5829         * decl2.c (finish_objects): Pass a symbol_ref and priority to
5830         assemble_{constructor,destructor}.  Remove priority handling.
5831
5832 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5833
5834         Don't allow template-id in using-declaration.
5835         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
5836         (do_class_using_decl): Likewise.
5837
5838 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
5839
5840         * cp/spew.c (read_token): No need to pop buffers.
5841
5842 2001-08-02  Stan Shebs  <shebs@apple.com>
5843
5844         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
5845         (fnaddr_from_vtable_entry): Remove decl.
5846         * method.c (use_thunk): Update comment.
5847
5848 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
5849
5850         * repo.c (get_base_filename): Change return value to const char
5851         pointer.
5852
5853 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
5854
5855         Kill -fhonor-std.
5856         * NEWS: Document.
5857         * cp-tree.h (flag_honor_std): Remove.
5858         (CPTI_FAKE_STD): Remove.
5859         (std_node): Remove comment about it being NULL.
5860         (fake_std_node): Remove.
5861         * decl.c (in_fake_std): Remove.
5862         (walk_namespaces_r): Remove fake_std_node check.
5863         (push_namespace): Remove in_fake_std code.
5864         (pop_namespace): Likewise.
5865         (lookup_name_real): Remove fake_std_node check.
5866         (init_decl_processing): Always create std_node. Always add
5867         std:: things there.
5868         (builtin_function): Always put non '_' fns in std.
5869         * decl2.c (flag_honor_std): Remove.
5870         (lang_f_options): Remove honor-std.
5871         (unsupported_options): Add honor-std.
5872         (set_decl_namespace): Remove fake_std_node check.
5873         (validate_nonmember_using_decl): Likewise.
5874         (do_using_directive): Likewise.
5875         (handle_class_head): Likewise.
5876         * dump.c (cp_dump_tree): Likewise.
5877         * except.c (init_exception_processing): Adjust.
5878         * init.c (build_member_call): Remove fake_std_node check.
5879         (build_offset_ref): Likewise.
5880         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
5881         * rtti.c (init_rtti_processing): Adjust.
5882
5883 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
5884
5885         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
5886         operand while calling cp_tree_equal.
5887
5888 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
5889
5890         The 3.0 ABI no longer has vbase pointer fields.
5891         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
5892         FORMAT_VBASE_NAME): Remove.
5893         * method.c (do_build_copy_constructor): Adjust.
5894         (do_build_assign_ref): Adjust.
5895         * search.c (lookup_field_r): Adjust.
5896         * typeck.c (build_component_ref): Adjust.
5897
5898         The 3.0 ABI always has a vtable pointer at the start of every
5899         polymorphic class.
5900         * rtti.c (build_headof_sub): Remove.
5901         (build_headof): Adjust.
5902         (get_tinfo_decl_dynamic): No need to check flag_rtti
5903         here. Adjust.
5904         (create_real_tinfo_var): Explain why we need a hidden name.
5905
5906 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
5907
5908         PR c++/3631
5909         * class.c (update_vtable_entry_for_fn): The fixed adjustment
5910         of a virtual thunk should be from declaring base.
5911
5912 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
5913
5914         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
5915         the shared virtual base, so preserving inheritance graph order.
5916
5917 2001-07-30  Andreas Jaeger  <aj@suse.de>
5918
5919         * decl2.c: Remove unused var global_temp_name_counter.
5920
5921 2001-07-28  Richard Henderson  <rth@redhat.com>
5922
5923         * method.c (pending_inlines): Remove.
5924
5925 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
5926
5927         * class.c (mark_primary_virtual_base): Don't adjust base
5928         offsets here.
5929         (dfs_unshared_virtual_bases): Adjust them here.
5930         (mark_primary_bases): Explain why we adjust at the end.
5931
5932 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
5933
5934         * class.c (finish_struct_1): When copying the primary base's
5935         VFIELD, make sure we find it is at offset zero.
5936
5937 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5938
5939         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
5940         tsubst_expr for default template arguments.
5941
5942 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
5943
5944         PR c++/3621
5945         * spew.c (yylex): Only copy the token's lineno, if it is
5946         nonzero.
5947
5948 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
5949
5950         PR c++/3624
5951         * call.c (resolve_args): Simplify, call
5952         convert_from_reference.
5953         (build_new_op): Resolve and convert from reference ARG1
5954         earlier. Adjust ARG2 & ARG3 resolve and conversion.
5955
5956 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
5957
5958         * decl.c (last_function_parm_tags): Remove.
5959         (current_function_parm_tags): Remove.
5960         (init_decl_processing): Adjust.
5961         (start_function): Adjust.
5962         (store_parm_decls): Adjust.
5963
5964         PR c++/3152
5965         * decl.c (grokdeclarator): Detect when a function typedef is
5966         declaring a function, and create last_function_parms correctly.
5967
5968 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
5969
5970         * call.c (joust): Only prefer a non-builtin candidate to a builtin
5971         one if they have the same signature.
5972
5973         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
5974         it rather than toplevel_bindings_p.  Give it a mangled name if static.
5975         (convert_to_reference): Adjust.
5976         * decl2.c (get_temp_name): Lose.
5977         * mangle.c (mangle_ref_init_variable): New fn.
5978         (mangle_guard_variable): Strip the ref-init header.
5979         * cp-tree.h: Adjust.
5980         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
5981         initializer.
5982         (grok_reference_init): Always use DECL_INITIAL.
5983
5984 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5985
5986         PR c++/3416
5987         * call.c (build_conditional_expr): Recheck args after
5988         conversions.
5989         * cp-tree.h (build_conditional_expr): Move to correct file.
5990         * typeck.c (decay_conversion): Diagnose any unknown types
5991         reaching here.
5992         (build_binary_op): Don't do initial decay or default
5993         conversions on overloaded functions.
5994         (build_static_cast): Don't do a decay conversion here.
5995
5996 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5997
5998         PR c++/3543
5999         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
6000         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
6001
6002 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6003
6004         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
6005         (create_vtbl_ptr): ... here.
6006
6007 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6008
6009         * class.c (build_vbase_offset_vbtl_entries): Look for
6010         non-primary base of which we are a sub vtable.
6011
6012 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
6013
6014         * semantics.c (finish_this_expr):  Remove unused code.
6015
6016 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
6017
6018         Simplify rtti, now we've only one ABI.
6019         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
6020         CPTI_TINFO_VAR_ID.
6021         (tinfo_decl_id, tinfo_var_id): Remove.
6022         (get_typeid_1): Remove.
6023         * rtti.c
6024         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
6025         (typeid_ok_p): New function.
6026         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
6027         (get_tinfo_decl): Remove old abi documentation.
6028         (tinfo_from_decl): Remove.
6029         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
6030         (get_typeid_1): Remove.
6031         (get_base_offset): Remove.
6032         (synthesize_tinfo_var): Absorb get_base_offset.
6033         (create_real_tinfo_var): Don't use tinfo_decl_id.
6034
6035 2001-07-23  Graham Stott  <grahams@redhat.com>
6036
6037         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
6038         variable has_two_argument_delete_p.
6039
6040 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
6041
6042         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
6043         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
6044         (CPTI_INDEX_IDENTIFIER): Remove.
6045         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
6046         (delta2_identifier): Remove.
6047         (index_identifier): Remove.
6048         (pfn_or_delta2_identifier): Remove.
6049         (flag_vtable_thunks): Remove.
6050         (VTABLE_DELTA2_NAME): Remove.
6051         (VTABLE_INDEX_NAME): Remove.
6052         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
6053         (vfunc_ptr_type_node): Adjust.
6054         (VTABLE_NAME_PREFIX): Adjust.
6055         (build_vfn_ref): Lose first parameter.
6056         (fixup_all_virtual_upcast_offsets): Remove.
6057         * decl.c (initialize_predefined_identifiers): Remove
6058         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
6059         (init_decl_processing): Remove no-vtable-thunk code.
6060         * decl2.c (flag_vtable_thunks): Remove.
6061         (mark_vtable_entries): Remove no-vtable-thunk code.
6062         * error.c (dump_decl): Remove no-vtable-thunk code.
6063         (dump_expr): Adjust ptr to member function code.
6064         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
6065         code.
6066         * rtti.c (build_headof): Remove no-vtable-thunk code.
6067         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
6068         * search.c (get_base_distance): Remove expand_upcast_fixups case.
6069         (virtual_context) Remove.
6070         (expand_upcast_fixups): Remove.
6071         (fixup_virtual_upcast_offsets): Remove.
6072         (fixup_all_virtual_upcast_offsets): Remove.
6073         * typeck.c (get_member_function_from_ptrfunc): Remove
6074         no-vtable-thunk code.
6075         * call.c (build_over_call): Adjust call to build_vfn_ref.
6076         * class.c (build_vfn_ref): Lose first parameter. Remove
6077         no-vtable-thunk code.
6078         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
6079         (build_vtable_entry): Remove no-vtable-thunk code.
6080
6081 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
6082
6083         Remove old-abi remnants. Remove comments about old abi
6084         behavior. Remove references to 'new-abi' in comments.
6085         * cp-tree.h: Adjust comments.
6086         (vbase_offsets_in_vtable_p): Delete.
6087         (vcall_offsets_in_vtable_p): Delete.
6088         (vptrs_present_everywhere_p): Delete.
6089         (all_overridden_vfuns_in_vtables_p): Delete.
6090         (merge_primary_and_secondary_vtables_p): Delete.
6091         (TYPE_CONTAINS_VPTR_P): Adjust.
6092         (VTT_NAME_PREFIX): Remove.
6093         (CTOR_VTBL_NAME_PREFIX): Remove.
6094         (init_vbase_pointers): Remove.
6095         * class.c: Adjust coments.
6096         (build_vbase_pointer_fields): Delete.
6097         (build_vbase_pointer): Remove old-abi code.
6098         (build_secondary_vtable): Likewise.
6099         (modify_all_vtables): Likewise.
6100         (create_vtable_ptr): Likewise.
6101         (layout_class_type): Likewise.
6102         (finish_struct_1): Likewise.
6103         (finish_vtbls): Likewise.
6104         (dfs_finish_vtbls): Delete.
6105         (build_vbase_offset_vtbl_entries): Remove old-abi code.
6106         * cvt.c: Adjust comments.
6107         * decl.c: Adjust comments.
6108         * decl2.c: Adjust comments.
6109         * init.c: Adjust comments.
6110         (construct_virtual_bases): Remove old-abi code.
6111         * lang-specs.h: Remove -fno-new-abi.
6112         * mangle.c: Adjust comments.
6113         * rtti.c: Adjust comments.
6114         (get_base_offset): Remove old-abi-code.
6115         * search.c: Adjust comments.
6116         (dfs_init_vbase_pointers): Remove.
6117         (dfs_vtable_path_unmark): Remove.
6118         (init_vbase_pointers): Remove.
6119         * semantics.c: Adjust comments.
6120         (emit_associated_thunks): Remove old-abi code.
6121         * typeck.c: Adjust comments.
6122
6123 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
6124
6125         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
6126         params.h.
6127
6128 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
6129
6130         * class.c (finish_struct_anon): Forbid nested classes.
6131
6132 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
6133
6134         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
6135         * optimize.c: Include debug.h.
6136         (maybe_clone_body): Use debug hook.
6137         * semantics.c: Include debug.h.
6138         (expand_body): Use debug hook.
6139
6140 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
6141
6142         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
6143
6144 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
6145
6146         * class.c (type_requires_array_cookie): New function.
6147         (check_methods): Don't try to figure out whether the type needs a
6148         cookie here.
6149         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
6150         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
6151         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
6152         * pt.c (instantiate_class_template): Don't set
6153         TYPE_VEC_DELETE_TAKES_SIZE.
6154         * NEWS: Document ABI changes from GCC 3.0.
6155
6156 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
6157             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
6158
6159         * NEWS (Changes in GCC 3.0): Fix typo.
6160
6161 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6162
6163         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
6164         which attributes are to be attached, and a flags argument.  Update
6165         call to decl_attributes.
6166         (grokfield): Update call to decl_attributes.
6167         * class.c (finish_struct): Update call to cplus_decl_attributes.
6168         * cp-tree.h (cplus_decl_attributes): Update prototype.
6169         * decl.c (start_decl, grokdeclarator, start_function): Update
6170         calls to decl_attributes and cplus_decl_attributes.
6171         * friend.c (do_friend): Update call to cplus_decl_attributes.
6172         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
6173
6174 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
6175
6176         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
6177         for `register' variables with an asm-specification.
6178
6179 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
6180
6181         * semantics.c (finish_asm_stmt): Mark the output operands
6182         to an asm addressable, if necessary.
6183
6184 2001-07-11  Ben Elliston  <bje@redhat.com>
6185
6186         * Revert this change -- there is a subtle bug.
6187
6188         PR c++/80
6189         * decl.c (finish_enum): New "attributes" argument; pass it to
6190         cplus_decl_attributes.  Use a narrower type if the enum is packed.
6191         * cp-tree.h (finish_enum): Adjust prototype.
6192         * parse.y (enum_head): New non-terminal.
6193         (structsp): Use it. Enums now may be preceded or followed by
6194         optional attributes -- pass their chained tree to finish_enum().
6195         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
6196
6197 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
6198
6199         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
6200         variables.
6201
6202 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
6203
6204         * semantics.c (cp_expand_stmt): Fix for null
6205         current_function_return_value.
6206
6207 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
6208
6209         * call.c (build_op_delete_call): Initialize fn.
6210         (convert_like_real): Delete conditional.
6211         (joust): Initialize *w and *l.
6212         * class.c: Add prototype for binfo_ctor_vtable.
6213         (get_primary_binfo): Initialize result.
6214         * init.c (build_java_class_ref): Initialize name.
6215
6216 2001-07-09  Erik Rozendaal  <dlr@acm.org>
6217
6218         * typeck.c (unary_complex_lvalue): Do not duplicate the
6219         argument to modify, pre-, or post-increment when used as an
6220         lvalue and when the argument has side-effects.
6221
6222 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6223
6224         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
6225         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
6226         cplus_decl_attributes even if attrs is NULL.
6227         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
6228
6229 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6230
6231         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
6232         calls to decl_attributes.
6233
6234 2001-07-06  Ira Ruben   <ira@apple.com>
6235
6236         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
6237         be DECL_TEMPLATE_RESULT.
6238
6239 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6240
6241         * cp-tree.h (copy_template_template_parm): Rename to ...
6242         (bind_template_template_parm): ... here.
6243         * tree.c (copy_template_template_parm): Rename to ...
6244         (bind_template_template_parm): ... here.  Remove the case when
6245         NEWARGS is NULL_TREE.
6246         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
6247         BOUND_TEMPLATE_TEMPLATE_PARM.
6248         * pt.c (lookup_template_class): Adjust.
6249
6250 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
6251
6252         * cvt.c (convert_lvalue): New fn.
6253         * cp-tree.h: Declare it.
6254         * method.c (do_build_assign_ref): Use it.
6255         (do_build_copy_constructor): Convert parm to base types
6256         before calling base constructors.
6257
6258         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
6259         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
6260         optimize.
6261         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
6262
6263 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
6264
6265         * optimize.c (optimize_inline_calls): New function, broken out
6266         of ...
6267         (optimize_function): ... here. Call it. Don't inline if it is
6268         a thunk.
6269         (dump_function): Print name of dump flag causing this dump.
6270         * semantics.c (expand_body): Move thunk inline check to
6271         optimize_function.
6272
6273 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6274
6275         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
6276         (comptypes): Use target.comp_type_attributes.
6277
6278 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
6279
6280         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
6281
6282 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6283
6284         * error.c (lang_print_error_function): Add a `diagnostic_context *'
6285         parameter. Tweak.
6286
6287 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6288
6289         * decl2.c (import_export_class): Update.
6290
6291 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6292
6293         * error.c (init_error): Adjust settings.
6294
6295 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6296
6297         * error.c (init_error): Adjust settings.
6298
6299 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
6300
6301         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
6302         return pointers to data members by reference rather than by value.
6303
6304 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
6305
6306         Implement the Named Return Value optimization.
6307         * cp-tree.h (struct cp_language_function): Add x_return_value.
6308         (current_function_return_value): Now a macro.
6309         * decl.c: Don't define it.
6310         (define_label, finish_case_label): Don't clear it.
6311         (init_decl_processing): Don't register it with GC.
6312         * semantics.c (genrtl_finish_function): Don't check it for
6313         no_return_label.  Copy the RTL from the return value to
6314         current_function_return_value and walk, calling...
6315         (nullify_returns_r): ...this new fn.
6316         * typeck.c (check_return_expr): Set current_function_return_value.
6317
6318 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
6319
6320         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
6321         sharing a ctor vtable with.  Merge code for cases 1 and 2.
6322         (binfo_ctor_vtable): New fn.
6323         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
6324
6325 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
6326
6327         * class.c (dfs_find_final_overrider): Fix logic.
6328
6329         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
6330         virtual thunk instead of non-virtual.
6331         (get_matching_virtual): Uncomment.
6332
6333         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
6334         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
6335         PARM, not ARG.
6336
6337 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
6338
6339         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
6340         we've not emerged from the hierarchy of RTTI_BINFO on reaching
6341         a non-virtual base.
6342
6343 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
6344
6345         * NEWS: Update release number.
6346
6347 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
6348
6349         PR c++/3130, c++/3131, c++/3132
6350         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
6351         * class.c (force_canonical_binfo_r): Move
6352         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
6353         virtual bases unless they're primary and what they're primary
6354         too has been moved.
6355         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
6356         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
6357         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
6358         derived binfo.
6359         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
6360         (layout_nonempty_base_or_field): Add most derived type
6361         parameter. Adjust.
6362         (layout_empty_base): Likewise.
6363         (build_base_field): Likewise.
6364         (build_base_fields): Likewise.
6365         (propagate_binfo_offsets): Add most derived type
6366         parameter. Skip non canonical virtual bases too.
6367         (dfs_set_offset_for_unshared_vbases): Don't skip primary
6368         bases. Do skip canonical bases.
6369         (layout_virtual_bases): Adjust.
6370         (layout_class_type): Adjust.
6371         (dfs_get_primary_binfo): Build list of virtual primary base
6372         candidates.
6373         (get_primary_binfo): Check that the shared virtual primary
6374         base candidate was found first.
6375         (accumulate_vtbl_inits): Don't do anything for non-vptr
6376         containing binfos. For case 1 primary virtual bases, keep
6377         checking that we've not emerged from the hierarchy of RTTI_BINFO.
6378
6379 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
6380
6381         PR c++/3089
6382         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
6383         hierarchy looking for primary bases for a ctor
6384         vtable. Recursively call oneself, if we meet our primary via
6385         this route and haven't met it yet via inheritance graph order.
6386
6387 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
6388
6389         * lang-options.h: Emit documentation for -fno-honor-std, not
6390         -fhonor-std.
6391
6392 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
6393
6394         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
6395         Don't clobber delta.
6396         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
6397
6398 2001-06-10  Mark Mitchell <mark@codesourcery.com>
6399             Gabriel Dos Reis  <gdr@codesourcery.com>
6400
6401         * Make-lang.in (cp/call.o): Depend on diagnostic.h
6402         (cp/typeck.o): Depend on diagnostic.h
6403         (cp/typeck2.o): Depend on diagnostic.h
6404         (cp/repo.o): Depend on dignostic.h
6405         * typeck.c: #include diagnostic.h
6406         (convert_for_initialization): Remove extern declaration for
6407         warningcount and errorcount.
6408
6409         * call.c: #include diagnostic.h
6410         (convert_like_real): Remove extern declaration for warnincount and
6411         errorcount.
6412
6413         * repo.c: #include diagnostic.h
6414         * typeck2.c: #include diagnostic.h
6415
6416 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
6417
6418         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
6419         in previous change.
6420
6421 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
6422
6423         PR c++/2929
6424         * friend.c (do_friend): Use push_decl_namespace for classes at
6425         namespace scope.
6426
6427 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
6428             Jason Merrill <jason_merrill@redhat.com>
6429
6430         PR c++/3061
6431         * class.c (build_secondary_vtable): Use assert, rather than an error
6432         message.
6433         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
6434         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
6435         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
6436         Don't set BINFO_VTABLE for a primary virtual base.
6437
6438 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
6439
6440         * decl.c (duplicate_decls): Update source position information
6441         when a template function is defined.
6442
6443 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
6444
6445         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
6446
6447 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
6448
6449         PR c++/2914
6450         * decl.c (pushtag): Don't push into a complete type's scope.
6451
6452 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
6453
6454         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
6455         (struct lang_decl_flags): Lose generate_with_vtable_p.
6456         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
6457         * class.c (copy_virtuals): Adjust.
6458         * decl2.c (mark_vtable_entries): Adjust.
6459         * method.c (make_thunk, build_vtable_entry): Adjust.
6460         * class.c (update_vtable_entry_for_fn): Only look as far as the
6461         first defining class.
6462         (build_vtbl_initializer): Put nothing in the slot for a function only
6463         defined in a lost primary virtual base.
6464         (add_vcall_offset_vtbl_entries_1): Use the same code for
6465         the lost primary case and the normal case.
6466         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
6467         (get_vfield_offset, get_derived_offset): Lose.
6468         (dfs_find_final_overrider): Use look_for_overrides_here.
6469         (get_matching_virtual): New fn.
6470         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
6471         not BV_VCALL_INDEX.
6472         * search.c (look_for_overrides_here): Split out from...
6473         (look_for_overrides_r): Here.
6474
6475         * class.c (find_final_overrider): Return error_mark_node on error.
6476
6477         * decl2.c (key_method): #if 0 accidental change.
6478
6479 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6480
6481         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
6482         (build_over_call): Likewise.
6483         * decl.c (grokparms): Likewise.
6484         * pt.c (tsubst_decl): Likewise.
6485         * typeck.c (convert_arguments): Likewise.
6486
6487 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
6488
6489         * semantics.c (begin_class_definition): Robustify.
6490
6491         * pt.c (instantiate_decl): Tell the repository code about the
6492         clones, not the cloned functions.
6493         * repo.c (repo_template_used): Explicitly instantiate the cloned
6494         function, not the clones.
6495
6496 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
6497
6498         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
6499         ICS_BAD_FLAG on created conversion.
6500         (compare_ics): Break out rank.
6501
6502 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
6503
6504         * decl.c (xref_tag): Remove extraneous %s on dependent name
6505         lookup warning.
6506
6507 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
6508
6509         * class.c (layout_vtable_decl): Fix off by one error on
6510         build_index_type.
6511         (build_vtt): Likewise.
6512         (build_ctor_vtbl_group): Likewise.
6513
6514 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
6515
6516         * class.c (maybe_indent_hierarchy): New function.
6517         (dump_class_hierarchy_r): Add flags. Dump extra binfo
6518         information, if enabled. Use maybe_indent_hierarchy. Adjust
6519         output format.
6520         (dump_class_hierarchy): Adjust prototype. Adjust output format.
6521         (dump_array, dump_vtable, dump_vtt): New functions.
6522         (finish_struct_1): Adjust hierarchy dumping.
6523         (initialize_vtable): Call dump_vtable.
6524         (build_vtt): Call dump_vtt.
6525         (build_ctor_vtbl_group): Call dump_vtable.
6526         * decl2.c (flag_dump_class_layout): Remove.
6527         (cxx_decode_option): Remove dump translation unit
6528         and dump class hierarchy check. Call dump_switch_p.
6529         (finish_file): Adjust dumping.
6530         (dump.c): Only dump base classes if not TDF_SLIM.
6531         Only dump namespace members if not TDF_SLIM.
6532         * optimize.c (dump_function): New function.
6533         (optimize_function): Call dump_function.
6534         * semantics.c (expand_body): Use dump_enabled_p.
6535
6536 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
6537
6538         PR g++/2936
6539         Part missed from first commit
6540         * decl2.c (finish_anon_union): Copy context.
6541
6542 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
6543
6544         PR g++/2936
6545         * optimize.c (remap_decl): Remap anonymous aggregate members too.
6546
6547 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
6548
6549         PR g++/2823
6550         * semantics.c (expand_body): Don't optimize thunks.
6551
6552 2001-05-25  Sam TH  <sam@uchicago.edu>
6553
6554         * cp-tree.h lex.h: Fix header include guards.
6555
6556 2001-05-25  Mark Mitchell <mark@codesourcery.com>
6557
6558         * decl.c (init_decl_processing): Tweak.
6559
6560 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
6561
6562         * decl.c (duplicate_decls): Tidy.
6563         (init_decl_processing): Always set flag_no_builtin.
6564
6565 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
6566
6567         PR c++/2184
6568         * decl2.c (do_local_using_decl): Push the decls, even in a
6569         template.
6570
6571 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
6572
6573         * optimize.c (initialize_inlined_parameters): Don't set
6574         TREE_READONLY for a VAR_DECL taking the place of an inlined
6575         PARM_DECL.
6576
6577 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
6578
6579         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
6580         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
6581         attribute.
6582
6583 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
6584
6585         * parse.y: Refer to compound literals as such, not as
6586         constructor-expressions.
6587
6588 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
6589
6590         * call.c (build_op_delete_call): Ignore exception-specifications
6591         when looking for matching delete operators.
6592         * init.c (build_new_1): Compute whether or not the allocation
6593         function used is a placement allocation function or not, and
6594         communicate this information to build_op_delete_call.
6595
6596 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
6597
6598         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
6599         (build_vtbl_ref): Adjust.
6600         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
6601         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
6602         Re-add vtable-gc.
6603         (unsupported_options): Correspondingly.
6604
6605         * decl2.c (maybe_make_one_only): Check flag_weak, not
6606         supports_one_only().
6607
6608         * cp-tree.def (START_CATCH_STMT): Lose.
6609         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
6610         * tree.c (cp_statement_code_p): Don't case it.
6611         * semantics.c (cp_expand_stmt): Likewise.
6612         * cp-tree.h (START_CATCH_TYPE): Lose.
6613         (HANDLER_TYPE): New.
6614         * except.c (expand_start_catch_block): Don't start any blocks.
6615         Return the type.
6616         (expand_end_catch_block): Don't end any blocks.
6617         * parse.y (handler): Don't pass anything from finish_handler_parms
6618         to finish_handler.
6619         * pt.c (tsubst_expr): Likewise.
6620         * semantics.c (begin_handler): Call note_level_for_catch here.
6621         (finish_handler_parms): Don't return anything.
6622         (genrtl_catch_block, begin_catch_block): Lose.
6623         (genrtl_handler): Call expand_start_catch here.
6624
6625 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
6626
6627         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
6628         (get_vtable_decl, build_vtt): Not here.
6629
6630 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
6631
6632         PR c++/2781
6633         * optimize.c (update_cloned_parm): Copy addressability and other
6634         flags.
6635
6636 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6637
6638         * pt.c (determine_specialization): Ignore artificial functions.
6639
6640 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
6641
6642         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
6643         (C_RID_CODE): Remove.
6644         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
6645         (init_parse): Don't do it here.
6646
6647 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
6648
6649         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
6650         function declaration to avoid stripping the symbol's attributes.
6651
6652 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
6653
6654         * decl.c (pushdecl): Adjust error string.
6655         (xref_tag): Adjust friend class injection warning. Remove the
6656         inherited name from the class shadowed scope.
6657
6658 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
6659
6660         * except.c (cp_protect_cleanup_actions): New function.
6661         (init_exception_processing): Don't set protect_cleanup_actions
6662         here.  Do set lang_protect_cleanup_actions.
6663
6664 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
6665
6666         * spew.c (read_token): Call yyerror on all unexpected tokens.
6667
6668 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
6669
6670         * init.c (member_init_ok_or_else): Take a tree rather than
6671         string for name.
6672         (expand_member_init): Adjust.
6673
6674 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
6675
6676         * decl.c (duplicate_decls): Suppress warning about duplicate
6677         decls if the first decl is a friend.
6678
6679 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
6680
6681         * except.c (choose_personality_routine): Export.  Add
6682         explanatory comment.  Take an enum languages, not a boolean.
6683         (initialize_handler_parm): Adjust to match.
6684         * cp-tree.h: Prototype choose_personality_routine.
6685         * lex.c (handle_pragma_java_exceptions): New function.
6686         (init_cp_pragma): Register #pragma GCC java_exceptions.
6687
6688 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6689
6690         * method.c (build_mangled_C99_name): Remove unused prototype.
6691
6692 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
6693
6694         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
6695         * typeck.c (get_member_function_from_ptrfunc,
6696         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
6697         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
6698
6699         Reverted Geoff Keating's 2001-05-03's patch.
6700
6701 2001-05-11  Ira Ruben   <ira@apple.com>
6702
6703         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
6704
6705 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
6706
6707         * cp-tree.h (finish_label_expr, lookup_label): Delete.
6708         * parse.y: Update for '&&'; don't issue warning here.
6709         * semantics.c (finish_label_expr): Delete.
6710
6711 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
6712
6713         * splay-tree.h (splay_tree_max): New function.
6714         (splay_tree_min): Likewise.
6715
6716 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
6717
6718         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
6719         (pfn_vflag_identifier): Define.
6720         Update comment about layout of pointer functions.
6721         (build_ptrmemfunc1): Update prototype.
6722         (expand_ptrmemfunc_cst): Update prototype.
6723         * decl.c (initialize_predefined_identifiers): Initialize
6724         pfn_vflag_identifier.
6725         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
6726         an extra field to the type.
6727         * expr.c (cplus_expand_constant): Pass 'flag' between
6728         expand_ptrmemfunc_cst and build_ptrmemfunc1.
6729         * typeck.c (get_member_function_from_ptrfunc): When
6730         FUNCTION_BOUNDARY < 16, look at additional field to determine
6731         if a pointer-to-member is a real pointer or a vtable offset.
6732         (build_ptrmemfunc1): Add new parameter to contain extra field.
6733         (build_ptrmemfunc): Pass the extra field around.
6734         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
6735         (pfn_from_ptrmemfunc): Ignore the extra field.
6736
6737 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
6738
6739         * cp-tree.h (flag_inline_trees): Update documentation.
6740         * decl.c (init_decl_processing): Adjust handling of
6741         flag_inline_functions and flag_inline_trees to support -O3.
6742         (grokfndecl): Set DECL_INLINE on all functions if that's what
6743         the user requested.
6744         (save_function_data): Clear DECL_INLINE in
6745         current_function_cannot_inline is non-NULL.
6746         * decl2.c (flag_inline_trees): Update documentation.
6747
6748 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
6749
6750         * dump.c (cp_dump_tree, USING_STMT case): New case.
6751         * tree.c (cp_statement_code_p): Add USING_STMT.
6752         * decl2.c (do_using_directive): Add the using directive statement.
6753
6754         * tree.c (walk_tree): Reformat an if block.
6755
6756 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
6757
6758         * decl.c (compute_array_index_type): Don't try to do anything with
6759         the indices when processing a template.
6760
6761 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6762
6763         * call.c: NULL_PTR -> NULL.
6764         * class.c: Likewise.
6765         * cvt.c: Likewise.
6766         * decl.c: Likewise.
6767         * decl2.c: Likewise.
6768         * except.c: Likewise.
6769         * init.c: Likewise.
6770         * rtti.c: Likewise.
6771         * search.c: Likewise.
6772         * tree.c: Likewise.
6773         * typeck.c: Likewise.
6774         * typeck2.c: Likewise.
6775
6776 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
6777
6778         * decl2.c (do_using_directive): Revert previous patch.
6779
6780 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6781
6782         * cp-tree.def (USING_STMT): New statement node.
6783         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
6784         * decl2.c (do_using_directive): Add USING_STMT to statement
6785         tree. Don't emit errors when processing template decl.
6786         * pt.c (tsubst_expr, USING_STMT case): New case.
6787         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
6788
6789 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6790
6791         * call.c (build_new_op): Convert args from reference here.
6792         (build_conditional_expr): Don't convert here.
6793
6794 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6795
6796         * spew.c (last_token_id): New static variable.
6797         (read_token): Set it here.
6798         (yyerror): Use it here.
6799
6800 2001-04-30  Richard Henderson  <rth@redhat.com>
6801
6802         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
6803         * decl.c: Likewise.
6804
6805 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
6806
6807         * gxxint.texi: Remove.
6808         * Make-lang.in: Remove all traces of gxxint.texi.
6809
6810 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
6811
6812         * decl2.c (start_static_initialization_or_destruction): Correct
6813         logic to handle the -fno-use-cxa-atexit case.
6814
6815 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
6816
6817         * optimize.c (update_cloned_parm): New function.
6818         (maybe_clone_body): Use it.  Update the `this' parameter too.
6819
6820 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6821
6822         * decl2.c (unsupported_options): Add new-abi.
6823         * lang-options.h: Remove no longer supported options.
6824
6825 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
6826
6827         * except.c (can_convert_eh): Don't check template parms,
6828         typename types etc.
6829
6830 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
6831
6832         * optimize.c (maybe_clone_body): Copy parameter names and locations.
6833
6834 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
6835
6836         * cp-tree.h (adjust_clone_args): Prototype new function.
6837         * class.c (adjust_clone_args): New function.
6838         * decl.c (start_function): Call it for in charge ctors.
6839
6840 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
6841
6842         * method.c (use_thunk): Make sure that thunks really are emitted
6843         when requested.
6844
6845 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
6846
6847         * mangle.c (write_chars): New macro.
6848         (hwint_to_ascii): New function
6849         (write_number): Use it.
6850         (write_integer_cst): Deal with really big numbers.
6851
6852 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
6853
6854         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
6855         the clone.
6856
6857 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
6858
6859         * decl.c (grokdeclarator): Set context of namespace scope
6860         TYPE_DECLS.
6861
6862 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
6863
6864         * cp/optimize.c: Include hashtab.h.
6865         (struct inline_data): Add tree_pruner.
6866         (expand_call_inline, expand_calls_inline): Use it when calling
6867         walk_tree.
6868         (optimize_function): Initialize and free tree_pruner.
6869
6870 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
6871
6872         Lazy __FUNCTION__ generation.
6873         * cp-tree.def (FUNCTION_NAME): Remove.
6874         * cp-tree.h (function_name_declared_p): Remove.
6875         (cp_fname_init): Prototype.
6876         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
6877         don't call declare_function_name. Call start_fname_decls.
6878         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
6879         clobber the line number.
6880         (cp_fname_init): New function.
6881         (start_function): Call start_fname_decls.
6882         (finish_function): Call finish_fname_decls.
6883         * lex.c (reswords): Add slots for __FUNCTION__ et al.
6884         (rid_to_yy): Add mappings for __FUNCTION__ et al.
6885         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
6886         * parse.y (VAR_FUNC_NAME): New token.
6887         (primary): Add VAR_FUNC_NAME.
6888         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
6889         generation.
6890         (tsubst, FUNCTION_NAME case): Remove.
6891         (tsubst_copy, FUNCTION_NAME case): Remove.
6892         (tsubst_expr, DECL_STMT case): Be careful with a
6893         DECL_PRETTY_FUNCTION_P.
6894         (instantiate_decl): Remove function_name_declared_p.
6895         * semantics.c (begin_compound_statement): Don't call
6896         declare_function_name here.
6897         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
6898         (finish_translation_unit): Call finish_fname_decls.
6899         (expand_body): Remove function_name_declared_p.
6900         * typeck2.c (digest_init): Allow any ERROR_MARK.
6901
6902 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
6903
6904         * pt.c (tsubst_decl): Use VOID_TYPE_P.
6905         * semantics.c: Fix some typos.
6906
6907 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
6908
6909         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
6910
6911 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6912
6913         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
6914
6915 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
6916
6917         * except.c (build_throw): Wrap the initialization of the exception
6918         object in a MUST_NOT_THROW_EXPR.
6919         (do_free_exception): #if 0.
6920
6921 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
6922
6923         * cp-tree.h (finish_enum): Change prototype.
6924         * decl.c (finish_enum): Reorganize.
6925         * parse.y (structsp): Adjust calls to finish_enum.
6926
6927 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
6928
6929         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
6930         't' case.
6931
6932 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
6933
6934         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
6935         (layout_empty_base): Return at end flag.
6936         (build_base_field): Likewise.
6937         (build_base_fields): Likewise.
6938         (layout_virtual_bases): Don't add 1 to eoc value.
6939         (end_of_class): Use full size for empty bases.
6940         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
6941         empty bases. Don't add 1 to eoc value. Only add trailing padding
6942         if we're an empty class with no empty bases.
6943         (dump_class_hierarchy): Dump size and alignment.
6944
6945 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
6946
6947         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
6948         ICS_BAD_FLAG.
6949
6950 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
6951
6952         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
6953         is found, look first if name does not match the structure name.
6954
6955 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
6956
6957         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
6958         set.
6959         (SET_DECL_LANGUAGE): New macro.
6960         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
6961         (pushdecl): Likewise.
6962         (build_library_fn_1): Likewise.
6963         (build_cp_library_fn): Likewise.
6964         (grokfndecl): Likewise.
6965         (grokvardecl): Mark `extern "C"' variables as having C linkage.
6966         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
6967         * lex.c (retrofit_lang_decl): Likewise.
6968         * mangle.c (mangle_decl_string): Don't mangle the names of
6969         variables declared with C language linkage.
6970         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
6971
6972 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6973
6974         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
6975         flag_access_control from uninitialized storage.
6976
6977 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
6978
6979         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
6980         * mangle.c (write_pointer_to_member_type): Fix mangling of
6981         pointers to cv-qualified member function types.
6982
6983         * init.c (build_delete): Create a SAVE_EXPR for the address if
6984         we're going to use it more than once.
6985
6986 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
6987
6988         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
6989         (expand_ptremfunc_cst): Change prototype.
6990         (delta2_from_ptrmemfunc): Remove.
6991         * expr.c (cplus_expand_constant): Adjust call to
6992         expand_ptrmemfunc_cst.
6993         * typeck.c (build_ptrmemfunc1): Simplify.
6994         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
6995         results in a constant.
6996         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
6997         (delta2_from_ptrmemfunc): Remove.
6998         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
6999
7000 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
7001
7002         * cp-tree.h (decl_namespace_list): New macro.
7003         (struct saved_scope): Add decl_ns_list.
7004         * decl.c (mark_saved_scope): Mark it.
7005         * decl2.c: Lose static decl_namespace_list.
7006         (init_decl2): Don't save it.
7007
7008 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7009
7010         * cp-tree.h (warn_return_type, yylex): Delete redundant
7011         declarations.
7012
7013         * decl.c (current_class_depth, global_namespace): Likewise.
7014
7015         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
7016
7017         * repo.c (flag_use_repository): Likewise.
7018
7019 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7020
7021         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
7022         set_block, pushdecl, getdecls, gettags, init_decl_processing,
7023         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
7024         lvalue_or_else, print_lang_statistics, comp_target_types,
7025         unsigned_type, signed_type, signed_or_unsigned_type,
7026         build_function_call, mark_addressable, incomplete_type_error):
7027         Delete redundant declarations.
7028
7029 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
7030
7031         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
7032         (TYPE_ANONYMOUS_P): New macro.
7033         (TAGGED_TYPE_P): New macro.
7034         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
7035         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
7036         * tree.c (no_linkage_helper): Likewise.
7037         * semantics.c (begin_class_definition): Likewise.
7038         * pt.c (convert_template_argument): Likewise.
7039         * lex.c (check_for_missing_semicolon): Likewise.
7040
7041 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
7042
7043         * class.c (dfs_unshared_virtual_bases): New function.
7044         (mark_primary_bases): Call it.
7045         (check_bases): Ignore virtual bases when determining
7046         nearly-emptiness.
7047
7048 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
7049
7050         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
7051
7052 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
7053
7054         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
7055         cloned function to the clone.
7056
7057 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7058
7059         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
7060
7061         * semantics.c: Include expr.h.
7062
7063 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
7064
7065         * method.c (implicitly_declare_fn): Commonize code for copy ctor
7066         and assignment op. Set TREE_USED for parameter.
7067
7068 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
7069
7070         * class.c (find_final_overrider_data): Add `candidates'.
7071         (dfs_find_final_overrider): Don't issue error messages
7072         prematurely.
7073         (find_final_overrider): Issue error messages here.
7074         (build_base_field): Don't warn about amgibuous direct bases here.
7075         (warn_about_ambiguous_direct_bases): New function.
7076         (layout_class_type): Use it.
7077
7078 2001-04-10  Richard Henderson  <rth@redhat.com>
7079
7080         * typeck.c (build_array_ref): Push the array reference inside
7081         COMPOUND_EXPR and COND_EXPR.
7082
7083 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
7084
7085         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
7086         * decl.c (duplicate_decls): Adjust accordingly.
7087         (maybe_commonize_var): Likewise.
7088         (grokfndecl): Likewise.
7089         (start_function): Likewise.
7090         (start_method): Likewise.
7091         * decl2.c (key_method): Likewise.
7092         (import_export_decl): Likewise.
7093         * method.c (implicitly_declare_fn): Likewise.
7094         * optimize.c (maybe_clone_body): Likewise.
7095
7096 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
7097
7098         * lang-specs.h: Add __DEPRECATED.
7099
7100 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
7101
7102         * search.c (get_dynamic_cast_base_type): When building a new
7103         constant, set its type to ssizetype.
7104
7105 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
7106
7107         * optimize.c (expand_call_inline): Only add newly inlined statements
7108         into inlined_stmts.
7109
7110 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
7111
7112         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
7113         (OPERATOR_FORMAT): Likewise.
7114         (OPERATOR_TYPENAME_FORMAT): Likewise.
7115         * operators.def: Remove old name-mangling information.
7116         * decl.c (grok_op_properties): Adjust accordingly.
7117         * lex.c (init_operators): Likewise.
7118         * rtti.c (get_tinfo_decl): Issue error messages about types that
7119         have variable size.
7120
7121 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
7122
7123         * decl2.c (import_export_decl): Don't call import_export_class
7124         when processing an inline member function.
7125         * semantics.c (expand_body): Call import_export_decl before
7126         emitting inline functions.
7127
7128 2001-03-28  Richard Henderson  <rth@redhat.com>
7129
7130         IA-64 ABI Exception Handling:
7131         * cp-tree.def (EH_SPEC_BLOCK): New.
7132         (MUST_NOT_THROW_EXPR): New.
7133         * cp-tree.h: Update changed function declarations.
7134         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
7135         (CPTI_CALL_UNEXPECTED): New.
7136         (struct cp_language_function): Rename x_eh_spec_try_block
7137         to x_eh_spec_block.
7138         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
7139         * decl.c (current_binding_level): If no current function
7140         bindings, revert to scope_chain.
7141         (initialize_predefined_identifiers): Remove __cp_push_exception.
7142         (store_parm_decls): Use begin_eh_spec_block.
7143         (finish_function): Use finish_eh_spec_block.
7144         (mark_lang_function): Update for name changes.
7145         * decl2.c (finish_file): No mark_all_runtime_matches.
7146         * dump.c (cp_dump_tree): Handle new tree codes.
7147         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
7148         * except.c (catch_language_init, catch_language): Remove.
7149         (init_exception_processing): Don't set language code.
7150         Initialize call_unexpected_node, protect_cleanup_actions,
7151         eh_personality_libfunc, lang_eh_runtime_type.
7152         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
7153         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
7154         (prepare_eh_type): Split out type canonicalizations ...
7155         (build_eh_type_type): ... from here.
7156         (build_eh_type_type_ref): Remove.
7157         (mark_all_runtime_matches): Remove.
7158         (build_exc_ptr): New.
7159         (do_begin_catch, do_end_catch): New.
7160         (do_pop_exception): Remove.
7161         (build_terminate_handler): Remove.
7162         (choose_personality_routine): Split out language choice from ...
7163         (initialize_handler_parm): ... here.
7164         Use MUST_NOT_THROW_EXPR.
7165         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
7166         exception object handling.
7167         (expand_start_eh_spec, expand_end_eh_spec): Remove.
7168         (expand_exception_blocks, alloc_eh_object): Remove.
7169         (begin_eh_spec_block, finish_eh_spec_block): New.
7170         (do_allocate_exception, do_free_exception): New.
7171         (expand_throw): Merge into ...
7172         (build_throw): ... here.  Update for abi.
7173         * expr.c (cplus_expand_expr): No expand_internal_throw.
7174         Handle MUST_NOT_THROW_EXPR.
7175         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
7176         * semantics.c (*) Update for except.h name changes.
7177         (genrtl_try_block): No protect_with_terminate.
7178         (genrtl_eh_spec_block): New.
7179         (genrtl_handler): Don't emit the goto here.
7180         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
7181         (genrtl_finish_function): Don't expand_exception_blocks.
7182         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
7183
7184 2001-03-28  Richard Henderson  <rth@redhat.com>
7185
7186         * decl.c (struct named_label_list): Rename eh_region to
7187         in_try_scope, add in_catch_scope.
7188         (struct binding_level): Rename eh_region to is_try_scope,
7189         add is_catch_scope.
7190         (note_level_for_try): Rename from note_level_for_eh.
7191         (note_level_for_catch): New.
7192         (poplevel): Copy both is_try_scope and is_catch_scope to
7193         the named_label_list struct.
7194         (check_previous_goto_1): Don't check for catch block via
7195         DECL_ARTIFICIAL; use in_try_scope instead.
7196         (check_goto): Likewise.
7197         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
7198         * except.c (expand_start_catch_block): Call note_level_for_catch.
7199         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
7200
7201 2001-03-27  Richard Henderson  <rth@redhat.com>
7202
7203         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
7204         exceptions_via_longjmp.
7205
7206 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
7207
7208         * pt.c (check_default_tmpl_args):  Make error messages clearer.
7209
7210 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
7211
7212         * error.c:  Also undefine 'A' macro used for cp_printers definition.
7213
7214 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7215
7216         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
7217
7218 2001-03-26  Mike Yang <yang@research.att.com>
7219             Mark Mitchell  <mark@codesourcery.com>
7220
7221         * dump.c (dump_access): New function.
7222         (cp_dump_tree): Use it.  Dump basetype information for class
7223         types.
7224
7225 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
7226
7227         * Makefile.in (optimize.o): Depend on params.h.
7228         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
7229         (init_decl_processing): Set flag_no_inline when doing
7230         inlining-on-trees.
7231         * optimize.c: Include params.h.
7232         (struct inline_data): Improve documentation of FNS.  Add
7233         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
7234         (INSNS_PER_STMT): New macro.
7235         (remap_block): Use CLONING_P.
7236         (inlinable_function_p): Don't inline big functions.
7237         (expand_call_inline): Keep track of how much inlining we've done.
7238         (optimize_function): Set FIRST_INLINED_FN.
7239         (maybe_clone_body): Set CLONING_P.
7240         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
7241         tree nodes.
7242         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
7243         rest_of_compilation.  Clear DECL_RTL for local variables
7244         afterwards.
7245         (clear_decl_rtl): New function.
7246
7247 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
7248
7249         Implement DR 209
7250         * cp-tree.h (skip_type_access_control,
7251         reset_type_access_control): Prototype.
7252         * decl.c (grokdeclarator): Access of friends is not checked.
7253         * parse.y (component_decl_list): Reset type access control.
7254         * semantics.c (decl_type_access_control): Clear
7255         current_type_lookups.
7256         (save_type_access_control): Don't save if not deferring.
7257         (skip_type_access_control, reset_type_access_control): New
7258         functions.
7259         (begin_class_definition): Do type access control for basetypes.
7260         Start deferred access control.
7261         (finish_class_definition): Resume immediate access control if
7262         this is a local class.
7263
7264 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7265
7266         * class.c (add_method): Use memcpy/memmove, not bcopy.
7267
7268         * decl.c (duplicate_decls): Likewise.
7269
7270 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
7271
7272         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
7273         not `_'.
7274
7275 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
7276
7277         * decl.c (local_names): Define.
7278         (push_local_name): New.
7279         (grok_reference_init): Return init if initializing static reference
7280         variable with non-constant instead of emitting it.
7281         Move expand_static_init call to cp_finish_decl.
7282         (layout_var_decl): Call push_local_name.
7283         (maybe_commonize_var): Allow inlining functions even if they have
7284         static local variables, use comdat_linkage for them if flag_weak.
7285         (check_initializer): Call obscure_complex_init if
7286         grok_reference_init returned nonzero.
7287         (save_function_data): Clear x_local_names.
7288         (pop_cp_function_context): Free x_local_names.
7289         (mark_inlined_fns): Remove.
7290         (mark_lang_function): Mark x_local_names.
7291         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
7292         Mark inlined_fns as tree, remove call to mark_inlined_fns.
7293         * class.c (alter_access): Ensure DECL_ACCESS is never set if
7294         DECL_DISCRIMINATOR_P.
7295         * cp-tree.h (cp_language_function): Add x_local_names.
7296         (lang_decl_flags): Add discriminator into u2.
7297         (lang_decl_inlined_fns): Remove.
7298         (lang_decl): inlined_fns is now a TREE_VEC.
7299         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
7300         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
7301         TREE_VEC, not a custom structure.
7302         (optimize_function): Likewise.
7303         * mangle.c (discriminator_for_local_entity): Discriminate among
7304         VAR_DECL local entities.
7305         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
7306         is not valid.
7307
7308 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
7309
7310         Add support for Java interface method calls.
7311         * cp-tree.h (struct lang_type): Add java_interface flag.
7312         (TYPE_JAVA_INTERFACE): New macro.
7313         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
7314         by setting TYPE_JAVA_INTERFACE.
7315         * call.c (java_iface_lookup_fn): New static.
7316         (build_over_call): If calling a method declared in a
7317         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
7318         expression which resolves the function address.
7319         (build_java_interface_fn_ref): New function.
7320
7321 2001-03-22  Richard Henderson  <rth@redhat.com>
7322
7323         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
7324         * except.c: Don't include it.
7325
7326 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7327             based on an idea from Joe Buck <jbuck@synopsys.com>
7328
7329         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
7330         New nonterminals.
7331         (data_def, component_decl): Add reductions to bad_decl.
7332
7333 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
7334
7335         * method.c (do_build_assign_ref): Don't use build_modify_expr for
7336         anonymous aggregates, since they don't have assignment operator
7337         method.
7338         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
7339         assignment operators for anonymous structure fields.
7340
7341 2001-03-21  Jason Merrill  <jason@redhat.com>
7342
7343         * pt.c (instantiate_decl): Abort if we see a member constant
7344         instantiation that doesn't already have its initializer.
7345         Downgrade explicit instantiation without definition to pedwarn.
7346
7347         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
7348         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
7349         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
7350
7351         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
7352         (pending_vtables): Remove.
7353         * decl2.c (pending_vtables): Remove.
7354         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
7355         CLASSTYPE_VTABLE_NEEDS_WRITING.
7356         (import_export_class): Likewise.
7357         (init_decl2): Don't mark pending_vtables.
7358         * lex.c (handle_pragma_vtable): Just sorry.
7359         * pt.c (instantiate_class_template): Don't mess with
7360         CLASSTYPE_VTABLE_NEEDS_WRITING.
7361         (mark_class_instantiated): Likewise.
7362         * ptree.c (print_lang_type): Don't print it.
7363         * semantics.c (begin_class_definition): Don't set it.
7364
7365         * pt.c (template_tail): Replace with last_pending_template.
7366         (maybe_templates, maybe_template_tail): Remove.
7367         (add_pending_template): Adjust.
7368         (instantiate_pending_templates): Adjust.
7369
7370         * cp-tree.h (struct saved_scope): Remove lang_stack field.
7371         (current_lang_stack): Remove.
7372         * decl.c (maybe_push_to_top_level): Don't initialize it.
7373         (duplicate_decls): Use current_lang_depth.
7374         (xref_basetypes): Likewise.
7375         * class.c (current_lang_depth): New fn.
7376         (push_lang_context): Use more varray functionality.
7377         (pop_lang_context): Likewise.
7378
7379         * error.c (GLOBAL_THING): Always use '__'.
7380
7381 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
7382
7383         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
7384
7385         * mangle.c (mangle_decl_string): Mangle the names of overloaded
7386         operators, even when they have `extern "C"' linkage.
7387
7388 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
7389
7390         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
7391         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7392         where it's not necessary.
7393         (add_method): Remove optimization involving comparison of
7394         DECL_ASSEMBLER_NAME.
7395         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
7396         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7397         where it's not necessary.
7398         (check_methods): Likewise.
7399         (build_clone): Likewise.
7400         (built_vtt): Likewise.
7401         * cp-tree.h (DECL_NEEDED_P): Likewise.
7402         * decl.c (pushtag): Likewise.
7403         (duplicate_decls): Likewise.
7404         (pushdecl): Likewise.
7405         (builtin_function): Likewise.
7406         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
7407         (build_cp_library_fn): Likewise.
7408         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
7409         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7410         where it's not necessary.
7411         (make_rtl_for_nonlocal_decl): Likewise.
7412         (cp_finish_decl): Likewise.
7413         (grokfndecl): Likewise.
7414         (grokvardecl): Likewise.
7415         (grokdeclarator): Likewise.
7416         (start_function): Likewise.
7417         (cp_missing_return_ok_p): Likewise.
7418         * decl2.c (grokclassfn): Likewise.
7419         (check_classfn): Likewise.
7420         (finish_static_data_member_decl): Likewise.
7421         (grokfield): Likewise.
7422         * error.c (GLOBAL_IORD_P): Remove.
7423         (dump_global_iord): Improve output.
7424         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
7425         * except.c (nothrow_libfn_p): Summarily reject any function not in
7426         namespace-scope.
7427         * init.c (build_java_class_ref): Don't explicitly set
7428         DECL_ASSEMBLER_NAME after calling mangle_decl.
7429         * mangle.c (mangle_decl_string): Handle extern "C" functions.
7430         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
7431         * method.c (set_mangled_name_for_decl): Don't explicitly set
7432         DECL_ASSEMBLER_NAME after calling mangle_decl.
7433         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
7434         IDENTIFIER_GLOBAL_VALUE for the thunk.
7435         * pt.c (set_mangled_name_for_template_decl): Remove.
7436         (check_explicit_specialization): Don't use it.
7437         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
7438         (tsubst_friend_function): Likewise.
7439         (tsubst_decl): Likewise.
7440         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
7441         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
7442         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7443         where it's not necessary.
7444         (tinfo_base_init): Likewise.
7445         (create_real_tinfo_var): Likewise.
7446         * search.c (looup_field_1): Likewise.
7447         * semantics.c (finish_named_return_value): Likewise.
7448         * tree.c (init_tree): Set lang_set_decl_assembler_name.
7449
7450 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
7451
7452         Correct semantics restrictions checking in throw-expression.
7453         * except.c (is_admissible_throw_operand): New function.
7454         (build_throw): Use it.
7455
7456 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
7457
7458         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
7459         and its ilk.
7460
7461 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
7462
7463         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
7464         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
7465         * decl.c (duplicate_decls): Likewise.
7466         (builtin_function): Likewise.
7467         (build_library_fn): Likewise.
7468         (build_cp_library_fn): Likewise.
7469         (check_initializer): Likewise.
7470         (cp_finish_decl): Likewise.
7471         * decl2.c (grokfield): Likewise.
7472         (grok_function_init): Remove #if 0'd code.
7473         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
7474         * friend.c (do_friend): Likewise.
7475         * init.c (get_temp_regvar): Likewise.
7476         * method.c (make_thunk): Likewise.
7477         * pt.c (tsubst_friend_function): Likewise.
7478         (tsubst_decl): Likewise.
7479         (regenerate_decl_from_template): Likewise.
7480         * semantics.c (genrtl_named_return_value): Likewise.
7481         (expand_body): Likewise.
7482         (genrtl_finish_function): Likewise.
7483         * tree.c (cp_tree_equal): Likewise.
7484
7485 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
7486
7487         * call.c (convert_like_real): Add extra semantics to INNER
7488         parameter. Don't convert to temporary if a user conversion
7489         gives us an lvalue that we're about to bind to a reference.
7490         Set INNER to indicate pending reference binding on recursive
7491         calls.
7492
7493 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
7494
7495         * cp/lex.c: Delete duplicate pending_lang_change.
7496
7497 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
7498
7499         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
7500         Similarly.
7501         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
7502         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
7503
7504 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
7505
7506         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
7507
7508 2001-03-08  Stan Shebs  <shebs@apple.com>
7509
7510         * cp-tree.h (set_identifier_local_value): Remove unused decl.
7511
7512 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
7513
7514         * spew.c: Remove references to CPP_OSTRING.
7515
7516 2001-03-06  Andrew Haley  <aph@redhat.com>
7517
7518         * typeck.c (convert_arguments): Check that we have an fndecl.
7519
7520 2001-03-05  Andrew Haley  <aph@redhat.com>
7521
7522         * typeck.c (convert_arguments): Don't do ellipsis conversion for
7523         __built_in_constant_p.
7524
7525 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
7526
7527         * typeck.c (build_static_cast): Allow enum to enum conversions
7528         as per DR 128.
7529
7530 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
7531
7532         * class.c (check_field_decls): Pointers to member do not a
7533         non-pod struct make, as per DR 148.
7534
7535 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
7536
7537         * call.c (joust): cp_pedwarn when using gnu extension concerning
7538         worst conversion sequences.
7539
7540 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
7541
7542         * decl.c: Replace all uses of 'boolean' with 'bool'.
7543
7544 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
7545
7546         * lang-specs.h: Add zero initializer for cpp_spec field to
7547         all array elements that need one.  Don't put an #ifdef inside
7548         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
7549         use it.
7550
7551 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
7552
7553         Implement using decls inside template functions.
7554         * decl2.c (validate_nonmember_using_decl): Don't special case
7555         fake_std_node in the global namespace. Don't reject early when
7556         processing a template.
7557         (do_local_using_decl): Add to statement tree. Don't do further
7558         processing when building a template.
7559         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
7560
7561 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
7562
7563         * decl2.c (do_nonmember_using_decl): Don't complain if we find
7564         same function. Do complain about ambiguating extern "C"
7565         declarations.
7566
7567 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
7568
7569         Remove floating point and complex type template constant parms.
7570         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
7571         COMPLEX_TYPE extensions.
7572         (invalid_nontype_parm_type_p): Likewise.
7573
7574 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
7575
7576         * except.c (call_eh_info): Revert "match_function"'s type.
7577
7578 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
7579
7580         Fix ctor vtable vcall offsets.
7581         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
7582         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
7583         (get_matching_base): Remove.
7584         (get_original_base): New function.
7585         (build_vtbl_initializer): Initialize vid.rtti_binfo.
7586         Use a virtual thunk for a ctor vtable with an index
7587         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
7588         primary base within a constructor vtable. Only set
7589         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
7590         when primary base has been lost.
7591         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
7592
7593 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
7594
7595         * call.c (joust): Ensure more_specialized()'s argument length
7596         parameter has correct value for constructors.
7597
7598 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
7599
7600         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
7601
7602         * decl.c (mark_inlined_fns): Prototype.
7603
7604 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
7605
7606         * spew.c (yylex): Correct handling of friends.
7607
7608 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
7609
7610         * mangle.c (write_encoding): Pass write_function_type the
7611         FUNCTION_DECL for the function being encoded.
7612         (write_function_type): Pass it along to write_bare_function_type.
7613         (write_bare_function_type): Pass it along to write_method_parms.
7614         (write_method_parms): Don't mangle the compiler-generated
7615         parameters to a constructor or destructor.
7616
7617 2001-02-22  Andreas Jaeger  <aj@suse.de>
7618
7619         * optimize.c: Include toplev.h for
7620         note_deferral_of_defined_inline_function prototype.
7621
7622 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
7623
7624         * cp-tree.h (struct lang_decl_inlined_fns): New.
7625         (struct lang_decls): Add inlined_fns.
7626         (DECL_INLINED_FNS): New macro.
7627         * optimize.c (struct inline_data): Add inlined_fns.
7628         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
7629         (inlinable_function_p): Likewise, fix typo in comment,
7630         function is not inlinable if it already inlined function currently
7631         being optimized.
7632         (expand_call_inline): Add fn to inlined_fns if necessary.
7633         (optimize_function): Initialize inlined_fns.
7634         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
7635         * decl.c (mark_inlined_fns): New function.
7636         (lang_mark_tree): Call it.
7637
7638 2001-02-21  Jason Merrill  <jason@redhat.com>
7639
7640         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
7641         (DECL_UNINLINABLE): Move to middle-end.
7642
7643         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
7644         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
7645         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
7646         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
7647         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
7648
7649         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
7650         second parm of op=.
7651
7652 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
7653
7654         * decl2.c (set_decl_namespace): Allow explicit instantiations in
7655         any namespace.
7656
7657 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7658
7659         * optimize.c (expand_call_inline): Don't walk subtrees of type
7660         nodes.
7661
7662 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
7663
7664         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
7665         for a destructor.
7666
7667 2001-02-18  Jason Merrill  <jason@redhat.com>
7668
7669         Do put the VTT parameter in DECL_ARGUMENTS.
7670         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
7671         (current_vtt_parm): New macro.
7672         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
7673         (DECL_HAS_VTT_PARM_P): New macro.
7674         (DECL_VTT_PARM): Remove.
7675         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
7676         * decl.c (duplicate_decls): Only copy the operator code if
7677         appropriate.
7678         (start_function): Set current_vtt_parm.
7679         (lang_mark_tree): Don't mark vtt_parm.
7680         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
7681         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
7682         * class.c (build_clone): Maybe remove the VTT parm.
7683         * optimize.c (maybe_clone_body): Set up the VTT parm.
7684         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
7685         * call.c (build_over_call): Just allow the VTT arg.
7686         * method.c (make_thunk): Don't set DECL_VTT_PARM.
7687         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
7688         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
7689         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
7690         * error.c (dump_function_decl): Likewise.
7691         * call.c (build_user_type_conversion_1, convert_like_real): Abort
7692         if we try to call a constructor with in-charge or VTT parms.
7693         * method.c (skip_artificial_parms_for): New fn.
7694         * call.c (add_function_candidate, build_over_call): Call it.
7695         * call.c (build_new_method_call): Use current_vtt_parm.
7696         * init.c (expand_virtual_init): Likewise.
7697         * class.c (same_signature_p): No longer static.
7698         * cp-tree.h: Declare it.
7699         * search.c (look_for_overrides_r): Use it.
7700
7701 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
7702
7703         * cp-tree.h (new_abi_rtti_p): Remove.
7704         (name_mangling_version): Likewise.
7705         (flag_do_squangling): Likewise.
7706         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
7707         * decl.c (grokfndecl): Likewise.
7708         * decl2.c (name_mangling_version): Remove.
7709         (flag_do_squangling): Likewise.
7710         (lang_f_options): Remove `squangle'.
7711         (unsupported_options): Add `squangle'.
7712         (cxx_decode_option): Issue a warning about uses of
7713         -fname-mangling-version.
7714         (finish_file): Remove old ABI support.
7715         * pt.c (check_explicit_specialization): Likewise.
7716         (tsubst_decl): Likewise.
7717         * rtti.c (init_rtti_processing): Likewise.
7718         (build_headof): Likewise.
7719         (get_tinfo_decl_dynamic): Likewise.
7720         (tinfo_from_decl): Likewise.
7721         (build_dynamic_cast_1): Likewise.
7722         (synthesize_tinfo_var): Likewise.
7723         * init.c (build_new): Allow enumeration types for the array-bounds
7724         in a direct-new-declarator.
7725
7726         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
7727
7728         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
7729         TREE_PROTECTED from the template being specialized.
7730
7731 2001-02-17  Jason Merrill  <jason@redhat.com>
7732
7733         * decl2.c (build_artificial_parm): Set TREE_READONLY.
7734
7735         * decl.c (bad_specifiers): Allow throw specs on things with
7736         pointer-to-function or -member-function type.
7737         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
7738         a pmf.
7739
7740 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
7741
7742         * call.c (check_dtor_name): Handle template names correctly.
7743
7744 2001-02-16  Jason Merrill  <jason@redhat.com>
7745
7746         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
7747         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
7748         * optimize.c (maybe_clone_body): Don't substitute it.
7749         * call.c (build_new_method_call): Check in_chrg instead.
7750         * init.c (expand_virtual_init): Likewise.
7751
7752 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
7753
7754         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
7755         class-type introduces at least a type-name.
7756
7757 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
7758
7759         * call.c (convert_like_real): Create a temporary for non-lvalue.
7760
7761 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
7762
7763         * cp-tree.h: Fix typos in comments.
7764
7765 2001-02-16  Jason Merrill  <jason@redhat.com>
7766
7767         * optimize.c (remap_block): If we're compiling a clone, pass the
7768         new block to insert_block.
7769
7770 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
7771
7772         * semantics.c (finish_asm_stmt): Robustify.
7773
7774 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
7775
7776         * pt.c (push_template_decl_real): Don't remangle the name of a
7777         class template.
7778
7779 2001-02-15  Jim Meyering  <meyering@lucent.com>
7780
7781         * Make-lang.in (c++.install-common): Depend on installdirs.
7782         (c++.install-info): Likewise.
7783         (c++.install-man): Likewise.
7784
7785 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
7786
7787         * typeck2.c (build_m_component_ref): Robustify.
7788
7789 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
7790
7791         * friend.c (do_friend): Don't take the nested [template] class
7792         into account when deciding whether to warn about the friend
7793         function not referring to a template function.
7794
7795 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
7796
7797         * typeck.c (build_unary_op): Clarify error message.
7798
7799 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
7800
7801         * parse.y (component_constructor_declarator): allow optional
7802         parentheses around constructor class name.
7803
7804 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7805
7806         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
7807         section.
7808         * init.c (emit_base_init): Remove incorrect comment about
7809         virtual bases.
7810         * method.c (make_thunk): Fix comment alignment.
7811
7812 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7813
7814         Kill remnants of this is variable.
7815         * cp-tree.h (flag_this_is_variable): Remove.
7816         * decl2.c (flag_this_is_variable): Remove.
7817         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
7818         (build_vbase_path): The path is non-static, even in a cdtor.
7819         (resolves_to_fixed_type_p): Add additional return value.
7820         * search.c (init_vbase_pointers): Adjust.
7821         * tree.c (lvalue_p_1): Adjust.
7822         * typeck.c (mark_addressable): Adjust.
7823
7824 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7825
7826         * pt.c (unify): Don't check cv quals of array types.
7827
7828 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7829
7830         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
7831         check whether we already have the type.
7832
7833 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
7834
7835         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
7836         * call.c (build_op_delete_call): Simplify to remove duplicate
7837         code.
7838         * class.c (clone_function_decl): Don't build the deleting variant
7839         of a non-virtual destructor.
7840         * decl.c (finish_destructor_body): Don't call delete if this is a
7841         non-virtual destructor.
7842         * init.c (build_delete): Explicitly call `operator delete' when
7843         deleting an object with a non-virtual destructor.
7844
7845 2001-02-13  Jason Merrill  <jason@redhat.com>
7846
7847         * lang-specs.h: Add more __EXCEPTIONS.
7848
7849 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
7850
7851         * typeck2.c (process_init_constructor): Check
7852         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
7853
7854 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
7855
7856         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
7857         Remove spurious information in comment. Allow further
7858         adjustments of REFERENCE_TYPE args.
7859
7860 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
7861
7862         * errfn.c (cp_deprecated): Tweak diagnostic text.
7863         * parse.y (new_initializer): Deprecate initializer lists
7864         extension.
7865
7866 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
7867
7868         Remove old ABI support.
7869
7870 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
7871
7872         * decl2.c (flag_vtable_thunks): Always set it to 1.
7873         (flag_new_abi): Likewise.
7874         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
7875
7876         * Makefile.in (g++spec.o): Fix typo.
7877
7878 2001-02-09  Jason Merrill  <jason@redhat.com>
7879
7880         * lang-specs.h: Restore definition of __EXCEPTIONS.
7881
7882 2001-02-08  Jason Merrill  <jason@redhat.com>
7883
7884         * search.c (shared_member_p): New function.
7885         (lookup_field_r): Use it.
7886         * cp-tree.h (SHARED_MEMBER_P): Remove.
7887
7888         * method.c (process_overload_item): Handle template-dependent array
7889         bounds.
7890         * pt.c (type_unification_real): If we end up with undeduced nontype
7891         parms, try again.
7892
7893         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
7894         types.
7895
7896         * typeck2.c (friendly_abort): Don't say anything if we have
7897         earlier errors or sorries.
7898
7899         * decl.c (check_tag_decl): Notice attempts to redefine bool and
7900         wchar_t.  Ignore if in_system_header.
7901
7902         * decl.c (maybe_push_cleanup_level): New fn...
7903         (start_decl_1): ...split out from here.
7904         * cvt.c (build_up_reference): Use it.
7905         * cp-tree.h: Declare it.
7906
7907 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
7908
7909         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
7910         spec.
7911
7912 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
7913
7914         * pt.c (lookup_template_class): Make sure it's a primary
7915         template or template_template_parm when called from the parser.
7916         (instantiate_template_class): Add assertion.
7917
7918 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
7919
7920         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
7921         from error_mark_node.
7922
7923 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
7924
7925         Fix specification and implementation bugs in V3 ABI
7926         construction vtables.
7927         * cp-tree.h (flag_dump_class_layout): New flag.
7928         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
7929         (BINFO_LOST_PRIMARY_P): New flag.
7930         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
7931         (BINFO_PRIMARY_MARKED_P): Rename to ...
7932         (BINFO_PRIMARY_P): ... here.
7933         (binfo_via_virtual): New prototype.
7934         * decl2.c (flag_dump_class_layout): New flag.
7935         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
7936         use `=' as a file name separator.
7937         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
7938         bases.
7939         (build_vtbl_address): If this is a virtual primary base, then
7940         get the vtbl of what it is ultimately primary for.
7941         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
7942         for BINFO_PRIMARY_P.
7943         (dfs_skip_nonprimary_vbases_markedp): Likewise.
7944         (get_shared_vbase_if_not_primary): Likewise.
7945         (dfs_get_pure_virtuals): Likewise.
7946         (expand_upcast_fixups): Likewise.
7947         (fixup_virtual_upcast_offsets): Likewise.
7948         (dfs_find_vbase_instance): Likewise.
7949         (find_vbase_instance): Likewise.
7950         (binfo_from_vbase): Adjust comment to reflect reality.
7951         (binfo_via_virtual): New function.
7952         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
7953         for binfo walking during VTT construction.
7954         (dfs_mark_primary_bases): Remove.
7955         (force_canonical_binfo_r): New function.
7956         (force_canonical_binfo): New function.
7957         (mark_primary_virtual_base): New function.
7958         (mark_primary_bases): Walk in inheritance graph order, use
7959         mark_primary_virtual_base.
7960         (determine_primary_base): Use some more intermediate variables.
7961         (dfs_find_final_overrider): Don't check for overriding along a
7962         virtual path.
7963         (dfs_modify_vtables): Walk into primary virtual bases too.
7964         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
7965         (build_base_fields): Likewise.
7966         (dfs_set_offset_for_unshared_vbases): Likewise.
7967         (layout_virtual_bases): Likewise.
7968         (end_of_class): Likewise.
7969         (finish_struct_1): Call dump_class_hierarchy, if requested.
7970         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
7971         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
7972         (dump_class_hierarchy): Add file parameter. Append to file, if
7973         required.
7974         (finish_vtbls): Adjust accumulate_vtbl_inits call.
7975         Use canonical base for virtual bases.
7976         (build_vtt): Add more comments. Adjust build_vtt_inits call.
7977         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
7978         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
7979         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
7980         virtual VTTs.
7981         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
7982         from DATA.  We want virtual primary bases and all bases via virtual.
7983         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
7984         virtual base when not a construction vtable.
7985         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
7986         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
7987         Use canonical bases when processing virtual bases.
7988         (accumulate_vtbl_inits): We're interested in any base via a
7989         virtual path.
7990         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
7991         within a construction vtable, determine what is being overridden.
7992         (build_vtbl_initializer): Add more comments
7993         (add_vcall_offset_vtbl_entries_1): Adjust comment.
7994         (build_rtti_vtbl_entries): Check if the base has lost its
7995         primary.
7996
7997 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
7998
7999         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
8000
8001 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8002
8003         * decl.c (pushdecl): Call abort instead of fatal.
8004         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
8005         * init.c (build_new_1): Likewise.
8006         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
8007         * decl.c (build_typename_type): hash_table_init now returns void.
8008         decl.c (init_decl_processing): Make an error non-fatal.
8009
8010 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
8011
8012         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
8013         Document.
8014         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
8015         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
8016         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8017         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
8018         * decl.c (maybe_commonize_var): Use the new name-mangling where
8019         appropriate.
8020         * decl2.c (comdat_linkage): Enhance comments.  Make all
8021         compiler-generated things static, if COMDAT is not available.
8022         (get_tinfo_decl): Do not make typeinfo objects that belong in the
8023         library COMDAT.
8024         (tinfo_base_init): Use the correct mangled name for typeinfo
8025         strings, and push them into the global scope.
8026         (typeinfo_in_lib_p): New function.
8027         (synthesize_tinfo_var): Use it.
8028         (create_real_tinfo_var): Likewise.
8029
8030 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
8031
8032         * decl.c (push_class_binding): Use context_for_name_lookup instead
8033         of CP_DECL_CONTEXT.
8034         * search.c (context_for_name_lookup): Remove static.  Check for NULL
8035         context in the loop.
8036         * cp-tree.h (context_for_name_lookup): Add prototype.
8037
8038 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
8039
8040         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
8041         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
8042         Remove.
8043         * call.c (convert_class_to_reference, build_user_type_conversion_1,
8044         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
8045
8046 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
8047
8048         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
8049         of macros used when compiling g++spec.c.
8050         * g++spec.c (lang_specific_driver): Link with the shared
8051         libgcc by default.
8052
8053 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8054
8055         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
8056         make_reference_declarator, make_call_declarator), method.c
8057         (implicitly_declare_fn), parse.y (namespace_using_decl,
8058         notype_unqualified_id, expr_or_declarator, new_type_id,
8059         after_type_declarator, direct_after_type_declarator,
8060         notype_declarator, complex_notype_declarator,
8061         complex_direct_notype_declarator, qualified_id,
8062         notype_qualified_id, overqualified_id, direct_new_declarator,
8063         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
8064         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
8065         instead of build_parse_node.
8066
8067 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8068
8069         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
8070         (minus_one_node): Moved to top level gcc directory.  Renamed
8071         to integer_minus_one_node.
8072
8073         * init.c (init_init_processing): Don't set minus_one_node.
8074         (build_vec_init): Use integer_minus_one_node.
8075
8076         * rtti.c (get_tinfo_decl_dynamic): Likewise.
8077
8078 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
8079
8080         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
8081         identical and they would be replaced with constant, remove
8082         MODIFY_EXPR from the tree.
8083
8084 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8085
8086         * Make-lang.in: Remove all dependencies on defaults.h.
8087         * call.c: Don't include defaults.h.
8088         * decl.c: Likewise.
8089         * decl2.c: Likewise.
8090         * except.c: Likewise.
8091         * pt.c: Likewise.
8092         * rtti.c: Likewise.
8093         * tree.c: Likewise.
8094         * typeck.c: Likewise.
8095
8096 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
8097
8098         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
8099         operators even in "C" linkage.
8100         * method.c (set_mangled_name_for_decl): Likewise.
8101         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
8102         overloaded operators in "C" linkage.
8103
8104 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
8105
8106         * pt.c (tsubst_decl): Remove IN_DECL parameter.
8107         (tsubst_arg_types): Check parameter is not void.
8108         (tsubst): Adjust tsubst_decl call.
8109
8110 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
8111
8112         * call.c (add_builtin_candidate): Quote std properly, from
8113         previous change.
8114
8115 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8116
8117         * pt.c (check_explicit_specialization): Clone constructors and
8118         destructors.
8119
8120 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
8121
8122         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
8123         indicates anything special about template depth. Make sure we
8124         only count the user visible template classes.
8125
8126 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
8127
8128         * call.c (build_conv): Typo in comment.
8129         (add_builtin_candidate): Add more explanation.
8130         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
8131         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
8132         when we have enumeral types.
8133         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
8134         candidates for relops and eqops.
8135         (joust): Simplify control flow. Allow a non-template user
8136         function to hide a builtin.
8137
8138 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
8139
8140         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
8141         (more_specialized): Add deduction parameter.
8142         * call.c (joust): Adjust more_specialized call.
8143         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
8144         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
8145         (get_bindings_order): Remove.
8146         (get_bindings_real): Add DEDUCE parameter.
8147         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
8148         REFERENCE_TYPE jig for DEDUCE_ORDER.
8149         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
8150         maybe_adjust_types_for_deduction.
8151         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
8152         directly.
8153         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
8154         (check_cv_quals_for_unify): Use new unify qualifier flags.
8155         (unify): Clear new unify qualifier flags.
8156         (get_bindings_real): Add DEDUCE parameter.
8157         (get_bindings): Adjust call to get_bindings_real.
8158         (get_bindings_overload): Likewise.
8159         (most_specialized_instantiation): Adjust call to
8160         more_specialized.
8161
8162 2001-01-19  Jason Merrill  <jason@redhat.com>
8163
8164         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
8165
8166         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
8167         -fnew-abi.
8168
8169 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
8170
8171         * decl2.c (arg_assoc_class): Fix double iteration logic.
8172
8173 2001-01-19  Jason Merrill  <jason@redhat.com>
8174
8175         * init.c (build_delete): Always call convert_force to strip cv-quals.
8176
8177         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
8178         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
8179         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
8180
8181 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8182
8183         * search.c (get_vbase_1): Count only virtual bases.
8184
8185 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8186
8187         * class.c (duplicate_tag_error): Robustify flag clearing.
8188
8189 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8190
8191         * cp-tree.h (lookup_template_class): Add complain parm.
8192         * decl.c (lookup_namespace_name): Adjust call to
8193         lookup_template_class.
8194         (make_typename_type): Likewise.
8195         * semantics.c (finish_template_type): Likewise.
8196         * pt.c (lookup_template_class): Add complain parm. Adjust.
8197         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
8198         (tsubst): Likewise.
8199
8200 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8201
8202         * pt.c (copy_default_args_to_explicit_spec): Preserve
8203         object's CV quals. Reorganize.
8204
8205 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8206
8207         * typeck.c (build_modify_expr): Say `initialization' for
8208         INIT_EXPRs.
8209         * init.c (build_default_init): Convert to enumeral type, if
8210         needed.
8211
8212 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
8213
8214         * parse.y (nomods_initdcl0): Properly set things up for
8215         initdcl0_innards.
8216
8217 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8218
8219         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
8220         (type_unification_real): Set it.
8221         (unify): Use it.
8222
8223 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8224
8225         * decl.c (finish_destructor_body): Convert to vbase pointer here.
8226
8227 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8228
8229         * semantics.c (begin_class_definition): Check we're not inside a
8230         template parm list.
8231
8232 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8233
8234         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
8235         BASELINK_P.
8236
8237 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8238
8239         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
8240         * call.c (build_over_call): Add comment.
8241
8242 2001-01-16 Daniel Berlin <dberlin@redhat.com>
8243
8244         * cvt.c (ocp_convert): Handle vector type conversion
8245         * typeck2.c (digest_init): Handle vector type initializations
8246
8247 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
8248
8249         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
8250           was given.
8251
8252 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
8253
8254         * pt.c (check_nontype_parm): Rename to ...
8255         (invalid_nontype_parm_type_p): ... here.
8256         (process_template_parm): Adjust.
8257         (convert_template_argument): Adjust.
8258
8259 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
8260
8261         * pt.c (check_nontype_parm): New function.
8262         (process_template_parm): Use it.
8263         (convert_template_argument): Use it.
8264         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
8265         member.
8266
8267 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
8268
8269         * tree.c: Add defaults.h
8270         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
8271         * Make-lang.in (cp/tree.o): Add defaults.h.
8272
8273 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8274
8275         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
8276
8277 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8278
8279         * g++.1: Change to be ".so man1/gcc.1".
8280
8281 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8282
8283         * Make-lang.in (c++.info, c++.install-info): Build and install g++
8284         internals info.
8285         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
8286         ($(srcdir)/cp/g++int.info): New target.
8287         * gxxint.texi: Add info directory entry.  Use @@ in email address.
8288         * .cvsignore: Update.
8289
8290 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
8291
8292         * typeck.c (build_c_cast): Do template processing earlier.
8293         Always pedwarn on array casts.
8294
8295 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
8296
8297         * friend.c (make_friend_class): Make sure a templated class is
8298         actually a template.
8299
8300 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8301
8302         * decl2.c (get_guard): Set linkage from guarded decl.
8303
8304 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8305
8306         * call.c (convert_default_arg): Check for unprocessed
8307         DEFAULT_ARG.
8308         * cp-tree.h (replace_defarg): Move to spew.c.
8309         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
8310         spew.c, which is where they really are.
8311         (done_pending_defargs): Declare.
8312         (unprocessed_defarg_fn): Declare.
8313         * decl.c (replace_defarg): Move to spew.c
8314         * parse.y (structsp): Call done_pending_defargs.
8315         * spew.c (defarg_fns): Rearrange list structure.
8316         (defarg_fnsdone): New static variable.
8317         (defarg_depfns): New static variable.
8318         (init_spew): Adjust.
8319         (add_defarg_fn): Store the type in TREE_TYPE.
8320         (do_pending_defargs): Detect and deal with ordering constraints
8321         and circularity.
8322         (done_pending_defargs): New function.
8323         (unprocessed_defarg_fn): New function.
8324         (replace_defarg): Moved from decl.c. Robustify. Don't save
8325         if circularity detected.
8326
8327 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8328
8329         * pt.c (unify): Check array has a domain, before checking
8330         whether it is variable sized.
8331
8332 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8333
8334         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
8335         parameters with pointers to arrays of unknown bound.
8336
8337 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8338
8339         * parse.y (template_parm_header, template_spec_header): New
8340         reductions. Split out from ...
8341         (template_header): ... here. Use them.
8342         (template_template_parm): Use template_parm_header.
8343         * semantics.c (finish_template_template_parm): Add assert.
8344
8345 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
8346
8347         * mangle.c (write_builtin_type): Fix thinko.
8348
8349         * pt.c (copy_default_args_to_explicit_spec_1): New function.
8350         (copy_default_args_to_explicit_spec): Likewise.
8351         (check_explicit_specialization): Use it.
8352
8353         * class.c (finish_struct_1):  Remove last argument in call to
8354         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
8355         * decl.c (builtin_function): Likewise.
8356         (build_cp_library_fn): Likewise.
8357         (check_initializer): Likewise.
8358         (make_rtl_for_nonlocal_decl): Likewise.
8359         (cp_finish_decl): Likewise.
8360         (start_function): Likewise.
8361         * decl2.c (finish_anon_union): Likewise.
8362         * friend.c (do_friend): Likewise.
8363         * init.c (build_java_class_ref): Likewise.
8364         * method.c (make_thunk): Likewise.
8365         * pt.c (tsubst_friend_function): Likewise.
8366         * semantics.c (expand_body): Likewise.
8367
8368 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
8369
8370         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
8371         looking at DECL_CLONED_FUNCTION for non-functions.
8372
8373 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
8374
8375         * error.c (dump_template_parameter): Use parm to determine how
8376         to print default value.
8377
8378 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
8379
8380         * class.c (duplicate_tag_error): Clear more flags.
8381
8382 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
8383
8384         * call.c (build_new_method_call): Use binfo_for_vbase.
8385
8386 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
8387
8388         * cp-tree.h (flag_cond_mismatch): Don't declare.
8389         * decl2.c (flag_cond_mismatch): Don't define.
8390         (lang_f_options): Remove cond-mismatch.
8391         (unsupported_options): Add cond-mismatch.
8392
8393 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
8394
8395         * class.c (handle_using_decl): Reject using of constructor name
8396         of sourcing class. Allow injecting of a method with same name as
8397         nested class. Fixup error messages.
8398
8399 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
8400
8401         * decl2.c (lang_decode_option): Handle -Wformat=2.
8402
8403 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
8404
8405         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
8406         initialized_in_class.
8407         (DECL_DEFINED_IN_CLASS_P): Rename to ...
8408         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
8409         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
8410         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
8411         * pt.c (check_default_tmpl_args): Adjust for
8412         DECL_INITIALIZED_IN_CLASS_P.
8413         (instantiate_class_template): Likewise.
8414         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
8415
8416         * class.c (finish_struct): Constify saved_filename.
8417
8418 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
8419
8420         * class.c (duplicate_tag_error): Adjust diagnostic.
8421         (finish_struct): Locally set location to start of struct.
8422         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
8423
8424 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
8425
8426         * decl.c (struct binding_level): Adjust class_shadowed comments
8427         to reflect reality.
8428         (push_class_level_binding): Adjust comments to reflect reality.
8429         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
8430         Don't set TREE_VALUE on the class_shadowed list.
8431
8432 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8433
8434         * decl2.c (acceptable_java_type): Allow references too.
8435         * init.c (build_java_class_ref): When using the new ABI, search
8436         `class$' and have it mangled with `mangle_decl.'
8437         * mangle.c (write_java_integer_type_codes): New function.
8438         (write_builtin_type): Detect and mangle Java integer and real
8439         types.
8440
8441 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
8442
8443         * decl2.c (grokfield): Don't accept `asm' specifiers for
8444         non-static data members.
8445
8446 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8447
8448         * expr.c (cplus_expand_expr): Don't reset `target'.
8449
8450 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
8451
8452         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
8453
8454 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
8455
8456         * parse.y (template_datadef): Check for error_mark_node.
8457
8458 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
8459
8460         * cp-tree.def (DEFAULT_ARG): Make `x' class.
8461
8462 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
8463
8464         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
8465         (record_builtin_type): Make non-static.
8466         (flag_short_double): Don't declare.
8467         (init_decl_processing): Remove the creation of many tree nodes now
8468         in c_common_nodes_and_builtins.
8469         (build_void_list_node): New function.
8470         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
8471         * cp-tree.h (flag_short_wchar): Don't declare.
8472
8473 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
8474
8475         * call.c (build_conv): Don't use build1 for USER_CONV.
8476         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
8477
8478 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
8479
8480         * lex.c (lang_init): Call c_common_lang_init.
8481
8482 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
8483
8484         * search.c (lookup_fnfields_here): Remove.
8485         (look_for_overrides_r): Use lookup_fnfields_1.
8486         Ignore functions from using declarations.
8487
8488 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
8489
8490         Implement exceptions specifiers for implicit member functions.
8491         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
8492         * method.c (synthesize_exception_spec): New function.
8493         (locate_dtor, locate_ctor, locate_copy): New functions.
8494         (implicitly_declare_fn): Generate the exception spec too.
8495         * search.c (check_final_overrider): Check artificial functions
8496         too.
8497         * typeck2.c (merge_exception_specifiers): New function.
8498
8499 2001-01-03  Jason Merrill  <jason@redhat.com>
8500
8501         * init.c (build_default_init): New fn.
8502         (perform_member_init): Split out from here.
8503         (build_new_1): Use it.  Simplify initialization logic.
8504         (build_vec_init): Take an array, rather than a pointer and maxindex.
8505         Speed up simple initializations.  Don't clean up if we're assigning.
8506         * cp-tree.h: Adjust.
8507         * decl2.c (do_static_initialization): Remove TREE_VEC case.
8508         * parse.y (new_initializer): Return void_zero_node for ().
8509         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
8510         * typeck2.c (digest_init): Only complain about user-written
8511         CONSTRUCTORs.
8512
8513 2000-12-22  Mike Stump  <mrs@wrs.com>
8514
8515         * decl2.c: (max_tinst_depth): Increase to 50.
8516
8517 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
8518
8519         * class.c (invalidate_class_lookup_cache): Zero the
8520         previous_class_values.
8521         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
8522         TREE_INT_CST_HIGH.
8523         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
8524         * decl.c (free_bindings): New variable.
8525         (push_binding): Don't create a new binding if we have one on the
8526         free list.
8527         (pop_binding): Put old bindings on the free list.
8528         (init_decl_processing): Use size_int, not build_int_2.
8529         Register free_bindings as a GC root.
8530         (cp_make_fname_decl): Use size_int, not build_int_2.
8531         (push_inline_template_parms_recursive): Likewise.
8532         (end_template_parm_list): Likewise.
8533         (for_each_template_parm): Do not use walk_tree_without_duplicates.
8534         (tsubst_template_parms): Use size_int, not build_int_2.
8535         (tsubst): Likewise.
8536         * rtti.c (get_vmi_pseudo_type_info): Likewise.
8537
8538 2001-01-02  Richard Henderson  <rth@redhat.com>
8539
8540         * parse.y (asm): Set ASM_INPUT_P.
8541
8542 2001-01-02  Jason Merrill  <jason@redhat.com>
8543
8544         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
8545         for v3 ABI.
8546
8547         * typeck.c (cp_truthvalue_conversion): New fn.
8548         * cvt.c (ocp_convert): Use it.
8549
8550         * cp-tree.h: Lose c-common.c decls.
8551
8552         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
8553         * cvt.c (convert_to_void): Use type_unknown_p.
8554
8555         * typeck.c (strip_all_pointer_quals): Also strip quals from
8556         pointer-to-member types.
8557
8558         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
8559         parse.y as C.
8560
8561         * call.c (build_new_method_call): Do evaluate the object parameter
8562         when accessing a static member.
8563         * typeck.c (build_component_ref): Likewise.
8564
8565 2001-01-02  Andreas Jaeger  <aj@suse.de>
8566
8567         * decl.c (cp_missing_noreturn_ok_p): New.
8568         (init_decl_processing): Set lang_missing_noreturn_ok_p.
8569
8570 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
8571
8572         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
8573
8574 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
8575
8576         * class.c (pushclass): Remove #if 0'd code.
8577         * cp-tree.h (overload_template_name): Remove.
8578         * decl.c (store_bindings): Simplify.
8579         (pop_from_top_level): Likewise.
8580         * pt.c (overload_template_name): Remove.
8581         (instantiate_decl): Don't call push_to_top_level if it's not
8582         needed.
8583
8584 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
8585
8586         * pt.c (register_local_specialization): Don't return a value.
8587         (lookup_template_class): Use move-to-front heuristic when looking
8588         up template instantiations.
8589         (instantiate_decl): Only push_to_top_level when we're actually
8590         going to instantiate the template.
8591
8592 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
8593
8594         * search.c (binfo_for_vtable): Return least derived class, not
8595         most.  Handle secondary vtables.
8596
8597 2000-12-22  Jason Merrill  <jason@redhat.com>
8598
8599         * pt.c (more_specialized): Don't optimize len==0.
8600         (fn_type_unification): If we're adding the return type, increase len.
8601
8602         * typeck.c (build_binary_op): Fix pmf comparison logic.
8603
8604         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
8605         DECL_STATIC_FUNCTION_P.
8606
8607         * semantics.c (genrtl_finish_function): Don't try to jump to
8608         return_label unless it exists.
8609
8610         In partial ordering for a call, ignore parms for which we don't have
8611         a real argument.
8612         * call.c (joust): Pass len to more_specialized.
8613         (add_template_candidate_real): Strip 'this', pass len.
8614         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
8615         (get_bindings_order): New fn.  Pass len down.
8616         (get_bindings_real): Strip 'this', pass len.
8617         (fn_type_unification): Likewise.
8618         (type_unification_real): Succeed after checking 'len' args.
8619         (most_specialized_instantiation): Lose explicit_args parm.
8620         * class.c (resolve_address_of_overloaded_function): Strip 'this',
8621         pass len.
8622
8623 2000-12-21  Jason Merrill  <jason@redhat.com>
8624
8625         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
8626         DECL_TEMPLATE_RESULT.
8627
8628         * search.c (lookup_field_r): Call lookup_fnfields_1, not
8629         lookup_fnfields_here.
8630
8631         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
8632
8633         * call.c (build_object_call): Also allow conversions that return
8634         reference to pointer to function.
8635         (add_conv_candidate): Handle totype being ref to ptr to fn.
8636         (build_field_call): Also allow members of type reference to function.
8637         Lose support for calling pointer to METHOD_TYPE fields.
8638
8639         * error.c (dump_expr): Handle *_CAST_EXPR.
8640
8641         * typeck2.c (build_scoped_ref): Always convert to the naming class.
8642
8643         * tree.c (break_out_cleanups): Lose.
8644         * cp-tree.h: Remove prototype.
8645         * typeck.c (build_component_ref): Don't break_out_cleanups.
8646         (build_compound_expr): Likewise.
8647         * semantics.c (finish_expr_stmt): Likewise.
8648
8649 2000-12-20  Richard Henderson  <rth@redhat.com>
8650
8651         * cp-tree.h: Update declarations.
8652         * decl.c (finish_case_label): Return the new stmt node.
8653         * semantics.c (finish_goto_stmt): Likewise.
8654         (finish_expr_stmt, finish_return_stmt): Likewise.
8655         (finish_break_stmt, finish_continue_stmt): Likewise.
8656         (finish_asm_stmt): Likewise.
8657         * parse.y (already_scoped_stmt): Set STMT_LINENO.
8658         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
8659         (simple_if, simple_stmt): Return the new stmt node.
8660         (save_lineno): New.
8661
8662 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
8663
8664         * cp-tree.h: Don't declare warn_long_long.
8665
8666 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8667
8668         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
8669         IS_AGGR_TYPE.
8670
8671 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8672
8673         * pt.c (unify): Handle when both ARG and PARM are
8674         BOUND_TEMPLATE_TEMPLATE_PARM.
8675
8676 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8677
8678         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
8679         DECL_TEMPLATE_PARM_P.
8680
8681 2000-12-15  Jason Merrill  <jason@redhat.com>
8682
8683         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
8684
8685         * init.c (build_new_1): Don't strip quals from type.
8686
8687         * decl.c (pushdecl): Don't check for linkage on a non-decl.
8688
8689         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
8690
8691         * call.c (build_new_function_call): Lose space before paren in
8692         error message.
8693         (build_new_method_call): Likewise.
8694
8695         * typeck2.c (build_m_component_ref): Propagate quals from datum.
8696
8697 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8698
8699         * pt.c (check_explicit_specialization): Propagate default
8700         function arguments to explicit specializations.
8701
8702 2000-12-13  DJ Delorie  <dj@redhat.com>
8703
8704         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
8705         and <? operators.
8706
8707 2000-12-08  Jason Merrill  <jason@redhat.com>
8708
8709         * error.c (dump_function_name): Don't let the user see __comp_ctor.
8710
8711         Clean up copy-initialization in overloading code.
8712         * call.c (build_user_type_conversion_1): Die if we are asked to
8713         convert to the same or a base type.
8714         (implicit_conversion): Avoid doing so.  Lose reference binding code.
8715         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
8716         direct-initialization.  Also do direct-init part of copy-init.
8717         (build_user_type_conversion): Don't provide context to convert_like.
8718         * cvt.c (ocp_convert): build_user_type_conversion will now provide
8719         the constructor call for copy-init.
8720
8721         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
8722         instantiation of a member template.
8723         (do_decl_instantiation): Not here.
8724
8725 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
8726
8727         * class.c (check_field_decls): Don't special case anonymous
8728         fields in error messages.
8729         (note_name_declared_in_class): Use %D on diagnostic.
8730
8731         * tree.c (pod_type_p): Use strip_array_types.
8732         (cp_valid_lang_attribute): Likewise.
8733         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
8734         multiple evaluations.
8735         (cp_has_mutable_p): Use strip_array_types.
8736
8737 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
8738
8739         * cp-tree.h (sufficient_parms_p): Declare new function.
8740         * call.c (sufficient_parms_p): New function, broken out of ...
8741         (add_function_candidate): ... here. Use it.
8742         (add_conv_candidate): Use it.
8743         * decl.c (grok_ctor_properties): Use it.
8744
8745 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
8746
8747         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
8748
8749 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
8750
8751         * decl2.c (lang_decode_option): Handle -Wformat-security.
8752
8753 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8754
8755         * pt.c (verify_class_unification): New function.
8756         (get_class_bindings): Use it.
8757         (try_class_unification): Tidy.
8758         (unify): Handle when argument of a template-id is not
8759         template parameter dependent.
8760         (template_args_equal): Handle when TREE_CODE's do not match.
8761
8762 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
8763
8764         * lang-specs.h (c++): When invoking the stand-alone preprocessor
8765         for -save-temps, pass all relevant -Defines to it, and then don't
8766         pass them to cc1plus.
8767
8768 2000-12-05  Will Cohen  <wcohen@redhat.com>
8769
8770         * decl.c (finish_case_label): Cleared
8771         more_cleanups_ok in surrounding function scopes.
8772         (define_label): Likewise.
8773
8774 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
8775
8776         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
8777         (get_matching_virtual): Remove.
8778         (look_for_overrides): Declare new function.
8779         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
8780         DECL_VINDEX here.
8781         * class.c (check_for_override): Move base class iteration code
8782         to look_for_overrides.
8783         * search.c (next_baselink): Remove.
8784         (get_virtuals_named_this): Remove.
8785         (get_virtual_destructor): Remove.
8786         (tree_has_any_destructors_p): Remove.
8787         (struct gvnt_info): Remove.
8788         (check_final_overrider): Remove `virtual' from error messages.
8789         (get_matching_virtuals): Remove. Move functionality to ...
8790         (look_for_overrides): ... here, and ...
8791         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
8792         to be overriding.
8793
8794 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
8795
8796         * typeck.c (get_delta_difference): If via a virtual base,
8797         return zero.
8798         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
8799         adjustment.
8800
8801 2000-12-04  Richard Henderson  <rth@redhat.com>
8802
8803         * error.c (dump_tree): Use output_add_string not OB_PUTS.
8804
8805 2000-12-04  Jason Merrill  <jason@redhat.com>
8806
8807         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
8808         (write_builtin_type): Pass intSI_type_node and the like through
8809         type_for_mode.
8810         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
8811         Pass intSI_type_node and the like through type_for_mode.
8812         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
8813         * pt.c (tsubst, unify): Likewise.
8814         * tree.c (walk_tree): Likewise.
8815         * error.c (dump_type): Likewise.
8816         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
8817
8818         * Make-lang.in: Tweak top comment for emacs.
8819         (cp/TAGS): Restore.
8820
8821         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
8822
8823         * class.c (clone_function_decl): Robustify.
8824
8825 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
8826
8827         * decl.c (store_bindings): Only search in the non modified
8828         old_bindings for duplicates.
8829
8830 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
8831
8832         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
8833         TYPE_POLYMORPHIC_P.
8834
8835         * typeck.c (build_static_cast): Remove unused variable.
8836
8837 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8838
8839         * pt.c: Fix typo in comment.
8840
8841 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
8842
8843         * decl2.c (warn_format): Remove definition.
8844         (lang_decode_option): Handle -Wformat-nonliteral,
8845         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
8846
8847 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
8848
8849         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
8850         (init_decl_processing): Don't create string_type_node,
8851         const_string_type_node, wint_type_node, intmax_type_node,
8852         uintmax_type_node, default_function_type, ptrdiff_type_node and
8853         unsigned_ptrdiff_type_node.  Adjust position of call to
8854         c_common_nodes_and_builtins.
8855         (identifier_global_value): New function.
8856
8857 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
8858
8859         * call.c (standard_conversion): Reject pointer to member
8860         conversions from ambiguous, inaccessible or virtual bases.
8861         * typeck.c (build_static_cast): Don't check pointers to members
8862         specially.
8863
8864 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
8865
8866         * method.c (do_build_copy_constructor): Preserve cv
8867         qualifications when accessing source object members.
8868         (do_build_assign_ref): Likewise. Remove separate diagnostics for
8869         unnamed fields.
8870
8871 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
8872
8873         * method.c (do_build_assign_ref): Construct appropriately
8874         CV-qualified base reference. Don't allow const casts in base
8875         conversion.
8876
8877 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
8878
8879         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
8880         incomplete return type.
8881
8882 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8883
8884         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
8885         * semantics.c (finish_base_specifier): Accept a _TYPE not a
8886         _DECL.
8887
8888 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8889
8890         * spew.c (yyerror): Cope if yylval.ttype is NULL.
8891
8892 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8893
8894         * decl.c (grokdeclarator): Diagnose undefined template contexts.
8895
8896 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8897
8898         * decl.c (grokdeclarator): Do type access control on friend
8899         class.
8900
8901 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
8902
8903         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
8904         bison parser ickiness.
8905         * pt.c (tsubst_friend_function): Enter namespace scope when
8906         tsubsting the function name.
8907         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
8908
8909 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
8910
8911         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
8912         * cvt.c (cp_convert_to_pointer): Add force parameter.
8913         Allow conversions via virtual base if forced.
8914         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
8915         (ocp_convert): Likewise.
8916         * search.c (binfo_from_vbase): Return the virtual base's binfo.
8917         * typeck.c (get_delta_difference): Adjust handling of virtual
8918         bases.
8919
8920 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
8921
8922         * tree.c (struct list_hash): Remove.
8923         (list_hash_table): Make it be an htab.
8924         (struct list_proxy): New type.
8925         (list_hash_eq): New function.
8926         (list_hash_pieces): Renamed from ...
8927         (list_hash): ... this.
8928         (list_hash_lookup): Remove.
8929         (list_hash_add): Remove.
8930         (hash_tree_cons): Use the generic hashtable.
8931         (mark_list_hash): Remove.
8932         (init_tree): Create the hashtable.
8933
8934 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
8935
8936         * method.c (build_mangled_C9x_name): Rename to
8937         build_mangled_C99_name.  Change C9X references in comments to
8938         refer to C99.
8939
8940 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
8941
8942         * parse.y (unary_expr): Move VA_ARG from here ...
8943         (primary): ... to here.
8944
8945 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
8946
8947         * semantics.c (finish_id_expr): If type is error_mark, return
8948         error_mark.
8949
8950 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
8951
8952         * pt.c (lookup_template_class): Simplify loop exit constructs.
8953         Cope when there is no partial instantiation of a template
8954         template member.
8955
8956 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
8957
8958         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
8959
8960 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
8961
8962         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
8963         prefix.
8964
8965         * pt.c (do_decl_instantiate): Explicitly clone constructors and
8966         destructors that haven't already been cloned.
8967
8968 2000-11-20  Richard Henderson  <rth@redhat.com>
8969
8970         * parse.y (yyparse_1): Rename the parser entry point.
8971
8972 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
8973
8974         * mangle.c (write_name): Use <unscoped-name> for names directly in
8975         function scope.
8976         (write_unscoped_name): Accept names directly in function scope.
8977
8978 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
8979
8980         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
8981         * parse.y (extdef): Add EXPORT reduction.
8982         * spew.c (yylex): Don't skip export here.
8983
8984 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
8985
8986         * decl.c (init_decl_processing): Correct name of pure virtual
8987         function under the new ABI.
8988         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
8989         (throw_bad_typeid): Likewise for bad typeid function.
8990
8991 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
8992
8993         * decl.c (grokparms): Don't even function types of `void' type,
8994         either.
8995         * mangle.c (write_type): Don't crash when confronted with the
8996         error_mark_node.
8997
8998         * decl.c (grokparms): Don't create parameters of `void' type.
8999
9000 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
9001
9002         * lex.c (mark_impl_file_chain): Delete.
9003         (init_parse): Remove call to ggc_add_string_root.  No need to
9004         ggc_strdup a string constant.  Do not add impl_file_chain to GC
9005         roots.
9006         (handle_pragma_implementation): No need to ggc_strdup main_filename.
9007
9008 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9009
9010         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
9011
9012 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9013
9014         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
9015         * decl.c (grokdeclarator): Don't reject void parms here.
9016         (require_complete_types_for_parms): Simplify, use
9017         complete_type_or_else.
9018         (grokparms): Remove bitrot. Remove funcdef parm.
9019         Deal with ellipsis parm lists here.
9020         * semantics.c (finish_parmlist): Don't append void_list_node
9021         here. Set PARMLIST_ELLIPSIS_P.
9022
9023 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9024
9025         * typeck2.c (incomplete_type_error): Reorganize to avoid
9026         excessive diagnostics.
9027
9028 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
9029
9030         * lex.c (struct impl_files, internal_filename): Constify a char *.
9031
9032 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
9033
9034         * mangle.c (write_special_name_constructor): Don't generate
9035         assembler junk when confronted with an old-style constructor.
9036         (write_special_name_destructor): Likewise.
9037         (mangle_decl_string): Do it here instead.
9038
9039 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
9040
9041         * call.c (op_error): Make error messages clearer.
9042
9043 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
9044
9045         * decl.c (wrapup_globals_for_namespace): Don't mark things
9046         TREE_ASM_WRITTEN when they're not.
9047
9048 2000-11-15  Jason Merrill  <jason@redhat.com>
9049
9050         * typeck2.c (friendly_abort): Uncount the error before handing
9051         off to fancy_abort.
9052
9053 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
9054
9055         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
9056
9057 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
9058
9059         * class.c (build_vtbl_initializer): Fix typo in comment.
9060         * typeck.c (expr_sizeof): Don't crash on errors.
9061
9062 2000-11-14  Jim Wilson  <wilson@redhat.com>
9063
9064         * lang-specs.h: Add %2 after %(cc1_options).
9065
9066 2000-11-14  Richard Henderson  <rth@redhat.com>
9067
9068         * typeck.c (c_sizeof): Be strict about casting result value
9069         back to c_size_type_node.
9070         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
9071
9072 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9073
9074         * typeck.c (build_unary_op): Use boolean_increment from
9075         c-common.c, moving the relevant code there.
9076
9077 2000-11-11  Jason Merrill  <jason@redhat.com>
9078
9079         * typeck.c (mark_addressable): Don't call put_var_into_stack.
9080
9081         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
9082         in inlines.
9083
9084 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9085
9086         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
9087         * lex.c (copy_lang_decl): Likewise.
9088
9089 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
9090
9091         * dump.c (cp_dump_tree): Don't dump function bodies here.
9092
9093         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
9094         (dump.o): Update dependency list.
9095         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
9096         (flag_dump_translation_unit): Likewise.
9097         (CP_TYPE_QUALS): Adjust definition.
9098         (DECL_C_BIT_FIELD): Remove.
9099         (SET_DECL_C_BIT_FIELD): Likewise.
9100         (CLEAR_DECL_C_BIT_FIELD): Likewise.
9101         (add_maybe_template): Likewise.
9102         (strip_array_types): Likewise.
9103         (dump_node_to_file): Likewise.
9104         (cp_dump_tree): New function.
9105         * decl.c (init_decl_processing): Set lang_dump_tree.
9106         * decl2.c (flag_dump_translation_unit): Remove.
9107         * dump.c: Move most of it to ../c-dump.c.
9108         (cp_dump_tree): New function.
9109         * pt.c (add_maybe_template): Remove.
9110         * typeck.c (strip_array_types): Likewise.
9111
9112 2000-11-07  Eric Christopher  <echristo@redhat.com>
9113
9114         * decl.c (init_decl_processing): Change definition of
9115         __wchar_t to wchar_t.  Remove artificial declaration of
9116         wchar_t.
9117         * lex.c: Change instances of __wchar_t to wchar_t.
9118
9119 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
9120
9121         * lex.c (do_identifier): Don't lookup_name for operators.
9122         * parse.y (operator): Save looking_for_typename.
9123         (unoperator): Restore it.
9124         * spew.c (frob_opname): Use nth_token for lookahead.
9125
9126 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
9127
9128         * decl.c (grok_op_properties): Always use coerce_new_type and
9129         coerce_delete_type.
9130         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
9131         exception specification. Tidy up.
9132         (coerce_delete_type): Preserve exception specification. Tidy up.
9133
9134 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
9135
9136         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
9137         (push_binding_level), error.c (cp_tree_printer), pt.c
9138         (process_partial_specialization, tsubst_template_arg_vector),
9139         search.c (lookup_member): Use memset () instead of bzero ().
9140
9141 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
9142
9143         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
9144
9145 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
9146
9147         * Make-lang.in (c++.distdir): Remove.
9148
9149 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
9150
9151         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
9152         declarations from different namespaces to be combined.
9153
9154 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
9155
9156         * decl.c: Include tm_p.h.
9157
9158 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
9159
9160         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
9161
9162 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9163
9164         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
9165         (build_overload_value), repo.c (open_repo_file), xref.c
9166         (open_xref_file): Use strchr () and strrchr () instead of index ()
9167         and rindex ().
9168
9169 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
9170
9171         * call.c (build_over_call): Call fold on the CALL_EXPR.
9172
9173 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
9174
9175         * error.c (dump_template_decl): Separate template hearders with
9176         space not comma.
9177
9178 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
9179
9180         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
9181         TS_* flags with corresponding TFF_*.  Adjust prototypes of
9182         functions (which used to take a tree_string_flags) to take an int.
9183
9184         * cp-tree.h (enum tree_string_flags): Remove
9185         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
9186         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
9187         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
9188         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
9189         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
9190         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
9191         (type_as_string, decl_as_string, expr_as_string,
9192         context_as_string): Adjust prototype.
9193
9194         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
9195         instead of TS_PLAIN.
9196
9197         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
9198         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
9199         plain `0'.
9200
9201 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
9202
9203         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
9204         (linkage_kind): New enumeration.
9205         (decl_linkage): New function.
9206         * decl2.c (comdat_linkage): Extend comment.
9207         * error.c (dump_function_decl): Print the arguments used to
9208         instantiate a template, even when not printing the type of the
9209         function.
9210         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
9211         not TREE_PUBLIC, to test for external linkage.
9212         * tree.c (decl_linkage): New function.
9213
9214 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
9215
9216         * pt.c (instantiate_decl): Always instantiate static data members
9217         initialized in-class.
9218
9219 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
9220
9221         * Make-lang.in: Move all build rules here from Makefile.in,
9222         adapt to new context.  Wrap all rules that change the current
9223         directory in parentheses.  Expunge all references to $(P).
9224         When one command depends on another and they're run all at
9225         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
9226         all object-file generation rules.  Delete obsolete variables.
9227
9228         * Makefile.in: Delete.
9229         * config-lang.in: Delete outputs= line.
9230
9231 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
9232
9233         * error.c (dump_function_decl): Print no space between
9234         `ptr-operator' the `type-specifier' of the return type.
9235         (dump_type_prefix): Make sure we put space at the appropriate
9236         place.
9237
9238 2000-10-23  Jason Merrill  <jason@redhat.com>
9239
9240         * call.c (equal_functions): Also call decls_match for extern "C" fns.
9241
9242 2000-10-22  Jason Merrill  <jason@redhat.com>
9243
9244         * call.c (build_conditional_expr): Use ocp_convert to force
9245         rvalue conversion.
9246
9247 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
9248
9249         * call.c (standard_conversion): Use RVALUE_CONVs for all
9250         expressions that satisfy lvalue_p, not just those that satisfy
9251         real_lvalue_p.
9252
9253         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
9254
9255         * typeck.c (c_sizeof): Return an expression of `size_t' type,
9256         not one with TYPE_IS_SIZETYPE set.
9257         (dubious_conversion_warnings): Remove special-case code.
9258
9259 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
9260
9261         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
9262         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
9263         (dump_type_prefix): Print vector-of-int as 'int vector'.
9264         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
9265         * tree.c (walk_tree): Handle VECTOR_TYPE.
9266
9267         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
9268
9269 2000-10-21  Jason Merrill  <jason@redhat.com>
9270
9271         * parse.y (operator): Set got_object from got_scope.
9272         Set looking_for_typename.
9273         * decl.c (lookup_name_real): Clear val after setting from_obj.
9274         Reorganize diagnostic.
9275
9276 2000-10-20  Jason Merrill  <jason@redhat.com>
9277
9278         * tree.c (walk_tree): Don't walk into default args.
9279
9280         * error.c (dump_expr): Use host_integerp.
9281
9282 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
9283
9284         * typeck2.c (abstract_virtuals_error): Use "because" instead of
9285         "since" in error message.
9286
9287 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9288
9289         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
9290
9291 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
9292
9293         * decl.c (revert_static_member_fn): Fixed typo.
9294
9295 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
9296
9297         * class.c (subobject_offset_fn): New type.
9298         (dfs_record_base_offsets): Remove.
9299         (record_base_offsets): Likewise.
9300         (dfs_search_base_offsets): Likewise.
9301         (record_subobject_offset): New function.
9302         (check_subobject_offset): Likewise.
9303         (walk_subobject_offsets): Likewise.
9304         (record_subobject_offsets): Likewise.
9305         (layout_conflict_p): Reimplement.
9306         (layout_nonempty_base_or_field): Correct handling of type
9307         conflicts during layout.
9308         (layout_empty_base): Likewise.
9309         (build_base_field): Adjust to handle new representation of empty
9310         base offset table.
9311         (build_base_fields): Likewise.
9312         (layout_virtual_bases): Likewise.
9313         (splay_tree_compare_integer_csts): New function.
9314         (layout_class_type): Use a splay_tree, rather than a varray, to
9315         represent the offsets of empty bases.
9316
9317         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
9318         * decl.c (select_decl): Don't return declarations that are
9319         DECL_ANTICIPATED.
9320
9321 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
9322
9323         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
9324         (fake_std_node): New macro.
9325         * decl.c (in_std): Rename to ...
9326         (in_fake_std): ... this.
9327         (flag_no_builtin): Remove.
9328         (flag_no_nonansi_builtin): Likewise.
9329         (walk_namespaces_r): Use fake_std_node.
9330         (push_namespace): Use std_identifier.
9331         (pop_namespace): Use in_fake_std.
9332         (lookup_name_real): Use fake_std_node.
9333         (init_decl_processing): When -fhonor-std, create the `std'
9334         namespace.  Don't create a dummy fake_std_node in that case.
9335         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
9336         (builtin_function): Put builtins whose names don't begin
9337         with `_' in the std namespace.
9338         * decl2.c (flag_no_builtin): Remove.
9339         (flag_no_nonansi_builtin): Likewise.
9340         (set_decl_namespace): Use fake_std_node.
9341         (validate_nonmember_using_decl): Likewise.
9342         (do_using_directive): Likewise.
9343         (handle_class_head): Likewise.
9344         * dump.c (dequeue_and_dump): Likewise.
9345         * except.c (init_exception_processing): Use std_identifier.
9346         * init.c (build_member_call): Use fake_std_node.
9347         * rtti.c (init_rtti_processing): Use std_identifier.
9348
9349 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
9350
9351         * cp-tree.h (back_end_hook): Remove declaration.
9352         * decl2.c (back_end_hook): Remove definition.
9353
9354         * dump.c (dequeue_and_dump): Dump TREE_USED.
9355
9356 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
9357
9358         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
9359
9360 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
9361
9362         * decl.c (WINT_TYPE): Define.
9363         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
9364         c_size_type_node, signed_size_type_node and wint_type_node.
9365
9366 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
9367
9368         * decl2.c (warn_missing_format_attribute): New variable.
9369         (lang_decode_option): Decode -Wmissing-format-attribute.
9370
9371 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
9372
9373         * typeck.c (qualify_type): Remove.
9374         (composite_pointer_type): Fix handling of conversions to `cv void*'.
9375
9376 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9377
9378         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
9379
9380 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9381
9382         * Makefile.in (parse.c, parse.h): Create atomically.
9383
9384 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
9385
9386         * class.c (current_obstack): Remove.
9387         * decl.c (ggc_p): Remove.
9388         (start_decl): Don't use decl_tree_cons.
9389         (grokdeclarator): Don't use build_decl_list.
9390         (start_function): Don't use decl_tree_cons.
9391         (finish_function): Don't mess with obstacks.
9392         * decl2.c (grok_x_components): Don't use build_decl_list.
9393         * lex.c (make_call_declarator): Don't call decl_tree_cons.
9394         (implicitly_declare_fn): Don't call build_decl_list.
9395         * parse.y (frob_specs): Don't call build_decl_list or
9396         decl_tree_cons.
9397         (expr_or_declarator_intern): Don't call decl_tree_cons.
9398         (primary): Don't call build_decl_list.
9399         (fcast_or_absdcl): Likewise.
9400         (typed_declspecs): Don't call decl_tree_cons.
9401         (reserved_declspecs): Don't call build_decl_list.
9402         (declmods): Likewise.
9403         (reserved_typespecquals): Likewise.
9404         (aggr): Likewise.
9405         (new_type_id): Likewise.
9406         (cv_qualifiers): Likewise.
9407         (after_type_declarator_intern): Likewise.
9408         (notype_declarator_intern): Likewise.
9409         (absdcl_intern): Likewise.
9410         (named_parm): Likewise.
9411         * pt.c (most_specialized_class): Likewise.
9412         * repo.c (temporary_obstack): Make it a structure, not a pointer.
9413         (init_repo): Initialize it.
9414         * search.c (current_obstack): Remove.
9415         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
9416
9417 2000-10-09  Richard Henderson  <rth@cygnus.com>
9418
9419         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
9420         (c++ language support bits for libgcc): Remove.
9421         (c++.clean): Remove cplib2.txt cleanup.
9422         * config-lang.in (headers, lib2funcs): Remove.
9423
9424         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
9425         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
9426         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
9427         * inc/new.h, inc/typeinfo: Remove files.
9428
9429 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
9430
9431         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
9432         defined.
9433         (init_decl_processing): Initialize intmax_type_node and
9434         uintmax_type_node.
9435
9436 2000-10-06  Richard Henderson  <rth@cygnus.com>
9437
9438         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
9439         (original_result_rtx): Remove.
9440         * decl.c (save_function_data): Don't clear x_result_rtx.
9441         (mark_lang_function): Don't mark it either.
9442         * expr.c (fixup_result_decl): Remove.
9443         * semantics.c (genrtl_named_return_value): Frob the return decl
9444         before calling emit_local_var.
9445         (genrtl_finish_function): Don't call fixup_result_decl.
9446         Always emit the jump to return_label.
9447
9448 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
9449
9450         * pt.c (lookup_template_class): Set current access for enum.
9451         (tsubst_enum): Set file & line for enum decl.
9452
9453         * spew.c (yylex): Remove unused variable.
9454
9455 2000-10-05  Richard Henderson  <rth@cygnus.com>
9456
9457         * semantics.c (genrtl_finish_function): Don't init or check
9458         can_reach_end; remove noreturn and return value checks.
9459
9460 2000-10-05  Tom Tromey  <tromey@cygnus.com>
9461
9462         * init.c (build_java_class_ref): Use `build_static_name' with a
9463         suffix, not a prefix, to build the class object's name.
9464
9465 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
9466
9467         * cp-tree.h (access_kind): Fix comment typo.
9468         * decl2.c (grokfield): Fix diagnostic typo.
9469         * semantics.c (finish_template_type): Fix comment typo.
9470         (finish_qualified_object_call_expr): Likewise.
9471
9472 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
9473
9474         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
9475         tsubsting fails.
9476
9477 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
9478
9479         * spew.c (frob_id): New static function.
9480         (frob_opname): Use it.
9481         (yylex): Use it.
9482
9483 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
9484
9485         * decl.c (lang_mark_false_label_stack): Remove.
9486         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
9487
9488 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
9489
9490         * gxxint.texi: Use @email for formatting email addresses.
9491
9492 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
9493
9494         * error.c: Remove direct obstack manipulation.  Replace with
9495         output_buffer-based formatting.  Adjust calls to removed macros.
9496         (obstack_chunk_alloc, obstack_chunk_free): Remove.
9497         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
9498         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
9499
9500 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
9501
9502         * ir.texi: Move to ../c-tree.texi.
9503
9504 2000-09-20  Jason Merrill  <jason@redhat.com>
9505
9506         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
9507
9508 2000-09-21  Andreas Jaeger  <aj@suse.de>
9509
9510         * errfn.c: Move declaration of cp_printer and cp_printers to ...
9511         * cp-tree.h: ... here.
9512
9513         * error.c: Remove declaration of cp_printer.
9514
9515 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
9516
9517         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
9518
9519 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
9520
9521         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
9522         users.
9523
9524 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
9525
9526         * decl.c (start_function): Robustify.
9527
9528 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9529
9530         * cp-tree.h (check_function_format): Accept a `status' parameter.
9531
9532         * call.c, typeck.c: Updates calls to `check_function_format'.
9533
9534 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
9535
9536         * decl2.c (handle_class_head): Always push some scope even
9537         in the error case.
9538
9539 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
9540
9541         * cp-tree.h (struct cp_language_function): Remove
9542         x_scope_stmt_stack and name_declared.
9543         (current_scope_stmt_stack): Remove.
9544         (function_name_declared_p): New macro.
9545         (struct lang_decl_flags): Use c_lang_decl as a base class.
9546         (context): Remove.
9547         (struct lang_decl): Replace saved_tree with context.
9548         (DECL_FRIEND_CONTEXT): Adjust accordingly.
9549         (SET_DECL_FRIEND_CONTEXT): Likewise.
9550         (DECL_VIRTUAL_CONTEXT): Likewise.
9551         (DECL_SAVED_TREE): Remove.
9552         (C_DECLARED_LABEL_FLAG): Likewise.
9553         (cplus_expand_expr_stmt): Don't declare.
9554         (add_decl_stmt): Likewise.
9555         (add_scope_stmt): Likewise.
9556         * decl.c (mark_stmt_tree): Remove.
9557         (case_compare): Likewise.
9558         (finish_case_label): Use c_add_case_label.
9559         (init_decl_processing): Set more language-specific hooks.
9560         (build_enumerator): Fix typo in comment.
9561         (cplus_expand_expr_stmt): Remove.
9562         (mark_lang_function): Use mark_c_language_function.
9563         (lang_mark_tree): Use c_mark_lang_decl.
9564         * decl2.c: Change order of inclusion.
9565         * except.c: Likewise.
9566         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
9567         back on c_expand_expr.
9568         * friend.c: Include expr.h.
9569         * init.c: Change order of inclusion.
9570         * Makefile.in: Update dependencies.
9571         * lex.h (free_lang_decl_chain): Remove.
9572         * optimize.c (maybe_clone_body): Use function_name_declared_p.
9573         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
9574         it doesn't exist.
9575         (instantiate_decl): Use function_name_declared_p.
9576         * semantics.c (lang_expand_expr_stmt): Remove.
9577         (set_current_function_name_declared): Likewise.
9578         (current_function_name_declared): Likewise.
9579         (begin_compound_stmt): Use function_name_declared_p.
9580         (add_decl_stmt): Remove.
9581         (setup_vtbl_ptr): Use function_name_declared_p.
9582         (add_scope_stmt): Remove.
9583         (current_scope_stmt_stack): New function.
9584         (cp_expand_stmt): Don't handle SCOPE_STMTs.
9585         (expand_body): Use function_name_declared_p.
9586         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
9587         * typeck.c: Change order of includes.
9588         (convert_sequence): Remove.
9589
9590 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
9591
9592         * lex.c (reswords): Add _Complex.
9593
9594 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9595
9596         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
9597
9598 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
9599
9600         * init.c (begin_init_stmts): Don't use // comments.
9601
9602 2000-09-12  Jason Merrill  <jason@redhat.com>
9603
9604         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
9605         all non-extern arrays.
9606
9607         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
9608         typenames, too.  Downgrade complaint to pedwarn.
9609         (xref_tag): Warn about surprising behavior of 'friend struct T'.
9610         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
9611         'class This::Inherited'.
9612
9613 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
9614
9615         * decl.c (finish_case_label): Given the LABEL_DECL a
9616         DECL_CONTEXT.
9617
9618 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
9619
9620         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
9621         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
9622         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
9623         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
9624         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
9625         New macros.
9626         (sorry_for_unsupported_tree, print_scope_operator,
9627         print_left_paren, print_right_paren, print_left_bracket,
9628         print_right_bracket, print_whitespace): Likewise.
9629         (aggr_variety): Rename to class_key_or_enum.
9630         (print_type): Rename to print_type_id.
9631         (print_type_specifier_seq, print_simple_type_specifier,
9632         print_elaborated_type_specifier,
9633         print_rest_of_abstract_declarator,
9634         print_parameter_declaration_clause, print_exception_specification,
9635         print_nested_name_specifier, print_template_id,
9636         typedef_original_name,  print_template_argument_list_start,
9637         print_template_argument_list_end): New functions.
9638
9639 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
9640
9641         * ir.texi: Add more documentation.
9642
9643 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
9644
9645         * cp-tree.h (struct saved_scope): Remove x_function_parms.
9646         (current_function_parms): Don't define.
9647         (struct cp_language_function): Remove parms_stored.
9648         (current_function_just_assigned_this): Don't define.
9649         (current_function_parms_stored): Likewise.
9650         (static_ctors): Declare.
9651         (static_dtors): Likewise.
9652         (SF_EXPAND): Don't define.
9653         (expand_start_early_try_stmts): Remove declaration.
9654         (store_parm_decls): Likewise.
9655         * decl.c (static_ctors): Don't declare.
9656         (static_dtors): Likewise.
9657         (struct binding_level): Remove this_block.
9658         (poplevel): Remove dead code.
9659         (set_block): Likewise.
9660         (mark_binding_level): Don't mark this_block.
9661         (mark_saved_scope): Don't mark x_function_parms.
9662         (init_decl_processing): Don't add current_function_parms as a GC
9663         root.
9664         (check_function_type): Change prototype.
9665         (start_function): Remove RTL-generation code.
9666         (expand_start_early_try_stmts): Remove.
9667         (store_parm_decls): Give it internal linkage.  Remove
9668         RTL-generation code.
9669         (finish_function): Remove RTL-generation code.
9670         * decl2.c (static_ctors): Fix formatting.
9671         (static_dtors): Likewise.
9672         * method.c (use_thunk): Don't call store_parm_decls.
9673         (synthesize_method): Likewise.
9674         * optimize.c (maybe_clone_body): Likewise.
9675         * parse.y (fn.def2): Likewise.
9676         (.set_base_init): Likewise.
9677         (nodecls): Likewise.
9678         * pt.c (instantiate_decl): Likewise.
9679         * rtti.c (synthesize_tinfo_fn): Likewise.
9680         * semantics.c (genrtl_try_block): Simplify.
9681         (expand_body): Use genrtl_start_function and
9682         genrtl_finish_function.
9683         (genrtl_start_function): New function.
9684         (genrtl_finish_function): Likewise.
9685
9686 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
9687
9688         * error.c (cp_tree_printer, case 'P'): Append break.
9689
9690 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
9691
9692         * cp-tree.h (frob_opname): Declare.
9693         * parse.y (saved_scopes): New static variable.
9694         (cp_parse_init): Adjust.
9695         (do_id): If lastiddecl is NULL, do do_identifier.
9696         (operator): Save scope information.
9697         (unoperator): New reduction. Restore scope information.
9698         (operator_name): Append unoperator. Call frob_opname.
9699         * spew.c (frob_opname): Define.
9700
9701 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
9702
9703         * decl.c, rtti.c: Include defaults.h if not already included.
9704         Don't define the *_TYPE_SIZE macros.
9705
9706 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
9707
9708         * cp-tree.h (push_switch): Change prototype.
9709         (check_cp_case_value): Remove declaration.
9710         (decl_constant_value): Likewise.
9711         * decl.c (struct cp_switch): Add switch_stmt and cases.
9712         (case_compare): New function.
9713         (push_switch): Set switch_stmt.  Initialize cases.
9714         (pop_switch): Clean up cases.
9715         (define_case_label): Rename to ...
9716         (finish_case_label): ... this.  Do semantic analysis for case
9717         labels here.
9718         (start_function): Correct comment.
9719         * decl2.c (check_cp_case_value): Remove.
9720         * expr.c (do_case): Remove.
9721         * pt.c (tsubst_expr): Adjust call to finish_case_label.
9722         * semantics.c (genrtl_do_poplevel): Remove declaration.
9723         (RECHAIN_STMTS): Remove.
9724         (finish_break_stmt): Use build_break_stmt.
9725         (finish_continue_stmt): Use build_continue_stmt.
9726         (finish_switch_cond): Adjust condition here, rater than in
9727         c_expand_start_case.
9728         (finish_case_label): Remove.
9729         * typeck.c (c_expand_return): Remove.
9730         (c_expand_start_case): Likewise.
9731
9732 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
9733
9734         * ir.texi: Document type nodes.
9735
9736 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
9737
9738         * cp-tree.h (init_cp_semantics): Declare.
9739         (genrtl_try_block): Don't declare.
9740         (genrtl_handler): Likewise.
9741         (genrtl_catch_block): Likewise.
9742         (genrtl_ctor_stmt): Likewise.
9743         (genrtl_subobject): Likewise.
9744         (genrtl_do_poplevel): Likewise.
9745         (genrtl_named_return_value): Likewise.
9746         * lex.c (init_parse): Call init_cp_semantics.
9747         * semantics.c (genrtl_try_block): Give it internal linkage.
9748         (genrtl_handler): Likewise.
9749         (genrtl_catch_block): Likewise.
9750         (genrtl_ctor_stmt): Likewise.
9751         (genrtl_subobject): Likewise.
9752         (genrtl_do_poplevel): Likewise.
9753         (genrtl_named_return_value): Likewise.
9754         (lang_expand_stmt): Rename to ...
9755         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
9756         (init_cp_semantics): Define.
9757
9758         * decl.c (initialize_local_var): Remove RTL-generating code.
9759         * semantics.c (genrtl_try_block): Fix formatting.
9760
9761         Move statement-tree facilities from C++ to C front-end.
9762         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
9763         (void_zero_node): Remove.
9764         (stmt_tree): Likewise.
9765         (scope_chain): Adjust.
9766         (language_function): Rename to cp_language_function.
9767         (cp_function_chain): Adjust.
9768         (current_stmt_tree): Remove.
9769         (last_tree): Likewise.
9770         (last_expr_type): Likewise.
9771         (struct lang_decl): Adjust.
9772         (STMT_IS_FULL_EXPR_P): Remove.
9773         (add_tree): Remove.
9774         (begin_stmt_tree): Likewise.
9775         (finish_stmt_tree): Likewise.
9776         (walk_tree_fn): Likewise.
9777         (walk_stmt_tree): Likewise.
9778         * class.c (finish_struct): Replace use of add_tree with add_stmt.
9779         * decl.c (mark_stmt_tree): Adjust type.
9780         (init_decl_processing): Don't build void_zero_node.
9781         (initialize_local_var): Adjust usage of current_stmt_tree.
9782         (finish_enum): Use add_stmt, not add_tree.
9783         (save_function_data): Adjust use of language_function.
9784         (finish_constructor_body): Use add_stmt, not add_tree.
9785         (finish_destructor_body): Likewise.
9786         (push_cp_function_context): Adjust use of language_function.
9787         (pop_cp_function_context): Likewise.
9788         (mark_lang_function): Likewise.
9789         (mark_cp_function_context): Likewise.
9790         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
9791         (build_vec_init): Likewise.
9792         * semantics.c (SET_LAST_STMT): Remove.
9793         (RECHAIN_STMTS): Don't use it.
9794         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
9795         (current_stmt_tree): Define.
9796         (add_tree): Remove.
9797         (finish_goto_stmt): Use add_stmt, not add_tree.
9798         (finish_expr_stmt): Likewise.
9799         (begin_if_stmt): Likewise.
9800         (finish_then_clause): Likewise.
9801         (begin_while_stmt): Likewise.
9802         (begin_do_stmt): Likewise.
9803         (finish_return_stmt): Likewise.
9804         (begin_for_stmt): Likewise.
9805         (finish_break_stmt): Likewise.
9806         (finish_continue_stmt): Likewise.
9807         (begin_switch_stmt): Likewise.
9808         (finish_case_label): Likewise.
9809         (begin_try_block): Likewise.
9810         (begin_function_try_block): Likewise.
9811         (begin_handler): Likewise.
9812         (begin_catch_block): Likewise.
9813         (begin_compound_stmt): Likewise.
9814         (begin_asm_stmt): Likewise.
9815         (finish_asm_stmt): Likewise.
9816         (finish_label_stmt): Likewise.
9817         (add_decl_stmt): Likewise.
9818         (finish_subobject): Likewise.
9819         (finish_decl_cleanup): Likewise.
9820         (finish_named_return_value): Likewise.
9821         (setup_vtbl_ptr): Likewise.
9822         (add_scope_stmt): Likewise.
9823         (finish_stmt_expr): Likewise.
9824         (prune_unused_decls): Remove.
9825         (begin_stmt_tree): Likewise.
9826         (finish_stmt_tree): Likewise.
9827         (prep_stmt): Adjust use of current_stmt_tree.
9828         (lang_expand_stmt): Likewise.
9829         * tree.c (statement_code_p): Remove.
9830         (cp_statement_code_p): New function.
9831         (walk_stmt_tree): Remove.
9832         (init_tree): Set lang_statement_code_p.
9833
9834 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
9835
9836         Integrated preprocessor.
9837
9838         * Make-lang.in, Makefile.in: Remove all references to input.c,
9839         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
9840         * gxx.gperf, hash.h, input.c: Delete.
9841         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
9842         initialized properly.
9843
9844         * class.c (fixup_pending_inline): Take a tree, not a
9845         struct pending_inline *.  All callers changed.
9846         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
9847         RID_PROTECTED entries in ridpointers[] array here.
9848         * decl.c (duplicate_decls): Do not refer to struct
9849         pending_inline.
9850         (record_builtin_type, init_decl_processing): Use RID_MAX not
9851         CP_RID_MAX.
9852         (grokdeclarator): Use C_IS_RESERVED_WORD.
9853         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
9854         cpplib.
9855         (grok_x_components): Do not inspect pending_inlines chain.
9856
9857         * cp-tree.h (struct lang_identifier): Add rid_code entry.
9858         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
9859         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
9860         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
9861         TIME_IDENTIFIER_FILEINFO): Kill.
9862         Update prototypes.
9863         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
9864         single 32-bit word.
9865         * parse.y: Call do_pending_inlines unconditionally.
9866         reinit_parse_for_method is now snarf_method.  fn.defpen is no
9867         longer necessary.  Remove unnecessary <itype> annotation on
9868         SCOPE.  Do not refer to end_of_file or struct pending_inline.
9869         * semantics.c (begin_inline_definitions): Call
9870         do_pending_inlines unconditionally.
9871
9872         * lex.c: Remove all code now shared with C front end.
9873         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
9874         into the get_identifier table.  Rewrite pragma handling to
9875         work with the registry.  Move code to save tokens for later
9876         processing to spew.c.
9877
9878         * spew.c: Rewrite everything in terms of token streams instead
9879         of text.  Move routines here from lex.c / input.c as
9880         appropriate.  GC-mark trees hanging off the pending inlines
9881         chain.
9882
9883 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
9884
9885         * NEWS: Mention that the named return value extension has been
9886         deprecated.
9887         * cp-tree.h (original_result_rtx): Define.
9888         (TREE_REFERENCE_EXPR): Remove.
9889         (DECL_VPARENT): Likewise.
9890         (pushdecl_nonclass_level): Likewise.
9891         (store_return_init): Likewise.
9892         (reinit_lang_specific): Likewise.
9893         (genrtl_named_return_value): Change prototype.
9894         * decl.c (original_result_rtx): Remove.
9895         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
9896         Do not generate RTL for local variables here.
9897         (store_return_init): Remove.
9898         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
9899         store_return_init.
9900         (finish_named_return_value): Adjust accordingly.  Warn that this
9901         extension is deprecated.
9902         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
9903
9904 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9905
9906         * pt.c (type_unification_real): Replace switch with if.
9907         (unify): Tsubst non-type parms before comparing.
9908
9909 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9910
9911         * error.c (dump_typename): New function, broken out of ...
9912         (dump_type): ... here. Use it.
9913         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
9914
9915 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9916
9917         * init.c (build_offset_ref): Deal with namespace scoped
9918         TEMPLATE_ID_EXPRs.
9919
9920 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9921
9922         * class.c (resolve_address_of_overloaded_function): Add
9923         explanation message.
9924         * decl.c (define_case_label): Reformat explanation.
9925         * decl2.c (finish_static_data_member_decl): Likewise.
9926         (grokfield): Likewise.
9927         * friend.c (do_friend): Likewise.
9928
9929 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
9930
9931         * tree.c (walk_tree): Expose tail recursion.
9932         (walk_stmt_tree): New function.
9933         * cp-tree.h: Prototype walk_stmt_tree.
9934         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
9935         the BLOCKs directly.  If a BLOCK has no variables after
9936         pruning, discard it.
9937         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
9938         restore the line number.
9939
9940 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
9941
9942         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
9943         (pt.o): Remove dependency on HTAB_H.
9944         * cp-tree.h: Include hashtab.h.
9945         (walk_tree): Change prototype.
9946         (walk_tree_without_duplicates): New function.
9947         * decl.c (check_default_argument): Use it.
9948         * optimize.c (remap_decl): Adjust calls to walk_tree.
9949         (copy_body): Likewise.
9950         (expand_calls_inline): Likewise.
9951         (calls_setjmp_p): Use walk_tree_without_duplicates.
9952         * pt.c: Don't include hashtab.h.
9953         (for_each_template_parm): Use walk_tree_without_duplicates.
9954         * semantics.c (finish-stmt_tree): Likewise.
9955         (expand_body): Likewise.
9956         * tree.c (walk_tree): Add additional parameter.
9957         (walk_tree_without_duplicates): New function.
9958         (count_trees): Use it.
9959         (verify_stmt_tree): Adjust call to walk_tree.
9960         (find_tree): Use walk_tree_without_duplicates.
9961         (no_linkage_check): Likewise.
9962         (break_out_target_exprs): Adjust call to walk_tree.
9963         (cp_unsave): Likewise.
9964
9965 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9966
9967         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
9968         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
9969         * cp-tree.h (TYPE_BINFO): Adjust comment.
9970         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
9971         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
9972         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
9973         (TYPE_TEMPLATE_INFO): Likewise.
9974         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
9975         * class.c (push_nested_class): Likewise.
9976         * decl.c (lookup_name_real): Likewise.
9977         (grokdeclarator): Likewise.
9978         (grok_op_properties): Likewise.
9979         (xref_tag): Likewise.
9980         (xref_basetypes): Likewise.
9981         * decl2.c (constructor_name_full): Likewise.
9982         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
9983         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
9984         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
9985         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9986         (dump_type_suffix): Likewise.
9987         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
9988         instead.
9989         (get_aggr_from_typedef): Likewise.
9990         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
9991         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9992         (write_template_parm): Likewise.
9993         (write_template_template_parm): Check tree code instead of
9994         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9995         * method.c (build_overload_nested_name): Add
9996         BOUND_TEMPLATE_TEMPLATE_PARM.
9997         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
9998         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9999         * pt.c (convert_template_argument): Check tree code instead of
10000         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10001         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
10002         (for_each_template_parm): Adjust comment.
10003         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
10004         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10005         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
10006         template_args_equal to compare template template parameter cases.
10007         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10008         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
10009         instead.
10010         * tree.c (copy_template_template_parm): Decide whether to create
10011         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
10012         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10013         (copy_tree_r): Likewise.
10014         * typeck.c (comptypes): Likewise.  Check tree code instead of
10015         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10016
10017 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
10018
10019         * decl.c (finish_function): Move the code for handling functions
10020         marked with the constructor and destructor attributes inside the
10021         expand_p block.
10022
10023 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10024
10025         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
10026
10027 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10028
10029         * pt.c (lookup_template_class): Remove abort.
10030         * tree.c (get_type_decl): Allow error_mark_node.
10031
10032 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10033
10034         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
10035         TEMPLATE_ID_EXPRs.
10036
10037 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
10038
10039         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
10040         new ABI mangling.
10041
10042 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
10043
10044         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
10045         union tag mismatch error reporting.
10046
10047 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
10048
10049         * call.c (build_scoped_method_call): Check it is not a namespace.
10050
10051 2000-08-30  Jason Merrill  <jason@redhat.com>
10052
10053         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
10054
10055         * tree.c (bot_manip): Check TREE_CONSTANT rather than
10056         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
10057         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
10058
10059         * decl.c (start_function): Always call make_function_rtl.
10060
10061 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
10062
10063         * semantics.c (prune_unused_decls): New function.
10064         (finish_stmt_tree): Call it via walk_tree.
10065
10066 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
10067
10068         * class.c (build_secondary_vtable): Constify a char *.
10069         * decl.c (init_decl_processing): Initialize function_id_node,
10070         pretty_function_id_node, and func_id_node.
10071         * input.c (struct input_source): Constify 'str'.
10072         (feed_input): Constify first argument.
10073         * mangle.c (write_identifier): Constify argument.
10074         * pt.c (mangle_class_name_for_template): Constify argument.
10075
10076 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
10077
10078         * typeck.c (mark_addressable): Remove code that pokes around in
10079         RTL.
10080
10081 2000-08-28  Jason Merrill  <jason@redhat.com>
10082
10083         * lex.c (file_name_nondirectory): Move to toplev.c.
10084
10085         * cp-tree.h (LOCAL_CLASS_P): New macro.
10086         * class.c (finish_struct_1): Use it.
10087
10088 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
10089
10090         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
10091         (write_encoding): Pass another argument to write_name.
10092         (write_name): Add ignore_local_scope parameter.  Fix handling of
10093         local names.
10094         (write_nested_name): Use write_unqualified_name.
10095         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
10096         (write_template_prefix): Use write_unqualified_name.
10097         (write_component): Remove.
10098         (write_local_name): Add parameter.  Use direct local entity to
10099         discriminator calculation.
10100         (write_class_enum_type): Pass another argument to write_name.
10101         (write_template_template_arg): Likewise.
10102         (make_guard_variable): Likewise.
10103
10104 2000-08-27  Jason Merrill  <jason@redhat.com>
10105
10106         * decl.c (pushdecl): Matching decls for local externs are found in
10107         the current level.  Propagate linkage information from previous
10108         declarations.
10109
10110 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10111
10112         * ir.texi (Expressions): Fix typo.
10113
10114 2000-08-25  Greg McGary  <greg@mcgary.org>
10115
10116         * tree.c (init_tree): Use ARRAY_SIZE.
10117
10118 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
10119
10120         * error.c (cp_tree_printer): Rework.
10121
10122 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
10123
10124         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
10125         dyn-string.o.
10126         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
10127         (cp-demangle.o): Remove target.
10128         (dyn-string.o): Likewise.
10129
10130         * decl.c (grokfndecl): Require that `main' return an `int'.
10131         * mangle.c (write_encoding): Don't mangle return types for
10132         conversion functions.
10133
10134 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
10135
10136         * error.c (tree_formatting_info): New data type.
10137         (tree_being_formatted): New macro.
10138         (tree_formatting_flags): Likewise.
10139         (put_whitespace): Likewise.
10140         (print_tree_identifier): Likewise.
10141         (print_identifier): Likewise.
10142         (cp_tree_printer, print_function_argument_list, print_declaration,
10143         print_expression, print_function_declaration,
10144         print_function_parameter, print_type, print_cv_qualifier): New
10145         functions.
10146         (init_error): Initialize lang_printer.
10147
10148 2000-08-24  Jason Merrill  <jason@redhat.com>
10149
10150         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
10151         adjustment necessary.
10152
10153 2000-08-24  Greg McGary  <greg@mcgary.org>
10154
10155         * cp-tree.h (MAIN_NAME_P): Remove macro.
10156
10157 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
10158
10159         * error.c (print_instantiation_context): Don't forget to flush the
10160         buffer.
10161
10162 2000-08-23  Jason Merrill  <jason@redhat.com>
10163
10164         * typeck.c (build_ptrmemfunc): Save the input pmf.
10165
10166         * method.c (process_modifiers): Use same_type_p.
10167
10168 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
10169
10170         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
10171         * mangle.c (write_function_type): Change prototype.
10172         (write_encoding): Don't mangle return types for
10173         constructors or destructors.
10174         (write_type): Adjust call to write_function_type.
10175         * pt.c (instantiate_template): Instantiate alternate entry points
10176         when instantiating the main function.
10177
10178 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
10179
10180         * error.c (cp_print_error_function): Don't use embedded '\n' in
10181         output_printf.
10182
10183 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
10184
10185         * decl.c (init_decl_processing): Remove bogus initialization.
10186         * error.c (lang_print_error_function): Restore here.
10187         (init_error): Initialize print_error_function.
10188
10189 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10190
10191         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
10192
10193 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
10194
10195         * Makefile.in (error.o): Depends on diagnostic.h
10196
10197         * cp-tree.h (problematic_instantiation_changed,
10198         record_last_problematic_instantiation, current_instantiation,
10199         print_instantiation_context): Declare.
10200         (maybe_print_template_context): Remove.
10201
10202         * decl.c (init_decl_processing): Set print_error_function to NULL.
10203         (lang_print_error_function): Remove, since we're using a new
10204         machinery.
10205
10206         * error.c: #include diagnostic.h
10207         (function_category): New function.
10208         (cp_diagnostic_starter): Likewise.
10209         (cp_diagnostic_finalizer): Likewise.
10210         (cp_print_error_function): Likewise.
10211         (maybe_print_instantiation_context): Likewise.
10212         (print_instantiation_full_context): Likewise.
10213         (print_instantiation_partial_context): Likewise.
10214         (print_instantiation_context): Define.
10215         (init_error): Initialize diagnostic pager and finalizer.
10216
10217         * pt.c (problematic_instantiation_changed): Define.
10218         (record_last_problematic_instantiation): Likewise.
10219         (current_instantiation): Likewise.
10220         (maybe_print_template_context): Remove.
10221         (print_template_context): Likewise.
10222         (current_tinst_level): Make static to reflect Brendan Kehoe's
10223         change of 1995-04-13.
10224         (push_tinst_level): Call print_instantiation_context.
10225
10226 2000-08-21  Nix  <nix@esperi.demon.co.uk>
10227
10228         * lang-specs.h: Do not process -o or run the assembler if
10229         -fsyntax-only.
10230
10231 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
10232
10233         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
10234         variables.
10235         * decl2.c (lang_decode_option): Disable gettext attributes for
10236         -ansi.
10237
10238 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
10239
10240         * lex.c (lang_init_options): Default diagnostic message maximum
10241         length to 80, when line-wrapping.
10242
10243 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
10244
10245         * class.c (build_vtbl_initializer): Clear the entire
10246         vtbl_init_data.  Start keeping track of the functions for which we
10247         have created vcall offsets here.
10248         (dfs_build_vcall_offset_vtbl_entries): Remove.
10249         (build_vcall_offset_vtbl_entries): Reimplement.
10250         (add_vcall_offset_vtbl_entries_r): New function.
10251         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
10252         computing when vcall offsets are necessary.
10253
10254 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10255
10256         * decl.c (member_function_or_else): Use cp_error ... %T.
10257         (grokdeclarator): Likewise.
10258         (start_method): Likewise.
10259         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
10260
10261 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10262
10263         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
10264         TYPE_DECLs.
10265
10266 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10267
10268         * cp-tree.h (PTRMEM_OK_P): New macro.
10269         (itf_ptrmem_ok): New enumeration value.
10270         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
10271         argument. Diagnose implicit pointer to member.
10272         (instantiate_type): Don't diagnose implicit pointer to member
10273         here. Pass itf_ptrmem_ok if ok. Adjust calls to
10274         resolve_address_of_overloaded_function.
10275         * init.c (build_offset_ref): Set PTRMEM_OK_P.
10276         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
10277         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
10278         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
10279         (build_unary_op): Deal with single non-static member in
10280         microsoft-land.
10281
10282 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10283
10284         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
10285
10286 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10287
10288         * cp-tree.h (enum_name_string): Remove prototype.
10289         (report_case_error): Remove prototype.
10290         * cp/typeck2.c (enum_name_string): Remove.
10291         (report_case_error): Remove.
10292         * error.c (dump_expr): Deal with enum values directly.
10293         Correctly negate integer constant.
10294
10295 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10296
10297         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
10298         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
10299         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
10300         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
10301         (__cxa_vec_new): Use __cxa_vec_new2.
10302         (__cxa_vec_delete): Use __cxa_vec_delete2.
10303
10304 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10305
10306         * vec.cc (__cxa_vec_new): Set "C" linkage.
10307         (__cxa_vec_ctor): Likewise.
10308         (__cxa_vec_cctor): Likewise.
10309         (__cxa_vec_dtor): Likewise.
10310         (__cxa_vec_delete): Likewise.
10311         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
10312         (__cxa_vec_ctor): Likewise.
10313         (__cxa_vec_cctor): Likewise.
10314         (__cxa_vec_dtor): Likewise.
10315         (__cxa_vec_delete): Likewise.
10316
10317 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10318
10319         * class.c (instantiate_type): Reinstate local variable
10320         deleted in previous change.
10321
10322         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
10323         itf_no_attributes.
10324
10325 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10326
10327         * cp-tree.h (instantiate_type_flags): New enumeration.
10328         (instantiate_type): Change parameter.
10329         * class.c (instantiate_type): Adjust prototype. Adjust.
10330         * call.c (standard_conversion): Adjust instantiate_type call.
10331         (reference_binding): Likewise.
10332         (build_op_delete_call): Likewise.
10333         (convert_like_real): Likewise.
10334         * cvt.c (cp_convert_to_pointer): Likewise.
10335         (convert_to_reference): Likewise.
10336         * pt.c (convert_nontype_argument): Likewise.
10337         * typeck.c (build_binary_op): Likewise.
10338         (build_ptrmemfunc): Likewise.
10339         (convert_for_assignment): Likewise.
10340
10341 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10342
10343         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
10344         (current_aggr): Define.
10345         * decl.c (grokdeclarator): Make sure a friend class is an
10346         elaborated type specifier.
10347         * parse.y (current_aggr): Remove static definition.
10348         (cp_parse_init): Adjust.
10349         (structsp): Clear and restore current_aggr.
10350         (component_decl_list): Clear current_aggr.
10351
10352         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
10353         aggregate tag on the typename's context.
10354
10355         * pt.c (tsubst_friend_class): Return error_mark_node, if
10356         parms becomes NULL.
10357         (instantiate_class_template): Ignore error_mark_node friend types.
10358
10359 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
10360
10361         * cvt.c (warn_ref_binding): New static function, broken out of ...
10362         (convert_to_reference): ... here. Use it.
10363
10364 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10365
10366         * parse.y (template_arg): Add rule for template qualified with
10367         global scope.
10368
10369 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10370
10371         * decl2.c (add_function): Reorganize.
10372         (arg_assoc): Do not consider function template decls.
10373
10374 2000-08-11  Jason Merrill  <jason@redhat.com>
10375
10376         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
10377         looking inside.
10378
10379 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10380
10381         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
10382         (lookup_nested_tag): Likewise.
10383
10384         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
10385         can be produced.
10386
10387 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10388
10389         * parse.y (named_complex_class_head_sans_basetype): Remove
10390         always true if.
10391
10392 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10393
10394         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
10395         explicit TEMPLATE_ID_EXPR args.
10396         (build_expr_from_tree, case CALL_EXPR): Likewise.
10397
10398 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10399
10400         * decl.c (check_tag_decl): Diagnose typename's which don't
10401         declare anything.
10402
10403 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
10404
10405         * init.c (build_aggr_init): Reject bogus array initializers
10406         early.
10407
10408 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
10409
10410         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
10411         runtime.
10412         * cp/tinfo.cc (__dynamic_cast): Likewise.
10413         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
10414
10415 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
10416
10417         * cvt.c (convert_to_pointer_force): Fix error message when
10418         attempting to cast from ambiguous base.
10419
10420 2000-08-08  Jason Merrill  <jason@redhat.com>
10421
10422         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
10423         (tsubst_template_arg_vector): Likewise.
10424
10425         * decl2.c (build_anon_union_vars): Choose the largest field; don't
10426         assume that one will be as large as the union.
10427
10428 2000-08-07  Kazu Hirata  <kazu@hxi.com>
10429
10430         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
10431         * decl.c (pop_labels): Likewise.
10432
10433 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
10434
10435         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
10436         specifications.
10437         (__pointer_to_member_type_info): Likewise.
10438         (__base_class_info): Likewise.
10439         (__class_type_info): Likewise.
10440         (__si_class_type_info): Likewise.
10441         (__vmi_class_type_info): Likewise.
10442         * tinfo.cc (__si_class_type_info::__do_find_public_src):
10443         Changed member names to match specifications.
10444         (__vmi_class_type_info::__do_find_public_src): Likewise.
10445         (__si_class_type_info::__do_dyncast): Likewise.
10446         (__vmi_class_type_info::__do_dyncast): Likewise.
10447         (__si_class_type_info::__do_upcast): Likewise.
10448         (__vmi_class_type_info::__do_upcast): Likewise.
10449         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
10450         (__pbase_type_info::__pointer_catch): Likewise.
10451         (__pointer_type_info::__pointer_catch): Likewise.
10452         (__pointer_to_member_type_info::__pointer_catch): Likewise.
10453
10454 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
10455
10456         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
10457         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
10458         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
10459
10460 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
10461
10462         * cp-tree.h (add_method): Change prototype.
10463         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
10464         Don't double the size of the method vector in the error case.
10465         (handle_using_decl): Adjust call to add_method.
10466         (add_implicitly_declared_members): Likewise.
10467         (clone_function_decl): Likewise.
10468         * decl2.c (check_classfn): Likewise.
10469         * semantics.c (finish_member_declaration): Likewise.
10470
10471 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10472
10473         * decl.c (flag_isoc94): New variable.
10474
10475 2000-08-02  Jason Merrill  <jason@redhat.com>
10476
10477         * pt.c (do_type_instantiation): Add complain parm; don't complain
10478         if called recursively.
10479         * cp-tree.h, parse.y: Adjust.
10480
10481 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
10482
10483         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
10484         -Wno-strict-prototypes.
10485
10486         * g++spec.c: Adjust type of second argument to
10487         lang_specific_driver, and update code as necessary.
10488
10489         * cp-tree.h: Don't prototype min_precision here.
10490         (my_friendly_assert): Cast expression to void.
10491         * semantics.c (do_poplevel): Initialize scope_stmts.
10492
10493 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
10494
10495         * cp-tree.h (DECL_NEEDED_P): Tweak.
10496
10497 2000-07-28  Jason Merrill  <jason@redhat.com>
10498
10499         * lang-specs.h: Use %i in rule for .ii files.
10500
10501 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
10502
10503         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
10504
10505 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
10506
10507         Allow indirect primary bases.
10508         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
10509         primary_base.
10510         (CLASSTYPE_VFIELD_PARENT): Remove.
10511         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
10512         (BINFO_PRIMARY_BINFO): Remove.
10513         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
10514         (BINFO_VBASE_PRIMARY_P): Likewise.
10515         (BINFO_PRIMARY_BASE_OF): New macro.
10516         (BINFO_INDIRECT_PRIMARY_P): Likewise.
10517         (get_primary_binfo): New function.
10518         * decl.c (lang_mark_tree): Make lang_type::primary_base.
10519         * class.c (vcall_offset_data_s): Rename to ...
10520         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
10521         and add ctor_vtbl_p.
10522         (get_derived_offset): Use get_primary_binfo.
10523         (dfs_mark_primary_bases): Adjust handling of virtual primary
10524         bases.
10525         (mark_primary_bases): Likewise.
10526         (set_primary_base): Take a binfo, not an integer, as a
10527         representation of the primary base.
10528         (indirect_primary_base_p): Remove.
10529         (determine_primary_base): Adjust for indirect primary bases.
10530         (dfs_find_final_overrider): Fix typo in coment.
10531         (update_vtable_entry_for_fn): Use get_primary_binfo.
10532         (layout_nonempty_base_or_field): Tweak.
10533         (build_base_fields): Adjust for new primary base semantics.
10534         (dfs_propagate_binfo_offsets): Remove.
10535         (propagate_binfo_offsets): Rewrite.
10536         (dfs_set_offset_for_shared_vbases): Remove.
10537         (layout_virtual_bases): Don't use it.
10538         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
10539         ABI.
10540         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
10541         CLASSTYPE_VFIELD_PARENT.
10542         (dfs_get_primary_binfo): New function.
10543         (get_primary_binfo): Likewise.
10544         (dump_class_hierarchy_r): Tweak printing of primary bases.
10545         (build_vtbl_initializer): Fix typo in comments.  Use
10546         vtbl_init_data.
10547         (build_vcall_and_vbase_vtbl_entries): Likewise.
10548         (build_vbaes_offset_vtbl_entries): Likewise.
10549         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
10550         BV_VCALL_INDEX to handle indirect primary bases.
10551         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
10552         (build_rtti_vtbl_entries): Likewise.
10553         * search.c (get_shared_vbase_if_not_primary): Tweak.
10554         (find_vbase_instance): Likewise.
10555         (binfo_for_vtable): Simplify.
10556         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
10557         (make_binfo): Make it have 11 entries.
10558
10559 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
10560
10561         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
10562         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
10563         ascertaining primaryness.
10564         (G): Remove template_args.
10565         (decl_is_template_id): New function.
10566         (write_encoding): Use decl_is_template_id.
10567         (write_name): Likewise.  Handle type_decls.  Get main variant of
10568         type decls.
10569         (write_nested_name): Likewise.
10570         (write_prefix): Likewise.
10571         (write_template_prefix): Likewise.
10572         (write_special_name_constructor): Remove defunct production from
10573         comment.
10574         (write_bare_function_type): Remove comment about absent parameter.
10575         (write_template_template_arg): Add missing grammar production to
10576         comment.
10577
10578 2000-07-27  Jason Merrill  <jason@redhat.com>
10579
10580         * decl.c (duplicate_decls): If common_type produces a non-typedef
10581         type for a typedef, just use the old type.
10582
10583 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
10584
10585         * cp-tree.h (function_depth): Declare.
10586         (verify_stmt_tree): Likewise.
10587         (find_tree): Likewise.
10588         * decl.c (function_depth): Give it external linkage.
10589         * optimize.c (optimize_function): Increment and decrement it.
10590         * tree.c (verify_stmt_tree_r): New function.
10591         (verify_stmt_tree): Likewise.
10592         (find_tree_r): Likewise.
10593         (find_tree): Likewise.
10594
10595 2000-07-27  Jason Merrill  <jason@redhat.com>
10596
10597         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
10598         TYPE_PTRMEMFUNC_P.
10599         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
10600
10601 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
10602
10603         * decl.c (start_cleanup_fn): Mark the function as `inline'.
10604         * decl2.c (get_guard): Call cp_finish_decl, not
10605         rest_of_decl_compilation, for local guards.
10606         * lex.c (do_identifier): Remove unused variable.
10607
10608 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
10609
10610         * parse.y:  Add missing ';'.
10611
10612 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
10613
10614         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
10615         of `extern "C++"'.
10616
10617 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10618
10619         Kill strict_prototype. Backwards compatibility only for
10620         non NO_IMPLICIT_EXTERN_C systems.
10621         * cp-tree.h (flag_strict_prototype): Remove.
10622         (strict_prototype): Remove.
10623         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
10624         * decl.c (maybe_push_to_top_level): Adjust.
10625         (pop_from_top_level): Adjust.
10626         (decls_match): Only allow sloppy parm matching for ancient
10627         system headers.
10628         (init_decl_processing): Adjust.
10629         (grokdeclarator): Adjust.
10630         * decl2.c (flag_strict_prototype): Remove.
10631         (strict_prototype): Remove.
10632         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
10633         (lang_f_options): Remove "strict-prototype".
10634         (unsupported-options): Add "strict-prototype".
10635         * lex.c (do_identifier): Adjust.
10636         (do_scoped_id): Adjust.
10637         * parse.y (empty_parms): Adjust.
10638         * class.c (push_lang_context): Adjust.
10639         (pop_lang_context): Adjust.
10640         * typeck.c (comp_target_parms): Adjust.
10641
10642 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10643
10644         * decl.c (poplevel): Deal with anonymous variables at for scope.
10645         (maybe_inject_for_scope_var): Likewise.
10646
10647 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
10648
10649         * decl.c: Remove all signal handling code, now done in toplev.c.
10650
10651 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
10652
10653         * decl.c (make_rtl_for_nonlocal_decl): Rework.
10654
10655         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
10656         correctly.
10657
10658 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
10659
10660         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
10661         Define my_friendly_assert and my_friendly_abort as macros
10662         which may call friendly_abort.  Prototype friendly abort, not
10663         my_friendly_abort or my_friendly_assert.
10664         * decl.c (signal_catch): Report the signal caught in the error
10665         message.  Call fatal directly.
10666         * typeck2.c (ack, my_friendly_assert): Delete.
10667         (my_friendly_abort): Rename to friendly_abort.  Expect file,
10668         line, and function parameters.  Report the abort code, then
10669         call fancy_abort.  Do not mask an abort if errors have
10670         already occurred.
10671
10672 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
10673
10674         * typeck.c (comp_target_parms): Remove obsolete parameter.
10675         (comp_target_types): Adjust.
10676
10677 2000-07-17  Jason Merrill  <jason@redhat.com>
10678
10679         * typeck.c (mark_addressable): Never set TREE_USED.
10680         * call.c (build_call): Don't abort on calls to library functions
10681         that have been declared normally.
10682
10683         * typeck.c (build_binary_op): Fix grammar in warning.
10684
10685         * exception.cc (__eh_free): Fix prototype.
10686
10687         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
10688
10689         * decl.c (pushdecl): Handle seeing an OVERLOAD in
10690         IDENTIFIER_NAMESPACE_VALUE.
10691
10692 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
10693
10694         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
10695         * method.c (use_thunk): Correct handling of vcall offsets.
10696
10697 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
10698
10699         * .cvsignore: parse.h and parse.c have no cp- prefix.
10700
10701 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
10702
10703         * .cvsignore: New file.
10704
10705 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
10706
10707         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
10708
10709 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
10710
10711         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
10712         * parse.c: Remove.
10713         * parse.h: Likewise.
10714
10715 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
10716
10717         * class.c (layout_class_type): Add pointers to virtual bases after
10718         base classes under the old ABI.
10719
10720 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
10721
10722         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
10723         (finish_continue_stmt): Likewise.
10724         (begin_for_stmt): Remove call to note_level_for_for.
10725         (finish_goto_stmt): Change call from build_min_nt
10726         to build_stmt.
10727         (finish_expr_stmt): Likewise.
10728         (begin_if_stmt): Likewise.
10729         (begin_while_stmt): Likewise.
10730         (finish_while_stmt): Likewise.
10731         (finish_return_stmt): Likewise.
10732         (begin_for_stmt): Likewise.
10733         (finish_for_stmt): Likewise.
10734         (finish_break_stmt): Likewise.
10735         (begin_switch_stmt): Likewise.
10736         (finish_case_label): Likewise.
10737         (genrtl_try_block): Likewise.
10738         (begin_try_block): Likewise.
10739         (begin_handler): Likewise.
10740         (begin_compound_stmt): Likewise.
10741         (finish_asm_stmt): Likewise.
10742         (finish_label_stmt): Likewise.
10743         (add_decl_stmt): Likewise.
10744         (finish_subobject): Likewise.
10745         (finish_decl_cleanup): Likewise.
10746         (finish_named_return_value): Likewise.
10747         (setup_vtbl_ptr): Likewise.
10748         (add_scope_stmt): Likewise.
10749         * decl.c (finish_constructor_body): Likewise.
10750         (finish_destructor_body): Likewise.
10751         * optimize.c (copy_body_r): Likewise.
10752         (initialize_inlined_parameters): Likewise.
10753         (declare_return_variable): Likewise.
10754         (expand_call_inline): Likewise.
10755
10756 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
10757
10758         * semantics.c (expand_body): Sync interface information
10759         at the end of function body expansion.
10760
10761 2000-07-09  Jason Merrill  <jason@redhat.com>
10762
10763         * init.c (build_new_1): Bail early if the call to new fails.
10764
10765         * decl.c (compute_array_index_type): Check specifically for
10766         an INTEGER_CST, not just TREE_CONSTANT.
10767
10768         * decl.c (duplicate_decls): Don't call duplicate_decls on
10769         the DECL_TEMPLATE_RESULT.
10770         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
10771         codes.
10772
10773         * error.c (dump_template_bindings): Don't crash if we had an
10774         invalid argument list.
10775
10776         * typeck.c (c_expand_start_case): Do narrowing here.
10777         * semantics.c (finish_switch_cond): Not here.
10778
10779 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
10780
10781         * parse.y (asm_clobbers): Do string concatenation.
10782
10783 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
10784
10785         * decl.c (pushtag): Don't put local classes in template functions
10786         on the local_classes list.
10787
10788 2000-07-04  Scott Snyder  <snyder@fnal.gov>
10789
10790         * decl2.c (get_guard): Add missing return for old ABI local
10791         variable case.
10792
10793 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
10794
10795         * cp-tree.h (char_type_p): New function.
10796         * decl.c (init_decl_processing): Don't initialize
10797         signed_wchar_type_node or unsigned_wchar_type_node.
10798         (complete_array_type): Handle brace-enclosed string-constants.
10799         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
10800         * tree.c (char_type_p): New function.
10801         * typeck2.c (digest_init): Use char_type_p.
10802
10803 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
10804
10805         * pt.c (tsubst): Don't layout type, if it's error_mark.
10806
10807 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
10808
10809         * pt.c (instantiate_pending_templates): Reset template level.
10810
10811 2000-07-05  Jason Merrill  <jason@redhat.com>
10812
10813         * call.c (joust): Don't complain about `operator char *()' beating
10814         `operator const char *() const'.
10815
10816 2000-07-04  scott snyder  <snyder@fnal.gov>
10817             Jason Merrill  <jason@redhat.com>
10818
10819         * repo.c (repo_get_id): Handle the case where a class with virtual
10820         bases has a null TYPE_BINFO_VTABLE.
10821
10822 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
10823             Jason Merrill  <jason@redhat.com>
10824
10825         * parse.y (member_init): Just pass in the type.
10826         * init.c (expand_member_init): Handle getting a type.
10827
10828 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10829             Jason Merrill  <jason@redhat.com>
10830
10831         * decl.c (finish_function): Warn if a function has no return
10832         statement.
10833         Suggested by Andrew Koenig.
10834         * typeck.c (check_return_expr): Do set current_function_returns_value
10835         if we got an error_mark_node.
10836
10837 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
10838
10839         * decl2.c (push_decl_namespace): Push the original namespace.
10840
10841 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
10842
10843         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
10844         * semantics.c (begin_class_definition): Clear it.
10845
10846 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
10847
10848         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
10849         (genrtl_expr_stmt): Likewise.
10850         (genrtl_decl_stmt): Likewise.
10851         (genrtl_if_stmt): Likewise.
10852         (genrtl_while_stmt): Likewise.
10853         (genrtl_do_stmt): Likewise.
10854         (genrtl_return_stmt): Likewise.
10855         (genrtl_for_stmt): Likewise.
10856         (genrtl_break_stmt): Likewise.
10857         (genrtl_continue_stmt): Likewise.
10858         (genrtl_scope_stmt): Likewise.
10859         (genrtl_switch_stmt): Likewise.
10860         (genrtl_case_label): Likewise.
10861         (genrtl_begin_compound_stmt): Likewise.
10862         (genrtl_finish_compound_stmt): Likewise.
10863         (genrtl_compound_stmt): Likewise.
10864         (genrtl_asm_stmt): Likewise.
10865
10866         * init.c (begin_init_stmts): Remove call to
10867         genrtl_begin_compound_stmt.
10868         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
10869
10870         * semantics.c (lang_expand_stmt): Changed call to
10871         genrtl_compound_stmt to ignore return value.
10872
10873 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
10874
10875         * mangle.c (canonicalize_for_substitution): Return the canonical
10876         variant of a type.
10877
10878         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
10879         TYPE_DECL.
10880         * typeck.c (commonparms): Remove obstack manipulations.
10881
10882 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
10883
10884         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
10885
10886         * Makefile.in (OBJS): Added ../c-semantics.o.
10887         (OBJDEPS): Likewise.
10888
10889         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
10890         ../c-common.h.
10891         (struct stmt_tree): Added comment.
10892         (current_function_name_declared): Removed.
10893         (stmts_are_full_exprs_p): Likewise.
10894         (genrtl_do_pushlevel): Likewise.
10895         (genrtl_clear_out_block): Likewise.
10896         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
10897         (DECL_ANON_UNION_ELEMS): Likewise.
10898         (emit_local_var): Likewise.
10899         (make_rtl_for_local_static): Likewise.
10900         (do_case): Likewise.
10901         (expand_stmt): Likewise.
10902         (genrtl_decl_cleanup): Likewise.
10903         (c_expand_asm_operands): Likewise.
10904         (c_expand_return): Likewise.
10905         (c_expand_start_case): Likewise.
10906
10907         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
10908         (emit_local_var): Likewise.
10909         (initialize_local_var): Change reference to
10910         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
10911         Change reference to stmts_are_full_exprs_p to
10912         current_stmt_tree->stmts_are_full_exprs_p.
10913         (push_cp_function_context): Likewise.
10914
10915         * expect.c (expand_throw): Change reference to
10916         stmts_are_full_exprs_p.
10917
10918         * init.c (build_aggr_init): Change reference to
10919         stmts_are_full_exprs_p.
10920         (build_vec_init): Likewise.
10921
10922         * optimize.c (maybe_clone_body): Change reference to
10923         current_function_name_declared to
10924         cp_function_chain->name_declared.
10925
10926         * pt.c (instantiate_decl): Change reference to
10927         current_function_name_declared to
10928         cp_function_chain->name_declared.
10929
10930         * semantics.c (expand_cond): Moved declaration to c-common.h.
10931         (genrtl_do_pushlevel): Moved to c-semantics.c.
10932         (genrtl_clear_out_block): Likewise.
10933         (genrtl_goto_stmt): Likewise.
10934         (genrtl_expr_stmt): Likewise.
10935         (genrtl_decl_stmt): Likewise.
10936         (gerntl_if_stmt): Likewise.
10937         (genrtl_while_stmt): Likewise.
10938         (genrtl_do_stmt): Likewise.
10939         (genrtl_return_stmt): Likewise.
10940         (genrtl_for_stmt): Likewise.
10941         (genrtl_break_stmt): Likewise.
10942         (genrtl_continue_stmt): Likewise.
10943         (genrtl_scope_stmt): Likewise.
10944         (genrtl_switch_stmt): Likewise.
10945         (genrtl_case_label): Likewise.
10946         (genrtl_begin_compound_stmt): Likewise.
10947         (genrtl_finish_compound_stmt): Likewise.
10948         (genrtl_compound_stmt): Likewise.
10949         (genrtl_asm_stmt): Likewise.
10950         (genrtl_decl_cleanup): Likewise.
10951         (expand_cond): Likewise.
10952         (expand_stmt): Renamed to ...
10953         (lang_expand_stmt): ... this.
10954         (lang_expand_expr_stmt): Initialize.
10955         (set_current_function_name_declared): Likewise.
10956         (stmts_are_full_exprs_p): Likewise.
10957         (current_function_name_declared): Likewise.
10958         (anon_aggr_type_p): Likewise.
10959         (do_poplevel): Change reference to
10960         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
10961         Change reference to stmts_are_full_exprs_p to
10962         current_stmt_tree->stmts_are_full_exprs_p.
10963         (add_tree): Likewise.
10964         (finish_expr_stmt): Likewise.
10965         (prep_stmt): Likewise.
10966         (lang_expand_stmt): Likewise.
10967         (begin_compound_stmt): Change reference to
10968         current_function_name_declared to
10969         cp_function_chain->name_declared and call to
10970         current_function_name_declared().
10971         (setup_vtbl_ptr): Likewise.
10972         (genrtl_do_poplevel): Removed.
10973
10974 2000-06-30  Jason Merrill  <jason@redhat.com>
10975
10976         * init.c (init_init_processing): Go back to aligning like
10977         double_type_node for old ABI.
10978         (get_cookie_size): Make cookie larger if we get a type that needs
10979         more alignment.
10980         (build_vec_delete): Call it.
10981
10982         * typeck.c (qualify_type_recursive): New fn.
10983         (composite_pointer_type): Use it.
10984         (build_binary_op): Use composite_pointer_type.
10985
10986 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
10987             Jason Merrill  <jason@redhat.com>
10988
10989         * typeck.c (check_return_expr): Don't complain about returning
10990         NULL from operator new if -fcheck-new.
10991         * cp-tree.h: Declare flag_check_new here.
10992         * init.c: Not here.
10993
10994 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
10995
10996         * mangle.c (find_substitution): Use same_type_p.
10997         (write_encoding): Don't check for substitutions.
10998
10999 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
11000
11001         * parse.y (expr_no_comma_rangle): New non-terminal.
11002         (template_parm): Use it for default parameter case.
11003         (template_arg): Use it.
11004         (expr_no_commas): Remove commented out undefined extensions.
11005         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
11006         * parse.h, parse.c: Rebuilt.
11007
11008 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
11009
11010         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
11011         (finish_asm_stmt): Do it here, instead.
11012
11013         * cp-tree.h (ridpointers): Don't declare.
11014         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
11015         (record_builtin_java_type): Likewise.
11016         (init_decl_processing): Likewise.
11017         * lex.c: Move inclusion of lex.h.
11018         (ridpointers): Don't define.
11019         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
11020         RID_MAX.
11021         * lex.h (enum rid): Rename to ...
11022         (enum cp_rid): ... this.
11023         (ridpointers): Don't declare.
11024         * parse.y: Move inclusion of lex.h.
11025         * parse.c: Regenerated.
11026         * spew.c: Move inclusion of lex.h.
11027
11028         * cp-tree.h (struct language_function): Remove temp_name_counter.
11029         (temp_name_counter): Remove.
11030         (get_temp_name): Change prototype.
11031         (get_guard): New function.
11032         (get_guard_cond): Likewise.
11033         (set_guard): Likewise.
11034         * cvt.c (build_up_reference): Adjust call to get_temp_name.
11035         * decl.c (expand_static_init): Use get_guard and friends to
11036         implement guard variables.
11037         * decl2.c (get_temp_name): Assume that the variables created are
11038         always static.
11039         (get_sentry): Rename to ...
11040         (get_guard): ... this.  Implement new ABI guard variables.
11041         (get_guard_bits): New function.
11042         (get_guard_cond): Likewise.
11043         (set_guard): Likewise.
11044         (start_static_initialization_or_destruction): Use them.
11045         (do_static_initialization): Replace sentry with guard throughout.
11046         (do_static_destruction): Likewise.
11047         * init.c (create_temporary_var): Add comment.
11048
11049 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
11050
11051         * mangle.c (find_substitution): Use same_type_p.
11052         (write_encoding): Don't check for substitutions.
11053
11054 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
11055
11056         * parse.y (expr_no_comma_rangle): New non-terminal.
11057         (template_parm): Use it for default parameter case.
11058         (template_arg): Use it.
11059         (expr_no_commas): Remove commented out undefined extensions.
11060         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
11061         * parse.h, parse.c: Rebuilt.
11062
11063 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
11064
11065         * cp-tree.h (flag_const_strings): Remove.
11066         (warn_parentheses): Likewise.
11067         (warn_format): Likewise.
11068         (common_type): Likewise.
11069         (default_conversion): Likewise.
11070         (build_binary_op): Likewise.
11071         (cp_build_binary_op): New macro.
11072         * call.c (build_new_op): Use cp_build_binary_op instead of
11073         build_binary_op.
11074         * class.c (build_vtable_entry_ref): Likewise.
11075         * decl.c (expand_static_init): Likewise.
11076         (compute_array_index_type): Likewise.
11077         (build_enumerator): Likewise.
11078         * decl2.c (delete_sanity): Likewise.
11079         (start_static_initialization_or_destruction): Likewise.
11080         * error.c (dump_type_suffix): Likewise.
11081         * init.c (resolve_offset_ref): Likewise.
11082         (build_new): Likewise.
11083         (build_new_1): Likewise.
11084         (build_vec_delete_1): Likewise.
11085         (build_vec_init): Likewise.
11086         (build_delete): Likewise.
11087         * rtti.c (synthesize_tinfo_fn): Likewise.
11088         (synthesize_tinfo_var): Likewise.
11089         * search.c (expand_upcast_fixups): Likewise.
11090         (fixup_all_virtual_upcast_offsets): Likewise.
11091         * typeck.c (build_array_ref): Likewise.
11092         (get_member_function_from_ptrfunc): Likewise.
11093         (build_binary_op): Add parameter.
11094         (pointer_int_sum): Use cp_build_binary_op.
11095         (pointer_diff): Likewise.
11096         (build_modify_expr): Likewise.
11097         (get_delta_difference): Likewise.
11098         (build_ptrmemfunc): Likewise.
11099
11100 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
11101
11102         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
11103         * decl.c (create_implicit_typedef): Adjust.
11104         * decl2.c (build_artificial_parm): Adjust.
11105         * method.c (implicitly_declare_fn): Adjust.
11106         * pt.c (push_inline_template_parms_recursive): Adjust.
11107         (process_template_parm): Adjust.
11108         (overloaded_template_name): Adjust.
11109         * semantics.c (finish_template_template_parm): Adjust.
11110
11111 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
11112
11113         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
11114         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
11115         where to emit thunks.
11116         (build_vtt): Adjust call to build_vtt_inits.
11117         (build_vtt_inits): Add parameter to indicate whether or not
11118         sub-VTTs for virtual bases should be included.  Adjust handling of
11119         construction vtables.
11120         (get_matching_base): New function.
11121         (dfs_build_vtt_inits): Rename to ...
11122         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
11123         construction vtables.
11124         (dfs_fixup_binfo_vtbls): Likewise.
11125         (build_ctor_vtbl_groups): Build construction vtables for virtual
11126         bases, too.
11127         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
11128         to build construction vtbls.
11129         (dfs_accumulate_vtbl_inits): Adjust handling of
11130         construction vtables.
11131
11132         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
11133         types correctly.
11134
11135 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
11136
11137         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
11138
11139 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
11140
11141         * search.c (hides): Remove.
11142         (is_subobject_of_p): Add most_derived parameter. Use
11143         CANONICAL_BINFO.
11144         (lookup_field_queue_p): Adjust.
11145         (lookup_field_r): Adjust.
11146
11147 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
11148
11149         * decl2.c (handle_class_head): Bash typedefs to the type's main
11150         decl.
11151
11152 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
11153
11154         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
11155         (begin_global_stmt_expr): ... this.
11156         (genrtl_finish_stmt_expr): Rename to ...
11157         (finish_global_stmt_expr): ... this.
11158         * init.c (begin_init_stmts): Adjust calls.
11159         (finish_init_stmts): Likewise.
11160         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
11161         (begin_global_stmt_expr): ... this.
11162         (genrtl_finish_stmt_expr): Rename to ...
11163         (finish_global_stmt_expr): ... this.
11164
11165 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11166
11167         * search.c (lookup_member): Fix typo in comment.
11168
11169 2000-06-24  Jason Merrill  <jason@redhat.com>
11170
11171         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
11172         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
11173
11174 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11175
11176         * parse.y (complex_direct_notype_declarator): Support global_scope.
11177         * Makefile.in: Adjust conflict count.
11178
11179 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11180
11181         * parse.y (template_arg): Convert TEMPLATE_DECL
11182         that is a template template parameter to
11183         TEMPLATE_TEMPLATE_PARM here.
11184
11185         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
11186         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
11187         (copy_template_template_parm): Adjust prototype.
11188         * decl.c (grokdeclarator): Remove dead code.
11189         * pt.c (process_template_parm): Tidy.
11190         (lookup_template_class): Construct nodes in
11191         copy_template_template_parm.
11192         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
11193         lookup_template_class.  Use TYPE_TI_TEMPLATE.
11194         * tree.c (copy_template_template_parm): Add NEWARGS
11195         parameter.
11196         (mapcar): Adjust call to copy_template_template_parm.
11197         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
11198         * method.c (build_template_template_parm_names): Change error
11199         code to avoid compilation warning.
11200
11201         * gxxint.texi: Document template template parameter
11202         name mangling.
11203
11204 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
11205
11206         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
11207         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
11208         (cp-demangle.o): New rule.
11209         (dyn-string.o): Likewise.
11210         * inc/cxxabi.h (__cxa_demangle): New declaration.
11211
11212 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
11213
11214         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
11215         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
11216         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
11217         a tree, not an int.
11218         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
11219         (make_thunk): Change prototype.
11220         (emit_thunk): Rename to use_thunk.
11221         (mangle_thunk): Change prototype.
11222         * class.c (get_derived_offset): Simplify.
11223         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
11224         BV_GENERATE_THUNK_WITH_VTABLE_P.
11225         (build_primary_vtable): Simplify.
11226         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
11227         (dfs_find_base): Remove.
11228         (update_vtable_entry_for_fn): Correct bug in finding the base
11229         where a virtual function was first declared.  Figure out whether
11230         or not to emit a vcall-thunk with the vtables in which it appears.
11231         Correct logic for deciding whether to use an ordinary thunk, or a
11232         vcall thunk.
11233         (finish_struct_1): Remove unnecssary code.
11234         (build_vtbl_initializer): Use ssize_int for the running counter of
11235         negative indices.
11236         (build_vtbl_initializer): Only use vcall thunks where necessary.
11237         Mark thunks as needing to be emitted with their vtables, or not.
11238         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
11239         indices.  Use size_binop.
11240         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
11241         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
11242         size_binop.
11243         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
11244         (build_vtable_entry): Mark thunks as needing to be emitted with
11245         their vtables, or not.
11246         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
11247         * decl2.c (mark_vtable_entries): Use use_thunk instead of
11248         emit_thunk.
11249         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
11250         information.
11251         * error.c (dump_expr): Use BV_FN.
11252         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
11253         not an int.
11254         * method.c (make_thunk): Likewise.
11255         (emit_thunk): Rename to use_thunk.  Allow callers to decide
11256         whether or not to actually emit the thunk.  Adjust for changes in
11257         representation of vcall offsets.
11258         * search.c (dfs_get_pure_virtuals): Use BV_FN.
11259         * semantics.c (emit_associated_thunks): New function.
11260         (expand_body): Use it.
11261         * ir.texi: Adjust decriptions of thunks.
11262
11263 2000-06-22  Jason Merrill  <jason@redhat.com>
11264
11265         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
11266         (tsubst_friend_function): Copy it here.
11267
11268         * decl.c (grok_op_properties): Fix typo.
11269
11270         * decl2.c (delete_sanity): Clarify warning, avoid failure on
11271         deleting void*.
11272
11273         * pt.c (check_explicit_specialization): Clarify error.
11274
11275         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
11276         an old OVERLOAD when we're declaring a non-function.
11277         (pushdecl, destroy_local_var): Check for error_mark_node.
11278         (warn_extern_redeclared_static): Also bail early if
11279         we're a CONST_DECL.
11280         (push_overloaded_decl): Ignore an old error_mark_node.
11281
11282 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
11283
11284         * call.c (build_x_va_arg): Check if in a template decl.
11285         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
11286
11287 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11288
11289         * class.c (push_lang_context): TYPE_NAME gets you to the Java
11290         types DECLs.
11291         * decl.c (check_goto): Computed gotos assumed OK.
11292
11293 2000-06-20  Jason Merrill  <jason@redhat.com>
11294
11295         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
11296         for which we don't need to look for instantiations.
11297
11298 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
11299
11300         * parse.y (program): Always call finish_translation_unit.
11301         * parse.c, parse.h: Rebuilt.
11302
11303 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
11304
11305         * method.c: Don't include hard-reg-set.h.
11306
11307 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
11308
11309         * rtti.c (get_base_offset): Cope when vbase field is in a base.
11310
11311 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
11312
11313         * call.c (build_conditional_expr): Use VOID_TYPE_P.
11314         * cvt.c (cp_convert_to_pointer): Likewise.
11315         (convert_to_void): Likewise.
11316         * error.c (dump_expr): Likewise.
11317         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
11318         * init.c (build_delete): Likewise.
11319         * method.c (emit_thunk): Likewise.
11320         * optmize.c (declare_return_variable): Likewise.
11321         * rtti.c (get_tinfo_decl_dynamic): Likewise.
11322         (get_typeid): Likewise.
11323         (build_dynamic_cast_1): Likewise.
11324         * typeck.c (composite_pointer_type): Likewise.
11325         (common_type): Likewise.
11326         (build_indirect_ref): Likewise.
11327         (build_binary_op): Likewise.
11328         (build_x_compound_expr): Likewise.
11329         (check_return_expr): Likewise.
11330         * typeck2.c (add_exception_specifier): Likewise.
11331
11332         * mangle.c (write_method_parms): Use direct comparison for end
11333         of parmlist.
11334
11335 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
11336
11337         * cp-tree.h (genrtl_try_block): Declare function.
11338         (genrtl_handler): Likewise.
11339         (genrtl_catch_block): Likewise.
11340         (genrtl_ctor_stmt): Likewise.
11341         (genrtl_subobject): Likewise.
11342         (genrtl_decl_cleanup): Likewise.
11343         (genrtl_do_poplevel): Likewise.
11344         (genrtl_do_pushlevel): Likewise.
11345         (genrtl_clear_out_block): Likewise.
11346         (genrtl_goto_stmt): Likewise.
11347         (genrtl_expr_stmt): Likewise.
11348         (genrtl_decl_stmt): Likewise.
11349         (genrtl_if_stmt): Likewise.
11350         (genrtl_while_stmt): Likewise.
11351         (genrtl_do_stmt): Likewise.
11352         (genrtl_return_stmt): Likewise.
11353         (genrtl_for_stmt): Likewise.
11354         (genrtl_break_stmt): Likewise.
11355         (genrtl_continue_stmt): Likewise.
11356         (genrtl_scope_stmt): Likewise.
11357         (genrtl_switch_stmt): Likewise.
11358         (genrtl_case_label): Likewise.
11359         (genrtl_begin_compound_stmt): Likewise.
11360         (genrtl_finish_compound_stmt): Likewise.
11361         (genrtl_compound_stmt): Likewise.
11362         (genrtl_asm_stmt): Likewise.
11363         (genrtl_named_return_value): Likewise.
11364         (genrtl_begin_stmt_expr): Likewise.
11365         (genrtl_finish_stmt_expr): Likewise.
11366         (finish_for_stmt): Removed first argument.
11367         (finish_switch_stmt): Likewise.
11368
11369         * semantics.c (genrtl_try_block): Define function.
11370         (genrtl_handler): Likewise.
11371         (genrtl_catch_block): Likewise.
11372         (genrtl_ctor_stmt): Likewise.
11373         (genrtl_subobject): Likewise.
11374         (genrtl_decl_cleanup): Likewise.
11375         (genrtl_do_poplevel): Likewise.
11376         (genrtl_do_pushlevel): Likewise.
11377         (genrtl_clear_out_block): Likewise.
11378         (genrtl_goto_stmt): Likewise.
11379         (genrtl_expr_stmt): Likewise.
11380         (genrtl_decl_stmt): Likewise.
11381         (genrtl_if_stmt): Likewise.
11382         (genrtl_while_stmt): Likewise.
11383         (genrtl_do_stmt): Likewise.
11384         (genrtl_return_stmt): Likewise.
11385         (genrtl_for_stmt): Likewise.
11386         (genrtl_break_stmt): Likewise.
11387         (genrtl_continue_stmt): Likewise.
11388         (genrtl_scope_stmt): Likewise.
11389         (genrtl_switch_stmt): Likewise.
11390         (genrtl_case_label): Likewise.
11391         (genrtl_begin_compound_stmt): Likewise.
11392         (genrtl_finish_compound_stmt): Likewise.
11393         (genrtl_compound_stmt): Likewise.
11394         (genrtl_asm_stmt): Likewise.
11395         (genrtl_named_return_value): Likewise.
11396         (genrtl_begin_stmt_expr): Likewise.
11397         (genrtl_finish_stmt_expr): Likewise.
11398         (finish_for_stmt): Removed first argument and generate rtl
11399         specific code.
11400         (finish_switch_stmt): Likewise.
11401         (do_poplevel): Removed generate rtl specific code.
11402         (do_pushlevel): Likewise.
11403         (add_tree): Likewise.
11404         (finish_goto_stmt): Likewise.
11405         (finish_expr_stmt): Likewise.
11406         (begin_if_stmt): Likewise.
11407         (finish_if_stmt_cond): Likewise.
11408         (finish_then_clause): Likewise.
11409         (begin_else_clause): Likewise.
11410         (finish_else_clause): Likewise.
11411         (finish_if_stmt): Likewise.
11412         (clear_out_block): Likewise.
11413         (begin_while_stmt): Likewise.
11414         (finish_while_stmt_cond): Likewise.
11415         (finish_while_stmt): Likewise.
11416         (begin_do_stmt): Likewise.
11417         (finish_do_body): Likewise.
11418         (finish_do_stmt): Likewise.
11419         (finish_return_stmt): Likewise.
11420         (begin_for_stmt): Likewise.
11421         (finish_for_init_stmt): Likewise.
11422         (finish_for_cond): Likewise.
11423         (finish_for_expr): Likewise.
11424         (finish_break_stmt): Likewise.
11425         (finish_continue_stmt): Likewise.
11426         (begin_switch_stmt): Likewise.
11427         (finish_switch_cond): Likewise.
11428         (finish_case_label): Likewise.
11429         (begin_try_block): Likewise.
11430         (begin_function_try_block): Likewise.
11431         (finish_try_block): Likewise.
11432         (finish_cleanup_try_block): Likewise.
11433         (finish_cleanup): Likewise.
11434         (finish_function_try_block): Likewise.
11435         (finish_handler_sequence): Likewise.
11436         (finish_function_handler_sequence): Likewise.
11437         (begin_handler): Likewise.
11438         (finish_handler_parms): Likewise.
11439         (begin_catch_block): Likewise.
11440         (finish_handler): Likewise.
11441         (begin_compound_stmt): Likewise.
11442         (finish_compound_stmt): Likewise.
11443         (finish_asm_stmt): Likewise.
11444         (finish_label_stmt): Likewise.
11445         (finish_label_decl): Likewise.
11446         (finish_subobject): Likewise.
11447         (finish_decl_cleanup): Likewise.
11448         (finish_named_return_value): Likewise.
11449         (begin_stmt_expr): Likewise.
11450         (finish_stmt_expr): Likewise.
11451
11452         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
11453         to call genrtl_expr_stmt when appropriate.
11454
11455         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
11456         begin_compound_expr to call genrtl_begin_stmt_expr and
11457         genrtl_begin_compound_expr when appropriate.
11458         (finish_init_stmts): Changed calls to finish_compound_expr and
11459         finish_stmt_expr to call genrtl_finish_compound_expr and
11460         genrtl_finish_stmt_expr when appropriate.
11461         (expand_default_init): Changed call to finish_expr_stmt to call
11462         genrtl_expr_stmt when appropriate.
11463         (build_vec_init): Likewise.
11464
11465         * parse.y (simple_stmt): Removed first argument from call to
11466         finish_for_stmt. Removed first argument from call to
11467         finish_switch_stmt.
11468
11469         * parse.c: Regenerated.
11470
11471         * pt.c (tsubst_expr): Removed first argument from call to
11472         finish_for_stmt. Removed first argument from call to
11473         finish_switch_stmt.
11474
11475 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
11476
11477         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
11478         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
11479
11480         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
11481         (cplus_tree_code_length[]): Likewise.
11482         (cplus_tree_code_name[]): Likewise.
11483         (init_parse): Added call to add_c_tree_codes. Changed
11484         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
11485
11486 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
11487
11488         * cp-tree.h (finish_mem_initializers): Declare.
11489         (count_trees): Likewise.
11490         * parse.y (base_init): Use finish_mem_initializers.
11491         * semantics.c (finish_mem_initializers): New function.
11492
11493         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
11494         the number of trees.
11495         (n_trees): Remove.
11496         (count_trees): Don't use it.
11497
11498 2000-06-15  Jason Merrill  <jason@redhat.com>
11499
11500         * tree.c (count_trees): New debugging function.
11501
11502         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
11503         * init.c (build_member_call): Pull out the name of a DECL.
11504
11505         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
11506         * semantics.c (expand_body): Push to TV_INTEGRATION here.
11507         * optimize.c (optimize_function): Not here.
11508         * pt.c (instantiate_decl): Push to TV_PARSE.
11509
11510 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
11511
11512         * cp-tree.h (struct language_function): Remove x_base_init_list
11513         and x_member_init_list.
11514         (current_base_init_list): Remove.
11515         (current_member_init_list): Likewise.
11516         (setup_vtbl_ptr): Change prototype.
11517         (emit_base_init): Likewise.
11518         (expand_member_init): Likewise.
11519         (reinit_parse_for_function): Remove.
11520         * decl.c (save_function_data): Don't clear x_base_init_list and
11521         x_member_init_list.
11522         (mark_language_function): Don't mark them.
11523         * init.c (perform_member_init): Tweak comment.
11524         (sort_member_init): Take the list of initializers as an argument.
11525         (sort_base_init): Likewise.
11526         (emit_base_init): Likewise.
11527         (expand_member_init): Return the initializer.  Don't use global
11528         variables.
11529         * lex.c (reinit_parse_for_function): Remove.
11530         * method.c (build_template_parm_names): Correct substitution.
11531         (do_build_copy_constructor): Don't use current_member_init_list
11532         and current_base_init_list.
11533         (synthesize_method): Likewise.
11534         * parse.y (base_init): Split mem-initializers into
11535         base-initializers and field-initializers.
11536         (member_init_list): Build up the list here.
11537         (member_init): Return the initializer.
11538         (fn.depfn): Don't use reinit_parse_for_function.
11539         * parse.c: Regenerated.
11540         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
11541         ERROR_MARK.
11542         (tsubst_expr): Don't use current_member_init_list
11543         and current_base_init_list.
11544         (tsubst_expr_values): Rename to ...
11545         (tsubst_initializer_list): ... this.  Use convert_from_reference.
11546         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
11547         and current_base_init_list.
11548         (begin_function_definition): Don't call reinit_parse_for_function.
11549
11550         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
11551
11552         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
11553         correctly.
11554
11555         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
11556
11557 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
11558
11559         * cp-tree.h (IF_COND): Move to c-common.h.
11560         (THEN_CLAUSE): Likewise.
11561         (ELSE_CLAUSE): Likewise.
11562         (WHILE_COND): Likewise.
11563         (WHILE_BODY): Likewise.
11564         (DO_COND): Likewise.
11565         (DO_BODY): Likewise.
11566         (RETURN_EXPR): Likewise.
11567         (EXPR_STMT_EXPR): Likewise.
11568         (FOR_INIT_STMT): Likewise.
11569         (FOR_COND): Likewise.
11570         (FOR_EXPR): Likewise.
11571         (FOR_BODY): Likewise.
11572         (SWITCH_COND): Likewise.
11573         (SWITCH_BODY): Likewise.
11574         (CASE_LOW): Likewise.
11575         (CASE_HIGH): Likewise.
11576         (GOTO_DESTINATION): Likewise.
11577         (COMPOUND_BODY): Likewise.
11578         (ASM_CV_QUAL): Likewise.
11579         (ASM_STRING): Likewise.
11580         (ASM_OUTPUTS): Likewise.
11581         (ASM_INPUTS): Likewise.
11582         (ASM_CLOBBERS): Likewise.
11583         (DECL_STMT_DECL): Likewise.
11584         (STMT_EXPR_STMT): Likewise.
11585         (LABEL_STMT_LABEL): Likewise.
11586         (SCOPE_BEGIN_P): Likewise.
11587         (SCOPE_END_P): Likewise.
11588         (SCOPE_STMT_BLOCK): Likewise.
11589         (SCOPE_NULLIFIED_P): Likewise.
11590         (SCOPE_NO_CLEANUPS_P): Likewise.
11591         (SCOPE_PARTIAL_P): Likewise.
11592         (ASM_VOLATILE_P): Likewise.
11593         (STMT_LINENO): Likewise.
11594         (STMT_LINENO_FOR_FN_P): Likewise.
11595
11596         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
11597         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
11598         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
11599         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
11600         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
11601
11602         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
11603
11604         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
11605         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
11606
11607         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
11608         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
11609         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
11610
11611 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
11612
11613         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
11614         * class.c (dfs_find_final_overrider): Set it appropriately.
11615         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
11616         avoid unneeded secondary vptrs.
11617
11618 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
11619
11620         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
11621         (check_bitfield_decl, check_field_decl): Likewise.
11622         (build_vtbl_or_vbase_field, build_base_field): Likewise.
11623         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
11624         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
11625         (xfer_tag, finish_enum): Likewise.
11626         * decl2.c (finish_builtin_type): Likewise.
11627         * init.c (init_init_processing): Likewise.
11628         * pt.c (instantiate_class_template): Likewise.
11629         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
11630         * cp-tree.h (struct lang_type): Add user_align member.
11631         (CLASSTYPE_USER_ALIGN): Define.
11632
11633 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
11634
11635         * Make-lang.in (c++.install-common): Install g++-cross in
11636         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
11637         $(target_alias)-g++ and $(target_alias)-c++.
11638
11639 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
11640
11641         * class.c (vcall_offset_data_s): Add last_init and fns.
11642         (overrides): Rename to same_signature_p.
11643         (dfs_find_final_overrider): Adjust accordingly.
11644         (mark_overriders): Likewise.
11645         (warn_hidden): Likewise.
11646         (build_vtbl_initializer): Reorganize machinery for building things
11647         at negative offsets.
11648         (build_vcall_and_vbase_vtbl_entries): Likewise.
11649         (build_vbase_offset_vtbl_entries): Likewise.
11650         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
11651         offset entries.  Do not create two entries for functions with the
11652         same signature.
11653         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
11654         (build_rtti_vtbl_entries): Reorganize machinery for building things
11655         at negative offsets.
11656
11657         * optimize.c (expand_call_inline): Don't recurse into the code
11658         used to initialize the parameters more than once.
11659
11660 2000-06-11  Mark Mitchell <mark@codesourcery.com>
11661
11662         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
11663         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
11664         (find_substitution): Only use the `Sa' substitution for
11665         std::allocator, not instantiations of it.
11666         (write_template_prefix): Move comment.  Only use a TREE_LIST to
11667         represent substitutions for a member template.
11668         (write_array_type): Mangle array dimensions correctly.
11669         * optimize.c (maybe_clone_body): Copy more information from the
11670         cloned function.
11671         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
11672         on the regenerated declaration.
11673
11674 2000-06-11  Chip Salzenberg  <chip@valinux.com>
11675             Mark Mitchell <mark@codesourcery.com>
11676
11677         * class.c (build_vtable): Clarify comment.
11678         (build_ctor_vtbl_group): Pass the most derived type to
11679         build_vtable.
11680
11681 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11682
11683         * decl2.c (compare_options): Don't needlessly cast away const-ness.
11684
11685 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
11686
11687         * decl.c (add_binding): Handle duplicate declarations of external
11688         variables.
11689
11690 2000-06-09  Chip Salzenberg  <chip@valinux.com>
11691             Mark Mitchell <mark@codesourcery.com>
11692
11693         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
11694         argument.
11695         (write_signed_number): New macro.
11696         (write_unsigned_number): Likewise.
11697         (write_source_name): Use them.
11698         (write_number): Handle signed and unsigned values.
11699         (write_integer_cst): Use tree_int_cst_sgn, and use
11700         write_unsigned_number or write_signed_number as appropriate.
11701         (write_discriminator): Use write_unsigned_number or
11702         write_signed_number as appropriate.
11703         (write_template_arg_literal): Likewise.
11704         (write_array_type): Use tree_low_cst.
11705         (write_template_parm):  Use write_unsigned_number or
11706         write_signed_number as appropriate.
11707         (write_substitution): Adjust call to write_number.
11708         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
11709         (write_expression): Handle non-type template arguments of
11710         reference type correctly.
11711         (mangle_thunk): Use write_signed_number.
11712
11713 2000-06-09  Chip Salzenberg  <chip@valinux.com>
11714
11715         * mangle.c (find_substition): Don't mangle objects with typename
11716         substitutions (e.g. "cin" as "Si").
11717
11718 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
11719
11720         * call.c (add_candidate): Use ggc_alloc_cleared.
11721         * decl.c (lookup_label): Likewise.
11722         * lex.c (retrofit_lang_decl): Likewise.
11723
11724 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
11725
11726         * semantics.c (expand_body): Push to TV_EXPAND.
11727         * optimize.c (optimize_function): Push to TV_INTEGRATION.
11728         * decl.c (start_function): Always call announce_function.
11729
11730         * tinfo2.cc: Just declare abort.
11731
11732 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
11733
11734         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
11735         whenever @ is a symbolic name.
11736
11737 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
11738
11739         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
11740
11741 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
11742
11743         * decl.c (pushdecl): Look up functions by DECL_NAME, not
11744         DECL_ASSEMBLER_NAME.
11745
11746 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
11747
11748         * decl2.c (c_language): Define.
11749
11750 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
11751
11752         * lex.c (lang_init_options): Tweak.
11753
11754         * decl2.c: Remove #inclusion of diagnostic.h
11755         (lang_decode_option): Move diagnostic formatting options to
11756         toplevel.
11757
11758         * lang-options.h: Remove documentation for diagnostic options.
11759
11760         * Makefile.in (lex.o): Depends upon diagnostic.h
11761
11762 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
11763
11764         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
11765         the same DECL_RESULT, it's not a redefinition.
11766         * pt.c (tsubst_decl): Remove code to handle illegal
11767         specializations.
11768
11769 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
11770
11771         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
11772
11773 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
11774
11775         * search.c (maybe_suppress_debug_info): Don't check
11776         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
11777
11778         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
11779         here if extern_p.
11780
11781         Remember instantiation context in deferred instantiations.
11782         * cp-tree.h (struct tinst_level): Remove.
11783         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
11784         * pt.c (current_tinst_level): Now a tree.
11785         (print_template_context, push_tinst_level, pop_tinst_level,
11786         tinst_for_decl): Adjust.
11787         (reopen_tinst_level): New fn.
11788         (init_pt): Register current_tinst_level as a root.
11789         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
11790         of the pending templates list.
11791         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
11792         * lex.c (extract_interface_info): Adjust.
11793         * decl2.c (warn_if_unknown_interface): Adjust.
11794
11795 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
11796
11797         * class.c (indirect_primary_base_p): New function.
11798         (determine_primary_base): Use it.
11799
11800 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
11801
11802         Update new-abi dynamic cast algorithm.
11803         * tinfo.cc (__class_type_info::__dyncast_result): Add
11804         whole_details. Adjust constructor.
11805         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
11806         Avoid unnecessary searching.
11807         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
11808
11809 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11810
11811         * decl.c (init_decl_processing): Don't call record_component_aliases.
11812         * tree.c (build_cplus_array_type_1): Likewise.
11813
11814 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
11815
11816         * ir.texi: Correct typo.
11817         * mangle.c (write_expression): Handle non-type template arguments
11818         with reference type.
11819         * method.c (build_overload_value): Likewise.
11820         * pt.c (convert_nontype_argument): Explicitly represent conversion
11821         to a reference with an ADDR_EXPR.
11822         (unify): Always unify arguments in left-to-right order.
11823
11824 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
11825             Mark Mitchell  <mark@codesourcery.com>
11826
11827         * Make-lang.in (CXX_SRCS): Add mangle.c.
11828         * Makefile.in (CXX_OBJS): Add mangle.o.
11829         (mangle.o): New rule.
11830
11831         * class.c (local_classes): New variable.
11832         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
11833         (get_vtt_name): Use mangle_vtt_name for new ABI.
11834         (init_class_processing): Initialize local_classes.
11835         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
11836         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
11837         (std_identifier): New macro.
11838         (DECL_VOLATILE_MEMFUNC_P): New macro.
11839         (DECL_NAMESPACE_STD_P): Likewise.
11840         (local_classes): Declare.
11841         (get_mostly_instantiated_function_type): Declare.
11842         (init_mangle): Declare.
11843         (mangle_decl): Likewise.
11844         (mangle_type_string): Likewise.
11845         (mangle_type): Likewise.
11846         (mangle_typeinfo_for_type): Likewise.
11847         (mangle_typeinfo_string_for_type): Likewise.
11848         (mangle_vtbl_for_type): Likewise.
11849         (mangle_vtt_for_type): Likewise.
11850         (mangle_ctor_vtbl_for_type): Likewise.
11851         (mangle_thunk): Likewise.
11852         (mangle_conv_op_name_for_type): Likewise.
11853         (mangle_guard_variable): Likewise.
11854         * decl.c (pushtag): Keep track of local classes.
11855         (initialize_predefined_identifiers): Initialize std_identifier.
11856         (init_decl_processing): Use std_identifier.
11857         (start_decl): Don't treat instantiations as specializations.
11858         (grokdeclarator): Likewise.
11859         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
11860         name for fully-instantiated templates.
11861         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
11862         destructors with the new ABI.
11863         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
11864         (grokfield): Use mangle_type for new ABI.
11865         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
11866         (get_sentry): Use mangle_guard_variable for new ABI.
11867         (start_static_initialization_or_destruction): Likewise.
11868         * expr.c (extract_aggr_init): Remove.
11869         (extract_scalar_init): Likewise.
11870         (extract_init): Remove #if 0'd code.
11871         * mangle.c: New function.
11872         * method.c (build_mangled_name): Assert not flag_new_abi.
11873         (build_static_name): Likewise.
11874         (build_decl_overload_real): Likewise.
11875         (build_typename_overload): Likewise.
11876         (build_overload_with_type): Likewise.
11877         (build_overload_name): Likewise.
11878         (get_ctor_vtbl_name): Likewise.
11879         (start_squangling): Likewise.
11880         (get_id_2): Likewise.
11881         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
11882         (init_method): Call init_mangle for new ABI.
11883         (make_thunk): Call mangle_thunk for new ABI.
11884         * operators.def: Correct new ABI manglings for the `%' operator.
11885         Add `::' operator.
11886         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
11887         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
11888         (lookup_template_class): Call mangle_decl for new ABI.
11889         (get_mostly_instantiated_function_type): New function.
11890         (set_mangled_name_for_template_decl): Use it.
11891         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
11892         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
11893         conversion op names.
11894         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
11895         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
11896         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
11897         mangle_typeinfo_string_for_type.
11898
11899 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
11900
11901         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
11902         (INNERMOST_TEMPLATE_ARGS): New macro.
11903         (innermost_args): Remove.
11904         (get_innermost_template_args): New function.
11905         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
11906         * error.c (dump_function_decl): Be caution when using
11907         most_general_template.
11908         * method.c (build_template_parm_names):  Use
11909         INNERMOST_TEMPLATE_ARGS.
11910         * pt.c (add_to_template_args): Tidy comment
11911         (get_innermost_template_args): New function.
11912         (check_explicit_specialization): Clear DECL_INITIAL for a new
11913         specialization.
11914         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
11915         Tidy.
11916         (push_template_decl): Always register specializations of the most
11917         general template.
11918         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
11919         (coerce_template_parms): Likewise.
11920         (lookup_template_class): Likewise.
11921         (innermost_args): Remove.
11922         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
11923         (tsubst_decl): Handle tricky specializations.  Use
11924         get_innermost_template_args.
11925         (instantiate_template): Simplify handling of partial
11926         instantiations.
11927         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
11928         (most_general_template): Reimplement, in a more straightforward
11929         manner.
11930         (regenerate_decl_from_template): Tweak formatting.  Use
11931         TMPL_ARGS_DEPTH for clarity.
11932         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
11933
11934         * dump.c (dequeue_and_dump): Dump information about thunks.
11935
11936 2000-06-01  Richard Henderson  <rth@cygnus.com>
11937
11938         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
11939
11940 2000-06-01  Richard Henderson  <rth@cygnus.com>
11941
11942         * decl2.c (unsupported_options): Fix typo, make const.
11943         (lang_decode_option): Fix bsearch argument order.
11944
11945 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
11946
11947         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
11948         on FIELD_DECLs.
11949
11950 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11951
11952         * cp-tree.h (c_get_alias_set): Deleted.
11953         * Makefile.in (decl.o): Include ../expr.h.
11954         * decl.c (expr.h): Include.
11955         (init_decl_processing): Call record_component_aliases for arrays.
11956         (grokdeclarator): Likewise.
11957         Set TREE_ADDRESSABLE for fields that aren't bitfields.
11958         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
11959
11960 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
11961
11962         Remove guiding declaration support.
11963         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
11964         (flag_guiding_decls): Remove.
11965         * call.c (build_user_type_conversion_1): Remove support for
11966         guiding decls.
11967         (build_new_function_call): Likewise.
11968         (build_new_op): Likewise.
11969         (build_new_method_call): Likewise.
11970         * decl.c (start_function): Likewise.
11971         * friend.c (is_friend): Likewise.
11972         (do_friend): Likewise.
11973         * decl2.c ((flag_dump_translation_unit): Make it const.
11974         (flag_guiding_decls): Remove.
11975         (unsupported_options): New variable
11976         (compare_options): New function.
11977         (lang_decode_option): Use them.
11978
11979         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
11980
11981         * method.c (mangle_expression): Adjust test for legal expression
11982         operators.
11983
11984         * pt.c (instantiate_decl): Save and restore the local
11985         specializations list.
11986
11987 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
11988
11989         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
11990
11991 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
11992
11993         * call.c (add_template_candidate_real): Handle member template
11994         constructors for classes with virtual bases.
11995         (build_user_type_conversion_1): Use in_charge_arg_for_name.
11996         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
11997
11998         * ir.texi: Update thunk documentation.
11999
12000         * call.c (joust): Fix handling of overloaded builtin operators.
12001
12002 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
12003
12004         * cp-tree.h (DECL_ANTICIPATED): New macro.
12005         Document new use of DECL_LANG_FLAG_7.
12006         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
12007         in the user namespace.
12008         * lex.c (do_identifier): If the identifier's declaration has
12009         DECL_ANTICIPATED on, it has not yet been declared.  But do not
12010         replace it with an ordinary implicit declaration.
12011
12012         * tinfo2.cc: Include stdlib.h.
12013
12014 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
12015
12016         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
12017         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
12018         CLASSTYPE_ALIGN.
12019
12020 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
12021
12022         * decl2.c (lang_decode_option): Use skip_leading_substring instead
12023         of plain strncmp.
12024
12025 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
12026
12027         * operators.def (<?): Duplicated, should have been...
12028         (>?): this.  Fixed.
12029
12030 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
12031             Mark Mitchell  <mark@codesourcery.com>
12032
12033         * cp-tree.h (ansi_opname): Make it a macro.
12034         (ansi_assopname): Likewise.
12035         (struct lang_decl_flags): Add assignment_operator_p.
12036         (struct lang_decl): Add operator_code.
12037         (DECL_VTT_PARM): Adjust.
12038         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
12039         overloaded operator.
12040         (SET_OVERLOADED_OPERATOR_CODE): New macro.
12041         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
12042         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
12043         (opname_tab): Remove.
12044         (assignop_tab): Likewise.
12045         (operator_name_info_t): New type.
12046         (operator_name_info): New variable.
12047         (assignment_operator_name_info): Likewise.
12048         (build_cp_library_fn): Remove declaration.
12049         (push_cp_library_fn): Likewise.
12050         (operator_name_string): Likewise.
12051         (build_decl_overload): Likewise.
12052         * call.c (print_z_candidates): Simplify.
12053         (build_object_call): Adjust usage of ansi_opname.  Use
12054         DECL_OVERLOADED_OPERATOR_P.
12055         (op_error): Adjust operator name lookup.
12056         (build_conditional_expr): Adjust usage of ansi_opname.
12057         (build_new_op): Likewise.
12058         (build_op_delete_call): Likewise.
12059         (build_over_call): Likewise.
12060         (joust): Use DECL_OVERLOADED_OPERATOR_P.
12061         * decl.c (duplicate_decls): Copy operator_code.
12062         (init_decl_processing): Adjust parameters to push_cp_library_fn.
12063         (builtin_function): Adjust parameters to build_library_fn_1.
12064         (build_library_fn_1): Accept an overloaded operator code.
12065         (build_library_fn): Pass ERROR_MARK.
12066         (build_cp_library_fn): Accept an overloaded operator code.
12067         (push_cp_library_fn): Likewise.
12068         (grokfndecl): Tweak.
12069         (grokdeclarator): Simplify code to compute names of overloaded
12070         operators.  Adjust use of ansi_opname.
12071         (ambi_op_p): Work on tree_codes, not identifiers.
12072         (unary_op_p): Likewise.
12073         (grok_op_properties): Likewise.
12074         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
12075         (lang_mark_tree): Don't try to mark the operator_code.
12076         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
12077         * error.c (dump_decl): Remove special handling for operator
12078         names.
12079         (dump_function_name): Likewise.
12080         (dump_expr): Adjust name lookup of operators.
12081         (op_to_string): Simplify.
12082         (assop_to_string): Likewise.
12083         * init.c (build_new_1): Adjust use of ansi_opname.
12084         * lex.c (opname_tab): Remove.
12085         (assignop_tab): Likewise.
12086         (ansi_opname): Likewise.
12087         (ansi_assopname): Likewise.
12088         (operator_name_string): Likewise.
12089         (reinit_lang_specific): Likewise.
12090         (operator_name_info): New variable.
12091         (assignment_operator_name_info): Likewise.
12092         (init_operators): New function.
12093         (init_parse): Use it.
12094         (do_identifier): Adjust use of ansi_opname.
12095         * method.c (mangle_expression): Don't use ansi_opname for
12096         mangling.
12097         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
12098         (build_decl_overload): Remove.
12099         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
12100         (do_build_assign_ref): Adjust use of ansi_opname.
12101         (synthesize_method): Likewise.
12102         (implicitly_declare_fn): Likewise.
12103         * operators.def: New file.
12104         * parse.y (operator): Adjust use of ansi_opname.
12105         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
12106         (set_mangled_name_for_template_decl): Don't play games with
12107         current_namespace.
12108         (special_function_p): Adjust use of ansi_opname.
12109         * typeck.c (check_return_expr): Likewise.
12110         * Make-lang.in (cc1plus): Depend on operators.def.
12111         * Makefile.in (lex.o): Likewise.
12112         (decl.o): Likewise.
12113
12114 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
12115
12116         * Make-lang.in (cplib2.ready): Eradicate.
12117
12118 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12119
12120         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
12121         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
12122         (built_min, cp_tree_equal): Likewise.
12123
12124 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
12125
12126         * class.c (layout_nonempty_base_or_field): Replace
12127         `record_layout_info' with `record_layout_info_s'.
12128
12129 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
12130
12131         Fix goto checking.
12132         * cp-tree.h (struct language_function): x_named_labels is now
12133         a struct named_label_list*.
12134         * decl.c (struct named_label_use_list): Renamed from...
12135         (struct named_label_list): ...this.  New struct.
12136         (push_binding_level): Don't set eh_region.
12137         (note_level_for_eh): New fn.
12138         (pop_label): Take label and old value directly.
12139         (pop_labels): Adjust for new named_labels format.
12140         (lookup_label): Likewise.
12141         (poplevel): Note characteristics of a binding level containing a
12142         named label.  Mess with named label lists earlier.
12143         (mark_named_label_lists): New fn.
12144         (mark_lang_function): Call it.
12145         (use_label): New fn, split out from...
12146         (make_label_decl): ...here.  Don't call it.
12147         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
12148         check_previous_gotos): New fns, split out from...
12149         (define_label): ...here.
12150         (check_switch_goto): New fn.
12151         (define_case_label): Call it.
12152         (check_goto): New fn.
12153         * semantics.c (finish_goto_stmt): Call it and use_label.
12154         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
12155         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
12156
12157 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
12158
12159         * class.c (build_vtable_entry_ref): Correct usage of
12160         get_vtbl_decl_for_binfo.
12161
12162         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
12163         * method.c (implicitly_declare_fn): Not here.
12164
12165 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
12166
12167         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
12168         (CPTI_PTMD_DESC_TYPE): ... here.
12169         (ptmd_desc_type_node): Rename to ...
12170         (ptm_desc_type_node): ... here.
12171         * decl.c: Likewise.
12172         * rtti.c (ptmd_initializer): Rename to ...
12173         (ptm_initializer): ... here.
12174         (sythesize_tinfo_var): Adjust. Deal with pointer to member
12175         function.
12176         (create_tinfo_types): Adjust.
12177
12178 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
12179
12180         Finish implementation of VTTs.
12181         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
12182         CPTI_VTT_PARM_IDENTIFIER.
12183         (vtt_parm_identifier): New macro.
12184         (vtt_parm_type): Likewise.
12185         (BINFO_SUBVTT_INDEX): Likewise.
12186         (BINFO_VPTR_INDEX): Likewise.
12187         (struct lang_decl): Add vtt_parm.
12188         (DECL_VTT_PARM): New macro.
12189         (DECL_USE_VTT_PARM): Likewise.
12190         (DECL_NEEDS_VTT_PARM_P): Likewise.
12191         (get_vtt_name): Declare.
12192         (build_artificial_parm): Likewise.
12193         (fixup_all_virtual_upcast_offsets): Likewise.
12194         (expand_indirect_vtbls_init): Remove.
12195         * call.c (build_new_method_call): Pass the vtt to subobject
12196         constructors and destructors.
12197         * class.c (get_vtt_name): Give it external linkage.
12198         (build_clone): Handle the magic VTT parameters for clones.
12199         (clone_function_decl): Fix typo in comment.
12200         (build_vtt): Keep track of the indices in the VTTs where various
12201         entities are stored.
12202         (build_vtt_inits): Likewise.
12203         (dfs_build_vtt_inits): Likewise.
12204         (build_ctor_vtbl_group): Tweak type of construction vtables.
12205         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
12206         primary bases, when building construction vtables.
12207         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
12208         (initialize_predefined_identifiers): Add vtt_parm_identifier.
12209         (init_decl_processing): Initialize vtt_parm_type.
12210         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
12211         (lang_mark_tree): Make vtt_parm.
12212         * decl2.c (build_artificial_parm): New function.
12213         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
12214         (grokclassfn): Use build_artificial_parm.
12215         * init.c (initialize_vtbl_ptrs): Call
12216         fixup_all_virtual_upcast_offsets directly.
12217         (perform_member_init): Use the complete subobject destructor for
12218         member cleanups.
12219         (build_vtbl_address): New function.
12220         (expand_virtual_init): Handle VTTs.
12221         * optimize (maybe_clone_body): Likewise.
12222         * search.c (fixup_all_virtual_upcast_offsets): Give it external
12223         linkage.
12224         (expand_indirect_vtbls_init): Remove.
12225         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
12226         * tree.c (make_binfo): Make them bigger.
12227
12228 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
12229
12230         * inc/cxxabi.h (__pbase_type_info): Define, based on
12231         __pointer_type_info.
12232         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
12233         (__pointer_to_member_type_info): Likewise.
12234         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
12235         (__pointer_to_member_type_info::__is_pointer_p): Remove.
12236         (__pointer_type_info::__do_catch): Rename to ...
12237         (__pbase_type_info::__do_catch): ... here. Adjust.
12238         (__pbase_type_info::__pointer_catch): Implement.
12239         (__pointer_type_info::__pointer_catch): Adjust.
12240         (__pointer_to_member_type_info::__pointer_catch): Adjust.
12241
12242 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
12243
12244         * tinfo.h (__user_type_info::contained_virtual_p): New
12245         predicate.
12246         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
12247         shaped hierarchy.
12248         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
12249         diamond shaped hierarchy. Add early out for mixed diamond and
12250         duplicate shaped hierarchy.
12251
12252 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
12253
12254         * cp-tree.h (build_delete): Change prototype.
12255         (build_vec_delete): Likewise.
12256         * call.c (build_scoped_method_call): Use special_function_kind
12257         values to indicate the kind of destruction to be done.
12258         (build_method_call): Likewise.
12259         * decl.c (finish_destructor_body): Likewise.
12260         (maybe_build_cleanup_1): Likewise.  Rename to ...
12261         (maybe_build_cleanup): ... this.
12262         * decl2.c (delete_sanity): Use special_function_kind
12263         values to indicate the kind of destruction to be done.
12264         (build_cleanup): Likewise.
12265         * init.c (perform_member_init): Likewise.
12266         (build_vec_delete_1): Likewise.
12267         (build_dtor_call): Simplify.
12268         (build_delete): Use special_function_kind
12269         values to indicate the kind of destruction to be done.
12270         (build_vbase_delete): Likewise.
12271         (build_vec_delete): Likewise.
12272
12273         * init.c (sort_member_init): Fix typo in error message generation
12274         code.
12275
12276 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
12277
12278         * semantics.c (begin_class_definition): make the packed
12279         attribute be sensitive to the "-fpack-struct" command line flag
12280
12281 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
12282
12283         Update new-abi upcast algorithm.
12284         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
12285         prototype and meaning of return value.
12286         (__si_class_type_info::__do_upcast): Likewise.
12287         (__vmi_class_type_info::__do_upcast): Likewise.
12288         * tinfo.cc (__class_type_info::__upcast_result): Replace
12289         whole2dst with part2dst. Adjust ctor.
12290         (__class_type_info::__do_upcast): Adjust call of worker function.
12291         (__class_type_info::__do_upcast): Adjust.
12292         (__si_class_type_info::__do_upcast): Adjust. Use parent's
12293         __do_upcast.
12294         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
12295         virtual base in diamond hierarchy bug.
12296
12297 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
12298
12299         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
12300         and bitfield to tinfo_fn_p.
12301         (DECL_TINFO_FN_P): Adjust.
12302         (SET_DECL_TINFO_FN_P): Likewise.
12303         (DECL_MUTABLE_P): Likewise.
12304         (DECL_C_BIT_FIELD): Likewise.
12305         (SET_DECL_C_BIT_FIELD): Likewise.
12306         (CLEAR_DECL_C_BIT_FIELD): Likewise.
12307         (DECL_UNINLINABLE): Likewise.
12308         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
12309         (handle_using_decl): Remove assertion.
12310         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
12311         to build FIELD_DECLs.
12312         (build_base_field): Likewise.
12313         (layout_class_type): Likewise.
12314         * decl.c (init_decl_processing): Likewise.
12315         (build_ptrmemfunc_type): Likewise.
12316         (grokdeclarator): Likewise.
12317         * decl2.c (grok_x_components): Likewise.
12318         * except.c (call_eh_info): Likewise.
12319         * init.c (init_init_processing): Likewise.
12320         * rtti.c (expand_class_desc): Likewise.
12321         (create_pseudo_type_info): Likewise.
12322         (get_vmi_pseudo_type_info): Likewise.
12323         (create_tinfo_types): Likewise.
12324         * ptree.c (print_lang_decl): Adjust.
12325         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
12326         before checking DECL_MUTABLE_P.
12327
12328         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
12329         parameters for template functions.
12330         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
12331         destructors as well as constructors.
12332
12333 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
12334
12335         * class.c (build_ctor_vtbl_group): Set inits.
12336         * optimize.c (maybe_clone_body): Set DECL_INLINE and
12337         DECL_THIS_INLINE appropriately for clones.
12338
12339         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
12340         (DECL_CONV_FN_P): Simplify.
12341         (DECL_OPERATOR): Remove.
12342         (language_to_string): Declare.
12343         * decl.c (duplicate_decls): Fix typo in comment.
12344         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
12345         (grok_op_properties): Use DECL_CONV_FN_P instead of
12346         IDENTIFIER_TYPENAME_P.
12347         * dump.c (dequeue_and_dump): Dump the language linkage of
12348         declarations.
12349         * error.c (language_to_string): Give it external linkage.
12350         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
12351         (implicitly_declare_fn): Set DECL_LANGUAGE.
12352         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
12353         IDENTIFIER_TYPENAME_P.
12354         (tsubst_decl): Likewise.
12355         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
12356         * semantics.c (finish_member_declaration): Don't mark members of
12357         classes declared in an extern "C" region as extern "C".
12358
12359 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12360
12361         * decl2.c (qualified_lookup_using_namespace): Look through
12362         namespace aliases.
12363
12364         * decl.c (push_using_decl): Return the old decl on namespace level.
12365
12366 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
12367
12368         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
12369         (VTT_NAME_PREFIX): New macro.
12370         (CTOR_VTBL_NAME_PREFIX): Likewise.
12371         (get_ctor_vtbl_name): New function.
12372         * class.c (get_vtable_name): Simplify.
12373         (get_vtt_name): New function.
12374         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
12375         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
12376         when a virtual base becomes primary.
12377         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
12378         VTTs.
12379         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
12380         additional parameters.
12381         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
12382         (initialize_array): New function.
12383         (build_vtt): Likewise.
12384         (build_vtt_inits): Likewise.
12385         (dfs_build_vtt_inits): Likewise.
12386         (dfs_fixup_binfo_vtbls): Likewise.
12387         (build_ctor_vtbl_group): Likewise.
12388         (initialize_vtable): Use initialize_array.
12389         (accumulate_vtbl_inits): Reimplement to handle construction
12390         vtables.
12391         (dfs_accumulate_vtbl_inits): Likewise.
12392         (bulid_vtbl_initializer): Adjust parameter name.
12393         * method.c (build_typename_overload): Remove #if 0'd code.
12394         (get_ctor_vtbl_name): New function.
12395         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
12396         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
12397
12398         * cp-tree.h (struct lang_type): Remove search_slot.
12399         (CLASSTYPE_SEARCH_SLOT): Remove.
12400         (emit_base_init): Change prototype.
12401         (initialize_vtbl_ptrs): Likewise.
12402         (expand_indirect_vtbls_init): Likewise.
12403         (clear_search_slots): Remove.
12404         * decl.c (lang_mark_tree): Don't mark search_slot.
12405         * init.c (initialize_vtbl_ptrs): Simplify.
12406         (emit_base_init): Likewise.
12407         * search.c (struct vbase_info): Document decl_ptr.
12408         (convert_pointer_to_single_level): Remove.
12409         (dfs_find_vbases): Remove.
12410         (dfs_init_base_pointers): Simplify.
12411         (dfs_clear_vbase_slots): Remove.
12412         (dfs_vtable_path_unmark): New function.
12413         (init_vbase_pointers): Simplify.
12414         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
12415         (expand_indirect_vtbls_init): Simplify.  Don't call
12416         mark_all_temps_used.
12417         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
12418         initialize_vtbl_ptrs.
12419
12420 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
12421
12422         * except.c: Add static prototypes.
12423
12424 2000-05-20  H.J. Lu  <hjl@gnu.org>
12425
12426         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
12427
12428 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
12429
12430         Don't create a separate copy of virtual bases for the
12431         CLASSTYPE_VBASECLASSES list.
12432         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
12433         (BINFO_FOR_VBASE): Remove.
12434         (CANONICAL_BINFO): Adjust.
12435         (binfo_for_vbase): New function.
12436         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
12437         instead of BINFO_FOR_VBASE.
12438         (build_vbase_pointer): Likewise.
12439         (build_secondary_vtable): Likewise.
12440         (dfs_mark_primary_bases): Likewise.
12441         (mark_primary_bases): Likewise.
12442         (layout_nonempty_base_or_field): Likewise.
12443         (dfs_set_offset_for_shared_vbases): Likewise.
12444         (dfs_set_offset_for_unshared_vbases): Likewise.
12445         (layout_virtual_bases): Likewise.  Adjust for changes to the
12446         CLASSTYPE_VBASECLASSES list.
12447         (dump_class_hierarchy_r): Use binfo_for_vbase
12448         instead of BINFO_FOR_VBASE.
12449         (dump_class_hierarchy): Likewise.
12450         (finish_vtbls): Likewise.
12451         (build_vtbl_initializer): Adjust for changes to the
12452         CLASSTYPE_VBASECLASSES list.
12453         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
12454         * decl.c (finish_destructor_body): Adjust for changes to the
12455         CLASSTYPE_VBASECLASSES list.
12456         * init.c (sort_base_init): Use binfo_for_vbase.
12457         (construct_virtual_bases): Adjust for changes to the
12458         CLASSTYPE_VBASECLASSES list.
12459         (expand_member_init): Use binfo_for_vbase.
12460         (build_vbase_delete):  Adjust for changes to the
12461         CLASSTYPE_VBASECLASSES list.
12462         * method.c (do_build_copy_constructor): Likewise.
12463         * rtti.c (get_base_offset): Use binfo_for_vbase.
12464         (expand_class_desc): Remove #if 0'd code.
12465         * search.c (struct vbase_info): Remove vbase_types.
12466         (get_base_distance):  Use binfo_for_vbase.
12467         (lookup_field_queue_p): Use CANONICAL_BINFO.
12468         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
12469         (get_pure_virtuals): Adjust for changes to the
12470         CLASSTYPE_VBASECLASSES list.
12471         (dfs_find_vbases): Use binfo_for_vbase.
12472         (dfs_init_vbase_pointers): Likewise.
12473         (init_vbase_pointers): Don't initialize vi.vbase_types.
12474         (virtual_context): Use binfo_for_vbase.
12475         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
12476         CLASSTYPE_VBASECLASSES list.
12477         (expand_indirect_vtbls_init): Simplify.
12478         (dfs_get_vbase_types): Don't replicate virtual bases.
12479         (find_vbase_instance): Use binfo_for_vbase.
12480         (binfo_for_vbase): New function.
12481         * typeck.c (get_delta_difference): Use binfo_for_vbase.
12482
12483 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
12484
12485         * decl2.c (finish_anon_union): Generalize error messages to handle
12486         anonymous structures.
12487         * init.c (perform_member_init): Remove `name' parameter.
12488         (build_field_list): New function.
12489         (sort_member_init): Handle anonymous union initialization order
12490         correctly.  Check for multiple initializations of the same union.
12491         (emit_base_init): Don't look up fields by name here.
12492         (expand_member_init): Record the result of name lookup for future
12493         reference.
12494         * typeck.c (build_component_ref): Fix formatting.
12495
12496 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
12497
12498         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
12499         * typeck.c (build_x_compound_expr): Replace warn_unused with
12500         warn_unused_value.
12501
12502         * decl2.c (lang_decode_option): Update -Wall unused flags by
12503         calling set_Wunused.
12504
12505 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
12506
12507         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
12508         * init.c (dfs_vtable_path_unmark): Remove.
12509         * search.c (marked_new_vtable_p): Likewise.
12510         (unmarked_new_vtable_p): Likewise.
12511         (dfs_search_slot_nonempty_p): Likewise.
12512         (dfs_mark): Likewise.
12513         (dfs_vtable_path_unmark): Likewise.
12514         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
12515         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
12516         (dfs_init_vbase_pointers): Remove special-case new ABI code.
12517         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
12518         (init_vbase_pointers): Simplify.
12519         (expand_indirect_vtbls_init): Likewise.
12520
12521         * class.c (copy_virtuals): New function.
12522         (build_primary_table): Use it.
12523         (build_secondary_vtable): Likewise.
12524         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
12525         indicate that no vcall offset is required.
12526         (add_virtual_function): Likewise.
12527         (modify_all_vtables): Likewise.
12528         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
12529         (dfs_accumulate_vtbl_inits): Likewise.
12530         (build_vtbl_initializer): Make changes to handle construction
12531         vtables.
12532         (dfs_build_vcall_offset_vtbl_entries): Likewise.
12533         (build_rtti_vtbl_entries): Likewise.
12534         (build_vtable_entries): Handle a NULL vcall_index.
12535
12536 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
12537
12538         * decl2.c (lang_decode_option): Fix thinko.
12539
12540 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
12541
12542         * except.c (check_handlers): New fn.
12543         * cp-tree.h: Declare it.
12544         * semantics.c (finish_handler_sequence): Call it.
12545         (finish_function_handler_sequence): Likewise.
12546         (finish_handler_parms): Set TREE_TYPE on the handler.
12547         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
12548         * search.c (get_base_distance_recursive): If protect>1, ignore
12549         special access.
12550         (get_base_distance): Don't reduce watch_access.
12551
12552 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
12553
12554         * lex.c: #include diagnostic.h.
12555         (lang_init_options): Set default prefixing rules.
12556
12557         * lang-options.h: Add -fdiagnostics-show-location=.
12558
12559         * decl2.c: #include diagnostic.h.
12560         (lang_decode_option): Handle -fdiagnostics-show-location=.
12561
12562 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
12563
12564         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
12565         * vec.cc: Revert my 2000-05-07 change.
12566
12567 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
12568
12569         * class.c (check_field_decls): Complain about non-static data
12570         members with same name as class in class with constructor.
12571
12572 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
12573
12574         * decl.c (grokdeclarator): Allow non-static data members with
12575         same name as class.
12576
12577 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
12578
12579         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
12580         and pending_inline.filename.  Update prototypes.
12581         * decl.c (define_label): Constify filename parameter.
12582         * decl2.c (warn_if_unknown_interface): Constify local char *.
12583         * input.c Constify input_source.filename. Don't declare
12584         input_filename or lineno.  Constify filename parameter to feed_input.
12585         * lex.c (init_parse): Constify parameter and return value.
12586         (cp_pragma_interface, cp_pragma_implementation): Constify
12587         filename argument.
12588         (reinit_parse_for_method, reinit_parse_for_block,
12589         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
12590         Constify local char *.
12591         * pt.c: Don't declare lineno or input_filename.
12592         (print_template_context, tsubst_friend_function, tsubst_decl,
12593         tsubst, instantiate_decl): Constify local char *.
12594         * semantics.c (expand_body): Constify local char *.
12595         * tree.c (build_srcloc): Constify filename parameter.
12596         * typeck.c (c_expand_asm_operands): Constify filename
12597         parameter.
12598
12599 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
12600
12601         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
12602         offsetof expansion.
12603
12604 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
12605
12606         * inc/cxxabi.h:  Fix typos in comment.
12607         (__base_class_info::__offset): Use a static_cast.
12608
12609 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
12610
12611         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
12612         of std::size_t and std::ptrdiff_t respectively.
12613         * tinfo.cc: Likewise.
12614         * vec.cc: Likewise.
12615
12616 2000-05-06  Richard Henderson  <rth@cygnus.com>
12617
12618         * typeck.c (build_c_cast): Don't warn integer->pointer size
12619         mismatch for constants.
12620
12621 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
12622
12623         * rtti.c (ptmd_initializer): Set non-public, if class is
12624         incomplete.
12625
12626         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
12627         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
12628         __cxa_vec_delete): Likewise.
12629         * tinfo.cc (__dynamic_cast): Likewise.
12630         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
12631         __cxa_vec_delete): Likewise.
12632
12633 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
12634
12635         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
12636         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
12637         (lang_decl_flags): Add vcall_offset.
12638         (THUNK_VCALL_OFFSET): Use it.
12639         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
12640         * method.c (make_thunk): Create the lang_decl here, not in
12641         emit_thunk.
12642         (emit_thunk): Make generic thunks into ordinary functions once
12643         they have been fed to expand_body.
12644         * semantics.c (expand_body): Set current_function_is_thunk here.
12645
12646 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12647
12648         * class.c (update_vtable_entry_for_fn): Prototype.
12649
12650         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
12651         and `tmpl'.
12652
12653         * search.c (dfs_build_inheritance_graph_order): Prototype.
12654
12655 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
12656
12657         * cp-tree.h (special_function_kind): Add various kinds of
12658         destructors.
12659         (special_function_p): New function.
12660         * class.c (overrides): Don't let one kind of destructor override
12661         another.
12662         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
12663         whether or not to instantiate a template.
12664         * tree.c (special_function_p): Define.
12665
12666 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
12667
12668         * cp-tree.def (THUNK_DECL): Remove.
12669         * cp-tree.h (DECL_THUNK_P): New macro.
12670         (DECL_NON_THUNK_FUNCTION_P): Likewise.
12671         (DECL_EXTERN_C_FUNCTION_P): Likewise.
12672         (SET_DECL_THUNK_P): Likewise.
12673         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
12674         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
12675         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
12676         * decl.c (decls_match): Use DECL_EXTERN_C_P.
12677         (duplicate_decls): Likewise.
12678         (pushdecl): Likewise.  Adjust thunk handling.
12679         (grokfndecl): Use DECL_EXTERN_C_P.
12680         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
12681         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
12682         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
12683         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
12684         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
12685         DECL_NO_STATIC_CHAIN.
12686         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
12687         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
12688         * search.c (covariant_return_p): Remove THUNK_DECL handling.
12689         * ir.texi: Update.
12690
12691 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
12692
12693         * tree.c (walk_tree): Set lineno.
12694
12695 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
12696
12697         * exception.cc: Update license notice.
12698         * new.cc: Likewise.
12699         * new1.cc: Likewise.
12700         * new2.cc: Likewise.
12701         * tinfo.cc: Likewise.
12702         * tinfo2.cc: Likewise.
12703         * vec.cc: Likewise.
12704         * inc/cxxabi.h: Likewise.
12705         * inc/exception: Likewise.
12706         * inc/new: Likewise.
12707         * inc/new.h: Likewise.
12708         * inc/typeinfo: Likewise.
12709
12710 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
12711
12712         * tree.c (build_target_expr_with_type): If we already have a
12713         TARGET_EXPR, just return it.
12714
12715         * optimize.c (initialize_inlined_parameters): Don't generate an
12716         EXPR_STMT if we can just use DECL_INITIAL.
12717         * decl.c (emit_local_var): Only make the initialization a
12718         full-expression if stmts_are_full_exprs_p.
12719
12720 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
12721
12722         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
12723         macro.
12724         * call.c (standard_conversion): Use it.
12725         (direct_reference_binding): Likewise.
12726         (build_over_call): Likewise.
12727         (is_properly_derived_from): Likewise.
12728         (compare_ics): Likewise.
12729         * class.c (resolves_to_fixed_type_p): Likewise.
12730         * optimize.c (declare_return_variable): Likewise.
12731         * pt.c (is_specialization_of): Likewise.
12732         (unify): Likewise.
12733         * typeck.c (comp_target_parms): Likeiwse.
12734         (build_static_cast): Likewise.
12735         (build_reinterpret_cast): Likewise.
12736         (build_const_cast): Likewise.
12737         (comp_ptr_ttypes_real): Likewise.
12738         (comp_ptr_ttypes_const): Likewise.
12739         * typeck2.c (process_init_constructor): Likewise.
12740
12741 2000-04-30  Scott Snyder <snyder@fnal.gov>
12742
12743         * decl.c (finish_destructor_body): Use the base destructor when
12744         destroying virtual bases.
12745
12746 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
12747
12748         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
12749         STMT_EXPRs.
12750         * optimize.c (struct inline_data): Add target_exprs field.
12751         (declare_return_variable): When a function returns an aggregate,
12752         use the variable declared in the TARGET_EXPR as the remapped
12753         DECL_RESULT.
12754         (expand_call_inline): Update the pending target_exprs stack.
12755         (optimize_function): Initialize the stack.
12756
12757         * decl2.c (finish_file): Fix typo in comment.
12758
12759         * method.c (emit_thunk): Don't try to return a `void' value.
12760
12761         * optimize.c (initialize_inlined_parameters): If the parameter is
12762         addressable, we need to make a new VAR_DECL, even if the
12763         initializer is constant.
12764
12765 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
12766
12767         * decl.c (grok_op_properties): Add an extra check of argtypes.
12768
12769 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
12770
12771         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
12772         variables.
12773         (initialize_inlined_parameters): Try to avoid creating new
12774         VAR_DECLs.
12775
12776 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
12777
12778         * lex.c (my_get_run_time): Remove.
12779         (init_filename_times): Use get_run_time instead of my_get_run_time.
12780         (check_newline): Likewise.
12781         (dump_time_statistics): Likewise.
12782         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
12783         of computing elapsed time explicitly.
12784
12785 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
12786
12787         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
12788         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
12789         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
12790         before calling decl_constant_value.
12791         * class.c (check_bitfield_decl): Likewise.
12792         * cvt.c (ocp_convert): Likewise.
12793         (convert): Likewise.
12794         * decl.c (compute_array_index_type): Likewise.
12795         (build_enumerator): Likewise.
12796         * decl2.c (check_cp_case_value): Likewise.
12797         * pt.c (convert_nontype_argument): Likewise.
12798         (tsubst): Likewise.
12799         * typeck.c (decay_conversion): Likewise.
12800         (build_compound_expr): Likewise.
12801         (build_reinterpret_cast): Likewise.
12802         (build_c_cast): Likewise.
12803         (convert_for_assignment): Likewise.
12804
12805 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
12806
12807         * decl.c (finish_function): Don't play games with DECL_INLINE.
12808
12809 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
12810
12811         * ir.texi: Correct typo.
12812
12813 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12814
12815         * decl.c (grokdeclarator): Reject VLAs as members.
12816
12817 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
12818
12819         * call.c (standard_conversion): Accept conversion between
12820         COMPLEX_TYPEs.
12821
12822         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
12823
12824 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
12825
12826         * decl2.c (finish_file): Remove double setup for accounting
12827         compile time.
12828
12829 2000-04-24  Robert Lipe <robertlipe@usa.net>
12830
12831         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
12832
12833 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
12834
12835         * new.cc (set_new_handler): Needs to be in std::.
12836
12837 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
12838
12839         * cp-tree.h (lang_decl): Remove pretty_function_p.
12840         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
12841         language-specific node.
12842         * decl.c (cp_make_fname_decl): Use build_decl, not
12843         build_lang_decl, to build the variables.
12844         (grokvardecl): Don't call build_lang_decl for local variables in
12845         templates.
12846         (grokdeclarator): Don't call build_lang_decl for local type
12847         declarations in templates.
12848         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
12849         zero'd memory, rather than calling memset.
12850         * pt.c: Include hashtab.h.
12851         (local_specializations): New variable.
12852         (retrieve_local_specialization): Use it.
12853         (register_local_specialization): Likewise.
12854         (tsubst_decl): Don't assume local variables have
12855         DECL_LANG_SPECIFIC.
12856         (instantiate_decl): Set up local_specializations.
12857         * Makefile.in (HTAB_H): New variable.
12858
12859 2000-04-23  Richard Henderson  <rth@cygnus.com>
12860
12861         * typeck.c (c_expand_asm_operands): Restore the original
12862         contents of the output list.
12863
12864 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
12865
12866         * ir.texi:  Document complex number representation.
12867
12868 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12869
12870         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
12871         (target_incomplete_p): New function.
12872         (tinfo_base_init): Create comdat NTBS name variable.
12873         (ptr_initializer): Add non_public parameter. Calculate it.
12874         (ptmd_initializer): Likewise.
12875         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
12876         (create_real_tinfo_var): Add non_public parameter. Use it.
12877         Push proxy into global namespace.
12878         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
12879         New enumeration.
12880         * inc/typeinfo (type_info::before, type_info::operator==):
12881         Compare __name addresses.
12882
12883         * tinfo2.cc: Remove new-abi builtins comment.
12884
12885 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
12886
12887         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
12888
12889         * call.c (joust): Exit early if we get the same function, too.
12890
12891         * decl2.c (key_method): Return NULL_TREE for template classes.
12892         (import_export_class): Don't need to check for template classes.
12893
12894 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
12895
12896         * lex.c: Remove references to cccp.c.
12897
12898 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
12899
12900         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
12901         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
12902         (DECL_DESTRUCTOR_P): Use destructor_attr.
12903         (DECL_CONST_MEMFUNC_P): Reimplement.
12904         (DECL_VOLATILE_MEMFUNC_P): Remove.
12905         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
12906         (overrides): Use DECL_DESTRUCTOR_P.
12907         (check_for_override): Likewise.
12908         * decl.c (start_function): Likewise.
12909         * decl2.c (grokfclassfn): Likewise.
12910         (check_classfn): Likewise.
12911         (grok_function_init): Likewise.
12912
12913 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
12914
12915         * decl2.c (grokfield): Issue error on illegal data member
12916         declaration.
12917
12918 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
12919
12920         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
12921
12922 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
12923
12924         * class.c (build_vtable_entry): Don't build thunks for type-info
12925         functions.
12926
12927 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
12928
12929         * decl.c (decls_match): Allow a redeclaration of a builtin to
12930         specify args while the builtin did not.
12931
12932 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
12933
12934         * cp-tree.def (THUNK_DECL): Add to documentation.
12935         * cp-tree.h (flag_huge_objects): Declare.
12936         * class.c (modify_vtable_entry): Tidy.
12937         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
12938         Calculate delta appropriately for the new ABI.
12939         (dfs_modify_vtables): Use it.
12940         (modify_all_vtables): Fix thinko in code to add overriding copies
12941         of functions to primary vtables.
12942         (build_clone): Fix typo in comment.
12943         (clone_function_decl): Correct order of destructors in vtable.
12944         (build_vbase_offset_vtbl_entries): Adjust comment.
12945         (dfs_vcall_offset_queue_p): Remove.
12946         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
12947         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
12948         (build_vtable_entry): Correct check for pure virtual functions.
12949         Don't declare flag_huge_objects.
12950         * decl.c (flag_huge_objects): Remove declaration.
12951         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
12952         Use int_size_in_bytes.
12953         (emit_thunk): Handle vcall offset thunks.
12954
12955 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12956
12957         * decl2.c (parse_time, varconst_time): Delete declarations.
12958         (finish_file): Delete LINENO declaration.
12959         START_TIME and THIS_TIME now long.
12960
12961 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
12962
12963         * class.c (build_base_field): Reformat comment.
12964
12965         * inc/cxxabi.h (stddef.h): Comment inclusion.
12966         (__base_class_info::__offset): Comment shift.
12967
12968 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
12969
12970         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
12971         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
12972         (cp_push_exception_identifier): New macro.
12973         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
12974         (DECL_BASE_DESTRUCTOR_P): Likewise.
12975         (DECL_DELETING_DESTRUCTOR_P): Likewise.
12976         (get_vtbl_decl_for_binfo): Fix formatting.
12977         (in_charge_arg_for_name): New macro.
12978         (maybe_build_cleanup_and_delete): Remove declaration.
12979         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
12980         (in_charge_arg_for_name): New function.
12981         (build_new_method_call): Use it.  Handle cloned destructors.
12982         (build_clone): Don't make the base constructor virtual.
12983         Automatically defer generated functions.
12984         (clone_function_decl): Handle destructors, too.
12985         (clone_constructors_and_destructors): Likewise.
12986         (create_vtable_ptr): Don't create a vtable entry for a cloned
12987         function.
12988         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
12989         (initialize_predefined_identifiers): Update appropriately.
12990         (finish_destructor_body): Simplify.
12991         (maybe_build_cleanup_and_delete): Remove.
12992         * except.c (expand_throw): Handle new-ABI destructors.
12993         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
12994         (build_dtor_call): New function.
12995         (build_delete): Use it.  Simplify.
12996         * optimize.c (maybe_clone_body): Handle destructors.
12997         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
12998
12999         * exception.cc (cleanup_fn): New typedef.
13000         (CALL_CLEANUP): New macro.
13001         (cp_eh_info): Use them.
13002         (__cp_push_exception): Likewise.
13003         (__cp_pop_exception): Likewise.
13004
13005 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
13006
13007         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
13008         (complete_dtor_identifier): New macro.
13009         (CLASSTYPE_FIRST_CONVERSION): Remove.
13010         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
13011         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
13012         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
13013         (CLASSTYPE_CONSTRUCTORS): Likewise.
13014         (CLASSTYPE_DESTRUCTORS): Likewise.
13015         (lang_decl): Add cloned_function.
13016         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
13017         (DECL_BASE_CONSTRUCTOR_P): Likewise.
13018         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
13019         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
13020         (DECL_CLONED_FUNCTION_P): Likewise.
13021         (DECL_CLONED_FUNCTION): Likewise.
13022         (clone_function_decl): Declare.
13023         (maybe_clone_body): Likewise.
13024         * call.c (build_user_type_conversion_1): Call complete object
13025         constructors in the new ABI.
13026         (build_new_method_call): Don't add in-charge parameters under the
13027         new ABI.
13028         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
13029         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
13030         CLASSTYPE_DESTRUCTOR_SLOT.
13031         (build_clone): New function.
13032         (clone_function_decl): Likewise.
13033         (clone_constructors_and_destructors): Likewise.
13034         (check_bases_and_members): Use it.
13035         * decl.c (iniitialize_predefined_identifiers): Initialize
13036         complete_dtor_identifier.
13037         (finish_function): Don't add extra code to a clone.
13038         (lang_mark_tree): Mark cloned_function.
13039         * decl2.c (mark_used): Don't bother trying to instantiate things
13040         we synthesized.
13041         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
13042         * method.c (set_mangled_name_for_decl): Don't treat clones as
13043         constructors.
13044         (synthesize_method): Sythesize cloned functions, not the clones.
13045         * optimize.c (inline_data): Update comment on ret_label.
13046         (remap_block): Don't assume DECL_INITIAL exists.
13047         (copy_body_r): Allow ret_label to be NULL.
13048         (maybe_clone_body): Define.
13049         * pt.c (tsubst_decl): Handle clones.
13050         (instantiate_clone): New function.
13051         (instantiate_template): Use it.
13052         (set_mangled_name_for_template_decl): Don't treat clones as
13053         constructors.
13054         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
13055         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
13056         * semantics.c (expand_body): Clone function bodies as necessary.
13057
13058         * optimize.c (remap_decl): Avoid sharing structure for arrays
13059         whose size is only known at run-time.
13060         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
13061
13062         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
13063         to has_in_charge_parm_p.
13064         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
13065         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
13066         (DECL_COPY_CONSTRUCTOR_P): New macro.
13067         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
13068         (build_user_type_conversion_1): Likewise.
13069         (convert_like_real): Likewise.
13070         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
13071         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
13072         (copy_args_p): Likewise.
13073         (grok_ctor_properties): Likewise.
13074         (start_function): Likewise.
13075         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
13076         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
13077         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
13078         * method.c (do_build_copy_constructor): Use
13079         DECL_HAS_IN_CHARGE_PARM_P.
13080         (synthesize_method): Likewise.
13081         * pt.c (instantiate_template): Remove goto.
13082         * tree.c (build_cplus_method_type): Remove mention of obstacks in
13083         comment.
13084
13085         * cp-tre.h (finish_function): Change prototype.
13086         * decl.c (end_cleanup_fn): Adjust caller.
13087         (finish_function): Take only one parameter.
13088         * decl2.c (finish_objects): Adjust caller.
13089         (finish_static_storage_duration_function): Likewise.
13090         * method.c (emit_thunk): Likewise.
13091         * parse.y: Likewise.
13092         * parse.c: Regenerated.
13093         * pt.c (instantiate_decl): Likewise.
13094         * rtti.c (synthesize_tinfo_fn): Likewise.
13095         * semantics.c (expand_body): Likewise.
13096
13097         * cp-tree.h (copy_decl): New function.
13098         * class.c (finish_struct_1): Use it.
13099         * lex.c (copy_decl): Define it.
13100         * pt.c (tsubst_decl): Likewise.
13101         * tree.c (copy_template_template_parm): Likewise.
13102
13103         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
13104         has_nonpublic_assign_ref.
13105         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
13106         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
13107         * class.c (finish_struct_methods): Don't set
13108         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
13109         (interface_only): Don't declare.
13110         (interface_unknown): Likewise.
13111
13112 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13113
13114         * tree.h (HAVE_TEMPLATES): Remove definition.
13115         * lang-options.h (-fthis-is-variable): Remove documentation.
13116
13117 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
13118
13119         * class.c (instantiate_type): Handle object-relative template-id.
13120
13121         * semantics.c (finish_expr_stmt): Call convert_to_void here.
13122         * decl.c (cplus_expand_expr_stmt): Not here.
13123
13124         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
13125         Initialize exprtype earlier.
13126
13127         * parse.y (fn.def1): Check for defining types in return types.
13128
13129         * decl.c (check_tag_decl): Notice extra fundamental types.
13130         Diagnose empty decls in classes, too.
13131
13132         * decl.c (grokdeclarator): Don't override an anonymous name if no
13133         declarator was given.
13134
13135         * cvt.c (convert_to_void): Call resolve_offset_ref.
13136
13137         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
13138
13139         * decl2.c (decl_namespace): Handle getting a type.
13140
13141         * typeck.c (build_c_cast): Re-enable warning for cast between
13142         pointer and integer of different size.
13143
13144 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
13145
13146         * inc/cxxabi.h (__pointer_type_info): Add restrict and
13147         incomplete flags.
13148         (__pointer_type_info::__pointer_catch): New virtual function.
13149         (__pointer_to_member_type_info): Derive from
13150         __pointer_type_info. Adjust.
13151         (__pointer_to_member_type_info::__do_catch): Remove.
13152         (__pointer_to_member_type_info::__is_pointer_p): Declare.
13153         (__pointer_to_member_type_info::__pointer_catch): Declare.
13154         * rtti.c (qualifier_flags): Add restrict flag.
13155         (ptmd_initializer): Reorder members.
13156         (create_tinfo_types): Expand comments. Reorder
13157         ptmd_desc_type_node members.
13158         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
13159         Implement.
13160         (__pointer_type_info::__do_catch): Move specific code into
13161         __pointer_catch. Call it.
13162         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
13163         specific catch checking. Fix void conversion check.
13164         (__pointer_to_member_type_info::__do_catch): Remove.
13165         (__pointer_to_member_type_info::__pointer_catch): Implement.
13166
13167 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13168
13169         * lex.c (init_parse): Remove traces of classof and headof.
13170         * decl2.c (flag_operator_names): Default to 1.
13171         (lang_decode_option): Do not set it for -ansi.
13172
13173 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
13174
13175         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
13176         (DECL_MAIN_VARIANT): Remove.
13177         * decl.c (duplicate_decls): Don't set it.
13178         (start_function): Likewise.
13179         (lang_mark_tree): Don't mark it.
13180         * decl2.c (defer_fn): Don't use it.
13181         * lex.c (retrofit_lang_decl): Don't set it.
13182         * pt.c (tsubst_decl): Likewise.
13183         * ptree.c (print_lang_decl): Don't print it.
13184         * typeck.c (mark_addressable): Don't use it.
13185
13186 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
13187
13188         * vec.cc: Include <new> and <exception>.
13189         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
13190         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
13191         terminate.
13192         (__cxa_vec_delete): Catch dtor exceptions.
13193
13194 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
13195
13196         Prepend __ to implementation defined names.
13197         * inc/typeinfo (type_info): Rename _name to __name.
13198         (type_info::type_info): Rename parameter.
13199         (type_info::operator==, type_info::operator!=,
13200         type_info::before): Likewise.
13201         (type_info::is_pointer_p, type_info::is_function_p,
13202         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
13203         parameters.
13204         * inc/cxxabi.h
13205         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
13206         (__pointer_type_info::__pointer_type_info): Likewise.
13207         (__pointer_type_info::is_pointer_p,
13208         __pointer_type_info::do_catch): Prepend __. Rename parameters.
13209         (__array_type_info::__array_type_info): Rename parameters.
13210         (__function_type_info::__function_type_info): Likewise.
13211         (__function_type_info::is_function_p): Prepend __.
13212         (__enum_type_info::__enum_type_info): Rename parameters.
13213         (__pointer_to_member_type_info::__pointer_to_member_type_info):
13214         Likewise.
13215         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
13216         parameters.
13217         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
13218         (__class_type_info::__class_type_info): Rename parameters.
13219         (__class_type_info::sub_kind): Prepend __. Adjust member names.
13220         (__class_type_info::upcast_result,
13221         __class_type_info::dyncast_result): Prepend __. Move definition
13222         into tinfo.cc.
13223         (__class_type_info::do_upcast, __class_type_info::do_catch,
13224         __class_type_info::find_public_src,
13225         __class_type_info::do_dyncast,
13226         __class_type_info::do_find_public_src): Prepend __. Rename
13227         parameters.
13228         (__si_class_type_info::__si_class_type_info): Rename parameters.
13229         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
13230         __si_class_type_info::do_find_public_src): Prepent __. Rename
13231         parameters.
13232         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
13233         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
13234         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
13235         parameters.
13236         (__dynamic_cast): Rename parameters.
13237         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
13238         type_info::do_catch, type_info::do_upcast): Prepend __.
13239         (contained_p, public_p, virtual_p, contained_public_p,
13240         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
13241         (__class_type_info::do_catch,
13242         __class_type_info::do_upcast): Prepend __. Adjust.
13243         (__class_type_info::__upcast_result,
13244         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
13245         Adjust.
13246         (__class_type_info::find_public_src): Prepend __. Adjust.
13247         (__class_type_info::do_find_public_src,
13248         __si_class_type_info::do_find_public_src,
13249         __vmi_class_type_info::do_find_public_src): Likewise.
13250         (__class_type_info::do_dyncast,
13251         __si_class_type_info::do_dyncast,
13252         __vmi_class_type_info::do_dyncast): Likewise.
13253         (__class_type_info::do_upcast,
13254         __si_class_type_info::do_upcast,
13255         __vmi_class_type_info::do_upcast): Likewise.
13256         (__dynamic_cast): Adjust.
13257         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
13258         (__function_type_info::is_function_p): Likewise.
13259         (__pointer_type_info::do_catch): Likewise. Adjust.
13260         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
13261         (__throw_type_match_rtti_2): Adjust.
13262         (__is_pointer): Adjust.
13263
13264 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
13265
13266         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
13267         (complete_ctor_identifier): New macro.
13268         (special_function_kind): Add sfk_copy_constructor and
13269         sfk_assignment_operator.
13270         (LOOKUP_HAS_IN_CHARGE): Remove.
13271         (cons_up_default_function): Rename to ...
13272         (implicitly_declare_fn): ... this.
13273         * call.c (build_new_method_call): Add in-charge parameters for
13274         constructors here.
13275         * class.c (add_implicitly_declared_members): Change parameter name
13276         from cant_have_assignment to cant_have_const_assignment.
13277         Replace calls to cons_up_default_function to implicitly_declare_fn.
13278         * cvt.c (ocp_convert): Use complete_ctor_identifier.
13279         * decl.c (initialize_predefined_identifiers): Initialize it.
13280         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
13281         complex expression.
13282         * init.c (expand_default_init): Don't calculate the in-charge
13283         parameter here.
13284         (build_new_1): Likewise.
13285         * lex.c (cons_up_default_function): Move to method.c.
13286         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
13287         (implicitly_declare_fn): New function.
13288         * typeck.c (build_static_cast): Use complete_ctor_identifier.
13289         (build_modify_expr): Likewise.
13290         * typeck2.c (build_functional_cast): Likewise.
13291
13292         Under the new ABI, constructors don't return `this'.
13293         * cp-tree.h (warn_reorder): Declare.
13294         (special_function_kind): New enum.
13295         (global_base_init_list): Remove declaration.
13296         (emit_base_init): Don't return a value.
13297         (check_base_init): Don't declare.
13298         (is_aggr_typedef): Likewise.
13299         * decl.c (check_special_function_return_type): New function.
13300         (return_types): Remove.
13301         (grokdeclarator): Use check_special_function_return_type.
13302         (start_function): Don't initialize ctor_label under the new ABI.
13303         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
13304         * init.c (begin_init_stmts): Move to top of file.
13305         (finish_init_stmts): Likewise.
13306         (warn_reorder): Don't declare.
13307         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
13308         value.
13309         (check_base_init): Remove.
13310         (is_aggr_typedef): Likewise.
13311         (build_new_1): Don't use the return value of a constructor.
13312         * semantics.c (setup_vtbl_ptr): Don't use the return value
13313         of emit_base_init.
13314         * typeck.c (check_return_expr): Don't magically convert return
13315         statements into `return this' in constructors under the new ABI.
13316
13317         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
13318         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
13319         (base_ctor_identifier): New macro.
13320         (base_dtor_identifier): Likewise.
13321         (deleting_dtor_identifier): Likewise.
13322         * decl.c: Don't include obstack.h.
13323         (obstack_chunk_alloc): Don't define.
13324         (obstack_chunk_free): Likewise.
13325         (struct predefined_identifier): New type.
13326         (initialize_predefined_identifiers): New function.
13327         (init_decl_processing): Use it.
13328         (debug_temp_inits): Remove.
13329         (start_method): Don't call preserve_data.
13330         (hack_incomplete_structures): Update comment.
13331         * init.c (init_init_processing): Don't initialize
13332         nelts_identifier.
13333         (build_offset_rf): Remove dead code.
13334         (build_delete): Use CLASSTYPE_N_BASECLASSES.
13335         * search.c (init_search_processing): Don't initialize
13336         vptr_identifier.
13337
13338 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13339
13340         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
13341         some sign_compare warnings.
13342
13343 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
13344
13345         Rename abi::__vmi_class_type_info members.
13346         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
13347         base_list, detail_masks members to vmi_flags, vmi_base_count,
13348         vmi_bases and vmi_flags_masks respectively.
13349         (__vmi_class_type_info::vmi_flags_masks): Rename
13350         details_unknown_mask to flags_unknown_mask.
13351         * tinfo.cc (__class_type_info::do_upcast): Adjust.
13352         (__vmi_class_type_info::do_find_public_src): Adjust.
13353         (__vmi_class_type_info::do_dyncast): Adjust.
13354         (__vmi_class_type_info::do_upcast): Adjust.
13355
13356 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
13357
13358         * tinfo.cc (convert_to_base): New function.
13359         (get_vbase_offset): Remove. Move into convert_to_base.
13360         (__vmi_class_type_info::do_find_public_src): Adjust.
13361         (__vmi_class_type_info::do_dyncast): Adjust.
13362         (__vmi_class_type_info::do_upcast): Adjust.
13363
13364 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
13365
13366         * tinfo.cc (operator=): Use __builtin_strcmp.
13367         * tinfo2.cc (before): Likewise.
13368
13369 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
13370
13371         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
13372         (DECL_SAVED_INLINE): Rename to ...
13373         (DECL_DEFERRED_FN): ... this.
13374         (in_function_p): Remove declaration.
13375         (mark_inline_for_output): Rename to ...
13376         (defer_fn): ... this.
13377         * decl.c (finish_function): Adjust call to mark_inline_for_output.
13378         (in_function_p): Remove definition.
13379         * decl2.c (saved_inlines): Rename to ...
13380         (deferred_fns): ... this.
13381         (saved_inlines_used): Rename to ...
13382         (deferred_fns_used): ... this.
13383         (mark_inline_for_output): Rename to ...
13384         (defer_fn): ... this.
13385         (finish_file): Adjust accordingly.
13386         (init_decl2): Likewise.
13387         * lex.c (cons_up_default_function): Likewise.
13388         * pt.c (mark_decl_instantiated): Likewise.
13389         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
13390         circumstances.
13391         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
13392         * semantics.c (expand_body): Defer more functions.
13393
13394 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
13395
13396         * vec.cc: New file.
13397         * Make-lang.in (CXX_LIB2FUNCS): Add it.
13398         (vec.o): Build it.
13399         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13400         __cxa_vec_delete): Declare.
13401
13402 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
13403
13404         * rtti.c (dfs_class_hint_mark): New static function.
13405         (dfs_class_hint_unmark): New static function.
13406         (class_hint_flags): Use them.
13407
13408 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
13409
13410         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
13411
13412 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
13413
13414         * cp-tree.h (instantiate_decl): Change prototype.
13415         * decl2.c (mark_used): Adjust call.
13416         * optimize.c (inlinable_function_p): Adjust handling of templates.
13417         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
13418         (do_type_instantiation): Likewise.
13419         (instantiate_decl): Defer more templates.
13420         (instantiate_pending_templates): Adjust logic to handle inline
13421         friend functions.
13422
13423         * Makefile.in (GGC_H): New variable.  Use it throughout in place
13424         of ggc.h.
13425
13426         * call.c: Don't include obstack.h.  Include ggc.h.
13427         (obstack_chunk_alloc): Don't define.
13428         (obstack_chunk_free): Likewise.
13429         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
13430         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
13431         (pop_switch): Free it.
13432
13433         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
13434
13435         * dump.c (dequeue_and_dump): Don't try to print the bit_position
13436         if we don't have a DECL_FIELD_OFFSET.
13437
13438 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
13439
13440         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
13441         special_function_p.
13442
13443 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13444
13445         * cfns.gperf (hash, libc_name_p): Prototype.
13446
13447         * rtti.c (build_dynamic_cast_1): Constification.
13448
13449         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
13450
13451         * semantics.c (deferred_type_access_control): Prototype.
13452
13453 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
13454
13455         Correct many new ABI issues regarding vbase and vcall offset
13456         layout.
13457         * cp-tree.h (BINFO_VTABLE): Document.
13458         (struct lang_type): Tweak formatting.
13459         (BINFO_PRIMARY_BINFO): Add to documentation.
13460         (CLASSTYPE_VSIZE): Fix typo in comment.
13461         (CLASSTYPE_VBASECLASSES): Update documentation.
13462         (BINFO_VBASE_MARKED): Remove.
13463         (SET_BINFO_VBASE_MARKED): Likewise.
13464         (CLEAR_BINFO_VBASE_MARKED): Likewise.
13465         (BINFO_FIELDS_MARKED): Remove.
13466         (SET_BINFO_FIELDS_MARKED): Likewise.
13467         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
13468         (enum access_kind): New enumeration.
13469         (num_extra_vtbl_entries): Remove declaration.
13470         (size_extra_vtbl_entries): Likewise.
13471         (get_vtbl_decl_for_binfo): New function.
13472         (dfs_vbase_unmark): Remove declaration.
13473         (mark_primary_bases): Likewise.
13474         * class.c (SAME_FN): Remove.
13475         (struct vcall_offset_data_s): Move definition.
13476         (build_vbase_pointer): Use `build', not `build_binary_op', to
13477         access the vbase pointer under the new ABI.
13478         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
13479         (build_primary_vtable): Likewise.
13480         (dfs_mark_primary_bases): Move here from search.c.
13481         (mark_primary_bases): Likewise.
13482         (determine_primary_bases): Under the new ABI, don't make a base
13483         class a primary base just because we don't yet have any virtual
13484         functions.
13485         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
13486         (num_vfun_entries): Remove.
13487         (dfs_count_virtuals): Likewise.
13488         (num_extra_vtbl_entries): Likewise.
13489         (size_extra_vtbl_entries): Likewise.
13490         (layout_virtual_bases): Iterate in inheritance graph order under
13491         the new ABI.
13492         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
13493         indicate that a vfield is present.
13494         (init_class_processing): Initialize access_public_node, etc., from
13495         ak_public, etc.
13496         (get_vtbl_decl_for_binfo): New function.
13497         (dump_class_hierarchy_r): Likewise.
13498         (dump_class_hierarchy): Use it.
13499         (finish_vtbls): Build the vtbls in inheritance graph order.
13500         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
13501         (initialize_vtable): Use get_vtbl_decl_for_binfo.
13502         (accumulate_vtbl_inits): Add comments explaining why a pre-order
13503         walk is required.
13504         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
13505         where the vptr points, even for primary vtables.
13506         (build_vtbl_initializer): Adjust handling of vbase and vcall
13507         offsets.
13508         (build_vcall_and_vbase_vtable_entries): New function.
13509         (dfs_build_vbase_offset_vtbl_entries): Remove.
13510         (build_vbase_offset_vtbl_entries): Reimplement.
13511         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
13512         were already handled in a primary base class vtable.
13513         (build_vcall_offset_vtbl_entries): Adjust.
13514         (build_rtti_vtbl_entries): Adjust.
13515         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
13516         * init.c (expand_virtual_init): Simplify.
13517         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
13518         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
13519         * search.c (BINFO_ACCESS): New macro.
13520         (SET_BINFO_ACCESS): Likewise.
13521         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
13522         (access_in_type): Likewise.
13523         (dfs_accessible_p): Likewise.
13524         (protected_accessible_p): Likewise.
13525         (lookup_fnfields_1): Adjust documentation.
13526         (dfs_mark_primary_bases): Move to class.c
13527         (mark_primary_bases): Likewise.
13528         (dfs_vbase_unmark): Remove.
13529         (virtual_context): Use BINFO_FOR_VBASE.
13530         (dfs_get_vbase_types): Simplify.
13531         (dfs_build_inheritance_graph_order): New function.
13532         (get_vbase_types): Use it.
13533         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
13534
13535         * tinfo.cc (get_vbase_offset): New function.
13536         (__vmi_class_type_info::do_find_public_src): Use it.
13537         (__vmi_class_type_info::do_dyncast): Likewise.
13538         (__vmi_class_type_info::do_upcast): Likewise.
13539
13540 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
13541
13542         * lang-specs.h: Pass -fno-show-column to the preprocessor.
13543
13544 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
13545
13546         * rtti.c (class_hint_flags): Rename flags.
13547         (class_initializer): Remove flags.
13548         (synthesize_tinfo_var): Combine offset and flags. Add flags
13549         for __vmi_class_type_info.
13550         (create_tinfo_types): Remove flags from __class_type_info and
13551         __si_class_type_info. Merge flags and offset from
13552         base_class_type_info.
13553         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
13554         (__base_class_info::is_virtual_p): Adjust.
13555         (__base_class_info::is_public_p): Adjust.
13556         (__base_class_info::offset): New accessor.
13557         (__class_type_info::details): Remove member.
13558         (__class_type_info::__class_type_info): Lose details.
13559         (__class_type_info::detail_masks): Remove.
13560         (__si_class_type_info::__si_class_type_info): Lose details.
13561         (__vmi_class_type_info::details): New member.
13562         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
13563         (__vmi_class_type_info::detail_masks): New member.
13564         * tinfo.cc (__class_type_info::do_upcast): Initialize result
13565         with unknown_details_mask.
13566         (__vmi_class_type_info::do_find_public_src): Adjust
13567         (__vmi_class_type_info::do_dyncast): Adjust.
13568         (__vmi_class_type_info::do_upcast): Set result details, if
13569         needed. Adjust.
13570         (__dynamic_cast): Temporarily #if out optimization.
13571
13572 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
13573
13574         * rtti.c (get_tinfo_decl): Mark used.
13575         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
13576         mark as dealt with, if we output it.
13577
13578 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
13579
13580         * class.c: Reorganize to put virtual function table initialization
13581         machinery at the end of the file.
13582
13583 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
13584
13585         * class.c (finish_struct): Use bitsize_zero_node.
13586         * pt.c (instantiate_class_template): Likewise.
13587
13588 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
13589
13590         Put RTTI entries at negative offsets in new ABI.
13591         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
13592         vbase offset at index -3, not -1.
13593         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
13594         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
13595         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
13596         (build_rtti_vtbl_entries): New function.
13597         (set_rtti_entry): Remove.
13598         (build_primary_vtable): Don't use it.
13599         (build_secondary_vtable): Likewise.
13600         (start_vtable): Remove.
13601         (first_vfun_index): New function.
13602         (set_vindex): Likewise.
13603         (add_virtual_function): Don't call start_vtable.  Do call
13604         set_vindex.
13605         (set_primary_base): Rename parameter.
13606         (determine_primary_base): Likewise.
13607         (num_vfun_entries): Don't use skip_rtti_stuff.
13608         (num_extra_vtbl_entries): Include RTTI information.
13609         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
13610         (skip_rtti_stuff): Remove.
13611         (dfs_modify_vtables): Don't use it.
13612         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
13613         (layout_nonempty_base_or_field): Update size handling.
13614         (create_vtable_ptr): Tweak.
13615         (layout_class_type): Adjust parameter names.
13616         (finish_struct_1): Simplify.
13617         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
13618         (skip_rtti_stuff): Remove.
13619         (first_vfun_index): New function.
13620         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
13621         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
13622         (marked_vtable_pathp): Declare.
13623         (unmarked_vtable_pathp): Likewise.
13624         * error.c (dump_expr): Use first_vfun_index to calculate vtable
13625         offsets.
13626         * rtti.c (build_headof): Look for RTTI at negative offsets.
13627         (get_tinfo_decl_dynamic): Likewise.
13628         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
13629         here.
13630         (create_pseudo_type_info): Do it here instead.  Adjust so that
13631         vptr points at first virtual function.
13632         * search.c (marked_vtable_pathp): Make it global.
13633         (unmarked_vtable_pathp): Likewise.
13634         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
13635         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
13636         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
13637         (get_pure_virtuals): Likewise.
13638         (expand_upcast_fixups): Likewise.
13639         * tree.c (debug_binfo): Likewise.
13640         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
13641         negative offset.
13642
13643 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13644
13645         * class.c (check_field_decl): Fix typo.
13646         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
13647         (check_methods): Likewise.
13648         (check_field_decls): Likewise.
13649         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
13650         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
13651         Use DECL_RESULT_FLD, not DECL_RESULT.
13652         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
13653         * lex.c (identifier_type): Likewise.
13654         * pt.c (determine_specialization, lookup_template_class): Likewise.
13655         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
13656         (resolve_overloaded_unification, more_specialized): Likewise.
13657         * semantics.c (finish_member_declaration): Likewise.
13658         * typeck.c (build_x_function_call): Likewise.
13659
13660 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
13661
13662         * class.c (layout_empty_base): Handle empty bases with non-byte
13663         alignment.
13664         (build_base_field): Likewise.
13665         (layout_virtual_bases): Likewise.
13666
13667         * class.c (finish_struct_1): Fix typo in this change:
13668
13669         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13670
13671 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
13672
13673         * decl.c (grokdeclarator): Count partial specializations when
13674         keeping track of how many template classes have been seen.
13675
13676         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
13677
13678 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13679
13680         * class.c (build_vbase_pointer_fields): layout_field now place_field.
13681         (get_vfield_offset): Use byte_position.
13682         (set_rtti_entry): Set OFFSET to ssizetype zero.
13683         (get_binfo_offset_as_int): Deleted.
13684         (dfs_record_base_offsets): Use tree_low_cst.
13685         (dfs_search_base_offsets): Likewise.
13686         (layout_nonempty_base_or_field): Reflect changes in RLI format
13687         and call byte_position.
13688         (layout_empty_base): Convert offset to ssizetype.
13689         (build_base_field): use rli_size_unit_so_far.
13690         (dfs_propagate_binfo_offsets): Do computation in proper type.
13691         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
13692         (layout_class_type): Reflect changes in RLI names and fields.
13693         (finish_struct_1): Set DECL_FIELD_OFFSET.
13694         * dump.c (dequeue_and_dump): Call bit_position.
13695         * expr.c (cplus_expand_constant): Use byte_position.
13696         * rtti.c (expand_class_desc): Use bitsize_one_node.
13697         * typeck.c (build_component_addr): Use byte_position and don't
13698         special case for zero offset.
13699
13700 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
13701
13702         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
13703
13704         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
13705         tinfo object.
13706         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
13707         vtable.
13708
13709 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13710
13711         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
13712         DECL_P macros.
13713         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
13714         make_typename_type, check_initializer, cp_finish_decl,
13715         xref_tag): Likewise.
13716         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
13717         decl_namespace, arg_assoc_template_arg, arg_assoc,
13718         validate_nonmember_using_decl, do_class_using_decl): Likewise.
13719         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
13720         args_to_string): Likewise.
13721         * friend.c (is_friend): Likewise.
13722         * lex.c (note_got_semicolon, note_list_got_semicolon,
13723         is_global): Likewise.
13724         * method.c (build_overload_nested_name, build_overload_value,
13725         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
13726         * parse.y (typename_sub, typename_sub1): Likewise.
13727         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
13728         process_partial_specialization, convert_template_argument,
13729         template_args_equal, add_pending_template, lookup_template_class,
13730         for_each_template_parm_r, maybe_fold_nontype_arg,
13731         tsubst, instantiate_template, type_unification_real, unify,
13732         instantiate_pending_templates, set_mangled_name_for_template_decl):
13733         Likewise.
13734         * repo.c (repo_get_id, repo_template_used): Likewise.
13735         * search.c (lookup_field_1): Likewise.
13736         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
13737         * xref.c (classname): Likewise.
13738
13739 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
13740
13741         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
13742         (CANONICAL_BINFO): New macro.
13743         (BINFO_NEW_VTABLE_MARKED): Use it.
13744         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
13745         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
13746         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
13747         not TREE_TYPE.
13748         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13749         (build_secondary_vtable): Likewise.
13750         (dfs_finish_vtbls): Likewise.
13751         (dfs_accumulate_vtbl_inits): Likewise.
13752         (accumulate_vtbl_inits): New function.
13753         (finish_vtbls): Make sure that virtual bases come after
13754         non-virtual bases in the vtable group.
13755         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
13756         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13757         * search.c (struct vbase_info): Move definition.
13758         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13759         (unmarked_new_vtable_p): Likewise.
13760         (dfs_mark_vtable_path): Remove.
13761         (dfs_mark_new_vtable): Remove.
13762         (dfs_unmark_new_vtable): Likewise.
13763         (dfs_clear_search_slot): Likewise.
13764         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
13765         (dfs_clear_vbase_slots): Likewise.
13766         (init_vbase_pointers): LIkewise.
13767
13768 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
13769
13770         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
13771         SIZETYPE to a non-SIZETYPE.
13772
13773 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
13774
13775         * class.c (layout_virtual_bases): Adjust names in conditionally
13776         compiled code.
13777
13778         * class.c (record_base_offsets): New function.
13779         (layout_conflict_p): Likewise.
13780         (layout_nonempty_base_or_field): Use it.
13781         (layout_empty_base): New function.
13782         (build_base_field): Use it.
13783         (build_base_fields): Update comment.
13784         (layout_virtual_bases): Fold in a little code form
13785         layout_basetypes.  Use layout_empty_base.
13786         (layout_basetypes): Remove.
13787         (end_of_class): New function.
13788         (layout_class_type): Use it.  Adjust.
13789
13790         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
13791         (fntype_p): Remove.
13792         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
13793         comment.
13794         (dfs_skip_nonprimary_vbases_markedp): Likewise.
13795         * typeck.c (fntype_p): Remove.
13796
13797         * cp-tree.h (TI_SPEC_INFO): Remove.
13798         (CLASSTYPE_TI_SPEC_INFO): Likewise.
13799         * pt.c (process_partial_specialization): Likewise.
13800
13801         * class.c (build_base_field): Fix thinko in computation of binfo
13802         offsets.
13803
13804         * tree.c (mark_local_for_remap_p): Mark variables declared in
13805         TARGET_EXPRs as well.
13806
13807 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
13808
13809         * typeck.c (require_complete_type, complete_type,
13810         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
13811         build_array_ref, convert_arguments, pointer_diff,
13812         build_x_unary_op, build_unary_op, build_c_cast,
13813         build_modify_expr): Use COMPLETE_TYPE_P etc.
13814         * call.c (is_complete, convert_like_real,
13815         build_new_method_call): Likewise.
13816         * class.c (build_vbase_pointer_fields, check_bases,
13817         build_base_field, finish_struct_1, pushclass): Likewise.
13818         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
13819         * decl.c (maybe_process_template_type_declaration, pushtag,
13820         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
13821         layout_var_decl, check_initializer, cp_finish_decl,
13822         grokdeclarator, require_complete_types_for_parms,
13823         grok_op_properties, xref_tag, xref_basetypes,
13824         check_function_type): Likewise.
13825         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
13826         * friend.c (do_friend): Likewise.
13827         * init.c (build_offset_ref): Likewise.
13828         * parse.y (structsp): Likewise.
13829         * pt.c (maybe_process_partial_specialization,
13830         tsubst_friend_function, instantiate_class_template, tsubst,
13831         do_type_instantiation, instantiate_pending_templates): Likewise.
13832         * repo.c (repo_get_id): Likewise.
13833         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
13834         synthesize_tinfo_var, emit_support_tinfos): Likewise.
13835         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
13836         * semantics.c (begin_class_definition): Likewise.
13837         * tree.c (build_cplus_method_type): Likewise.
13838         * typeck2.c (digest_init, build_functional_cast,
13839         add_exception_specifier): Likewise.
13840         * parse.h, parse.c: Regenerated.
13841
13842 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
13843
13844         * inc/cxxabi.h: New header file. Define new-abi entry points.
13845         (__pointer_type_info::target): Rename member to ...
13846         (__pointer_type_info::type): ... here.
13847         (__base_class_info::type): Rename member to ...
13848         (__base_class_info::base): ... here.
13849         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
13850         * cp-tree.h (CPTI_ABI): New global tree enumeration.
13851         (abi_node): New global tree node.
13852         * decl.c (abi_node): Document.
13853         (init_decl_processing): Initialize abi_node.
13854         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
13855         (get_vmi_pseudo_type_info): Likewise.
13856         (create_tinfo_types): Likewise.
13857         (emit_support_tinfos): Likewise.
13858         * tinfo.h (cxxabi.h): Include for new-abi.
13859         Move rtti class definitions to new header file.
13860         * tinfo.cc (abi): Use the namespace.
13861         (std): Move new abi rtti classes from here ...
13862         (__cxxabiv1): ... to here.
13863         * tinfo2.cc (cxxabi.h): Include for new-abi.
13864         Move rtti class definitions to new header file.
13865         (std): Move new abi rtti classes from here ...
13866         (__cxxabiv1): ... to here.
13867         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
13868         namespace.
13869
13870 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
13871             Jason Merrill  <jason@casey.cygnus.com>
13872
13873         * method.c (build_overload_int): Use host_integerp.
13874
13875 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13876
13877         * init.c (build_offset_ref): Handle the case of a templated member
13878         function.
13879
13880 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13881
13882         * except.c (expand_exception_blocks): Clear catch_clauses_last.
13883
13884 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
13885
13886         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
13887         * class.c (check_bitfield_decl): Turn illegal bitfields into
13888         non-bitfields.
13889         (dfs_propagate_binfo_offsets): Adjust for new size_binop
13890         semantics.
13891         (dfs_offset_for_unshared_vbases): Likewise.
13892         * cvt.c (cp_convert_to_pointer): Convert NULL to a
13893         pointer-to-member correctly under the new ABI.
13894         * expr.c (cplus_expand_constant): Don't use cp_convert when
13895         turning an offset into a pointer-to-member.
13896         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
13897         when dereferencing them under the new ABI.
13898         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
13899         of pointers-to-members under the new ABI.
13900
13901         * class.c (check_bitfield_decl): Remove restriction on really long
13902         bitfields.
13903         (layout_class_type): Implement new ABI handling of bitfields
13904         longer than their types.
13905
13906 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13907
13908         * parse.y (extdefs): Call ggc_collect.
13909         * parse.c: Regenerated.
13910
13911 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
13912
13913         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
13914         (note_name_declared_in_class): Use OVL_CURRENT to get at a
13915         potential overload.
13916
13917 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13918
13919         * class.c (build_vbase_path): Use integer_zerop.
13920         (build_vtable_entry): Use tree_low_cst.
13921         (get_vfield_offset): Use bit_position.
13922         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
13923         Use tree_low_cst.
13924         (check_bitfield_decl): Set DECL_SIZE using convert.
13925         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
13926         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
13927         Use tree_low_cst.
13928         (finish_struct_1): Use bit_position.
13929         (dump_class_hierarchy): Use tree_low_cst.
13930         * cp-tree.h (min_precision): Add declaration.
13931         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
13932         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
13933         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
13934         * expr.c (cplus_expand_constant): Use bit_position.
13935         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
13936         * rtti.c (get_base_offset): Use bit_position.
13937         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
13938         host_integerp, and tree_low_cst.
13939         (pointer_int_sum): Use integer_zerop.
13940         (build_component_addr): Use bit_position.
13941
13942 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
13943
13944         * typeck.c (require_complete_type): Don't assume size_zero_node.
13945         (complete_type_or_else): Likewise.
13946
13947 2000-03-16  Steven Grady <grady@digitaldeck.com>
13948             Jason Merrill  <jason@casey.cygnus.com>
13949
13950         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
13951
13952 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
13953
13954         * decl2.c (grokfield): Bail out if type is error_mark_node.
13955
13956 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
13957
13958         * tinfo2.cc (__ptr_to_member_data): Rename to ...
13959         (__pointer_to_member_data): ... here. Adjust.
13960         * rtti.c (create_tinfo_types): Adjust.
13961
13962 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
13963
13964         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
13965         * decl.c (ref_desc_type_node): Undocument.
13966         * rtti.c (ptr_ref_initializer): Rename to ...
13967         (ptr_initializer): ... here. Adjust comments.
13968         (ptmd_initializer): Fix comment thinko.
13969         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
13970         (create_tinfo_types): Remove ref_desc_type_node init.
13971         * tinfo2.cc (__reference_type_info): Remove.
13972
13973 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
13974
13975         * decl.c (cp_finish_decl): Remove obsolete comment.
13976
13977         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
13978
13979 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
13980
13981         * cp-tree.h: Tweak documentation.
13982         * class.c (build_vbase_pointer_fields): Layout the fields, too.
13983         (avoid_overlap): Remove.
13984         (get_binfo_offset_as_int): New function.
13985         (dfs_serach_base_offsets): Likewise.
13986         (layout_nonempty_base_or_field): Likewise.
13987         (build_base_field): Layout fields here.  Avoid placing two objects
13988         of the same type at the same address, under the new ABI.
13989         (build_base_fields): Adjust accordingly.
13990         (create_vtable_ptr): Return the new field, but don't attach it to
13991         TYPE_FIELDS.
13992         (remove_base_field): Remove.
13993         (remove_base_fields): Remove.
13994         (layout_basetypes): Adjust accordingly.
13995         (layout_class_type): Call layout_field for each field, rather than
13996         just making a wholesale call to layout_type.
13997
13998 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
13999
14000         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
14001
14002 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
14003
14004         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
14005
14006         * except.c (dtor_nothrow): New fn.
14007         (do_pop_exception): Use it.  Take type parm.
14008         (push_eh_cleanup): Take type parm.
14009         (expand_start_catch_block): Pass it.
14010         (build_eh_type_type_ref): Accept null type.
14011
14012 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
14013
14014         * cp-tree.h (revert_static_member_fn): Change prototype.
14015         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
14016         (grok_op_properties): Likewise.
14017         (start_function): Likewise.
14018         (revert_static_member_fn): Simplify.
14019         * pt.c (check_explicit_specialization): Adjust call to
14020         revert_static_member_fn.
14021
14022 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
14023
14024         * cp-tree.h (scope_kind): New type.
14025         (tmpl_spec_kind): Likewise.
14026         (declare_pseudo_global_level): Remove.
14027         (pseudo_global_level_p): Rename to template_parm_scope_p.
14028         (pushlevel): Remove declaration.
14029         (begin_scope): New function.
14030         (finish_scope): Likewise.
14031         (current_tmpl_spec_kind): Likewise.
14032         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
14033         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
14034         Add template_spec_p.
14035         (toplevel_bindings_p): Adjust.
14036         (declare_pseudo_global_level): Remove.
14037         (pseudo_global_level_p): Rename to template_parm_scope_p.
14038         (current_tmpl_spec_kind): New function.
14039         (begin_scope): Likewise.
14040         (finish_scope): Likewise.
14041         (maybe_push_to_top_level): Adjust.
14042         (maybe_process_template_type_declaration): Likewise.
14043         (pushtag): Likewise.
14044         (pushdecl_nonclass_level): Likewise.
14045         (lookup_tag): Likewise.
14046         (grokfndecl): Handle member template specializations.  Share
14047         constructor and non-constructor code.
14048         * decl2.c (check_classfn): Handle member template specializations.
14049         * pt.c (begin_template_parm_list): Use begin_scope.
14050         (begin_specialization): Likewise.
14051         (end_specialization): Likewise.
14052         (check_explicit_specialization): Use current_tmpl_spec_kind.
14053         Handle member template specializations.
14054         (end_template_decl): Use finish_scope.  Remove call to
14055         get_pending_sizes.
14056         (push_template_decl_real): Remove bogus error message.
14057         (tsubst_decl): Fix typo in code contained in comment.
14058         (instantiate_template): Handle member template specializations.
14059         (most_general_template): Likewise.
14060
14061 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
14062
14063         * lex.c (whitespace_cr): Compress consecutive calls to warning().
14064         (do_identifier): Ditto for error().
14065
14066         * pt.c (convert_nontype_argument): Ditto for cp_error().
14067         (convert_template_argument): Ditto for cp_pedwarn().
14068
14069 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
14070
14071         * exception.cc (__check_null_eh_spec): New fn.
14072         * except.c (expand_end_eh_spec): Call it if the spec is throw().
14073
14074 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
14075
14076         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
14077         * except.c (expand_end_eh_spec): Add the return type.
14078         * rtti.c (throw_bad_cast): Add the parmtypes.
14079         (throw_bad_typeid): Likewise.
14080
14081         * semantics.c (expand_stmt): Only leave out rtl for unused
14082         artificials, and set DECL_IGNORED_P on them as well.
14083         * decl.c (wrapup_globals_for_namespace): Likewise.
14084
14085 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
14086
14087         * decl.c (maybe_commonize_var): Skip all artificial decls.
14088         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
14089
14090 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
14091
14092         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
14093         * cp-tree.h: Declare flag_enforce_eh_specs.
14094         * decl.c (store_parm_decls, finish_function): Check it.
14095
14096         C library functions don't throw.
14097         * Makefile.in (cfns.h): New target.
14098         (except.o): Depend on it.
14099         * Make-lang.in (cc1plus): Depend on cfns.gperf.
14100         * cfns.gperf: New file.
14101         * cfns.h: Generated.
14102         * except.c: Include it.
14103         (nothrow_libfn_p): New fn.
14104         * decl.c (grokfndecl): Use it.
14105         * cp-tree.h: Declare it.
14106
14107         * decl.c (push_overloaded_decl_1, auto_function,
14108         define_function): Lose.
14109         (build_library_fn_1): New static fn.
14110         (builtin_function): Use it.
14111         (get_atexit_node): Use build_library_fn_ptr.
14112         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
14113         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
14114         push_void_library_fn, push_throw_library_fn): New fns.
14115         * cp-tree.h: Declare them.
14116         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
14117         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
14118         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
14119         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
14120         * rtti.c (build_runtime_decl): Lose.
14121         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
14122         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
14123         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
14124
14125         * call.c (build_call): Remove result_type parm.
14126         Call mark_used on unused artificial fns.
14127         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
14128
14129 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
14130
14131         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
14132         appropriate.
14133         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
14134         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
14135         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
14136         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
14137         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
14138         expand_generic_desc): Likewise.
14139
14140 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14141
14142         * exception.cc (__cp_pop_exception): Cleanup the original object.
14143
14144 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14145
14146         * decl.c (grok_op_properties): Merge conversion to void warning
14147         with other silly op warnings.
14148
14149 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
14150
14151         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
14152         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
14153
14154 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14155
14156         * decl.c (cp_make_fname_decl): New function.
14157         (wrapup_globals_for_namespace): Don't emit unused static vars.
14158         (init_decl_processing): Remove comment about use of
14159         array_domain_type. Set make_fname_decl.
14160         (cp_finish_decl): Remove __FUNCTION__ nadgering.
14161         * semantics.c (begin_compound_stmt): Remove
14162         current_function_name_declared flagging.
14163         (expand_stmt): Don't emit unused local statics.
14164         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
14165         specially.
14166
14167 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14168
14169         * typeck.c (convert_for_assignment): Don't look at array
14170         initializer.
14171         * call.c (convert_like_real): Likewise.
14172
14173 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
14174
14175         Add initial support for '\uNNNN' specifier.
14176         * lex.c (read_ucs): New fn.
14177         (readescape, skip_white_space): Call it.
14178         (is_extended_char, is_extended_char_1): New fns.
14179         (utf8_extend_token): New fn, #if 0'd out.
14180         (real_yylex): Treat extended chars like letters.
14181
14182         * search.c (note_debug_info_needed): Walk the bases even if we
14183         weren't deferring the type itself.
14184
14185 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14186
14187         * decl2.c (finish_objects): Constify a char*.
14188
14189         * method.c (emit_thunk): Likewise.
14190
14191 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
14192
14193         * typeck.c (dubious_conversion_warnings): Look through
14194         REFERENCE_TYPE.
14195
14196 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14197
14198         * class.c (dfs_modify_vtables): I is now unsigned.
14199         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
14200         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
14201         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
14202         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14203         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
14204         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
14205         Call integer_all_onesp.
14206         * typeck2.c (process_init_constructor): Use compare_tree_int.
14207
14208         * lang-specs.h (as): Don't call if -syntax-only.
14209
14210 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
14211
14212         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
14213         RTL_EXPR_HAS_NO_SCOPE after all.
14214
14215 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
14216
14217         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
14218         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
14219         RTL_EXPR_HAS_NO_SCOPE.
14220
14221         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
14222         later.
14223
14224         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
14225
14226 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
14227
14228         * call.c (convert_like): Macrofy.
14229         (convert_like_with_context): New macro.
14230         (convert_like_real): Renamed from convert_like.  Add calling
14231         context parameters, for diagnostics. Add recursive flag.  Call
14232         dubious_conversion_warnings for outer conversion.
14233         (build_user_type_conversion): Use convert_like_with_context.
14234         (build_over_call): Likewise. Don't warn about dubious
14235         conversions here. Adjust convert_default_arg calls.
14236         (convert_default_arg): Add context parameters for diagnostics.
14237         Pass through to convert_like_with_context.
14238         * cp-tree.h (convert_default_arg): Add context parameters.
14239         (dubious_conversion_warnings): Prototype new function.
14240         * typeck.c (convert_arguments): Adjust convert_default_arg call.
14241         (dubious_conversion_warnings): New function, broken
14242         out of convert_for_assignment.
14243         (convert_for_assignment): Adjust.
14244
14245 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
14246
14247         * decl2.c (key_method): Break out from...
14248         (import_export_vtable, import_export_class): ...here.
14249
14250         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
14251         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
14252
14253         * search.c (note_debug_info_needed, dfs_debug_mark,
14254         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
14255         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
14256
14257 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
14258
14259         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
14260         typos.
14261
14262 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
14263
14264         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
14265         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
14266         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
14267         (lang_type): Split gets_new into has_new and has_array_new.
14268         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14269         (TYPE_GETS_NEW): Split into ...
14270         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
14271         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
14272         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
14273         (build_op_new_call): Don't declare.
14274         (build_new_1): Likewise.
14275         * call.c (build_op_new_call): Remove.
14276         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
14277         instead of TYPE_NEEDS_DESTRUCTOR.
14278         (finish_struct_bits): Likewise.
14279         (add_implicitly_declared_members): Likewise.
14280         (check_field_decl): Likewise.
14281         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
14282         correctly under the new ABI.
14283         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
14284         instead of TYPE_NEEDS_DESTRUCTOR.
14285         (initialize_local_var): Likewise.
14286         (destroy_local_var): Likewise.
14287         (cp_finish_decl): Likewise.
14288         (register_dtor_fn): Likewise.
14289         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
14290         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
14291         TYPE_VEC_DELETE_TAKES_SIZE here.
14292         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
14293         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
14294         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14295         (finish_destructor_body): Likewise.
14296         (maybe_build_cleanup_1): Likewise.
14297         * decl2.c (do_static_destruction): Likewise.
14298         * init.c (build_new_1): Make it static.
14299         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14300         (expand_cleanup_for_base): Likewise.
14301         (get_cookie_size): New function.
14302         (build_new_1): Handle array-new cookies correctly under the new
14303         ABI.
14304         (build_vec_delete_1): Likewise.
14305         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14306         (build_delete): Likewise.
14307         (build_vec_delete): Handle array-new cookies correctly under the new
14308         ABI.
14309         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14310         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
14311         TYPE_HAS_ARRAY_NEW_OPERATOR.
14312         * ptree.c (print_lang_type): Check them.
14313         * search.c (context_for_name_lookup): Fix typo in comment.
14314         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14315         * tree.c (break_out_cleanups): Likewise.
14316         (build_cplus_array_test_1): Likewise.
14317         (cp_build_qualified_type_real): Likewise.
14318         * typeck.c (complete_type): Likewise.
14319
14320         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
14321         the command-line, not the end.
14322
14323 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
14324
14325         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
14326
14327 2000-03-02  Tom Tromey  <tromey@cygnus.com>
14328
14329         * cp-tree.h (build_java_class_ref): Declare.
14330         * init.c (build_java_class_ref): No longer static.
14331         * except.c (expand_throw): Generate a Java-style `throw' if the
14332         thrown object is a "Java" object.
14333         (initialize_handler_parm): Generate a Java-style lookup of
14334         exception info if the caught object is a "Java" object.
14335         (catch_language, catch_language_init): New globals.
14336         (decl_is_java_type): New function.
14337         (expand_start_catch_block): Don't call push_eh_info() or
14338         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
14339         class reference to build_catch_block.
14340
14341 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14342
14343         * typeck.c (comptypes): Treat sizetype like its language equivalent.
14344
14345 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
14346
14347         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
14348         to merge reference/pointer code and fix incorrect warnings.
14349
14350 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
14351
14352         * search.c (protected_accessible_p): Use context_for_name_lookup.
14353
14354         * init.c (construct_virtual_bases): Fix thinko.
14355         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
14356
14357 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
14358
14359         * decl.c (current_function_decl): Move to toplev.c.
14360
14361 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
14362
14363         * pt.c (fn_type_unification): Unify return type, whenever
14364         provided.
14365         (get_bindings_real): Only pass return type when necessary.
14366         Remove explicit return type check.
14367         * class.c (resolve_address_of_overloaded_function): Pass desired
14368         return type to fn_type_unification.
14369
14370 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14371
14372         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
14373         DECL_FIELD_SIZE.
14374         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
14375         DECL_FIELD_SIZE.
14376         * rtti.c (expand_class_desc): Likewise.
14377         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
14378         (THUNK_VCALL_OFFSET): Likewise.
14379         (THUNK_DELTA): Reflect changes in ../tree.h.
14380
14381 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
14382
14383         * search.c (protected_accessible_p): Also allow the access if
14384         the member is public in DERIVED.  Lose TYPE parm.
14385         (friend_accessible_p): Lose TYPE parm.
14386         (accessible_p): Adjust.
14387
14388 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14389
14390         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
14391         on things that are not sizes; ssize_binop deleted.
14392         Call size_diffop when appropriate.
14393         (dfs_build_vcall_offset_vtbl_entries): Likewise.
14394         (build_primary_vtable, build_secondary_vtable): Likewise.
14395         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
14396         Variable I is HOST_WIDE_INT.
14397         (get_vfield_offset): Pass proper types to size_binop.
14398         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
14399         (finish_struct_1): Likewise.
14400         (skip_rtti_stuff): Arg N is now pointer to signed.
14401         (layout_class_type): Use size_zero_node.
14402         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
14403         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
14404         * decl.c (complete_arry_type): Pass proper types to size_binop.
14405         (xref_basetypes): BINFO_OFFSET is sizetype.
14406         * error.c (dump_expr): Don't use size_binop non-sizes.
14407         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
14408         * init.c (construct_virtual_bases): Fix type error.
14409         (build_vec_delete_1): Pass proper type to size_binop and don't
14410         fold result.
14411         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
14412         * rtti.c (get_base_offset): Pass proper type to size_binop.
14413         * search.c (dfs_find_vbases): Fix type error.
14414         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
14415         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
14416         * tree.c (debug_binfo): Variable N is signed.
14417         Use HOST_WIDE_INT_PRINT_DEC.
14418         * typeck.c (comptypes): sizetype is same as equivalent integer type.
14419         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
14420         size_one_node and size_zero_node.
14421         (c_alignof): Use size_one_node.
14422         (build_component_addr): Pass proper types to size_binop.
14423         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
14424
14425 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
14426
14427         Implement class scope using-declarations for functions.
14428         * class.c (handle_using_decl): Call add_method for used functions.
14429         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
14430         (add_method): Used functions are hidden by local functions.
14431         (check_bases_and_members): Handle using-decls before finalizing
14432         CLASSTYPE_METHOD_VEC.
14433         * call.c (add_function_candidate): Add ctype parm; if nonzero,
14434         override the type of 'this' accordingly.
14435         (add_template_candidate, add_template_candidate_real): Add ctype parm.
14436         (convert_class_to_reference, build_user_type_conversion_1,
14437         build_new_function_call, build_object_call, build_new_op,
14438         build_new_method_call): Pass ctype parm.
14439
14440         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
14441         the baselink.
14442         * call.c (convert_class_to_reference, build_user_type_conversion_1,
14443         build_new_function_call, build_object_call, build_new_op,
14444         build_new_method_call, build_op_delete_call): Don't get basetype_path
14445         from a baselink.
14446         * typeck.c (build_component_ref): Likewise.
14447         * init.c (build_offset_ref): Likewise.
14448         (resolve_offset_ref): Don't call enforce_access.
14449         Call build_scoped_ref.
14450         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
14451         would cause an error or if -pedantic.
14452         * class.c (alter_access): Lose binfo parm.
14453
14454 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
14455
14456         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
14457         types.
14458
14459 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
14460
14461         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
14462         pseudo_type_info creation into the std namespace
14463
14464 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
14465
14466         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
14467         (import_export_class): Remove declaration.
14468         * decl2.c (import_export_class): Make it static.
14469         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
14470         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
14471         EXPR_WITH_FILE_LOCATION.
14472         * lex.c (check_newline): Tweak filename/lineno setting.
14473         * semantics.c (begin_while_stmt): Fix typo in comment.
14474
14475 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14476
14477         * lang-options.h (-fmessage-length=): Add missing option.
14478
14479         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
14480
14481 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
14482
14483         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
14484
14485 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
14486
14487         * optimize.c (expand_call_inline): Emit the return label before
14488         evaluating the return value.
14489
14490 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
14491
14492         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
14493         than duplicating functionality here.
14494         * optimize.c: Include input.h.
14495         (expand_call_inline): Use push_srcloc and pop_srcloc.
14496         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
14497         * parse.c: Regenerated.
14498         * Makefile.in (lex.o): Depend on input.h.
14499         (optimize.o): Likewise.
14500
14501 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
14502
14503         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
14504         function type, rather than ICE.
14505
14506 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
14507
14508         * decl.c (grokdeclarator): Call decl_type_access_control.
14509         * parse.y (parse_end_decl): Don't call decl_type_access_control if
14510         decl is null.
14511
14512 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
14513
14514         * decl.c (decls_match): Remove obsolete static member nadgering.
14515
14516 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14517
14518         * decl.c (grokdeclarator): Change ANSI to ISO.
14519         * lex.c (consume_string, readescape, do_identifier): Likewise.
14520         (parse_float, real_yylex): Likewise.
14521         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
14522         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
14523         new_type_id, maybe_label_decls, simple_stmt,
14524         for.init.statement): Likewise.
14525         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
14526         * semantics.c (finish_named_return_value): Likewise.
14527         * parse.c: Regenerate.
14528
14529 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
14530
14531         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
14532         (CPTI_CLASS_STAR_TYPE): Remove.
14533         (vtable_index_type): Likewise.
14534         (class_star_type_node): Remove.
14535         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
14536         (build_binary_op_nodefault): Remove.
14537         * call.c (build_new_op): Use build_binary_op instead of
14538         build_binary_op_nodefault.
14539         * decl.c (init_decl_processing): Remove class_star_type_node
14540         initialization.  Make delta_type_node ptrdiff_type_node under the
14541         new ABI.  Initialize vtable_index_type.
14542         (build_ptrmemfunc_type): Build different structures for the new
14543         ABI.
14544         (build_enumerator): Use build_binary_op instead of
14545         build_binary_op_nodefault.
14546         * method.c (build_overload_value): Mangle pointers-to-members
14547         appropriately under the new ABI.
14548         * typeck.c (build_array_ref): Use build_binary_op instead of
14549         build_binary_op_nodefault.
14550         (get_member_function_from_ptrfunc): Adjust for the new ABI.
14551         (build_binary_op_nodefault): Rename to ...
14552         (build_binary_op): ... this.  Remove old version.  Adjust for
14553         pointer-to-member comparisons under the new ABI.
14554         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
14555         (build_ptrmemfunc): Adjust for the new ABI.
14556         (expand_ptrmemfunc_cst): Likewise.
14557         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
14558         (pfn_from_ptrmemfunc): Adjust for the new ABI.
14559
14560 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
14561
14562         * call.c (build_object_call): Compress consecutive calls to
14563         cp_error.
14564         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
14565         (build_op_delete_call): Adjust message formatting.
14566
14567         * class.c (check_bases): Compress consecutive calls to
14568         cp_pedwarn.
14569         (finish_struct_anon): Say 'ISO C++'.
14570
14571         * decl.c (start_decl): Same here.
14572         (grok_reference_init): Likewise.
14573         (grokfndecl): Correct message formatting.
14574         (grokfndecl): Improve diagnostic.
14575         (check_static_variable_definition): Likewise. Say 'ISO C++'
14576         (compute_array_index_type): Say 'ISO C++'
14577         (create_array_type_for_decl): Compress consecutive calls to
14578         cp_error.
14579         (grokdeclarator): Say 'ISO C++'
14580         (grok_op_properties): Likewise.
14581
14582         * decl2.c (delete_sanity): Clairify diagnostic.
14583         (check_member_template): Same here.
14584         (grok_function_init): Use consistent terminology.
14585
14586         * expr.c (do_case): Say 'ISO C++'
14587
14588         * friend.c (do_friend): Compress consecutive calls to warning.
14589
14590 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
14591
14592         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
14593         * class.c (build_secondary_vtable): Reorganize.  Don't create a
14594         new vtable under the new ABI.
14595         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
14596         computing the size.
14597         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
14598         the initializing elements.
14599         (initialize_vtable): New function.
14600         (dfs_finish_vtbls): Use it.
14601         (dfs_accumulate_vtbl_inits): New function.
14602         (finish_vtbls): Merge primary and secondary vtables under the new
14603         ABI.
14604         (finish_struct_1): Remove redundant call to layout_vtable_decl.
14605         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
14606         aren't VAR_DECLs.
14607
14608         * class.c (build_vtable): New function, split out from ...
14609         (get_vtable_decl): ... here, and ...
14610         (build_secondary_vtable): ... here.
14611
14612         * pt.c (tsubst_decl): Fix formatting.
14613
14614 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14615
14616         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
14617         (avoid_overlap, build_base_field): Likewise.
14618         (build_base_field, build_base_fields, is_empty_class):
14619         Test DECL_SIZE with integer_zero.
14620         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
14621         * cp-tree.h (struct lang_type): New field size_unit.
14622         (CLASSTYPE_SIZE_UNIT): New macro.
14623         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
14624         (cp_finish_decl): Delete -Wlarger-than processing.
14625         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
14626         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
14627         * tree.c (make_binfo): binfo vector is one entry longer.
14628         (walk_tree): Walk DECL_SIZE_UNIT.
14629
14630 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
14631
14632         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
14633         comment.
14634         (build_vtable_entry): Don't assume all vtable entries are
14635         functions.
14636         (build_vtbl_initializer): Adjust accordingly.
14637         (get_vtable_decl): Fix formatting.
14638
14639 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
14640
14641         * semantics.c (deferred_type_access_control): Walk the entire
14642         type_lookups list.
14643         (save_type_access_control): Rename from
14644         initial_deferred_type_access_control.  Just remember the value.
14645         (decl_type_access_control): New fn.
14646         (begin_function_definition): Use deferred_type_access_control, after
14647         we've started the function.  Set type_lookups to error_mark_node.
14648         * parse.y (frob_specs, fn.def1): Adjust.
14649         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
14650         (parse_end_decl, parse_bitfield0, parse_method): New fns.
14651         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
14652         (after_type_component_declarator0): Likewise.
14653         (after_type_component_declarator): Likewise.
14654         (notype_component_declarator): Likewise.
14655         * cp-tree.h: Adjust.
14656
14657         * decl.c (redeclaration_error_message): Allow redeclaration of
14658         namespace-scope decls.
14659
14660 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
14661
14662         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
14663
14664 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
14665
14666         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
14667         * decl2.c (grokclassfn): Likewise.
14668
14669         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
14670
14671         * decl2.c (lang_decode_option): Don't set default message length
14672         here.
14673         * lex.c (lang_init_options): Set it here.
14674
14675 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
14676
14677         Make DECL_CONTEXT mean the class in which a member function was
14678         declared, even for a virtual function.
14679         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
14680         (DECL_FRIEND_CONTEXT): New macro.
14681         (DECL_REAL_CONTEXT): Remove.
14682         (SET_DECL_FRIEND_CONTEXT): Likewise.
14683         (DECL_VIRTUAL_CONTEXT): Adjust.
14684         (DECL_CLASS_SCOPE_P): Use TYPE_P.
14685         (add_friends): Remove.
14686         (hack_decl_function_context): Likewise.
14687         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
14688         CP_DECL_CONTEXT.
14689         (build_over_call): Fix indentation.  Use DECL_CONTEXT
14690         instead of DECL_CLASS_CONTEXT.
14691         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
14692         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
14693         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14694         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
14695         (build_base_field): Likewise.
14696         (finish_struct_1): Likewise.
14697         (build_self_reference): Likewise.
14698         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
14699         DECL_REAL_CONTEXT.
14700         (pushtag): Use decl_function_context, not
14701         hack_decl_function_context.
14702         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
14703         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
14704         (pushdecl): Remove bogus code.
14705         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
14706         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
14707         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14708         Use decl_function_context, nothack_decl_function_context.
14709         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
14710         (grokdeclarator): Likewise.  Use decl_function_context, not
14711         hack_decl_function_context.
14712         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
14713         (start_function): Use DECL_FRIEND_CONTEXT, not
14714         DECL_CLASS_CONTEXT.  Use decl_function_context, not
14715         hack_decl_function_context.
14716         (finish_function): Use decl_function_context, not
14717         hack_decl_function_context.
14718         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
14719         DECL_CLASS_CONTEXT.
14720         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
14721         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
14722         (grokfield): Likewise.
14723         (finish_builtin_type): Likewise.
14724         (finish_vtable_vardec): Use decl_function_context, not
14725         hack_decl_function_context.
14726         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14727         (start_static_initialization_or_destruction): Likewise.
14728         (finish_static_initialization_or_destruction): Likewise.
14729         (mark_used): Adjust logic for deciding when to synthesize methods.
14730         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
14731         DECL_REAL_CONTEXT.
14732         * error.c (dump_function_decl): Use DECL_CONTEXT, not
14733         DECL_CLASS_CONTEXT.
14734         * friend.c (is_friend): Likewise.
14735         (add_friends): Remove.
14736         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
14737         * lex.c (begin_definition_of_inclass_inline): Use
14738         decl_function_context, not hack_decl_function_context.
14739         (process_next_inline): Likewise.
14740         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
14741         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
14742         DECL_CLASSS_CONTEXT.
14743         (hack_identifier): Likewise.
14744         (synthesize_method):  Use decl_function_context, not
14745         hack_decl_function_context.
14746         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
14747         DECL_REAL_CONTEXT.
14748         (is_member_template): Use decl_function_context, not
14749         hack_decl_function_context.  Use DECL_CONTEXT, not
14750         DECL_CLASS_CONTEXT.
14751         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
14752         DECL_CLASS_CONTEXT.
14753         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
14754         DECL_REAL_CONTEXT.
14755         (push_template_decl_real): Likewise.
14756         (instantiate_class_template): Don't call add_friends.
14757         (tsubst_default_argument): Use DECL_CONTEXT, not
14758         DECL_REAL_CONTEXT.
14759         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
14760         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14761         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
14762         DECL_CLASS_CONTEXT.
14763         * repo.c (repo_inline_used): Likewise.
14764         * search.c (current_scope): Adjust for new _CONTEXT macros.
14765         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
14766         DECL_REAL_CONTEXT.
14767         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14768         (lookup_fnfields_here):Likewise.
14769         (check_final_overrider): Likewise.
14770         (init_vbase_pointers): Likewise.
14771         (virtual_context): Likewise.
14772         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
14773         (expand_body): Use decl_function_context, not
14774         hack_decl_function_context.
14775         * tree.c (hack_decl_function_context): Remove.
14776         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
14777         DECL_CLASS_CONTEXT.
14778         * typeck2.c (error_not_base_type): Likewise.
14779
14780 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
14781
14782         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
14783
14784 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14785
14786         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
14787
14788 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
14789
14790         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
14791
14792 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
14793
14794         * decl2.c (lang_decode_option): Enable automatic line wrapping.
14795
14796 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
14797
14798         * parse.y (frob_specs): Split out...
14799         (parse_decl): From here.
14800         (fn.def2): Call initial_deferred_type_access_control.
14801         (after_type_component_declarator0): Call frob_specs.
14802         (notype_component_declarator0): Likewise.
14803         * search.c (friend_accessible_p): Nested classes are friends of their
14804         enclosing classes.
14805
14806 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
14807
14808         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
14809         used to create an implicit temporary.
14810
14811         * class.c (dfs_modify_vtables): Tweak calculation of functions to
14812         override.
14813
14814 2000-02-08  Nathan Sidwell  <nathan@acm.org>
14815
14816         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
14817         strip array element qualifiers too.
14818
14819 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
14820
14821         * decl.c (store_parm_decls): Don't build cleanups for parameters
14822         while processing_template_decl.
14823
14824 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
14825
14826         * cp-tree.h (struct saved_scope): Add incomplete field.
14827         (namespace_scope_incomplete): New macro.
14828         * decl.c (pushdecl): Use it.
14829         (hack_incomplete_structures): Use it.  See through artificial
14830         binding levels.
14831         (mark_saved_scope): Mark it.
14832
14833         Implement access control for nested types.
14834         * search.c (type_access_control): New fn.
14835         (accessible_p): Now we do perform access control for types.
14836         * semantics.c (deferred_type_access_control): New fn.
14837         (initial_deferred_type_access_control): New fn.
14838         (begin_function_definition): Call it.  Add lookups parm.
14839         * decl.c (struct binding_level): Add this_class field.
14840         (pushlevel_class): Set it.
14841         (mark_binding_level): Mark it.
14842         (lookup_name_real): Use it.  Call type_access_control.
14843         (mark_saved_scope): Mark lookups field.
14844         * cp-tree.h (flagged_type_tree): Add lookups field.
14845         (struct saved_scope): Add lookups field.
14846         (type_lookups): New macro.
14847         * parse.y (declmods): Now <ftype>.
14848         (parse_decl): Add lookups parm.  Call
14849         initial_deferred_type_access_control.
14850         (lang_extdef): Clear type_lookups.
14851         (typed_declspecs, declmods, typespec): Set lookups field.
14852         (initdcl): Call deferred_type_access_control.
14853         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
14854         component_decl_1, named_parm): Adjust.
14855         * friend.c (is_friend): Nested classes are friends of their
14856         enclosing classes.
14857
14858         * class.c (currently_open_derived_class): New fn.
14859         * method.c (hack_identifier): Use it.
14860
14861         * lex.c (do_identifier): Remove obsolete code.
14862
14863         * parse.y (typed_typespecs): Propagate new_type_flag properly.
14864
14865 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
14866
14867         * tinfo.h: Remove apostrophes from C++ comment (xgettext
14868         thinks this file is plain C).
14869
14870 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14871
14872         * Makefile.in (call.o): Depend on $(EXPR_H).
14873
14874         * call.c: Include "expr.h".
14875
14876         * class.c (dump_class_hierarchy): Add prototype.
14877
14878         * search.c (dfs_get_pure_virtuals): Likewise.
14879
14880 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
14881
14882         * parse.y (simple_stmt): Allow :: token in asm parameter list.
14883         * parse.c: Rebuilt.
14884
14885 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
14886
14887         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
14888         Store it in DECL_FCONTEXT.
14889         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
14890
14891 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
14892
14893         * tinfo.h (old abi): #include "tconfig.h".
14894         * tinfo.cc (convert_to_base): Move into old abi section.
14895
14896 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
14897
14898         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
14899         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
14900         (BINFO_PRIMARY_BINFO): New macro.
14901         (BF_DELTA): Rename to ...
14902         (BV_DELTA): ... this.
14903         (BF_VCALL_INDEX): Rename to ...
14904         (BV_VCALL_INDEX): ... this.
14905         (BF_FN): Rename to ...
14906         (BV_FN): ... this.
14907         * class.c (build_vbase_path): Adjust for changes to reverse_path.
14908         (set_rtti_entry): Rename BF_ macros to BV_ variants.
14909         (modify_vtable_entry): Simplify.
14910         (add_virtual_function): Rename BF_ macros to BV_ variants.
14911         (build_vtable_initializer): Likewise.
14912         (get_class_offset_1): Remove.
14913         (dfs_get_class_offset): Likewise.
14914         (get_class_offset): Likewise.
14915         (dfs_find_final_overrider): New function.
14916         (find_final_overrider): Likewise.
14917         (modify_one_vtable): Remove.
14918         (dfs_find_base): New function.
14919         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
14920         find_final_overrider.
14921         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
14922         virtuals.
14923         (dfs_fixup_vtable_deltas): Remove.
14924         (override_one_vtable): Remove.
14925         (merge_overrides): Likewise.
14926         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
14927         unreal chilren of virtual bases.
14928         (finish_struct_1): Don't use merge_overrides.  Don't use
14929         dfs_fixup_vtable_deltas.
14930         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
14931         BINFOs.
14932
14933 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
14934             Jason Merrill  <jason@yorick.cygnus.com>
14935
14936         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
14937
14938 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
14939
14940         * exception.cc (__throw_bad_typeid): Add missing std::.
14941
14942 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14943
14944         * cp-tree.h (make_thunk): PROTO -> PARAMS.
14945
14946 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
14947
14948         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
14949
14950         Runtime support for new-abi rtti.
14951         * inc/typeinfo (type_info::operator!=): Define in class.
14952         (type_info::before, type_info::name, type_info::operator==,
14953         type_info::operator!=): Define new ABI implementations.
14954         (type_info::is_pointer_p, type_info::is_function_p): Declare
14955         new virtual functions.
14956         (type_info::do_catch, type_info::do_upcast): Likewise.
14957
14958         * tinfo.h (__base_class_info): Define new class.
14959         (__class_type_info): Likewise.
14960         (__si_class_type_info): Likewise.
14961         (__vmi_class_type_info): Likewise.
14962         (__dynamic_cast): Prototype.
14963
14964         * tinfo.cc: Conditionalize old and new rtti mechanisms.
14965         (type_info::is_pointer_p): Define new function.
14966         (type_info::is_function_p): Likewise.
14967         (type_info::do_catch): Likewise.
14968         (type_info::do_upcast): Likewise.
14969         (vtable_prefix): New structure for vtable access.
14970         (adjust_pointer): Define new template function.
14971         (contained_p, public_p, virtual_p, contained_public_p,
14972         contained_nonpublic_p, contained_nonvirtual_p): Define new
14973         functions.
14974         (nonvirtual_base_type): New local variable.
14975         (__class_type_info::~__class_type_info): Define.
14976         (__si_class_type_info::~__si_class_type_info): Likewise.
14977         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
14978         (__class_type_info::do_catch): Define new function.
14979         (__class_type_info::do_upcast): Likewise.
14980         (__class_type_info::find_public_src): Likewise.
14981         (__class_type_info::do_find_public_src): Likewise.
14982         (__si_class_type_info::do_find_public_src): Likewise.
14983         (__vmi_class_type_info::do_find_public_src): Likewise.
14984         (__class_type_info::do_dyncast): Likewise.
14985         (__si_class_type_info::do_dyncast): Likewise.
14986         (__vmi_class_type_info::do_dyncast): Likewise.
14987         (__class_type_info::do_upcast): Likewise.
14988         (__si_class_type_info::do_upcast): Likewise.
14989         (__vmi_class_type_info::do_upcast): Likewise.
14990         (__dynamic_cast): Likewise.
14991
14992         * tinfo2.cc (__fundamental_type_info): Define new class.
14993         (__pointer_type_info): Likewise.
14994         (__reference_type_info): Likewise.
14995         (__array_type_info): Likewise.
14996         (__function_type_info): Likewise.
14997         (__enum_type_info): Likewise.
14998         (__ptr_to_member_type_info): Likewise.
14999         (__fundamental_type_info::~__fundamental_type_info): Define.
15000         (__pointer_type_info::~__pointer_type_info): Likewise.
15001         (__reference_type_info::~__reference_type_info): Likewise.
15002         (__array_type_info::~__array_type_info): Likewise.
15003         (__function_type_info::~__function_type_info): Likewise.
15004         (__enum_type_info::~__enum_type_info): Likewise.
15005         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
15006         (__pointer_type_info::do_catch): Define new function.
15007         (__ptr_to_member_type_info::do_catch): Define new function.
15008
15009         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
15010         (__is_pointer): Likewise.
15011
15012         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
15013
15014 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
15015
15016         * cp/class.c (build_vtable): Rename to build_primary_vtable.
15017         (prepare_fresh_vtable): Rename to build_secondary_vtable.
15018         (make_new_vtable): New function.
15019         (modify_vtable_entry): Handle generation of new vtables correctly.
15020         (modify_one_vtable): Remove unused parameter.
15021         (dfs_fixup_vtable_deltas): Likewise.
15022         (override_one_vtable): Use build_secondary_vtable.
15023         (finish_struct_1): Use build_primary_vtable and
15024         build_secondary_vtable.
15025
15026 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
15027
15028         * cp/decl.c: Adjust variable names, comments, help strings.
15029
15030 2000-01-29  Nathan Sidwell  <nathan@acm.org>
15031
15032         * new2.cc (operator delete[]): Use operator delete, don't assume
15033         implementation.
15034
15035 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
15036
15037         * class.c (build_vtbl_initializer): Add argument to
15038         build_vtable_entry call.
15039
15040 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
15041
15042         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
15043         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
15044         (BF_DELTA): New macro.
15045         (BF_VCALL_INDEX): Likewise.
15046         (BF_FN): Likewise.
15047         (THUNK_VCALL_OFFSET): Likewise.
15048         (make_thunk): Change prototype.
15049         * class.c (build_vtable_entry): Integrate
15050         build_vtable_entry_for_fn.  Handle vcall indices.
15051         (build_vtable_entry_for_fn): Remove.
15052         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
15053         BF_VCALL_INDEX, BF_FN.
15054         (modify_vtable_entry): Integrate common code from
15055         modify_one_vtable and dfs_fixup_vtable_deltas.
15056         (add_virtual_function): Set BF_VCALL_INDEX.
15057         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
15058         and BF_FN.
15059         (modify_one_vtable): Simplify.
15060         (dfs_fixup_vtable_deltas): Likewise.
15061         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
15062         * method.c (make_thunk): Handle vcall indices.
15063
15064 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
15065
15066         Compiler side new abi rtti (not enabled).
15067         * cp-tree.h (new_abi_rtti_p): New macro.
15068         (emit_support_tinfos): Prototype new function.
15069         (tinfo_decl_p): Likewise.
15070         (emit_tinfo_decl): Likwise.
15071         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
15072         macros.
15073         (doing_runtime): New local static.
15074         (init_rtti_processing): Add new-abi initializer.
15075         (get_tinfo_decl): Add new-abi logic.
15076         (tinfo_from_decl): Likewise.
15077         (build_dynamic_cast_1): Likewise.
15078         (qualifier_flags): New static function.
15079         (tinfo_base_init): Likewise.
15080         (generic_initializer): Likewise.
15081         (ptr_ref_initializer): Likewise.
15082         (ptmd_initializer): Likewise.
15083         (class_hint_flags): Likewise.
15084         (class_initializer): Likewise.
15085         (synthesize_tinfo_var): Likewise.
15086         (create_real_tinfo_var): Likewise.
15087         (create_pseudo_type_info): Likewise.
15088         (get_vmi_pseudo_type_info): Likewise.
15089         (create_tinfo_types): Likewise.
15090         (emit_support_tinfos): New global function.
15091         (tinfo_decl_p): New global predicate.
15092         (emit_tinfo_decl): New global function.
15093         * class.c (set_rtti_entry): Generalize for old and new rtti.
15094         (build_vtbl_initializer): Likewise.
15095         * decl2.c (finish_file): Likewise.
15096
15097 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
15098
15099         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
15100         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
15101
15102 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
15103
15104         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
15105         for scopes.
15106
15107 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
15108
15109         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
15110
15111 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
15112
15113         * optimize.c (calls_setjmp_r): Supply new argument
15114         to special_function_p.
15115
15116 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15117
15118         * call.c: PROTO -> PARAMS.
15119         * class.c: Likewise.
15120         * cp-tree.h: Likewise.
15121         * cvt.c: Likewise.
15122         * decl.c: Likewise.
15123         * decl.h: Likewise.
15124         * decl2.c: Likewise.
15125         * dump.c: Likewise.
15126         * errfn.c: Likewise.
15127         * error.c: Likewise.
15128         * except.c: Likewise.
15129         * expr.c: Likewise.
15130         * init.c: Likewise.
15131         * input.c: Likewise.
15132         * lex.c: Likewise.
15133         * lex.h: Likewise.
15134         * method.c: Likewise.
15135         * optimize.c: Likewise.
15136         * parse.y: Likewise.
15137         * pt.c: Likewise.
15138         * repo.c: Likewise.
15139         * rtti.c: Likewise.
15140         * search.c: Likewise.
15141         * semantics.c: Likewise.
15142         * spew.c: Likewise.
15143         * tree.c: Likewise.
15144         * typeck.c: Likewise.
15145         * typeck2.c: Likewise.
15146         * xref.c: Likewise.
15147
15148 2000-01-25  Richard Henderson  <rth@cygnus.com>
15149
15150         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
15151
15152 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
15153
15154         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
15155         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
15156         (struct vcall_offset_data_s): New type.
15157         (dfs_vcall_offset_queue_p): New function.
15158         (dfs_build_vcall_offset_vtbl_entries): Likewise.
15159         (build_vcall_offset_vtbl_entries): Likewise.
15160         (layout_vtable_decl): Likewise.
15161         (num_vfun_entries): Likewise.
15162         (num_extra_vtbl_entries): Add the entries for vcall offsets.
15163         (build_vtbl_initializer): Likewise.
15164         (dfs_finish_vtabls): Use layout_vtable_decl.
15165         (modify_one_vtables): Always duplicate vtables under the new ABI.
15166         (finish_struct_1): Use layout_vtable_decl.
15167
15168 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15169
15170         * decl.c (member_function_or_else): Change third arg from a format
15171         specifier to an `enum overload_flags'.  Callers changed.
15172
15173 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15174
15175         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
15176         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
15177         build_const_cast, get_delta_difference, check_return_expr): Avoid
15178         ANSI string concatenation usage.
15179
15180 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
15181
15182         * class.c (layout_class_type): Put the fields required to make a
15183         class non-empty at the end, not the beginning, of the TYPE_FIELDs
15184         list.
15185
15186 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
15187
15188         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
15189         template.
15190
15191         * decl2.c (mark_used): Do instantiate inlines that have been
15192         explicitly instantiated.
15193
15194 2000-01-24  Richard Henderson  <rth@cygnus.com>
15195
15196         * call.c (build_over_call): Use expand_tree_builtin.
15197         * typeck.c (build_function_call_real): Likewise.
15198         (build_binary_op_nodefault): Handle unordered compares.
15199
15200 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
15201
15202         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
15203         cp_tree_index values.
15204         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
15205         New global node #defines for them.
15206         * rtti.c (call_void_fn): Replace with ...
15207         (build_runtime_decl): ... new static function.
15208         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
15209         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
15210         (build_dynamic_cast_1): Always produce correctly typed result.
15211         Explicitly produce type_info addresses. Use dynamic_cast_node.
15212         * exception.cc (__throw_bad_cast): Return `void *'.
15213         (__throw_bad_typeid): Return `const type_info &'.
15214
15215 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
15216
15217         * cp-tree.h (get_vtable_decl): Prototype new function.
15218         * class.c (get_vtable_decl): New function. Broken out from ...
15219         (build_vtable): ... here. Use it.
15220         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
15221         by get_vtable_decl.
15222
15223 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
15224
15225         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
15226         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
15227         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
15228         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
15229         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
15230         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
15231         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
15232         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
15233         (CPTI_TINFO_VAR_ID): New enumeration.
15234         (__tp_desc_type_node, __access_mode_type_node,
15235         __bltn_desc_type_node, __user_desc_type_node,
15236         __class_desc_type_node, __ptr_desc_type_node,
15237         __attr_desc_type_node, __func_desc_type_node,
15238         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
15239         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
15240         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
15241         enum_desc_type_node, class_desc_type_node,
15242         si_class_desc_type_node, vmi_class_desc_type_node,
15243         ptmd_desc_type_node, base_desc_type_node): New #defines.
15244         (tinfo_fn_id, tinfo_fn_type): Rename to ...
15245         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
15246         (tinfo_var_id): New enumeration.
15247         (DECL_TINFO_FN_P): Augment comment.
15248         * decl.c (cp_global_trees): Adjust documentation.
15249         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
15250         tinfo_decl_type and tinfo_var_id.
15251         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
15252         (build_typeid): Remove unused variable.
15253         (get_tinfo_var): Use tinfo_var_id.
15254         (tinfo_name): New static function.
15255         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
15256         (tinfo_from_decl): Likewise.
15257         (get_base_offset): New static function, broken out of
15258         expand_class_desc.
15259         (expand_si_desc): Use tinfo_name.
15260         (expand_class_desc): Likewise. Lose local static variable.
15261         Use base_desc_type_node. Use get_base_offset.
15262         (expand_ptr_desc): Use tinfo_name.
15263         (expand_attr_desc): Likewise.
15264         (expand_generic_desc): Likewise.
15265
15266         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
15267         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
15268
15269 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
15270
15271         * cp-tree.h (__eprintf): Remove declaration.
15272         * tree.c (__eprintf): Remove definition.
15273
15274 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
15275             Mark Mitchell  <mark@codesourcery.com>
15276
15277         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
15278         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
15279
15280 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
15281
15282         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
15283
15284 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
15285
15286         * cp-tree.h (register_dtor_fn): New function.
15287         * decl.c (destroy_local_static): Rename to ...
15288         (register_dtor_fn): ... this.  Give it external linkage.
15289         (expand_static_init): Use it.
15290         * decl2.c (do_static_initialization): Likewise, if using
15291         __cxa_atexit.
15292         (do_static_destruction): Check that __cxa_atexit is not in use.
15293         (finish_file): Don't call do_static_destruction if using
15294         __cxa_atexit.
15295
15296         * typeck.c (convert_arguments): Restore two-message error
15297         reporting.
15298
15299 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
15300
15301         Remap dynamic cast hint values to be consistent across ABIs.
15302         * search.c (dynamic_cast_base_recurse): Remap generated value.
15303         (get_dynamic_cast_base_type): Adjust documentation.
15304         * tinfo.h (__user_type_info::dyncast): Likewise.
15305         (__user_type_info::find_public_subobj): Remap BOFF meaning.
15306         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
15307         (__class_type_info::do_dyncast): Likewise.
15308         (__class_type_info::do_find_public_subobj): Likewise.
15309         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
15310
15311 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
15312
15313         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
15314
15315         * typeck2.c (incomplete_type_error): Restore previous
15316         cp_error and cp_error_at call sequence.
15317
15318 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
15319
15320         * class.c (dump_class_hierarchy): Make format agree with argument;
15321         cast pointer to unsigned long and print with %lx.
15322
15323 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
15324
15325         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
15326
15327         * typeck.c (composite_pointer_type, common_type,
15328         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
15329         build_function_call_real, convert_arguments,
15330         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
15331         build_unary_op, mark_addressable, build_compound_expr,
15332         build_static_cast, build_reinterpret_cast, build_const_cast,
15333         build_c_cast, build_modify_expr, get_delta_difference,
15334         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
15335         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
15336         into a single one.
15337         * typeck2.c (readonly_error, abstract_virtuals_error,
15338         process_init_constructor, check_for_new_type): Likewise.
15339
15340 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
15341
15342         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
15343         VAR_DECLs.
15344
15345 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
15346
15347         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
15348         (build_x_typeid): Likewise.
15349         (get_tinfo_fn): Likewise.
15350         (get_tinfo_fn_unused): Rename to ...
15351         (get_tinfo_decl): ... here.
15352         * rtti.c (build_headof): Replace logic error with assertion.
15353         (get_tinfo_fn_dynamic): Rename to ...
15354         (get_tinfo_decl_dynamic): ... here. Make static. Use
15355         complete_type_or_else.
15356         (build_x_typeid): Move into ...
15357         (build_typeid): ... here. Adjust call to
15358         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
15359         throw_bad_typeid expression.
15360         (get_tinfo_fn_unused): Rename to ...
15361         (get_tinfo_decl): ... here. Adjust comment.
15362         (get_tinfo_fn): Delete.
15363         (tinfo_from_decl): New static function.
15364         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
15365         (get_typeid): Use complete_type_or_else.
15366         (build_dynamic_cast_1): Adjust calls to
15367         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
15368         * parse.y (primary): Adjust call to build_typeid.
15369         * except.c (build_eh_type_type_ref): Adjust call to
15370         get_tinfo_decl. Mark as used.
15371         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
15372         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
15373         * parse.c: Regenerated.
15374
15375 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
15376
15377         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
15378         calling convention.
15379         (resolves_to_fixed_type_p): Document calling convention.
15380         * rtti.c (build_x_typeid): Initialize NONNULL.
15381
15382         * cp-tree.h (build_shared_int_cst): New function.
15383         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
15384         * class.c (modify_vtable_entry): Likewise.
15385         (add_virtual_function): Split out code to generated shared
15386         INTEGER_CSTs to build_share_int_cst.
15387         (modify_all_vtables): Handle all the overridden functions here.
15388         Add overridden functions from non-primary virtual bases to the
15389         primary vtable.
15390         (finish_struct_1): Adjust call to modify_all_vtables.  Add
15391         overridden functions from non-primary bases to the vtable.
15392         * tree.c (build_shared_int_cst): New function.
15393
15394         * cp-tree.h (scratchalloc): Remove.
15395         (build_scratch_list): Likewise.
15396         * call.c (convert_class_to_reference): Replace build_scratch_list
15397         and build_expr_list with build_tree_list.
15398         (add_candidate): Replace scratchalloc with expralloc.  Note memory
15399         leak.
15400         (build_user_type_conversion_1):  Replace build_scratch_list
15401         and build_expr_list with build_tree_list.
15402         (build_new_op): Likewise.
15403         (build_op_delete_call): Likewise.
15404         (convert_like): Likewise.
15405         * cvt.c (ocp_convert): Likewise.
15406         * decl.c (start_decl): Likewise.
15407         (start_function): Likewise.
15408         (finish_destructor_body): Likewise.
15409         (maybe_build_cleanup_1): Likewise.
15410         * decl2.c (reparse_decl_as_expr): Likewise.
15411         * init.c (perform_member_init): Likewise.
15412         (expand_cleanup_for_base): Likewise.
15413         (build_builtin_delete_call): Likewise.
15414         (build_new_1): Likewise.
15415         (build_delete): Likewise.
15416         * method.c (do_build_assign_ref): Likewise.
15417         * parse.y (already_scoped_stmt): Likewise.
15418         (nontrivial_exprlist): Likewise.
15419         (net_initializer): Likewise.
15420         (initlist): Likewise.
15421         * parse.c: Regenerated.
15422         * rtti.c (build_x_typeid): Likewise.
15423         (build_dynamic_cast_1): Likewise.
15424         * typeck.c (build_x_compound_expr): Likewise.
15425         (build_static_cast): Likewise.
15426         (build_modify_expr): Likewise.
15427
15428         * cp-tree.h (DECL_VINDEX): Add documentation.
15429         * class.c (build_vtable_entry): Likewise.
15430         (start_vtable): Add comment.
15431         (add_virtual_function): Replace pending_hard_virtuals with
15432         overridden_virtuals and pending_virtuals with new_virtuals.
15433         Replace redundant assignments with assertions.
15434         (check_for_override): Add comment.
15435         (check_bases_and_members): Replace pending_hard_virtuals with
15436         overridden_virtuals and pending_virtuals with new_virtuals.
15437         (create_vtbl_ptr): Likewise.
15438         (layout_class_type): Likewise.
15439         (finish_struct_1): Likewise.  Add comments.
15440
15441 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
15442
15443         * class.c (finish_struct_1): Replace redundant code with
15444         assertions.
15445
15446         * cp-tree.h (flag_new_abi): Move.
15447         (flag_use_cxa_atexit): Likewise.
15448         (flag_honor_std): Likewise.
15449         (flag_rtti): Likewise.
15450         (vbase_offsets_in_vtable_p): Define.
15451         (vptrs_present_everywhere_p): Likewise.
15452         (TYPE_CONTAINS_VPTR_P): Likewise.
15453         (dfs_walk_real): Declare.
15454         * class.c (build_vbase_pointer_fields): Check
15455         vbase_offsets_in_vtable_p.
15456         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
15457         BINFO_VPTR_FIELD.
15458         (build_vbase_offset_vtbl_entries): Simplify.
15459         (build_vbase_offset_vtbl_entries): Adjust.
15460         (build_vbase_pointer): Add ability to look up vbase offsets in
15461         vtable.
15462         (start_vtable): New function.
15463         (add_virtual_function): Use it.
15464         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
15465         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
15466         (build_vtbl_initializer): Take the type of the complete object as
15467         input.  Use it to correctly calculate vbase offsets.
15468         (dfs_finish_vtbls): Pass the complete type to
15469         build_vtbl_initializer.
15470         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
15471         (create_vtable_ptr): Create a vtable even if there are no
15472         new virtual functions, under the new ABI.
15473         (finish_struct_1): Likewise.
15474         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
15475         * decl.c (exapnd_static_init): Remove call to
15476         preserve_initializer.
15477         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
15478         vtables.
15479         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
15480         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
15481         (construct_virtual_bases): Don't initialize virtual base pointers
15482         under the new ABI.
15483         (build_aggr_init): Clean up comment.
15484         (expand_aggr_init_1): Likewise.
15485         * rtti.c (expand_class_desc): Store the virtual function table
15486         index where the vbase offset lives in the offset field.
15487         * search.c (dfs_walk_real): Make it global.
15488         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
15489         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
15490
15491         * tinfo.h (USItype): Make it signed under the new ABI.
15492         * tinfo.cc (convert_to_base): New function.  Encapsulate base
15493         conversion logic here.
15494         (__class_type_info::do_upcast): Use it.
15495         (__class_type_info::do_dyncast): Likewise.
15496         (__class_type_info::do_find_public_subobj): Likewise.
15497
15498         * init.c (construct_virtual_bases): Don't look up the addresses of
15499         virtual bases at run-time.
15500
15501         * class.c (build_vbase_pointer): Relocate.
15502         (build_vbase_pointer_fields): Likewise.
15503         (dfs_build_vbase_offset_vtbl_entries): Likewise.
15504         (build_vbase_offset_vtbl_entries): Likewise.
15505
15506         * decl.c (init_decl_processing): Complain if -fnew-abi
15507         -fno-vtable-thunks is used.
15508
15509         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
15510         flag_new_abi.
15511
15512 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
15513
15514         * cp-tree.h (num_extra_vtbl_entries): New function.
15515         (size_extra_vtbl_entries): Likewise.
15516         (dfs_vtable_path_unmark): Likewise.
15517         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
15518         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
15519         * class.c (num_extra_vtbl_entries): New function.
15520         (size_extra_vtbl_entries): Likewise.
15521         (dfs_build_vbase_offset_vtbl_entries): New function.
15522         (build_vbase_offset_vtbl_entries): Likewise.
15523         (build_vtbl_initializer): Use it.
15524         (finish_struct_1): Adjust vtable sizes (using
15525         num_extra_vtbl_entries).
15526         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
15527         THUNK_DECL is non-NULL before expanding it.
15528         * init.c (expand_virtual_init): Adjust the vtable pointer by
15529         size_extra_vtbl_entries before storing it.
15530         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
15531         Handle TREE_LIST parameters here, not in the dfs_* functions.
15532         (dfs_unmarked_real_bases_queue_p): Adjust.
15533         (dfs_marked_real_bases_queue_p): Likewise.
15534         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
15535         (dfs_vtable_path_marked_real_bases_queue_p): New function.
15536         (dfs_vtable_path_unmark): Likewise.
15537
15538 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
15539
15540         * optimize.c (copy_body_r): Clear the operand three of a
15541         TARGET_EXPR when copying it.
15542
15543 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15544
15545         * method.c (build_decl_overload_real): Check whether we are in ::
15546         before returning __builtin_new/delete.
15547
15548 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
15549
15550         * pt.c (tsubst_friend_function): Improve comment.
15551         (instantiate_decl): Avoid crashing when a "nested" function is
15552         instantiated from the top level.
15553
15554         * dump.c (dqeueue_and_dump): Dump
15555         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
15556
15557 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15558
15559         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
15560
15561 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
15562
15563         * g++spec.c (lang_specific_driver): Add -fnew-abi if
15564         ENABLE_NEW_GXX_ABI defined.
15565         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
15566         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
15567         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
15568
15569 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
15570
15571         * decl.c (start_cleanup_fn): Call pushdecl.
15572
15573         * call.c (convert_class_to_reference): Fix typos.
15574         (build_conditional_expr): Handle errors gracefully.
15575         * class.c (push_nested_class): Likewise.
15576         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
15577         (DECL_THIS_EXTERN): Use it.
15578         (DECL_THIS_STATIC): Likewise.
15579         * cvt.c (convert_to_void): Handle errors gracefully.
15580         (build_expr_type_conversion): Likewise.
15581         * decl.c (maybe_push_decl): Likewise.
15582         (start_decl_1): Likewise.
15583         (require_complete_types_for_parms): Likewise.
15584         * parse.y (structsp): Likewise.
15585         (base_class): Likewise.
15586         * parse.c: Regenerated.
15587         * pt.c (finish_member_template_decl): Likewise.
15588         * typeck.c (decay_conversion): Likewise.
15589
15590         * cp-tree.h (dfs_skip_vbases): New function.
15591         (find_vbase_instance): Likewise.
15592         * class.c (determine_primary_base): Allow a nearly empty base to
15593         serve as a primary base class under the new ABI.
15594         (get_class_offset_1): Rename to ...
15595         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
15596         messages here.
15597         (get_class_offset): Use it.  Issue error messages here.
15598         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
15599         find the right copies of virtual bases.
15600         (fixup_vtable_deltas1): Rename to ...
15601         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
15602         bases as primary bases.
15603         (fixup_vtable_deltas): Remove.
15604         (override_one_vtable): Handle virtual bases as primary bases.
15605         (merge_overrides): Likewise.
15606         (finish_struct_1): Likewise.
15607         (dump_class_hierarchy): Dump primary-ness of bases as well.
15608         * search.c (mark_primary_bases): Use a pre-order traversal to
15609         handle primary virtual bases.
15610         (dfs_skip_vbases): New fiunction.
15611         (expand_upcast_fixups): Adjust to handle primary virtual bases.
15612         (fixup_virtual_upcast_offsets): Likewise.
15613         (fixup_all_virtual_upcast_offsets): Likewise.
15614         (dfs_find_vbase_instances): New function.
15615         (find_vbase_instance): Likewise.
15616
15617 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
15618
15619         * lex.c (DIR_SEPARATOR): Delete macro.
15620
15621 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
15622
15623        * decl2.c (lang_decode_option): Handle automatic line wrapping
15624        option.
15625
15626 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
15627
15628         * friend.c (do_friend): Don't resolve scopes when processing
15629         template declarations, even if the qualifying scope doesn't
15630         involve template parameters.
15631
15632 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
15633
15634         * class.c (dfs_modify_vtables_queue_p): Remove.
15635         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
15636         and dfs_marked_real_bases_queue_p instead of
15637         dfs_modify_vtables_queue_p.
15638
15639         * class.c (build_vbase_path): Simplify.
15640         (dfs_propagate_binfo_offsets): New function.
15641         (propagate_binfo_offsets): Use it.
15642         (remove_base_field): Simplify.
15643         (dfs_set_offset_for_vbases): Remove.
15644         (dfs_set_offset_for_shared_vbases): New function.
15645         (dfs_set_offset_for_unshared_vbases): Likewise.
15646         (layout_virtual_bases): Use them.
15647         (layout_basetypes): Don't call propagate_binfo_offsets.
15648         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
15649         for the vbases.
15650
15651         * class.c (build_base_field): New function, split out from ...
15652         (build_base_fields): ... here.  Use it.  Allocate primary bases
15653         first, under the new ABI.
15654         (get_vtable_entry): Remove.
15655         (remove_base_field): New function, split out from ...
15656         (remove_base_fields): ... here.  Adjust since primary bases come
15657         first under the new ABI.
15658
15659         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
15660         (initialize_vtbl_ptrs): New function.
15661         (expand_indirect_vtbls_init): Change prototype.
15662         (convert_pointer_to_vbase): Declare.
15663         * init.c (expand_direct_vtbls_init): Remove.
15664         (dfs_initialize_vtbl_ptrs): New function.
15665         (initialize_vtbl_ptrs): Likewise.
15666         (emit_base_init): Use initialize_vtbl_ptrs.
15667         * search.c (convert_pointer_to_vbase): Make it global.
15668         (expand_indirect_vtbls_init): Remove vtable initialization code.
15669         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
15670
15671         * class.c (dfs_finish_vtbls): New function.
15672         (finish_vtbls): Use it.
15673         (dump_class_hierarchy): New function.
15674
15675         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
15676         (BINFO_VBASE_PRIMARY_P): New macro.
15677         (BINFO_VIRTUALS): Add to documentation.
15678         (SET_BINFO_PRIMARY_MARKED_P): Remove.
15679         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
15680         (dfs_mark_primary_bases_queue_p): Likewise.
15681         (dfs_unmarked_real_bases_queue_p): New function.
15682         (dfs_marked_real_bases_queue_p): Likewise.
15683         * search.c (dfs_mark_primary_bases): Adjust.
15684         (mark_primary_bases): Likewise.
15685         (get_shared_vbase_if_not_primary): New function.
15686         (dfs_unmarked_real_bases_queue_p): Likewise.
15687         (dfs_marked_real_bases_queue_p): Likewise.
15688         (dfs_get_pure_virtuals): Simplify.
15689         (get_pure_virtuals): Likewise.
15690
15691 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15692
15693         * lex.c: Include tm_p.h.
15694
15695 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
15696
15697         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
15698
15699 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
15700
15701         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
15702         * pt.c (instantiate_decl): Defer comdat templates that might not be
15703         needed.
15704
15705         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
15706         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
15707         (finish_file): Likewise.
15708
15709         * decl2.c (import_export_class): Undo 12/14 change.
15710
15711         * error.c (dump_decl): operator new, not operatornew.
15712
15713         * class.c (field_decl_cmp): A nontype is "greater" than a type.
15714         * search.c (lookup_field_1): Look for the last field with the
15715         desired name.
15716
15717 2000-01-05  Nathan Sidwell  <nathan@acm.org>
15718
15719         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
15720         FUNCTION_DECL.
15721
15722 2000-01-05  Nathan Sidwell  <nathan@acm.org>
15723
15724         * typeck.c (build_static_cast): Don't strip target qualifiers
15725         when casting from a class.
15726
15727 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15728
15729         * class.c (warn_hidden): Initialize variable `fndecl'.
15730
15731 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
15732
15733         * decl.c (flag_isoc9x): New variable to be able to use code in
15734         c-common.c.  For now always zero.
15735
15736 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
15737
15738         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
15739         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
15740         or unshare_base_binfos for virtual bases here.
15741         * search.c (dfs_get_vbase_types): Do it here.
15742         (get_vbase_types): Adjust.
15743
15744 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
15745
15746         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
15747         (BINFO_PRIMARY_MARKED_P): Use flag 5.
15748         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
15749         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
15750         (unmark_primary_bases): Remove declaration.
15751         (unmarkedp): Declare.
15752         (dfs_vbase_unmark): Likewise.
15753         * class.c (determine_primary_base): Return immediately if there
15754         are no base classes.  Call mark_primary_bases here.
15755         (modify_all_direct_vtables): Remove.
15756         (modify_all_indirect_vtables): Remove.
15757         (dfs_modify_vtables_queue_p): New function.
15758         (dfs_modify_vtables): New function.
15759         (modify_all_vtables): Use them.
15760         (build_base_fields): Build FIELD_DECLs for primary virtual base
15761         classes.
15762         (create_vtable_ptr): Don't call determine_primary_base here.
15763         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
15764         (dfs_set_offset_for_vbases): ... this.
15765         (layout_virtual_bases): Use it.
15766         (layout_class_type): Call determine_primary_base here.
15767         * search.c (unmarkedp): Make it global.
15768         (shared_marked_p): Simplify.
15769         (shared_unmarked_p): Likewise.
15770         (dfs_primary_bases_queue_p): Remove.
15771         (dfs_unmark_primary_bases): Likewise.
15772         (unmark_primary_bases): Likewise.
15773         (mark_primary_bases): Simplify.
15774         (get_pure_virtuals): Don't call mark_primary_bases here.
15775         (dfs_vbase_unmark): New function.
15776         (get_vbase_types): Simplify.
15777
15778         * class.c (struct base_info): Remove.
15779         (determine_primary_base): Take has_virtual_p rather than a
15780         base_info as input.  Don't calculate max_has_virtual.
15781         (finish_struct_bits): Remove max_has_virtual argument.
15782         (create_vtable_ptr): Remove max_has_virtual_p argument.
15783         (layout_virtual_bases): Remove max argument.
15784         (layout_basetypes): Likewise.
15785         (layout_class_type): Remove max_has_virtual_p argument.
15786         (finish_struct_1): Remove max_has_virtual.
15787
15788         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
15789         (layout_basetypes): Remove.
15790         * class.c (propagate_binfo_offsets): Moved here from tree.c.
15791         Update to handle primary virtual bases.
15792         (remove_base_fields): New function, split out from
15793         layout_basetypes.
15794         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
15795         (layout_virtual_bases): New function, split out from
15796         layout_basetypes.  Update to handle primary virtual bases.
15797         (layout_basetypes): Moved here from tree.c.  Use
15798         remove_base_fields and layout_virtual_bases.
15799         * search.c (dfs_mark_primary_bases_queue_p): New function.
15800         (mark_primary_bases): Use it.
15801         * tree.c (CEIL): Remove.
15802         (propagate_binfo_offsets): Remove.
15803         (layout_basetypes): Remove.
15804
15805 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
15806
15807         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
15808         (BINFO_PRIMARY_MARKED_P): New macro.
15809         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
15810         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
15811         (mark_primary_bases): New function.
15812         (unmark_primary_bases): Likewise.
15813         * search.c (get_abstract_virtuals_1): Remove.
15814         (dfs_mark_primary_bases): New function.
15815         (mark_primary_bases): Likewise.
15816         (dfs_unmark_primary_bases): Likewise.
15817         (unmark_primary_bases): Likewise.
15818         (dfs_get_pure_virtuals): Likewise.
15819
15820 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
15821
15822         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
15823         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
15824         (modify_one_vtable): Adjust.
15825         (fixup_vtable_deltas1): Likewise.
15826         (override_one_vtable): Likewise.
15827         * search.c (get_abstract_virtuals_1): Likewise.
15828         (get_pure_virtuals): Likewise.
15829         (expand_upcast_fixups): Likewise.
15830         * tree.c (debug_binfo): Likewise.
15831
15832         * class.c (build_vtable): Don't return a value.  Don't rebuild
15833         vtables for bases that have already been handled.
15834         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
15835         already been handled.
15836         (modify_one_vtable): Adjust accordingly.
15837         (fixup_vtable_deltas1): Likewise.
15838         (finish_struct_1): Likewise.
15839
15840 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15841
15842         * call.c (build_new_method_call): Also check destructors.