OSDN Git Service

* pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
2
3         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
4         (hash_local_specialization): New function.
5         (register_local_specialization): Revert 2003-01-05 change.
6         (instantiate_decl): Use hash_local_specialization when creating
7         the local_specializations table.
8         
9         * decl2.c (mark_used): Do not synthesize thunks.
10
11         * class.c (layout_class_type): Correct handling of unnamed
12         bitfields wider than their types.
13
14         PR c++/9189
15         * parser.c (cp_parser): Remove default_arg_types.  Update
16         documentation for unparsed_functions_queues.
17         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
18         parameter.
19         (cp_parser_new): Don't set parser->default_arg_types.
20         (cp_parser_function_definition): Adjust usage of
21         unparsed_funtions_queues.
22         (cp_parser_class_specifier): Don't mess with
23         parser->default_arg_types.  Handle default argument processing in
24         a separate phase from function body processing.
25         (cp_parser_template_declaration_after_export): Adjust usage of
26         unparsed_functions_queues.
27         (cp_parser_late_parsing_for_member): Do not handle default
28         arguments.
29
30 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
31
32         PR c++/9109
33         * parser.c (cp_parser_declarator_kind): New enum.
34         (cp_parser_declarator): Adjust.
35         (cp_parser_direct_declarator): Adjust. Allow for either named or
36         abstract declarator. Prefer abstract, if possible. Allow
37         parenthesized function name.
38         (cp_parser_condition): Adjust cp_parser_declarator call.
39         (cp_parser_explicit_instantiation): Likewise.
40         (cp_parser_init_declarator): Likewise.
41         (cp_parser_type_id): Likewise.
42         (cp_parser_function_definition): Likewise.
43         (cp_parser_member_declaration): Likewise.
44         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
45         the tentative parsing.
46         (cp_parser_exception_declaration): Likewise.
47
48 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
49
50         * parser.c (cp_parser_template_parameter): Adjust call to
51         cp_parser_parameter_declaration.
52         (cp_parser_parameter_declaration_list): Likewise.
53         (cp_parser_parameter_declaration): Replace
54         greater_than_is_operator_p with template_parm_p parameter.  Do not
55         cache tokens for template default arguments.
56
57         * pt.c (retrieve_local_specialization): Use htab_find, not
58         htab_find_with_hash.
59         (register_local_specialization): Use htab_find_slot, not
60         htab_find_slot_with_hash.
61         (instantiate_decl): Pass a hash function to htab_create.
62         
63 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
64
65         * parser.c (cp_parser_binary_expression,
66         cp_parser_multiplicative_expression,
67         cp_parser_additive_expression, cp_parser_shift_expression,
68         cp_parser_relational_expression, cp_parser_equality_expression,
69         cp_parser_and_expression, cp_parser_exclusive_or_expression,
70         cp_parser_inclusive_or_expression,
71         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
72         cp_parser_binary_expression): Const-ify.
73
74 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
75
76         * method.c (use_thunk): Disable access control while building the
77         body of the thunk.
78
79 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
80
81         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C 
82         front end.
83
84 2003-01-03  Matt Austern  <austern@apple.com>
85
86         * cp-tree.h (struct lang_type_class): add field for key method
87         (cp_global_trees): rename dynamic_classes to keyed_classes
88         (key_method): add definition
89         * class.c (finish_struct_1): compute class's key method, and add
90         the class to keyed_classes list if there is no key method.
91         * decl.c (finish_function): add class to keyed_classes list if we
92         see a definition of the class's key method.
93         * pt.c (instantiate_class_template): add template specialization
94         of a dynamic class to keyed_classes list.
95         * decl2.c (key_method): remove
96         (finish_file): iterate only through keyed_classes list when
97         deciding whether to emit vtables, remove class from its list after
98         we do the emission.
99         
100 2003-01-02  Jason Merrill  <jason@redhat.com>
101
102         * call.c (build_conditional_expr): Stabilize lvalues properly.
103         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
104         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
105         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
106
107         * call.c (convert_like_real): Call decl_constant_value for an
108         IDENTITY_CONV even if there are no more conversions.
109
110         * cvt.c (build_up_reference): Don't push unnamed temps.
111
112         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
113
114         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
115         for a backend struct.
116
117         * except.c (wrap_cleanups_r, build_throw): Make
118         MUST_NOT_THROW_EXPRs void.
119         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
120
121         * init.c (build_vec_delete_1): Pre-evaluate the base address.
122
123         * init.c (get_temp_regvar): Simplify logic.
124
125         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
126         our replacement is a decl.
127
128         * decl.c (cp_make_fname_decl): Push the decls inside the
129         outermost scope.
130
131 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
132
133         PR c++/45, c++/3784
134         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
135         the same too.
136
137 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
138
139         * parser.c (struct cp_parser): Add access_checks_lists field
140         (cp_parser_simple_declaration): Use.
141         (cp_parser_init_declarator): Likewise. 
142
143 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
144
145         * parser.c (cp_parser_declaration): Accept the __extension__
146         keyword before the declaration.
147
148         PR c++/2843
149         * parser.c (cp_parser_parameter_declaration): Allow attributes to
150         appear after the declarator.
151
152         * call.c (build_new_method_call): Fix typo in message format
153         string.
154
155 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
156
157         * parser.c (cp_lexer_next_token_is): Declare it inline.
158         (cp_lexer_set_source_position_from_token): Likewise.
159         (cp_lexer_debugging_p): Likewise.
160         (cp_parser_parsing_tentatively): Likewise.
161         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
162         to the cp_lexer_peek_token.
163
164         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
165         expression.
166
167 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
168
169         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
170         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
171         cp/repo.c: Fix copyright years.
172
173 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
174
175         * lex.c: Remove superfluous include of cpplib.h.
176         (CONSTRAINT): Define without conditions.
177         (init_cp_pragma): Use c_register_pragma.
178
179 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
180
181         * .cvsignore: Remove.
182
183 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
184
185         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
186           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
187           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
188           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
189           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
190           copyright header.
191         * lex.h: parse.y is dead, so don't mention it.  Also replace the
192           copyright header with the default GNU copyright header.
193
194 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
195
196         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
197         (lookup_name_namespace_only): Likewise.
198         (begin_only_namespace_names): Likewise.
199         (end_only_namespace_names): Likewise.
200         * decl.c (only_namespace_names): Remove.
201         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
202         (lookup_name_real): Do not check only_namespace_names.
203         (lookup_name_namespace_only): Remove.
204         (begin_only_namespace_names): Likewise.
205         (end_only_namespace_names): Likewise.
206         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
207         nested-name-specifiers more gracefully.
208         (cp_parser_class_or_namespace_name): Avoid looking up namespace
209         names when they cannot possibly appear.
210         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
211         (cp_parser_elaborated_type_specifier): Likewise.
212         (cp_parser_namespace_name): Only look for namespace names.
213         (cp_parser_lookup_name): Add is_namespace parameter.
214         (cp_parser_lookup_name_simple): Adjust call to
215         cp_parser_lookup_name.
216
217         * parser.c (cp_parser_dependent_type_p): Fix thinko.
218
219 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
220
221         * .cvsignore: Update.
222
223 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
224
225         * class.c (modify_vtable_entry): Remove unused variable.
226         (get_vcall_index): Always expect a non-thunk.
227         (update_vtable_entry_for_fn): Combine covariant adjustments, when
228         overriding a thunk. Pass get_vcall_index a non-thunk.
229
230         * decl2.c (finish_file): Mark undefined inlines as extern.
231
232 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
233
234         * cp-tree.def (RETURN_INIT): Remove.
235         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
236         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
237         (note_level_for_for): Remove.
238         (note_level_for_try): Likewise.
239         (note_level_for_catch): Likewise.
240         (finish_named_return_value): Likewise.
241         (do_pushlevel): Change prototype.
242         (pending_lang_change): Remove.
243         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
244         sk_for.
245         (note_level_for_for): Remove.
246         (note_level_for_try): Likewise.
247         (note_level_for_catch): Likewise.
248         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
249         * parser.c (cp_parser_context_free_list): Make it "deletable".
250         (cp_parser_template_argument): Remove misleading comment.
251         * pt.c (tsubst_expr): Remove RETURN_INIT code.
252         * semantics.c (genrtl_named_return_value): Remove.
253         (do_pushlevel): Take a scope kind as an argument.
254         (begin_if_stmt): Adjust.
255         (begin_while_stmt): Likewise.
256         (begin_for_stmt): Likewise.
257         (finish_for_init_stmt): Likewise.
258         (begin_switch_stmt): Likewise.
259         (begin_handler): Likewise.
260         (begin_compound_stmt): Likewise.
261         (finish_named_return_value): Remove.
262         (cp_expand_stmt): Remove RETURN_INIT case.
263         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
264
265 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
266
267         PR c++/9112
268         * parser.c (cp_parser_direct_declarator): Handle erroneous
269         parenthesized declarators correctly.
270
271 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
272
273         * cp-tree.h (pending_lang_change): Declare.
274
275 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
276
277         * parser.c (cp_parser_context_free_list): New variable.
278         (cp_parser_context_new): Use it.
279         (cp_parser_error): Check return code from
280         cp_parser_simulate_error.
281         (cp_parser_simulate_error): Return a value.
282         (cp_parser_id_expression): Optimize common case.
283         (cp_parser_class_name): Likewise.
284         (cp_parser_class_specifier): Adjust call to
285         cp_parser_late_parsing_default_args.
286         (cp_parser_lookup_name): Optimize common case.
287         (cp_parser_late_parsing_for_member): Adjust call to
288         cp_parser_late_parsing_default_args.
289         (cp_parser_late_parsing_default_args): Add scope parameter.
290         (cp_parser_require): Avoid creating the error message unless it's
291         needed.
292         (cp_parser_parse_definitely): Place free'd contexts on the free
293         list.
294
295         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
296
297 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
298
299         * parser.c (cp_parser_parameter_declaration_clause): Treat system
300         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
301
302 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
303
304         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
305         GCC, not GNU CC.
306
307 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
308
309         * parse.y: Remove.
310         * spew.c: Likewise.
311         * Make-lang.in (gt-cp-spew.h): Remove.
312         * cp-tree.h (do_pending_lang_change): Remove.
313         (do_identifier): Change prototype.
314         (finish_id_expr): Remove.
315         * decl.c (lookup_name_real): Remove yylex variable.
316         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
317         * lex.c (init_cpp_parse): Remove.
318         (reduce_cmp): Likewise.
319         (token_cmp): Likewise.
320         (yychar): Likewise.
321         (lastiddecl): Likewise.
322         (token_count): Likewise.
323         (reduce_count): Likewise.
324         (yyhook): Likewise.
325         (print_parse_statistics): Likewise.
326         (do_pending_lang_change): Likewise.
327         (do_identifier): Remove parsing parameter.
328         * lex.h (lastiddecl): Remove.
329         (looking_for_typename): Remove.
330         (looking_for_template): Likewise.
331         (pending_lang_change): Likewise.
332         (yylex): Likewise.
333         * semantics.c (finish_id_expr): Remove.
334
335         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
336         thread" correctly.
337
338 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
339
340         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
341         end, not the C front end.
342
343 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
344
345         * cp-tree.h (THUNK_TARGET): New macro.
346         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
347         (finish_thunk): Remove offset parms.
348         * class.c (find_final_overrider): Look through thunks.
349         (get_vcall_index): Use THUNK_TARGET.
350         (update_vtable_entry_for_fn): Look through thunks. Set covariant
351         fixed offset here. Adjust finish_thunk call.
352         (build_vtbl_initializer): Adjust finish_thunk calls.
353         * mangle.c (mangle_call_offset): Remove superfluous if.
354         (mangle_thunk): Adjust.
355         * method.c (make_thunk): Adjust.
356         (finish_thunk): Adjust.
357         (thunk_adjust): Remove assert.
358         (use_thunk): Use THUNK_TARGET
359         * dump1.c (cp_dump_tree): Adjust thunk dumping.
360
361         PR c++/9054
362         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
363         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
364
365 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
366
367         Remove traditional C constructs 4/n.
368         * decl2.c (grok_method_quals, warn_if_unknown_interface,
369         grok_x_components, cp_build_parm_decl, build_artificial_parm,
370         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
371         delete_sanity, check_member_template, check_java_method,
372         check_classfn, finish_static_data_member_decl, grokfield,
373         grokbitfield, grokoptypename, grok_function_init,
374         cplus_decl_attributes, constructor_name, defer_fn,
375         build_anon_union_vars, finish_anon_union, coerce_new_type,
376         coerce_delete_type, comdat_linkage, maybe_make_one_only,
377         key_method, import_export_vtable, import_export_class,
378         output_vtable_inherit, import_export_decl, import_export_tinfo,
379         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
380         set_guard, start_objects, finish_objects,
381         start_static_storage_duration_function,
382         finish_static_storage_duration_function, get_priority_info,
383         start_static_initialization_or_destruction,
384         finish_static_initialization_or_destruction,
385         do_static_initialization, do_static_destruction,
386         prune_vars_needing_no_initialization, write_out_vars,
387         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
388         add_using_namespace, merge_functions, ambiguous_decl,
389         lookup_using_namespace, lookup_using_namespace,
390         qualified_lookup_using_namespace, set_decl_namespace,
391         decl_namespace, current_decl_namespace, push_decl_namespace,
392         pop_decl_namespace, push_scope, pop_scope, add_function,
393         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
394         lookup_arg_dependent, do_namespace_alias,
395         validate_nonmember_using_decl, do_nonmember_using_decl,
396         do_toplevel_using_decl, do_local_using_decl,
397         do_class_using_decl, do_using_directive, check_default_args,
398         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
399         * parser.c (cp_parser_class_head): Use booleanss.
400         * decl.c (walk_globals, walk_vtables): Likewise.
401         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
402         walk_globals): Change return type from 'int' to 'bool'.
403         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
404         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
405         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
406         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
407         qualifier_flags, tinfo_base_init, generic_initializer,
408         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
409         dfs_class_hint_unmark, class_hint_flags, class_initializer,
410         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
411         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
412         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
413         * repo.c (repo_compile_flags, repo_template_declared,
414         repo_template_defined, repo_class_defined, repo_get_id,
415         repo_template_used, repo_vtable_used, repo_inline_used,
416         repo_tinfo_used, repo_template_instantiated, extract_string,
417         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
418         finish_repo): Likewise.
419         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
420         cxx_print_xnode): Likewise..
421         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
422         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
423         * cxxfilt.c (demangle_it, print_demangler_list, usage,
424         standard_symbol_characters, hp_symbol_characters, main, fatal):
425         Likewise.
426         (strip_underscore):  Change type from 'int' to 'bool'.
427         (main): Use boolean constants.
428
429 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
430
431         Remove traditional C constructs 3/n.
432         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
433         build_up_reference, warn_ref_binding, convert_to_reference,
434         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
435         convert_to_void, convert, convert_force, build_type_conversion,
436         build_expr_type_conversion, type_promotes_to,
437         perform_qualification_conversions): Use C90 prototyping style.
438         * decl2.c (grok_array_decl): Use boolean constant.
439         (delete_sanity): Likewise.
440         * typeck.c (build_unary_op): Likewise.
441         * semantics.c (finish_switch_cond): Likewise.
442         * parser.c (cp_parser_direct_new_declarator): Likewise.
443         * init.c (build_new): Likewise.
444
445 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
446
447         * Make-lang.in (po-generated): Remove parse.c.
448         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
449         ($(srcdir)/cp/parse.h): Remove target.
450         ($(srcdir)/cp/parse.c): Likewise.
451         (gt-cp-parse.h): Likewise.
452         (gt-cp-parser.h): New target.
453         (c++.distclean): Do not remove parse.output.
454         (c++.maintainer-clean): Do not remove parse.c or parse.h.
455         (cp/spew.o): Remove target.
456         (cp/lex.o): Adjust dependencies.
457         (cp/pt.o): Likewise.
458         (cp/parse.o): Likewise.
459         (cp/TAGS): Do not mention parse.c.
460         (cp/parser.o): New target.
461         * NEWS: Mention the new parser.
462         * call.c (build_scoped_method_call): Simplify.
463         (build_method_call): Likewise.
464         (build_new_function_call): Adjust calls to add_function_candidate
465         and add_template_candidate.
466         (build_new_op): Improve handling of erroroneous operands.
467         (convert_default_arg): Remove circular argument processing.
468         (name_as_c_string): New function.
469         (build_new_method_call): Use it.
470         (perform_implicit_conversion): Use error_operand_p.
471         * class.c (finish_struct_anon): Use constructor_name_p.
472         (check_field_decls): Likewise.
473         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
474         (resolve_address_of_overloaded_function): Likewise.
475         (instantiate_type): Tweak pointer-to-member handling.
476         (get_primary_binfo): Remove incorrect assertion.
477         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
478         * cp-tree.h (DEFARG_TOKENS): New macro.
479         (default_arg): New structure.
480         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
481         (lang_tree_node): Add default_arg.
482         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
483         (type_info_ref_type): New macro.
484         (saved_scope): Make processing_explicit_instantiation a boolean.
485         (check_access): New field.
486         (unparsed_text): Remove.
487         (language_function): Remove unparsed_inlines.
488         (error_operand_p): New macro.
489         (lang_decl): Adjust pending_inline_info.
490         (DEFARG_POINTER): Remove.
491         (tag_types): Add typenames.
492         (lookup_ualified_name): Declare.
493         (lookup_name_real): Likewise.
494         (shadow_tag): Adjust prototype.
495         (get_scope_of_declarator): Declare it.
496         (process_next_inline): Remove it.
497         (check_for_missing_semicolon): Likewise.
498         (maybe_get_template_decl_from_type_decl): Declare it.
499         (finish_label_stmt): Adjust prototype.
500         (finish_non_static_data_meber): Declare it.
501         (finish_pseudo_destructor_call_expr): Rename to ...
502         (finish_pseudo_destructor_expr): ... this.
503         (finish_compound_literal): Declare it.
504         (begin_inline_definitions): Remove it.
505         (init_spew): Remove.
506         (peekyylex): Likewise.
507         (arbitrate_lookup): Likewise.
508         (frob_opname): Likewise.
509         (maybe_snarf_defarg): Likewise.
510         (add_defarg_fn): Likewise.
511         (do_pending_defargs): Likewise.
512         (done_pending_defargs): Likewise.
513         (unprocessed_defarg_fn): Likewise.
514         (replace_defarg): Likewise.
515         (end_input): Likewise.
516         (get_overloaded_fn): Likewise.
517         * cvt.c (convert_to_reference): Improve error handling.
518         * decl.c (lookup_name_real): Do not declare it static.
519         (maybe_push_to_top_level): Set check_access.
520         (identifier_type_value): Adjust call to lookup_name_real.
521         (lookup_qualified_name): New method.
522         (lookup_name_real): Remove special-case parsing code.
523         (lookup_name-nonclass): Adjust call to lookup_name_real.
524         (lookup_name_namespace_only): Likewise.
525         (lookup_name): Likewise.
526         (check_tag_decl): Return the type declared.
527         (shadow_tag): Likewise.
528         (register_dtor_fn): Tweak check_access.
529         (grokfndecl): Use constructor_name_p.
530         (get_scope_of_declarator): New function.
531         (grokdeclarator): Obscure tweaks for slightly different declarator
532         representations.
533         (start_method): Return error_mark_node to indicate failure.
534         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
535         * decl2.c (constructor_name_full): Simplify.
536         (constructor_name): Use it.
537         (build_expr_from_tree): Adjust for changes to do new parser.
538         (push_scope): Improve robustness.
539         (validate_nonmember_using_decl): Process declarations, not names.
540         (do_class_using_decl): Likewise.
541         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
542         here.
543         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
544         * expr.c (cxx_expand_expr): Handle BASELINKs.
545         * init.c (member_init_ok_or_else): Issue more errors.
546         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
547         * lex.c: Do not include parse.h.
548         (yypring): Do not declare.
549         (yylval): Likewise.
550         (make_reference_declarator): Remove error-generating code.
551         (rid_to_yy): Remove.
552         (cxx_init): Do not call init_spew.
553         (yypring): Remove.
554         (check_for_missing_semicolon): Remove.
555         * lex.h (got_scope): Remove.
556         (got_object): Remove.
557         * method.c (hack_identifier): Use finish_non_static_data_member.
558         (implicitly_declare_fn): Adjust use of constructor_name.
559         * parser.c: New file.
560         * pt.c (parse.h): Do not include it.
561         (maybe_get_template_decl_from_template): Do not declare it.
562         (finish_member_template_decl): Tweak.
563         (begin_explicit_instantiation): Adjust for
564         processing_explicit_instantiation being boolean.
565         (end_explicit_instantiation): Likewise.
566         (maybe_process_partial_specialization): Tighten specialization
567         test.
568         (retrieve_local_specialization): Adjust ue of hash table.
569         (eq_local_specializations): New function.
570         (register_local_specialization): Likewise.
571         (push_template_decl_real): Remove unnecessary test.
572         (maybe_get_template_decl_from_type_decl): Don't make it static.
573         (for_each_template_parm_r): Handle TYPEOF_TYPE.
574         (tsubst_copy): Use retrieive_local_specialization to handle
575         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
576         Handle COMPONENT_REFs with pseudo-destructor-expressions.
577         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
578         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
579         (unify): Tweak handling of CONST_DECLs.
580         (regenerate_decl_from_template): Use push_nested_class.
581         (template_for_substitution): New funciton.
582         (instantiate_decl): Use it.  Register parameters as local
583         specializations.
584         * rtti.c (init_rtti_processing): Set type_info_ref_type.
585         (build_typeid): Use it.
586         (get_typeid): Likeise.
587         * search.c (accessible_p): Use check_access, not
588         flag_access_control.
589         (adjust_result_of_qualified_name_lookup): Pay attention to the
590         context_class.
591         * semantics.c (finish_asm_stmt): Adjust error handling.
592         (finish_label_stmt): Return the statement.
593         (finish_non_static_data_member): New function.
594         (finish_class_expr): Handle BASELINKs.
595         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
596         (finish_object_call_expr): Simplify handling during templates.
597         (finish_pseudo_destructor_call_expr): Rename to ...
598         (finish_pseudo_dtor_expr): ... this.
599         (finish_compound_literal): New function.
600         (begin_inline_definitions): Remove.
601         (finish_sizeof): Remove special template handling.
602         * spew.c: Do not include parse.h.
603         * tree.c (get_overloaded_fn): Remove.
604         * typeck.c (build_class_member_access_expr): Handle
605         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
606         (lookup_destructor): New function.
607         (finish_class_member_access_expr): Use it.
608         (convert_arguments): Simplify.
609         (build_unary_op): Handle BASELINKs.
610
611 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
612
613         PR c++/4803
614         * decl2.c (mark_used): Defer inline functions.
615         (finish_file): Merge deferred_fns loops. Check all used
616         inline functions have a definition.
617         * method.c (make_thunk): Thunks are not inline.
618
619         PR c++/5116, c++/764
620         * call.c (build_new_op): Make sure template class operands are
621         instantiated.
622
623 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
624
625         PR C++/7964
626         * cp-tree.h (resolve_scoped_fn_name): Prototype.
627         * call.c (resolve_scoped_fn_name): New function. Deal with
628         more template expansion. Broken out of ...
629         * parse.y (parse_finish_call_expr): ... here. Call it.
630         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
631         resolve_scoped_fn_name and build_call_from_tree.
632
633         PR c++/9053
634         * decl.c (duplicate_decls): Templates may be disambiguated by
635         return type.
636
637         PR c++/8702
638         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
639         conversion operators on failure.
640
641 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
642
643         Remove traditional C constructs 2/n.
644         * call.c (tourney, build_field_call, equal_functions, joust,
645         compare_ics, build_over_call, build_java_interface_fn_ref,
646         convert_like_real, op_error, build_object_call, resolve_args,
647         build_vfield_ref, check_dtor_name, build_scoped_method_call,
648         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
649         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
650         standard_conversion, reference_related_p,
651         reference_compatible_p, convert_class_to_reference,
652         direct_reference_binding, reference_binding,
653         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
654         add_template_conv_candidate, any_viable, any_strictly_viable,
655         build_this, splice_viable, print_z_candidates,
656         build_user_type_conversion, build_new_function_call,
657         conditional_conversion, build_conditional_expr, build_new_op,
658         build_op_delete_call, enforce_access, call_builtin_trap,
659         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
660         convert_default_arg, type_passed_as, convert_for_arg_passing,
661         in_charge_arg_for_name, is_properly_derived_from,
662         maybe_handle_implicit_object, maybe_handle_ref_bind,
663         source_type, add_warning, can_convert, can_convert_arg,
664         perform_implicit_conversion, can_convert_arg_bad,
665         initialize_reference, add_conv_candidate,
666         add_template_candidate_real, add_template_candidate): Ansify.
667
668 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
669
670         PR c++/8572
671         * cp-tree.h (grokoptypename): Add SCOPE parameter.
672         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
673         if in a template scope.
674         * parse.y (unoperator): Return the scope.
675         (operator_name): Adjust grokoptypename call.
676
677 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
678
679         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
680         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
681         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
682
683 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
684
685         * ChangeLog: Fix a typo.
686         * class.c: Fix comment typos.
687         * cp-tree.h: Likewise.
688
689 2002-12-18  Jason Merrill  <jason@redhat.com>
690
691         Handle anonymous unions at the tree level.
692         C++ ABI change: Mangle anonymous unions using the name of their
693         first named field (by depth-first search).  Should not cause
694         binary compatibility problems, though, as the compiler previously
695         didn't emit anything for affected unions.
696         * cp-tree.def (ALIAS_DECL): New tree code.
697         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
698         first field, not the largest.
699         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
700         push the decl, and write it out at namespace scope.
701         * decl.c (lookup_name_real): See through an ALIAS_DECL.
702         (pushdecl): Add namespace bindings for ALIAS_DECLs.
703         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
704         of a decl which doesn't have one.
705         * typeck.c (build_class_member_access_expr): Don't recurse if
706         we already have the type we want.
707
708 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
709
710         PR c++/8099
711         * friend.c (make_friend_class): Allow partial specialization
712         when declaration is not a template friend.
713
714 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
715
716         PR c++/3663
717         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
718         TREE_PROTECTED to created decl nodes.
719
720 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
721
722         * class.c (build_base_field): Do not set DECL_PACKED on the
723         FIELD_DECL.
724
725 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
726
727         * cp-tree.h (struct tree_srcloc): Use location_t.
728         (SOURCE_LOCUS): New.
729         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
730
731 2002-12-17  Jason Merrill  <jason@redhat.com>
732
733         * decl.c (finish_function): Also complain about no return in
734         templates.
735         * semantics.c (finish_return_stmt): Also call check_return_expr in
736         templates.
737         * typeck.c (check_return_expr): In a template, just remember that we
738         saw a return.
739
740 2002-12-16  Jason Merrill  <jason@redhat.com>
741
742         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
743         of the CALL_EXPR.
744
745         * semantics.c (do_pushlevel): Call pushlevel after adding the
746         SCOPE_STMT.
747         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
748         * parse.y (function_body): Go back to using compstmt.
749         * decl.c (pushdecl): Skip another level to get to the parms level.
750
751         * call.c (build_new_method_call): Use is_dummy_object to determine
752         whether or not to evaluate the object parameter to a static member
753         function.
754
755 2002-12-14  Jason Merrill  <jason@redhat.com>
756
757         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
758         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
759         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
760         don't bother with an AGGR_INIT_EXPR.
761         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
762         just generate a new decl normally.  Take return slot parm.
763         * cp-tree.h: Adjust prototype.
764
765 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
766
767         PR C++/8031
768         * cvt.c (convert_to_pointer_force): Don't try comparing against
769         erronous type.
770
771 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
772
773         * cp-tree.h: Have the multiple-include guards around
774         the entire file.
775
776 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
777
778         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
779         for SPEW_DEBUG.
780         (snarf_method): Same.
781         (snarf_defarg): Same.
782
783 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
784
785         PR c++/8372
786         * pt.c (tsubst_copy): Handle destructor names more correctly.
787
788 2002-12-10  Matt Austern   <austern@apple.com>
789
790         * cp-tree.h: get rid of needs_virtual_reinit bit.
791
792 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
793
794         * NEWS: Document removal of in-class initialization extension for
795         static data members of non-arithmetic, non-enumeration type.
796         * decl.c (check_static_variable_definition): Do not allow that
797         extension.
798         * decl2.c (grokfield): Do not call digest_init when processing
799         templates.
800
801 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
802
803         * error.c (dump_expr): Fix format specifier warning.
804
805 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
806
807         * class.c (finish_struct_1): Correct comment.
808         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
809
810 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
811
812         PR C++/8799
813         * error.c (dump_expr): Don't ever try to dump a non-existent
814         expression.
815
816 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
817
818         Implement covariant returns.
819         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
820         (struct lang_decl_flags): Add this_thunk_p flag.
821         Rename vcall_offset to virtual_offset.
822         (struct lang_decl): Rename delta to fixed_offset.
823         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
824         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
825         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
826         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
827         (make_thunk): Add this_adjusting arg.
828         (finish_thunk): Declare.
829         (mangle_thunk): Add this_adjusting arg.
830         * class.c (get_vcall_index): Use base function for lookup.
831         (update_vtable_entry_for_fn): Generate covariant thunk.
832         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
833         (build_vtbl_initializer): Use base function for lookup.
834         Finish covariant thunk here. Adjust thunk generation.
835         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
836         Adjust thunk dumping.
837         * mangle.c (mangle_call_offset): New function.
838         (mangle_thunk): Adjust for covariant thunks.
839         * method.c (make_thunk): Adjust. Do not set name here.
840         (finish_thunk): New function. Set name here.
841         (use_thunk): Generate covariant thunks too.
842         (thunk_adjust): New function.
843         * search.c (covariant_return_p): Remove. Fold into ...
844         (check_final_overrider): ... here. Simplify.
845         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
846
847 2002-12-03  Jason Merrill  <jason@redhat.com>
848
849         PR c++/8674
850         * call.c (build_over_call): Check specifically for TARGET_EXPR
851         when eliding.
852
853         PR c++/8461, c++/8625
854         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
855         (cp_convert_parm_for_inlining): Remove.
856         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
857         Remove.
858         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
859         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
860
861         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
862         an ambiguous conversion.
863
864 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
865
866         PR c++/8688
867         * decl.c (reshape_init): Handle erroneous initializers.
868
869 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
870
871         PR c++/8720
872         * spew.c (remove_last_token): Make sure that last_chunk is set
873         correctly.
874
875         PR c++/8615
876         * error.c (dump_expr): Handle character constants with
877         TREE_OVERFLOW set.
878
879 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
880
881         DR 180
882         * decl.c (grokdeclarator): Require class-key for all friend class.
883         Output the correct type and context in the error message.
884
885 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
886
887         PR c++/5919
888         * pt.c (unify): Use variably_modified_type_p to test validity of
889         template argument types.
890
891         PR c++/8727
892         * cp-tree.h (lang_type_class): Add typeinfo_var.
893         (CLASSTYPE_TYPEINFO_VAR): New macro.
894         * rtti.c (get_tinfo_decl): Use it.
895
896         PR c++/8663
897         * init.c (expand_member_init): Always get the main variant of a
898         base class.
899
900 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
901
902         PR c++/8332
903         PR c++/8493
904         * decl.c (cxx_init_decl_processing): Use size_type_node, not
905         c_size_type_node.
906         * decl2.c (coerce_new_type): Likewise.
907         * except.c (do_allocate_exception): Likewise.
908
909 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
910
911         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
912         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
913         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
914         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
915         typeck2.c: Include coretypes.h and tm.h.
916         * Make-lang.in: Update dependencies.
917
918 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
919
920         PR c++/8227
921         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
922         (check_initializer): Validate the type of the initialized
923         variable, even if the initializer is absent.
924         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
925
926         PR c++/8214
927         * typeck.c (convert_for_assignment): Do not use
928         decl_constant_value on the operand.
929
930         PR c++/8511
931         * pt.c (instantiate_decl): Handle template friends defined outside
932         of the class correctly.
933
934 2002-11-29  Joe Buck <jbuck@synopsys.com>
935
936         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
937         anonymous structs.
938
939 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
940
941         * class.c (walk_subobject_offsets): Recur on binfos as well as on
942         types.
943         (layout_nonempty_base_or_field): Pass it a binfo when processing a
944         base class.
945         (layout_empty_base): Likewise.
946         (build_base_field): Likewise.
947
948 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
949
950         * class.c (build_base_field): Make sure we get the canonical base
951         when descending through primary bases.
952
953 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
954
955         * decl.c (check_initializer): Don't error on initialisation of
956         a scalar with a brace-enclosed expression.
957
958 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
959
960         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
961         (template_parms_equal): Remove prototype.
962         * typeck.c (buuld_indirect_ref): Reformat.
963
964 2002-11-25  Jason Merrill  <jason@redhat.com>
965
966         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
967         and a DO_STMT.
968
969 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
970
971         * tree.c (cp_build_qualified_type_real): Correct handling of
972         array types.
973         * class.c (walk_subobject_offsets): Fix thinko.
974         (build_base_field): Record offsets of empty bases in primary
975         virtual bases.
976         (layout_class_type): Record offsets of empty bases in fields.
977
978         * search.c (is_subobject_of_p_1): Fix thinko.
979         (lookup_field_queue_p): Likewise.
980
981 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
982
983         * class.c (layout_class_type): Reuse tail padding when laying out
984         virtual bases.
985
986 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
987
988         * rtti.c (qualifier_flags): Fix thinko.
989
990 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
991
992         Remove traditional C constructs 1/n.
993         * cp-tree.h (init_method, set_mangled_name_for_decl,
994         build_opfncall, hack_identifier, make_thunk, use_thunk,
995         synthesize_method, implicitly_declare_fn,
996         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
997         maybe_clone_body): Remove use of PARAMS.
998
999         * method.c (do_build_assign_ref, do_build_copy_constructor,
1000         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
1001         Likewise.
1002         (synthesize_method): Use 'bool' type and constants instead of
1003         'int'.
1004         (locate_copy): Likewise.
1005         (implicitly_declare_fn): Likewise.
1006
1007         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
1008         Remove old-style declaration.
1009         (maybe_clone_body): Use 'bool' type and constants.
1010
1011 2002-11-21  Glen Nakamura  <glen@imodulo.com>
1012
1013         PR c++/8342
1014         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
1015         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
1016         of the branches of a COND_EXPR.
1017
1018 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
1019
1020         * pt.c (for_each_template_parm): Free allocated memory.
1021         * search.c (is_subobject_of_p_1): New function.
1022         (is_subobject_of_p): Avoid walking virtual bases multiple times.
1023
1024 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
1025
1026         * g++spec.c (lang_specific_spec_functions): New.
1027
1028 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
1029
1030         * ChangeLog: Follow spelling conventions.
1031         * class.c: Likewise.
1032         * decl2.c: Likewise.
1033
1034 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
1035
1036         * search.c (dfs_push_decls): Do not try to reorder elements
1037         3..n of method_vec if method_vec has only two elements.
1038         Reverse order of two tests to avoid accessing unallocated
1039         memory.
1040
1041 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
1042
1043         * class.c (dfs_find_final_overrider): Adjust so that the most
1044         derived object is a binfo, rather than a class type.
1045         (find_final_overrider): Likewise.
1046         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
1047         (add_vcall_offset): Likewise.
1048
1049 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1050
1051         PR c++/8389
1052         * pt.c (instantiate_template): Push class scope for member
1053         functions.
1054         (get_mostly_instantiated_function_type): Likewise.  Don't call
1055         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
1056         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
1057         * mangle.c (write_encoding, write_unqualified_name): Adjust.
1058
1059 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
1060
1061         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
1062         vcall offfsets.  Split out ...
1063         (add_vcall_offset): ... new function.
1064
1065         PR c++/8338
1066         * pt.c (for_each_template_parm): Add htab parameter.
1067         (process_partial_specialization): Adjust call.
1068         (push_template_decl_real): Likewise.
1069         (pair_fn_data): Add visited.
1070         (for_each_template_parm_r): Avoid walking duplicates more than
1071         once.
1072         (uses_template_parms): Adjust call to for_each_template_parm.
1073
1074 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
1075
1076         * class.c (add_implicitly_declared_members): Put implicitly
1077         declared functions at the end of TYPE_METHODs when -fabi-version
1078         is at least 2.
1079
1080 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
1081
1082         * decl2.c (finish_file): Correct spelling.
1083
1084 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
1085
1086         * call.c (build_special_member_call): Do not try to lookup VTTs by
1087         name.
1088         * class.c (vtbl_init_data): Add generate_vcall_entries.
1089         (get_vtable_decl): Do not look up virtual tables by name.
1090         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
1091         (set_primary_base): Do not set CLASSTYPE_RTTI.
1092         (determine_primary_base): Likewise.
1093         (get_matching_virtual): Remove.
1094         (get_vcall_index): New function.
1095         (update_vtable_entry_for_fn): Do not try to use virtual thunks
1096         when they are not required.  Assign vcall indices at this point.
1097         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
1098         Do update dynamic_classes.
1099         (build_vtt): Do not add VTTs to the symbol table.
1100         (build_ctor_vtbl_group): Likewise.
1101         (build_vtbl_initializer): Simplify handling of vcall indices.
1102         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
1103         for the most derived class.
1104         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
1105         the vtable.
1106         * cp-tree.h (dynamic_classes): New macro.
1107         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
1108         (CLASSTYPE_RTTI): Remove.
1109         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
1110         (CLASSTYPE_VCALL_INDICES): New macro.
1111         (CLASSTYPE_VTABLES): Likewise.
1112         (BV_USE_VCALL_INDEX_P): Remove.
1113         (build_vtable_path): Remove.
1114         * decl2.c (finish_vtable_vardecl): Remove.
1115         (key_method): Remove #if 0'd code.
1116         (finish_vtable_vardecl): Rename to ...
1117         (maybe_emit_vtables): ... this.
1118         (finish_file): Use it.
1119         * search.c (look_for_overrides_here): Update comment.
1120
1121 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
1122
1123         PR c/7353 redux
1124         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
1125
1126 2002-10-30  Jason Merrill  <jason@redhat.com>
1127
1128         PR c++/8186
1129         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
1130         * call.c (convert_for_arg_passing): Set it.
1131         * except.c (stabilize_throw_expr): Recurse for such an arg.
1132
1133 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
1134
1135         * cp-tree.h (lang_decl_flags): Remove init_priority.
1136         (lang_decl): Add delta.
1137         (GLOBAL_INIT_PRIORITY): Remove.
1138         (THUNK_DELTA): Revise definition.
1139         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
1140         * dump.c (cp_dump_tree): Don't dump it.
1141
1142 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
1143
1144         PR c++/8160
1145         * typeck2.c (process_init_constructor): Call complete_array_type.
1146
1147         PR c++/8149
1148         * decl.c (make_typename_type): Issue errors about invalid results.
1149
1150 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1151
1152         Core issue 287, PR c++/7639
1153         * cp-tree.h (lang_type_class): Add decl_list field.
1154         (CLASSTYPE_DECL_LIST): New macro.
1155         (maybe_add_class_template_decl_list): Add declaration.
1156         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
1157         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
1158         (maybe_add_class_template_decl_list): New function.
1159         (add_implicitly_declared_members): Use it.
1160         * decl.c (maybe_process_template_type_declaration): Likewise.
1161         (pushtag): Likewise.
1162         * friend.c (add_friend): Likewise.
1163         (make_friend_class): Likewise.
1164         * semantics.c (finish_member_declaration): Likewise.
1165         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
1166         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
1167         to process members and friends in the order of declaration.
1168
1169 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
1170
1171         PR c++/8287
1172         * decl.c (finish_destructor_body): Create the label to jump to
1173         when returning from a destructor here.
1174         (finish_function_body): Rather than here.
1175
1176 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
1177
1178         PR c++/7266
1179         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
1180         SCOPE_REF is not null before dereferencing it.
1181
1182 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
1183
1184         * call.c (build_over_call): Use DECL_CONTEXT, not
1185         DECL_VIRTUAL_CONTEXT.
1186         * class.c (modify_vtable_entry): Don't mess with
1187         DECL_VIRTUAL_CONTEXT.
1188         (set_vindex): Remove.
1189         (set_primary_base): Remove vfuns_p parameter.
1190         (determine_primary_base): Likewise.
1191         (modify_all_vtables): Likewise.
1192         (layout_class_type): Likewise.  Adjust calls to other functions
1193         accordingly.
1194         (finish_struct_1): Adjust calls to modified functions.  Set
1195         DECL_VINDEX here.
1196         * cp-tree.h (lang_type_class): Remove vsize.
1197         (CLASSTYPE_VSIZE): Remove.
1198         (lang_decl): Remove thunks.
1199         (DECL_THUNKS): Adjust.
1200         (DECL_VIRTUAL_CONTEXT): Remove.
1201         (duplicate_decls): Don't copy it.
1202         * pt.c (build_template_decl): Don't set it.
1203         (tsubst_decl): Likewise.
1204         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
1205
1206         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
1207         (build_vtable_entry): Remove.
1208         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
1209         (lang_decl): Add thunks.
1210         (DECL_THUNKS): New macro.
1211         * decl.c (duplicate_decls): Copy it.
1212         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
1213         * semantics.c (emit_associated_thunks): Simplify.
1214
1215 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
1216
1217         PR c++/7228
1218         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
1219         lang_type structure exists before accessing field.
1220         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
1221         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
1222         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
1223         * class.c (check_field_decls): Use new macros.
1224         * typeck2.c (process_init_constructor): Remove redundant check for
1225         existence of lang_type structure.
1226
1227 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
1228
1229         * class.c (end_of_base): New method.
1230         (end_of_class): Use it.  Check indirect virtual bases.
1231
1232         * class.c (check_field_decls): Fix typo.
1233
1234 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
1235
1236         PR c++/8067
1237         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
1238         related variables.
1239
1240         PR c++/7679
1241         * spew.c (next_token): Do not return an endless stream of
1242         END_OF_SAVED_INPUT tokens.
1243         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
1244         the cached token stream.
1245         (snarf_defarg): Likewise.
1246
1247 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
1248
1249         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
1250         variably_modified_type_p.
1251         * cp-tree.h: Remove prototype of variably_modified_type_p.
1252         * tree.c (variably_modified_type_p): Remove; now implemented
1253         in language-independent code.
1254
1255 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
1256
1257         PR c++/6579
1258         * spew.c (snarf_parenthesized_expression): New function.
1259         (snarf_block): Use it.
1260
1261 2002-10-22  Richard Henderson  <rth@redhat.com>
1262
1263         * method.c (use_thunk): Always compute vcall_value; assert that
1264         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
1265         for vcall thunks as well.
1266
1267 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
1268
1269         * class.c (empty_base_at_nonzero_offset_p): New function.
1270         (layout_nonempty_base_or_field): Do not check for conflicts when
1271         laying out a virtual base using the GCC 3.2 ABI.
1272         (build_base_field): Correct checking for presence of empty classes
1273         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
1274
1275         * class.c (include_empty_classes): Use normalize_rli.
1276         (layout_class_type): Likewise.
1277
1278         * decl.c (reshape_init): Tweak handling of character arrays.
1279
1280         PR c++/8218
1281         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
1282         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
1283         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
1284         (check_field_decls): Likewise.
1285         (layout_class_type): Likewise.
1286         (finish_struct_1): Initialize it.
1287         (walk_subobject_offsets): Use it to prune searches.
1288
1289 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
1290
1291         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
1292         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
1293         TARGET_ASM_OUTPUT_MI_THUNK in comments.
1294
1295 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
1296
1297         * decl.c (start_decl): Point users of the old initialized-
1298         typedef extension at __typeof__.
1299
1300 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
1301
1302         * Make-lang.in (method.o): Depend on TARGET_H.
1303         * method.c (target.h): Include it.
1304         (use_thunk): Use target hooks.  Use vcall thunks, if available.
1305
1306 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
1307
1308         * class.c (base_derived_from): Make sure return value is a bool.
1309
1310 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
1311
1312         * class.c (find_final_overrider_data_s): Remove overriding_fn and
1313         overriding_base.
1314         (dfs_base_derived_from): New function.
1315         (base_derived_from): Likewise.
1316         (dfs_find_final_overrider): Use base_derived_from.
1317         (find_final_overrider): Adjust.
1318
1319 2002-10-18  Jason Merrill  <jason@redhat.com>
1320
1321         PR c++/8080
1322         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
1323         with condition decls in a template.
1324
1325 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
1326
1327         * class.c (add_method): Compare template parms too.
1328
1329 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
1330
1331         PR c++/7584
1332         * class.c (handle_using_decl): Allow the declaration used to be
1333         from an ambiguous base.
1334
1335         * pt.c (convert_template_argument): Revert this change:
1336                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
1337                 * pt.c (convert_template_argument): Do not fold non-type
1338                 template rguments when inside a template.
1339
1340         * init.c (expand_default_init): Handle brace-enclosed initializers
1341         correctly.
1342
1343 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
1344
1345         * mangle.c (write_expression): Correct handling of enumeration
1346         constants.
1347         (write_template_arg): Likewise.
1348         * pt.c (convert_template_argument): Do not fold non-type template
1349         arguments when inside a template.
1350
1351         PR c++/7478
1352         * cvt.c (convert_to_reference): Allow references as the incoming
1353         type.
1354
1355 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
1356
1357         PR c++/7524
1358         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
1359         build_qualified_type.
1360
1361 2002-10-15  Richard Henderson  <rth@redhat.com>
1362
1363         * error.c (dump_expr): Use real_to_decimal directly, and with
1364         the new arguments.
1365
1366 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
1367
1368         * decl.c (reshape_init): Fix typo.
1369
1370         * cp-tree.h (operator_name_info_t): Add arity.
1371         * lex.c (init_operators): Initialize it.
1372         * mangle.c (write_conversion_operator_name): New function.
1373         (write_unqualified_name): Use it.
1374         (write_template_args): Accept template arguments as a TREE_LIST.
1375         (write_expression): Adjust handling of qualified names to match
1376         specification.
1377
1378 2002-10-15  Jason Merrill  <jason@redhat.com>
1379
1380         * call.c (call_builtin_trap): New fn.
1381         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
1382         (build_call): Don't set current_function_returns_abnormally outside
1383         a function.
1384
1385 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
1386
1387         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
1388         clear CLASSTYPE_EMPTY_P.
1389         (build_base_field): Likewise.
1390         (build_base_fields): Likewise.
1391         (check_bases_and_members): Likewise.
1392         (create_vtbl_ptr): Likewise.
1393         (layout_class_type): Likewise.  Ensure that empty classes have
1394         size zero when used as base classes in the 3.2 ABI.
1395         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
1396         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
1397         parameter.
1398         (is_empty_class): Correct definition when using post-3.2 ABI.
1399         * cp-tree.h (lang_type_class): Add empty_p.
1400         (CLASSTYPE_EMPTY_P): New macro.
1401
1402 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
1403
1404         * init.c (build_delete): Do not apply save_expr for arrays.
1405         (build_vec_delete): Likewise.
1406
1407 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
1408
1409         * decl.c (layout_var_decl): Call layout_decl even for variables
1410         whose type is an array with unspecified bounds.
1411
1412         PR c++/7176
1413         * lex.c (do_identifier): Add another option for the parsing
1414         parameter.
1415         * parse.y (do_id): Use it.
1416
1417 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1418
1419         PRs C++/6803, C++/7721 and C++/7803
1420         * decl.c (grokdeclarator): Gracefully handle template-name as
1421         decl-specifier.
1422
1423 2002-10-11  Jason Molenda  <jmolenda@apple.com>
1424
1425         * init.c (build_field_list): Provide uses_unions_p with a default
1426         value.
1427
1428 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
1429
1430         PR c++/5661
1431         * cp-tree.h (variably_modified_type_p): New function.
1432         (grokdeclarator) Tighten check for variably modified types as
1433         fields.
1434         * pt.c (convert_template_argument): Do not allow variably modified
1435         types as template arguments.
1436         * tree.c (variably_modified_type_p): New function.
1437
1438         * NEWS: Document removal of "new X = ..." extension.
1439         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
1440         brace-enclosed initializers.
1441         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
1442         (initialize_local_var): Remove declaration.
1443         (expand_static_init): Likewise.
1444         * decl.c (next_initializable_field): New function.
1445         (reshape_init): Likewise.
1446         (check_initializer): Use them.  Build dynamic initializer for
1447         aggregates here too.
1448         (initialize_local_var): Simplify, and incorporate cleanup
1449         insertion code as well.
1450         (destroy_local_var): Remove.
1451         (cp_finish_decl): Tidy.
1452         (expand_static_init): Fold checks for whether or not a variable
1453         needs initialization into this function.  Simplify.
1454         * decl2.c (do_static_initialization): Simplify.
1455         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
1456         be done for us automatically.
1457         (expand_default_init): Handle brace-enclosed initializers
1458         correctly.
1459         (expand_aggr_init_1): Remove RTL-generation code.
1460         (build_vec_init): Remove "new X = ..." support.
1461         * parse.y (new_initializer): Likewise.
1462         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
1463         brace-enclosed initializer.
1464         (create_pseudo_type_info): Likewise.
1465         * typeck2.c (store_init_value): Don't try to handle digest_init
1466         being called more than once.
1467         (digest_init): Tidy handling of brace-enclosed initializers.
1468
1469 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1470
1471         * decl.c (typename_hash): Use htab_hash_pointer.
1472
1473 2002-10-10  Jim Wilson  <wilson@redhat.com>
1474
1475         * decl.c (duplicate_decls): Don't call decl_attributes.
1476
1477 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
1478
1479         PR c/7353
1480         * decl.c (start_decl): Unconditionally issue error for
1481         'typedef foo = bar'.
1482         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
1483         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
1484
1485 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1486
1487         * decl2.c (prune_vtable_vardecl): Delete unused function.
1488
1489 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
1490
1491         PR c++/7754
1492         * decl2.c (finish_anon_union): Do not expand anonymous unions when
1493         procesing template functions.
1494         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
1495         type. Call layout_decl.
1496         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
1497
1498 2002-10-07  Richard Henderson  <rth@redhat.com>
1499
1500         * decl2.c, pt.c: Revert c++/7754 fix.
1501
1502 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1503
1504         PR c++/7804
1505         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
1506
1507 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
1508
1509         PR c++/7931
1510         * pt.c (for_each_template_parm_r): Handle BASELINKs.
1511
1512         PR c++/7754
1513         * decl2.c (finish_anon_union): Do not expand anonymous unions when
1514         procesing template functions.
1515         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
1516         type. Call layout_decl.
1517         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
1518
1519 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
1520
1521         PR c++/8006
1522         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
1523         template parameters.
1524         (globals): Add entity and need_abi_warning.
1525         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
1526         CLASSTYPE_TEMPLATE_INFO.
1527         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
1528         TYPE_TI_TEMPLATE.
1529         (write_prefix): Handle typename types correctly.
1530         (write_template_prefix): Handle template template parameters
1531         correctly.
1532         (start_mangling): Add entity parameter.
1533         (finish_mangling): Warn about names whose mangling will change.
1534         (mangle_decl_string): Adjust.
1535         (mangle_type_string): Likewise.
1536         (mangle_special_for_type): Likewise.
1537         (mangle_ctor_vtbl_for_type): Likewise.
1538         (mangle_thunk): Likewise.
1539         (mangle_guard_variable): Likewise.
1540         (mangle_ref_init_variable): Likewise.
1541
1542 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
1543
1544         PR c++/7188.
1545         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
1546         * cp-tree.h (emit_base_init): Rename to ....
1547         (emit_mem_initializers): ... this.
1548         (expand_member_init): Change prototype.
1549         * init.c (perform_member_init): Compute explicit, rather than
1550         requiring it as a parameter.
1551         (sort_member_init): Rename to ...
1552         (sort_mem_initializers): ... this.  Process bases and data members
1553         together.
1554         (sort_base_init): Remove.
1555         (emit_base_init): Rename to ...
1556         (emit_mem_initializers): ... this.
1557         (expand_aggr_vbase_init_1): Remove.
1558         (construct_virtual_bases): Rename to ...
1559         (construct_virtual_base): ... this.
1560         (expand_member_init): Rework handling of base initializers.
1561         * method.c (do_build_copy_constructor): Use
1562         finish_mem_initializers.
1563         * parse.y (member_init): Adjust calls to expand_member_init.
1564         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
1565         (tsubst_initializer_list): Use expand_member_init.
1566         * semantics.c (finish_mem_intiailizers): Simplify.
1567
1568 2002-10-02  Matt Austern  <austern@apple.com>
1569         * decl.c (walk_vtables_r): Fixed typo that caused result to
1570         never get a nonzero value.
1571
1572 2002-10-02  Roger Sayle  <roger@eyesopen.com>
1573
1574         PR optimization/6627
1575         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
1576         from here, and move it to tree.h.
1577         * decl.c (cxx_init_decl_processing): If storing the vbit
1578         in function pointers, ensure that force_align_functions_log
1579         is atleast one.
1580
1581 2002-10-02  Matt Austern  <austern@apple.com>
1582
1583         * class.c (check_field_decls): Changed warning about const member
1584         variables so that it doesn't get issued for a class aggregate.
1585
1586 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
1587
1588         * decl.c (cp_finish_decl): Make sure array types are laid out,
1589         even if the array bounds are unknown.
1590
1591 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
1592
1593         * class.c (build_vtbl_initializer): Change build_c_cast
1594         to build1.
1595
1596 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
1597
1598         * decl.c (cp_finish_decl): Make sure array types are laid out,
1599         even if the array bounds are unknown.
1600
1601         * decl.c (cp_finish_decl): Correct check for dynamic
1602         initialization of thread-local storage.
1603
1604 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
1605
1606         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
1607         overloaded.
1608
1609 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
1610
1611         * class.c (build_vtbl_initializer): Add cast.
1612         (add_vcall_offset_vtbl_entries_1):
1613         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
1614
1615 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
1616
1617         * class.c (walk_subobject_offsets): Correct the calculation of
1618         offsets for virtual bases.  Correct the counting of array
1619         elements.
1620         (layout_nonempty_base_or_field): Simplify.  Correct the
1621         calculation of offsets to be propagated through the binfo
1622         hierarchy.
1623         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
1624         Add the FIELD_DECL to TYPE_FIELDS.
1625         (build_base_fields): Adjust accordingly.
1626         (layout_virtual_bases): Use build_base_field.
1627         (end_of_class): Return a tree, not an integer.
1628         (warn_about_ambiguous_direct_bases): Rename to ...
1629         (warn_about_ambiguous_bases): ... this.
1630         (include_empty_classes): New function.
1631         (layout_class_type): Create an alternative version of the type to
1632         be used when as a base class type.  Do not call
1633         finish_record_layout until we are done laying out the class.
1634         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
1635         as_base.
1636         (CLASSTYPE_SIZE): Reimplement.
1637         (CLASSTYPE_SIZE_UNIT): Likewise.
1638         (CLASSTYPE_ALIGN): Likweise.
1639         (CLASSTYPE_USER_ALIGN): Likewise.
1640         (CLASSTYPE_AS_BASE): New macro.
1641         (DECL_INITIALIZED_P): Likewise.
1642         (extract_init): Remove prototype.
1643         (build_forced_zero_init): Rename to ...
1644         (build_zero_init): ... this.
1645         (force_store_init_value): Remove.
1646         * decl.c (obscure_complex_init): Remove.
1647         (duplicate_decls): Copy DECL_INITIALIZED_P.
1648         (check_initializer): Do not leave junk in DECL_INITIAL.
1649         (cp_finish_decl): Handle zero-initialization of entities with
1650         static storage duration.
1651         * expr.c (extract_init): Remove.
1652         * init.c (build_forced_zero_init): Remove.
1653         (build_zero_init): New function.
1654         (build_default_init): Use it.
1655         (build_field_list): Skip FIELD_DECLs for base subobjects.
1656         (push_base_cleanups): Likewise.
1657         * method.c (do_build_assign_ref): Likewise.
1658         (synthesize_exception_spec): Likewise.
1659         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
1660         (regenerate_decl_from_template): To not set DECL_INITIAL for a
1661         static data member whose initialization took place in its class.
1662         (instantiate_decl): Do not pass an initializer to cp_finish_decl
1663         in that situation.
1664         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
1665         (dfs_unuse_fields): Likewise.
1666         * tree.c (pod_type_p): Handle error_mark_node.
1667         (zero_init_p): Likewise.
1668         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
1669         subobjects.
1670         * typeck2.c (store_init_value): Remove #if 0'd code.
1671         (force_store_init_value): Remove.
1672         (process_init_constructor): Use build_zero_init.
1673
1674 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
1675
1676         PR c++/7788
1677         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
1678
1679 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
1680
1681         * cp-tree.h: Fix comment typos.
1682         * decl.c: Likewise.
1683         * pt.c: Likewise.
1684
1685 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
1686
1687         * cp/class.c (contains_empty_class_p): New method.
1688         (walk_subobject_offsets): Correct computation of field offset.
1689         (layout_empty_base): Correct placement of emtpy base classes.
1690         (layout_class_type): Warn about ABI changes.
1691
1692 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
1693
1694         * cp/class.c (layout_virtual_bases): Do not round the size of the
1695         type to a multiple of the alignment before laying out virtual bases.
1696         (layout_class_type): Correct handling of bit-fields that are wider
1697         than their type inside unions.  Round the size of the type to a
1698         even number of bytes when computing the size without virtual
1699         bases.
1700         * cp/cp-tree.h (abi_version_at_least): New macro.
1701
1702 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
1703
1704         * ChangeLog: Follow spelling conventions.
1705         * ChangeLog.2: Likewise.
1706         * call.c: Likewise.
1707         * class.c: Likewise.
1708         * cp-tree.h: Likewise.
1709         * cvt.c: Likewise.
1710         * decl.c: Likewise.
1711         * decl2.c: Likewise.
1712         * except.c: Likewise.
1713         * friend.c: Likewise.
1714         * g++spec.c: Likewise.
1715         * init.c: Likewise.
1716         * lex.c: Likewise.
1717         * mangle.c: Likewise.
1718         * method.c: Likewise.
1719         * operators.def: Likewise.
1720         * optimize.c: Likewise.
1721         * pt.c: Likewise.
1722         * rtti.c: Likewise.
1723         * search.c: Likewise.
1724         * semantics.c: Likewise.
1725         * spew.c: Likewise.
1726         * tree.c: Likewise.
1727         * typeck.c: Likewise.
1728
1729 2002-09-18  Devang Patel  <dpatel@apple.com>
1730
1731         * cp/cp-tree.h: New prototype for walk_vtabls().
1732         * cp/decl.c (walk_vtables_r): New function.
1733         (struct cp_binding_level): Add new members, namespaces,
1734         names_size and vtables.
1735         (add_decl_to_level): Add decl in namespaces or vtables
1736         chain, if conditions match.
1737         (walk_vtables): New function.
1738         (walk_namespaces_r): Travers separate namespace chain
1739         for namespace decls.
1740         (wrapup_globals_for_namespace): Use names_size instead
1741         of list_length().
1742         * cp/decl2.c (finish_file): Use walk_vtables() instead of
1743         walk_globals() to walk vtable decls.
1744
1745 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
1746
1747         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
1748         ICE with invalid pointers & references.
1749
1750 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
1751
1752         * Make-lang.in: Remove all references to the demangler.
1753         * cxxfilt.c: Moved to binutils.
1754
1755 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
1756
1757         PR c++/7718
1758         * pt.c (tsubst_decl): Remove assert.
1759
1760         Remove DR 295 implementation.
1761         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
1762         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
1763         about ignoring volatile qualifiers.
1764
1765         * search.c (lookup_member): Correct documentation.
1766
1767 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
1768
1769         * cp-tree.h (union lang_tree_node): Add chain_next option.
1770
1771 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
1772
1773         * parse.y (parse_finish_call_expr): Check lookup_member result.
1774
1775         PR c++/7015
1776         * semantic.c (finish_asm_stmt): Fix operand/output_operands
1777         thinko.
1778         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
1779
1780 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
1781
1782         PR c++/7919
1783         * call.c (build_over_call): Convert this pointer for fns found by
1784         using decls.
1785
1786 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
1787
1788         * ChangeLog: Follow spelling conventions.
1789         * ChangeLog.1: Likewise.
1790
1791 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
1792
1793         PR c++/7768
1794         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
1795
1796 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
1797
1798         * error.c: Fix comment formatting.
1799         * except.c: Likewise.
1800         * expr.c: Likewise.
1801         * friend.c: Likewise.
1802         * g++spec.c: Likewise.
1803         * init.c: Likewise.
1804         * lex.c: Likewise.
1805         * mangle.c: Likewise.
1806         * method.c: Likewise.
1807         * optimize.c: Likewise.
1808         * pt.c: Likewise.
1809         * rtti.c: Likewise.
1810         * search.c: Likewise.
1811         * semantics.c: Likewise.
1812         * spew.c: Likewise.
1813         * tree.c: Likewise.
1814         * typeck.c: Likewise.
1815         * typeck2.c: Likewise.
1816
1817 2002-09-13  Matt Austern  <austern@apple.com>
1818
1819         PR C++/7828
1820         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
1821         * cp/call.c: Change call-by-const-reference mechanism to use
1822         non_cast_lvalue_p when deciding whether the create a temporary.
1823         We need a temporary when passing, e.g. (long) x by const ref.
1824
1825 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
1826
1827         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
1828
1829 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
1830
1831         * decl.c: Fix comment formatting.
1832         * decl2.c: Likewise.
1833
1834 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
1835
1836         * call.c: Fix comment formatting.
1837         * class.c: Likewise.
1838         * cp-lang.c: Likewise.
1839         * cp-tree.h: Likewise.
1840         * cvt.c: Likewise.
1841
1842 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
1843
1844         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
1845         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
1846         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
1847         minor adjustments (use version_string, eliminate yet another
1848         duplicate of xmalloc)
1849
1850 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1851
1852         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
1853
1854 2002-09-05  Jason Merrill  <jason@redhat.com>
1855
1856         * typeck2.c (add_exception_specifier): Only pedwarn for an
1857         incomplete type.
1858         (require_complete_eh_spec_types): New fn.
1859         (cxx_incomplete_type_diagnostic): Also support pedwarning.
1860         * typeck.c (complete_type_or_diagnostic): Likewise.
1861         * call.c (build_call): Call require_complete_eh_spec_types.
1862         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
1863         on an incomplete type.
1864
1865 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
1866
1867         * decl.c (start_cleanup_fn): Clear interface_only before
1868         start_function, restore it afterwards.
1869
1870 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
1871
1872         * cp-tree.h (finish_builtin_type): Remove.
1873         * decl2.c (finish_builtin_type): Move to common code.
1874         * decl.c (build_ptrmemfunc_type): Adjust.
1875         * rtti.c (create_pseudo_type_info): Adjust.
1876         (create_tinfo_types): Adjust.
1877
1878 2002-08-31  Jason Merrill  <jason@redhat.com>
1879
1880         * cp-lang.c (cp_expr_size): Allow initialization from a
1881         CONSTRUCTOR.
1882
1883 2002-08-30  Richard Henderson  <rth@redhat.com>
1884
1885         PR opt/7515
1886         * tree.c: Include target.h.
1887         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
1888         don't bind locally.
1889         * Makefile.in (tree.o): Update.
1890
1891 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
1892
1893         * class.c (layout_virtual_bases): Warn about bugs in G++ that
1894         result in incorrect object layouts.
1895         (layout_class_type): Likewise.
1896
1897 2002-08-24  Matt Austern  <austern@apple.com>
1898
1899         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
1900         are allowable.
1901         (real_lvalue_p): Update caller.
1902         (lvalue_p): Ditto.
1903         (non_cast_lvalue_or_else): New.
1904         * tree.h: Declare it.
1905         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
1906
1907 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
1908
1909         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
1910         and COND_EXPR specially; fix error message output.
1911
1912 2002-08-22  Jason Merrill  <jason@redhat.com>
1913
1914         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
1915         * semantics.c (nullify_returns_r): Likewise.
1916
1917 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1918
1919         Fix PR/7621
1920         * typeck.c (finish_class_member_access_expr): Diagnose cases where
1921         name lookup finds nothing.
1922
1923 2002-08-15  Jason Merrill  <jason@redhat.com>
1924
1925         * semantics.c (finish_then_clause): Remove redundant assignment.
1926         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
1927         extra binding level outside the if/switch statement.
1928         (finish_while_cond, finish_for_cond): Rewrite complex condition
1929         into the loop body.
1930
1931 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
1932
1933         * parse.y (sizeof, alignof, typeof): New non-terminals to
1934         increment skip_evaluation.  Replace terminals with them and
1935         decrement skip_evaluation at the end of rules using them.
1936         * decl2.c (mark_used): Don't assemble_external if
1937         skipping evaluation.
1938
1939 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
1940
1941         Fix PR/7504
1942         * parse.y (parse_finish_call_expr): Handle incomplete
1943         type used to name a scope.
1944
1945 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1946
1947         PR c++/7598
1948         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
1949         regression caused by my 2002-08-08 patch.
1950
1951 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
1952
1953         * decl.c (pushdecl_class_level): Honor requests to bind names to
1954         OVERLOADs.
1955
1956 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1957
1958         * decl2.c (build_call_from_tree): Fix uninitialized variable.
1959         * parse.y (parse_finish_call_expr): Likewise.
1960         * repo.c (old_args, old_dir, old_main): Const-ify.
1961
1962 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
1963
1964         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
1965         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
1966         * optimize.c (maybe_clone_body): Likewise.
1967         * pt.c (tsubst_enum): Likewise.
1968         (lookup_template_class): Likewise.
1969         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
1970
1971 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
1972
1973         * lang-specs.h: Remove -ansi.
1974
1975 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
1976
1977         * tree.c (maybe_dummy_object): Replace // with /* */
1978
1979 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
1980
1981         * call.c (standard_conversion): Use build_ptrmem_type.
1982         * cp-tree.h (build_ptrmem_type): New function.
1983         (adjust_result_of_qualified_name_lookup): Likewise.
1984         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
1985         static data members.
1986         (build_ptrmem_type): New function.
1987         (grokdeclarator): Do not use build_offset_type when encountering a
1988         qualified name.
1989         * parse.y (parse_finish_call_expr): Use
1990         adjust_result_of_qualified_name_lookup.
1991         * search.c (adjust_result_of_qualified_name_lookup): New function.
1992         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
1993         accessing OFFSET_TYPEs directly.
1994
1995 2002-08-08  Mike Stump  <mrs@apple.com>
1996
1997         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
1998         (type_decays_to): Likewise.
1999         * class.c (find_final_overrider): Likewise.
2000         (maybe_note_name_used_in_class): Likewise.
2001         * decl.c (current_tmpl_spec_kind): Likewise.
2002         (add_binding): Likewise.
2003         (push_class_binding): Likewise.
2004         (duplicate_decls): Likewise.
2005         (layout_var_decl): Likewise.
2006         (grokfndecl): Likewise.
2007         (grokdeclarator): Likewise.
2008         (check_default_argument): Likewise.
2009         * decl2.c (handle_class_head): Likewise.
2010         * error.c (dump_template_decl): Likewise.
2011         * init.c (build_offset_ref): Likewise.
2012         * pt.c (check_specialization_scope): Likewise.
2013         (determine_specialization): Likewise.
2014         (check_explicit_specialization): Likewise.
2015         (maybe_check_template_type): Likewise.
2016         (process_partial_specialization): Likewise.
2017         (check_default_tmpl_args): Likewise.
2018         (push_template_decl_real): Likewise.
2019         (convert_template_argument): Likewise.
2020         (try_class_unification): Likewise.
2021         (get_bindings_real): Likewise.
2022         (do_decl_instantiation): Likewise.
2023         * semantics.c (begin_function_definition): Likewise.
2024         (finish_member_declaration): Likewise.
2025         (check_multiple_declarators): Likewise.
2026         * typeck.c (comp_array_types): Likewise.
2027         (comptypes): Likewise.
2028         (expr_sizeof): Likewise.
2029         (build_binary_op): Likewise.
2030         (dubious_conversion_warnings): Likewise.
2031         (check_return_expr): Likewise.
2032
2033 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
2034
2035         * typeck.c (build_class_member_access_expr): Do not return
2036         error_mark_node when no error has occurred.
2037
2038 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2039
2040         * typeck.c (build_component_addr): Remove.
2041         (build_unary_op): Just check it's not a bitfield, and then build
2042         an ADDR_EXPR.
2043
2044 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2045
2046         * class.c (convert_to_base): Correct check for error_mark_node.
2047         (create_vtable_ptr): Remove unused VFUNS_P parm.
2048
2049 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2050
2051         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
2052
2053 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
2054
2055         Rework build_component_ref.
2056         * call.c (build_vfield_ref): Do not go through build_component_ref.
2057         (build_field_call): Use build_class_member_access_expr.
2058         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
2059         (build_object_call): Likewise.
2060         * class.c (convert_to_base): New function.
2061         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
2062         (instantiate_type): Handle BASELINKs.
2063         * cp-tree.def (BASELINK): New tree code.
2064         * cp-tree.h (BASELINK_P): Reimplement.
2065         (SET_BASELINK_P): Remove.
2066         (BASELINK_BINFO): Reimplement.
2067         (BASELINK_FUNCTIONS): Likewise.
2068         (BASELINK_ACCESS_BINFO): Likewise.
2069         (BASELINK_OPTYPE): Likewise.
2070         (convert_to_base): New function.
2071         (name_p): Likewise.
2072         (build_object_ref): Remove.
2073         (build_component_ref_1): Likewise.
2074         (build_component_ref): Likewise.
2075         (build_x_component_ref): Likewise.
2076         (build_class_member_access_expr): New function.
2077         (finish_class_member_access_expr): Likewise.
2078         (build_ptrmemfunc_access_expr): Likewise.
2079         * decl.c (grokdeclarator): Handle BASELINKs.
2080         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
2081         finish_class_member_access_expr.
2082         (arg_assoc): Handle BASELINKs.
2083         (do_class_using_decl): Likewise.
2084         * error.c (dump_decl): Likewise.
2085         (dump_expr): Use build_ptrmemfunc_access_expr.
2086         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
2087         destructors.
2088         (build_throw): Use BASELINK_FUNCTIONS.
2089         * init.c (perform_member_init): Use
2090         build_class_member_access_expr.
2091         (build_offset_ref): Handle BASELINKs.  Use
2092         build_class_member_access_expr.
2093         * method.c (hack_identifier): Likewise.
2094         * parse.y (do_id): Use BASELINK, not TREE_LIST.
2095         (primary): Remove uses of build_object_ref.
2096         * pt.c (lookup_template_function): Handle BASELINKs.
2097         (resolve_overloaded_unification): Likewise.
2098         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
2099         (lookup_field): Use BASELINK, not TREE_LIST.
2100         (lookup_fnfiels): Likewise.
2101         (setup_class_bindings): Likewise.
2102         * semantics.c (finish_object_call_expr): Do not use
2103         build_method_call when we already know what function is being
2104         called.
2105         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
2106         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
2107         TREE_CHAIN.
2108         (name_p): New function.
2109         * typeck.c (build_object_ref): Remove.
2110         (build_component_ref_1): Likewise.
2111         (build_x_component_ref): Likewise.
2112         (build_class_member_access_expr): New function.
2113         (finish_class_member_access_expr): Likewise.
2114         (build_ptrmemfunc_access_expr): Likewise.
2115         (get_member_function_from_ptrfunc): Use
2116         build_ptrmemfunc_access_expr.
2117         (build_binary_op): Likewise.
2118         (build_unary_op): Likewise.
2119         (build_ptrmemfunc): Likewise.
2120         (pfn_from_ptrmemfunc): Likewise.
2121         * typeck2.c (build_m_component_ref): Adjust comment.
2122
2123 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
2124
2125         * Make-lang.in (CXX_C_OBJS): Update.
2126         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
2127         * cp-tree.h (cxx_decode_option): Remove.
2128         * decl2.c (compare_options, lang_f_options, unsupported_options,
2129         cxx_decode_option): Remove.
2130
2131 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
2132
2133         * typeck.c (build_x_unary_op): Handle pointer-to-member.
2134
2135 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
2136
2137         * class.c: Don't include obstack.h.
2138         (popclass):
2139         * decl2.c: Delete bogus comment.
2140         * error.c: Don't include obstack.h.
2141         * except.c: Likewise.
2142         (dump_type): Correct comment.
2143         * method.c: Don't include obstack.h.
2144         * tree.c: Likewise.
2145
2146 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
2147
2148         Fix PR/2213
2149         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
2150         expressions to pointer-to-data-member of pointer-to-member-functions.
2151
2152 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
2153
2154         * cvt.c (ocp_convert): Delete obsolete code.
2155         * parse.y (permanent_obstack): Delete declaration.
2156         * pt.c (permanent_obstack): Delete declaration.
2157         * repo.c (permanent_obstack): Delete declaration.
2158         (open_repo_file): Use xmalloc instead of permanent_obstack.
2159         (init_repo): Use xstrdup instead of permanent_obstack.
2160
2161 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
2162
2163         * cp-tree.h (VF_DERIVED_VALUE): Remove.
2164         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
2165
2166 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
2167
2168         PR 7470.
2169         C++ ABI change - vfunc ordering.
2170         * class.c (add_virtual_function): Remove.
2171         (dfs_modify_all_vtables): Take list of all declared
2172         virtuals. Assign all that are not in primary base.
2173         (check_for_override): Adjust comments.
2174         (create_vtable_ptr): Take single list of virtuals. Build chain
2175         of declared virtuals here.
2176         (layout_class_type): Take single list of virtuals. Adjust.
2177         (finish_struct_1): Keep virtuals on single list. Adjust.
2178
2179 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
2180
2181         * init.c (build_member_call): Use build_new_method_call, not
2182         build_method_call.
2183
2184 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
2185
2186         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
2187
2188 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
2189
2190         * call.c (build_method_call): Issue a more helpful error message
2191         about ambiguous method names.
2192
2193 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
2194
2195         * tree.c (build_shared_int_cst): Make cache file scope, and
2196         GTY it.
2197
2198 2002-08-02  Jason Merrill  <jason@redhat.com>
2199
2200         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
2201         (cp_expr_size): New fn.
2202         * call.c (build_over_call): Lose empty class hackery.
2203         (convert_arg_to_ellipsis): Promote non-POD warning to error.
2204         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
2205
2206         * semantics.c (expand_body): Do tree optimization in the function
2207         context, too.
2208
2209 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
2210
2211         * cp-tree.h: Move all warning and flag declarations to c-common.h.
2212         * decl.c: Move all warning and flag variables to c-common.c.
2213         * decl2.c: Move all warning and flag variables to c-common.c.
2214         * lex.c (flag_digraphs): Remove.
2215         (warn_traditional): Now in c-common.c.
2216
2217 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
2218
2219         * call.c (build_field_call): Do not look up the field by name.
2220         (build_method_call): Simplify.
2221         (struct z_candidate): Add access_path and conversion_path.  Remove
2222         basetype_path.
2223         (convert_class_to_reference): Adjust use of
2224         add_function_candidate.
2225         (add_candidate): Add conversion_path argument.
2226         (add_function_candidate): Use it.
2227         (add_conv_dndidate): Likewise.
2228         (build_builtin_candidate): Likewise.
2229         (add_template_candidate_real): Add conversion_path argument.
2230         (add_template_conv_candidate): Likewise.
2231         (add_template_candidate): Likewise.
2232         (build_user_type_conversion_1): Use it.
2233         (build_new_function_call): Remove name lookup code.  Adjust use of
2234         add_template_candidate and add_function_candidate.
2235         (build_new_op): Likewise.
2236         (convert_like_real): Use build_special_member_call.
2237         (build_over_call): Use cand->conversion_path.
2238         (build_special_member_call): New method.
2239         (build_new_method_call): Remove name lookup code.
2240         * cp-tree.def (OFFSET_REF): Update documentation.
2241         (TEMPLATE_ID_EXPR): Likewise.
2242         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
2243         (BASELINK_OPTYPE): Likewise.
2244         (build_new_method_call): Adjust prototype.
2245         (build_special_member_call): New method.
2246         (build_baselink): New method.
2247         (build_offset_ref_call_from_tree): Likewise.
2248         (build_call_from_tree): Likewise.
2249         (finish_qualified_call_expr): Remove.
2250         (finish_call_expr): Adjust prototype.
2251         (build_x_function_call): Remove.
2252         * cvt.c (ocp_convert): Use build_special_member_call.
2253         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
2254         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
2255         CALL_EXPR.
2256         (build_offset_ref_call_from_tree): New function.
2257         (build_call_from_tree): Likewise.
2258         * init.c (expand_cleanup): Use build_special_member_call.
2259         (expand_default_init): Likewise.
2260         (build_member_call): Use finish_call_expr.
2261         (build_new_1): Use build_special_member_call.
2262         (push_base_cleanups): Likewise.
2263         * method.c (do_build_assign_ref): Likewise.
2264         * parse.y (template_id): Do not pass a COMPONENT_REF to
2265         lookup_template_function.
2266         (primary): Use parse_finish_call_epxr, not finish_call_expr.
2267         (parse_finish_call_expr): New function.
2268         * pt.c (lookup_template_function): Add assertions.
2269         * search.c (lookup_base): Allow T to be a binfo.
2270         (build_baselink): New function.
2271         (lookup_member): Use it.
2272         * semantics.c (finish_call_expr): Do not do name lookup.
2273         (finish_object_call_expr): Remove #if 0'd code.
2274         (finish_qualified_call_expr): Remove.
2275         * typeck.c (build_x_function_call): Remove.
2276         (build_static_case): Use build_special_member_call.
2277         * typeck2.c (build_functional_cast): Likewise.
2278
2279 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
2280
2281         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
2282
2283 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
2284
2285         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
2286
2287 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
2288
2289         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
2290         documentation.
2291
2292 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
2293
2294         * cp-tree.h: Comment typo fix.
2295
2296 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
2297
2298         * spew.c (space_for_token): Allocate zeroed memory for a new token
2299         chunk.
2300
2301 2002-07-27  Roger Sayle  <roger@eyesopen.com>
2302
2303         * decl.c (builtin_function_1): No need to explicitly mark
2304         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
2305
2306 2002-07-27  Roger Sayle  <roger@eyesopen.com>
2307
2308         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
2309
2310 2002-07-26  Jason Merrill  <jason@redhat.com>
2311
2312         * call.c (build_over_call): Likewise.
2313         (cp_convert_parm_for_inlining): New fn.
2314         (convert_for_arg_passing): New fn.
2315         (convert_default_arg, build_over_call): Use it.
2316         (type_passed_as): New fn.
2317         * pt.c (tsubst_decl): Use it.
2318         * decl2.c (cp_build_parm_decl): New fn.
2319         (build_artificial_parm): Use it.
2320         (start_static_storage_duration_function): Likewise.
2321         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
2322         (grokparms): Don't mess with DECL_ARG_TYPE.
2323         * typeck.c (convert_arguments): Use convert_for_arg_passing.
2324         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
2325         Define.
2326         * cp-tree.h: Declare new fns.
2327
2328 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
2329
2330         * cp-tree.h (flag_operator_names): Remove.
2331         * decl2.c (flag_operator_names): Remove.
2332         (lang_f_options): Remove operator-names.
2333         * lex.c (D_OPNAME): Remove.
2334         (reswords): Remove operator names.
2335         (rid_to_yy): Remove operator names.
2336         (init_reswords): No need to handle D_OPNAME.
2337         * spew.c (read_process_identifier): There are no operator
2338         names.
2339
2340 2002-07-26  Jason Merrill  <jason@redhat.com>
2341
2342         * dump.c (cp_dump_tree): Call c_dump_tree.
2343         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
2344
2345 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
2346
2347         * error.c (print_whitespace): Remove.
2348         * g++spec.c (LIBUNWIND): Move.
2349         * mangle.c (mangled_position, write_signed_number): Remove.
2350
2351 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
2352
2353         * decl2.c (cxx_decode_option): Similarly.
2354
2355 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
2356
2357         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
2358         (cxx_sizeof_or_alignof_type): Take a third argument.
2359         (cxx_sizeof): Adjust definition.
2360         (cxx_alignof): Likewise.
2361         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
2362         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
2363         complaining.
2364         (c_sizeof_nowarn): Remove definition.
2365         (build_unary_op): Use cxx_sizeof_nowarn.
2366
2367 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
2368
2369         * tree.c (cp_build_qualified_type_real): When copying
2370         pointer-to-method types, unshare the record that holds
2371         the cached pointer-to-member-function type.
2372
2373 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
2374
2375         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
2376
2377 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
2378
2379         Fix PR/7363:
2380         * typeck.c (cxx_sizeof_or_alignof_type): New function.
2381         (c_sizeof): Remove definition.
2382         (expr_sizeof): Use cxx_sizeof.
2383         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
2384         * decl.c (finish_destructor_body): Use cxx_sizeof.
2385         * semantics.c (finish_alignof): Likewise.
2386         (finish_alignof): Use cxx_alignof.
2387         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
2388         (cxx_sizeof_or_alignof_type): Declare.
2389         (my_friendly_assert): Move to ../c-common.h.
2390
2391 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
2392
2393         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
2394
2395 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2396
2397         PR c++/7347, c++/7348
2398         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
2399         * decl.c (make_typename_type): Use it.
2400         (make_unbound_class_template): Likewise.
2401         (lookup_name_real): Don't call type_access_control if scope is
2402         template parameter dependent.
2403         * parse.y (template_arg): Call make_unbound_class_template with
2404         tf_parsing set.
2405         (nest_name_specifier): Call make_typename_type with tf_parsing set.
2406         (typename_sub0): Likewise.
2407         (typename_sub1): Likewise.
2408         (instantiate_decl): Push class scope.
2409         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
2410         for both static variable and member function template.
2411         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
2412         and arguments.
2413         * search.c (type_access_control): Do type access for TEMPLATE_DECL
2414         too.
2415
2416 2002-07-20  Roger Sayle  <roger@eyesopen.com>
2417
2418         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
2419         test by using positive_option.  Make whitespace consistent.
2420
2421 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
2422
2423         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
2424         members with 'locus'.  Adjust use throughout.
2425         (struct feed):  Likewise.
2426         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
2427         Adjust use.
2428         (snarf_defarg): Use error(), not error_with_file_and_line().
2429
2430 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
2431
2432         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
2433         cpp_options is included.
2434
2435 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2436
2437         PR c++/2862, c++/2863
2438         * pt.c (determine_specialization): Compare the length of
2439         TYPE_ARG_TYPES.  Tidy.
2440
2441 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2442
2443         PR c++/3797
2444         * decl.c (duplicate_decls): Don't propagate inlining parameters from
2445         olddecl to newdecl when newdecl is a specialization of the
2446         instantiation olddecl.
2447
2448 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2449
2450         PR c++/4802, c++/5387
2451         * decl.c (make_typename_type): Use enforce_access.
2452
2453 2002-07-17  Scott Snyder <snyder@fnal.gov>
2454
2455         PR c++/7320
2456         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
2457
2458 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
2459
2460         * class.c (add_method): Correct handling of conversion operators.
2461
2462 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
2463
2464         PR c++/7224
2465         * class.c (add_method): Simplify.
2466
2467 2002-07-11  Jason Merrill  <jason@redhat.com>
2468
2469         PR c++/7279
2470         * tree.c (cp_copy_res_decl_for_inlining): Also copy
2471         TREE_ADDRESSABLE.
2472
2473 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
2474
2475         * pt.c (template_parm_this_level_p, push_template_decl_real):
2476         Pass depth as int pointer.
2477
2478 2002-07-11  Tim Josling  <tej@melbpc.org.au>
2479
2480         Remove front end hard coding from gengtype.c.
2481
2482         * config-lang.in (gtfiles): Add files needed for this front end.
2483
2484 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
2485
2486         * cp-tree.h (unqualified_name_lookup_error): Declare it.
2487         (begin_function_definition): Adjust prototype.
2488         * lex.c (unqualified_name_lookup_error): New function, split out
2489         from ...
2490         (do_identifier): ... here.
2491         * parse.y (parse_begin_function_definition): New function.
2492         (fn.def1): Use it.
2493         * semantics.c (begin_function_definition): Accept decl-specifiers
2494         and attributes as separate parameters.
2495
2496 2002-07-10  Jason Merrill  <jason@redhat.com>
2497
2498         PR c++/6255
2499         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
2500         modifying the old one.
2501
2502 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
2503
2504         * cp-tree.h (constructor_name_p): Declare it.
2505         (check_template_template_default_arg): Likewise.
2506         * class.c (handle_using_decl): Use constructor_name_p.
2507         * decl.c (grokdeclarator): Likewise.
2508         * decl2.c (constructor_name_p): Define it.
2509         * init.c (build_member_call): Use constructor_name_p.
2510         * parse.y (template_parm): Use check_template_template_default_arg.
2511         * pt.c (check_explicit_specialization): Use constructor_name_p.
2512         * semantics.c (check_template_template_default_arg): New function.
2513
2514 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2515
2516         * pt.c (can_complete_type_without_circularity): Add static to
2517         function definition.
2518
2519 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
2520
2521         * cp-tree.h (have_extern_spec): Declare it
2522         * decl.c (have_extern_spec): Define it.
2523         (start_decl): Eliminate use of used_extern_spec.
2524         (start_function): Likewise.
2525         * parse.y (have_extern_spec): Remove declaration.
2526         (used_extern_spec): Likewise.
2527         (frob_specs): Eliminate use of used_extern_spec.
2528         (.hush_warning): Likewise.
2529
2530 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
2531
2532         * Make-lang.in (cp/parse.o): Depend on decl.h.
2533         * cp-tree.h (do_decl_instantiation): Change prototype.
2534         * parse.y: Include decl.h.
2535         (parse_decl_instantiation): New function.
2536         (explicit_instantiation): Use it.
2537         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
2538         and DECLSPECS.
2539
2540 2002-07-07  Roger Sayle  <roger@eyesopen.com>
2541
2542         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
2543         constructor and destructor tests when passed a TEMPLATE_DECL.
2544
2545 2002-07-05  Jason Merrill  <jason@redhat.com>
2546
2547         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
2548         pointers.
2549
2550         PR optimization/7145
2551         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
2552
2553 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
2554
2555         Repair damage on weak-impared targets caused by my previous patch.
2556         * cp-tree.h (import_export_tinfo): Add parameter.
2557         * decl2.c (import_export_tinfo): Add parameter, post adjust
2558         DECL_COMDAT.
2559         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
2560         import_export_tinfo.
2561
2562 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2563
2564         PR c++/6944
2565         * init.c (build_aggr_init): Remove qualifiers of init before calling
2566         build_vec_init.
2567         (build_vec_init): Flatten multi-dimensional array during cleanup.
2568         (build_vec_delete_1): Abort if the type of each element is array.
2569
2570 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
2571
2572         * pt.c (instantiate_class_template): Fix typo.
2573
2574 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2575
2576         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
2577         by CVS conflict in my last patch.
2578
2579 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2580
2581         PR c++/6716
2582         * pt.c (can_complete_type_without_circularity): New function.
2583         (instantiate_class_template): Use it.
2584         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
2585         message due to incomplete fields.
2586
2587 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
2588
2589         PR c++/7112
2590         * mangle.c (write_expression): Add mangling for sizeof when
2591         applied to a type.
2592         * operators.def: Remove stale comment.
2593
2594 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
2595
2596         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
2597         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
2598         (tinfo_decl_type): Replace with ...
2599         (type_info_ptr_type): ... this.
2600         (import_export_tinfo): Declare.
2601         (tinfo_decl_p): Rename to ...
2602         (unemitted_tinfo_decl_p): ... this.
2603         * decl2.c (import_export_decl): Break out tinfo handling into ...
2604         (import_export_tinfo): ... here. New function.
2605         (finish_file): Adjust.
2606         * rtti.c (TINFO_REAL_NAME): New macro.
2607         (init_rtti_processing): Create the tinfo types.
2608         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
2609         (get_tinfo_decl): Adjust.
2610         (get_tinfo_ptr): New function.
2611         (get_type_id): Use it.
2612         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
2613         (ptr_initializer): Use get_tinfo_ptr.
2614         (ptm_initializer): Likewise.
2615         (synthesize_tinfo_var): Break into ...
2616         (get_pseudo_ti_init): ... this. Just create the initializer.
2617         (get_pseudo_ti_desc): .. and this.
2618         (create_real_tinfo_var): Remove.
2619         (create_pseudo_type_info): Don't create the vtable decl here.
2620         (get_vmi_pseudo_type_info): Remove.
2621         (create_tinfo_types): Adjust.
2622         (tinfo_decl_p): Rename to ...
2623         (unemitted_tinfo_decl_p): ... here. Adjust.
2624         (emit_tinfo_decl): Adjust. Create the initializer.
2625
2626 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
2627
2628         PR c++/6695
2629         * pt.c (tsubst_friend_class): Substitute into the context of the
2630         friend before using it.
2631
2632 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
2633
2634         * cp-tree.h (xref_tag): Change prototype.
2635         (handle_class_head): Likewise.
2636         (build_x_component_ref): Likewise.
2637         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
2638         (xref_tag): Take attributes as a separate parameter.
2639         (xref_tag_from_type): Adjust call to xref_tag.
2640         * decl2.c (build_expr_from_tree): Adjust call to
2641         build_x_component_ref.
2642         (handle_class_head): Take attributes as a separate parameter.
2643         * parse.y (parse_xref_tag): New function.
2644         (parse_handle_class_head): Likewise.
2645         (primary): Use parse_xref_tag.
2646         (class_head_decl): Use parse_handle_class_head.
2647         (class_head_defn): Likewise.
2648         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
2649         (build_dynamic_cast_1): Likewise.
2650         (create_pseudo_type_info): Likewise.
2651         (emit_support_tinfos): Likewise.
2652         * typeck.c (build_object_ref): Adjust call to
2653         build_x_component_ref.
2654         (build_x_component_ref): Remove protect parameter.
2655
2656 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
2657
2658         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
2659         * class.c (handle_using_decl): Likewise.
2660         (instantiate_type): Likewise.
2661         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
2662         (xref_basetypes): Change prototype.
2663         (begin_mem_initializers): New function.
2664         (get_overloaded_fn): Likewise.
2665         * decl.c (xref_basetypes): Simplify.
2666         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
2667         * init.c (build_offset_ref): Likewise.
2668         * parse.y (base_init): Use begin_mem_initializers().
2669         (structsp): Adjust call to xref_basetypes.
2670         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
2671         (instantiate_class_template): Adjust call to xref_basetypes.
2672         * semantics.c (begin_mem_initializers): New function.
2673         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
2674         (really_overlaoded_fn): Likewise.
2675         (get_overloaded_fn): New function.'
2676         (get_first_fn): USe BASELINK_FUNCTIONS.
2677
2678 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
2679
2680         * cp-tree.h (SCALAR_TYPE_P): New macro.
2681         (check_for_out_of_scope_variable): New function.
2682         (at_class_scope_p): Likewise.
2683         (finish_fname): Likewise.
2684         * class.c (finish_struct): Use at_function_scope_p.
2685         * decl.c (check_for_out_of_scope_variable): New function, split
2686         out from do_identifier.
2687         (finish_enum): Use at_function_scope_p.
2688         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
2689         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
2690         (primary): Use at_function_scope_p.
2691         * search.c (at_class_scope_p): New function.
2692         * semantics.c (finish_fname): Likewise.
2693         (check_multiple_declarators): Use at_function_scope_p.
2694
2695 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
2696
2697         * parse.y (parse_scoped_id): New function.
2698         (primary): Use it.
2699         * cp-tree.h (do_scoped_id): Adjust declaration.
2700         * lex.c (do_scoped_id): Remove call to yylex.
2701         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
2702         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
2703         expanding it inline.
2704
2705 2002-06-23  Matt Thomas  <matt@3am-software.com>
2706
2707         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
2708         "#if VMS_TARGET".
2709
2710 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2711
2712         * mangle.c (integer_type_codes): Const-ify.
2713
2714 2002-06-20  Richard Henderson  <rth@redhat.com>
2715
2716         PR c++/6747
2717         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
2718         Call put_var_into_stack.
2719
2720 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2721
2722         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
2723         array size calculation.
2724
2725 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2726
2727         PR c++/6892
2728         * pt.c (tsubst_expr): Handle FILE_STMT.
2729
2730 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2731
2732         PR c++/6723
2733         * pt.c (lookup_template_class): Don't build complete argument of
2734         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
2735         argument.
2736
2737 2002-06-19  Akim Demaille  <akim@epita.fr>
2738
2739         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
2740         decl.h's TYPENAME.
2741         * spew.c, lex.c: Adjust.
2742         * parse.y (explicit_instantiation): Add empty action to override
2743         the default $$ = $1 where it introduces a type clash.
2744
2745 2002-06-14  Jason Merrill  <jason@redhat.com>
2746
2747         * semantics.c (begin_for_stmt): Push the 'for' scope before
2748         adding the FOR_STMT.
2749
2750         C++ ABI changes.
2751         * class.c (build_base_field): Set DECL_PACKED.
2752         (layout_class_type): Don't use tail padding of PODs.
2753         * mangle.c (write_unqualified_name): Fix template conversion op
2754         mangling.
2755
2756 2002-06-16  Richard Henderson  <rth@redhat.com>
2757
2758         PR opt/6793
2759         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
2760         after template instantiation.
2761
2762 2002-06-16  Richard Henderson  <rth@redhat.com>
2763
2764         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
2765
2766 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
2767
2768         * cp-tree.h (compiler_error): Remove declaration.
2769         * lex.c (compiler_error): Remove definition.
2770
2771 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
2772
2773         * g++spec.c (LIBUNWIND): New.
2774         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
2775
2776 2002-06-13  Jessica Han  <jessica@cup.hp.com>
2777
2778         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
2779         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
2780         (build_vbase_offset_vtbl_entries): Likewise.
2781         * rtti.c (build_headof): Likewise.
2782         (get_tinfo_decl_dynamic): Likewise.
2783         (create_pseudo_type_info): Likewise.
2784
2785 2002-06-12  Stan Shebs  <shebs@apple.com>
2786
2787         * mpw-config.in: Remove file, no longer used.
2788         * mpw-make.sed: Ditto.
2789
2790 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
2791
2792         * decl2.c: Update call to cpp_handle_option.
2793
2794 2002-06-07  H.J. Lu  (hjl@gnu.org)
2795
2796         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
2797
2798 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
2799
2800         * error.c (cp_error_at): Fix typo.
2801
2802 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
2803
2804         * error.c (cp_diagnostic_starter): Adjust call.
2805         (maybe_print_instantiation_context): Change prototype to take a
2806         'diagnostic_info *'.
2807         (print_instantiation_full_context): Likewise.
2808         (print_instantiation_partial_context): Likewise.
2809         (cp_diagnostic_starter): Likewise.
2810         (cp_diagnostic_finalizer): Likewise.
2811         (cp_print_error_function): Likewise.
2812         (cp_printer): Take a secondary parameter as a 'text_info *'.
2813         Remove output_state savings.  Adjust calls.
2814
2815 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
2816
2817         * pt.c (inline_parm_levels): Mark for GC.
2818
2819         * mangle.c (start_mangling): Allocate G.substitutions here...
2820         (init_mangle): ... rather than here.
2821         (finish_mangling): Clear the varray pointer when done with it.
2822         * spew.c (yylexstring): Don't use VARRAY_FREE.
2823         * search.c (bfs_walk): Don't use VARRAY_FREE.
2824         * decl2.c (pending_statics): Use gengtype to mark.
2825         (deferred_fns): Likewise.
2826         (ssdf_decls): Likewise.
2827         (init_decl2): Delete.
2828         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
2829         (cxx_init_decl_processing): Don't call init_decl2.
2830         (cxx_pop_function_context): Don't use VARRAY_FREE.
2831         * cp-tree.h (struct saved_scope): No need for special marking
2832         of varrays.
2833         (struct language_function): Likewise.
2834         (local_classes): Use gengtype to mark.
2835         (init_decl2): Delete prototype.
2836         * class.c (init_class_processing): Don't use
2837         ggc_add_tree_varray_root.
2838         (build_vtbl_initializer): Don't use VARRAY_FREE.
2839
2840         * decl.c (typename_compare): Don't use same_type_p.
2841
2842         * decl.c: Include hashtab.h instead of hash.h.
2843         (typename_hash): Update to use htab_h.
2844         (typename_compare): Likewise.
2845         (typename_htab): Use gengtype to mark.
2846         (build_typename_type): Update to use htab_h.
2847         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
2848
2849         * Make-lang.in (gt-cp-tree.h): New rule.
2850         (cp/tree.o): Depend on gt-cp-tree.h.
2851         * config-lang.in (gtfiles): Add cp/tree.c.
2852         * tree.c: Include gt-cp-tree.h.
2853         (list_hash_table): Use gengtype to mark.
2854         (init_tree): Use gengtype to mark trees.
2855
2856         * Make-lang.in (cp/decl.o): Add debug.h dependency.
2857         * call.c (struct z_candidate): Use gengtype.
2858         (USER_CONV_CAND): Use WRAPPER_ZC.
2859         (convert_class_to_reference): Use build_zc_wrapper.
2860         (build_type_conversion_1): Likewise.
2861         (build_over_call): Use WRAPPER_ZC.
2862         (add_warning): Use build_zc_wrapper.
2863         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
2864         * cp-tree.h (struct lang_identifier): Use gengtype.
2865         (struct template_parm_index_s): Likewise.
2866         (struct ptrmem_cst): Likewise.
2867         (struct tree_binding): Likewise.
2868         (struct tree_overload): Likewise.
2869         (struct tree_srcloc): Likewise.
2870         (struct tree_wrapper): Likewise.  Also modify to have a pointer
2871         to struct z_candidate rather than void.
2872         (enum cp_tree_node_structure_enum): New.
2873         (union lang_tree_node): New.
2874         (cxx_mark_tree): Delete prototype.
2875         (cp_tree_node_structure): New prototype.
2876         (build_ptr_wrapper): Delete prototype.
2877         (build_int_wrapper): Delete prototype.
2878         (build_zc_wrapper): New prototype.
2879         * decl.c: Include debug.h
2880         (cxx_mark_tree): Delete.
2881         (cp_tree_node_structure): New.
2882         * tree.c (build_ptr_wrapper): Delete.
2883         (build_int_wrapper): Delete.
2884         (build_zc_wrapper): New.
2885
2886         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
2887         Correct typo.  Patch from k_fukui@highway.ne.jp.
2888
2889         * semantics.c (current_stmt_tree): Update for change to
2890         struct language_function.
2891         (finish_mem_initializers): Likewise.
2892         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
2893         * cp-tree.h (struct language_function): Rename from
2894         cp_language_function.  Change all uses.
2895         (cp_function_chain): Don't need to cast.
2896
2897         * class.c (duplicate_tag_error): Reset discriminator.
2898         (check_bases_and_members): Update for data structure changes.
2899         * cp-tree.h (struct lang_id2): Use gengtype.
2900         (flagged_type_tree): Likewise.
2901         (SET_LANG_ID): Use GGC on struct lang_id2.
2902         (struct cp_language_function): Use gengtype.  Remove field
2903         'x_vcalls_possible_p'.
2904         (current_vcalls_possible_p): Delete.
2905         (struct lang_type_header): New.
2906         (struct lang_type_class): Rename from struct lang_type.  Include
2907         struct lang_type_header.
2908         (struct lang_type_ptrmem): New.
2909         (struct lang_type): New.
2910         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
2911         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
2912         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
2913         (struct lang_decl_flags): Use gengtype.  Add discriminators.
2914         (struct lang_decl): Use gengtype.  Add and use discriminators.
2915         Update the macros that reference moved fields.
2916         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
2917         (SET_DECL_THUNK_P): Set discriminator too.
2918         (clear_inline_text_obstack): Delete prototype.
2919         (finish_inline_definitions): Delete prototype.
2920         (mark_pending_inlines): Delete prototype.
2921         (lang_check_failed): New prototype.
2922         * decl.c (struct named_label_use_list): Use gengtype.
2923         (struct named_label_list): Likewise.
2924         (mark_binding_level): Delete.
2925         (mark_named_label_lists): Delete.
2926         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
2927         (cxx_init_decl_processing): Use generated marker routine.
2928         (begin_destructor_body): Delete dead set to
2929         current_vcalls_possible_p.
2930         (mark_lang_function): Delete.
2931         (mark_cp_function_context): Delete.
2932         (lang_mark_tree): Use generated marker routines.
2933         * decl2.c (start_objects): Set discriminator when setting
2934         GLOBAL_INIT_PRIORITY.
2935         * lex.c (retrofit_lang_decl): Set discriminators.
2936         (copy_lang_type): Update for changes to lang_type structure.
2937         (cp_make_lang_type): Set discriminator.
2938         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
2939         * search.c: Include ggc.h.
2940         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
2941         (finish_inline_definitions): Delete.
2942         * spew.c (struct token): Use gengtype.
2943         (struct token_chunk): New.
2944         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
2945         (struct feed): Use gengtype.
2946         (feed_obstack): Delete.
2947         (feed): Mark as GC root.
2948         (pending_inlines): Mark as GC root.
2949         (pending_inlines_tail): Likewise.
2950         (processing_these_inlines): Likewise.
2951         (token_obstack): Make static.
2952         (first_token): Likewise.
2953         (init_spew): Don't initialize deleted things; use gengtype for roots.
2954         (clear_inline_text_obstack): Delete.
2955         (feed_input): Use GC for struct feed.  Update for changes to
2956         struct unparsed_text.
2957         (mark_pending_inlines): Delete.
2958         (next_token): Rename from add_token.  Change all callers.  Update
2959         for changes to struct unparsed_text.
2960         (space_for_token): New.
2961         (remove_last_token): New.
2962         (alloc_unparsed_text): New.
2963         (snarf_block): Take an unparsed_text.  Update for changes to struct
2964         unparsed_text.
2965         (snarf_method): Update for changes to struct unparsed_text.
2966         (snarf_defarg): Update for changes to struct unparsed_text.
2967         * tree.c (lang_check_failed): New.
2968
2969         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
2970         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
2971         (cp/spew.o): Add dependency on gt-<filename>.h.
2972         (cp/decl2.o): Add dependency on gt-<filename>.h.
2973         (cp/call.o): Add dependency on gt-<filename>.h.
2974         (cp/pt.o): Add dependency on gt-<filename>.h.
2975         (cp/repo.o): Add dependency on gt-<filename>.h.
2976         (cp/parse.o): Add dependency on gt-<filename>.h.
2977         * call.c: Use gengtype for roots.
2978         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
2979         decl2.c parse.y pt.c repo.c spew.c.
2980         * cp-tree.h: Use gengtype for roots.
2981         (struct saved_scope): Use GGC, gengtype.
2982         (cp_parse_init): Delete prototype.
2983         (init_pt): Delete prototype.
2984         * decl.c: Use gengtype for roots.
2985         (mark_saved_scope): Delete.
2986         (cxx_init_decl_processing): Don't call deleted initilisation
2987         routines.
2988         (signed_size_zero_node): Delete, unused.
2989         * decl.h: Use gengtype for roots.
2990         * decl2.c: Use gengtype for roots.
2991         * lex.h: Use gengtype for roots.
2992         * parse.y: Use gengtype for roots.
2993         (cp_parse_init): Delete.
2994         * pt.c: Use gengtype for roots.
2995         (init_pt): Delete.
2996         * repo.c: Use gengtype for roots.
2997         * spew.c: Use gengtype for roots.
2998
2999         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
3000         (cp/decl.o): Add dependency on gtype-cp.h.
3001         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
3002         Include gtype-cp.h.  Allow for filename changes.
3003
3004         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
3005         (cp/decl.o): Add cp/gt-decl.h dependency.
3006         * config-lang.in (gtfiles): New.
3007         * tree.h: Rename struct binding_level to struct cp_binding_level.
3008         * decl.c: Rename struct binding_level to struct cp_binding_level.
3009         Include cp/gt-decl.h.
3010         (struct cp_binding_level): Use gengtype.
3011         (make_binding_level): Use GGC on struct cp_binding_level.
3012         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
3013         (cxx_init_decl_processing): Mark free_binding_level as
3014         deletable.
3015
3016         * decl.c (mark_cp_function_context): Update calling sequence.
3017
3018         * decl.c (start_function): Don't free 'struct
3019         cp_language_function'.
3020         (pop_cp_function_context): Likewise.
3021         (save_function_data): Allocate it using GC.
3022         * semantics.c (genrtl_start_function): Don't free 'struct
3023         cp_language_function'.
3024
3025 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
3026
3027         * lang-specs.h: Use cpp_debug_options.
3028
3029 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
3030
3031         * mangle.c, tree.c: Include real.h.
3032         * Make-lang.in: Update dependency lists.
3033
3034 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3035
3036         * lex.c: Don't include c-lex.h.
3037         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
3038
3039 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
3040
3041         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
3042
3043 2002-05-22  Richard Henderson  <rth@redhat.com>
3044
3045         * decl.c (obscure_complex_init): Check for VAR_DECL
3046         before using DECL_THREAD_LOCAL.
3047
3048 2002-05-22  Richard Henderson  <rth@redhat.com>
3049
3050         * decl.c (check_tag_decl): Handle RID_THREAD.
3051         (obscure_complex_init): Reject run-time init of tls.
3052         (grokvardecl, grokdeclarator): Handle RID_THREAD.
3053         * lex.c (reswords): Add __thread.
3054         (rid_to_yy): Map RID_THREAD to SCSPEC.
3055
3056 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
3057
3058         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
3059         * cp-tree.h (cxx_post_options): Kill.
3060         * cp-lex.c (cxx_post_options): Kill.
3061
3062 2002-05-21  Richard Henderson  <rth@redhat.com>
3063
3064         * lex.c (rid_to_yy): Add RID_THREAD.
3065
3066 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
3067
3068         * init.c (build_vec_init): Test for trivial copy-assignment when
3069         copy-assigning arrays.
3070
3071 2002-05-20  Andreas Jaeger  <aj@suse.de>
3072
3073         * init.c (build_default_init): Remove unused variable.
3074
3075 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
3076
3077         * call.c (any_strictly_viable): New.
3078         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
3079
3080 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3081
3082         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
3083
3084 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3085
3086         PR c++/186, DR 259
3087         * pt.c (do_decl_instantiation): Don't complain explicit
3088         instantiation after explicit specialization.
3089         (do_type_instantiation): Likewise.
3090
3091 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
3092
3093         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
3094         renamed from...
3095         (complete_type_or_else): ... this.  Redefined as macro.
3096         (cxx_incomplete_type_diagnostic): Declare.
3097         (cxx_incomplete_type_error): Define as macro.
3098         * init.c (build_delete): Warn about incomplete types other than
3099         void, and use the built-in operator delete for them.
3100         * typeck.c (complete_type_or_diagnostic): Renamed from
3101         complete_type_or_else.  Added warn_only argument, passed to...
3102         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
3103         warnings or errors depending on new warn_only argument.  Renamed
3104         from...
3105         (cxx_incomplete_type_error): ... this.  New implementation in
3106         terms of cxx_incomplete_type_diagnostic.
3107
3108 2002-05-18  Jason Merrill  <jason@redhat.com>
3109
3110         PR c++/6611
3111         * decl2.c (import_export_decl): If we clear
3112         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
3113
3114 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3115
3116         PR c++/6620
3117         * pt.c (verify_class_unification): Don't check if PARM is template
3118         parameter dependent.  Simplify.
3119         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
3120         parameter dependent expression.
3121
3122 2002-05-14  Jason Merrill  <jason@redhat.com>
3123
3124         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
3125         Do set DECL_COMDAT.
3126         (synthesize_tinfo_var): Take the public decl.
3127         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
3128         (emit_tinfo_decl): Adjust.  Call import_export_decl.
3129         * decl2.c (import_export_decl): Simplify tinfo decl handling.
3130
3131 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
3132
3133         * cp-tree.h (struct lang_type): Added non_zero_init.
3134         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
3135         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
3136         * class.c (check_field_decls): Test non_zero_init.
3137         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
3138         zero-to-NULL conversions.
3139         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
3140         type that needs zero-initialization without zeros.
3141         (check_initializer_decl): Compute zero-initializer for types
3142         that require a non-trivial one.
3143         * init.c (build_forced_zero_init): New function.
3144         (build_default_init): Use it.
3145         * tree.c (zero_init_p): New function.
3146         * typeck2.c (force_store_init_value): New function.
3147         (process_init_constructor): Create non-trivial zero-initializers
3148         for array members and class fields.
3149
3150 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
3151
3152         * lang-specs.h: Remove redundant -lang-c++.
3153
3154 2002-05-13  Jason Merrill  <jason@redhat.com>
3155
3156         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
3157         (fixed_type_or_null): See through reference vars.
3158         (build_base_path): Vtable contents are constant.
3159         * typeck.c (get_member_function_from_ptrfunc): Likewise.
3160
3161 2002-05-12  Jason Merrill  <jason@redhat.com>
3162
3163         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
3164         structs are safe.
3165
3166 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
3167
3168         * cp-tree.h (flag_ansi): Remove.
3169         * decl2.c (flag_ansi): Remove.
3170         (cxx_decode_option): Set flag_iso and flag_undef.
3171
3172 2002-05-09  Jason Merrill  <jason@redhat.com>
3173
3174         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
3175         Use subtraction rather than a bitmask to get the index.
3176         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
3177
3178         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
3179
3180 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
3181
3182         * Make-lang.in (decl2.o): Update.
3183         * cp-tree.h (warn_multichar): Remove.
3184         * decl2.c: Include c-common.h.
3185         (warn_multichar): Remove.
3186
3187 2002-05-03  Jason Merrill  <jason@redhat.com>
3188
3189         * tree.c (build_cplus_array_type): Only const and volatile get
3190         special handling.
3191
3192         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
3193
3194 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
3195
3196         ABI change, returning simple classes from functions.
3197         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
3198         TYPE_HAS_TRIVIAL_INIT_REF is false or
3199         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
3200
3201 2002-04-30  Jason Merrill  <jason@redhat.com>
3202
3203         PR debug/6436
3204         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
3205         anonymous class with a typedef if there are attributes.
3206
3207 2002-04-29  Paul Eggert  <eggert@twinsun.com>
3208
3209         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
3210
3211 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
3212
3213         PR c++/6477
3214         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
3215         non-NULL first.
3216
3217 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
3218
3219         PR c++/6492
3220         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
3221         enter that scope before name lookup.
3222
3223         PR c++/6486
3224         * method.c (do_build_copy_constructor): Avoid building
3225         cv-qualified reference types.
3226
3227 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
3228
3229         PR c++/5719
3230         * decl.c (grok_op_properties): Assignment ops don't have to return
3231         by value. operator% should.
3232
3233 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
3234
3235         PR c/6343
3236         * decl.c (duplicate_decls): Call merge_weak.
3237
3238 2002-04-26  Richard Henderson  <rth@redhat.com>
3239
3240         * parse.y (malloced_yyss, malloced_yyvs): New.
3241         (yyoverflow): Re-add.  Set them.
3242         (free_parser_stacks): New.
3243
3244 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
3245
3246         PR c++/6497
3247         * method.c (do_build_assign_ref): Pass a derivation to
3248         build_method_call when calling base class assignment operators.
3249
3250 2002-04-26  Richard Henderson  <rth@redhat.com>
3251
3252         * parse.y (yyoverflow): Revert.
3253
3254 2002-04-26  Richard Henderson  <rth@redhat.com>
3255
3256         PR c/3581
3257         * parse.y (string): Remove.  Update all uses to use STRING
3258         instead, and not call combine_strings.
3259         * rtti.c (tinfo_name): Use fix_string_type.
3260         * semantics.c (finish_asm_stmt): Don't call combine_strings.
3261         * spew.c (yylexstring): New.
3262         (read_token): Use it.
3263
3264 2002-04-25  Richard Henderson  <rth@redhat.com>
3265
3266         PR c/2161
3267         * parse.y (yyoverflow): New.
3268
3269 2002-04-25  Jason Merrill  <jason@redhat.com>
3270
3271         PR c++/5607
3272         * search.c (check_final_overrider): No longer static.
3273         * class.c (update_vtable_entry_for_fn): Call it.
3274         * cp-tree.h: Adjust.
3275
3276 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3277
3278         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
3279         * cp-tree.h (cxx_set_yydebug): Die.
3280         * lex.c (YYDEBUG): Get from c-lex.h.
3281         (cxx_set_yydebug): Remove.
3282         * parse.y: Include c-lex.h.
3283         (YYDEBUG): Get from c-lex.h.
3284
3285 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
3286
3287         PR c++/6438.
3288         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
3289         void.
3290
3291 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
3292
3293         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
3294         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
3295         Redefine.
3296         * cp-tree.h (cp_attribute_table): Rename.
3297         * decl.c (lang_attribute_table): Remove declaration.
3298         (cxx_init_decl_processing): Don't set it.
3299         * tree.c (cp_attribute_table): Rename.
3300
3301 2002-04-24  Jason Merrill  <jason@redhat.com>
3302
3303         PR c++/6331
3304         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
3305         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
3306         The pedwarn for array assignment is now unconditional.
3307         * tree.c (build_cplus_array_type_1): Still process simple array types
3308         normally in templates.
3309
3310         PR c++/6395
3311         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
3312         stuff for comdats.
3313
3314 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
3315
3316         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
3317         node with attributes.
3318
3319 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
3320
3321         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
3322         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
3323
3324 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
3325
3326         PR c++/6256:
3327         * pt.c (tsubst_friend_class): Handle templates with explicit
3328         nested names.
3329
3330         PR c++/6331:
3331         * typeck.c (merge_types): Remember the cv-qualification of pointer
3332         types when merging them.
3333
3334 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3335
3336         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
3337         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
3338         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
3339         cxx_mark_function_context): New.
3340         * decl.c (push_cp_function_context, pop_cp_function_context,
3341         mark_cp_function_context): Rename for consistency.
3342         (cxx_init_decl_processing): Don't set old hooks.
3343
3344 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
3345
3346         * call.c (convert_type_from_ellipsis): Rename, update.
3347         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
3348         * cp-tree.h (convert_type_from_ellipsis): Rename.
3349         * decl.c (cxx_init_decl_processing): Don't set hook.
3350
3351 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
3352
3353         * call.c (build_new_method_call): Update.
3354         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
3355         * cp-tree.h (cxx_incomplete_type_error): New.
3356         * decl.c (grokdeclarator, grokparms): Update.
3357         * decl2.c (check_classfn): Update.
3358         * pt.c (tsubst): Update.
3359         * typeck.c (complete_type_or_else, expr_sizeof,
3360         decay_conversion): Update.
3361         * typeck2.c (incomplete_type_error): Rename.
3362         (add_exception_specifier): Update.
3363
3364 2002-04-18  Jason Merrill  <jason@redhat.com>
3365
3366         PR c++/5658
3367         * search.c (setup_class_bindings): A class template qualifies as a
3368         type binding.
3369
3370 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
3371
3372         PR c++/6316
3373         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
3374         before expanding.
3375
3376 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
3377
3378         * init.c (begin_init_stmts): Remove commented out code.
3379         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
3380         * semantics.c (begin_gobal_stmt_expr): Adjust call to
3381         expand_start_stmt_expr.
3382
3383 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
3384
3385         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
3386         dso_handle itself, to __cxa_atexit.
3387
3388 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3389
3390         * error.c (cxx_print_error_function): Adjust call to macros.
3391
3392 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
3393
3394         * class.c (layout_virtual_bases): Do all dsize computation on trees.
3395
3396 2002-04-14  Jason Merrill  <jason@redhat.com>
3397
3398         * typeck.c (get_member_function_from_ptrfunc): Don't do
3399         gratuitious division and multiplication on
3400         ptrmemfunc_vbit_in_delta targets.
3401
3402 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
3403
3404         PR c++/5373.
3405         * semantics.c (finish_expr_stmt): Remember the type of the
3406         expression before any conversions are performed.
3407
3408 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
3409
3410         PR c++/5189.
3411         * call.c (add_template_candidate_real): Do not treat member
3412         templates as copy constructors.
3413
3414 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
3415
3416         * decl.c (duplicate_decls): Do not copy the RTL for a variable
3417         declaration if the old variable had an incomplete type and the new
3418         variable does not.
3419         (complete_vars): Do not call layout_decl for completed variables.
3420
3421 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
3422
3423         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
3424         with an explicit one.
3425         (follow_tag_typedef): New.
3426         (lookup_tag): Use it to extract the tag of an explicit typedef.
3427         (xref_tag): Likewise.
3428
3429 2002-04-11  Andrew Haley  <aph@redhat.com>
3430
3431         * typeck.c (type_after_usual_arithmetic_conversions):
3432         If two types have the same variant, return immediately.
3433         When two floating-point operands are the same precision:
3434           convert to float if one of the operands is float;
3435           if neither operand is one of the standard types, return the type
3436           of the first operand.
3437
3438 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
3439
3440         PR c++/5507
3441         * decl.c (make_typename_type): Remove implicit typenameness.
3442
3443 2002-04-09  Jason Merrill  <jason@redhat.com>
3444
3445         PR optimization/6189
3446         * semantics.c (genrtl_start_function): Don't free
3447         DECL_SAVED_FUNCTION_DATA for inline functions.
3448
3449         * init.c (build_member_call): For now, don't convert to
3450         intermediate base if it would cause an error.
3451
3452 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
3453
3454         * parse.y (namespace_qualifier, maybe_identifier,
3455         begin_explicit_instantiation, end_explicit_instantiation,
3456         apparent_template_type, .finish_template_type,
3457         do_id, maybe_init, defarg_again, component_decl_1):
3458         Add ending ';', in accordance with POSIX.
3459
3460 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
3461
3462         PR c++/5571
3463         * class.c (layout_class_type): Remember incomplete static
3464         variables.
3465         (finish_struct_1): Call complete_vars, not
3466         hack_incomplete_structures.
3467         * cp-tree.h (hack_incomplete_structures): Rename to ...
3468         (complete_vars): ... this.
3469         (struct saved_scope): Remove incomplete.
3470         (namespace_scope_incomplete): Remove.
3471         * decl.c (struct binding_level): Remove incomplete.
3472         (incomplete_vars): New variable.
3473         (mark_binding_level): Don't mark incomplete.
3474         (print_binding_level): Don't print it.
3475         (mark_saved_scope): Don't mark incomplete.
3476         (pushdecl): Use maybe_register_incopmlete_var.
3477         (cxx_init_decl_processing): Register incomplete_vars for GC.
3478         (start_decl_1): Clarify error message.
3479         (hack_incomplete_vars): Remove.
3480         (maybe_register_incomplete_var): New function.
3481         (complete_vars): Likewise.
3482
3483 2002-04-06  Jason Merrill  <jason@redhat.com>
3484
3485         PR c++/4934
3486         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
3487         set before checking it.
3488
3489         PR c++/525
3490         * init.c (build_member_call): Use build_scoped_ref.
3491         (resolve_offset_ref): Likewise.
3492         * call.c (build_scoped_method_call): Likewise.
3493         * tree.c (maybe_dummy_object): Kludge around current_class_type being
3494         wrong.
3495         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
3496         * cp-tree.h: Adjust.
3497
3498         * init.c (push_base_cleanups): Just use build_scoped_method_call.
3499
3500         PR c++/6179
3501         * method.c (implicitly_declare_fn): Pass unqualified type to
3502         synthesize_exception_spec.
3503
3504 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
3505
3506         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
3507         * cvt.c: Update comment.
3508         * init.c (expand_cleanup_for_base): Update.
3509         * semantics.c (finish_parenthesized_expr): Update.
3510         * typeck.c (cp_truthvalue_conversion): Update.
3511
3512 2002-04-04  Jason Merrill  <jason@redhat.com>
3513
3514         * semantics.c (finish_eh_cleanup): New fn.
3515         * cp-tree.h: Add prototype.
3516         * init.c (perform_member_init, expand_cleanup_for_base): Use
3517         finish_eh_cleanup.
3518         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
3519         * cp-tree.h: Remove references.
3520         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
3521         * dump.c (cp_dump_tree): Likewise.
3522         * pt.c (tsubst_expr): Likewise.
3523         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
3524         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
3525         * tree.c (cp_statement_code_p): Likewise.
3526
3527         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
3528
3529         PR c++/5636
3530         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
3531         cleanup for nrv.
3532
3533         PR c++/5104
3534         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
3535         specifiers.
3536         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
3537
3538 2002-04-03  Richard Henderson  <rth@redhat.com>
3539
3540         * cp-lang.c (cxx_warn_unused_global_decl): New.
3541         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
3542
3543 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
3544
3545         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
3546         * tree.c (init_tree): Don't set hook.
3547
3548 2002-04-03  Roger Sayle  <roger@eyesopen.com>
3549
3550         PR c++/5998:
3551         * decl.c (duplicate_decls): Don't mess with assembler names when
3552         redeclaring builtin functions as static.
3553
3554 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3555
3556         * call.c (build_addr_func): Update.
3557         * class.c (resolve_address_of_overloaded_function): Update.
3558         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
3559         * cp-tree.h (cxx_mark_addressable): New.
3560         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
3561         * decl2.c (build_cleanup): Update.
3562         * except.c (build_throw): Update.
3563         * init.c (resolve_offset_ref): Update.
3564         * pt.c (convert_nontype_argument): Update.
3565         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
3566         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
3567         unary_complex_lvalue): Update.
3568         (mark_addressable): Rename.
3569
3570 2002-04-01  Roger Sayle  <roger@eyesopen.com>
3571
3572         PR c++/5998:
3573         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
3574         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
3575         but follow the SET_DECL_RTL idiom used elsewhere in the function.
3576
3577 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3578
3579         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3580         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
3581         * decl.c (grokdeclarator): Update.
3582         * mangle.c (write_integer_cst): Update.
3583         * typeck.c (build_binary_op): Update.
3584
3585 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
3586
3587         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
3588         * lex.c (cxx_init): Don't set hook.
3589
3590 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
3591
3592         * Make-lang.in (error.o): Update.
3593         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
3594         * cp-tree.h (struct diagnostic_context): Predeclare.
3595         (cxx_print_error_function): New.
3596         * error.c: Include langhooks-def.h.
3597         (lang_print_error_function): Rename.  Update.
3598         (init_error): Don't set hook.
3599
3600 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
3601
3602         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
3603         Redefine.
3604         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
3605         * decl.c (finish_enum): Similarly.
3606         * error.c (dump_type): Similarly.
3607         * lex.c (cxx_init): Similarly.
3608         * mangle.c (write_builtin_type): Similarly.
3609         * typeck.c (comptypes): Similarly.
3610
3611 2002-03-28  Roger Sayle  <roger@eyesopen.com>
3612
3613         PR c++/5998:
3614         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
3615         in the g++ front-end.
3616         (duplicate_decl): Allow redefinition of anticipated built-ins.
3617         Fix inlining problem by over-writing the old DECL_RTL.
3618         (lookup_namespace_name): Fail to find an identifier in the
3619         specified namespace if its still anticipated.
3620         (builtin_function_1): New function split out from builtin_function
3621         to create a builtin in the current namespace with given context.
3622         (builtin_function): Call builtin_function_1 to define the
3623         appropriate builtins in both the std and global namespaces.
3624         (select_decl): Don't test for anticipated decls here.
3625         (unqualified_namespace_lookup): Instead ignore them whilst
3626         searching through scopes and namespaces.
3627         * decl2.c (do_nonmember_using_decl): If a using declaration
3628         specifies an anticipated built-in function, mark it as no longer
3629         anticipated in that scope.
3630         (ambiguous_decl):  Avoid resolving to an anticipated decl.
3631         * lex.c (do_scoped_id): Fail to find an identifier in the global
3632         namespace if its still anticipated.
3633
3634 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
3635
3636         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
3637         * cp-tree.h (cp_make_lang_type): Rename.
3638         * lex.c (cp_make_lang_type): Rename.
3639         (make_aggr_type): Update.
3640         * tree.c (init_tree): Don't set make_lang_type_fn.
3641
3642 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
3643
3644         PR c++/6073
3645         * class.c (finish_struct_1): Update static field's DECL_MODE even
3646         if its type is a variant of t.
3647
3648 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
3649
3650         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
3651         * cp-tree.h (cxx_insert_default_attributes): New.
3652         * decl.c (insert_default_attributes): Rename.
3653
3654 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
3655
3656         PR c++/4884
3657         * call.c (build_op_delete_call): Allow for the fact the placement
3658         may be a COMPOUND_EXPR.
3659
3660 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
3661
3662         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
3663         * cp-tree.h (init_cplus_expand): Remove.
3664         (cxx_expand_expr): New.
3665         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
3666         fix prototype.
3667         (init_cplus_expand): Remove.
3668         * lex.c (cxx_init): Don't call init_cplus_expand.
3669
3670 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
3671
3672         PR c++/4884.
3673         * init.c (build_new_1): Allow for the fact the result of
3674         build_function_call may be a COMPOUND_EXPR.
3675
3676 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
3677
3678         PR c++/5682
3679         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
3680         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
3681         (dfs_skip_nonprimary_vbases_markedp): Remove.
3682         * search.c (get_shared_vbase_if_not_primary): Remove.
3683         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
3684         (dfs_skip_nonprimary_vbases_markedp): Remove.
3685         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
3686         (dfs_marked_real_bases_queue_p): Likewise.
3687
3688 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
3689
3690         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
3691         * cp-tree.h (cxx_mark_tree): New.
3692         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
3693
3694 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3695
3696         * cp-tree.h (cxx_maybe_build_cleanup): New.
3697         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
3698         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
3699         * tree.c (build_target_expr): Update.
3700         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
3701
3702 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
3703
3704         * decl2.c (cxx_decode_option): Handle -E.
3705         * lang-specs.h (default_compilers): Preprocess with cc1plus.
3706         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
3707
3708 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
3709
3710         PR c++/6037
3711         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
3712
3713 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3714
3715         * error.c (dump_type): Be careful about implicit typenames.
3716
3717 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3718
3719         PR C++/3656
3720         * semantics.c (finish_base_specifier): Handle erronous base
3721         classes.
3722
3723 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
3724
3725         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
3726         REAL_IS_NOT_DOUBLE.
3727
3728 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
3729
3730         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
3731         an index into the vtable_entry array regardless of
3732         TARGET_PTRMEMFUNC_VBIT_LOCATION.
3733
3734 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
3735
3736         * tree.c (cp_cannot_inline_tree_fn): Same.
3737
3738 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
3739
3740         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
3741         insert_block, getdecls, global_bindings_p): New.
3742
3743 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
3744
3745         PR c++/4361
3746         * mangle.c (struct globals) Add internal_mangling_p member.
3747         (write_template_param): Do internal mangling, if needed.
3748         (mangle_conv_op_name_for_type): Request internal mangling.
3749
3750 2002-03-20  Jason Merrill  <jason@redhat.com>
3751
3752         PR c++/2136
3753         * init.c (build_delete): Check access for a member op delete here.
3754         * decl2.c (delete_sanity): Not here.
3755
3756 2002-03-19  Jason Merrill  <jason@redhat.com>
3757
3758         PR c++/5118
3759         * class.c (get_vfield_name): Use the constructor_name.
3760
3761 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3762
3763         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
3764         * cp-tree.h (lang_printable_name): Rename.
3765         * error.c (lang_decl_name): Use new hook.
3766         * lex.c (cxx_init): Remove old hook.
3767         * pt.c (tsubst_decl): Use new hook.
3768         * tree.c (lang_printable_name): Rename.
3769
3770 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
3771
3772         PR c++/3882
3773         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
3774         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
3775         only after recording the declaration.
3776
3777 2002-03-18  Jason Merrill  <jason@redhat.com>
3778
3779         PR c++/2039
3780         * init.c (resolve_offset_ref): Hand off to build_component_ref.
3781
3782         PR c++/4222, c++/5995
3783         * call.c (build_over_call): Fix empty class logic.
3784
3785         PR c++/3870
3786         * cp-tree.h (struct saved_scope): Add last_parms field.
3787         * decl.c (maybe_push_to_top_level): Save last_function_parms.
3788         (pop_from_top_level): Restore it.
3789
3790         PR c++/4377
3791         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
3792         NON_LVALUE_EXPRs.
3793
3794         PR c++/4003
3795         * pt.c (tsubst_friend_function): Use decl_namespace_context.
3796
3797         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
3798         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
3799         type with a nontrivial destructor.
3800
3801 2002-03-17  Jason Merrill  <jason@redhat.com>
3802
3803         PR c++/4460
3804         * class.c (build_base_path): Virtual base layout is fixed in
3805         in-charge [cd]tors.
3806
3807 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
3808
3809         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
3810         * parse.y (yyparse): Remove macro.
3811
3812 2002-03-17  Jason Merrill  <jason@redhat.com>
3813
3814         PR c++/5757
3815         * init.c (build_new_1): Pass the right pointer to op delete.
3816
3817 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
3818
3819         PR c++/4361
3820         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
3821         conversion operators go.
3822         (struct lang_decl_flags): Add template_conv_p and unused
3823         bitfields.
3824         (DECL_TEMPLATE_CONV_FN_P): New macro.
3825         * call.c (build_user_type_conversion_1): Don't check second type
3826         conversion of overload set first.
3827         * class.c (add_method): Make sure templated conversion operators
3828         all end up on slot 2.
3829         * lex.c (do_identifier): A conversion operator token might be
3830         satisfied by a templated conversion operator.
3831         * pt.c (check_explicit_specialization): Use
3832         CLASSTYPE_FIRST_CONVERSION_SLOT.
3833         (template_parm_this_level_p): New function.
3834         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
3835         * search.c (lookup_fnfields_1): Template conversions will be on
3836         the first slot.
3837         * typeck.c (build_component_ref): Preserve the type of an
3838         conversion operator name on the overload type.
3839         (build_x_function_call): Retrieve the conversion operator name.
3840
3841 2002-03-15  Richard Henderson  <rth@redhat.com>
3842
3843         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
3844
3845 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
3846
3847         * cp-tree.h (CLEANUP_DECL): Remove.
3848         (CLEANUP_EXPR): Likewise.
3849         * decl.c (destroy_local_var): Simplify.
3850         (maybe_build_cleanup): Tidy.
3851         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
3852         * semantics.c (cp_expand_stmt): Likewise.
3853         * cp/tree.c (cp_statement_code_p): Likewise.
3854
3855 2002-03-15  Jason Merrill  <jason@redhat.com>
3856
3857         PR c++/5857
3858         * decl.c (duplicate_decls): Use merge_types instead of common_type.
3859         * typeck.c (common_type): Just hand off to
3860         type_after_usual_arithmetic_conversions and
3861         composite_pointer_type.
3862         (merge_types): New fn.
3863         (commonparms): Use it instead of common_type.
3864         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
3865         (composite_pointer_type): Also handle attributes.
3866         * cp-tree.h: Declare merge_types.
3867
3868         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
3869         variables.
3870         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
3871
3872 2002-03-14  Richard Henderson  <rth@redhat.com>
3873
3874         * decl.c: Include c-pragma.h.
3875         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
3876         * Make-lang.in: Update dependencies.
3877
3878 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
3879
3880         PR c++/5908
3881         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
3882         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
3883
3884 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
3885
3886         * mangle.c (write_builtin_type): Handle 128-bit integers even if
3887         they are not a standard integer type.
3888
3889 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
3890
3891         * cp-tree.h (init_init_processing): Remove declaration.
3892         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
3893         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
3894
3895 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3896
3897         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
3898         Define.
3899         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
3900         tree_code_length.
3901         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
3902         cplus_tree_code_name): Delete.
3903         (cxx_init): Don't call add_c_tree_codes, instead set
3904         lang_unsafe_for_reeval.  Don't try to copy into the various
3905         tree_code arrays.
3906
3907 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
3908
3909         PR c++/5659
3910         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
3911         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
3912         definitions.
3913
3914 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
3915
3916         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
3917         DR209 is now not a defect.
3918         * cp-tree.h (skip_type_access_control): Remove.
3919         * decl.c (grokdeclarator): Do type access control for friend
3920         declarations.
3921         * semantics.c (decl_type_access_control): Don't reset
3922         current_type_lookups.
3923         (save_type_access_control): Always save the lookups.
3924         (skip_type_access_control): Remove.
3925         (finish_class_definition): Don't change type_lookups.
3926
3927 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
3928
3929         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
3930         It is incorrect.
3931         * typeck.c (build_static_cast): Compare non-qualified types
3932         with pointer to member conversions.
3933
3934 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
3935             Daniel Berlin  <dan@dberlin.org>
3936
3937         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
3938         (cxx_get_alias_set): Use it.
3939
3940 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3941
3942         * cp-tree.h (stabilize_expr): Prototype.
3943
3944 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
3945
3946         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
3947         conditional return void.
3948
3949 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
3950
3951         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
3952         * cp-tree.h (cxx_unsave): New.
3953         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
3954         (init_tree): Update.
3955
3956 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3957
3958         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
3959         explicit sizeof/sizeof.
3960         * decl2.c (cxx_decode_option): Likewise.
3961         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
3962
3963 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
3964
3965         PR c++/775
3966         * decl.c (lookup_tag): Only reject enum/class mismatch, not
3967         class/union mismatch.
3968         * parse.y (check_class_key): New function.
3969         (structsp): Call it.
3970
3971 2002-03-01  Michael Matz  <matz@suse.de>
3972
3973         * typeck.c (cp_pointer_int_sum): Complete inner type which is
3974         used later by size_in_bytes().
3975
3976 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
3977
3978         * cp-tree.h:  Require __GNUC__ to be #defined.
3979         (build_init):  Add missing prototype.
3980
3981 2002-03-01  Jason Merrill  <jason@redhat.com>
3982
3983         * except.c: Don't include decl.h or obstack.h.  Do include
3984         tree-inline.h.
3985         (build_throw): Destroy temporaries from the thrown
3986         expression before calling __cxa_throw.  Construct a thrown
3987         temporary directly into the exception object.
3988         (stabilize_throw_expr): New function.
3989         (wrap_cleanups_r): New function.
3990         * tree.c (stabilize_expr): New function.
3991         * init.c (build_init): New function.
3992         * Make-lang.in (cp/except.o): Adjust .h deps.
3993
3994 2002-02-28  Jason Merrill  <jason@redhat.com>
3995
3996         * search.c (lookup_base_r): Don't clear is_non_public just because
3997         we found a friendly scope.
3998
3999         * decl.c (finish_function): Only warn about missing return
4000         statement with -Wreturn-type.
4001
4002 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
4003
4004         * class.c (build_clone): Update.
4005         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
4006         * cp-tree.h (cxx_dup_lang_specific_decl): New.
4007         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
4008         (copy_decl): Update.
4009         * method.c (make_thunk): Update.
4010
4011 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
4012
4013         * decl2.c: Delete traditional-mode-related code copied from
4014         the C front end but not used, or used only to permit the
4015         compiler to link.
4016
4017 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
4018
4019         PR c++/4093
4020         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
4021         to void.
4022
4023 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
4024
4025         PR other/5746
4026         * semantics.c (finish_switch_cond): Don't call get_unwidened
4027         if error_mark_node.
4028
4029 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
4030
4031         PR c++/2645, DR 295
4032         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
4033         tf_keep_type_decl.
4034         (make_typename_type): Use tsubst_flags_t.
4035         * decl.c (make_typename_type): Adjust. Return non-artificial
4036         TYPE_DECLs, if required.
4037         (grokdeclarator): Simplify CVR qualification handling. Allow bad
4038         qualifiers on typedef types.
4039         * decl2.c (handle_class_head): Adjust make_typename_type call.
4040         * parse.y (nested_name_specifier): Likewise.
4041         (typename_sub0): Likewise.
4042         (typename_sub1): Likewise.
4043         * pt.c (convert_template_argument): Adjust make_typename_type
4044         return value.
4045         (tsubst): Adjust cp_build_qualified_type_real calls.
4046         (check_cv_quals_for_unify): Cope with allowing bad qualifications
4047         on template type parms.
4048         (instantiate_decl): Recheck substitutions to give warnings on bad
4049         qualifications.
4050         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
4051
4052 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
4053
4054         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
4055
4056         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
4057         unless DECL_ALWAYS_INLINE.
4058
4059 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
4060
4061         * typeck.c (cp_pointer_int_sum): Renamed from
4062         pointer_int_sum, call pointer_int_sum.
4063
4064 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
4065
4066         * decl.c (duplicate_decls): Return 0 if issued error about
4067         redeclaration.
4068
4069 2002-02-19  Jason Merrill  <jason@redhat.com>
4070
4071         ABI change: Mangle `void (A::*)() const' as
4072         M1AKFvvE, not MK1AFvvE.
4073         * mangle.c (write_function_type): Write cv-quals for member
4074         function type here.
4075         (write_pointer_to_member_type): Not here.
4076
4077 2002-02-18  Jason Merrill  <jason@redhat.com>
4078
4079         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
4080         (do_decl_instantiation): Likewise.
4081
4082 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4083
4084         PR c++/5685
4085         * decl.c (duplicate_decls): Make warning unconditional
4086         if duplicate default argument declarations are present.
4087
4088 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
4089
4090         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
4091         shortening.
4092
4093 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
4094
4095         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
4096         remove incorrect comment. Move #if 0'd code to common path. Use
4097         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
4098
4099 2002-02-13  Jason Merrill  <jason@redhat.com>
4100
4101         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
4102         (finish_function): Don't warn if current_function_returns_null.
4103
4104         * typeck2.c (digest_init): Do handle values of vector type.
4105
4106         * typeck2.c (digest_init, process_init_constructor): Treat vectors
4107         like arrays.
4108
4109 2002-02-11  Jason Merrill  <jason@redhat.com>
4110
4111         * parse.y (reserved_declspecs): Don't handle attributes.
4112         (reserved_typespecquals): Handle them here.
4113         * Make-lang.in (parse.c): Adjust expected conflicts.
4114
4115 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
4116
4117         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
4118         instead of compstmt.
4119         (compstmt_or_stmtexpr): Renamed from compstmt.
4120         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
4121
4122 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
4123
4124         Rename instantiate_type_flags to tsubst_flags_t & expand use.
4125         * cp-tree.h (instantiate_type_flags): Rename to ...
4126         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
4127         add tf_warning flag.
4128         (instantiate_type): Adjust prototype.
4129         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
4130         do_type_instantiation, cp_build_qualified_type_real): Likewise.
4131         cp_build_qualified_type: Adjust.
4132         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
4133         tf_*.
4134         * call.c (standard_conversion): Rename itf_* to tf_*.
4135         (reference_binding): Likewise.
4136         (convert_like_real): Likewise.
4137         * cvt.c (cp_convert_to_pointer): Likewise.
4138         (convert_to_reference): Likewise.
4139         * decl.c (lookup_namespace_name): Use tf_* flags.
4140         (make_typename_type): Likewise.
4141         (grokdeclarator): Likewise.
4142         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
4143         (coerce_template_template_parms, convert_template_argument,
4144         coerce_template_parms, maybe_get_template_decl_from_type_decl,
4145         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
4146         instantiate_class_template, tsubst_template_arg_vector,
4147         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
4148         tsubst_decl, tsubst_arg_types, tsubst_function_type,
4149         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
4150         instantiate_template, fn_type_unification,
4151         resolve_overloaded_unification, verify_class_unification,
4152         unify, get_bindings_real, do_type_instantiation,
4153         regenerate_decl_from_template, instantiate_decl,
4154         tsubst_initializer_list, tsubst_enum,
4155         get_mostly_instantiated_function_type,
4156         invalid_nontype_parm_type_p): Likewise.
4157         * tree.c (cp_build_qualified_type_real): Likewise.
4158         * typeck.c (build_binary_op): Rename itf_* to tf_*.
4159         (build_ptrmemfunc): Likewise.
4160         (convert_for_assignment): Likewise.
4161
4162 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
4163
4164         PR c++/109
4165         * decl.c (grokdeclarator): Allow friend declarations from
4166         dependent types.
4167         * decl2.c (handle_class_head): Don't push into template parm contexts.
4168         * pt.c (push_template_decl_real): Template parm contexts are never
4169         being defined.
4170
4171 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
4172
4173         * class.c: Include target.h.
4174         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
4175         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
4176         bit-field layout.
4177         * Make-lang.in: Adjust deps.
4178
4179 2002-02-05  Jason Merrill  <jason@redhat.com>
4180
4181         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
4182
4183 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
4184
4185         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
4186         (finish_switch_cond): Set SWITCH_TYPE.
4187
4188 2002-02-04  Richard Henderson  <rth@redhat.com>
4189
4190         * method.c (use_thunk): Always initialize the block tree.  Reindent.
4191         * semantics.c (expand_body): Emit thunks after function, not before.
4192
4193 2002-02-04  Jason Merrill  <jason@redhat.com>
4194
4195         * decl.c (start_function): Call cplus_decl_attributes immediately
4196         after grokdeclarator.
4197
4198         * decl.c (start_function): Combine DECL_RESULT handling code.
4199
4200 2002-02-03  Jason Merrill  <jason@redhat.com>
4201
4202         * xref.c: Remove.
4203         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
4204         (cp/xref.o): Remove dependencies.
4205         * class.c (finish_struct_1, check_methods): Don't call xref fns.
4206         (finish_struct_1): Likewise.
4207         * friend.c (make_friend_class): Likewise.
4208         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
4209         * spew.c (read_process_identifier): Likewise.
4210
4211 2002-02-01  Jason Merrill  <jason@redhat.com>
4212
4213         PR c++/4872
4214         * decl.c (finish_function): Warn about a non-void function with
4215         no return statement and no abnormal exit.
4216         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
4217         (current_function_returns_abnormally): New macro.
4218         * call.c (build_call): Set it.
4219
4220         * typeck.c (build_component_ref): Always complain about offsetof
4221         constructs on non-PODs.  Only make it an error for members of
4222         virtual bases.
4223
4224         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
4225         (dump_function_decl): Always dump parms.
4226
4227         * decl2.c (finish_static_data_member_decl): Complain about a local
4228         class with a static data member.
4229
4230         PR c++/4286
4231         * search.c (lookup_field_1): Don't xref a static data member
4232         just because we looked it up.
4233
4234 2002-01-31  Jason Merrill  <jason@redhat.com>
4235
4236         * Make-lang.in (parse.c): Handle .output file.
4237
4238         PR c++/3395
4239         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
4240         not TREE_TYPE.
4241         * semantics.c (finish_class_definition): Adjust.
4242
4243         Allow attributes in parms and casts.
4244         * parse.y (named_parm): Don't strip attrs.
4245         (declmods): Remove 'attributes' production.
4246         (nonempty_cv_qualifiers): Accept attributes.
4247         (ATTRIBUTE): Give precedence.
4248         * decl.c (groktypename): Handle attributes.
4249         (grokparms): Likewise.
4250
4251 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
4252
4253         * decl2.c (cxx_decode_option): Pass 0 as last argument to
4254         cpp_handle_option.
4255         * lang-specs.h: Use cpp_unique_options instead of cpp_options
4256         when used together with cc1_options.
4257
4258 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
4259
4260         PR c++/5132
4261         * typeck2.c (digest_init): Make sure non-array core type is
4262         instantiated.
4263         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
4264         constructor, rather than build a new one.
4265         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
4266         PURPOSE of constructor elts.
4267
4268 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
4269
4270         * Make-lang.in (parse.c): Adjust expected number of
4271         shift-reduce conflicts.
4272         (decl.o): Depend on diagnostic.h.
4273         * decl.c: Include diagnostic.h.
4274         (grokdeclarator): Check for null pointer.
4275         (finish_function): Don't abort when
4276         current_binding_level->parm_flag != 1, if errors have
4277         occurred; throw away the statement tree and extra binding
4278         levels, and continue.
4279         * lex.c (note_list_got_semicolon): Check for null pointer.
4280         * method.c (hack_identifier): Just return error_mark_node if
4281         value is error_mark_node.
4282         * parse.y (primary: TYPEID(type_id)): No need to use
4283         TYPE_MAIN_VARIANT here.
4284         (handler_seq): Accept an empty list of catch clauses and
4285         generate a fake handler block to avoid later crashes.
4286         (ansi_raise_identifier): Accept the error token too.
4287         * semantics.c (begin_class_definition,
4288         finish_class_definition): Check for error_mark_node.
4289
4290 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
4291
4292         * typeck2.c (friendly_abort): Delete definition.
4293         * cp-tree.h (friendly_abort): Don't prototype.
4294         (my_friendly_assert): Use fancy_abort.
4295
4296 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4297
4298         * cp-tree.h (my_friendly_abort): Remove.
4299
4300 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
4301
4302         * spew.c (pending_inlines, pending_inlines_tail,
4303         processing_these_inlines): Make static.
4304         (mark_pending_inlines): Remove static.
4305         (begin_parsing_inclass_inline): If in function, save pi
4306         for GC to cp_function_chain->unparsed_inlines instead.
4307         (process_next_inline): Likewise.
4308         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
4309         (mark_pending_inlines): Add prototype.
4310         * decl.c (spew_debug): Remove unused extern.
4311         (mark_lang_function): Call mark_pending_inlines.
4312
4313 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4314
4315         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
4316         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
4317         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
4318         Change my_fancy_abort() to abort().
4319
4320 2002-01-23  Jason Merrill  <jason@redhat.com>
4321
4322         PR c++/5453
4323         * class.c (fixed_type_or_null): Fix thinko.
4324
4325         PR c++/3331
4326         * init.c (resolve_offset_ref): Use build_indirect_ref.
4327
4328         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
4329
4330 2002-01-22  Jason Merrill  <jason@redhat.com>
4331
4332         * parse.y (function_body): Suppress the block for the outermost
4333         curly braces.
4334         * decl.c (pushdecl): Don't try to skip it.
4335         (begin_function_body): Keep the block we create, not the next one.
4336         * init.c (emit_base_init): Don't mess with keep_next_level.
4337
4338         * class.c (build_base_path): Tweak formatting.
4339
4340 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
4341
4342         Fix regression introduced with patch for c++/775
4343         * parse.y (class_head_defn): Check for template specializations
4344         with a different class-key.
4345
4346 2002-01-17  Jason Merrill  <jason@redhat.com>
4347
4348         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
4349         (begin_function_body): Call them and keep_next_level.
4350         * init.c (emit_base_init): Call keep_next_level.
4351         * semantics.c (setup_vtbl_ptr): Lose.
4352         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
4353         (vtbls_set_up_p): Lose.
4354         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
4355         * method.c (do_build_copy_constructor): Likewise.
4356         (synthesize_method): Call finish_mem_initializers.
4357         * parse.y (nodecls): Likewise.
4358
4359         * error.c (dump_type_suffix): Print the exception specs before
4360         recursing.
4361         (dump_function_decl): Here, too.
4362
4363         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
4364
4365 2002-01-10  Ira Ruben   <ira@apple.com>
4366
4367         PR c++/907
4368         * decl.c (start_method): Handle attrlist.
4369
4370 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
4371
4372         * decl2.c (max_tinst_depth): Increase default limit to 500.
4373
4374 2002-01-10  Graham Stott  <grahams@redhat.com>
4375
4376         * spew.c (YYCHAR): Uppercase macro parameter and add
4377         parenthesis.
4378         (YYCODE): Likewise.
4379         (NAME): Uppercase macro parameter.
4380
4381 2002-01-09  Graham Stott  <grahams@redhat.com>
4382
4383         * decl.h (grokdeclarator): Wrap long line.
4384
4385         * semantics.c (FINISH_COND): Uppercase macro paramaters and
4386         add parenthesis.
4387
4388 2002-01-08  Graham Stott  <grahams@redhat.com>
4389
4390         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
4391         (PALLOC): Uppercase macro parameter and whitespace.
4392         (SALLOC): Uppercase macro parameter.
4393         (SFREE): Uppercase macros parameter, add parenthese and
4394         whitespace.
4395         (STREQL): Uppercase macro parameter and whitespace.
4396         (STRNEQ): Likewise.
4397         (STRLSS): Likewise.
4398         (STRLEQ): Likewise.
4399         (STRGTR): Likewise.
4400         (STRGEQ): Likewise.
4401
4402         * call.c (convert_like): Add parenthesis and wrap.
4403         (convert_like_with_context): Likewise.
4404         (ICS_RANK): Whitespace.
4405         (NEED_TEMPORARY_P): Remove parenthesis.
4406
4407         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
4408         whitespace.
4409         (VTT_MARKED_BINFO_P): Likewise.
4410
4411         * decl.c (BINDING_LEVEL): Add parenthesis.
4412         (DEF_OPERATOR): Likewise.
4413
4414         * mangle.c (MANGLE_TRACE): Add parenthesis.
4415         (MANGLE_TRACE_TREE): Likewise.
4416         (write_signed_number): Likewise.
4417         (write_unsigned_number): Likewise.
4418
4419         * pt.c (ccat): Uppercase macro parameter.
4420         (cat): Likewise
4421
4422         * search.c (SET_BINFO_ACCESS): Add parenthesis.
4423
4424 2002-01-07  Jason Merrill  <jason@redhat.com>
4425
4426         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
4427         to pedwarn.
4428
4429         PR c++/3536
4430         * method.c (make_thunk): If !flag_weak, give the thunk the
4431         function's linkage.
4432         (use_thunk): Here, too.
4433
4434 2002-01-07  Graham Stott  <grahams@redhat.com>
4435
4436         * error.c: Update copyright date.
4437         (print_scope_operator): Add parenthesis.
4438         (print_left_paren): Likewise.
4439         (print_right_paren): Likewise.
4440         (print_left_bracket): Likewise.
4441         (print_right_bracket): Likewise.
4442         (print_template_argument_list_start): Likewise.
4443         (print_template_argument_list_end): Likewise.
4444         (print_non_consecutive_character): Likewise.
4445         (print_tree_identifier): Likewise.
4446         (print_identifier): Likewise.
4447         (NEXT_CODE): Uppercase macro parameter.
4448         (ident_fndecl): Delete unused.
4449         (GLOBAL_THING): Likewise.
4450
4451 2002-01-06  Graham Stott  <grahams@redhat.com>
4452
4453         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
4454         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
4455         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
4456         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
4457         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
4458         (C_IS_RESERVED_WORD): Uppercase macro parameter.
4459         (C_RID_YYCODE) Likewise.
4460         (ptrmem_cst): Use rtx.
4461         (LOCAL_BINDING_P): Add whitespace.
4462         (INHERITED_VALUE_BINDING_P): Likewise.
4463         (BINDING_SCOPE): Wrap long line.
4464         (BINDING_HAS_LEVEL_P): Remove parenthesis.
4465         (BINDING_VALUE): Wrap long line.
4466         (BINDING_TYPE): Whitespace.
4467         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
4468         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
4469         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
4470         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
4471         (same_type_p): Uppercase macro parameters.
4472         (same_type_ignoring_top_level_qualifiers_p): Likewise.
4473         (OVL_FUNCTION): Wrap long line.
4474         (OVL_CHAIN): Whitespace.
4475         (OVL_CURRENT): Add parenthesis and whitespace.
4476         (OVL_NEXT): Whitespace.
4477         (OVL_USED): Likewise.
4478         (IDENTIFIER_TYPE_VALUE): Likewise.
4479         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
4480         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
4481         (LANG_ID_FIELD): Whitespace.
4482         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
4483         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
4484         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
4485         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
4486         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
4487         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
4488         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
4489         (IDENTIFIER_VIRTUAL_P): Likewise.
4490         (IDENTIFIER_OPNAME_P): Likewise.
4491         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
4492         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
4493         (C_SET_EXP_ORIGINAL_CODE): Likewise.
4494         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
4495         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
4496         (IS_AGGR_TYPE): Uppercase macro parameter.
4497         (CLASS_TYPE_P): Likewise.
4498         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
4499         (IS_AGGR_TYPE_2): Whitespace.
4500         (TAGGED_TYPE_P): Uppercase macro parameter.
4501         (TYPE_BUILT_IN): Whitespace.
4502         (TYPE_FOR_JAVA): Likewise.
4503         (FUNCTION_ARG_CHAIN): Remove parenthesis.
4504         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
4505         (FUNCTION_FIRST_USER_PARAM): Likewise.
4506         (PROMOTES_TO_AGGR_TYPE): Whitespace.
4507         (DERIVED_FROM_P): Add parenthesis and wrap.
4508         (UNIQUELY_DERIVED_FROM_P): Likewise.
4509         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
4510         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
4511         (CLASSTYPE_USE_TEMPLATE): Whitespace.
4512         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
4513         (TYPE_GETS_DELETE): Add parenthesis.
4514         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
4515         (TYPE_HAS_ASSIGN_REF): Likewise,
4516         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
4517         (TYPE_HAS_INIT_REF): Likewise.
4518         (TYPE_HAS_CONST_INIT_REF): Likewise.
4519         (TYPE_BEING_DEFINED): Likewise.
4520         (TYPE_LANG_SPECIFIC): Likewise.
4521         (CLASSTYPE_RTTI): Likewise.
4522         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
4523         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
4524         (TYPE_OVERLOADS_ARROW): Likewise.
4525         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
4526         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
4527         (CLASSTYPE_METHOD_VEC): Likewise.
4528         (CLASSTYPE_MARKED_N): Likewise.
4529         (CLASSTYPE_MARKED): Likewise.
4530         (CLASSTYPE_MARKED2): Likewise.
4531         (CLASSTYPE_MARKED3): Likewise.
4532         (CLASSTYPE_MARKED4): Likewise.
4533         (CLASSTYPE_MARKED5): Likewise.
4534         (CLASSTYPE_MARKED6): Likewise.
4535         (SET_CLASSTYPE_MARKED): Whitespace.
4536         (CLEAR_CLASSTYPE_MARKED): Likewise.
4537         (SET_CLASSTYPE_MARKED2): Likewise.
4538         (CLEAR_CLASSTYPE_MARKED2): Likewise.
4539         (SET_CLASSTYPE_MARKED3): Likewise.
4540         (CLEAR_CLASSTYPE_MARKED3): Likewise.
4541         (SET_CLASSTYPE_MARKED4): Likewise.
4542         (CLEAR_CLASSTYPE_MARKED4): Likewise.
4543         (SET_CLASSTYPE_MARKED5): Likewise.
4544         (CLEAR_CLASSTYPE_MARKED5): Likewise.
4545         (SET_CLASSTYPE_MARKED6): Likewise.
4546         (CLEAR_CLASSTYPE_MARKED6): Likewise.
4547         (CLASSTYPE_TAGS): Likewise.
4548         (CLASSTYPE_VSIZE): Likewise.
4549         (CLASSTYPE_VBASECLASSES): Likewise.
4550         (CANONICAL_BINFO): Add parenthesis.
4551         (CLASSTYPE_SIZE(NODE): Likewise.
4552         (CLASSTYPE_SIZE_UNIT): Likewise.
4553         (CLASSTYPE_ALIGN(NODE): Likewise.
4554         (CLASSTYPE_USER_ALIGN): Likewise.
4555         (TYPE_JAVA_INTERFACE): Likewise.
4556         (CLASSTYPE_PURE_VIRTUALS): Likewise.
4557         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
4558         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
4559         (CLASSTYPE_HAS_MUTABLE): Likewise.
4560         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
4561         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
4562         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
4563         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
4564         (CLASSTYPE_INTERFACE_ONLY): Likewise.
4565         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
4566         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
4567         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
4568         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
4569         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
4570         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
4571         (BINFO_UNSHARED_MARKED): Whitespace.
4572         (BINFO_MARKED): Whitespace and wrap.
4573         (SET_BINFO_MARKED): Likewise.
4574         (CLEAR_BINFO_MARKED): Likewise.
4575         (BINFO_VTABLE_PATH_MARKED): Likewise.
4576         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
4577         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
4578         (BINFO_SUBVTT_INDEX): Remove parenthesis.
4579         (BINFO_VPTR_INDEX): Likewise.
4580         (BINFO_PRIMARY_BASE_OF): Likewise,
4581         (CLASSTYPE_VFIELDS): Whitespace.
4582         (VF_DERIVED_VALUE): Wrap long line.
4583         (NAMESPACE_LEVEL): Whitespace.
4584         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
4585         (DEFARG_POINTER): Whitespace.
4586         (DECL_NEEDED_P): Remove parenthesis.
4587         (DECL_LANGUAGE): Whitespace.
4588         (SET_DECL_LANGUAGE): Add parenthesis.
4589         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
4590         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
4591         (DECL_IN_AGGR_P): Whitespace.
4592         (DECL_FRIEND_P): Likewise.
4593         (DECL_BEFRIENDING_CLASSES): Likewise.
4594         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
4595         (DECL_NONCONVERTING_P): Whitespace.
4596         (DECL_PURE_VIRTUAL_P): Likewise.
4597         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
4598         (DECL_PENDING_INLINE_INFO): Whitespace.
4599         (DECL_SORTED_FIELDS): Likewise.
4600         (DECL_DEFERRED_FN): Likewise.
4601         (DECL_TEMPLATE_INFO): Likewise.
4602         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
4603         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
4604         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
4605         (TMPL_ARGS_LEVEL): Likewise.
4606         (SET_TMPL_ARGS_LEVEL): Likewise.
4607         (INNERMOST_TEMPLATE_PARMS): Whitespace.
4608         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
4609         (INTEGRAL_CODE_P(CODE): Add parenthesis.
4610         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
4611         (TYPE_HAS_CONSTRUCTOR): Whitespace.
4612         (TREE_HAS_CONSTRUCTOR): Likewise.
4613         (TYPE_HAS_DESTRUCTOR): Likewise.
4614         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
4615         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
4616         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
4617         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
4618         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
4619         (TYPE_PTRMEMFUNC_P): Likewise.
4620         (TYPE_PTRMEMFUNC_FLAG): Likewise.
4621         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
4622         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
4623         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
4624         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
4625         (DECL_ACCESS): Whitespace.
4626         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
4627         (DECL_GLOBAL_DTOR_P): Likewise.
4628         (GLOBAL_INIT_PRIORITY): Likewise.
4629         (DECL_TEMPLATE_PARMS): Likewise.
4630         (DECL_TEMPLATE_RESULT): Likewise.
4631         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
4632         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
4633         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
4634         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
4635         (PRIMARY_TEMPLATE_P): Add parenthesis.
4636         (DECL_USE_TEMPLATE): Whitespace.
4637         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
4638         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
4639         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
4640         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
4641         (CALL_DECLARATOR_PARMS): Remove parenthesis.
4642         (CALL_DECLARATOR_QUALS): Likewise.
4643         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
4644         (TEMP_NAME_P): Wrap.
4645         (VFIELD_NAME_P): Likewise.
4646         (B_SET): Uppercase macro parameters and add parenthesis.
4647         (B_CLR): Likewise.
4648         (B_TST): Likewise.
4649         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
4650         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
4651         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
4652         (same_or_base_type_p): Likewise.
4653         (cp_deprecated): Likewise.
4654
4655 2002-01-05  Richard Henderson  <rth@redhat.com>
4656
4657         * semantics.c (expand_body): Revert last change.
4658
4659 2002-01-04  Jason Merrill  <jason@redhat.com>
4660
4661         PR c++/4122
4662         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
4663         lost primary.
4664
4665         * class.c (build_vtbl_initializer): Check for a lost primary
4666         before calculating the vtable entry to throw away.
4667
4668 2002-01-02  Jason Merrill  <jason@redhat.com>
4669
4670         * semantics.c (expand_body): Call outlining_inline_function when
4671         emitting an inline function out of line.
4672
4673 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4674
4675         PR c++/5116, c++/764 reversion
4676         * call.c (build_new_op): Revert the instantiations. They are
4677         incorrect.
4678
4679 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4680
4681         PR c++/5089
4682         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
4683
4684 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4685
4686         PR c++/3716
4687         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
4688         (tsubst, case POINTER_TYPE): Handle pmfs here.
4689         (tsubst, case OFFSET_TYPE): Check it is not an offset to
4690         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
4691
4692 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4693
4694         PR c++/35
4695         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
4696         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
4697         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
4698         PARM_DECL.
4699         (tsubst_template_parms): Break up loop statements.
4700         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
4701         parm PARM_DECLs don't get promoted.
4702
4703 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4704
4705         PR c++/5123
4706         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
4707         (build_x_function_call): Cope with a COMPONENT_REF containing a
4708         TEMPLATE_ID_EXPR.
4709
4710 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4711
4712         PR c++/5213
4713         * pt.c (convert_template_argument): Be more careful determining
4714         when RECORD_TYPE templates are or are not templates.
4715
4716 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4717
4718         PR c++/775
4719         * cp-tree.h (handle_class_head): Adjust prototype.
4720         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
4721         parameters. Use for all class heads.
4722         * parse.y (named_class_head_sans_basetype, named_class_head,
4723         named_complex_class_head_sans_basetype,
4724         named_class_head_sans_basetype_defn,
4725         unnamed_class_head): Remove.
4726         (class_head, class_head_apparent_template): Recognize class heads
4727         (class_head_decl, class_head_defn): New reductions. Process class
4728         heads.
4729         (structsp): Adjust class definition and class declaration
4730         reductions.
4731         (maybe_base_class_list): Give diagnostic on empty list.
4732
4733 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4734
4735         PR c++/4379
4736         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
4737         single non-static member.
4738         (unary_complex_lvalue): If it cannot be a pointer to member, don't
4739         make it so. Check it is not pointer to reference.
4740
4741 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4742
4743         PR c++/5132
4744         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
4745         are processing a template decl.
4746
4747 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4748
4749         PR c++/5116, c++/764
4750         * call.c (build_new_op): Make sure template class operands are
4751         instantiated. Simplify arglist construction.
4752
4753 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
4754
4755         * call.c (build_user_type_conversion_1): Use my_friendly_assert
4756         rather than if ... abort.
4757         * cvt.c (convert_to_reference): Likewise.
4758         * semantics.c (setup_vtbl_ptr): Likewise.
4759         * pt.c (lookup_template_class): Comment typo.
4760
4761 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
4762
4763         PR c++/5125
4764         * pt.c (push_template_decl_real): Make sure DECL has
4765         DECL_LANG_SPECIFIC.
4766
4767 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
4768
4769         PR c++/335
4770         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
4771         for non-reference fields.
4772         * typeck.c (require_complete_type): Use resolve_offset_ref).
4773
4774 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
4775
4776         PR c++/196
4777         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
4778
4779 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
4780
4781         PR c++/160
4782         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
4783         up. Don't stabilize_references when initializing a reference.
4784
4785 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4786
4787         * decl2.c (lang_f_options): Const-ify.
4788
4789 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
4790
4791         * config-lang.in (diff_excludes): Remove.
4792
4793 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
4794
4795         PR c++/90
4796         * typeck.c (build_function_call_real): Use original function
4797         expression for errors.
4798
4799 2001-12-18  Jason Merrill  <jason@redhat.com>
4800
4801         PR c++/3242
4802         * class.c (add_method): Do compare 'this' quals when trying to match a
4803         used function.  Don't defer to another used function.
4804
4805 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
4806
4807         * pt.c (instantiate_clone): Remove, fold into ...
4808         (instantiate_template): ... here. Simplify by removing mutual
4809         recursion.
4810         * typeck2.c (build_m_component_ref): Don't cv qualify the function
4811         pointed to by a pointer to function.
4812         * class.c (delete_duplicate_fields_1): Typo.
4813
4814 2001-12-18  Jason Merrill  <jason@redhat.com>
4815
4816         C++ ABI change: destroy value arguments in caller.
4817         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
4818         create an extra binding level for the parameters.
4819         * decl.c (store_parm_decls): Don't do parameter cleanups.
4820
4821 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
4822
4823         * call.c (build_new_method_call): Use '%#V'.
4824         * error.c (cv_to_string): Use V parameter to determine padding.
4825
4826 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
4827
4828         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
4829         spellings in messages.
4830
4831 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
4832
4833         * cp-tree.h: Delete #defines for cp_error, cp_warning,
4834         cp_pedwarn, and cp_compiler_error.
4835         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
4836         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
4837         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
4838         typeck2.c: Change calls to the above macros to use their
4839         language-independent equivalents: error, warning, pedwarn, and
4840         internal_error respectively.
4841
4842 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
4843
4844         * decl2.c (finish_file): Remove back_end_hook.
4845
4846 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
4847
4848         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
4849         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
4850         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
4851
4852 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
4853
4854         * lang-options.h: Use American spelling in messages.
4855
4856 2001-12-13  Jason Merrill  <jason@redhat.com>
4857
4858         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
4859
4860         Use cleanups to run base and member destructors.
4861         * init.c (push_base_cleanups): New function, split out from...
4862         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
4863         * decl.c (finish_destructor_body): Move vbase destruction code to
4864         push_base_cleanups.
4865         (begin_function_body, finish_function_body): New fns.
4866         (finish_function): Move [cd]tor handling and call_poplevel to
4867         finish_function_body.
4868         (pushdecl): Skip the new level.
4869         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
4870         (setup_vtbl_ptr): Call push_base_cleanups.
4871         * method.c (synthesize_method): Call {begin,end}_function_body.
4872         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
4873         * cp-tree.h: Declare new fns.
4874         * parse.y (function_body, .begin_function_body): New nonterminals.
4875         (fndef, pending_inline, function_try_block): Use function_body.
4876         (ctor_initializer_opt, function_try_block): No longer has a value.
4877         (base_init): Remove .set_base_init token.
4878         (.set_base_init, compstmt_or_error): Remove.
4879         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
4880
4881         * optimize.c (maybe_clone_body): Fix parameter updating.
4882
4883 2001-12-12  Jason Merrill  <jason@redhat.com>
4884
4885         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
4886         * semantics.c (genrtl_start_function): Don't pass
4887         parms_have_cleanups or push an extra binding level.
4888         (genrtl_finish_function): Lose cleanup_label cruft.
4889
4890         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
4891         (ctor_label): Remove.
4892         * semantics.c (finish_return_stmt): Lose ctor_label support.
4893         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
4894         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
4895         dtor_label.
4896
4897         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
4898         check for [cd]tors.
4899         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
4900
4901         * decl.c (finish_function): Check VMS_TARGET, not VMS.
4902
4903         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
4904         (end_cleanup_fn): And poplevel.
4905
4906         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
4907         if we're in a template.
4908
4909 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
4910
4911         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
4912         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
4913         THIS_NAME_P): Delete.
4914         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
4915         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
4916         with internal naming scheme.
4917         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
4918
4919 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
4920
4921         * decl.c (grokdeclarator): Deprecated implicit typename use.
4922
4923 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
4924
4925         PR g++/51
4926         * parse.y (frob_specs): Indicate it is a language linkage which
4927         contained the extern.
4928         * decl.c (grokdeclarator): Allow extern language linkage with
4929         other specifiers.
4930
4931 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
4932
4933         PR g++/72
4934         * decl.c (add_binding): Don't reject duplicate typedefs involving
4935         template parameters.
4936
4937 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
4938
4939         * parse.y, semantics.c: Similarly.
4940
4941 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
4942
4943         PR g++/87
4944         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
4945         (copy_args_p): Rename to ...
4946         (copy_fn_p): ... here.
4947         (grok_special_member_properties): New function.
4948         (grok_op_properties): Lose VIRTUALP parameter.
4949         (copy_assignment_arg_p): Remove.
4950         * call.c (build_over_call): Use copy_fn_p.
4951         * decl.c (grokfndecl): Reformat. Adjust call to
4952         grok_op_properties.
4953         (copy_args_p): Rename to ...
4954         (copy_fn_p): ... here. Reject template functions. Check for pass
4955         by value.
4956         (grok_special_member_properties): Remember special functions.
4957         (grok_ctor_properties): Don't remember them here, just check.
4958         (grok_op_properties): Likewise.
4959         (start_method): Call grok_special_member_properties.
4960         * decl2.c (grokfield): Likewise.
4961         (copy_assignment_arg_p): Remove.
4962         (grok_function_init): Don't remember abstract assignment here.
4963         * pt.c (instantiate_class_template): Call
4964         grok_special_member_properties.
4965         (tsubst_decl): Adjust grok_op_properties call.
4966
4967 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
4968
4969         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
4970         RID_TYPES_COMPATIBLE_P.
4971
4972 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4973
4974         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
4975         call to build_aggr_init.
4976         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
4977
4978 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
4979
4980         * parse.y: Replace uses of the string non-terminal with STRING.
4981         Don't perform string concatentaion here.
4982         (string): Remove non-terminal.
4983         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
4984
4985 2001-12-05  Jason Merrill  <jason@redhat.com>
4986
4987         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
4988         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
4989         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
4990         * pt.c (push_tinst_level): No longer static.
4991         * cp-tree.h: Declare them.
4992
4993         * init.c (resolve_offset_ref): Don't check access for the base
4994         conversion to access a FIELD_DECL.
4995
4996         * cp-tree.h (TYPE_REFFN_P): New macro.
4997         * decl.c (bad_specifiers): Check it, too.
4998
4999         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
5000         on the __*_type_info type if we haven't seen a definition.
5001
5002 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
5003
5004         * decl.c: Include c-common.h.
5005         (shadow_warning): Move to c-common.c.
5006
5007 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5008
5009         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
5010
5011 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
5012
5013         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
5014
5015 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
5016
5017         PR g++/164
5018         * init.c (sort_base_init): Allow binfos to be directly specified.
5019         * method.c (do_build_copy_constructor): Explicitly convert to the
5020         base instance.
5021         (do_build_assign_ref): Likewise.
5022
5023 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
5024
5025         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
5026         declaration and initialization.
5027
5028 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
5029
5030         * typeck2.c: Remove leading capital from diagnostic messages, as
5031         per GNU coding standards.
5032
5033 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
5034
5035         PR c++/3394
5036         * decl.c (xref_basetypes): Handle attributes between
5037         'class' and name.
5038
5039 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
5040
5041         PR g++/3381
5042         * parse.y (named_complex_class_head_sans_basetype): Add new
5043         reduction.
5044         * Make-lang.in (parse.c): Adjust expected conflict count.
5045
5046 2001-12-03  Jason Merrill  <jason@redhat.com>
5047
5048         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
5049         immediate binfos for our virtual bases.
5050
5051 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
5052
5053         * call.c (build_java_interface_fn_ref): Similarly.
5054         * except.c (is_admissible_throw_operand): Similarly.
5055         * init.c (build_java_class_ref): Similarly.
5056         * xref.c (open_xref_file): Similarly.
5057
5058 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5059
5060         * class.c (finish_struct): Remove trailing periods from messages.
5061         * decl.c (check_tag_decl): Similarly.
5062         * lex.c (cxx_set_yydebug): Similarly.
5063         * typeck2.c (friendly_abort): Similarly.
5064
5065 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5066
5067         PR c++/3048
5068         * cp-tree.h (ovl_member): Remove.
5069         * decl2.c (merge_functions): Handle extern "C" functions
5070         specially.
5071         * tree.c (ovl_member): Remove.
5072
5073 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5074
5075         PR c++/4842
5076         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
5077         FUNCTION_DECL, as input.
5078         (mark_overriders): Remove.
5079         (warn_hidden): Rework for the new ABI.
5080
5081 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5082
5083         PR c++/3471
5084         * call.c (convert_like_real): Do not build additional temporaries
5085         for rvalues of class type.
5086
5087 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5088
5089         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
5090         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
5091         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
5092         (DERIVED_FROM_P): Likewise.
5093         (enum base_access): Renumber, add ba_quiet bit mask.
5094         (get_binfo): Remove.
5095         (get_base_distance): Remove.
5096         (binfo_value): Remove.
5097         (ACCESSIBLY_DERIVED_FROM_P): Remove.
5098         * call.c (standard_conversion): Use lookup_base.
5099         * class.c (strictly_overrides): Likewise.
5100         (layout_virtual_bases): Likewise.
5101         (warn_about_ambiguous_direct_bases): Likewise.
5102         (is_base_of_enclosing_class): Likewise.
5103         (add_vcall_offset_vtbl_entries_1): Likewise.
5104         * cvt.c (build_up_reference): Adjust comment.
5105         * init.c (build_member_call): Reformat.
5106         * search.c (get_binfo): Remove.
5107         (get_base_distance_recursive): Remove.
5108         (get_base_distance): Remove.
5109         (lookup_base_r): Tweak.
5110         (lookup_base): Add ba_quiet control. Complete the types here.
5111         (covariant_return_p): Use lookup_base.
5112         * tree.c (binfo_value): Remove.
5113         (maybe_dummy_object): Use lookup_base.
5114         * typeck.c (build_static_cast): Use lookup_base.
5115         (get_delta_difference): Likewise.
5116         * typeck2.c (binfo_or_else): Use lookup_base.
5117         (build_scoped_ref): Add back error_mark_check.
5118         (build_m_component_ref): Use lookup_base.
5119
5120 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
5121
5122         * Make-lang.in (c++.generated-manpages): New dummy target.
5123
5124 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5125
5126         * Make-lang.in (cp-lang.o): Depends on c-common.h.
5127         * cp-lang.c (c-common.h): Include.
5128         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
5129         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
5130         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
5131
5132 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5133
5134         * decl2.c (c_language): Move to c-common.c.
5135         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
5136         functions.
5137         (cxx_init): Update.
5138
5139 2001-11-26  Jason Merrill  <jason@redhat.com>
5140
5141         * call.c (joust): Remove COND_EXPR hack.
5142
5143 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
5144
5145         * search.c (lookup_base_r): Declare bk in variable declaration
5146         space.
5147
5148 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
5149
5150         PR g++/3145
5151         * class.c (build_vbase_pointer): Remove.
5152         (build_vbase_path): Remove.
5153         (build_base_path): New function.
5154         * cp-tree.h (base_access, base_kind): New enumerations.
5155         (build_base_path): Declare.
5156         (convert_pointer_to_real): Remove.
5157         (convert_pointer_to): Remove.
5158         (lookup_base): Declare.
5159         (convert_pointer_to_vbase): Remove.
5160         * call.c (build_scoped_method_call): Use lookup_base &
5161         build_base_path instead of convert_pointer_to_real,
5162         get_base_distance & get_binfo.
5163         (build_over_call): Likewise.
5164         * cvt.c (cp_convert_to_pointer): Likewise.
5165         (convert_to_pointer_force): Likewise.
5166         (build_up_reference): Likewise.
5167         (convert_pointer_to_real): Remove.
5168         (convert_pointer_to): Remove.
5169         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
5170         instead of convert_pointer_to_vbase & build_vbase_path.
5171         (emit_base_init): Use build_base_path instead of
5172         convert_pointer_to_real.
5173         (expand_virtual_init): Lose unrequired conversions.
5174         (resolve_offset_ref): Use lookup_base and build_base_path
5175         instead of convert_pointer_to.
5176         * rtti.c (build_dynamic_cast_1): Use lookup_base &
5177         build_base_path instead of get_base_distance & build_vbase_path.
5178         * search.c (get_vbase_1): Remove.
5179         (get_vbase): Remove.
5180         (convert_pointer_to_vbase): Remove.
5181         (lookup_base_r): New function.
5182         (lookup_base): New function.
5183         * typeck.c (require_complete_type): Use lookup_base &
5184         build_base_path instead of convert_pointer_to.
5185         (build_component_ref): Likewise.
5186         (build_x_function_call): Likewise.
5187         (get_member_function_from_ptrfunc): Likewise.
5188         (build_component_addr): Likewise.
5189         * typeck2.c (build_scoped_ref): Likewise.
5190
5191 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5192
5193         * cp-tree.h (CP_TYPE_QUALS): Removed.
5194         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
5195         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
5196         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
5197         * dump.c (cp_dump_tree): Use void* dump_info argument to match
5198         lang-hooks prototype.
5199         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
5200         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
5201         CP_TYPE_QUALS changed to cp_type_quals.
5202         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
5203         (CXX_C_OBJS): Remove c-dump.o.
5204
5205 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
5206
5207         PR c++/3637
5208         * pt.c (lookup_template_class): Ensure that all specializations
5209         are registered on the list corresponding to the most general
5210         template.
5211
5212 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
5213
5214         * call.c (non_reference): Add documentation.
5215         (convert_class_to_reference): Do not strip reference types
5216         from conversion operators.
5217         (maybe_handle_ref_bind): Simplify.
5218         (compare_ics): Correct handling of references.
5219
5220 2001-11-19  John Wilkinson <johnw@research.att.com>
5221
5222         * dump.c (dump_op): New function.
5223         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
5224         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
5225         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
5226
5227 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
5228
5229         PR4629
5230         * semantics.c (finish_sizeof): Make sure that expression created
5231         while processing a template do not have a type.
5232         (finish_alignof): Likewise.
5233         * typeck.c (c_sizeof): Likewise.
5234         (expr_sizeof): Likewise.
5235
5236 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5237
5238         * lex.c (cxx_finish): Call c_common_finish.
5239         (finish_parse): Remove.
5240
5241 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5242
5243         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
5244         when displaying error message about missing array bounds.
5245
5246 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5247
5248         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
5249         CONST_CAST_EXPR.
5250         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
5251
5252 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
5253
5254         * cp-tree.h (print_class_statistics): Restore.
5255
5256 2001-11-15  Jason Merrill  <jason@redhat.com>
5257
5258         * method.c (use_thunk): Don't emit debugging information for thunks.
5259
5260         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
5261         * decl.c (make_typename_type): Handle getting a class template.
5262         * search.c (lookup_field_r): A class template is good enough for
5263         want_type.
5264
5265         * call.c (convert_like_real): Only use cp_convert for the bad part.
5266         (standard_conversion): Also allow bad int->enum.
5267         * typeck.c (ptr_reasonably_similar): Also allow functions to
5268         interconvert.  Pointers to same-size integers are reasonably
5269         similar.
5270
5271         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
5272         give it void type.
5273
5274 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
5275
5276         PR g++/3154
5277         * init.c (sort_base_init): Remove unreachable code.
5278         (expand_member_init): Adjust comment to reflect reality. Simplify
5279         and remove unreachable code.
5280
5281 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
5282
5283         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
5284         (cxx_init): Update prototype.
5285         * decl.c (init_decl_processing): Rename.  Move null node init
5286         to its creation time.
5287         * lex.c (cxx_init_options): Update.
5288         (cxx_init): Combine with old init_parse; also call
5289         cxx_init_decl_processing.
5290
5291 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
5292
5293         * decl.c (check_initializer): Try to complete the type of an
5294         array element before checking whether it's complete.  Don't
5295         complain about arrays with complete element types but an
5296         unknown size.
5297         (cp_finish_decl): Build the hierarchical constructor before
5298         calling maybe_deduce_size_from_array_init.
5299
5300 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
5301
5302         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
5303
5304 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
5305
5306         PR g++/4206
5307         * parse.y (already_scoped_stmt): Remove.
5308         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
5309
5310 2001-11-12  H.J. Lu <hjl@gnu.org>
5311
5312         * cvt.c (ocp_convert): Don't warn the address of a weak
5313         function is always `true'.
5314
5315 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5316
5317         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
5318         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
5319         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
5320         * cp-tree.h (print_class_statistics): Remove.
5321         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
5322         cxx_print_identifier, cxx_set_yydebug): New.
5323         * lex.c (set_yydebug): Rename c_set_yydebug.
5324         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
5325         lang_print_xnode): Rename.
5326         * tree.c (print_lang_statistics): Rename.
5327
5328 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5329
5330         * class.c (dump_array): Fix format specifier warning.
5331
5332 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5333
5334         * cp-lang.c (LANG_HOOKS_NAME): Override.
5335         (struct lang_hooks): Constify.
5336         * lex.c (cxx_init_options): Update.
5337         (lang_identify): Remove.
5338         * parse.y (language_string): Remove.
5339
5340 2001-11-08  Andreas Franck  <afranck@gmx.de>
5341
5342         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
5343         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
5344         suggested by autoconf.
5345         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
5346         (c++.install-common): Use the transformed target alias names.
5347
5348 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
5349
5350         * Make-lang.in: Update.
5351         * cp-lang.c: Include langhooks-def.h.
5352
5353 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5354
5355         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
5356
5357 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5358
5359         * lex.c (copy_lang_type): Add static prototype.
5360
5361 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5362
5363         * pt.c (unify): Handle SCOPE_REF.
5364
5365 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
5366
5367         * tree.c (cp_copy_res_decl_for_inlining): Adjust
5368         DECL_ABSTRACT_ORIGIN for the return variable.
5369
5370 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
5371
5372         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
5373
5374 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
5375
5376         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
5377         semantics.c, spew.c: Fix spelling errors.
5378
5379 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5380
5381         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
5382
5383 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
5384
5385         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
5386         pop_everything.
5387
5388 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5389
5390         * cp-lang.c (cxx_get_alias_set): New function.
5391         Point LANG_HOOKS_GET_ALIAS_SET to it.
5392
5393 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5394
5395         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
5396         * cp-tree.h (make_unbound_class_template): Prototype new function.
5397         * decl.c (make_unbound_class_template): New function.
5398         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
5399         * error.c (dump_type): Likewise.
5400         * mangle.c (write_type): Likewise.
5401         * parse.y (template_parm): Likewise.
5402         (template_argument): Use make_unbound_class_template.
5403         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
5404         (tsubst): Likewise.
5405         (tsubst_copy): Likewise.
5406         (unify): Likewise.
5407         * tree.c (walk_tree): Likewise.
5408         * typeck.c (comptypes): Likewise.
5409
5410 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5411
5412         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
5413         extra calls into fewer ones.
5414
5415 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
5416
5417         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
5418         Warn when merging inline with attribute noinline.
5419         (start_decl, start_function): Warn if inline and attribute
5420         noinline appear in the same declaration.
5421
5422 2001-10-16  H.J. Lu <hjl@gnu.org>
5423
5424         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
5425         for tree checking disabled.
5426
5427 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
5428
5429         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
5430         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
5431
5432 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
5433
5434         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
5435         (unify): Only handle MINUS_EXPR specially if the above flag is set
5436         and the subtracted constant is 1.  Clear the flag on recursive calls.
5437         Set it when unifying the maximum value in an INTEGER_TYPE's range.
5438
5439 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
5440
5441         * decl.c (bad_specifiers): Don't allow exception specifications
5442         on any typedefs.
5443
5444 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
5445
5446         * cp/lex.c (init_cp_pragma): Similarly.
5447
5448 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5449
5450         * pt.c (lookup_template_class): Build complete template arguments
5451         for BOUND_TEMPLATE_TEMPLATE_PARM.
5452
5453 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5454
5455         * cp-tree.h (TYPE_BINFO): Update comment.
5456         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
5457         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
5458         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
5459         (copy_type): Prototype new function.
5460         * lex.c (copy_lang_decl): Gather tree node statistics.
5461         (copy_lang_type): New function.
5462         (copy_type): Likewise.
5463         (cp_make_lang_type): Create lang_type for
5464         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
5465         and BOUND_TEMPLATE_TEMPLATE_PARM.
5466         * pt.c (tsubst): Use copy_type instead of copy_node.
5467         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
5468
5469 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5470
5471         * pt.c (determine_specialization): Ignore functions without
5472         DECL_TEMPLATE_INFO.
5473
5474 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
5475
5476         PR g++/4476
5477         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
5478
5479 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
5480
5481         * typeck2.c (store_init_value): Don't re-digest a bracketed
5482         initializer.
5483
5484         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
5485         ANON_AGGR_TYPE_P.
5486
5487 2001-10-11  Richard Henderson  <rth@redhat.com>
5488
5489         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
5490         of an asm statement.
5491         (build_vtbl_ref_1): Split out from build_vtbl_ref.
5492         (build_vfn_ref): Use it to handle vtable descriptors before
5493         calling build_vtable_entry_ref.
5494         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
5495
5496 2001-10-10  Richard Henderson  <rth@redhat.com>
5497
5498         * parse.y (asm_operand): Allow named operands.
5499         * semantics.c (finish_asm_stmt): Tweek for changed location
5500         of the operand constraint.
5501
5502 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
5503
5504         * call.c (standard_conversion): Add bad conversion between
5505         integers and pointers.
5506         (convert_like_real): Don't use convert_for_initialization for bad
5507         conversions; complain here and use cp_convert.
5508         (build_over_call): Don't handle bad conversions specially.
5509         (perform_implicit_conversion): Allow bad conversions.
5510         (can_convert_arg_bad): New fn.
5511         * cp-tree.h: Declare it.
5512         * typeck.c (convert_for_assignment): Use it.
5513         (ptr_reasonably_similar): Any target type is similar to void.
5514
5515 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
5516
5517         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
5518         (cp/cp-lang.o): New rule.
5519         * cp-tree.h: Declare hooks.
5520         * tree.c: Make hooks non-static.
5521         (init_tree): Don't initialize hooks here.
5522         * lex.c: Likewise.  Move definition of lang_hooks to...
5523         * cp-lang.c: ... new file.
5524
5525 2001-10-08  Richard Henderson  <rth@redhat.com>
5526
5527         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
5528         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
5529
5530 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5531
5532         * class.c (build_vtable_entry_ref): Const-ify.
5533         * decl.c (predefined_identifier,
5534         initialize_predefined_identifiers): Likewise.
5535         * init.c (build_new_1): Likewise.
5536         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
5537         Likewise.
5538
5539 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
5540
5541         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
5542         (INSNS_PER_STMT): Likewise.
5543         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
5544         (copy_body, initialize_inlined_parameters): Likewise.
5545         (declare_return_variable, inlinable_function_p): Likewise.
5546         (expand_call_inline, expand_calls_inline): Likewise.
5547         (optimize_inline_calls, clone_body): Likewise.
5548         * tree.c (walk_tree): Moved to ../tree-inline.c.
5549         (walk_tree_without_duplicates): Likewise.
5550         (copy_tree_r, remap_save_expr): Likewise.
5551
5552 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
5553
5554         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
5555         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
5556         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
5557         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
5558         (flag_inline_trees): Moved declaration to ../tree-inline.h.
5559         (walk_tree): Moved declaration to ../tree-inline.h.
5560         (walk_tree_without_duplicates, copy_tree_r): Likewise.
5561         (remap_save_expr): Likewise.
5562         * decl.c: Include tree-inline.h.
5563         (lang_mark_tree): Don't mark inlined_fns.
5564         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
5565         * optimize.c: Include tree-inline.h.
5566         (optimize_inline_calls): Move declaration to ../tree.h, as
5567         non-static.
5568         (remap_decl): Use language-independent constructs and hooks.
5569         (remap_block, copy_body_r, declare_return_variable): Likewise.
5570         (inlinable_function_p): Likewise.  Don't test for
5571         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
5572         no longer language-specific.
5573         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
5574         call of dump_function to...
5575         (optimize_function): Here...
5576         (clone_body): New function, extracted from...
5577         (maybe_clone_body): ... here.  Build decl_map locally and pass
5578         it on to clone_body.
5579         * pt.c, semantics.c: Include tree-inline.h.
5580         * tree.c: Likewise.
5581         (cp_walk_subtrees): New language-specific hook for tree inlining.
5582         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
5583         cp_is_overload_p, cp_auto_var_in_fn_p,
5584         cp_copy_res_decl_for_inlining): Likewise.
5585         (walk_tree): Move language-specific constructs into...
5586         (cp_walk_subtrees): this new function.
5587         (copy_tree_r): Use language-independent constructs and hooks.
5588         (init_tree): Initialize tree inlining hooks.
5589         (remap_save_expr): Adjust prototype so that the declaration
5590         does not require the definition of splay_tree.
5591
5592 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5593
5594         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
5595         to build the declaration instead of the declaration itself.
5596
5597 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
5598
5599         * decl2.c (cxx_decode_option): Add 'else'.
5600
5601         * spew.c (end_input): No longer static.
5602         * cp-tree.h: Declare it.
5603         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
5604
5605 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
5606
5607         * call.c (build_over_call), typeck.c (build_function_call_real):
5608         Pass type attributes to check_function_format rather than name or
5609         assembler name.  Don't require there to be a name or assembler
5610         name to check formats.
5611
5612 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
5613
5614         * decl.c (init_decl_processing): Don't call
5615         init_function_format_info.  Initialize lang_attribute_table
5616         earlier.
5617         (builtin_function): Call decl_attributes.
5618         (insert_default_attributes): New.
5619
5620 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
5621
5622         * decl.c (grokdeclarator): Copy array typedef handling from C
5623         frontend.
5624
5625         * decl.c (grokdeclarator): Copy too-large array handling from C
5626         frontend.
5627
5628 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
5629
5630         * config-lang.in (target_libs): Added target-gperf, so that we
5631         don't try to build it if C++ is disabled.
5632
5633 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
5634
5635         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
5636         (cp/errfn.o): Delete rule.
5637         (cp/error.o): Depend on flags.h.
5638         * errfn.c: Delete file.
5639         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
5640         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
5641         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
5642         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
5643         internal_error respectively.  Make cp_deprecated into a macro.
5644         Don't define cp_printer typedef or declare cp_printers.
5645         * error.c: Include flags.h.
5646         Delete: struct tree_formatting_info, print_function_argument_list,
5647         print_declaration, print_expression, print_function_declaration,
5648         print_function_parameter, print_type_id, print_cv_qualifier_seq,
5649         print_type_specifier_seq, print_simple_type_specifier,
5650         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
5651         print_parameter_declaration_clause, print_exception_specification,
5652         print_nested_name_specifier, and definition of cp_printers.
5653         (locate_error): New function.
5654         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
5655         rewritten in terms of locate_error and diagnostic.c.
5656         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
5657         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
5658         (init_error): Adjust to match.
5659
5660 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5661
5662         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
5663
5664 2001-09-21  Richard Henderson  <rth@redhat.com>
5665
5666         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
5667         (build_vtbl_initializer): Likewise.
5668         (build_vfn_ref): New.
5669         * cp-tree.h: Declare it.
5670         * call.c (build_over_call): Use it.
5671         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
5672         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
5673
5674 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
5675
5676         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
5677
5678 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
5679
5680         Table-driven attributes.
5681         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
5682         * decl2.c (cplus_decl_attributes): Only take one attributes
5683         parameter.
5684         * cp-tree.c (cplus_decl_attributes): Update prototype.
5685         * class.c (finish_struct), decl.c (start_decl, start_function),
5686         decl2.c (grokfield), friend.c (do_friend), parse.y
5687         (parse_bitfield): Update calls to cplus_decl_attributes.
5688         * decl.c (grokdeclarator): Take a pointer to a single ordinary
5689         attribute list.
5690         * decl.h (grokdeclarator): Update prototype.
5691         * decl2.c (grokfield): Take a single ordinary attribute list.
5692         * friend.c (do_friend): Likewise.
5693         * decl.c (shadow_tag, groktypename, start_decl,
5694         start_handler_parms, grokdeclarator, grokparms, start_function,
5695         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
5696         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
5697         (process_template_parm, do_decl_instantiation): Pass single
5698         ordinary attribute lists around.
5699         * decl.c (grokdeclarator): Correct handling of nested attributes.
5700         Revert the patch
5701         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
5702                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
5703                 not the left.
5704         .
5705         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
5706         (cp_attribute_table): Declare.
5707         * decl.c (valid_lang_attribute): Don't define.
5708         (lang_attribute_table): Define.
5709         (init_decl_processing): Initialize lang_attribute_table instead of
5710         valid_lang_attribute.
5711         * tree.c (cp_valid_lang_attribute): Remove.
5712         (handle_java_interface_attribute, handle_com_interface_attribute,
5713         handle_init_priority_attribute): New functions.
5714         (cp_attribute_table): New array.
5715         * decl2.c (import_export_class): Don't use
5716         targetm.valid_type_attribute.
5717
5718 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5719
5720         * Make-lang.in (cp/error.o): Depend on real.h
5721         * error.c: #include "real.h"
5722
5723 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5724
5725         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
5726         xmalloc/strcpy/strcat.
5727
5728 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5729
5730         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
5731         Const-ification.
5732         * pt.c (tsubst_decl): Likewise.
5733
5734 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5735
5736         * decl2.c (lang_f_options): Const-ification.
5737         * lex.c (cplus_tree_code_name): Likewise.
5738         * spew.c (yyerror): Likewise.
5739
5740 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
5741
5742         PR c++/3986
5743         * class.c (force_canonical_binfo_r): Check & move an indirect
5744         primary base first.
5745         (force_canonical_binfo): Check that it's not already
5746         canonical.
5747         (mark_primary_virtual_base): Remove BINFO parameter.
5748         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
5749
5750 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
5751
5752         Remove TYPE_NONCOPIED_PARTS.
5753         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
5754         CLASSTYPE_PURE_VIRTUALS.
5755         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
5756         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
5757         (layout_class_type): Don't call fixup_inline_methods here ...
5758         (finish_struct_1): ... call it here.
5759
5760 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
5761
5762         * decl.c (duplicate_decls): Remove code deadling with
5763         DECL_SAVED_INSNS.
5764         * decl2.c (finish_file): Likewise.
5765         * pt.c (instantiate_decl): Likewise.
5766         * semantics.c (expand_body): Don't defer local functions if
5767         they wouldn't be deferred for some other reason.  Don't
5768         generate RTL for functions that will not be emitted.
5769         (genrtl_start_function): Remove code deadling with
5770         DECL_SAVED_INSNS.
5771         (genrtl_finish_function): Likewise.
5772
5773 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
5774
5775         PR c++/4203
5776         * call.c (build_over_call): Do not optimize any empty base
5777         construction.
5778
5779 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5780
5781         * error.c (dump_template_decl): Output template parameters
5782         together with their specifiers.
5783         Output `class' prefix for template template parameter.
5784         (dump_decl): Fix formatting.
5785
5786 2001-08-30  Kurt Garloff  <garloff@suse.de>
5787
5788         * optimize.c (inlinable_function_p): Allow only smaller single
5789         functions. Halve inline limit after reaching recursive limit.
5790
5791 2001-08-30  Joern Rennecke <amylaar@redhat.com>
5792             Jason Merrill  <jason_merrill@redhat.com>
5793
5794         * class.c (build_vtable_entry_ref): Subtract in char*, not
5795         ptrdiff_t.
5796
5797 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
5798
5799         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
5800         (build_cplus_array_type): Use cp_build_qualified_type, not
5801         TYPE_MAIN_VARIANT, to get an unqualified version.
5802
5803         * decl2.c (grok_alignof): Lose.
5804         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
5805         * typeck.c (c_alignof): Lose.
5806         * semantics.c (finish_sizeof, finish_alignof): New.
5807         * parse.y: Use them.
5808         * cp-tree.h: Declare them.
5809
5810 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
5811
5812         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
5813         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
5814         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
5815
5816 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
5817
5818         * typeck2.c (add_exception_specifier): Only require complete type if
5819         not in processing template declaration.
5820
5821 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5822
5823         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
5824         GNU_xref_start_scope and GNU_xref_end_scope.
5825
5826         * tree.c (TYPE_HASH): Moved to ../tree.h.
5827
5828 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
5829
5830         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
5831         on COMPOUND_EXPRs.
5832
5833 2001-08-14  Richard Henderson  <rth@redhat.com>
5834
5835         * class.c, cp-tree.h (build_vfn_ref): Remove.
5836         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
5837
5838 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
5839
5840         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
5841         empty class assignment as having side-effects to avoid
5842         spurious warnings.
5843
5844 2001-08-13  Zack Weinberg  <zackw@panix.com>
5845
5846         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
5847         * except.c: Include libfuncs.h.
5848
5849 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5850
5851         * decl.c (grokdeclarator): Clarify diagnostic message.
5852
5853 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5854
5855         * decl2.c (do_nonmember_using_decl): Replace using directive
5856         with using declaration in the error message.
5857
5858 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5859
5860         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
5861         criterion to avoid rebuilding expression tree instead of
5862         processing_template_decl.
5863
5864 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
5865
5866         Support named return value optimization for inlines, too.
5867         * decl.c (finish_function): Nullify returns here.
5868         * semantics.c (genrtl_start_function): Not here.
5869         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
5870         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
5871         Also nullify the CLEANUP_STMT for the nrv.
5872         * cp-tree.h: Declare it.
5873         * optimize.c (declare_return_variable): Replace the nrv with the
5874         return variable.
5875         * typeck.c (check_return_expr): Be more flexible on alignment check.
5876         Ignore cv-quals when checking for a matching type.
5877
5878 2001-08-09  Richard Henderson  <rth@redhat.com>
5879
5880         * decl2.c (finish_objects): Use target hooks instead of
5881         assemble_constructor and assemble_destructor.
5882
5883 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5884
5885         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
5886
5887 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
5888
5889         PR c++/3820
5890         Stop using TYPE_NONCOPIED_PARTS.
5891         * call.c (build_over_call): Be careful when copy constructing
5892         or assigning to an empty class.
5893         * class.c (check_bases_and_members): It has a
5894         COMPLEX_ASSIGN_REF if it has a vptr.
5895         (layout_class_type): Don't add empty class padding to
5896         TYPE_NONCOPIED_PARTS.
5897         (finish_struct_1): Don't add the VFIELD either.
5898         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
5899         initialization.
5900
5901 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
5902
5903         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
5904
5905 2001-08-06  Richard Henderson  <rth@redhat.com>
5906
5907         * decl2.c (finish_objects): Pass a symbol_ref and priority to
5908         assemble_{constructor,destructor}.  Remove priority handling.
5909
5910 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5911
5912         Don't allow template-id in using-declaration.
5913         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
5914         (do_class_using_decl): Likewise.
5915
5916 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
5917
5918         * cp/spew.c (read_token): No need to pop buffers.
5919
5920 2001-08-02  Stan Shebs  <shebs@apple.com>
5921
5922         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
5923         (fnaddr_from_vtable_entry): Remove decl.
5924         * method.c (use_thunk): Update comment.
5925
5926 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
5927
5928         * repo.c (get_base_filename): Change return value to const char
5929         pointer.
5930
5931 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
5932
5933         Kill -fhonor-std.
5934         * NEWS: Document.
5935         * cp-tree.h (flag_honor_std): Remove.
5936         (CPTI_FAKE_STD): Remove.
5937         (std_node): Remove comment about it being NULL.
5938         (fake_std_node): Remove.
5939         * decl.c (in_fake_std): Remove.
5940         (walk_namespaces_r): Remove fake_std_node check.
5941         (push_namespace): Remove in_fake_std code.
5942         (pop_namespace): Likewise.
5943         (lookup_name_real): Remove fake_std_node check.
5944         (init_decl_processing): Always create std_node. Always add
5945         std:: things there.
5946         (builtin_function): Always put non '_' fns in std.
5947         * decl2.c (flag_honor_std): Remove.
5948         (lang_f_options): Remove honor-std.
5949         (unsupported_options): Add honor-std.
5950         (set_decl_namespace): Remove fake_std_node check.
5951         (validate_nonmember_using_decl): Likewise.
5952         (do_using_directive): Likewise.
5953         (handle_class_head): Likewise.
5954         * dump.c (cp_dump_tree): Likewise.
5955         * except.c (init_exception_processing): Adjust.
5956         * init.c (build_member_call): Remove fake_std_node check.
5957         (build_offset_ref): Likewise.
5958         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
5959         * rtti.c (init_rtti_processing): Adjust.
5960
5961 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
5962
5963         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
5964         operand while calling cp_tree_equal.
5965
5966 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
5967
5968         The 3.0 ABI no longer has vbase pointer fields.
5969         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
5970         FORMAT_VBASE_NAME): Remove.
5971         * method.c (do_build_copy_constructor): Adjust.
5972         (do_build_assign_ref): Adjust.
5973         * search.c (lookup_field_r): Adjust.
5974         * typeck.c (build_component_ref): Adjust.
5975
5976         The 3.0 ABI always has a vtable pointer at the start of every
5977         polymorphic class.
5978         * rtti.c (build_headof_sub): Remove.
5979         (build_headof): Adjust.
5980         (get_tinfo_decl_dynamic): No need to check flag_rtti
5981         here. Adjust.
5982         (create_real_tinfo_var): Explain why we need a hidden name.
5983
5984 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
5985
5986         PR c++/3631
5987         * class.c (update_vtable_entry_for_fn): The fixed adjustment
5988         of a virtual thunk should be from declaring base.
5989
5990 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
5991
5992         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
5993         the shared virtual base, so preserving inheritance graph order.
5994
5995 2001-07-30  Andreas Jaeger  <aj@suse.de>
5996
5997         * decl2.c: Remove unused var global_temp_name_counter.
5998
5999 2001-07-28  Richard Henderson  <rth@redhat.com>
6000
6001         * method.c (pending_inlines): Remove.
6002
6003 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
6004
6005         * class.c (mark_primary_virtual_base): Don't adjust base
6006         offsets here.
6007         (dfs_unshared_virtual_bases): Adjust them here.
6008         (mark_primary_bases): Explain why we adjust at the end.
6009
6010 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
6011
6012         * class.c (finish_struct_1): When copying the primary base's
6013         VFIELD, make sure we find it is at offset zero.
6014
6015 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6016
6017         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
6018         tsubst_expr for default template arguments.
6019
6020 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6021
6022         PR c++/3621
6023         * spew.c (yylex): Only copy the token's lineno, if it is
6024         nonzero.
6025
6026 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6027
6028         PR c++/3624
6029         * call.c (resolve_args): Simplify, call
6030         convert_from_reference.
6031         (build_new_op): Resolve and convert from reference ARG1
6032         earlier. Adjust ARG2 & ARG3 resolve and conversion.
6033
6034 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6035
6036         * decl.c (last_function_parm_tags): Remove.
6037         (current_function_parm_tags): Remove.
6038         (init_decl_processing): Adjust.
6039         (start_function): Adjust.
6040         (store_parm_decls): Adjust.
6041
6042         PR c++/3152
6043         * decl.c (grokdeclarator): Detect when a function typedef is
6044         declaring a function, and create last_function_parms correctly.
6045
6046 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
6047
6048         * call.c (joust): Only prefer a non-builtin candidate to a builtin
6049         one if they have the same signature.
6050
6051         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
6052         it rather than toplevel_bindings_p.  Give it a mangled name if static.
6053         (convert_to_reference): Adjust.
6054         * decl2.c (get_temp_name): Lose.
6055         * mangle.c (mangle_ref_init_variable): New fn.
6056         (mangle_guard_variable): Strip the ref-init header.
6057         * cp-tree.h: Adjust.
6058         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
6059         initializer.
6060         (grok_reference_init): Always use DECL_INITIAL.
6061
6062 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6063
6064         PR c++/3416
6065         * call.c (build_conditional_expr): Recheck args after
6066         conversions.
6067         * cp-tree.h (build_conditional_expr): Move to correct file.
6068         * typeck.c (decay_conversion): Diagnose any unknown types
6069         reaching here.
6070         (build_binary_op): Don't do initial decay or default
6071         conversions on overloaded functions.
6072         (build_static_cast): Don't do a decay conversion here.
6073
6074 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6075
6076         PR c++/3543
6077         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
6078         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
6079
6080 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6081
6082         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
6083         (create_vtbl_ptr): ... here.
6084
6085 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6086
6087         * class.c (build_vbase_offset_vbtl_entries): Look for
6088         non-primary base of which we are a sub vtable.
6089
6090 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
6091
6092         * semantics.c (finish_this_expr):  Remove unused code.
6093
6094 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
6095
6096         Simplify rtti, now we've only one ABI.
6097         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
6098         CPTI_TINFO_VAR_ID.
6099         (tinfo_decl_id, tinfo_var_id): Remove.
6100         (get_typeid_1): Remove.
6101         * rtti.c
6102         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
6103         (typeid_ok_p): New function.
6104         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
6105         (get_tinfo_decl): Remove old abi documentation.
6106         (tinfo_from_decl): Remove.
6107         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
6108         (get_typeid_1): Remove.
6109         (get_base_offset): Remove.
6110         (synthesize_tinfo_var): Absorb get_base_offset.
6111         (create_real_tinfo_var): Don't use tinfo_decl_id.
6112
6113 2001-07-23  Graham Stott  <grahams@redhat.com>
6114
6115         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
6116         variable has_two_argument_delete_p.
6117
6118 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
6119
6120         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
6121         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
6122         (CPTI_INDEX_IDENTIFIER): Remove.
6123         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
6124         (delta2_identifier): Remove.
6125         (index_identifier): Remove.
6126         (pfn_or_delta2_identifier): Remove.
6127         (flag_vtable_thunks): Remove.
6128         (VTABLE_DELTA2_NAME): Remove.
6129         (VTABLE_INDEX_NAME): Remove.
6130         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
6131         (vfunc_ptr_type_node): Adjust.
6132         (VTABLE_NAME_PREFIX): Adjust.
6133         (build_vfn_ref): Lose first parameter.
6134         (fixup_all_virtual_upcast_offsets): Remove.
6135         * decl.c (initialize_predefined_identifiers): Remove
6136         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
6137         (init_decl_processing): Remove no-vtable-thunk code.
6138         * decl2.c (flag_vtable_thunks): Remove.
6139         (mark_vtable_entries): Remove no-vtable-thunk code.
6140         * error.c (dump_decl): Remove no-vtable-thunk code.
6141         (dump_expr): Adjust ptr to member function code.
6142         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
6143         code.
6144         * rtti.c (build_headof): Remove no-vtable-thunk code.
6145         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
6146         * search.c (get_base_distance): Remove expand_upcast_fixups case.
6147         (virtual_context) Remove.
6148         (expand_upcast_fixups): Remove.
6149         (fixup_virtual_upcast_offsets): Remove.
6150         (fixup_all_virtual_upcast_offsets): Remove.
6151         * typeck.c (get_member_function_from_ptrfunc): Remove
6152         no-vtable-thunk code.
6153         * call.c (build_over_call): Adjust call to build_vfn_ref.
6154         * class.c (build_vfn_ref): Lose first parameter. Remove
6155         no-vtable-thunk code.
6156         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
6157         (build_vtable_entry): Remove no-vtable-thunk code.
6158
6159 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
6160
6161         Remove old-abi remnants. Remove comments about old abi
6162         behavior. Remove references to 'new-abi' in comments.
6163         * cp-tree.h: Adjust comments.
6164         (vbase_offsets_in_vtable_p): Delete.
6165         (vcall_offsets_in_vtable_p): Delete.
6166         (vptrs_present_everywhere_p): Delete.
6167         (all_overridden_vfuns_in_vtables_p): Delete.
6168         (merge_primary_and_secondary_vtables_p): Delete.
6169         (TYPE_CONTAINS_VPTR_P): Adjust.
6170         (VTT_NAME_PREFIX): Remove.
6171         (CTOR_VTBL_NAME_PREFIX): Remove.
6172         (init_vbase_pointers): Remove.
6173         * class.c: Adjust coments.
6174         (build_vbase_pointer_fields): Delete.
6175         (build_vbase_pointer): Remove old-abi code.
6176         (build_secondary_vtable): Likewise.
6177         (modify_all_vtables): Likewise.
6178         (create_vtable_ptr): Likewise.
6179         (layout_class_type): Likewise.
6180         (finish_struct_1): Likewise.
6181         (finish_vtbls): Likewise.
6182         (dfs_finish_vtbls): Delete.
6183         (build_vbase_offset_vtbl_entries): Remove old-abi code.
6184         * cvt.c: Adjust comments.
6185         * decl.c: Adjust comments.
6186         * decl2.c: Adjust comments.
6187         * init.c: Adjust comments.
6188         (construct_virtual_bases): Remove old-abi code.
6189         * lang-specs.h: Remove -fno-new-abi.
6190         * mangle.c: Adjust comments.
6191         * rtti.c: Adjust comments.
6192         (get_base_offset): Remove old-abi-code.
6193         * search.c: Adjust comments.
6194         (dfs_init_vbase_pointers): Remove.
6195         (dfs_vtable_path_unmark): Remove.
6196         (init_vbase_pointers): Remove.
6197         * semantics.c: Adjust comments.
6198         (emit_associated_thunks): Remove old-abi code.
6199         * typeck.c: Adjust comments.
6200
6201 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
6202
6203         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
6204         params.h.
6205
6206 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
6207
6208         * class.c (finish_struct_anon): Forbid nested classes.
6209
6210 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
6211
6212         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
6213         * optimize.c: Include debug.h.
6214         (maybe_clone_body): Use debug hook.
6215         * semantics.c: Include debug.h.
6216         (expand_body): Use debug hook.
6217
6218 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
6219
6220         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
6221
6222 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
6223
6224         * class.c (type_requires_array_cookie): New function.
6225         (check_methods): Don't try to figure out whether the type needs a
6226         cookie here.
6227         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
6228         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
6229         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
6230         * pt.c (instantiate_class_template): Don't set
6231         TYPE_VEC_DELETE_TAKES_SIZE.
6232         * NEWS: Document ABI changes from GCC 3.0.
6233
6234 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
6235             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
6236
6237         * NEWS (Changes in GCC 3.0): Fix typo.
6238
6239 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6240
6241         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
6242         which attributes are to be attached, and a flags argument.  Update
6243         call to decl_attributes.
6244         (grokfield): Update call to decl_attributes.
6245         * class.c (finish_struct): Update call to cplus_decl_attributes.
6246         * cp-tree.h (cplus_decl_attributes): Update prototype.
6247         * decl.c (start_decl, grokdeclarator, start_function): Update
6248         calls to decl_attributes and cplus_decl_attributes.
6249         * friend.c (do_friend): Update call to cplus_decl_attributes.
6250         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
6251
6252 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
6253
6254         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
6255         for `register' variables with an asm-specification.
6256
6257 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
6258
6259         * semantics.c (finish_asm_stmt): Mark the output operands
6260         to an asm addressable, if necessary.
6261
6262 2001-07-11  Ben Elliston  <bje@redhat.com>
6263
6264         * Revert this change -- there is a subtle bug.
6265
6266         PR c++/80
6267         * decl.c (finish_enum): New "attributes" argument; pass it to
6268         cplus_decl_attributes.  Use a narrower type if the enum is packed.
6269         * cp-tree.h (finish_enum): Adjust prototype.
6270         * parse.y (enum_head): New non-terminal.
6271         (structsp): Use it. Enums now may be preceded or followed by
6272         optional attributes -- pass their chained tree to finish_enum().
6273         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
6274
6275 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
6276
6277         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
6278         variables.
6279
6280 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
6281
6282         * semantics.c (cp_expand_stmt): Fix for null
6283         current_function_return_value.
6284
6285 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
6286
6287         * call.c (build_op_delete_call): Initialize fn.
6288         (convert_like_real): Delete conditional.
6289         (joust): Initialize *w and *l.
6290         * class.c: Add prototype for binfo_ctor_vtable.
6291         (get_primary_binfo): Initialize result.
6292         * init.c (build_java_class_ref): Initialize name.
6293
6294 2001-07-09  Erik Rozendaal  <dlr@acm.org>
6295
6296         * typeck.c (unary_complex_lvalue): Do not duplicate the
6297         argument to modify, pre-, or post-increment when used as an
6298         lvalue and when the argument has side-effects.
6299
6300 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6301
6302         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
6303         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
6304         cplus_decl_attributes even if attrs is NULL.
6305         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
6306
6307 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6308
6309         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
6310         calls to decl_attributes.
6311
6312 2001-07-06  Ira Ruben   <ira@apple.com>
6313
6314         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
6315         be DECL_TEMPLATE_RESULT.
6316
6317 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6318
6319         * cp-tree.h (copy_template_template_parm): Rename to ...
6320         (bind_template_template_parm): ... here.
6321         * tree.c (copy_template_template_parm): Rename to ...
6322         (bind_template_template_parm): ... here.  Remove the case when
6323         NEWARGS is NULL_TREE.
6324         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
6325         BOUND_TEMPLATE_TEMPLATE_PARM.
6326         * pt.c (lookup_template_class): Adjust.
6327
6328 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
6329
6330         * cvt.c (convert_lvalue): New fn.
6331         * cp-tree.h: Declare it.
6332         * method.c (do_build_assign_ref): Use it.
6333         (do_build_copy_constructor): Convert parm to base types
6334         before calling base constructors.
6335
6336         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
6337         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
6338         optimize.
6339         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
6340
6341 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
6342
6343         * optimize.c (optimize_inline_calls): New function, broken out
6344         of ...
6345         (optimize_function): ... here. Call it. Don't inline if it is
6346         a thunk.
6347         (dump_function): Print name of dump flag causing this dump.
6348         * semantics.c (expand_body): Move thunk inline check to
6349         optimize_function.
6350
6351 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6352
6353         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
6354         (comptypes): Use target.comp_type_attributes.
6355
6356 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
6357
6358         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
6359
6360 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6361
6362         * error.c (lang_print_error_function): Add a `diagnostic_context *'
6363         parameter. Tweak.
6364
6365 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6366
6367         * decl2.c (import_export_class): Update.
6368
6369 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6370
6371         * error.c (init_error): Adjust settings.
6372
6373 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6374
6375         * error.c (init_error): Adjust settings.
6376
6377 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
6378
6379         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
6380         return pointers to data members by reference rather than by value.
6381
6382 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
6383
6384         Implement the Named Return Value optimization.
6385         * cp-tree.h (struct cp_language_function): Add x_return_value.
6386         (current_function_return_value): Now a macro.
6387         * decl.c: Don't define it.
6388         (define_label, finish_case_label): Don't clear it.
6389         (init_decl_processing): Don't register it with GC.
6390         * semantics.c (genrtl_finish_function): Don't check it for
6391         no_return_label.  Copy the RTL from the return value to
6392         current_function_return_value and walk, calling...
6393         (nullify_returns_r): ...this new fn.
6394         * typeck.c (check_return_expr): Set current_function_return_value.
6395
6396 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
6397
6398         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
6399         sharing a ctor vtable with.  Merge code for cases 1 and 2.
6400         (binfo_ctor_vtable): New fn.
6401         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
6402
6403 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
6404
6405         * class.c (dfs_find_final_overrider): Fix logic.
6406
6407         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
6408         virtual thunk instead of non-virtual.
6409         (get_matching_virtual): Uncomment.
6410
6411         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
6412         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
6413         PARM, not ARG.
6414
6415 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
6416
6417         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
6418         we've not emerged from the hierarchy of RTTI_BINFO on reaching
6419         a non-virtual base.
6420
6421 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
6422
6423         * NEWS: Update release number.
6424
6425 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
6426
6427         PR c++/3130, c++/3131, c++/3132
6428         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
6429         * class.c (force_canonical_binfo_r): Move
6430         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
6431         virtual bases unless they're primary and what they're primary
6432         too has been moved.
6433         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
6434         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
6435         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
6436         derived binfo.
6437         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
6438         (layout_nonempty_base_or_field): Add most derived type
6439         parameter. Adjust.
6440         (layout_empty_base): Likewise.
6441         (build_base_field): Likewise.
6442         (build_base_fields): Likewise.
6443         (propagate_binfo_offsets): Add most derived type
6444         parameter. Skip non canonical virtual bases too.
6445         (dfs_set_offset_for_unshared_vbases): Don't skip primary
6446         bases. Do skip canonical bases.
6447         (layout_virtual_bases): Adjust.
6448         (layout_class_type): Adjust.
6449         (dfs_get_primary_binfo): Build list of virtual primary base
6450         candidates.
6451         (get_primary_binfo): Check that the shared virtual primary
6452         base candidate was found first.
6453         (accumulate_vtbl_inits): Don't do anything for non-vptr
6454         containing binfos. For case 1 primary virtual bases, keep
6455         checking that we've not emerged from the hierarchy of RTTI_BINFO.
6456
6457 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
6458
6459         PR c++/3089
6460         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
6461         hierarchy looking for primary bases for a ctor
6462         vtable. Recursively call oneself, if we meet our primary via
6463         this route and haven't met it yet via inheritance graph order.
6464
6465 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
6466
6467         * lang-options.h: Emit documentation for -fno-honor-std, not
6468         -fhonor-std.
6469
6470 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
6471
6472         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
6473         Don't clobber delta.
6474         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
6475
6476 2001-06-10  Mark Mitchell <mark@codesourcery.com>
6477             Gabriel Dos Reis  <gdr@codesourcery.com>
6478
6479         * Make-lang.in (cp/call.o): Depend on diagnostic.h
6480         (cp/typeck.o): Depend on diagnostic.h
6481         (cp/typeck2.o): Depend on diagnostic.h
6482         (cp/repo.o): Depend on dignostic.h
6483         * typeck.c: #include diagnostic.h
6484         (convert_for_initialization): Remove extern declaration for
6485         warningcount and errorcount.
6486
6487         * call.c: #include diagnostic.h
6488         (convert_like_real): Remove extern declaration for warnincount and
6489         errorcount.
6490
6491         * repo.c: #include diagnostic.h
6492         * typeck2.c: #include diagnostic.h
6493
6494 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
6495
6496         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
6497         in previous change.
6498
6499 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
6500
6501         PR c++/2929
6502         * friend.c (do_friend): Use push_decl_namespace for classes at
6503         namespace scope.
6504
6505 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
6506             Jason Merrill <jason_merrill@redhat.com>
6507
6508         PR c++/3061
6509         * class.c (build_secondary_vtable): Use assert, rather than an error
6510         message.
6511         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
6512         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
6513         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
6514         Don't set BINFO_VTABLE for a primary virtual base.
6515
6516 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
6517
6518         * decl.c (duplicate_decls): Update source position information
6519         when a template function is defined.
6520
6521 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
6522
6523         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
6524
6525 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
6526
6527         PR c++/2914
6528         * decl.c (pushtag): Don't push into a complete type's scope.
6529
6530 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
6531
6532         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
6533         (struct lang_decl_flags): Lose generate_with_vtable_p.
6534         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
6535         * class.c (copy_virtuals): Adjust.
6536         * decl2.c (mark_vtable_entries): Adjust.
6537         * method.c (make_thunk, build_vtable_entry): Adjust.
6538         * class.c (update_vtable_entry_for_fn): Only look as far as the
6539         first defining class.
6540         (build_vtbl_initializer): Put nothing in the slot for a function only
6541         defined in a lost primary virtual base.
6542         (add_vcall_offset_vtbl_entries_1): Use the same code for
6543         the lost primary case and the normal case.
6544         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
6545         (get_vfield_offset, get_derived_offset): Lose.
6546         (dfs_find_final_overrider): Use look_for_overrides_here.
6547         (get_matching_virtual): New fn.
6548         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
6549         not BV_VCALL_INDEX.
6550         * search.c (look_for_overrides_here): Split out from...
6551         (look_for_overrides_r): Here.
6552
6553         * class.c (find_final_overrider): Return error_mark_node on error.
6554
6555         * decl2.c (key_method): #if 0 accidental change.
6556
6557 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6558
6559         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
6560         (build_over_call): Likewise.
6561         * decl.c (grokparms): Likewise.
6562         * pt.c (tsubst_decl): Likewise.
6563         * typeck.c (convert_arguments): Likewise.
6564
6565 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
6566
6567         * semantics.c (begin_class_definition): Robustify.
6568
6569         * pt.c (instantiate_decl): Tell the repository code about the
6570         clones, not the cloned functions.
6571         * repo.c (repo_template_used): Explicitly instantiate the cloned
6572         function, not the clones.
6573
6574 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
6575
6576         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
6577         ICS_BAD_FLAG on created conversion.
6578         (compare_ics): Break out rank.
6579
6580 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
6581
6582         * decl.c (xref_tag): Remove extraneous %s on dependent name
6583         lookup warning.
6584
6585 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
6586
6587         * class.c (layout_vtable_decl): Fix off by one error on
6588         build_index_type.
6589         (build_vtt): Likewise.
6590         (build_ctor_vtbl_group): Likewise.
6591
6592 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
6593
6594         * class.c (maybe_indent_hierarchy): New function.
6595         (dump_class_hierarchy_r): Add flags. Dump extra binfo
6596         information, if enabled. Use maybe_indent_hierarchy. Adjust
6597         output format.
6598         (dump_class_hierarchy): Adjust prototype. Adjust output format.
6599         (dump_array, dump_vtable, dump_vtt): New functions.
6600         (finish_struct_1): Adjust hierarchy dumping.
6601         (initialize_vtable): Call dump_vtable.
6602         (build_vtt): Call dump_vtt.
6603         (build_ctor_vtbl_group): Call dump_vtable.
6604         * decl2.c (flag_dump_class_layout): Remove.
6605         (cxx_decode_option): Remove dump translation unit
6606         and dump class hierarchy check. Call dump_switch_p.
6607         (finish_file): Adjust dumping.
6608         (dump.c): Only dump base classes if not TDF_SLIM.
6609         Only dump namespace members if not TDF_SLIM.
6610         * optimize.c (dump_function): New function.
6611         (optimize_function): Call dump_function.
6612         * semantics.c (expand_body): Use dump_enabled_p.
6613
6614 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
6615
6616         PR g++/2936
6617         Part missed from first commit
6618         * decl2.c (finish_anon_union): Copy context.
6619
6620 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
6621
6622         PR g++/2936
6623         * optimize.c (remap_decl): Remap anonymous aggregate members too.
6624
6625 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
6626
6627         PR g++/2823
6628         * semantics.c (expand_body): Don't optimize thunks.
6629
6630 2001-05-25  Sam TH  <sam@uchicago.edu>
6631
6632         * cp-tree.h lex.h: Fix header include guards.
6633
6634 2001-05-25  Mark Mitchell <mark@codesourcery.com>
6635
6636         * decl.c (init_decl_processing): Tweak.
6637
6638 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
6639
6640         * decl.c (duplicate_decls): Tidy.
6641         (init_decl_processing): Always set flag_no_builtin.
6642
6643 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
6644
6645         PR c++/2184
6646         * decl2.c (do_local_using_decl): Push the decls, even in a
6647         template.
6648
6649 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
6650
6651         * optimize.c (initialize_inlined_parameters): Don't set
6652         TREE_READONLY for a VAR_DECL taking the place of an inlined
6653         PARM_DECL.
6654
6655 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
6656
6657         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
6658         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
6659         attribute.
6660
6661 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
6662
6663         * parse.y: Refer to compound literals as such, not as
6664         constructor-expressions.
6665
6666 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
6667
6668         * call.c (build_op_delete_call): Ignore exception-specifications
6669         when looking for matching delete operators.
6670         * init.c (build_new_1): Compute whether or not the allocation
6671         function used is a placement allocation function or not, and
6672         communicate this information to build_op_delete_call.
6673
6674 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
6675
6676         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
6677         (build_vtbl_ref): Adjust.
6678         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
6679         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
6680         Re-add vtable-gc.
6681         (unsupported_options): Correspondingly.
6682
6683         * decl2.c (maybe_make_one_only): Check flag_weak, not
6684         supports_one_only().
6685
6686         * cp-tree.def (START_CATCH_STMT): Lose.
6687         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
6688         * tree.c (cp_statement_code_p): Don't case it.
6689         * semantics.c (cp_expand_stmt): Likewise.
6690         * cp-tree.h (START_CATCH_TYPE): Lose.
6691         (HANDLER_TYPE): New.
6692         * except.c (expand_start_catch_block): Don't start any blocks.
6693         Return the type.
6694         (expand_end_catch_block): Don't end any blocks.
6695         * parse.y (handler): Don't pass anything from finish_handler_parms
6696         to finish_handler.
6697         * pt.c (tsubst_expr): Likewise.
6698         * semantics.c (begin_handler): Call note_level_for_catch here.
6699         (finish_handler_parms): Don't return anything.
6700         (genrtl_catch_block, begin_catch_block): Lose.
6701         (genrtl_handler): Call expand_start_catch here.
6702
6703 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
6704
6705         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
6706         (get_vtable_decl, build_vtt): Not here.
6707
6708 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
6709
6710         PR c++/2781
6711         * optimize.c (update_cloned_parm): Copy addressability and other
6712         flags.
6713
6714 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6715
6716         * pt.c (determine_specialization): Ignore artificial functions.
6717
6718 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
6719
6720         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
6721         (C_RID_CODE): Remove.
6722         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
6723         (init_parse): Don't do it here.
6724
6725 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
6726
6727         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
6728         function declaration to avoid stripping the symbol's attributes.
6729
6730 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
6731
6732         * decl.c (pushdecl): Adjust error string.
6733         (xref_tag): Adjust friend class injection warning. Remove the
6734         inherited name from the class shadowed scope.
6735
6736 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
6737
6738         * except.c (cp_protect_cleanup_actions): New function.
6739         (init_exception_processing): Don't set protect_cleanup_actions
6740         here.  Do set lang_protect_cleanup_actions.
6741
6742 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
6743
6744         * spew.c (read_token): Call yyerror on all unexpected tokens.
6745
6746 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
6747
6748         * init.c (member_init_ok_or_else): Take a tree rather than
6749         string for name.
6750         (expand_member_init): Adjust.
6751
6752 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
6753
6754         * decl.c (duplicate_decls): Suppress warning about duplicate
6755         decls if the first decl is a friend.
6756
6757 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
6758
6759         * except.c (choose_personality_routine): Export.  Add
6760         explanatory comment.  Take an enum languages, not a boolean.
6761         (initialize_handler_parm): Adjust to match.
6762         * cp-tree.h: Prototype choose_personality_routine.
6763         * lex.c (handle_pragma_java_exceptions): New function.
6764         (init_cp_pragma): Register #pragma GCC java_exceptions.
6765
6766 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6767
6768         * method.c (build_mangled_C99_name): Remove unused prototype.
6769
6770 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
6771
6772         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
6773         * typeck.c (get_member_function_from_ptrfunc,
6774         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
6775         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
6776
6777         Reverted Geoff Keating's 2001-05-03's patch.
6778
6779 2001-05-11  Ira Ruben   <ira@apple.com>
6780
6781         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
6782
6783 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
6784
6785         * cp-tree.h (finish_label_expr, lookup_label): Delete.
6786         * parse.y: Update for '&&'; don't issue warning here.
6787         * semantics.c (finish_label_expr): Delete.
6788
6789 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
6790
6791         * splay-tree.h (splay_tree_max): New function.
6792         (splay_tree_min): Likewise.
6793
6794 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
6795
6796         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
6797         (pfn_vflag_identifier): Define.
6798         Update comment about layout of pointer functions.
6799         (build_ptrmemfunc1): Update prototype.
6800         (expand_ptrmemfunc_cst): Update prototype.
6801         * decl.c (initialize_predefined_identifiers): Initialize
6802         pfn_vflag_identifier.
6803         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
6804         an extra field to the type.
6805         * expr.c (cplus_expand_constant): Pass 'flag' between
6806         expand_ptrmemfunc_cst and build_ptrmemfunc1.
6807         * typeck.c (get_member_function_from_ptrfunc): When
6808         FUNCTION_BOUNDARY < 16, look at additional field to determine
6809         if a pointer-to-member is a real pointer or a vtable offset.
6810         (build_ptrmemfunc1): Add new parameter to contain extra field.
6811         (build_ptrmemfunc): Pass the extra field around.
6812         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
6813         (pfn_from_ptrmemfunc): Ignore the extra field.
6814
6815 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
6816
6817         * cp-tree.h (flag_inline_trees): Update documentation.
6818         * decl.c (init_decl_processing): Adjust handling of
6819         flag_inline_functions and flag_inline_trees to support -O3.
6820         (grokfndecl): Set DECL_INLINE on all functions if that's what
6821         the user requested.
6822         (save_function_data): Clear DECL_INLINE in
6823         current_function_cannot_inline is non-NULL.
6824         * decl2.c (flag_inline_trees): Update documentation.
6825
6826 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
6827
6828         * dump.c (cp_dump_tree, USING_STMT case): New case.
6829         * tree.c (cp_statement_code_p): Add USING_STMT.
6830         * decl2.c (do_using_directive): Add the using directive statement.
6831
6832         * tree.c (walk_tree): Reformat an if block.
6833
6834 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
6835
6836         * decl.c (compute_array_index_type): Don't try to do anything with
6837         the indices when processing a template.
6838
6839 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6840
6841         * call.c: NULL_PTR -> NULL.
6842         * class.c: Likewise.
6843         * cvt.c: Likewise.
6844         * decl.c: Likewise.
6845         * decl2.c: Likewise.
6846         * except.c: Likewise.
6847         * init.c: Likewise.
6848         * rtti.c: Likewise.
6849         * search.c: Likewise.
6850         * tree.c: Likewise.
6851         * typeck.c: Likewise.
6852         * typeck2.c: Likewise.
6853
6854 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
6855
6856         * decl2.c (do_using_directive): Revert previous patch.
6857
6858 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6859
6860         * cp-tree.def (USING_STMT): New statement node.
6861         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
6862         * decl2.c (do_using_directive): Add USING_STMT to statement
6863         tree. Don't emit errors when processing template decl.
6864         * pt.c (tsubst_expr, USING_STMT case): New case.
6865         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
6866
6867 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6868
6869         * call.c (build_new_op): Convert args from reference here.
6870         (build_conditional_expr): Don't convert here.
6871
6872 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6873
6874         * spew.c (last_token_id): New static variable.
6875         (read_token): Set it here.
6876         (yyerror): Use it here.
6877
6878 2001-04-30  Richard Henderson  <rth@redhat.com>
6879
6880         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
6881         * decl.c: Likewise.
6882
6883 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
6884
6885         * gxxint.texi: Remove.
6886         * Make-lang.in: Remove all traces of gxxint.texi.
6887
6888 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
6889
6890         * decl2.c (start_static_initialization_or_destruction): Correct
6891         logic to handle the -fno-use-cxa-atexit case.
6892
6893 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
6894
6895         * optimize.c (update_cloned_parm): New function.
6896         (maybe_clone_body): Use it.  Update the `this' parameter too.
6897
6898 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6899
6900         * decl2.c (unsupported_options): Add new-abi.
6901         * lang-options.h: Remove no longer supported options.
6902
6903 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
6904
6905         * except.c (can_convert_eh): Don't check template parms,
6906         typename types etc.
6907
6908 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
6909
6910         * optimize.c (maybe_clone_body): Copy parameter names and locations.
6911
6912 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
6913
6914         * cp-tree.h (adjust_clone_args): Prototype new function.
6915         * class.c (adjust_clone_args): New function.
6916         * decl.c (start_function): Call it for in charge ctors.
6917
6918 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
6919
6920         * method.c (use_thunk): Make sure that thunks really are emitted
6921         when requested.
6922
6923 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
6924
6925         * mangle.c (write_chars): New macro.
6926         (hwint_to_ascii): New function
6927         (write_number): Use it.
6928         (write_integer_cst): Deal with really big numbers.
6929
6930 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
6931
6932         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
6933         the clone.
6934
6935 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
6936
6937         * decl.c (grokdeclarator): Set context of namespace scope
6938         TYPE_DECLS.
6939
6940 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
6941
6942         * cp/optimize.c: Include hashtab.h.
6943         (struct inline_data): Add tree_pruner.
6944         (expand_call_inline, expand_calls_inline): Use it when calling
6945         walk_tree.
6946         (optimize_function): Initialize and free tree_pruner.
6947
6948 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
6949
6950         Lazy __FUNCTION__ generation.
6951         * cp-tree.def (FUNCTION_NAME): Remove.
6952         * cp-tree.h (function_name_declared_p): Remove.
6953         (cp_fname_init): Prototype.
6954         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
6955         don't call declare_function_name. Call start_fname_decls.
6956         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
6957         clobber the line number.
6958         (cp_fname_init): New function.
6959         (start_function): Call start_fname_decls.
6960         (finish_function): Call finish_fname_decls.
6961         * lex.c (reswords): Add slots for __FUNCTION__ et al.
6962         (rid_to_yy): Add mappings for __FUNCTION__ et al.
6963         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
6964         * parse.y (VAR_FUNC_NAME): New token.
6965         (primary): Add VAR_FUNC_NAME.
6966         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
6967         generation.
6968         (tsubst, FUNCTION_NAME case): Remove.
6969         (tsubst_copy, FUNCTION_NAME case): Remove.
6970         (tsubst_expr, DECL_STMT case): Be careful with a
6971         DECL_PRETTY_FUNCTION_P.
6972         (instantiate_decl): Remove function_name_declared_p.
6973         * semantics.c (begin_compound_statement): Don't call
6974         declare_function_name here.
6975         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
6976         (finish_translation_unit): Call finish_fname_decls.
6977         (expand_body): Remove function_name_declared_p.
6978         * typeck2.c (digest_init): Allow any ERROR_MARK.
6979
6980 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
6981
6982         * pt.c (tsubst_decl): Use VOID_TYPE_P.
6983         * semantics.c: Fix some typos.
6984
6985 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
6986
6987         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
6988
6989 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6990
6991         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
6992
6993 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
6994
6995         * except.c (build_throw): Wrap the initialization of the exception
6996         object in a MUST_NOT_THROW_EXPR.
6997         (do_free_exception): #if 0.
6998
6999 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
7000
7001         * cp-tree.h (finish_enum): Change prototype.
7002         * decl.c (finish_enum): Reorganize.
7003         * parse.y (structsp): Adjust calls to finish_enum.
7004
7005 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7006
7007         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
7008         't' case.
7009
7010 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7011
7012         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
7013         (layout_empty_base): Return at end flag.
7014         (build_base_field): Likewise.
7015         (build_base_fields): Likewise.
7016         (layout_virtual_bases): Don't add 1 to eoc value.
7017         (end_of_class): Use full size for empty bases.
7018         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
7019         empty bases. Don't add 1 to eoc value. Only add trailing padding
7020         if we're an empty class with no empty bases.
7021         (dump_class_hierarchy): Dump size and alignment.
7022
7023 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
7024
7025         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
7026         ICS_BAD_FLAG.
7027
7028 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
7029
7030         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
7031         is found, look first if name does not match the structure name.
7032
7033 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
7034
7035         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
7036         set.
7037         (SET_DECL_LANGUAGE): New macro.
7038         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
7039         (pushdecl): Likewise.
7040         (build_library_fn_1): Likewise.
7041         (build_cp_library_fn): Likewise.
7042         (grokfndecl): Likewise.
7043         (grokvardecl): Mark `extern "C"' variables as having C linkage.
7044         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
7045         * lex.c (retrofit_lang_decl): Likewise.
7046         * mangle.c (mangle_decl_string): Don't mangle the names of
7047         variables declared with C language linkage.
7048         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
7049
7050 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7051
7052         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
7053         flag_access_control from uninitialized storage.
7054
7055 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
7056
7057         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
7058         * mangle.c (write_pointer_to_member_type): Fix mangling of
7059         pointers to cv-qualified member function types.
7060
7061         * init.c (build_delete): Create a SAVE_EXPR for the address if
7062         we're going to use it more than once.
7063
7064 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
7065
7066         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
7067         (expand_ptremfunc_cst): Change prototype.
7068         (delta2_from_ptrmemfunc): Remove.
7069         * expr.c (cplus_expand_constant): Adjust call to
7070         expand_ptrmemfunc_cst.
7071         * typeck.c (build_ptrmemfunc1): Simplify.
7072         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
7073         results in a constant.
7074         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
7075         (delta2_from_ptrmemfunc): Remove.
7076         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
7077
7078 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
7079
7080         * cp-tree.h (decl_namespace_list): New macro.
7081         (struct saved_scope): Add decl_ns_list.
7082         * decl.c (mark_saved_scope): Mark it.
7083         * decl2.c: Lose static decl_namespace_list.
7084         (init_decl2): Don't save it.
7085
7086 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7087
7088         * cp-tree.h (warn_return_type, yylex): Delete redundant
7089         declarations.
7090
7091         * decl.c (current_class_depth, global_namespace): Likewise.
7092
7093         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
7094
7095         * repo.c (flag_use_repository): Likewise.
7096
7097 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7098
7099         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
7100         set_block, pushdecl, getdecls, gettags, init_decl_processing,
7101         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
7102         lvalue_or_else, print_lang_statistics, comp_target_types,
7103         unsigned_type, signed_type, signed_or_unsigned_type,
7104         build_function_call, mark_addressable, incomplete_type_error):
7105         Delete redundant declarations.
7106
7107 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
7108
7109         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
7110         (TYPE_ANONYMOUS_P): New macro.
7111         (TAGGED_TYPE_P): New macro.
7112         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
7113         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
7114         * tree.c (no_linkage_helper): Likewise.
7115         * semantics.c (begin_class_definition): Likewise.
7116         * pt.c (convert_template_argument): Likewise.
7117         * lex.c (check_for_missing_semicolon): Likewise.
7118
7119 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
7120
7121         * class.c (dfs_unshared_virtual_bases): New function.
7122         (mark_primary_bases): Call it.
7123         (check_bases): Ignore virtual bases when determining
7124         nearly-emptiness.
7125
7126 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
7127
7128         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
7129
7130 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
7131
7132         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
7133         cloned function to the clone.
7134
7135 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7136
7137         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
7138
7139         * semantics.c: Include expr.h.
7140
7141 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
7142
7143         * method.c (implicitly_declare_fn): Commonize code for copy ctor
7144         and assignment op. Set TREE_USED for parameter.
7145
7146 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
7147
7148         * class.c (find_final_overrider_data): Add `candidates'.
7149         (dfs_find_final_overrider): Don't issue error messages
7150         prematurely.
7151         (find_final_overrider): Issue error messages here.
7152         (build_base_field): Don't warn about amgibuous direct bases here.
7153         (warn_about_ambiguous_direct_bases): New function.
7154         (layout_class_type): Use it.
7155
7156 2001-04-10  Richard Henderson  <rth@redhat.com>
7157
7158         * typeck.c (build_array_ref): Push the array reference inside
7159         COMPOUND_EXPR and COND_EXPR.
7160
7161 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
7162
7163         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
7164         * decl.c (duplicate_decls): Adjust accordingly.
7165         (maybe_commonize_var): Likewise.
7166         (grokfndecl): Likewise.
7167         (start_function): Likewise.
7168         (start_method): Likewise.
7169         * decl2.c (key_method): Likewise.
7170         (import_export_decl): Likewise.
7171         * method.c (implicitly_declare_fn): Likewise.
7172         * optimize.c (maybe_clone_body): Likewise.
7173
7174 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
7175
7176         * lang-specs.h: Add __DEPRECATED.
7177
7178 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
7179
7180         * search.c (get_dynamic_cast_base_type): When building a new
7181         constant, set its type to ssizetype.
7182
7183 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
7184
7185         * optimize.c (expand_call_inline): Only add newly inlined statements
7186         into inlined_stmts.
7187
7188 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
7189
7190         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
7191         (OPERATOR_FORMAT): Likewise.
7192         (OPERATOR_TYPENAME_FORMAT): Likewise.
7193         * operators.def: Remove old name-mangling information.
7194         * decl.c (grok_op_properties): Adjust accordingly.
7195         * lex.c (init_operators): Likewise.
7196         * rtti.c (get_tinfo_decl): Issue error messages about types that
7197         have variable size.
7198
7199 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
7200
7201         * decl2.c (import_export_decl): Don't call import_export_class
7202         when processing an inline member function.
7203         * semantics.c (expand_body): Call import_export_decl before
7204         emitting inline functions.
7205
7206 2001-03-28  Richard Henderson  <rth@redhat.com>
7207
7208         IA-64 ABI Exception Handling:
7209         * cp-tree.def (EH_SPEC_BLOCK): New.
7210         (MUST_NOT_THROW_EXPR): New.
7211         * cp-tree.h: Update changed function declarations.
7212         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
7213         (CPTI_CALL_UNEXPECTED): New.
7214         (struct cp_language_function): Rename x_eh_spec_try_block
7215         to x_eh_spec_block.
7216         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
7217         * decl.c (current_binding_level): If no current function
7218         bindings, revert to scope_chain.
7219         (initialize_predefined_identifiers): Remove __cp_push_exception.
7220         (store_parm_decls): Use begin_eh_spec_block.
7221         (finish_function): Use finish_eh_spec_block.
7222         (mark_lang_function): Update for name changes.
7223         * decl2.c (finish_file): No mark_all_runtime_matches.
7224         * dump.c (cp_dump_tree): Handle new tree codes.
7225         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
7226         * except.c (catch_language_init, catch_language): Remove.
7227         (init_exception_processing): Don't set language code.
7228         Initialize call_unexpected_node, protect_cleanup_actions,
7229         eh_personality_libfunc, lang_eh_runtime_type.
7230         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
7231         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
7232         (prepare_eh_type): Split out type canonicalizations ...
7233         (build_eh_type_type): ... from here.
7234         (build_eh_type_type_ref): Remove.
7235         (mark_all_runtime_matches): Remove.
7236         (build_exc_ptr): New.
7237         (do_begin_catch, do_end_catch): New.
7238         (do_pop_exception): Remove.
7239         (build_terminate_handler): Remove.
7240         (choose_personality_routine): Split out language choice from ...
7241         (initialize_handler_parm): ... here.
7242         Use MUST_NOT_THROW_EXPR.
7243         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
7244         exception object handling.
7245         (expand_start_eh_spec, expand_end_eh_spec): Remove.
7246         (expand_exception_blocks, alloc_eh_object): Remove.
7247         (begin_eh_spec_block, finish_eh_spec_block): New.
7248         (do_allocate_exception, do_free_exception): New.
7249         (expand_throw): Merge into ...
7250         (build_throw): ... here.  Update for abi.
7251         * expr.c (cplus_expand_expr): No expand_internal_throw.
7252         Handle MUST_NOT_THROW_EXPR.
7253         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
7254         * semantics.c (*) Update for except.h name changes.
7255         (genrtl_try_block): No protect_with_terminate.
7256         (genrtl_eh_spec_block): New.
7257         (genrtl_handler): Don't emit the goto here.
7258         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
7259         (genrtl_finish_function): Don't expand_exception_blocks.
7260         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
7261
7262 2001-03-28  Richard Henderson  <rth@redhat.com>
7263
7264         * decl.c (struct named_label_list): Rename eh_region to
7265         in_try_scope, add in_catch_scope.
7266         (struct binding_level): Rename eh_region to is_try_scope,
7267         add is_catch_scope.
7268         (note_level_for_try): Rename from note_level_for_eh.
7269         (note_level_for_catch): New.
7270         (poplevel): Copy both is_try_scope and is_catch_scope to
7271         the named_label_list struct.
7272         (check_previous_goto_1): Don't check for catch block via
7273         DECL_ARTIFICIAL; use in_try_scope instead.
7274         (check_goto): Likewise.
7275         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
7276         * except.c (expand_start_catch_block): Call note_level_for_catch.
7277         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
7278
7279 2001-03-27  Richard Henderson  <rth@redhat.com>
7280
7281         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
7282         exceptions_via_longjmp.
7283
7284 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
7285
7286         * pt.c (check_default_tmpl_args):  Make error messages clearer.
7287
7288 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
7289
7290         * error.c:  Also undefine 'A' macro used for cp_printers definition.
7291
7292 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7293
7294         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
7295
7296 2001-03-26  Mike Yang <yang@research.att.com>
7297             Mark Mitchell  <mark@codesourcery.com>
7298
7299         * dump.c (dump_access): New function.
7300         (cp_dump_tree): Use it.  Dump basetype information for class
7301         types.
7302
7303 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
7304
7305         * Makefile.in (optimize.o): Depend on params.h.
7306         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
7307         (init_decl_processing): Set flag_no_inline when doing
7308         inlining-on-trees.
7309         * optimize.c: Include params.h.
7310         (struct inline_data): Improve documentation of FNS.  Add
7311         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
7312         (INSNS_PER_STMT): New macro.
7313         (remap_block): Use CLONING_P.
7314         (inlinable_function_p): Don't inline big functions.
7315         (expand_call_inline): Keep track of how much inlining we've done.
7316         (optimize_function): Set FIRST_INLINED_FN.
7317         (maybe_clone_body): Set CLONING_P.
7318         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
7319         tree nodes.
7320         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
7321         rest_of_compilation.  Clear DECL_RTL for local variables
7322         afterwards.
7323         (clear_decl_rtl): New function.
7324
7325 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
7326
7327         Implement DR 209
7328         * cp-tree.h (skip_type_access_control,
7329         reset_type_access_control): Prototype.
7330         * decl.c (grokdeclarator): Access of friends is not checked.
7331         * parse.y (component_decl_list): Reset type access control.
7332         * semantics.c (decl_type_access_control): Clear
7333         current_type_lookups.
7334         (save_type_access_control): Don't save if not deferring.
7335         (skip_type_access_control, reset_type_access_control): New
7336         functions.
7337         (begin_class_definition): Do type access control for basetypes.
7338         Start deferred access control.
7339         (finish_class_definition): Resume immediate access control if
7340         this is a local class.
7341
7342 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7343
7344         * class.c (add_method): Use memcpy/memmove, not bcopy.
7345
7346         * decl.c (duplicate_decls): Likewise.
7347
7348 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
7349
7350         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
7351         not `_'.
7352
7353 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
7354
7355         * decl.c (local_names): Define.
7356         (push_local_name): New.
7357         (grok_reference_init): Return init if initializing static reference
7358         variable with non-constant instead of emitting it.
7359         Move expand_static_init call to cp_finish_decl.
7360         (layout_var_decl): Call push_local_name.
7361         (maybe_commonize_var): Allow inlining functions even if they have
7362         static local variables, use comdat_linkage for them if flag_weak.
7363         (check_initializer): Call obscure_complex_init if
7364         grok_reference_init returned nonzero.
7365         (save_function_data): Clear x_local_names.
7366         (pop_cp_function_context): Free x_local_names.
7367         (mark_inlined_fns): Remove.
7368         (mark_lang_function): Mark x_local_names.
7369         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
7370         Mark inlined_fns as tree, remove call to mark_inlined_fns.
7371         * class.c (alter_access): Ensure DECL_ACCESS is never set if
7372         DECL_DISCRIMINATOR_P.
7373         * cp-tree.h (cp_language_function): Add x_local_names.
7374         (lang_decl_flags): Add discriminator into u2.
7375         (lang_decl_inlined_fns): Remove.
7376         (lang_decl): inlined_fns is now a TREE_VEC.
7377         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
7378         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
7379         TREE_VEC, not a custom structure.
7380         (optimize_function): Likewise.
7381         * mangle.c (discriminator_for_local_entity): Discriminate among
7382         VAR_DECL local entities.
7383         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
7384         is not valid.
7385
7386 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
7387
7388         Add support for Java interface method calls.
7389         * cp-tree.h (struct lang_type): Add java_interface flag.
7390         (TYPE_JAVA_INTERFACE): New macro.
7391         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
7392         by setting TYPE_JAVA_INTERFACE.
7393         * call.c (java_iface_lookup_fn): New static.
7394         (build_over_call): If calling a method declared in a
7395         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
7396         expression which resolves the function address.
7397         (build_java_interface_fn_ref): New function.
7398
7399 2001-03-22  Richard Henderson  <rth@redhat.com>
7400
7401         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
7402         * except.c: Don't include it.
7403
7404 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7405             based on an idea from Joe Buck <jbuck@synopsys.com>
7406
7407         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
7408         New nonterminals.
7409         (data_def, component_decl): Add reductions to bad_decl.
7410
7411 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
7412
7413         * method.c (do_build_assign_ref): Don't use build_modify_expr for
7414         anonymous aggregates, since they don't have assignment operator
7415         method.
7416         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
7417         assignment operators for anonymous structure fields.
7418
7419 2001-03-21  Jason Merrill  <jason@redhat.com>
7420
7421         * pt.c (instantiate_decl): Abort if we see a member constant
7422         instantiation that doesn't already have its initializer.
7423         Downgrade explicit instantiation without definition to pedwarn.
7424
7425         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
7426         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
7427         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
7428
7429         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
7430         (pending_vtables): Remove.
7431         * decl2.c (pending_vtables): Remove.
7432         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
7433         CLASSTYPE_VTABLE_NEEDS_WRITING.
7434         (import_export_class): Likewise.
7435         (init_decl2): Don't mark pending_vtables.
7436         * lex.c (handle_pragma_vtable): Just sorry.
7437         * pt.c (instantiate_class_template): Don't mess with
7438         CLASSTYPE_VTABLE_NEEDS_WRITING.
7439         (mark_class_instantiated): Likewise.
7440         * ptree.c (print_lang_type): Don't print it.
7441         * semantics.c (begin_class_definition): Don't set it.
7442
7443         * pt.c (template_tail): Replace with last_pending_template.
7444         (maybe_templates, maybe_template_tail): Remove.
7445         (add_pending_template): Adjust.
7446         (instantiate_pending_templates): Adjust.
7447
7448         * cp-tree.h (struct saved_scope): Remove lang_stack field.
7449         (current_lang_stack): Remove.
7450         * decl.c (maybe_push_to_top_level): Don't initialize it.
7451         (duplicate_decls): Use current_lang_depth.
7452         (xref_basetypes): Likewise.
7453         * class.c (current_lang_depth): New fn.
7454         (push_lang_context): Use more varray functionality.
7455         (pop_lang_context): Likewise.
7456
7457         * error.c (GLOBAL_THING): Always use '__'.
7458
7459 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
7460
7461         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
7462
7463         * mangle.c (mangle_decl_string): Mangle the names of overloaded
7464         operators, even when they have `extern "C"' linkage.
7465
7466 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
7467
7468         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
7469         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7470         where it's not necessary.
7471         (add_method): Remove optimization involving comparison of
7472         DECL_ASSEMBLER_NAME.
7473         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
7474         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7475         where it's not necessary.
7476         (check_methods): Likewise.
7477         (build_clone): Likewise.
7478         (built_vtt): Likewise.
7479         * cp-tree.h (DECL_NEEDED_P): Likewise.
7480         * decl.c (pushtag): Likewise.
7481         (duplicate_decls): Likewise.
7482         (pushdecl): Likewise.
7483         (builtin_function): Likewise.
7484         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
7485         (build_cp_library_fn): Likewise.
7486         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
7487         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7488         where it's not necessary.
7489         (make_rtl_for_nonlocal_decl): Likewise.
7490         (cp_finish_decl): Likewise.
7491         (grokfndecl): Likewise.
7492         (grokvardecl): Likewise.
7493         (grokdeclarator): Likewise.
7494         (start_function): Likewise.
7495         (cp_missing_return_ok_p): Likewise.
7496         * decl2.c (grokclassfn): Likewise.
7497         (check_classfn): Likewise.
7498         (finish_static_data_member_decl): Likewise.
7499         (grokfield): Likewise.
7500         * error.c (GLOBAL_IORD_P): Remove.
7501         (dump_global_iord): Improve output.
7502         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
7503         * except.c (nothrow_libfn_p): Summarily reject any function not in
7504         namespace-scope.
7505         * init.c (build_java_class_ref): Don't explicitly set
7506         DECL_ASSEMBLER_NAME after calling mangle_decl.
7507         * mangle.c (mangle_decl_string): Handle extern "C" functions.
7508         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
7509         * method.c (set_mangled_name_for_decl): Don't explicitly set
7510         DECL_ASSEMBLER_NAME after calling mangle_decl.
7511         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
7512         IDENTIFIER_GLOBAL_VALUE for the thunk.
7513         * pt.c (set_mangled_name_for_template_decl): Remove.
7514         (check_explicit_specialization): Don't use it.
7515         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
7516         (tsubst_friend_function): Likewise.
7517         (tsubst_decl): Likewise.
7518         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
7519         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
7520         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7521         where it's not necessary.
7522         (tinfo_base_init): Likewise.
7523         (create_real_tinfo_var): Likewise.
7524         * search.c (looup_field_1): Likewise.
7525         * semantics.c (finish_named_return_value): Likewise.
7526         * tree.c (init_tree): Set lang_set_decl_assembler_name.
7527
7528 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
7529
7530         Correct semantics restrictions checking in throw-expression.
7531         * except.c (is_admissible_throw_operand): New function.
7532         (build_throw): Use it.
7533
7534 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
7535
7536         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
7537         and its ilk.
7538
7539 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
7540
7541         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
7542         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
7543         * decl.c (duplicate_decls): Likewise.
7544         (builtin_function): Likewise.
7545         (build_library_fn): Likewise.
7546         (build_cp_library_fn): Likewise.
7547         (check_initializer): Likewise.
7548         (cp_finish_decl): Likewise.
7549         * decl2.c (grokfield): Likewise.
7550         (grok_function_init): Remove #if 0'd code.
7551         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
7552         * friend.c (do_friend): Likewise.
7553         * init.c (get_temp_regvar): Likewise.
7554         * method.c (make_thunk): Likewise.
7555         * pt.c (tsubst_friend_function): Likewise.
7556         (tsubst_decl): Likewise.
7557         (regenerate_decl_from_template): Likewise.
7558         * semantics.c (genrtl_named_return_value): Likewise.
7559         (expand_body): Likewise.
7560         (genrtl_finish_function): Likewise.
7561         * tree.c (cp_tree_equal): Likewise.
7562
7563 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
7564
7565         * call.c (convert_like_real): Add extra semantics to INNER
7566         parameter. Don't convert to temporary if a user conversion
7567         gives us an lvalue that we're about to bind to a reference.
7568         Set INNER to indicate pending reference binding on recursive
7569         calls.
7570
7571 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
7572
7573         * cp/lex.c: Delete duplicate pending_lang_change.
7574
7575 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
7576
7577         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
7578         Similarly.
7579         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
7580         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
7581
7582 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
7583
7584         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
7585
7586 2001-03-08  Stan Shebs  <shebs@apple.com>
7587
7588         * cp-tree.h (set_identifier_local_value): Remove unused decl.
7589
7590 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
7591
7592         * spew.c: Remove references to CPP_OSTRING.
7593
7594 2001-03-06  Andrew Haley  <aph@redhat.com>
7595
7596         * typeck.c (convert_arguments): Check that we have an fndecl.
7597
7598 2001-03-05  Andrew Haley  <aph@redhat.com>
7599
7600         * typeck.c (convert_arguments): Don't do ellipsis conversion for
7601         __built_in_constant_p.
7602
7603 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
7604
7605         * typeck.c (build_static_cast): Allow enum to enum conversions
7606         as per DR 128.
7607
7608 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
7609
7610         * class.c (check_field_decls): Pointers to member do not a
7611         non-pod struct make, as per DR 148.
7612
7613 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
7614
7615         * call.c (joust): cp_pedwarn when using gnu extension concerning
7616         worst conversion sequences.
7617
7618 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
7619
7620         * decl.c: Replace all uses of 'boolean' with 'bool'.
7621
7622 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
7623
7624         * lang-specs.h: Add zero initializer for cpp_spec field to
7625         all array elements that need one.  Don't put an #ifdef inside
7626         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
7627         use it.
7628
7629 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
7630
7631         Implement using decls inside template functions.
7632         * decl2.c (validate_nonmember_using_decl): Don't special case
7633         fake_std_node in the global namespace. Don't reject early when
7634         processing a template.
7635         (do_local_using_decl): Add to statement tree. Don't do further
7636         processing when building a template.
7637         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
7638
7639 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
7640
7641         * decl2.c (do_nonmember_using_decl): Don't complain if we find
7642         same function. Do complain about ambiguating extern "C"
7643         declarations.
7644
7645 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
7646
7647         Remove floating point and complex type template constant parms.
7648         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
7649         COMPLEX_TYPE extensions.
7650         (invalid_nontype_parm_type_p): Likewise.
7651
7652 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
7653
7654         * except.c (call_eh_info): Revert "match_function"'s type.
7655
7656 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
7657
7658         Fix ctor vtable vcall offsets.
7659         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
7660         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
7661         (get_matching_base): Remove.
7662         (get_original_base): New function.
7663         (build_vtbl_initializer): Initialize vid.rtti_binfo.
7664         Use a virtual thunk for a ctor vtable with an index
7665         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
7666         primary base within a constructor vtable. Only set
7667         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
7668         when primary base has been lost.
7669         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
7670
7671 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
7672
7673         * call.c (joust): Ensure more_specialized()'s argument length
7674         parameter has correct value for constructors.
7675
7676 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
7677
7678         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
7679
7680         * decl.c (mark_inlined_fns): Prototype.
7681
7682 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
7683
7684         * spew.c (yylex): Correct handling of friends.
7685
7686 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
7687
7688         * mangle.c (write_encoding): Pass write_function_type the
7689         FUNCTION_DECL for the function being encoded.
7690         (write_function_type): Pass it along to write_bare_function_type.
7691         (write_bare_function_type): Pass it along to write_method_parms.
7692         (write_method_parms): Don't mangle the compiler-generated
7693         parameters to a constructor or destructor.
7694
7695 2001-02-22  Andreas Jaeger  <aj@suse.de>
7696
7697         * optimize.c: Include toplev.h for
7698         note_deferral_of_defined_inline_function prototype.
7699
7700 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
7701
7702         * cp-tree.h (struct lang_decl_inlined_fns): New.
7703         (struct lang_decls): Add inlined_fns.
7704         (DECL_INLINED_FNS): New macro.
7705         * optimize.c (struct inline_data): Add inlined_fns.
7706         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
7707         (inlinable_function_p): Likewise, fix typo in comment,
7708         function is not inlinable if it already inlined function currently
7709         being optimized.
7710         (expand_call_inline): Add fn to inlined_fns if necessary.
7711         (optimize_function): Initialize inlined_fns.
7712         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
7713         * decl.c (mark_inlined_fns): New function.
7714         (lang_mark_tree): Call it.
7715
7716 2001-02-21  Jason Merrill  <jason@redhat.com>
7717
7718         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
7719         (DECL_UNINLINABLE): Move to middle-end.
7720
7721         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
7722         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
7723         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
7724         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
7725         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
7726
7727         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
7728         second parm of op=.
7729
7730 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
7731
7732         * decl2.c (set_decl_namespace): Allow explicit instantiations in
7733         any namespace.
7734
7735 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7736
7737         * optimize.c (expand_call_inline): Don't walk subtrees of type
7738         nodes.
7739
7740 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
7741
7742         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
7743         for a destructor.
7744
7745 2001-02-18  Jason Merrill  <jason@redhat.com>
7746
7747         Do put the VTT parameter in DECL_ARGUMENTS.
7748         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
7749         (current_vtt_parm): New macro.
7750         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
7751         (DECL_HAS_VTT_PARM_P): New macro.
7752         (DECL_VTT_PARM): Remove.
7753         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
7754         * decl.c (duplicate_decls): Only copy the operator code if
7755         appropriate.
7756         (start_function): Set current_vtt_parm.
7757         (lang_mark_tree): Don't mark vtt_parm.
7758         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
7759         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
7760         * class.c (build_clone): Maybe remove the VTT parm.
7761         * optimize.c (maybe_clone_body): Set up the VTT parm.
7762         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
7763         * call.c (build_over_call): Just allow the VTT arg.
7764         * method.c (make_thunk): Don't set DECL_VTT_PARM.
7765         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
7766         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
7767         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
7768         * error.c (dump_function_decl): Likewise.
7769         * call.c (build_user_type_conversion_1, convert_like_real): Abort
7770         if we try to call a constructor with in-charge or VTT parms.
7771         * method.c (skip_artificial_parms_for): New fn.
7772         * call.c (add_function_candidate, build_over_call): Call it.
7773         * call.c (build_new_method_call): Use current_vtt_parm.
7774         * init.c (expand_virtual_init): Likewise.
7775         * class.c (same_signature_p): No longer static.
7776         * cp-tree.h: Declare it.
7777         * search.c (look_for_overrides_r): Use it.
7778
7779 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
7780
7781         * cp-tree.h (new_abi_rtti_p): Remove.
7782         (name_mangling_version): Likewise.
7783         (flag_do_squangling): Likewise.
7784         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
7785         * decl.c (grokfndecl): Likewise.
7786         * decl2.c (name_mangling_version): Remove.
7787         (flag_do_squangling): Likewise.
7788         (lang_f_options): Remove `squangle'.
7789         (unsupported_options): Add `squangle'.
7790         (cxx_decode_option): Issue a warning about uses of
7791         -fname-mangling-version.
7792         (finish_file): Remove old ABI support.
7793         * pt.c (check_explicit_specialization): Likewise.
7794         (tsubst_decl): Likewise.
7795         * rtti.c (init_rtti_processing): Likewise.
7796         (build_headof): Likewise.
7797         (get_tinfo_decl_dynamic): Likewise.
7798         (tinfo_from_decl): Likewise.
7799         (build_dynamic_cast_1): Likewise.
7800         (synthesize_tinfo_var): Likewise.
7801         * init.c (build_new): Allow enumeration types for the array-bounds
7802         in a direct-new-declarator.
7803
7804         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
7805
7806         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
7807         TREE_PROTECTED from the template being specialized.
7808
7809 2001-02-17  Jason Merrill  <jason@redhat.com>
7810
7811         * decl2.c (build_artificial_parm): Set TREE_READONLY.
7812
7813         * decl.c (bad_specifiers): Allow throw specs on things with
7814         pointer-to-function or -member-function type.
7815         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
7816         a pmf.
7817
7818 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
7819
7820         * call.c (check_dtor_name): Handle template names correctly.
7821
7822 2001-02-16  Jason Merrill  <jason@redhat.com>
7823
7824         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
7825         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
7826         * optimize.c (maybe_clone_body): Don't substitute it.
7827         * call.c (build_new_method_call): Check in_chrg instead.
7828         * init.c (expand_virtual_init): Likewise.
7829
7830 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
7831
7832         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
7833         class-type introduces at least a type-name.
7834
7835 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
7836
7837         * call.c (convert_like_real): Create a temporary for non-lvalue.
7838
7839 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
7840
7841         * cp-tree.h: Fix typos in comments.
7842
7843 2001-02-16  Jason Merrill  <jason@redhat.com>
7844
7845         * optimize.c (remap_block): If we're compiling a clone, pass the
7846         new block to insert_block.
7847
7848 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
7849
7850         * semantics.c (finish_asm_stmt): Robustify.
7851
7852 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
7853
7854         * pt.c (push_template_decl_real): Don't remangle the name of a
7855         class template.
7856
7857 2001-02-15  Jim Meyering  <meyering@lucent.com>
7858
7859         * Make-lang.in (c++.install-common): Depend on installdirs.
7860         (c++.install-info): Likewise.
7861         (c++.install-man): Likewise.
7862
7863 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
7864
7865         * typeck2.c (build_m_component_ref): Robustify.
7866
7867 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
7868
7869         * friend.c (do_friend): Don't take the nested [template] class
7870         into account when deciding whether to warn about the friend
7871         function not referring to a template function.
7872
7873 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
7874
7875         * typeck.c (build_unary_op): Clarify error message.
7876
7877 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
7878
7879         * parse.y (component_constructor_declarator): allow optional
7880         parentheses around constructor class name.
7881
7882 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7883
7884         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
7885         section.
7886         * init.c (emit_base_init): Remove incorrect comment about
7887         virtual bases.
7888         * method.c (make_thunk): Fix comment alignment.
7889
7890 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7891
7892         Kill remnants of this is variable.
7893         * cp-tree.h (flag_this_is_variable): Remove.
7894         * decl2.c (flag_this_is_variable): Remove.
7895         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
7896         (build_vbase_path): The path is non-static, even in a cdtor.
7897         (resolves_to_fixed_type_p): Add additional return value.
7898         * search.c (init_vbase_pointers): Adjust.
7899         * tree.c (lvalue_p_1): Adjust.
7900         * typeck.c (mark_addressable): Adjust.
7901
7902 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7903
7904         * pt.c (unify): Don't check cv quals of array types.
7905
7906 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7907
7908         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
7909         check whether we already have the type.
7910
7911 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
7912
7913         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
7914         * call.c (build_op_delete_call): Simplify to remove duplicate
7915         code.
7916         * class.c (clone_function_decl): Don't build the deleting variant
7917         of a non-virtual destructor.
7918         * decl.c (finish_destructor_body): Don't call delete if this is a
7919         non-virtual destructor.
7920         * init.c (build_delete): Explicitly call `operator delete' when
7921         deleting an object with a non-virtual destructor.
7922
7923 2001-02-13  Jason Merrill  <jason@redhat.com>
7924
7925         * lang-specs.h: Add more __EXCEPTIONS.
7926
7927 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
7928
7929         * typeck2.c (process_init_constructor): Check
7930         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
7931
7932 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
7933
7934         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
7935         Remove spurious information in comment. Allow further
7936         adjustments of REFERENCE_TYPE args.
7937
7938 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
7939
7940         * errfn.c (cp_deprecated): Tweak diagnostic text.
7941         * parse.y (new_initializer): Deprecate initializer lists
7942         extension.
7943
7944 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
7945
7946         Remove old ABI support.
7947
7948 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
7949
7950         * decl2.c (flag_vtable_thunks): Always set it to 1.
7951         (flag_new_abi): Likewise.
7952         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
7953
7954         * Makefile.in (g++spec.o): Fix typo.
7955
7956 2001-02-09  Jason Merrill  <jason@redhat.com>
7957
7958         * lang-specs.h: Restore definition of __EXCEPTIONS.
7959
7960 2001-02-08  Jason Merrill  <jason@redhat.com>
7961
7962         * search.c (shared_member_p): New function.
7963         (lookup_field_r): Use it.
7964         * cp-tree.h (SHARED_MEMBER_P): Remove.
7965
7966         * method.c (process_overload_item): Handle template-dependent array
7967         bounds.
7968         * pt.c (type_unification_real): If we end up with undeduced nontype
7969         parms, try again.
7970
7971         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
7972         types.
7973
7974         * typeck2.c (friendly_abort): Don't say anything if we have
7975         earlier errors or sorries.
7976
7977         * decl.c (check_tag_decl): Notice attempts to redefine bool and
7978         wchar_t.  Ignore if in_system_header.
7979
7980         * decl.c (maybe_push_cleanup_level): New fn...
7981         (start_decl_1): ...split out from here.
7982         * cvt.c (build_up_reference): Use it.
7983         * cp-tree.h: Declare it.
7984
7985 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
7986
7987         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
7988         spec.
7989
7990 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
7991
7992         * pt.c (lookup_template_class): Make sure it's a primary
7993         template or template_template_parm when called from the parser.
7994         (instantiate_template_class): Add assertion.
7995
7996 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
7997
7998         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
7999         from error_mark_node.
8000
8001 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
8002
8003         Fix specification and implementation bugs in V3 ABI
8004         construction vtables.
8005         * cp-tree.h (flag_dump_class_layout): New flag.
8006         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
8007         (BINFO_LOST_PRIMARY_P): New flag.
8008         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
8009         (BINFO_PRIMARY_MARKED_P): Rename to ...
8010         (BINFO_PRIMARY_P): ... here.
8011         (binfo_via_virtual): New prototype.
8012         * decl2.c (flag_dump_class_layout): New flag.
8013         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
8014         use `=' as a file name separator.
8015         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
8016         bases.
8017         (build_vtbl_address): If this is a virtual primary base, then
8018         get the vtbl of what it is ultimately primary for.
8019         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
8020         for BINFO_PRIMARY_P.
8021         (dfs_skip_nonprimary_vbases_markedp): Likewise.
8022         (get_shared_vbase_if_not_primary): Likewise.
8023         (dfs_get_pure_virtuals): Likewise.
8024         (expand_upcast_fixups): Likewise.
8025         (fixup_virtual_upcast_offsets): Likewise.
8026         (dfs_find_vbase_instance): Likewise.
8027         (find_vbase_instance): Likewise.
8028         (binfo_from_vbase): Adjust comment to reflect reality.
8029         (binfo_via_virtual): New function.
8030         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
8031         for binfo walking during VTT construction.
8032         (dfs_mark_primary_bases): Remove.
8033         (force_canonical_binfo_r): New function.
8034         (force_canonical_binfo): New function.
8035         (mark_primary_virtual_base): New function.
8036         (mark_primary_bases): Walk in inheritance graph order, use
8037         mark_primary_virtual_base.
8038         (determine_primary_base): Use some more intermediate variables.
8039         (dfs_find_final_overrider): Don't check for overriding along a
8040         virtual path.
8041         (dfs_modify_vtables): Walk into primary virtual bases too.
8042         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
8043         (build_base_fields): Likewise.
8044         (dfs_set_offset_for_unshared_vbases): Likewise.
8045         (layout_virtual_bases): Likewise.
8046         (end_of_class): Likewise.
8047         (finish_struct_1): Call dump_class_hierarchy, if requested.
8048         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
8049         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
8050         (dump_class_hierarchy): Add file parameter. Append to file, if
8051         required.
8052         (finish_vtbls): Adjust accumulate_vtbl_inits call.
8053         Use canonical base for virtual bases.
8054         (build_vtt): Add more comments. Adjust build_vtt_inits call.
8055         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
8056         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
8057         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
8058         virtual VTTs.
8059         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
8060         from DATA.  We want virtual primary bases and all bases via virtual.
8061         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
8062         virtual base when not a construction vtable.
8063         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
8064         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
8065         Use canonical bases when processing virtual bases.
8066         (accumulate_vtbl_inits): We're interested in any base via a
8067         virtual path.
8068         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
8069         within a construction vtable, determine what is being overridden.
8070         (build_vtbl_initializer): Add more comments
8071         (add_vcall_offset_vtbl_entries_1): Adjust comment.
8072         (build_rtti_vtbl_entries): Check if the base has lost its
8073         primary.
8074
8075 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
8076
8077         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
8078
8079 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8080
8081         * decl.c (pushdecl): Call abort instead of fatal.
8082         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
8083         * init.c (build_new_1): Likewise.
8084         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
8085         * decl.c (build_typename_type): hash_table_init now returns void.
8086         decl.c (init_decl_processing): Make an error non-fatal.
8087
8088 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
8089
8090         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
8091         Document.
8092         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
8093         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
8094         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8095         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
8096         * decl.c (maybe_commonize_var): Use the new name-mangling where
8097         appropriate.
8098         * decl2.c (comdat_linkage): Enhance comments.  Make all
8099         compiler-generated things static, if COMDAT is not available.
8100         (get_tinfo_decl): Do not make typeinfo objects that belong in the
8101         library COMDAT.
8102         (tinfo_base_init): Use the correct mangled name for typeinfo
8103         strings, and push them into the global scope.
8104         (typeinfo_in_lib_p): New function.
8105         (synthesize_tinfo_var): Use it.
8106         (create_real_tinfo_var): Likewise.
8107
8108 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
8109
8110         * decl.c (push_class_binding): Use context_for_name_lookup instead
8111         of CP_DECL_CONTEXT.
8112         * search.c (context_for_name_lookup): Remove static.  Check for NULL
8113         context in the loop.
8114         * cp-tree.h (context_for_name_lookup): Add prototype.
8115
8116 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
8117
8118         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
8119         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
8120         Remove.
8121         * call.c (convert_class_to_reference, build_user_type_conversion_1,
8122         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
8123
8124 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
8125
8126         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
8127         of macros used when compiling g++spec.c.
8128         * g++spec.c (lang_specific_driver): Link with the shared
8129         libgcc by default.
8130
8131 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8132
8133         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
8134         make_reference_declarator, make_call_declarator), method.c
8135         (implicitly_declare_fn), parse.y (namespace_using_decl,
8136         notype_unqualified_id, expr_or_declarator, new_type_id,
8137         after_type_declarator, direct_after_type_declarator,
8138         notype_declarator, complex_notype_declarator,
8139         complex_direct_notype_declarator, qualified_id,
8140         notype_qualified_id, overqualified_id, direct_new_declarator,
8141         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
8142         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
8143         instead of build_parse_node.
8144
8145 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8146
8147         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
8148         (minus_one_node): Moved to top level gcc directory.  Renamed
8149         to integer_minus_one_node.
8150
8151         * init.c (init_init_processing): Don't set minus_one_node.
8152         (build_vec_init): Use integer_minus_one_node.
8153
8154         * rtti.c (get_tinfo_decl_dynamic): Likewise.
8155
8156 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
8157
8158         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
8159         identical and they would be replaced with constant, remove
8160         MODIFY_EXPR from the tree.
8161
8162 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8163
8164         * Make-lang.in: Remove all dependencies on defaults.h.
8165         * call.c: Don't include defaults.h.
8166         * decl.c: Likewise.
8167         * decl2.c: Likewise.
8168         * except.c: Likewise.
8169         * pt.c: Likewise.
8170         * rtti.c: Likewise.
8171         * tree.c: Likewise.
8172         * typeck.c: Likewise.
8173
8174 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
8175
8176         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
8177         operators even in "C" linkage.
8178         * method.c (set_mangled_name_for_decl): Likewise.
8179         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
8180         overloaded operators in "C" linkage.
8181
8182 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
8183
8184         * pt.c (tsubst_decl): Remove IN_DECL parameter.
8185         (tsubst_arg_types): Check parameter is not void.
8186         (tsubst): Adjust tsubst_decl call.
8187
8188 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
8189
8190         * call.c (add_builtin_candidate): Quote std properly, from
8191         previous change.
8192
8193 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8194
8195         * pt.c (check_explicit_specialization): Clone constructors and
8196         destructors.
8197
8198 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
8199
8200         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
8201         indicates anything special about template depth. Make sure we
8202         only count the user visible template classes.
8203
8204 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
8205
8206         * call.c (build_conv): Typo in comment.
8207         (add_builtin_candidate): Add more explanation.
8208         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
8209         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
8210         when we have enumeral types.
8211         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
8212         candidates for relops and eqops.
8213         (joust): Simplify control flow. Allow a non-template user
8214         function to hide a builtin.
8215
8216 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
8217
8218         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
8219         (more_specialized): Add deduction parameter.
8220         * call.c (joust): Adjust more_specialized call.
8221         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
8222         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
8223         (get_bindings_order): Remove.
8224         (get_bindings_real): Add DEDUCE parameter.
8225         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
8226         REFERENCE_TYPE jig for DEDUCE_ORDER.
8227         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
8228         maybe_adjust_types_for_deduction.
8229         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
8230         directly.
8231         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
8232         (check_cv_quals_for_unify): Use new unify qualifier flags.
8233         (unify): Clear new unify qualifier flags.
8234         (get_bindings_real): Add DEDUCE parameter.
8235         (get_bindings): Adjust call to get_bindings_real.
8236         (get_bindings_overload): Likewise.
8237         (most_specialized_instantiation): Adjust call to
8238         more_specialized.
8239
8240 2001-01-19  Jason Merrill  <jason@redhat.com>
8241
8242         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
8243
8244         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
8245         -fnew-abi.
8246
8247 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
8248
8249         * decl2.c (arg_assoc_class): Fix double iteration logic.
8250
8251 2001-01-19  Jason Merrill  <jason@redhat.com>
8252
8253         * init.c (build_delete): Always call convert_force to strip cv-quals.
8254
8255         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
8256         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
8257         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
8258
8259 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8260
8261         * search.c (get_vbase_1): Count only virtual bases.
8262
8263 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8264
8265         * class.c (duplicate_tag_error): Robustify flag clearing.
8266
8267 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8268
8269         * cp-tree.h (lookup_template_class): Add complain parm.
8270         * decl.c (lookup_namespace_name): Adjust call to
8271         lookup_template_class.
8272         (make_typename_type): Likewise.
8273         * semantics.c (finish_template_type): Likewise.
8274         * pt.c (lookup_template_class): Add complain parm. Adjust.
8275         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
8276         (tsubst): Likewise.
8277
8278 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8279
8280         * pt.c (copy_default_args_to_explicit_spec): Preserve
8281         object's CV quals. Reorganize.
8282
8283 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8284
8285         * typeck.c (build_modify_expr): Say `initialization' for
8286         INIT_EXPRs.
8287         * init.c (build_default_init): Convert to enumeral type, if
8288         needed.
8289
8290 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
8291
8292         * parse.y (nomods_initdcl0): Properly set things up for
8293         initdcl0_innards.
8294
8295 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8296
8297         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
8298         (type_unification_real): Set it.
8299         (unify): Use it.
8300
8301 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8302
8303         * decl.c (finish_destructor_body): Convert to vbase pointer here.
8304
8305 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8306
8307         * semantics.c (begin_class_definition): Check we're not inside a
8308         template parm list.
8309
8310 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8311
8312         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
8313         BASELINK_P.
8314
8315 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8316
8317         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
8318         * call.c (build_over_call): Add comment.
8319
8320 2001-01-16 Daniel Berlin <dberlin@redhat.com>
8321
8322         * cvt.c (ocp_convert): Handle vector type conversion
8323         * typeck2.c (digest_init): Handle vector type initializations
8324
8325 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
8326
8327         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
8328           was given.
8329
8330 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
8331
8332         * pt.c (check_nontype_parm): Rename to ...
8333         (invalid_nontype_parm_type_p): ... here.
8334         (process_template_parm): Adjust.
8335         (convert_template_argument): Adjust.
8336
8337 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
8338
8339         * pt.c (check_nontype_parm): New function.
8340         (process_template_parm): Use it.
8341         (convert_template_argument): Use it.
8342         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
8343         member.
8344
8345 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
8346
8347         * tree.c: Add defaults.h
8348         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
8349         * Make-lang.in (cp/tree.o): Add defaults.h.
8350
8351 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8352
8353         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
8354
8355 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8356
8357         * g++.1: Change to be ".so man1/gcc.1".
8358
8359 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8360
8361         * Make-lang.in (c++.info, c++.install-info): Build and install g++
8362         internals info.
8363         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
8364         ($(srcdir)/cp/g++int.info): New target.
8365         * gxxint.texi: Add info directory entry.  Use @@ in email address.
8366         * .cvsignore: Update.
8367
8368 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
8369
8370         * typeck.c (build_c_cast): Do template processing earlier.
8371         Always pedwarn on array casts.
8372
8373 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
8374
8375         * friend.c (make_friend_class): Make sure a templated class is
8376         actually a template.
8377
8378 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8379
8380         * decl2.c (get_guard): Set linkage from guarded decl.
8381
8382 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8383
8384         * call.c (convert_default_arg): Check for unprocessed
8385         DEFAULT_ARG.
8386         * cp-tree.h (replace_defarg): Move to spew.c.
8387         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
8388         spew.c, which is where they really are.
8389         (done_pending_defargs): Declare.
8390         (unprocessed_defarg_fn): Declare.
8391         * decl.c (replace_defarg): Move to spew.c
8392         * parse.y (structsp): Call done_pending_defargs.
8393         * spew.c (defarg_fns): Rearrange list structure.
8394         (defarg_fnsdone): New static variable.
8395         (defarg_depfns): New static variable.
8396         (init_spew): Adjust.
8397         (add_defarg_fn): Store the type in TREE_TYPE.
8398         (do_pending_defargs): Detect and deal with ordering constraints
8399         and circularity.
8400         (done_pending_defargs): New function.
8401         (unprocessed_defarg_fn): New function.
8402         (replace_defarg): Moved from decl.c. Robustify. Don't save
8403         if circularity detected.
8404
8405 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8406
8407         * pt.c (unify): Check array has a domain, before checking
8408         whether it is variable sized.
8409
8410 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8411
8412         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
8413         parameters with pointers to arrays of unknown bound.
8414
8415 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8416
8417         * parse.y (template_parm_header, template_spec_header): New
8418         reductions. Split out from ...
8419         (template_header): ... here. Use them.
8420         (template_template_parm): Use template_parm_header.
8421         * semantics.c (finish_template_template_parm): Add assert.
8422
8423 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
8424
8425         * mangle.c (write_builtin_type): Fix thinko.
8426
8427         * pt.c (copy_default_args_to_explicit_spec_1): New function.
8428         (copy_default_args_to_explicit_spec): Likewise.
8429         (check_explicit_specialization): Use it.
8430
8431         * class.c (finish_struct_1):  Remove last argument in call to
8432         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
8433         * decl.c (builtin_function): Likewise.
8434         (build_cp_library_fn): Likewise.
8435         (check_initializer): Likewise.
8436         (make_rtl_for_nonlocal_decl): Likewise.
8437         (cp_finish_decl): Likewise.
8438         (start_function): Likewise.
8439         * decl2.c (finish_anon_union): Likewise.
8440         * friend.c (do_friend): Likewise.
8441         * init.c (build_java_class_ref): Likewise.
8442         * method.c (make_thunk): Likewise.
8443         * pt.c (tsubst_friend_function): Likewise.
8444         * semantics.c (expand_body): Likewise.
8445
8446 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
8447
8448         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
8449         looking at DECL_CLONED_FUNCTION for non-functions.
8450
8451 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
8452
8453         * error.c (dump_template_parameter): Use parm to determine how
8454         to print default value.
8455
8456 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
8457
8458         * class.c (duplicate_tag_error): Clear more flags.
8459
8460 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
8461
8462         * call.c (build_new_method_call): Use binfo_for_vbase.
8463
8464 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
8465
8466         * cp-tree.h (flag_cond_mismatch): Don't declare.
8467         * decl2.c (flag_cond_mismatch): Don't define.
8468         (lang_f_options): Remove cond-mismatch.
8469         (unsupported_options): Add cond-mismatch.
8470
8471 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
8472
8473         * class.c (handle_using_decl): Reject using of constructor name
8474         of sourcing class. Allow injecting of a method with same name as
8475         nested class. Fixup error messages.
8476
8477 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
8478
8479         * decl2.c (lang_decode_option): Handle -Wformat=2.
8480
8481 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
8482
8483         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
8484         initialized_in_class.
8485         (DECL_DEFINED_IN_CLASS_P): Rename to ...
8486         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
8487         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
8488         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
8489         * pt.c (check_default_tmpl_args): Adjust for
8490         DECL_INITIALIZED_IN_CLASS_P.
8491         (instantiate_class_template): Likewise.
8492         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
8493
8494         * class.c (finish_struct): Constify saved_filename.
8495
8496 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
8497
8498         * class.c (duplicate_tag_error): Adjust diagnostic.
8499         (finish_struct): Locally set location to start of struct.
8500         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
8501
8502 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
8503
8504         * decl.c (struct binding_level): Adjust class_shadowed comments
8505         to reflect reality.
8506         (push_class_level_binding): Adjust comments to reflect reality.
8507         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
8508         Don't set TREE_VALUE on the class_shadowed list.
8509
8510 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8511
8512         * decl2.c (acceptable_java_type): Allow references too.
8513         * init.c (build_java_class_ref): When using the new ABI, search
8514         `class$' and have it mangled with `mangle_decl.'
8515         * mangle.c (write_java_integer_type_codes): New function.
8516         (write_builtin_type): Detect and mangle Java integer and real
8517         types.
8518
8519 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
8520
8521         * decl2.c (grokfield): Don't accept `asm' specifiers for
8522         non-static data members.
8523
8524 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8525
8526         * expr.c (cplus_expand_expr): Don't reset `target'.
8527
8528 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
8529
8530         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
8531
8532 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
8533
8534         * parse.y (template_datadef): Check for error_mark_node.
8535
8536 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
8537
8538         * cp-tree.def (DEFAULT_ARG): Make `x' class.
8539
8540 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
8541
8542         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
8543         (record_builtin_type): Make non-static.
8544         (flag_short_double): Don't declare.
8545         (init_decl_processing): Remove the creation of many tree nodes now
8546         in c_common_nodes_and_builtins.
8547         (build_void_list_node): New function.
8548         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
8549         * cp-tree.h (flag_short_wchar): Don't declare.
8550
8551 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
8552
8553         * call.c (build_conv): Don't use build1 for USER_CONV.
8554         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
8555
8556 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
8557
8558         * lex.c (lang_init): Call c_common_lang_init.
8559
8560 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
8561
8562         * search.c (lookup_fnfields_here): Remove.
8563         (look_for_overrides_r): Use lookup_fnfields_1.
8564         Ignore functions from using declarations.
8565
8566 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
8567
8568         Implement exceptions specifiers for implicit member functions.
8569         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
8570         * method.c (synthesize_exception_spec): New function.
8571         (locate_dtor, locate_ctor, locate_copy): New functions.
8572         (implicitly_declare_fn): Generate the exception spec too.
8573         * search.c (check_final_overrider): Check artificial functions
8574         too.
8575         * typeck2.c (merge_exception_specifiers): New function.
8576
8577 2001-01-03  Jason Merrill  <jason@redhat.com>
8578
8579         * init.c (build_default_init): New fn.
8580         (perform_member_init): Split out from here.
8581         (build_new_1): Use it.  Simplify initialization logic.
8582         (build_vec_init): Take an array, rather than a pointer and maxindex.
8583         Speed up simple initializations.  Don't clean up if we're assigning.
8584         * cp-tree.h: Adjust.
8585         * decl2.c (do_static_initialization): Remove TREE_VEC case.
8586         * parse.y (new_initializer): Return void_zero_node for ().
8587         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
8588         * typeck2.c (digest_init): Only complain about user-written
8589         CONSTRUCTORs.
8590
8591 2000-12-22  Mike Stump  <mrs@wrs.com>
8592
8593         * decl2.c: (max_tinst_depth): Increase to 50.
8594
8595 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
8596
8597         * class.c (invalidate_class_lookup_cache): Zero the
8598         previous_class_values.
8599         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
8600         TREE_INT_CST_HIGH.
8601         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
8602         * decl.c (free_bindings): New variable.
8603         (push_binding): Don't create a new binding if we have one on the
8604         free list.
8605         (pop_binding): Put old bindings on the free list.
8606         (init_decl_processing): Use size_int, not build_int_2.
8607         Register free_bindings as a GC root.
8608         (cp_make_fname_decl): Use size_int, not build_int_2.
8609         (push_inline_template_parms_recursive): Likewise.
8610         (end_template_parm_list): Likewise.
8611         (for_each_template_parm): Do not use walk_tree_without_duplicates.
8612         (tsubst_template_parms): Use size_int, not build_int_2.
8613         (tsubst): Likewise.
8614         * rtti.c (get_vmi_pseudo_type_info): Likewise.
8615
8616 2001-01-02  Richard Henderson  <rth@redhat.com>
8617
8618         * parse.y (asm): Set ASM_INPUT_P.
8619
8620 2001-01-02  Jason Merrill  <jason@redhat.com>
8621
8622         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
8623         for v3 ABI.
8624
8625         * typeck.c (cp_truthvalue_conversion): New fn.
8626         * cvt.c (ocp_convert): Use it.
8627
8628         * cp-tree.h: Lose c-common.c decls.
8629
8630         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
8631         * cvt.c (convert_to_void): Use type_unknown_p.
8632
8633         * typeck.c (strip_all_pointer_quals): Also strip quals from
8634         pointer-to-member types.
8635
8636         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
8637         parse.y as C.
8638
8639         * call.c (build_new_method_call): Do evaluate the object parameter
8640         when accessing a static member.
8641         * typeck.c (build_component_ref): Likewise.
8642
8643 2001-01-02  Andreas Jaeger  <aj@suse.de>
8644
8645         * decl.c (cp_missing_noreturn_ok_p): New.
8646         (init_decl_processing): Set lang_missing_noreturn_ok_p.
8647
8648 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
8649
8650         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
8651
8652 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
8653
8654         * class.c (pushclass): Remove #if 0'd code.
8655         * cp-tree.h (overload_template_name): Remove.
8656         * decl.c (store_bindings): Simplify.
8657         (pop_from_top_level): Likewise.
8658         * pt.c (overload_template_name): Remove.
8659         (instantiate_decl): Don't call push_to_top_level if it's not
8660         needed.
8661
8662 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
8663
8664         * pt.c (register_local_specialization): Don't return a value.
8665         (lookup_template_class): Use move-to-front heuristic when looking
8666         up template instantiations.
8667         (instantiate_decl): Only push_to_top_level when we're actually
8668         going to instantiate the template.
8669
8670 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
8671
8672         * search.c (binfo_for_vtable): Return least derived class, not
8673         most.  Handle secondary vtables.
8674
8675 2000-12-22  Jason Merrill  <jason@redhat.com>
8676
8677         * pt.c (more_specialized): Don't optimize len==0.
8678         (fn_type_unification): If we're adding the return type, increase len.
8679
8680         * typeck.c (build_binary_op): Fix pmf comparison logic.
8681
8682         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
8683         DECL_STATIC_FUNCTION_P.
8684
8685         * semantics.c (genrtl_finish_function): Don't try to jump to
8686         return_label unless it exists.
8687
8688         In partial ordering for a call, ignore parms for which we don't have
8689         a real argument.
8690         * call.c (joust): Pass len to more_specialized.
8691         (add_template_candidate_real): Strip 'this', pass len.
8692         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
8693         (get_bindings_order): New fn.  Pass len down.
8694         (get_bindings_real): Strip 'this', pass len.
8695         (fn_type_unification): Likewise.
8696         (type_unification_real): Succeed after checking 'len' args.
8697         (most_specialized_instantiation): Lose explicit_args parm.
8698         * class.c (resolve_address_of_overloaded_function): Strip 'this',
8699         pass len.
8700
8701 2000-12-21  Jason Merrill  <jason@redhat.com>
8702
8703         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
8704         DECL_TEMPLATE_RESULT.
8705
8706         * search.c (lookup_field_r): Call lookup_fnfields_1, not
8707         lookup_fnfields_here.
8708
8709         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
8710
8711         * call.c (build_object_call): Also allow conversions that return
8712         reference to pointer to function.
8713         (add_conv_candidate): Handle totype being ref to ptr to fn.
8714         (build_field_call): Also allow members of type reference to function.
8715         Lose support for calling pointer to METHOD_TYPE fields.
8716
8717         * error.c (dump_expr): Handle *_CAST_EXPR.
8718
8719         * typeck2.c (build_scoped_ref): Always convert to the naming class.
8720
8721         * tree.c (break_out_cleanups): Lose.
8722         * cp-tree.h: Remove prototype.
8723         * typeck.c (build_component_ref): Don't break_out_cleanups.
8724         (build_compound_expr): Likewise.
8725         * semantics.c (finish_expr_stmt): Likewise.
8726
8727 2000-12-20  Richard Henderson  <rth@redhat.com>
8728
8729         * cp-tree.h: Update declarations.
8730         * decl.c (finish_case_label): Return the new stmt node.
8731         * semantics.c (finish_goto_stmt): Likewise.
8732         (finish_expr_stmt, finish_return_stmt): Likewise.
8733         (finish_break_stmt, finish_continue_stmt): Likewise.
8734         (finish_asm_stmt): Likewise.
8735         * parse.y (already_scoped_stmt): Set STMT_LINENO.
8736         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
8737         (simple_if, simple_stmt): Return the new stmt node.
8738         (save_lineno): New.
8739
8740 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
8741
8742         * cp-tree.h: Don't declare warn_long_long.
8743
8744 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8745
8746         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
8747         IS_AGGR_TYPE.
8748
8749 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8750
8751         * pt.c (unify): Handle when both ARG and PARM are
8752         BOUND_TEMPLATE_TEMPLATE_PARM.
8753
8754 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8755
8756         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
8757         DECL_TEMPLATE_PARM_P.
8758
8759 2000-12-15  Jason Merrill  <jason@redhat.com>
8760
8761         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
8762
8763         * init.c (build_new_1): Don't strip quals from type.
8764
8765         * decl.c (pushdecl): Don't check for linkage on a non-decl.
8766
8767         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
8768
8769         * call.c (build_new_function_call): Lose space before paren in
8770         error message.
8771         (build_new_method_call): Likewise.
8772
8773         * typeck2.c (build_m_component_ref): Propagate quals from datum.
8774
8775 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8776
8777         * pt.c (check_explicit_specialization): Propagate default
8778         function arguments to explicit specializations.
8779
8780 2000-12-13  DJ Delorie  <dj@redhat.com>
8781
8782         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
8783         and <? operators.
8784
8785 2000-12-08  Jason Merrill  <jason@redhat.com>
8786
8787         * error.c (dump_function_name): Don't let the user see __comp_ctor.
8788
8789         Clean up copy-initialization in overloading code.
8790         * call.c (build_user_type_conversion_1): Die if we are asked to
8791         convert to the same or a base type.
8792         (implicit_conversion): Avoid doing so.  Lose reference binding code.
8793         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
8794         direct-initialization.  Also do direct-init part of copy-init.
8795         (build_user_type_conversion): Don't provide context to convert_like.
8796         * cvt.c (ocp_convert): build_user_type_conversion will now provide
8797         the constructor call for copy-init.
8798
8799         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
8800         instantiation of a member template.
8801         (do_decl_instantiation): Not here.
8802
8803 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
8804
8805         * class.c (check_field_decls): Don't special case anonymous
8806         fields in error messages.
8807         (note_name_declared_in_class): Use %D on diagnostic.
8808
8809         * tree.c (pod_type_p): Use strip_array_types.
8810         (cp_valid_lang_attribute): Likewise.
8811         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
8812         multiple evaluations.
8813         (cp_has_mutable_p): Use strip_array_types.
8814
8815 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
8816
8817         * cp-tree.h (sufficient_parms_p): Declare new function.
8818         * call.c (sufficient_parms_p): New function, broken out of ...
8819         (add_function_candidate): ... here. Use it.
8820         (add_conv_candidate): Use it.
8821         * decl.c (grok_ctor_properties): Use it.
8822
8823 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
8824
8825         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
8826
8827 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
8828
8829         * decl2.c (lang_decode_option): Handle -Wformat-security.
8830
8831 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8832
8833         * pt.c (verify_class_unification): New function.
8834         (get_class_bindings): Use it.
8835         (try_class_unification): Tidy.
8836         (unify): Handle when argument of a template-id is not
8837         template parameter dependent.
8838         (template_args_equal): Handle when TREE_CODE's do not match.
8839
8840 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
8841
8842         * lang-specs.h (c++): When invoking the stand-alone preprocessor
8843         for -save-temps, pass all relevant -Defines to it, and then don't
8844         pass them to cc1plus.
8845
8846 2000-12-05  Will Cohen  <wcohen@redhat.com>
8847
8848         * decl.c (finish_case_label): Cleared
8849         more_cleanups_ok in surrounding function scopes.
8850         (define_label): Likewise.
8851
8852 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
8853
8854         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
8855         (get_matching_virtual): Remove.
8856         (look_for_overrides): Declare new function.
8857         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
8858         DECL_VINDEX here.
8859         * class.c (check_for_override): Move base class iteration code
8860         to look_for_overrides.
8861         * search.c (next_baselink): Remove.
8862         (get_virtuals_named_this): Remove.
8863         (get_virtual_destructor): Remove.
8864         (tree_has_any_destructors_p): Remove.
8865         (struct gvnt_info): Remove.
8866         (check_final_overrider): Remove `virtual' from error messages.
8867         (get_matching_virtuals): Remove. Move functionality to ...
8868         (look_for_overrides): ... here, and ...
8869         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
8870         to be overriding.
8871
8872 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
8873
8874         * typeck.c (get_delta_difference): If via a virtual base,
8875         return zero.
8876         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
8877         adjustment.
8878
8879 2000-12-04  Richard Henderson  <rth@redhat.com>
8880
8881         * error.c (dump_tree): Use output_add_string not OB_PUTS.
8882
8883 2000-12-04  Jason Merrill  <jason@redhat.com>
8884
8885         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
8886         (write_builtin_type): Pass intSI_type_node and the like through
8887         type_for_mode.
8888         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
8889         Pass intSI_type_node and the like through type_for_mode.
8890         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
8891         * pt.c (tsubst, unify): Likewise.
8892         * tree.c (walk_tree): Likewise.
8893         * error.c (dump_type): Likewise.
8894         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
8895
8896         * Make-lang.in: Tweak top comment for emacs.
8897         (cp/TAGS): Restore.
8898
8899         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
8900
8901         * class.c (clone_function_decl): Robustify.
8902
8903 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
8904
8905         * decl.c (store_bindings): Only search in the non modified
8906         old_bindings for duplicates.
8907
8908 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
8909
8910         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
8911         TYPE_POLYMORPHIC_P.
8912
8913         * typeck.c (build_static_cast): Remove unused variable.
8914
8915 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8916
8917         * pt.c: Fix typo in comment.
8918
8919 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
8920
8921         * decl2.c (warn_format): Remove definition.
8922         (lang_decode_option): Handle -Wformat-nonliteral,
8923         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
8924
8925 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
8926
8927         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
8928         (init_decl_processing): Don't create string_type_node,
8929         const_string_type_node, wint_type_node, intmax_type_node,
8930         uintmax_type_node, default_function_type, ptrdiff_type_node and
8931         unsigned_ptrdiff_type_node.  Adjust position of call to
8932         c_common_nodes_and_builtins.
8933         (identifier_global_value): New function.
8934
8935 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
8936
8937         * call.c (standard_conversion): Reject pointer to member
8938         conversions from ambiguous, inaccessible or virtual bases.
8939         * typeck.c (build_static_cast): Don't check pointers to members
8940         specially.
8941
8942 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
8943
8944         * method.c (do_build_copy_constructor): Preserve cv
8945         qualifications when accessing source object members.
8946         (do_build_assign_ref): Likewise. Remove separate diagnostics for
8947         unnamed fields.
8948
8949 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
8950
8951         * method.c (do_build_assign_ref): Construct appropriately
8952         CV-qualified base reference. Don't allow const casts in base
8953         conversion.
8954
8955 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
8956
8957         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
8958         incomplete return type.
8959
8960 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8961
8962         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
8963         * semantics.c (finish_base_specifier): Accept a _TYPE not a
8964         _DECL.
8965
8966 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8967
8968         * spew.c (yyerror): Cope if yylval.ttype is NULL.
8969
8970 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8971
8972         * decl.c (grokdeclarator): Diagnose undefined template contexts.
8973
8974 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8975
8976         * decl.c (grokdeclarator): Do type access control on friend
8977         class.
8978
8979 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
8980
8981         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
8982         bison parser ickiness.
8983         * pt.c (tsubst_friend_function): Enter namespace scope when
8984         tsubsting the function name.
8985         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
8986
8987 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
8988
8989         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
8990         * cvt.c (cp_convert_to_pointer): Add force parameter.
8991         Allow conversions via virtual base if forced.
8992         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
8993         (ocp_convert): Likewise.
8994         * search.c (binfo_from_vbase): Return the virtual base's binfo.
8995         * typeck.c (get_delta_difference): Adjust handling of virtual
8996         bases.
8997
8998 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
8999
9000         * tree.c (struct list_hash): Remove.
9001         (list_hash_table): Make it be an htab.
9002         (struct list_proxy): New type.
9003         (list_hash_eq): New function.
9004         (list_hash_pieces): Renamed from ...
9005         (list_hash): ... this.
9006         (list_hash_lookup): Remove.
9007         (list_hash_add): Remove.
9008         (hash_tree_cons): Use the generic hashtable.
9009         (mark_list_hash): Remove.
9010         (init_tree): Create the hashtable.
9011
9012 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
9013
9014         * method.c (build_mangled_C9x_name): Rename to
9015         build_mangled_C99_name.  Change C9X references in comments to
9016         refer to C99.
9017
9018 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
9019
9020         * parse.y (unary_expr): Move VA_ARG from here ...
9021         (primary): ... to here.
9022
9023 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
9024
9025         * semantics.c (finish_id_expr): If type is error_mark, return
9026         error_mark.
9027
9028 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
9029
9030         * pt.c (lookup_template_class): Simplify loop exit constructs.
9031         Cope when there is no partial instantiation of a template
9032         template member.
9033
9034 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
9035
9036         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
9037
9038 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
9039
9040         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
9041         prefix.
9042
9043         * pt.c (do_decl_instantiate): Explicitly clone constructors and
9044         destructors that haven't already been cloned.
9045
9046 2000-11-20  Richard Henderson  <rth@redhat.com>
9047
9048         * parse.y (yyparse_1): Rename the parser entry point.
9049
9050 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
9051
9052         * mangle.c (write_name): Use <unscoped-name> for names directly in
9053         function scope.
9054         (write_unscoped_name): Accept names directly in function scope.
9055
9056 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
9057
9058         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
9059         * parse.y (extdef): Add EXPORT reduction.
9060         * spew.c (yylex): Don't skip export here.
9061
9062 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
9063
9064         * decl.c (init_decl_processing): Correct name of pure virtual
9065         function under the new ABI.
9066         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
9067         (throw_bad_typeid): Likewise for bad typeid function.
9068
9069 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
9070
9071         * decl.c (grokparms): Don't even function types of `void' type,
9072         either.
9073         * mangle.c (write_type): Don't crash when confronted with the
9074         error_mark_node.
9075
9076         * decl.c (grokparms): Don't create parameters of `void' type.
9077
9078 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
9079
9080         * lex.c (mark_impl_file_chain): Delete.
9081         (init_parse): Remove call to ggc_add_string_root.  No need to
9082         ggc_strdup a string constant.  Do not add impl_file_chain to GC
9083         roots.
9084         (handle_pragma_implementation): No need to ggc_strdup main_filename.
9085
9086 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9087
9088         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
9089
9090 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9091
9092         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
9093         * decl.c (grokdeclarator): Don't reject void parms here.
9094         (require_complete_types_for_parms): Simplify, use
9095         complete_type_or_else.
9096         (grokparms): Remove bitrot. Remove funcdef parm.
9097         Deal with ellipsis parm lists here.
9098         * semantics.c (finish_parmlist): Don't append void_list_node
9099         here. Set PARMLIST_ELLIPSIS_P.
9100
9101 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9102
9103         * typeck2.c (incomplete_type_error): Reorganize to avoid
9104         excessive diagnostics.
9105
9106 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
9107
9108         * lex.c (struct impl_files, internal_filename): Constify a char *.
9109
9110 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
9111
9112         * mangle.c (write_special_name_constructor): Don't generate
9113         assembler junk when confronted with an old-style constructor.
9114         (write_special_name_destructor): Likewise.
9115         (mangle_decl_string): Do it here instead.
9116
9117 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
9118
9119         * call.c (op_error): Make error messages clearer.
9120
9121 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
9122
9123         * decl.c (wrapup_globals_for_namespace): Don't mark things
9124         TREE_ASM_WRITTEN when they're not.
9125
9126 2000-11-15  Jason Merrill  <jason@redhat.com>
9127
9128         * typeck2.c (friendly_abort): Uncount the error before handing
9129         off to fancy_abort.
9130
9131 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
9132
9133         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
9134
9135 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
9136
9137         * class.c (build_vtbl_initializer): Fix typo in comment.
9138         * typeck.c (expr_sizeof): Don't crash on errors.
9139
9140 2000-11-14  Jim Wilson  <wilson@redhat.com>
9141
9142         * lang-specs.h: Add %2 after %(cc1_options).
9143
9144 2000-11-14  Richard Henderson  <rth@redhat.com>
9145
9146         * typeck.c (c_sizeof): Be strict about casting result value
9147         back to c_size_type_node.
9148         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
9149
9150 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9151
9152         * typeck.c (build_unary_op): Use boolean_increment from
9153         c-common.c, moving the relevant code there.
9154
9155 2000-11-11  Jason Merrill  <jason@redhat.com>
9156
9157         * typeck.c (mark_addressable): Don't call put_var_into_stack.
9158
9159         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
9160         in inlines.
9161
9162 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9163
9164         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
9165         * lex.c (copy_lang_decl): Likewise.
9166
9167 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
9168
9169         * dump.c (cp_dump_tree): Don't dump function bodies here.
9170
9171         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
9172         (dump.o): Update dependency list.
9173         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
9174         (flag_dump_translation_unit): Likewise.
9175         (CP_TYPE_QUALS): Adjust definition.
9176         (DECL_C_BIT_FIELD): Remove.
9177         (SET_DECL_C_BIT_FIELD): Likewise.
9178         (CLEAR_DECL_C_BIT_FIELD): Likewise.
9179         (add_maybe_template): Likewise.
9180         (strip_array_types): Likewise.
9181         (dump_node_to_file): Likewise.
9182         (cp_dump_tree): New function.
9183         * decl.c (init_decl_processing): Set lang_dump_tree.
9184         * decl2.c (flag_dump_translation_unit): Remove.
9185         * dump.c: Move most of it to ../c-dump.c.
9186         (cp_dump_tree): New function.
9187         * pt.c (add_maybe_template): Remove.
9188         * typeck.c (strip_array_types): Likewise.
9189
9190 2000-11-07  Eric Christopher  <echristo@redhat.com>
9191
9192         * decl.c (init_decl_processing): Change definition of
9193         __wchar_t to wchar_t.  Remove artificial declaration of
9194         wchar_t.
9195         * lex.c: Change instances of __wchar_t to wchar_t.
9196
9197 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
9198
9199         * lex.c (do_identifier): Don't lookup_name for operators.
9200         * parse.y (operator): Save looking_for_typename.
9201         (unoperator): Restore it.
9202         * spew.c (frob_opname): Use nth_token for lookahead.
9203
9204 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
9205
9206         * decl.c (grok_op_properties): Always use coerce_new_type and
9207         coerce_delete_type.
9208         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
9209         exception specification. Tidy up.
9210         (coerce_delete_type): Preserve exception specification. Tidy up.
9211
9212 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
9213
9214         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
9215         (push_binding_level), error.c (cp_tree_printer), pt.c
9216         (process_partial_specialization, tsubst_template_arg_vector),
9217         search.c (lookup_member): Use memset () instead of bzero ().
9218
9219 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
9220
9221         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
9222
9223 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
9224
9225         * Make-lang.in (c++.distdir): Remove.
9226
9227 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
9228
9229         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
9230         declarations from different namespaces to be combined.
9231
9232 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
9233
9234         * decl.c: Include tm_p.h.
9235
9236 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
9237
9238         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
9239
9240 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9241
9242         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
9243         (build_overload_value), repo.c (open_repo_file), xref.c
9244         (open_xref_file): Use strchr () and strrchr () instead of index ()
9245         and rindex ().
9246
9247 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
9248
9249         * call.c (build_over_call): Call fold on the CALL_EXPR.
9250
9251 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
9252
9253         * error.c (dump_template_decl): Separate template hearders with
9254         space not comma.
9255
9256 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
9257
9258         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
9259         TS_* flags with corresponding TFF_*.  Adjust prototypes of
9260         functions (which used to take a tree_string_flags) to take an int.
9261
9262         * cp-tree.h (enum tree_string_flags): Remove
9263         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
9264         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
9265         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
9266         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
9267         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
9268         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
9269         (type_as_string, decl_as_string, expr_as_string,
9270         context_as_string): Adjust prototype.
9271
9272         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
9273         instead of TS_PLAIN.
9274
9275         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
9276         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
9277         plain `0'.
9278
9279 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
9280
9281         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
9282         (linkage_kind): New enumeration.
9283         (decl_linkage): New function.
9284         * decl2.c (comdat_linkage): Extend comment.
9285         * error.c (dump_function_decl): Print the arguments used to
9286         instantiate a template, even when not printing the type of the
9287         function.
9288         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
9289         not TREE_PUBLIC, to test for external linkage.
9290         * tree.c (decl_linkage): New function.
9291
9292 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
9293
9294         * pt.c (instantiate_decl): Always instantiate static data members
9295         initialized in-class.
9296
9297 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
9298
9299         * Make-lang.in: Move all build rules here from Makefile.in,
9300         adapt to new context.  Wrap all rules that change the current
9301         directory in parentheses.  Expunge all references to $(P).
9302         When one command depends on another and they're run all at
9303         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
9304         all object-file generation rules.  Delete obsolete variables.
9305
9306         * Makefile.in: Delete.
9307         * config-lang.in: Delete outputs= line.
9308
9309 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
9310
9311         * error.c (dump_function_decl): Print no space between
9312         `ptr-operator' the `type-specifier' of the return type.
9313         (dump_type_prefix): Make sure we put space at the appropriate
9314         place.
9315
9316 2000-10-23  Jason Merrill  <jason@redhat.com>
9317
9318         * call.c (equal_functions): Also call decls_match for extern "C" fns.
9319
9320 2000-10-22  Jason Merrill  <jason@redhat.com>
9321
9322         * call.c (build_conditional_expr): Use ocp_convert to force
9323         rvalue conversion.
9324
9325 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
9326
9327         * call.c (standard_conversion): Use RVALUE_CONVs for all
9328         expressions that satisfy lvalue_p, not just those that satisfy
9329         real_lvalue_p.
9330
9331         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
9332
9333         * typeck.c (c_sizeof): Return an expression of `size_t' type,
9334         not one with TYPE_IS_SIZETYPE set.
9335         (dubious_conversion_warnings): Remove special-case code.
9336
9337 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
9338
9339         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
9340         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
9341         (dump_type_prefix): Print vector-of-int as 'int vector'.
9342         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
9343         * tree.c (walk_tree): Handle VECTOR_TYPE.
9344
9345         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
9346
9347 2000-10-21  Jason Merrill  <jason@redhat.com>
9348
9349         * parse.y (operator): Set got_object from got_scope.
9350         Set looking_for_typename.
9351         * decl.c (lookup_name_real): Clear val after setting from_obj.
9352         Reorganize diagnostic.
9353
9354 2000-10-20  Jason Merrill  <jason@redhat.com>
9355
9356         * tree.c (walk_tree): Don't walk into default args.
9357
9358         * error.c (dump_expr): Use host_integerp.
9359
9360 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
9361
9362         * typeck2.c (abstract_virtuals_error): Use "because" instead of
9363         "since" in error message.
9364
9365 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9366
9367         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
9368
9369 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
9370
9371         * decl.c (revert_static_member_fn): Fixed typo.
9372
9373 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
9374
9375         * class.c (subobject_offset_fn): New type.
9376         (dfs_record_base_offsets): Remove.
9377         (record_base_offsets): Likewise.
9378         (dfs_search_base_offsets): Likewise.
9379         (record_subobject_offset): New function.
9380         (check_subobject_offset): Likewise.
9381         (walk_subobject_offsets): Likewise.
9382         (record_subobject_offsets): Likewise.
9383         (layout_conflict_p): Reimplement.
9384         (layout_nonempty_base_or_field): Correct handling of type
9385         conflicts during layout.
9386         (layout_empty_base): Likewise.
9387         (build_base_field): Adjust to handle new representation of empty
9388         base offset table.
9389         (build_base_fields): Likewise.
9390         (layout_virtual_bases): Likewise.
9391         (splay_tree_compare_integer_csts): New function.
9392         (layout_class_type): Use a splay_tree, rather than a varray, to
9393         represent the offsets of empty bases.
9394
9395         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
9396         * decl.c (select_decl): Don't return declarations that are
9397         DECL_ANTICIPATED.
9398
9399 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
9400
9401         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
9402         (fake_std_node): New macro.
9403         * decl.c (in_std): Rename to ...
9404         (in_fake_std): ... this.
9405         (flag_no_builtin): Remove.
9406         (flag_no_nonansi_builtin): Likewise.
9407         (walk_namespaces_r): Use fake_std_node.
9408         (push_namespace): Use std_identifier.
9409         (pop_namespace): Use in_fake_std.
9410         (lookup_name_real): Use fake_std_node.
9411         (init_decl_processing): When -fhonor-std, create the `std'
9412         namespace.  Don't create a dummy fake_std_node in that case.
9413         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
9414         (builtin_function): Put builtins whose names don't begin
9415         with `_' in the std namespace.
9416         * decl2.c (flag_no_builtin): Remove.
9417         (flag_no_nonansi_builtin): Likewise.
9418         (set_decl_namespace): Use fake_std_node.
9419         (validate_nonmember_using_decl): Likewise.
9420         (do_using_directive): Likewise.
9421         (handle_class_head): Likewise.
9422         * dump.c (dequeue_and_dump): Likewise.
9423         * except.c (init_exception_processing): Use std_identifier.
9424         * init.c (build_member_call): Use fake_std_node.
9425         * rtti.c (init_rtti_processing): Use std_identifier.
9426
9427 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
9428
9429         * cp-tree.h (back_end_hook): Remove declaration.
9430         * decl2.c (back_end_hook): Remove definition.
9431
9432         * dump.c (dequeue_and_dump): Dump TREE_USED.
9433
9434 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
9435
9436         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
9437
9438 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
9439
9440         * decl.c (WINT_TYPE): Define.
9441         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
9442         c_size_type_node, signed_size_type_node and wint_type_node.
9443
9444 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
9445
9446         * decl2.c (warn_missing_format_attribute): New variable.
9447         (lang_decode_option): Decode -Wmissing-format-attribute.
9448
9449 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
9450
9451         * typeck.c (qualify_type): Remove.
9452         (composite_pointer_type): Fix handling of conversions to `cv void*'.
9453
9454 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9455
9456         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
9457
9458 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9459
9460         * Makefile.in (parse.c, parse.h): Create atomically.
9461
9462 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
9463
9464         * class.c (current_obstack): Remove.
9465         * decl.c (ggc_p): Remove.
9466         (start_decl): Don't use decl_tree_cons.
9467         (grokdeclarator): Don't use build_decl_list.
9468         (start_function): Don't use decl_tree_cons.
9469         (finish_function): Don't mess with obstacks.
9470         * decl2.c (grok_x_components): Don't use build_decl_list.
9471         * lex.c (make_call_declarator): Don't call decl_tree_cons.
9472         (implicitly_declare_fn): Don't call build_decl_list.
9473         * parse.y (frob_specs): Don't call build_decl_list or
9474         decl_tree_cons.
9475         (expr_or_declarator_intern): Don't call decl_tree_cons.
9476         (primary): Don't call build_decl_list.
9477         (fcast_or_absdcl): Likewise.
9478         (typed_declspecs): Don't call decl_tree_cons.
9479         (reserved_declspecs): Don't call build_decl_list.
9480         (declmods): Likewise.
9481         (reserved_typespecquals): Likewise.
9482         (aggr): Likewise.
9483         (new_type_id): Likewise.
9484         (cv_qualifiers): Likewise.
9485         (after_type_declarator_intern): Likewise.
9486         (notype_declarator_intern): Likewise.
9487         (absdcl_intern): Likewise.
9488         (named_parm): Likewise.
9489         * pt.c (most_specialized_class): Likewise.
9490         * repo.c (temporary_obstack): Make it a structure, not a pointer.
9491         (init_repo): Initialize it.
9492         * search.c (current_obstack): Remove.
9493         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
9494
9495 2000-10-09  Richard Henderson  <rth@cygnus.com>
9496
9497         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
9498         (c++ language support bits for libgcc): Remove.
9499         (c++.clean): Remove cplib2.txt cleanup.
9500         * config-lang.in (headers, lib2funcs): Remove.
9501
9502         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
9503         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
9504         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
9505         * inc/new.h, inc/typeinfo: Remove files.
9506
9507 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
9508
9509         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
9510         defined.
9511         (init_decl_processing): Initialize intmax_type_node and
9512         uintmax_type_node.
9513
9514 2000-10-06  Richard Henderson  <rth@cygnus.com>
9515
9516         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
9517         (original_result_rtx): Remove.
9518         * decl.c (save_function_data): Don't clear x_result_rtx.
9519         (mark_lang_function): Don't mark it either.
9520         * expr.c (fixup_result_decl): Remove.
9521         * semantics.c (genrtl_named_return_value): Frob the return decl
9522         before calling emit_local_var.
9523         (genrtl_finish_function): Don't call fixup_result_decl.
9524         Always emit the jump to return_label.
9525
9526 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
9527
9528         * pt.c (lookup_template_class): Set current access for enum.
9529         (tsubst_enum): Set file & line for enum decl.
9530
9531         * spew.c (yylex): Remove unused variable.
9532
9533 2000-10-05  Richard Henderson  <rth@cygnus.com>
9534
9535         * semantics.c (genrtl_finish_function): Don't init or check
9536         can_reach_end; remove noreturn and return value checks.
9537
9538 2000-10-05  Tom Tromey  <tromey@cygnus.com>
9539
9540         * init.c (build_java_class_ref): Use `build_static_name' with a
9541         suffix, not a prefix, to build the class object's name.
9542
9543 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
9544
9545         * cp-tree.h (access_kind): Fix comment typo.
9546         * decl2.c (grokfield): Fix diagnostic typo.
9547         * semantics.c (finish_template_type): Fix comment typo.
9548         (finish_qualified_object_call_expr): Likewise.
9549
9550 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
9551
9552         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
9553         tsubsting fails.
9554
9555 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
9556
9557         * spew.c (frob_id): New static function.
9558         (frob_opname): Use it.
9559         (yylex): Use it.
9560
9561 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
9562
9563         * decl.c (lang_mark_false_label_stack): Remove.
9564         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
9565
9566 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
9567
9568         * gxxint.texi: Use @email for formatting email addresses.
9569
9570 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
9571
9572         * error.c: Remove direct obstack manipulation.  Replace with
9573         output_buffer-based formatting.  Adjust calls to removed macros.
9574         (obstack_chunk_alloc, obstack_chunk_free): Remove.
9575         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
9576         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
9577
9578 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
9579
9580         * ir.texi: Move to ../c-tree.texi.
9581
9582 2000-09-20  Jason Merrill  <jason@redhat.com>
9583
9584         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
9585
9586 2000-09-21  Andreas Jaeger  <aj@suse.de>
9587
9588         * errfn.c: Move declaration of cp_printer and cp_printers to ...
9589         * cp-tree.h: ... here.
9590
9591         * error.c: Remove declaration of cp_printer.
9592
9593 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
9594
9595         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
9596
9597 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
9598
9599         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
9600         users.
9601
9602 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
9603
9604         * decl.c (start_function): Robustify.
9605
9606 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9607
9608         * cp-tree.h (check_function_format): Accept a `status' parameter.
9609
9610         * call.c, typeck.c: Updates calls to `check_function_format'.
9611
9612 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
9613
9614         * decl2.c (handle_class_head): Always push some scope even
9615         in the error case.
9616
9617 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
9618
9619         * cp-tree.h (struct cp_language_function): Remove
9620         x_scope_stmt_stack and name_declared.
9621         (current_scope_stmt_stack): Remove.
9622         (function_name_declared_p): New macro.
9623         (struct lang_decl_flags): Use c_lang_decl as a base class.
9624         (context): Remove.
9625         (struct lang_decl): Replace saved_tree with context.
9626         (DECL_FRIEND_CONTEXT): Adjust accordingly.
9627         (SET_DECL_FRIEND_CONTEXT): Likewise.
9628         (DECL_VIRTUAL_CONTEXT): Likewise.
9629         (DECL_SAVED_TREE): Remove.
9630         (C_DECLARED_LABEL_FLAG): Likewise.
9631         (cplus_expand_expr_stmt): Don't declare.
9632         (add_decl_stmt): Likewise.
9633         (add_scope_stmt): Likewise.
9634         * decl.c (mark_stmt_tree): Remove.
9635         (case_compare): Likewise.
9636         (finish_case_label): Use c_add_case_label.
9637         (init_decl_processing): Set more language-specific hooks.
9638         (build_enumerator): Fix typo in comment.
9639         (cplus_expand_expr_stmt): Remove.
9640         (mark_lang_function): Use mark_c_language_function.
9641         (lang_mark_tree): Use c_mark_lang_decl.
9642         * decl2.c: Change order of inclusion.
9643         * except.c: Likewise.
9644         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
9645         back on c_expand_expr.
9646         * friend.c: Include expr.h.
9647         * init.c: Change order of inclusion.
9648         * Makefile.in: Update dependencies.
9649         * lex.h (free_lang_decl_chain): Remove.
9650         * optimize.c (maybe_clone_body): Use function_name_declared_p.
9651         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
9652         it doesn't exist.
9653         (instantiate_decl): Use function_name_declared_p.
9654         * semantics.c (lang_expand_expr_stmt): Remove.
9655         (set_current_function_name_declared): Likewise.
9656         (current_function_name_declared): Likewise.
9657         (begin_compound_stmt): Use function_name_declared_p.
9658         (add_decl_stmt): Remove.
9659         (setup_vtbl_ptr): Use function_name_declared_p.
9660         (add_scope_stmt): Remove.
9661         (current_scope_stmt_stack): New function.
9662         (cp_expand_stmt): Don't handle SCOPE_STMTs.
9663         (expand_body): Use function_name_declared_p.
9664         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
9665         * typeck.c: Change order of includes.
9666         (convert_sequence): Remove.
9667
9668 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
9669
9670         * lex.c (reswords): Add _Complex.
9671
9672 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9673
9674         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
9675
9676 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
9677
9678         * init.c (begin_init_stmts): Don't use // comments.
9679
9680 2000-09-12  Jason Merrill  <jason@redhat.com>
9681
9682         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
9683         all non-extern arrays.
9684
9685         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
9686         typenames, too.  Downgrade complaint to pedwarn.
9687         (xref_tag): Warn about surprising behavior of 'friend struct T'.
9688         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
9689         'class This::Inherited'.
9690
9691 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
9692
9693         * decl.c (finish_case_label): Given the LABEL_DECL a
9694         DECL_CONTEXT.
9695
9696 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
9697
9698         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
9699         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
9700         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
9701         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
9702         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
9703         New macros.
9704         (sorry_for_unsupported_tree, print_scope_operator,
9705         print_left_paren, print_right_paren, print_left_bracket,
9706         print_right_bracket, print_whitespace): Likewise.
9707         (aggr_variety): Rename to class_key_or_enum.
9708         (print_type): Rename to print_type_id.
9709         (print_type_specifier_seq, print_simple_type_specifier,
9710         print_elaborated_type_specifier,
9711         print_rest_of_abstract_declarator,
9712         print_parameter_declaration_clause, print_exception_specification,
9713         print_nested_name_specifier, print_template_id,
9714         typedef_original_name,  print_template_argument_list_start,
9715         print_template_argument_list_end): New functions.
9716
9717 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
9718
9719         * ir.texi: Add more documentation.
9720
9721 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
9722
9723         * cp-tree.h (struct saved_scope): Remove x_function_parms.
9724         (current_function_parms): Don't define.
9725         (struct cp_language_function): Remove parms_stored.
9726         (current_function_just_assigned_this): Don't define.
9727         (current_function_parms_stored): Likewise.
9728         (static_ctors): Declare.
9729         (static_dtors): Likewise.
9730         (SF_EXPAND): Don't define.
9731         (expand_start_early_try_stmts): Remove declaration.
9732         (store_parm_decls): Likewise.
9733         * decl.c (static_ctors): Don't declare.
9734         (static_dtors): Likewise.
9735         (struct binding_level): Remove this_block.
9736         (poplevel): Remove dead code.
9737         (set_block): Likewise.
9738         (mark_binding_level): Don't mark this_block.
9739         (mark_saved_scope): Don't mark x_function_parms.
9740         (init_decl_processing): Don't add current_function_parms as a GC
9741         root.
9742         (check_function_type): Change prototype.
9743         (start_function): Remove RTL-generation code.
9744         (expand_start_early_try_stmts): Remove.
9745         (store_parm_decls): Give it internal linkage.  Remove
9746         RTL-generation code.
9747         (finish_function): Remove RTL-generation code.
9748         * decl2.c (static_ctors): Fix formatting.
9749         (static_dtors): Likewise.
9750         * method.c (use_thunk): Don't call store_parm_decls.
9751         (synthesize_method): Likewise.
9752         * optimize.c (maybe_clone_body): Likewise.
9753         * parse.y (fn.def2): Likewise.
9754         (.set_base_init): Likewise.
9755         (nodecls): Likewise.
9756         * pt.c (instantiate_decl): Likewise.
9757         * rtti.c (synthesize_tinfo_fn): Likewise.
9758         * semantics.c (genrtl_try_block): Simplify.
9759         (expand_body): Use genrtl_start_function and
9760         genrtl_finish_function.
9761         (genrtl_start_function): New function.
9762         (genrtl_finish_function): Likewise.
9763
9764 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
9765
9766         * error.c (cp_tree_printer, case 'P'): Append break.
9767
9768 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
9769
9770         * cp-tree.h (frob_opname): Declare.
9771         * parse.y (saved_scopes): New static variable.
9772         (cp_parse_init): Adjust.
9773         (do_id): If lastiddecl is NULL, do do_identifier.
9774         (operator): Save scope information.
9775         (unoperator): New reduction. Restore scope information.
9776         (operator_name): Append unoperator. Call frob_opname.
9777         * spew.c (frob_opname): Define.
9778
9779 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
9780
9781         * decl.c, rtti.c: Include defaults.h if not already included.
9782         Don't define the *_TYPE_SIZE macros.
9783
9784 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
9785
9786         * cp-tree.h (push_switch): Change prototype.
9787         (check_cp_case_value): Remove declaration.
9788         (decl_constant_value): Likewise.
9789         * decl.c (struct cp_switch): Add switch_stmt and cases.
9790         (case_compare): New function.
9791         (push_switch): Set switch_stmt.  Initialize cases.
9792         (pop_switch): Clean up cases.
9793         (define_case_label): Rename to ...
9794         (finish_case_label): ... this.  Do semantic analysis for case
9795         labels here.
9796         (start_function): Correct comment.
9797         * decl2.c (check_cp_case_value): Remove.
9798         * expr.c (do_case): Remove.
9799         * pt.c (tsubst_expr): Adjust call to finish_case_label.
9800         * semantics.c (genrtl_do_poplevel): Remove declaration.
9801         (RECHAIN_STMTS): Remove.
9802         (finish_break_stmt): Use build_break_stmt.
9803         (finish_continue_stmt): Use build_continue_stmt.
9804         (finish_switch_cond): Adjust condition here, rater than in
9805         c_expand_start_case.
9806         (finish_case_label): Remove.
9807         * typeck.c (c_expand_return): Remove.
9808         (c_expand_start_case): Likewise.
9809
9810 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
9811
9812         * ir.texi: Document type nodes.
9813
9814 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
9815
9816         * cp-tree.h (init_cp_semantics): Declare.
9817         (genrtl_try_block): Don't declare.
9818         (genrtl_handler): Likewise.
9819         (genrtl_catch_block): Likewise.
9820         (genrtl_ctor_stmt): Likewise.
9821         (genrtl_subobject): Likewise.
9822         (genrtl_do_poplevel): Likewise.
9823         (genrtl_named_return_value): Likewise.
9824         * lex.c (init_parse): Call init_cp_semantics.
9825         * semantics.c (genrtl_try_block): Give it internal linkage.
9826         (genrtl_handler): Likewise.
9827         (genrtl_catch_block): Likewise.
9828         (genrtl_ctor_stmt): Likewise.
9829         (genrtl_subobject): Likewise.
9830         (genrtl_do_poplevel): Likewise.
9831         (genrtl_named_return_value): Likewise.
9832         (lang_expand_stmt): Rename to ...
9833         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
9834         (init_cp_semantics): Define.
9835
9836         * decl.c (initialize_local_var): Remove RTL-generating code.
9837         * semantics.c (genrtl_try_block): Fix formatting.
9838
9839         Move statement-tree facilities from C++ to C front-end.
9840         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
9841         (void_zero_node): Remove.
9842         (stmt_tree): Likewise.
9843         (scope_chain): Adjust.
9844         (language_function): Rename to cp_language_function.
9845         (cp_function_chain): Adjust.
9846         (current_stmt_tree): Remove.
9847         (last_tree): Likewise.
9848         (last_expr_type): Likewise.
9849         (struct lang_decl): Adjust.
9850         (STMT_IS_FULL_EXPR_P): Remove.
9851         (add_tree): Remove.
9852         (begin_stmt_tree): Likewise.
9853         (finish_stmt_tree): Likewise.
9854         (walk_tree_fn): Likewise.
9855         (walk_stmt_tree): Likewise.
9856         * class.c (finish_struct): Replace use of add_tree with add_stmt.
9857         * decl.c (mark_stmt_tree): Adjust type.
9858         (init_decl_processing): Don't build void_zero_node.
9859         (initialize_local_var): Adjust usage of current_stmt_tree.
9860         (finish_enum): Use add_stmt, not add_tree.
9861         (save_function_data): Adjust use of language_function.
9862         (finish_constructor_body): Use add_stmt, not add_tree.
9863         (finish_destructor_body): Likewise.
9864         (push_cp_function_context): Adjust use of language_function.
9865         (pop_cp_function_context): Likewise.
9866         (mark_lang_function): Likewise.
9867         (mark_cp_function_context): Likewise.
9868         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
9869         (build_vec_init): Likewise.
9870         * semantics.c (SET_LAST_STMT): Remove.
9871         (RECHAIN_STMTS): Don't use it.
9872         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
9873         (current_stmt_tree): Define.
9874         (add_tree): Remove.
9875         (finish_goto_stmt): Use add_stmt, not add_tree.
9876         (finish_expr_stmt): Likewise.
9877         (begin_if_stmt): Likewise.
9878         (finish_then_clause): Likewise.
9879         (begin_while_stmt): Likewise.
9880         (begin_do_stmt): Likewise.
9881         (finish_return_stmt): Likewise.
9882         (begin_for_stmt): Likewise.
9883         (finish_break_stmt): Likewise.
9884         (finish_continue_stmt): Likewise.
9885         (begin_switch_stmt): Likewise.
9886         (finish_case_label): Likewise.
9887         (begin_try_block): Likewise.
9888         (begin_function_try_block): Likewise.
9889         (begin_handler): Likewise.
9890         (begin_catch_block): Likewise.
9891         (begin_compound_stmt): Likewise.
9892         (begin_asm_stmt): Likewise.
9893         (finish_asm_stmt): Likewise.
9894         (finish_label_stmt): Likewise.
9895         (add_decl_stmt): Likewise.
9896         (finish_subobject): Likewise.
9897         (finish_decl_cleanup): Likewise.
9898         (finish_named_return_value): Likewise.
9899         (setup_vtbl_ptr): Likewise.
9900         (add_scope_stmt): Likewise.
9901         (finish_stmt_expr): Likewise.
9902         (prune_unused_decls): Remove.
9903         (begin_stmt_tree): Likewise.
9904         (finish_stmt_tree): Likewise.
9905         (prep_stmt): Adjust use of current_stmt_tree.
9906         (lang_expand_stmt): Likewise.
9907         * tree.c (statement_code_p): Remove.
9908         (cp_statement_code_p): New function.
9909         (walk_stmt_tree): Remove.
9910         (init_tree): Set lang_statement_code_p.
9911
9912 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
9913
9914         Integrated preprocessor.
9915
9916         * Make-lang.in, Makefile.in: Remove all references to input.c,
9917         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
9918         * gxx.gperf, hash.h, input.c: Delete.
9919         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
9920         initialized properly.
9921
9922         * class.c (fixup_pending_inline): Take a tree, not a
9923         struct pending_inline *.  All callers changed.
9924         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
9925         RID_PROTECTED entries in ridpointers[] array here.
9926         * decl.c (duplicate_decls): Do not refer to struct
9927         pending_inline.
9928         (record_builtin_type, init_decl_processing): Use RID_MAX not
9929         CP_RID_MAX.
9930         (grokdeclarator): Use C_IS_RESERVED_WORD.
9931         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
9932         cpplib.
9933         (grok_x_components): Do not inspect pending_inlines chain.
9934
9935         * cp-tree.h (struct lang_identifier): Add rid_code entry.
9936         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
9937         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
9938         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
9939         TIME_IDENTIFIER_FILEINFO): Kill.
9940         Update prototypes.
9941         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
9942         single 32-bit word.
9943         * parse.y: Call do_pending_inlines unconditionally.
9944         reinit_parse_for_method is now snarf_method.  fn.defpen is no
9945         longer necessary.  Remove unnecessary <itype> annotation on
9946         SCOPE.  Do not refer to end_of_file or struct pending_inline.
9947         * semantics.c (begin_inline_definitions): Call
9948         do_pending_inlines unconditionally.
9949
9950         * lex.c: Remove all code now shared with C front end.
9951         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
9952         into the get_identifier table.  Rewrite pragma handling to
9953         work with the registry.  Move code to save tokens for later
9954         processing to spew.c.
9955
9956         * spew.c: Rewrite everything in terms of token streams instead
9957         of text.  Move routines here from lex.c / input.c as
9958         appropriate.  GC-mark trees hanging off the pending inlines
9959         chain.
9960
9961 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
9962
9963         * NEWS: Mention that the named return value extension has been
9964         deprecated.
9965         * cp-tree.h (original_result_rtx): Define.
9966         (TREE_REFERENCE_EXPR): Remove.
9967         (DECL_VPARENT): Likewise.
9968         (pushdecl_nonclass_level): Likewise.
9969         (store_return_init): Likewise.
9970         (reinit_lang_specific): Likewise.
9971         (genrtl_named_return_value): Change prototype.
9972         * decl.c (original_result_rtx): Remove.
9973         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
9974         Do not generate RTL for local variables here.
9975         (store_return_init): Remove.
9976         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
9977         store_return_init.
9978         (finish_named_return_value): Adjust accordingly.  Warn that this
9979         extension is deprecated.
9980         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
9981
9982 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9983
9984         * pt.c (type_unification_real): Replace switch with if.
9985         (unify): Tsubst non-type parms before comparing.
9986
9987 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9988
9989         * error.c (dump_typename): New function, broken out of ...
9990         (dump_type): ... here. Use it.
9991         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
9992
9993 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9994
9995         * init.c (build_offset_ref): Deal with namespace scoped
9996         TEMPLATE_ID_EXPRs.
9997
9998 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9999
10000         * class.c (resolve_address_of_overloaded_function): Add
10001         explanation message.
10002         * decl.c (define_case_label): Reformat explanation.
10003         * decl2.c (finish_static_data_member_decl): Likewise.
10004         (grokfield): Likewise.
10005         * friend.c (do_friend): Likewise.
10006
10007 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
10008
10009         * tree.c (walk_tree): Expose tail recursion.
10010         (walk_stmt_tree): New function.
10011         * cp-tree.h: Prototype walk_stmt_tree.
10012         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
10013         the BLOCKs directly.  If a BLOCK has no variables after
10014         pruning, discard it.
10015         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
10016         restore the line number.
10017
10018 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
10019
10020         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
10021         (pt.o): Remove dependency on HTAB_H.
10022         * cp-tree.h: Include hashtab.h.
10023         (walk_tree): Change prototype.
10024         (walk_tree_without_duplicates): New function.
10025         * decl.c (check_default_argument): Use it.
10026         * optimize.c (remap_decl): Adjust calls to walk_tree.
10027         (copy_body): Likewise.
10028         (expand_calls_inline): Likewise.
10029         (calls_setjmp_p): Use walk_tree_without_duplicates.
10030         * pt.c: Don't include hashtab.h.
10031         (for_each_template_parm): Use walk_tree_without_duplicates.
10032         * semantics.c (finish-stmt_tree): Likewise.
10033         (expand_body): Likewise.
10034         * tree.c (walk_tree): Add additional parameter.
10035         (walk_tree_without_duplicates): New function.
10036         (count_trees): Use it.
10037         (verify_stmt_tree): Adjust call to walk_tree.
10038         (find_tree): Use walk_tree_without_duplicates.
10039         (no_linkage_check): Likewise.
10040         (break_out_target_exprs): Adjust call to walk_tree.
10041         (cp_unsave): Likewise.
10042
10043 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10044
10045         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
10046         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
10047         * cp-tree.h (TYPE_BINFO): Adjust comment.
10048         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
10049         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
10050         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
10051         (TYPE_TEMPLATE_INFO): Likewise.
10052         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
10053         * class.c (push_nested_class): Likewise.
10054         * decl.c (lookup_name_real): Likewise.
10055         (grokdeclarator): Likewise.
10056         (grok_op_properties): Likewise.
10057         (xref_tag): Likewise.
10058         (xref_basetypes): Likewise.
10059         * decl2.c (constructor_name_full): Likewise.
10060         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
10061         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
10062         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
10063         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10064         (dump_type_suffix): Likewise.
10065         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
10066         instead.
10067         (get_aggr_from_typedef): Likewise.
10068         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
10069         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10070         (write_template_parm): Likewise.
10071         (write_template_template_parm): Check tree code instead of
10072         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10073         * method.c (build_overload_nested_name): Add
10074         BOUND_TEMPLATE_TEMPLATE_PARM.
10075         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
10076         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10077         * pt.c (convert_template_argument): Check tree code instead of
10078         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10079         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
10080         (for_each_template_parm): Adjust comment.
10081         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
10082         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10083         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
10084         template_args_equal to compare template template parameter cases.
10085         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10086         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
10087         instead.
10088         * tree.c (copy_template_template_parm): Decide whether to create
10089         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
10090         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10091         (copy_tree_r): Likewise.
10092         * typeck.c (comptypes): Likewise.  Check tree code instead of
10093         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10094
10095 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
10096
10097         * decl.c (finish_function): Move the code for handling functions
10098         marked with the constructor and destructor attributes inside the
10099         expand_p block.
10100
10101 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10102
10103         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
10104
10105 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10106
10107         * pt.c (lookup_template_class): Remove abort.
10108         * tree.c (get_type_decl): Allow error_mark_node.
10109
10110 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10111
10112         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
10113         TEMPLATE_ID_EXPRs.
10114
10115 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
10116
10117         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
10118         new ABI mangling.
10119
10120 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
10121
10122         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
10123         union tag mismatch error reporting.
10124
10125 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
10126
10127         * call.c (build_scoped_method_call): Check it is not a namespace.
10128
10129 2000-08-30  Jason Merrill  <jason@redhat.com>
10130
10131         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
10132
10133         * tree.c (bot_manip): Check TREE_CONSTANT rather than
10134         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
10135         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
10136
10137         * decl.c (start_function): Always call make_function_rtl.
10138
10139 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
10140
10141         * semantics.c (prune_unused_decls): New function.
10142         (finish_stmt_tree): Call it via walk_tree.
10143
10144 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
10145
10146         * class.c (build_secondary_vtable): Constify a char *.
10147         * decl.c (init_decl_processing): Initialize function_id_node,
10148         pretty_function_id_node, and func_id_node.
10149         * input.c (struct input_source): Constify 'str'.
10150         (feed_input): Constify first argument.
10151         * mangle.c (write_identifier): Constify argument.
10152         * pt.c (mangle_class_name_for_template): Constify argument.
10153
10154 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
10155
10156         * typeck.c (mark_addressable): Remove code that pokes around in
10157         RTL.
10158
10159 2000-08-28  Jason Merrill  <jason@redhat.com>
10160
10161         * lex.c (file_name_nondirectory): Move to toplev.c.
10162
10163         * cp-tree.h (LOCAL_CLASS_P): New macro.
10164         * class.c (finish_struct_1): Use it.
10165
10166 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
10167
10168         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
10169         (write_encoding): Pass another argument to write_name.
10170         (write_name): Add ignore_local_scope parameter.  Fix handling of
10171         local names.
10172         (write_nested_name): Use write_unqualified_name.
10173         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
10174         (write_template_prefix): Use write_unqualified_name.
10175         (write_component): Remove.
10176         (write_local_name): Add parameter.  Use direct local entity to
10177         discriminator calculation.
10178         (write_class_enum_type): Pass another argument to write_name.
10179         (write_template_template_arg): Likewise.
10180         (make_guard_variable): Likewise.
10181
10182 2000-08-27  Jason Merrill  <jason@redhat.com>
10183
10184         * decl.c (pushdecl): Matching decls for local externs are found in
10185         the current level.  Propagate linkage information from previous
10186         declarations.
10187
10188 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10189
10190         * ir.texi (Expressions): Fix typo.
10191
10192 2000-08-25  Greg McGary  <greg@mcgary.org>
10193
10194         * tree.c (init_tree): Use ARRAY_SIZE.
10195
10196 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
10197
10198         * error.c (cp_tree_printer): Rework.
10199
10200 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
10201
10202         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
10203         dyn-string.o.
10204         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
10205         (cp-demangle.o): Remove target.
10206         (dyn-string.o): Likewise.
10207
10208         * decl.c (grokfndecl): Require that `main' return an `int'.
10209         * mangle.c (write_encoding): Don't mangle return types for
10210         conversion functions.
10211
10212 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
10213
10214         * error.c (tree_formatting_info): New data type.
10215         (tree_being_formatted): New macro.
10216         (tree_formatting_flags): Likewise.
10217         (put_whitespace): Likewise.
10218         (print_tree_identifier): Likewise.
10219         (print_identifier): Likewise.
10220         (cp_tree_printer, print_function_argument_list, print_declaration,
10221         print_expression, print_function_declaration,
10222         print_function_parameter, print_type, print_cv_qualifier): New
10223         functions.
10224         (init_error): Initialize lang_printer.
10225
10226 2000-08-24  Jason Merrill  <jason@redhat.com>
10227
10228         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
10229         adjustment necessary.
10230
10231 2000-08-24  Greg McGary  <greg@mcgary.org>
10232
10233         * cp-tree.h (MAIN_NAME_P): Remove macro.
10234
10235 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
10236
10237         * error.c (print_instantiation_context): Don't forget to flush the
10238         buffer.
10239
10240 2000-08-23  Jason Merrill  <jason@redhat.com>
10241
10242         * typeck.c (build_ptrmemfunc): Save the input pmf.
10243
10244         * method.c (process_modifiers): Use same_type_p.
10245
10246 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
10247
10248         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
10249         * mangle.c (write_function_type): Change prototype.
10250         (write_encoding): Don't mangle return types for
10251         constructors or destructors.
10252         (write_type): Adjust call to write_function_type.
10253         * pt.c (instantiate_template): Instantiate alternate entry points
10254         when instantiating the main function.
10255
10256 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
10257
10258         * error.c (cp_print_error_function): Don't use embedded '\n' in
10259         output_printf.
10260
10261 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
10262
10263         * decl.c (init_decl_processing): Remove bogus initialization.
10264         * error.c (lang_print_error_function): Restore here.
10265         (init_error): Initialize print_error_function.
10266
10267 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10268
10269         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
10270
10271 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
10272
10273         * Makefile.in (error.o): Depends on diagnostic.h
10274
10275         * cp-tree.h (problematic_instantiation_changed,
10276         record_last_problematic_instantiation, current_instantiation,
10277         print_instantiation_context): Declare.
10278         (maybe_print_template_context): Remove.
10279
10280         * decl.c (init_decl_processing): Set print_error_function to NULL.
10281         (lang_print_error_function): Remove, since we're using a new
10282         machinery.
10283
10284         * error.c: #include diagnostic.h
10285         (function_category): New function.
10286         (cp_diagnostic_starter): Likewise.
10287         (cp_diagnostic_finalizer): Likewise.
10288         (cp_print_error_function): Likewise.
10289         (maybe_print_instantiation_context): Likewise.
10290         (print_instantiation_full_context): Likewise.
10291         (print_instantiation_partial_context): Likewise.
10292         (print_instantiation_context): Define.
10293         (init_error): Initialize diagnostic pager and finalizer.
10294
10295         * pt.c (problematic_instantiation_changed): Define.
10296         (record_last_problematic_instantiation): Likewise.
10297         (current_instantiation): Likewise.
10298         (maybe_print_template_context): Remove.
10299         (print_template_context): Likewise.
10300         (current_tinst_level): Make static to reflect Brendan Kehoe's
10301         change of 1995-04-13.
10302         (push_tinst_level): Call print_instantiation_context.
10303
10304 2000-08-21  Nix  <nix@esperi.demon.co.uk>
10305
10306         * lang-specs.h: Do not process -o or run the assembler if
10307         -fsyntax-only.
10308
10309 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
10310
10311         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
10312         variables.
10313         * decl2.c (lang_decode_option): Disable gettext attributes for
10314         -ansi.
10315
10316 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
10317
10318         * lex.c (lang_init_options): Default diagnostic message maximum
10319         length to 80, when line-wrapping.
10320
10321 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
10322
10323         * class.c (build_vtbl_initializer): Clear the entire
10324         vtbl_init_data.  Start keeping track of the functions for which we
10325         have created vcall offsets here.
10326         (dfs_build_vcall_offset_vtbl_entries): Remove.
10327         (build_vcall_offset_vtbl_entries): Reimplement.
10328         (add_vcall_offset_vtbl_entries_r): New function.
10329         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
10330         computing when vcall offsets are necessary.
10331
10332 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10333
10334         * decl.c (member_function_or_else): Use cp_error ... %T.
10335         (grokdeclarator): Likewise.
10336         (start_method): Likewise.
10337         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
10338
10339 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10340
10341         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
10342         TYPE_DECLs.
10343
10344 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10345
10346         * cp-tree.h (PTRMEM_OK_P): New macro.
10347         (itf_ptrmem_ok): New enumeration value.
10348         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
10349         argument. Diagnose implicit pointer to member.
10350         (instantiate_type): Don't diagnose implicit pointer to member
10351         here. Pass itf_ptrmem_ok if ok. Adjust calls to
10352         resolve_address_of_overloaded_function.
10353         * init.c (build_offset_ref): Set PTRMEM_OK_P.
10354         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
10355         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
10356         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
10357         (build_unary_op): Deal with single non-static member in
10358         microsoft-land.
10359
10360 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10361
10362         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
10363
10364 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10365
10366         * cp-tree.h (enum_name_string): Remove prototype.
10367         (report_case_error): Remove prototype.
10368         * cp/typeck2.c (enum_name_string): Remove.
10369         (report_case_error): Remove.
10370         * error.c (dump_expr): Deal with enum values directly.
10371         Correctly negate integer constant.
10372
10373 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10374
10375         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
10376         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
10377         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
10378         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
10379         (__cxa_vec_new): Use __cxa_vec_new2.
10380         (__cxa_vec_delete): Use __cxa_vec_delete2.
10381
10382 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10383
10384         * vec.cc (__cxa_vec_new): Set "C" linkage.
10385         (__cxa_vec_ctor): Likewise.
10386         (__cxa_vec_cctor): Likewise.
10387         (__cxa_vec_dtor): Likewise.
10388         (__cxa_vec_delete): Likewise.
10389         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
10390         (__cxa_vec_ctor): Likewise.
10391         (__cxa_vec_cctor): Likewise.
10392         (__cxa_vec_dtor): Likewise.
10393         (__cxa_vec_delete): Likewise.
10394
10395 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10396
10397         * class.c (instantiate_type): Reinstate local variable
10398         deleted in previous change.
10399
10400         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
10401         itf_no_attributes.
10402
10403 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10404
10405         * cp-tree.h (instantiate_type_flags): New enumeration.
10406         (instantiate_type): Change parameter.
10407         * class.c (instantiate_type): Adjust prototype. Adjust.
10408         * call.c (standard_conversion): Adjust instantiate_type call.
10409         (reference_binding): Likewise.
10410         (build_op_delete_call): Likewise.
10411         (convert_like_real): Likewise.
10412         * cvt.c (cp_convert_to_pointer): Likewise.
10413         (convert_to_reference): Likewise.
10414         * pt.c (convert_nontype_argument): Likewise.
10415         * typeck.c (build_binary_op): Likewise.
10416         (build_ptrmemfunc): Likewise.
10417         (convert_for_assignment): Likewise.
10418
10419 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10420
10421         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
10422         (current_aggr): Define.
10423         * decl.c (grokdeclarator): Make sure a friend class is an
10424         elaborated type specifier.
10425         * parse.y (current_aggr): Remove static definition.
10426         (cp_parse_init): Adjust.
10427         (structsp): Clear and restore current_aggr.
10428         (component_decl_list): Clear current_aggr.
10429
10430         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
10431         aggregate tag on the typename's context.
10432
10433         * pt.c (tsubst_friend_class): Return error_mark_node, if
10434         parms becomes NULL.
10435         (instantiate_class_template): Ignore error_mark_node friend types.
10436
10437 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
10438
10439         * cvt.c (warn_ref_binding): New static function, broken out of ...
10440         (convert_to_reference): ... here. Use it.
10441
10442 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10443
10444         * parse.y (template_arg): Add rule for template qualified with
10445         global scope.
10446
10447 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10448
10449         * decl2.c (add_function): Reorganize.
10450         (arg_assoc): Do not consider function template decls.
10451
10452 2000-08-11  Jason Merrill  <jason@redhat.com>
10453
10454         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
10455         looking inside.
10456
10457 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10458
10459         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
10460         (lookup_nested_tag): Likewise.
10461
10462         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
10463         can be produced.
10464
10465 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10466
10467         * parse.y (named_complex_class_head_sans_basetype): Remove
10468         always true if.
10469
10470 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10471
10472         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
10473         explicit TEMPLATE_ID_EXPR args.
10474         (build_expr_from_tree, case CALL_EXPR): Likewise.
10475
10476 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10477
10478         * decl.c (check_tag_decl): Diagnose typename's which don't
10479         declare anything.
10480
10481 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
10482
10483         * init.c (build_aggr_init): Reject bogus array initializers
10484         early.
10485
10486 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
10487
10488         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
10489         runtime.
10490         * cp/tinfo.cc (__dynamic_cast): Likewise.
10491         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
10492
10493 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
10494
10495         * cvt.c (convert_to_pointer_force): Fix error message when
10496         attempting to cast from ambiguous base.
10497
10498 2000-08-08  Jason Merrill  <jason@redhat.com>
10499
10500         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
10501         (tsubst_template_arg_vector): Likewise.
10502
10503         * decl2.c (build_anon_union_vars): Choose the largest field; don't
10504         assume that one will be as large as the union.
10505
10506 2000-08-07  Kazu Hirata  <kazu@hxi.com>
10507
10508         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
10509         * decl.c (pop_labels): Likewise.
10510
10511 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
10512
10513         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
10514         specifications.
10515         (__pointer_to_member_type_info): Likewise.
10516         (__base_class_info): Likewise.
10517         (__class_type_info): Likewise.
10518         (__si_class_type_info): Likewise.
10519         (__vmi_class_type_info): Likewise.
10520         * tinfo.cc (__si_class_type_info::__do_find_public_src):
10521         Changed member names to match specifications.
10522         (__vmi_class_type_info::__do_find_public_src): Likewise.
10523         (__si_class_type_info::__do_dyncast): Likewise.
10524         (__vmi_class_type_info::__do_dyncast): Likewise.
10525         (__si_class_type_info::__do_upcast): Likewise.
10526         (__vmi_class_type_info::__do_upcast): Likewise.
10527         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
10528         (__pbase_type_info::__pointer_catch): Likewise.
10529         (__pointer_type_info::__pointer_catch): Likewise.
10530         (__pointer_to_member_type_info::__pointer_catch): Likewise.
10531
10532 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
10533
10534         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
10535         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
10536         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
10537
10538 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
10539
10540         * cp-tree.h (add_method): Change prototype.
10541         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
10542         Don't double the size of the method vector in the error case.
10543         (handle_using_decl): Adjust call to add_method.
10544         (add_implicitly_declared_members): Likewise.
10545         (clone_function_decl): Likewise.
10546         * decl2.c (check_classfn): Likewise.
10547         * semantics.c (finish_member_declaration): Likewise.
10548
10549 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10550
10551         * decl.c (flag_isoc94): New variable.
10552
10553 2000-08-02  Jason Merrill  <jason@redhat.com>
10554
10555         * pt.c (do_type_instantiation): Add complain parm; don't complain
10556         if called recursively.
10557         * cp-tree.h, parse.y: Adjust.
10558
10559 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
10560
10561         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
10562         -Wno-strict-prototypes.
10563
10564         * g++spec.c: Adjust type of second argument to
10565         lang_specific_driver, and update code as necessary.
10566
10567         * cp-tree.h: Don't prototype min_precision here.
10568         (my_friendly_assert): Cast expression to void.
10569         * semantics.c (do_poplevel): Initialize scope_stmts.
10570
10571 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
10572
10573         * cp-tree.h (DECL_NEEDED_P): Tweak.
10574
10575 2000-07-28  Jason Merrill  <jason@redhat.com>
10576
10577         * lang-specs.h: Use %i in rule for .ii files.
10578
10579 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
10580
10581         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
10582
10583 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
10584
10585         Allow indirect primary bases.
10586         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
10587         primary_base.
10588         (CLASSTYPE_VFIELD_PARENT): Remove.
10589         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
10590         (BINFO_PRIMARY_BINFO): Remove.
10591         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
10592         (BINFO_VBASE_PRIMARY_P): Likewise.
10593         (BINFO_PRIMARY_BASE_OF): New macro.
10594         (BINFO_INDIRECT_PRIMARY_P): Likewise.
10595         (get_primary_binfo): New function.
10596         * decl.c (lang_mark_tree): Make lang_type::primary_base.
10597         * class.c (vcall_offset_data_s): Rename to ...
10598         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
10599         and add ctor_vtbl_p.
10600         (get_derived_offset): Use get_primary_binfo.
10601         (dfs_mark_primary_bases): Adjust handling of virtual primary
10602         bases.
10603         (mark_primary_bases): Likewise.
10604         (set_primary_base): Take a binfo, not an integer, as a
10605         representation of the primary base.
10606         (indirect_primary_base_p): Remove.
10607         (determine_primary_base): Adjust for indirect primary bases.
10608         (dfs_find_final_overrider): Fix typo in coment.
10609         (update_vtable_entry_for_fn): Use get_primary_binfo.
10610         (layout_nonempty_base_or_field): Tweak.
10611         (build_base_fields): Adjust for new primary base semantics.
10612         (dfs_propagate_binfo_offsets): Remove.
10613         (propagate_binfo_offsets): Rewrite.
10614         (dfs_set_offset_for_shared_vbases): Remove.
10615         (layout_virtual_bases): Don't use it.
10616         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
10617         ABI.
10618         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
10619         CLASSTYPE_VFIELD_PARENT.
10620         (dfs_get_primary_binfo): New function.
10621         (get_primary_binfo): Likewise.
10622         (dump_class_hierarchy_r): Tweak printing of primary bases.
10623         (build_vtbl_initializer): Fix typo in comments.  Use
10624         vtbl_init_data.
10625         (build_vcall_and_vbase_vtbl_entries): Likewise.
10626         (build_vbaes_offset_vtbl_entries): Likewise.
10627         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
10628         BV_VCALL_INDEX to handle indirect primary bases.
10629         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
10630         (build_rtti_vtbl_entries): Likewise.
10631         * search.c (get_shared_vbase_if_not_primary): Tweak.
10632         (find_vbase_instance): Likewise.
10633         (binfo_for_vtable): Simplify.
10634         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
10635         (make_binfo): Make it have 11 entries.
10636
10637 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
10638
10639         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
10640         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
10641         ascertaining primaryness.
10642         (G): Remove template_args.
10643         (decl_is_template_id): New function.
10644         (write_encoding): Use decl_is_template_id.
10645         (write_name): Likewise.  Handle type_decls.  Get main variant of
10646         type decls.
10647         (write_nested_name): Likewise.
10648         (write_prefix): Likewise.
10649         (write_template_prefix): Likewise.
10650         (write_special_name_constructor): Remove defunct production from
10651         comment.
10652         (write_bare_function_type): Remove comment about absent parameter.
10653         (write_template_template_arg): Add missing grammar production to
10654         comment.
10655
10656 2000-07-27  Jason Merrill  <jason@redhat.com>
10657
10658         * decl.c (duplicate_decls): If common_type produces a non-typedef
10659         type for a typedef, just use the old type.
10660
10661 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
10662
10663         * cp-tree.h (function_depth): Declare.
10664         (verify_stmt_tree): Likewise.
10665         (find_tree): Likewise.
10666         * decl.c (function_depth): Give it external linkage.
10667         * optimize.c (optimize_function): Increment and decrement it.
10668         * tree.c (verify_stmt_tree_r): New function.
10669         (verify_stmt_tree): Likewise.
10670         (find_tree_r): Likewise.
10671         (find_tree): Likewise.
10672
10673 2000-07-27  Jason Merrill  <jason@redhat.com>
10674
10675         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
10676         TYPE_PTRMEMFUNC_P.
10677         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
10678
10679 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
10680
10681         * decl.c (start_cleanup_fn): Mark the function as `inline'.
10682         * decl2.c (get_guard): Call cp_finish_decl, not
10683         rest_of_decl_compilation, for local guards.
10684         * lex.c (do_identifier): Remove unused variable.
10685
10686 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
10687
10688         * parse.y:  Add missing ';'.
10689
10690 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
10691
10692         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
10693         of `extern "C++"'.
10694
10695 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10696
10697         Kill strict_prototype. Backwards compatibility only for
10698         non NO_IMPLICIT_EXTERN_C systems.
10699         * cp-tree.h (flag_strict_prototype): Remove.
10700         (strict_prototype): Remove.
10701         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
10702         * decl.c (maybe_push_to_top_level): Adjust.
10703         (pop_from_top_level): Adjust.
10704         (decls_match): Only allow sloppy parm matching for ancient
10705         system headers.
10706         (init_decl_processing): Adjust.
10707         (grokdeclarator): Adjust.
10708         * decl2.c (flag_strict_prototype): Remove.
10709         (strict_prototype): Remove.
10710         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
10711         (lang_f_options): Remove "strict-prototype".
10712         (unsupported-options): Add "strict-prototype".
10713         * lex.c (do_identifier): Adjust.
10714         (do_scoped_id): Adjust.
10715         * parse.y (empty_parms): Adjust.
10716         * class.c (push_lang_context): Adjust.
10717         (pop_lang_context): Adjust.
10718         * typeck.c (comp_target_parms): Adjust.
10719
10720 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10721
10722         * decl.c (poplevel): Deal with anonymous variables at for scope.
10723         (maybe_inject_for_scope_var): Likewise.
10724
10725 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
10726
10727         * decl.c: Remove all signal handling code, now done in toplev.c.
10728
10729 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
10730
10731         * decl.c (make_rtl_for_nonlocal_decl): Rework.
10732
10733         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
10734         correctly.
10735
10736 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
10737
10738         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
10739         Define my_friendly_assert and my_friendly_abort as macros
10740         which may call friendly_abort.  Prototype friendly abort, not
10741         my_friendly_abort or my_friendly_assert.
10742         * decl.c (signal_catch): Report the signal caught in the error
10743         message.  Call fatal directly.
10744         * typeck2.c (ack, my_friendly_assert): Delete.
10745         (my_friendly_abort): Rename to friendly_abort.  Expect file,
10746         line, and function parameters.  Report the abort code, then
10747         call fancy_abort.  Do not mask an abort if errors have
10748         already occurred.
10749
10750 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
10751
10752         * typeck.c (comp_target_parms): Remove obsolete parameter.
10753         (comp_target_types): Adjust.
10754
10755 2000-07-17  Jason Merrill  <jason@redhat.com>
10756
10757         * typeck.c (mark_addressable): Never set TREE_USED.
10758         * call.c (build_call): Don't abort on calls to library functions
10759         that have been declared normally.
10760
10761         * typeck.c (build_binary_op): Fix grammar in warning.
10762
10763         * exception.cc (__eh_free): Fix prototype.
10764
10765         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
10766
10767         * decl.c (pushdecl): Handle seeing an OVERLOAD in
10768         IDENTIFIER_NAMESPACE_VALUE.
10769
10770 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
10771
10772         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
10773         * method.c (use_thunk): Correct handling of vcall offsets.
10774
10775 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
10776
10777         * .cvsignore: parse.h and parse.c have no cp- prefix.
10778
10779 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
10780
10781         * .cvsignore: New file.
10782
10783 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
10784
10785         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
10786
10787 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
10788
10789         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
10790         * parse.c: Remove.
10791         * parse.h: Likewise.
10792
10793 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
10794
10795         * class.c (layout_class_type): Add pointers to virtual bases after
10796         base classes under the old ABI.
10797
10798 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
10799
10800         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
10801         (finish_continue_stmt): Likewise.
10802         (begin_for_stmt): Remove call to note_level_for_for.
10803         (finish_goto_stmt): Change call from build_min_nt
10804         to build_stmt.
10805         (finish_expr_stmt): Likewise.
10806         (begin_if_stmt): Likewise.
10807         (begin_while_stmt): Likewise.
10808         (finish_while_stmt): Likewise.
10809         (finish_return_stmt): Likewise.
10810         (begin_for_stmt): Likewise.
10811         (finish_for_stmt): Likewise.
10812         (finish_break_stmt): Likewise.
10813         (begin_switch_stmt): Likewise.
10814         (finish_case_label): Likewise.
10815         (genrtl_try_block): Likewise.
10816         (begin_try_block): Likewise.
10817         (begin_handler): Likewise.
10818         (begin_compound_stmt): Likewise.
10819         (finish_asm_stmt): Likewise.
10820         (finish_label_stmt): Likewise.
10821         (add_decl_stmt): Likewise.
10822         (finish_subobject): Likewise.
10823         (finish_decl_cleanup): Likewise.
10824         (finish_named_return_value): Likewise.
10825         (setup_vtbl_ptr): Likewise.
10826         (add_scope_stmt): Likewise.
10827         * decl.c (finish_constructor_body): Likewise.
10828         (finish_destructor_body): Likewise.
10829         * optimize.c (copy_body_r): Likewise.
10830         (initialize_inlined_parameters): Likewise.
10831         (declare_return_variable): Likewise.
10832         (expand_call_inline): Likewise.
10833
10834 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
10835
10836         * semantics.c (expand_body): Sync interface information
10837         at the end of function body expansion.
10838
10839 2000-07-09  Jason Merrill  <jason@redhat.com>
10840
10841         * init.c (build_new_1): Bail early if the call to new fails.
10842
10843         * decl.c (compute_array_index_type): Check specifically for
10844         an INTEGER_CST, not just TREE_CONSTANT.
10845
10846         * decl.c (duplicate_decls): Don't call duplicate_decls on
10847         the DECL_TEMPLATE_RESULT.
10848         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
10849         codes.
10850
10851         * error.c (dump_template_bindings): Don't crash if we had an
10852         invalid argument list.
10853
10854         * typeck.c (c_expand_start_case): Do narrowing here.
10855         * semantics.c (finish_switch_cond): Not here.
10856
10857 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
10858
10859         * parse.y (asm_clobbers): Do string concatenation.
10860
10861 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
10862
10863         * decl.c (pushtag): Don't put local classes in template functions
10864         on the local_classes list.
10865
10866 2000-07-04  Scott Snyder  <snyder@fnal.gov>
10867
10868         * decl2.c (get_guard): Add missing return for old ABI local
10869         variable case.
10870
10871 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
10872
10873         * cp-tree.h (char_type_p): New function.
10874         * decl.c (init_decl_processing): Don't initialize
10875         signed_wchar_type_node or unsigned_wchar_type_node.
10876         (complete_array_type): Handle brace-enclosed string-constants.
10877         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
10878         * tree.c (char_type_p): New function.
10879         * typeck2.c (digest_init): Use char_type_p.
10880
10881 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
10882
10883         * pt.c (tsubst): Don't layout type, if it's error_mark.
10884
10885 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
10886
10887         * pt.c (instantiate_pending_templates): Reset template level.
10888
10889 2000-07-05  Jason Merrill  <jason@redhat.com>
10890
10891         * call.c (joust): Don't complain about `operator char *()' beating
10892         `operator const char *() const'.
10893
10894 2000-07-04  scott snyder  <snyder@fnal.gov>
10895             Jason Merrill  <jason@redhat.com>
10896
10897         * repo.c (repo_get_id): Handle the case where a class with virtual
10898         bases has a null TYPE_BINFO_VTABLE.
10899
10900 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
10901             Jason Merrill  <jason@redhat.com>
10902
10903         * parse.y (member_init): Just pass in the type.
10904         * init.c (expand_member_init): Handle getting a type.
10905
10906 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10907             Jason Merrill  <jason@redhat.com>
10908
10909         * decl.c (finish_function): Warn if a function has no return
10910         statement.
10911         Suggested by Andrew Koenig.
10912         * typeck.c (check_return_expr): Do set current_function_returns_value
10913         if we got an error_mark_node.
10914
10915 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
10916
10917         * decl2.c (push_decl_namespace): Push the original namespace.
10918
10919 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
10920
10921         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
10922         * semantics.c (begin_class_definition): Clear it.
10923
10924 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
10925
10926         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
10927         (genrtl_expr_stmt): Likewise.
10928         (genrtl_decl_stmt): Likewise.
10929         (genrtl_if_stmt): Likewise.
10930         (genrtl_while_stmt): Likewise.
10931         (genrtl_do_stmt): Likewise.
10932         (genrtl_return_stmt): Likewise.
10933         (genrtl_for_stmt): Likewise.
10934         (genrtl_break_stmt): Likewise.
10935         (genrtl_continue_stmt): Likewise.
10936         (genrtl_scope_stmt): Likewise.
10937         (genrtl_switch_stmt): Likewise.
10938         (genrtl_case_label): Likewise.
10939         (genrtl_begin_compound_stmt): Likewise.
10940         (genrtl_finish_compound_stmt): Likewise.
10941         (genrtl_compound_stmt): Likewise.
10942         (genrtl_asm_stmt): Likewise.
10943
10944         * init.c (begin_init_stmts): Remove call to
10945         genrtl_begin_compound_stmt.
10946         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
10947
10948         * semantics.c (lang_expand_stmt): Changed call to
10949         genrtl_compound_stmt to ignore return value.
10950
10951 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
10952
10953         * mangle.c (canonicalize_for_substitution): Return the canonical
10954         variant of a type.
10955
10956         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
10957         TYPE_DECL.
10958         * typeck.c (commonparms): Remove obstack manipulations.
10959
10960 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
10961
10962         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
10963
10964         * Makefile.in (OBJS): Added ../c-semantics.o.
10965         (OBJDEPS): Likewise.
10966
10967         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
10968         ../c-common.h.
10969         (struct stmt_tree): Added comment.
10970         (current_function_name_declared): Removed.
10971         (stmts_are_full_exprs_p): Likewise.
10972         (genrtl_do_pushlevel): Likewise.
10973         (genrtl_clear_out_block): Likewise.
10974         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
10975         (DECL_ANON_UNION_ELEMS): Likewise.
10976         (emit_local_var): Likewise.
10977         (make_rtl_for_local_static): Likewise.
10978         (do_case): Likewise.
10979         (expand_stmt): Likewise.
10980         (genrtl_decl_cleanup): Likewise.
10981         (c_expand_asm_operands): Likewise.
10982         (c_expand_return): Likewise.
10983         (c_expand_start_case): Likewise.
10984
10985         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
10986         (emit_local_var): Likewise.
10987         (initialize_local_var): Change reference to
10988         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
10989         Change reference to stmts_are_full_exprs_p to
10990         current_stmt_tree->stmts_are_full_exprs_p.
10991         (push_cp_function_context): Likewise.
10992
10993         * expect.c (expand_throw): Change reference to
10994         stmts_are_full_exprs_p.
10995
10996         * init.c (build_aggr_init): Change reference to
10997         stmts_are_full_exprs_p.
10998         (build_vec_init): Likewise.
10999
11000         * optimize.c (maybe_clone_body): Change reference to
11001         current_function_name_declared to
11002         cp_function_chain->name_declared.
11003
11004         * pt.c (instantiate_decl): Change reference to
11005         current_function_name_declared to
11006         cp_function_chain->name_declared.
11007
11008         * semantics.c (expand_cond): Moved declaration to c-common.h.
11009         (genrtl_do_pushlevel): Moved to c-semantics.c.
11010         (genrtl_clear_out_block): Likewise.
11011         (genrtl_goto_stmt): Likewise.
11012         (genrtl_expr_stmt): Likewise.
11013         (genrtl_decl_stmt): Likewise.
11014         (gerntl_if_stmt): Likewise.
11015         (genrtl_while_stmt): Likewise.
11016         (genrtl_do_stmt): Likewise.
11017         (genrtl_return_stmt): Likewise.
11018         (genrtl_for_stmt): Likewise.
11019         (genrtl_break_stmt): Likewise.
11020         (genrtl_continue_stmt): Likewise.
11021         (genrtl_scope_stmt): Likewise.
11022         (genrtl_switch_stmt): Likewise.
11023         (genrtl_case_label): Likewise.
11024         (genrtl_begin_compound_stmt): Likewise.
11025         (genrtl_finish_compound_stmt): Likewise.
11026         (genrtl_compound_stmt): Likewise.
11027         (genrtl_asm_stmt): Likewise.
11028         (genrtl_decl_cleanup): Likewise.
11029         (expand_cond): Likewise.
11030         (expand_stmt): Renamed to ...
11031         (lang_expand_stmt): ... this.
11032         (lang_expand_expr_stmt): Initialize.
11033         (set_current_function_name_declared): Likewise.
11034         (stmts_are_full_exprs_p): Likewise.
11035         (current_function_name_declared): Likewise.
11036         (anon_aggr_type_p): Likewise.
11037         (do_poplevel): Change reference to
11038         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
11039         Change reference to stmts_are_full_exprs_p to
11040         current_stmt_tree->stmts_are_full_exprs_p.
11041         (add_tree): Likewise.
11042         (finish_expr_stmt): Likewise.
11043         (prep_stmt): Likewise.
11044         (lang_expand_stmt): Likewise.
11045         (begin_compound_stmt): Change reference to
11046         current_function_name_declared to
11047         cp_function_chain->name_declared and call to
11048         current_function_name_declared().
11049         (setup_vtbl_ptr): Likewise.
11050         (genrtl_do_poplevel): Removed.
11051
11052 2000-06-30  Jason Merrill  <jason@redhat.com>
11053
11054         * init.c (init_init_processing): Go back to aligning like
11055         double_type_node for old ABI.
11056         (get_cookie_size): Make cookie larger if we get a type that needs
11057         more alignment.
11058         (build_vec_delete): Call it.
11059
11060         * typeck.c (qualify_type_recursive): New fn.
11061         (composite_pointer_type): Use it.
11062         (build_binary_op): Use composite_pointer_type.
11063
11064 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
11065             Jason Merrill  <jason@redhat.com>
11066
11067         * typeck.c (check_return_expr): Don't complain about returning
11068         NULL from operator new if -fcheck-new.
11069         * cp-tree.h: Declare flag_check_new here.
11070         * init.c: Not here.
11071
11072 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
11073
11074         * mangle.c (find_substitution): Use same_type_p.
11075         (write_encoding): Don't check for substitutions.
11076
11077 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
11078
11079         * parse.y (expr_no_comma_rangle): New non-terminal.
11080         (template_parm): Use it for default parameter case.
11081         (template_arg): Use it.
11082         (expr_no_commas): Remove commented out undefined extensions.
11083         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
11084         * parse.h, parse.c: Rebuilt.
11085
11086 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
11087
11088         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
11089         (finish_asm_stmt): Do it here, instead.
11090
11091         * cp-tree.h (ridpointers): Don't declare.
11092         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
11093         (record_builtin_java_type): Likewise.
11094         (init_decl_processing): Likewise.
11095         * lex.c: Move inclusion of lex.h.
11096         (ridpointers): Don't define.
11097         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
11098         RID_MAX.
11099         * lex.h (enum rid): Rename to ...
11100         (enum cp_rid): ... this.
11101         (ridpointers): Don't declare.
11102         * parse.y: Move inclusion of lex.h.
11103         * parse.c: Regenerated.
11104         * spew.c: Move inclusion of lex.h.
11105
11106         * cp-tree.h (struct language_function): Remove temp_name_counter.
11107         (temp_name_counter): Remove.
11108         (get_temp_name): Change prototype.
11109         (get_guard): New function.
11110         (get_guard_cond): Likewise.
11111         (set_guard): Likewise.
11112         * cvt.c (build_up_reference): Adjust call to get_temp_name.
11113         * decl.c (expand_static_init): Use get_guard and friends to
11114         implement guard variables.
11115         * decl2.c (get_temp_name): Assume that the variables created are
11116         always static.
11117         (get_sentry): Rename to ...
11118         (get_guard): ... this.  Implement new ABI guard variables.
11119         (get_guard_bits): New function.
11120         (get_guard_cond): Likewise.
11121         (set_guard): Likewise.
11122         (start_static_initialization_or_destruction): Use them.
11123         (do_static_initialization): Replace sentry with guard throughout.
11124         (do_static_destruction): Likewise.
11125         * init.c (create_temporary_var): Add comment.
11126
11127 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
11128
11129         * mangle.c (find_substitution): Use same_type_p.
11130         (write_encoding): Don't check for substitutions.
11131
11132 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
11133
11134         * parse.y (expr_no_comma_rangle): New non-terminal.
11135         (template_parm): Use it for default parameter case.
11136         (template_arg): Use it.
11137         (expr_no_commas): Remove commented out undefined extensions.
11138         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
11139         * parse.h, parse.c: Rebuilt.
11140
11141 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
11142
11143         * cp-tree.h (flag_const_strings): Remove.
11144         (warn_parentheses): Likewise.
11145         (warn_format): Likewise.
11146         (common_type): Likewise.
11147         (default_conversion): Likewise.
11148         (build_binary_op): Likewise.
11149         (cp_build_binary_op): New macro.
11150         * call.c (build_new_op): Use cp_build_binary_op instead of
11151         build_binary_op.
11152         * class.c (build_vtable_entry_ref): Likewise.
11153         * decl.c (expand_static_init): Likewise.
11154         (compute_array_index_type): Likewise.
11155         (build_enumerator): Likewise.
11156         * decl2.c (delete_sanity): Likewise.
11157         (start_static_initialization_or_destruction): Likewise.
11158         * error.c (dump_type_suffix): Likewise.
11159         * init.c (resolve_offset_ref): Likewise.
11160         (build_new): Likewise.
11161         (build_new_1): Likewise.
11162         (build_vec_delete_1): Likewise.
11163         (build_vec_init): Likewise.
11164         (build_delete): Likewise.
11165         * rtti.c (synthesize_tinfo_fn): Likewise.
11166         (synthesize_tinfo_var): Likewise.
11167         * search.c (expand_upcast_fixups): Likewise.
11168         (fixup_all_virtual_upcast_offsets): Likewise.
11169         * typeck.c (build_array_ref): Likewise.
11170         (get_member_function_from_ptrfunc): Likewise.
11171         (build_binary_op): Add parameter.
11172         (pointer_int_sum): Use cp_build_binary_op.
11173         (pointer_diff): Likewise.
11174         (build_modify_expr): Likewise.
11175         (get_delta_difference): Likewise.
11176         (build_ptrmemfunc): Likewise.
11177
11178 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
11179
11180         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
11181         * decl.c (create_implicit_typedef): Adjust.
11182         * decl2.c (build_artificial_parm): Adjust.
11183         * method.c (implicitly_declare_fn): Adjust.
11184         * pt.c (push_inline_template_parms_recursive): Adjust.
11185         (process_template_parm): Adjust.
11186         (overloaded_template_name): Adjust.
11187         * semantics.c (finish_template_template_parm): Adjust.
11188
11189 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
11190
11191         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
11192         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
11193         where to emit thunks.
11194         (build_vtt): Adjust call to build_vtt_inits.
11195         (build_vtt_inits): Add parameter to indicate whether or not
11196         sub-VTTs for virtual bases should be included.  Adjust handling of
11197         construction vtables.
11198         (get_matching_base): New function.
11199         (dfs_build_vtt_inits): Rename to ...
11200         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
11201         construction vtables.
11202         (dfs_fixup_binfo_vtbls): Likewise.
11203         (build_ctor_vtbl_groups): Build construction vtables for virtual
11204         bases, too.
11205         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
11206         to build construction vtbls.
11207         (dfs_accumulate_vtbl_inits): Adjust handling of
11208         construction vtables.
11209
11210         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
11211         types correctly.
11212
11213 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
11214
11215         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
11216
11217 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
11218
11219         * search.c (hides): Remove.
11220         (is_subobject_of_p): Add most_derived parameter. Use
11221         CANONICAL_BINFO.
11222         (lookup_field_queue_p): Adjust.
11223         (lookup_field_r): Adjust.
11224
11225 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
11226
11227         * decl2.c (handle_class_head): Bash typedefs to the type's main
11228         decl.
11229
11230 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
11231
11232         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
11233         (begin_global_stmt_expr): ... this.
11234         (genrtl_finish_stmt_expr): Rename to ...
11235         (finish_global_stmt_expr): ... this.
11236         * init.c (begin_init_stmts): Adjust calls.
11237         (finish_init_stmts): Likewise.
11238         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
11239         (begin_global_stmt_expr): ... this.
11240         (genrtl_finish_stmt_expr): Rename to ...
11241         (finish_global_stmt_expr): ... this.
11242
11243 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11244
11245         * search.c (lookup_member): Fix typo in comment.
11246
11247 2000-06-24  Jason Merrill  <jason@redhat.com>
11248
11249         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
11250         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
11251
11252 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11253
11254         * parse.y (complex_direct_notype_declarator): Support global_scope.
11255         * Makefile.in: Adjust conflict count.
11256
11257 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11258
11259         * parse.y (template_arg): Convert TEMPLATE_DECL
11260         that is a template template parameter to
11261         TEMPLATE_TEMPLATE_PARM here.
11262
11263         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
11264         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
11265         (copy_template_template_parm): Adjust prototype.
11266         * decl.c (grokdeclarator): Remove dead code.
11267         * pt.c (process_template_parm): Tidy.
11268         (lookup_template_class): Construct nodes in
11269         copy_template_template_parm.
11270         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
11271         lookup_template_class.  Use TYPE_TI_TEMPLATE.
11272         * tree.c (copy_template_template_parm): Add NEWARGS
11273         parameter.
11274         (mapcar): Adjust call to copy_template_template_parm.
11275         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
11276         * method.c (build_template_template_parm_names): Change error
11277         code to avoid compilation warning.
11278
11279         * gxxint.texi: Document template template parameter
11280         name mangling.
11281
11282 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
11283
11284         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
11285         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
11286         (cp-demangle.o): New rule.
11287         (dyn-string.o): Likewise.
11288         * inc/cxxabi.h (__cxa_demangle): New declaration.
11289
11290 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
11291
11292         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
11293         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
11294         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
11295         a tree, not an int.
11296         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
11297         (make_thunk): Change prototype.
11298         (emit_thunk): Rename to use_thunk.
11299         (mangle_thunk): Change prototype.
11300         * class.c (get_derived_offset): Simplify.
11301         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
11302         BV_GENERATE_THUNK_WITH_VTABLE_P.
11303         (build_primary_vtable): Simplify.
11304         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
11305         (dfs_find_base): Remove.
11306         (update_vtable_entry_for_fn): Correct bug in finding the base
11307         where a virtual function was first declared.  Figure out whether
11308         or not to emit a vcall-thunk with the vtables in which it appears.
11309         Correct logic for deciding whether to use an ordinary thunk, or a
11310         vcall thunk.
11311         (finish_struct_1): Remove unnecssary code.
11312         (build_vtbl_initializer): Use ssize_int for the running counter of
11313         negative indices.
11314         (build_vtbl_initializer): Only use vcall thunks where necessary.
11315         Mark thunks as needing to be emitted with their vtables, or not.
11316         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
11317         indices.  Use size_binop.
11318         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
11319         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
11320         size_binop.
11321         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
11322         (build_vtable_entry): Mark thunks as needing to be emitted with
11323         their vtables, or not.
11324         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
11325         * decl2.c (mark_vtable_entries): Use use_thunk instead of
11326         emit_thunk.
11327         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
11328         information.
11329         * error.c (dump_expr): Use BV_FN.
11330         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
11331         not an int.
11332         * method.c (make_thunk): Likewise.
11333         (emit_thunk): Rename to use_thunk.  Allow callers to decide
11334         whether or not to actually emit the thunk.  Adjust for changes in
11335         representation of vcall offsets.
11336         * search.c (dfs_get_pure_virtuals): Use BV_FN.
11337         * semantics.c (emit_associated_thunks): New function.
11338         (expand_body): Use it.
11339         * ir.texi: Adjust decriptions of thunks.
11340
11341 2000-06-22  Jason Merrill  <jason@redhat.com>
11342
11343         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
11344         (tsubst_friend_function): Copy it here.
11345
11346         * decl.c (grok_op_properties): Fix typo.
11347
11348         * decl2.c (delete_sanity): Clarify warning, avoid failure on
11349         deleting void*.
11350
11351         * pt.c (check_explicit_specialization): Clarify error.
11352
11353         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
11354         an old OVERLOAD when we're declaring a non-function.
11355         (pushdecl, destroy_local_var): Check for error_mark_node.
11356         (warn_extern_redeclared_static): Also bail early if
11357         we're a CONST_DECL.
11358         (push_overloaded_decl): Ignore an old error_mark_node.
11359
11360 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
11361
11362         * call.c (build_x_va_arg): Check if in a template decl.
11363         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
11364
11365 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11366
11367         * class.c (push_lang_context): TYPE_NAME gets you to the Java
11368         types DECLs.
11369         * decl.c (check_goto): Computed gotos assumed OK.
11370
11371 2000-06-20  Jason Merrill  <jason@redhat.com>
11372
11373         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
11374         for which we don't need to look for instantiations.
11375
11376 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
11377
11378         * parse.y (program): Always call finish_translation_unit.
11379         * parse.c, parse.h: Rebuilt.
11380
11381 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
11382
11383         * method.c: Don't include hard-reg-set.h.
11384
11385 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
11386
11387         * rtti.c (get_base_offset): Cope when vbase field is in a base.
11388
11389 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
11390
11391         * call.c (build_conditional_expr): Use VOID_TYPE_P.
11392         * cvt.c (cp_convert_to_pointer): Likewise.
11393         (convert_to_void): Likewise.
11394         * error.c (dump_expr): Likewise.
11395         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
11396         * init.c (build_delete): Likewise.
11397         * method.c (emit_thunk): Likewise.
11398         * optmize.c (declare_return_variable): Likewise.
11399         * rtti.c (get_tinfo_decl_dynamic): Likewise.
11400         (get_typeid): Likewise.
11401         (build_dynamic_cast_1): Likewise.
11402         * typeck.c (composite_pointer_type): Likewise.
11403         (common_type): Likewise.
11404         (build_indirect_ref): Likewise.
11405         (build_binary_op): Likewise.
11406         (build_x_compound_expr): Likewise.
11407         (check_return_expr): Likewise.
11408         * typeck2.c (add_exception_specifier): Likewise.
11409
11410         * mangle.c (write_method_parms): Use direct comparison for end
11411         of parmlist.
11412
11413 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
11414
11415         * cp-tree.h (genrtl_try_block): Declare function.
11416         (genrtl_handler): Likewise.
11417         (genrtl_catch_block): Likewise.
11418         (genrtl_ctor_stmt): Likewise.
11419         (genrtl_subobject): Likewise.
11420         (genrtl_decl_cleanup): Likewise.
11421         (genrtl_do_poplevel): Likewise.
11422         (genrtl_do_pushlevel): Likewise.
11423         (genrtl_clear_out_block): Likewise.
11424         (genrtl_goto_stmt): Likewise.
11425         (genrtl_expr_stmt): Likewise.
11426         (genrtl_decl_stmt): Likewise.
11427         (genrtl_if_stmt): Likewise.
11428         (genrtl_while_stmt): Likewise.
11429         (genrtl_do_stmt): Likewise.
11430         (genrtl_return_stmt): Likewise.
11431         (genrtl_for_stmt): Likewise.
11432         (genrtl_break_stmt): Likewise.
11433         (genrtl_continue_stmt): Likewise.
11434         (genrtl_scope_stmt): Likewise.
11435         (genrtl_switch_stmt): Likewise.
11436         (genrtl_case_label): Likewise.
11437         (genrtl_begin_compound_stmt): Likewise.
11438         (genrtl_finish_compound_stmt): Likewise.
11439         (genrtl_compound_stmt): Likewise.
11440         (genrtl_asm_stmt): Likewise.
11441         (genrtl_named_return_value): Likewise.
11442         (genrtl_begin_stmt_expr): Likewise.
11443         (genrtl_finish_stmt_expr): Likewise.
11444         (finish_for_stmt): Removed first argument.
11445         (finish_switch_stmt): Likewise.
11446
11447         * semantics.c (genrtl_try_block): Define function.
11448         (genrtl_handler): Likewise.
11449         (genrtl_catch_block): Likewise.
11450         (genrtl_ctor_stmt): Likewise.
11451         (genrtl_subobject): Likewise.
11452         (genrtl_decl_cleanup): Likewise.
11453         (genrtl_do_poplevel): Likewise.
11454         (genrtl_do_pushlevel): Likewise.
11455         (genrtl_clear_out_block): Likewise.
11456         (genrtl_goto_stmt): Likewise.
11457         (genrtl_expr_stmt): Likewise.
11458         (genrtl_decl_stmt): Likewise.
11459         (genrtl_if_stmt): Likewise.
11460         (genrtl_while_stmt): Likewise.
11461         (genrtl_do_stmt): Likewise.
11462         (genrtl_return_stmt): Likewise.
11463         (genrtl_for_stmt): Likewise.
11464         (genrtl_break_stmt): Likewise.
11465         (genrtl_continue_stmt): Likewise.
11466         (genrtl_scope_stmt): Likewise.
11467         (genrtl_switch_stmt): Likewise.
11468         (genrtl_case_label): Likewise.
11469         (genrtl_begin_compound_stmt): Likewise.
11470         (genrtl_finish_compound_stmt): Likewise.
11471         (genrtl_compound_stmt): Likewise.
11472         (genrtl_asm_stmt): Likewise.
11473         (genrtl_named_return_value): Likewise.
11474         (genrtl_begin_stmt_expr): Likewise.
11475         (genrtl_finish_stmt_expr): Likewise.
11476         (finish_for_stmt): Removed first argument and generate rtl
11477         specific code.
11478         (finish_switch_stmt): Likewise.
11479         (do_poplevel): Removed generate rtl specific code.
11480         (do_pushlevel): Likewise.
11481         (add_tree): Likewise.
11482         (finish_goto_stmt): Likewise.
11483         (finish_expr_stmt): Likewise.
11484         (begin_if_stmt): Likewise.
11485         (finish_if_stmt_cond): Likewise.
11486         (finish_then_clause): Likewise.
11487         (begin_else_clause): Likewise.
11488         (finish_else_clause): Likewise.
11489         (finish_if_stmt): Likewise.
11490         (clear_out_block): Likewise.
11491         (begin_while_stmt): Likewise.
11492         (finish_while_stmt_cond): Likewise.
11493         (finish_while_stmt): Likewise.
11494         (begin_do_stmt): Likewise.
11495         (finish_do_body): Likewise.
11496         (finish_do_stmt): Likewise.
11497         (finish_return_stmt): Likewise.
11498         (begin_for_stmt): Likewise.
11499         (finish_for_init_stmt): Likewise.
11500         (finish_for_cond): Likewise.
11501         (finish_for_expr): Likewise.
11502         (finish_break_stmt): Likewise.
11503         (finish_continue_stmt): Likewise.
11504         (begin_switch_stmt): Likewise.
11505         (finish_switch_cond): Likewise.
11506         (finish_case_label): Likewise.
11507         (begin_try_block): Likewise.
11508         (begin_function_try_block): Likewise.
11509         (finish_try_block): Likewise.
11510         (finish_cleanup_try_block): Likewise.
11511         (finish_cleanup): Likewise.
11512         (finish_function_try_block): Likewise.
11513         (finish_handler_sequence): Likewise.
11514         (finish_function_handler_sequence): Likewise.
11515         (begin_handler): Likewise.
11516         (finish_handler_parms): Likewise.
11517         (begin_catch_block): Likewise.
11518         (finish_handler): Likewise.
11519         (begin_compound_stmt): Likewise.
11520         (finish_compound_stmt): Likewise.
11521         (finish_asm_stmt): Likewise.
11522         (finish_label_stmt): Likewise.
11523         (finish_label_decl): Likewise.
11524         (finish_subobject): Likewise.
11525         (finish_decl_cleanup): Likewise.
11526         (finish_named_return_value): Likewise.
11527         (begin_stmt_expr): Likewise.
11528         (finish_stmt_expr): Likewise.
11529
11530         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
11531         to call genrtl_expr_stmt when appropriate.
11532
11533         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
11534         begin_compound_expr to call genrtl_begin_stmt_expr and
11535         genrtl_begin_compound_expr when appropriate.
11536         (finish_init_stmts): Changed calls to finish_compound_expr and
11537         finish_stmt_expr to call genrtl_finish_compound_expr and
11538         genrtl_finish_stmt_expr when appropriate.
11539         (expand_default_init): Changed call to finish_expr_stmt to call
11540         genrtl_expr_stmt when appropriate.
11541         (build_vec_init): Likewise.
11542
11543         * parse.y (simple_stmt): Removed first argument from call to
11544         finish_for_stmt. Removed first argument from call to
11545         finish_switch_stmt.
11546
11547         * parse.c: Regenerated.
11548
11549         * pt.c (tsubst_expr): Removed first argument from call to
11550         finish_for_stmt. Removed first argument from call to
11551         finish_switch_stmt.
11552
11553 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
11554
11555         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
11556         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
11557
11558         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
11559         (cplus_tree_code_length[]): Likewise.
11560         (cplus_tree_code_name[]): Likewise.
11561         (init_parse): Added call to add_c_tree_codes. Changed
11562         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
11563
11564 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
11565
11566         * cp-tree.h (finish_mem_initializers): Declare.
11567         (count_trees): Likewise.
11568         * parse.y (base_init): Use finish_mem_initializers.
11569         * semantics.c (finish_mem_initializers): New function.
11570
11571         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
11572         the number of trees.
11573         (n_trees): Remove.
11574         (count_trees): Don't use it.
11575
11576 2000-06-15  Jason Merrill  <jason@redhat.com>
11577
11578         * tree.c (count_trees): New debugging function.
11579
11580         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
11581         * init.c (build_member_call): Pull out the name of a DECL.
11582
11583         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
11584         * semantics.c (expand_body): Push to TV_INTEGRATION here.
11585         * optimize.c (optimize_function): Not here.
11586         * pt.c (instantiate_decl): Push to TV_PARSE.
11587
11588 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
11589
11590         * cp-tree.h (struct language_function): Remove x_base_init_list
11591         and x_member_init_list.
11592         (current_base_init_list): Remove.
11593         (current_member_init_list): Likewise.
11594         (setup_vtbl_ptr): Change prototype.
11595         (emit_base_init): Likewise.
11596         (expand_member_init): Likewise.
11597         (reinit_parse_for_function): Remove.
11598         * decl.c (save_function_data): Don't clear x_base_init_list and
11599         x_member_init_list.
11600         (mark_language_function): Don't mark them.
11601         * init.c (perform_member_init): Tweak comment.
11602         (sort_member_init): Take the list of initializers as an argument.
11603         (sort_base_init): Likewise.
11604         (emit_base_init): Likewise.
11605         (expand_member_init): Return the initializer.  Don't use global
11606         variables.
11607         * lex.c (reinit_parse_for_function): Remove.
11608         * method.c (build_template_parm_names): Correct substitution.
11609         (do_build_copy_constructor): Don't use current_member_init_list
11610         and current_base_init_list.
11611         (synthesize_method): Likewise.
11612         * parse.y (base_init): Split mem-initializers into
11613         base-initializers and field-initializers.
11614         (member_init_list): Build up the list here.
11615         (member_init): Return the initializer.
11616         (fn.depfn): Don't use reinit_parse_for_function.
11617         * parse.c: Regenerated.
11618         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
11619         ERROR_MARK.
11620         (tsubst_expr): Don't use current_member_init_list
11621         and current_base_init_list.
11622         (tsubst_expr_values): Rename to ...
11623         (tsubst_initializer_list): ... this.  Use convert_from_reference.
11624         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
11625         and current_base_init_list.
11626         (begin_function_definition): Don't call reinit_parse_for_function.
11627
11628         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
11629
11630         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
11631         correctly.
11632
11633         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
11634
11635 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
11636
11637         * cp-tree.h (IF_COND): Move to c-common.h.
11638         (THEN_CLAUSE): Likewise.
11639         (ELSE_CLAUSE): Likewise.
11640         (WHILE_COND): Likewise.
11641         (WHILE_BODY): Likewise.
11642         (DO_COND): Likewise.
11643         (DO_BODY): Likewise.
11644         (RETURN_EXPR): Likewise.
11645         (EXPR_STMT_EXPR): Likewise.
11646         (FOR_INIT_STMT): Likewise.
11647         (FOR_COND): Likewise.
11648         (FOR_EXPR): Likewise.
11649         (FOR_BODY): Likewise.
11650         (SWITCH_COND): Likewise.
11651         (SWITCH_BODY): Likewise.
11652         (CASE_LOW): Likewise.
11653         (CASE_HIGH): Likewise.
11654         (GOTO_DESTINATION): Likewise.
11655         (COMPOUND_BODY): Likewise.
11656         (ASM_CV_QUAL): Likewise.
11657         (ASM_STRING): Likewise.
11658         (ASM_OUTPUTS): Likewise.
11659         (ASM_INPUTS): Likewise.
11660         (ASM_CLOBBERS): Likewise.
11661         (DECL_STMT_DECL): Likewise.
11662         (STMT_EXPR_STMT): Likewise.
11663         (LABEL_STMT_LABEL): Likewise.
11664         (SCOPE_BEGIN_P): Likewise.
11665         (SCOPE_END_P): Likewise.
11666         (SCOPE_STMT_BLOCK): Likewise.
11667         (SCOPE_NULLIFIED_P): Likewise.
11668         (SCOPE_NO_CLEANUPS_P): Likewise.
11669         (SCOPE_PARTIAL_P): Likewise.
11670         (ASM_VOLATILE_P): Likewise.
11671         (STMT_LINENO): Likewise.
11672         (STMT_LINENO_FOR_FN_P): Likewise.
11673
11674         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
11675         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
11676         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
11677         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
11678         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
11679
11680         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
11681
11682         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
11683         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
11684
11685         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
11686         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
11687         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
11688
11689 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
11690
11691         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
11692         * class.c (dfs_find_final_overrider): Set it appropriately.
11693         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
11694         avoid unneeded secondary vptrs.
11695
11696 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
11697
11698         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
11699         (check_bitfield_decl, check_field_decl): Likewise.
11700         (build_vtbl_or_vbase_field, build_base_field): Likewise.
11701         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
11702         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
11703         (xfer_tag, finish_enum): Likewise.
11704         * decl2.c (finish_builtin_type): Likewise.
11705         * init.c (init_init_processing): Likewise.
11706         * pt.c (instantiate_class_template): Likewise.
11707         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
11708         * cp-tree.h (struct lang_type): Add user_align member.
11709         (CLASSTYPE_USER_ALIGN): Define.
11710
11711 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
11712
11713         * Make-lang.in (c++.install-common): Install g++-cross in
11714         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
11715         $(target_alias)-g++ and $(target_alias)-c++.
11716
11717 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
11718
11719         * class.c (vcall_offset_data_s): Add last_init and fns.
11720         (overrides): Rename to same_signature_p.
11721         (dfs_find_final_overrider): Adjust accordingly.
11722         (mark_overriders): Likewise.
11723         (warn_hidden): Likewise.
11724         (build_vtbl_initializer): Reorganize machinery for building things
11725         at negative offsets.
11726         (build_vcall_and_vbase_vtbl_entries): Likewise.
11727         (build_vbase_offset_vtbl_entries): Likewise.
11728         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
11729         offset entries.  Do not create two entries for functions with the
11730         same signature.
11731         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
11732         (build_rtti_vtbl_entries): Reorganize machinery for building things
11733         at negative offsets.
11734
11735         * optimize.c (expand_call_inline): Don't recurse into the code
11736         used to initialize the parameters more than once.
11737
11738 2000-06-11  Mark Mitchell <mark@codesourcery.com>
11739
11740         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
11741         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
11742         (find_substitution): Only use the `Sa' substitution for
11743         std::allocator, not instantiations of it.
11744         (write_template_prefix): Move comment.  Only use a TREE_LIST to
11745         represent substitutions for a member template.
11746         (write_array_type): Mangle array dimensions correctly.
11747         * optimize.c (maybe_clone_body): Copy more information from the
11748         cloned function.
11749         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
11750         on the regenerated declaration.
11751
11752 2000-06-11  Chip Salzenberg  <chip@valinux.com>
11753             Mark Mitchell <mark@codesourcery.com>
11754
11755         * class.c (build_vtable): Clarify comment.
11756         (build_ctor_vtbl_group): Pass the most derived type to
11757         build_vtable.
11758
11759 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11760
11761         * decl2.c (compare_options): Don't needlessly cast away const-ness.
11762
11763 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
11764
11765         * decl.c (add_binding): Handle duplicate declarations of external
11766         variables.
11767
11768 2000-06-09  Chip Salzenberg  <chip@valinux.com>
11769             Mark Mitchell <mark@codesourcery.com>
11770
11771         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
11772         argument.
11773         (write_signed_number): New macro.
11774         (write_unsigned_number): Likewise.
11775         (write_source_name): Use them.
11776         (write_number): Handle signed and unsigned values.
11777         (write_integer_cst): Use tree_int_cst_sgn, and use
11778         write_unsigned_number or write_signed_number as appropriate.
11779         (write_discriminator): Use write_unsigned_number or
11780         write_signed_number as appropriate.
11781         (write_template_arg_literal): Likewise.
11782         (write_array_type): Use tree_low_cst.
11783         (write_template_parm):  Use write_unsigned_number or
11784         write_signed_number as appropriate.
11785         (write_substitution): Adjust call to write_number.
11786         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
11787         (write_expression): Handle non-type template arguments of
11788         reference type correctly.
11789         (mangle_thunk): Use write_signed_number.
11790
11791 2000-06-09  Chip Salzenberg  <chip@valinux.com>
11792
11793         * mangle.c (find_substition): Don't mangle objects with typename
11794         substitutions (e.g. "cin" as "Si").
11795
11796 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
11797
11798         * call.c (add_candidate): Use ggc_alloc_cleared.
11799         * decl.c (lookup_label): Likewise.
11800         * lex.c (retrofit_lang_decl): Likewise.
11801
11802 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
11803
11804         * semantics.c (expand_body): Push to TV_EXPAND.
11805         * optimize.c (optimize_function): Push to TV_INTEGRATION.
11806         * decl.c (start_function): Always call announce_function.
11807
11808         * tinfo2.cc: Just declare abort.
11809
11810 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
11811
11812         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
11813         whenever @ is a symbolic name.
11814
11815 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
11816
11817         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
11818
11819 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
11820
11821         * decl.c (pushdecl): Look up functions by DECL_NAME, not
11822         DECL_ASSEMBLER_NAME.
11823
11824 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
11825
11826         * decl2.c (c_language): Define.
11827
11828 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
11829
11830         * lex.c (lang_init_options): Tweak.
11831
11832         * decl2.c: Remove #inclusion of diagnostic.h
11833         (lang_decode_option): Move diagnostic formatting options to
11834         toplevel.
11835
11836         * lang-options.h: Remove documentation for diagnostic options.
11837
11838         * Makefile.in (lex.o): Depends upon diagnostic.h
11839
11840 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
11841
11842         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
11843         the same DECL_RESULT, it's not a redefinition.
11844         * pt.c (tsubst_decl): Remove code to handle illegal
11845         specializations.
11846
11847 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
11848
11849         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
11850
11851 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
11852
11853         * search.c (maybe_suppress_debug_info): Don't check
11854         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
11855
11856         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
11857         here if extern_p.
11858
11859         Remember instantiation context in deferred instantiations.
11860         * cp-tree.h (struct tinst_level): Remove.
11861         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
11862         * pt.c (current_tinst_level): Now a tree.
11863         (print_template_context, push_tinst_level, pop_tinst_level,
11864         tinst_for_decl): Adjust.
11865         (reopen_tinst_level): New fn.
11866         (init_pt): Register current_tinst_level as a root.
11867         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
11868         of the pending templates list.
11869         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
11870         * lex.c (extract_interface_info): Adjust.
11871         * decl2.c (warn_if_unknown_interface): Adjust.
11872
11873 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
11874
11875         * class.c (indirect_primary_base_p): New function.
11876         (determine_primary_base): Use it.
11877
11878 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
11879
11880         Update new-abi dynamic cast algorithm.
11881         * tinfo.cc (__class_type_info::__dyncast_result): Add
11882         whole_details. Adjust constructor.
11883         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
11884         Avoid unnecessary searching.
11885         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
11886
11887 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11888
11889         * decl.c (init_decl_processing): Don't call record_component_aliases.
11890         * tree.c (build_cplus_array_type_1): Likewise.
11891
11892 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
11893
11894         * ir.texi: Correct typo.
11895         * mangle.c (write_expression): Handle non-type template arguments
11896         with reference type.
11897         * method.c (build_overload_value): Likewise.
11898         * pt.c (convert_nontype_argument): Explicitly represent conversion
11899         to a reference with an ADDR_EXPR.
11900         (unify): Always unify arguments in left-to-right order.
11901
11902 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
11903             Mark Mitchell  <mark@codesourcery.com>
11904
11905         * Make-lang.in (CXX_SRCS): Add mangle.c.
11906         * Makefile.in (CXX_OBJS): Add mangle.o.
11907         (mangle.o): New rule.
11908
11909         * class.c (local_classes): New variable.
11910         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
11911         (get_vtt_name): Use mangle_vtt_name for new ABI.
11912         (init_class_processing): Initialize local_classes.
11913         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
11914         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
11915         (std_identifier): New macro.
11916         (DECL_VOLATILE_MEMFUNC_P): New macro.
11917         (DECL_NAMESPACE_STD_P): Likewise.
11918         (local_classes): Declare.
11919         (get_mostly_instantiated_function_type): Declare.
11920         (init_mangle): Declare.
11921         (mangle_decl): Likewise.
11922         (mangle_type_string): Likewise.
11923         (mangle_type): Likewise.
11924         (mangle_typeinfo_for_type): Likewise.
11925         (mangle_typeinfo_string_for_type): Likewise.
11926         (mangle_vtbl_for_type): Likewise.
11927         (mangle_vtt_for_type): Likewise.
11928         (mangle_ctor_vtbl_for_type): Likewise.
11929         (mangle_thunk): Likewise.
11930         (mangle_conv_op_name_for_type): Likewise.
11931         (mangle_guard_variable): Likewise.
11932         * decl.c (pushtag): Keep track of local classes.
11933         (initialize_predefined_identifiers): Initialize std_identifier.
11934         (init_decl_processing): Use std_identifier.
11935         (start_decl): Don't treat instantiations as specializations.
11936         (grokdeclarator): Likewise.
11937         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
11938         name for fully-instantiated templates.
11939         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
11940         destructors with the new ABI.
11941         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
11942         (grokfield): Use mangle_type for new ABI.
11943         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
11944         (get_sentry): Use mangle_guard_variable for new ABI.
11945         (start_static_initialization_or_destruction): Likewise.
11946         * expr.c (extract_aggr_init): Remove.
11947         (extract_scalar_init): Likewise.
11948         (extract_init): Remove #if 0'd code.
11949         * mangle.c: New function.
11950         * method.c (build_mangled_name): Assert not flag_new_abi.
11951         (build_static_name): Likewise.
11952         (build_decl_overload_real): Likewise.
11953         (build_typename_overload): Likewise.
11954         (build_overload_with_type): Likewise.
11955         (build_overload_name): Likewise.
11956         (get_ctor_vtbl_name): Likewise.
11957         (start_squangling): Likewise.
11958         (get_id_2): Likewise.
11959         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
11960         (init_method): Call init_mangle for new ABI.
11961         (make_thunk): Call mangle_thunk for new ABI.
11962         * operators.def: Correct new ABI manglings for the `%' operator.
11963         Add `::' operator.
11964         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
11965         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
11966         (lookup_template_class): Call mangle_decl for new ABI.
11967         (get_mostly_instantiated_function_type): New function.
11968         (set_mangled_name_for_template_decl): Use it.
11969         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
11970         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
11971         conversion op names.
11972         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
11973         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
11974         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
11975         mangle_typeinfo_string_for_type.
11976
11977 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
11978
11979         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
11980         (INNERMOST_TEMPLATE_ARGS): New macro.
11981         (innermost_args): Remove.
11982         (get_innermost_template_args): New function.
11983         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
11984         * error.c (dump_function_decl): Be caution when using
11985         most_general_template.
11986         * method.c (build_template_parm_names):  Use
11987         INNERMOST_TEMPLATE_ARGS.
11988         * pt.c (add_to_template_args): Tidy comment
11989         (get_innermost_template_args): New function.
11990         (check_explicit_specialization): Clear DECL_INITIAL for a new
11991         specialization.
11992         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
11993         Tidy.
11994         (push_template_decl): Always register specializations of the most
11995         general template.
11996         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
11997         (coerce_template_parms): Likewise.
11998         (lookup_template_class): Likewise.
11999         (innermost_args): Remove.
12000         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
12001         (tsubst_decl): Handle tricky specializations.  Use
12002         get_innermost_template_args.
12003         (instantiate_template): Simplify handling of partial
12004         instantiations.
12005         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
12006         (most_general_template): Reimplement, in a more straightforward
12007         manner.
12008         (regenerate_decl_from_template): Tweak formatting.  Use
12009         TMPL_ARGS_DEPTH for clarity.
12010         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
12011
12012         * dump.c (dequeue_and_dump): Dump information about thunks.
12013
12014 2000-06-01  Richard Henderson  <rth@cygnus.com>
12015
12016         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
12017
12018 2000-06-01  Richard Henderson  <rth@cygnus.com>
12019
12020         * decl2.c (unsupported_options): Fix typo, make const.
12021         (lang_decode_option): Fix bsearch argument order.
12022
12023 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
12024
12025         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
12026         on FIELD_DECLs.
12027
12028 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12029
12030         * cp-tree.h (c_get_alias_set): Deleted.
12031         * Makefile.in (decl.o): Include ../expr.h.
12032         * decl.c (expr.h): Include.
12033         (init_decl_processing): Call record_component_aliases for arrays.
12034         (grokdeclarator): Likewise.
12035         Set TREE_ADDRESSABLE for fields that aren't bitfields.
12036         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
12037
12038 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
12039
12040         Remove guiding declaration support.
12041         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
12042         (flag_guiding_decls): Remove.
12043         * call.c (build_user_type_conversion_1): Remove support for
12044         guiding decls.
12045         (build_new_function_call): Likewise.
12046         (build_new_op): Likewise.
12047         (build_new_method_call): Likewise.
12048         * decl.c (start_function): Likewise.
12049         * friend.c (is_friend): Likewise.
12050         (do_friend): Likewise.
12051         * decl2.c ((flag_dump_translation_unit): Make it const.
12052         (flag_guiding_decls): Remove.
12053         (unsupported_options): New variable
12054         (compare_options): New function.
12055         (lang_decode_option): Use them.
12056
12057         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
12058
12059         * method.c (mangle_expression): Adjust test for legal expression
12060         operators.
12061
12062         * pt.c (instantiate_decl): Save and restore the local
12063         specializations list.
12064
12065 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
12066
12067         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
12068
12069 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
12070
12071         * call.c (add_template_candidate_real): Handle member template
12072         constructors for classes with virtual bases.
12073         (build_user_type_conversion_1): Use in_charge_arg_for_name.
12074         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
12075
12076         * ir.texi: Update thunk documentation.
12077
12078         * call.c (joust): Fix handling of overloaded builtin operators.
12079
12080 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
12081
12082         * cp-tree.h (DECL_ANTICIPATED): New macro.
12083         Document new use of DECL_LANG_FLAG_7.
12084         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
12085         in the user namespace.
12086         * lex.c (do_identifier): If the identifier's declaration has
12087         DECL_ANTICIPATED on, it has not yet been declared.  But do not
12088         replace it with an ordinary implicit declaration.
12089
12090         * tinfo2.cc: Include stdlib.h.
12091
12092 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
12093
12094         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
12095         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
12096         CLASSTYPE_ALIGN.
12097
12098 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
12099
12100         * decl2.c (lang_decode_option): Use skip_leading_substring instead
12101         of plain strncmp.
12102
12103 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
12104
12105         * operators.def (<?): Duplicated, should have been...
12106         (>?): this.  Fixed.
12107
12108 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
12109             Mark Mitchell  <mark@codesourcery.com>
12110
12111         * cp-tree.h (ansi_opname): Make it a macro.
12112         (ansi_assopname): Likewise.
12113         (struct lang_decl_flags): Add assignment_operator_p.
12114         (struct lang_decl): Add operator_code.
12115         (DECL_VTT_PARM): Adjust.
12116         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
12117         overloaded operator.
12118         (SET_OVERLOADED_OPERATOR_CODE): New macro.
12119         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
12120         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
12121         (opname_tab): Remove.
12122         (assignop_tab): Likewise.
12123         (operator_name_info_t): New type.
12124         (operator_name_info): New variable.
12125         (assignment_operator_name_info): Likewise.
12126         (build_cp_library_fn): Remove declaration.
12127         (push_cp_library_fn): Likewise.
12128         (operator_name_string): Likewise.
12129         (build_decl_overload): Likewise.
12130         * call.c (print_z_candidates): Simplify.
12131         (build_object_call): Adjust usage of ansi_opname.  Use
12132         DECL_OVERLOADED_OPERATOR_P.
12133         (op_error): Adjust operator name lookup.
12134         (build_conditional_expr): Adjust usage of ansi_opname.
12135         (build_new_op): Likewise.
12136         (build_op_delete_call): Likewise.
12137         (build_over_call): Likewise.
12138         (joust): Use DECL_OVERLOADED_OPERATOR_P.
12139         * decl.c (duplicate_decls): Copy operator_code.
12140         (init_decl_processing): Adjust parameters to push_cp_library_fn.
12141         (builtin_function): Adjust parameters to build_library_fn_1.
12142         (build_library_fn_1): Accept an overloaded operator code.
12143         (build_library_fn): Pass ERROR_MARK.
12144         (build_cp_library_fn): Accept an overloaded operator code.
12145         (push_cp_library_fn): Likewise.
12146         (grokfndecl): Tweak.
12147         (grokdeclarator): Simplify code to compute names of overloaded
12148         operators.  Adjust use of ansi_opname.
12149         (ambi_op_p): Work on tree_codes, not identifiers.
12150         (unary_op_p): Likewise.
12151         (grok_op_properties): Likewise.
12152         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
12153         (lang_mark_tree): Don't try to mark the operator_code.
12154         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
12155         * error.c (dump_decl): Remove special handling for operator
12156         names.
12157         (dump_function_name): Likewise.
12158         (dump_expr): Adjust name lookup of operators.
12159         (op_to_string): Simplify.
12160         (assop_to_string): Likewise.
12161         * init.c (build_new_1): Adjust use of ansi_opname.
12162         * lex.c (opname_tab): Remove.
12163         (assignop_tab): Likewise.
12164         (ansi_opname): Likewise.
12165         (ansi_assopname): Likewise.
12166         (operator_name_string): Likewise.
12167         (reinit_lang_specific): Likewise.
12168         (operator_name_info): New variable.
12169         (assignment_operator_name_info): Likewise.
12170         (init_operators): New function.
12171         (init_parse): Use it.
12172         (do_identifier): Adjust use of ansi_opname.
12173         * method.c (mangle_expression): Don't use ansi_opname for
12174         mangling.
12175         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
12176         (build_decl_overload): Remove.
12177         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
12178         (do_build_assign_ref): Adjust use of ansi_opname.
12179         (synthesize_method): Likewise.
12180         (implicitly_declare_fn): Likewise.
12181         * operators.def: New file.
12182         * parse.y (operator): Adjust use of ansi_opname.
12183         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
12184         (set_mangled_name_for_template_decl): Don't play games with
12185         current_namespace.
12186         (special_function_p): Adjust use of ansi_opname.
12187         * typeck.c (check_return_expr): Likewise.
12188         * Make-lang.in (cc1plus): Depend on operators.def.
12189         * Makefile.in (lex.o): Likewise.
12190         (decl.o): Likewise.
12191
12192 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
12193
12194         * Make-lang.in (cplib2.ready): Eradicate.
12195
12196 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12197
12198         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
12199         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
12200         (built_min, cp_tree_equal): Likewise.
12201
12202 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
12203
12204         * class.c (layout_nonempty_base_or_field): Replace
12205         `record_layout_info' with `record_layout_info_s'.
12206
12207 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
12208
12209         Fix goto checking.
12210         * cp-tree.h (struct language_function): x_named_labels is now
12211         a struct named_label_list*.
12212         * decl.c (struct named_label_use_list): Renamed from...
12213         (struct named_label_list): ...this.  New struct.
12214         (push_binding_level): Don't set eh_region.
12215         (note_level_for_eh): New fn.
12216         (pop_label): Take label and old value directly.
12217         (pop_labels): Adjust for new named_labels format.
12218         (lookup_label): Likewise.
12219         (poplevel): Note characteristics of a binding level containing a
12220         named label.  Mess with named label lists earlier.
12221         (mark_named_label_lists): New fn.
12222         (mark_lang_function): Call it.
12223         (use_label): New fn, split out from...
12224         (make_label_decl): ...here.  Don't call it.
12225         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
12226         check_previous_gotos): New fns, split out from...
12227         (define_label): ...here.
12228         (check_switch_goto): New fn.
12229         (define_case_label): Call it.
12230         (check_goto): New fn.
12231         * semantics.c (finish_goto_stmt): Call it and use_label.
12232         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
12233         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
12234
12235 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
12236
12237         * class.c (build_vtable_entry_ref): Correct usage of
12238         get_vtbl_decl_for_binfo.
12239
12240         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
12241         * method.c (implicitly_declare_fn): Not here.
12242
12243 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
12244
12245         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
12246         (CPTI_PTMD_DESC_TYPE): ... here.
12247         (ptmd_desc_type_node): Rename to ...
12248         (ptm_desc_type_node): ... here.
12249         * decl.c: Likewise.
12250         * rtti.c (ptmd_initializer): Rename to ...
12251         (ptm_initializer): ... here.
12252         (sythesize_tinfo_var): Adjust. Deal with pointer to member
12253         function.
12254         (create_tinfo_types): Adjust.
12255
12256 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
12257
12258         Finish implementation of VTTs.
12259         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
12260         CPTI_VTT_PARM_IDENTIFIER.
12261         (vtt_parm_identifier): New macro.
12262         (vtt_parm_type): Likewise.
12263         (BINFO_SUBVTT_INDEX): Likewise.
12264         (BINFO_VPTR_INDEX): Likewise.
12265         (struct lang_decl): Add vtt_parm.
12266         (DECL_VTT_PARM): New macro.
12267         (DECL_USE_VTT_PARM): Likewise.
12268         (DECL_NEEDS_VTT_PARM_P): Likewise.
12269         (get_vtt_name): Declare.
12270         (build_artificial_parm): Likewise.
12271         (fixup_all_virtual_upcast_offsets): Likewise.
12272         (expand_indirect_vtbls_init): Remove.
12273         * call.c (build_new_method_call): Pass the vtt to subobject
12274         constructors and destructors.
12275         * class.c (get_vtt_name): Give it external linkage.
12276         (build_clone): Handle the magic VTT parameters for clones.
12277         (clone_function_decl): Fix typo in comment.
12278         (build_vtt): Keep track of the indices in the VTTs where various
12279         entities are stored.
12280         (build_vtt_inits): Likewise.
12281         (dfs_build_vtt_inits): Likewise.
12282         (build_ctor_vtbl_group): Tweak type of construction vtables.
12283         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
12284         primary bases, when building construction vtables.
12285         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
12286         (initialize_predefined_identifiers): Add vtt_parm_identifier.
12287         (init_decl_processing): Initialize vtt_parm_type.
12288         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
12289         (lang_mark_tree): Make vtt_parm.
12290         * decl2.c (build_artificial_parm): New function.
12291         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
12292         (grokclassfn): Use build_artificial_parm.
12293         * init.c (initialize_vtbl_ptrs): Call
12294         fixup_all_virtual_upcast_offsets directly.
12295         (perform_member_init): Use the complete subobject destructor for
12296         member cleanups.
12297         (build_vtbl_address): New function.
12298         (expand_virtual_init): Handle VTTs.
12299         * optimize (maybe_clone_body): Likewise.
12300         * search.c (fixup_all_virtual_upcast_offsets): Give it external
12301         linkage.
12302         (expand_indirect_vtbls_init): Remove.
12303         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
12304         * tree.c (make_binfo): Make them bigger.
12305
12306 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
12307
12308         * inc/cxxabi.h (__pbase_type_info): Define, based on
12309         __pointer_type_info.
12310         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
12311         (__pointer_to_member_type_info): Likewise.
12312         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
12313         (__pointer_to_member_type_info::__is_pointer_p): Remove.
12314         (__pointer_type_info::__do_catch): Rename to ...
12315         (__pbase_type_info::__do_catch): ... here. Adjust.
12316         (__pbase_type_info::__pointer_catch): Implement.
12317         (__pointer_type_info::__pointer_catch): Adjust.
12318         (__pointer_to_member_type_info::__pointer_catch): Adjust.
12319
12320 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
12321
12322         * tinfo.h (__user_type_info::contained_virtual_p): New
12323         predicate.
12324         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
12325         shaped hierarchy.
12326         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
12327         diamond shaped hierarchy. Add early out for mixed diamond and
12328         duplicate shaped hierarchy.
12329
12330 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
12331
12332         * cp-tree.h (build_delete): Change prototype.
12333         (build_vec_delete): Likewise.
12334         * call.c (build_scoped_method_call): Use special_function_kind
12335         values to indicate the kind of destruction to be done.
12336         (build_method_call): Likewise.
12337         * decl.c (finish_destructor_body): Likewise.
12338         (maybe_build_cleanup_1): Likewise.  Rename to ...
12339         (maybe_build_cleanup): ... this.
12340         * decl2.c (delete_sanity): Use special_function_kind
12341         values to indicate the kind of destruction to be done.
12342         (build_cleanup): Likewise.
12343         * init.c (perform_member_init): Likewise.
12344         (build_vec_delete_1): Likewise.
12345         (build_dtor_call): Simplify.
12346         (build_delete): Use special_function_kind
12347         values to indicate the kind of destruction to be done.
12348         (build_vbase_delete): Likewise.
12349         (build_vec_delete): Likewise.
12350
12351         * init.c (sort_member_init): Fix typo in error message generation
12352         code.
12353
12354 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
12355
12356         * semantics.c (begin_class_definition): make the packed
12357         attribute be sensitive to the "-fpack-struct" command line flag
12358
12359 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
12360
12361         Update new-abi upcast algorithm.
12362         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
12363         prototype and meaning of return value.
12364         (__si_class_type_info::__do_upcast): Likewise.
12365         (__vmi_class_type_info::__do_upcast): Likewise.
12366         * tinfo.cc (__class_type_info::__upcast_result): Replace
12367         whole2dst with part2dst. Adjust ctor.
12368         (__class_type_info::__do_upcast): Adjust call of worker function.
12369         (__class_type_info::__do_upcast): Adjust.
12370         (__si_class_type_info::__do_upcast): Adjust. Use parent's
12371         __do_upcast.
12372         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
12373         virtual base in diamond hierarchy bug.
12374
12375 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
12376
12377         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
12378         and bitfield to tinfo_fn_p.
12379         (DECL_TINFO_FN_P): Adjust.
12380         (SET_DECL_TINFO_FN_P): Likewise.
12381         (DECL_MUTABLE_P): Likewise.
12382         (DECL_C_BIT_FIELD): Likewise.
12383         (SET_DECL_C_BIT_FIELD): Likewise.
12384         (CLEAR_DECL_C_BIT_FIELD): Likewise.
12385         (DECL_UNINLINABLE): Likewise.
12386         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
12387         (handle_using_decl): Remove assertion.
12388         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
12389         to build FIELD_DECLs.
12390         (build_base_field): Likewise.
12391         (layout_class_type): Likewise.
12392         * decl.c (init_decl_processing): Likewise.
12393         (build_ptrmemfunc_type): Likewise.
12394         (grokdeclarator): Likewise.
12395         * decl2.c (grok_x_components): Likewise.
12396         * except.c (call_eh_info): Likewise.
12397         * init.c (init_init_processing): Likewise.
12398         * rtti.c (expand_class_desc): Likewise.
12399         (create_pseudo_type_info): Likewise.
12400         (get_vmi_pseudo_type_info): Likewise.
12401         (create_tinfo_types): Likewise.
12402         * ptree.c (print_lang_decl): Adjust.
12403         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
12404         before checking DECL_MUTABLE_P.
12405
12406         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
12407         parameters for template functions.
12408         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
12409         destructors as well as constructors.
12410
12411 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
12412
12413         * class.c (build_ctor_vtbl_group): Set inits.
12414         * optimize.c (maybe_clone_body): Set DECL_INLINE and
12415         DECL_THIS_INLINE appropriately for clones.
12416
12417         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
12418         (DECL_CONV_FN_P): Simplify.
12419         (DECL_OPERATOR): Remove.
12420         (language_to_string): Declare.
12421         * decl.c (duplicate_decls): Fix typo in comment.
12422         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
12423         (grok_op_properties): Use DECL_CONV_FN_P instead of
12424         IDENTIFIER_TYPENAME_P.
12425         * dump.c (dequeue_and_dump): Dump the language linkage of
12426         declarations.
12427         * error.c (language_to_string): Give it external linkage.
12428         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
12429         (implicitly_declare_fn): Set DECL_LANGUAGE.
12430         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
12431         IDENTIFIER_TYPENAME_P.
12432         (tsubst_decl): Likewise.
12433         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
12434         * semantics.c (finish_member_declaration): Don't mark members of
12435         classes declared in an extern "C" region as extern "C".
12436
12437 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12438
12439         * decl2.c (qualified_lookup_using_namespace): Look through
12440         namespace aliases.
12441
12442         * decl.c (push_using_decl): Return the old decl on namespace level.
12443
12444 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
12445
12446         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
12447         (VTT_NAME_PREFIX): New macro.
12448         (CTOR_VTBL_NAME_PREFIX): Likewise.
12449         (get_ctor_vtbl_name): New function.
12450         * class.c (get_vtable_name): Simplify.
12451         (get_vtt_name): New function.
12452         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
12453         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
12454         when a virtual base becomes primary.
12455         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
12456         VTTs.
12457         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
12458         additional parameters.
12459         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
12460         (initialize_array): New function.
12461         (build_vtt): Likewise.
12462         (build_vtt_inits): Likewise.
12463         (dfs_build_vtt_inits): Likewise.
12464         (dfs_fixup_binfo_vtbls): Likewise.
12465         (build_ctor_vtbl_group): Likewise.
12466         (initialize_vtable): Use initialize_array.
12467         (accumulate_vtbl_inits): Reimplement to handle construction
12468         vtables.
12469         (dfs_accumulate_vtbl_inits): Likewise.
12470         (bulid_vtbl_initializer): Adjust parameter name.
12471         * method.c (build_typename_overload): Remove #if 0'd code.
12472         (get_ctor_vtbl_name): New function.
12473         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
12474         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
12475
12476         * cp-tree.h (struct lang_type): Remove search_slot.
12477         (CLASSTYPE_SEARCH_SLOT): Remove.
12478         (emit_base_init): Change prototype.
12479         (initialize_vtbl_ptrs): Likewise.
12480         (expand_indirect_vtbls_init): Likewise.
12481         (clear_search_slots): Remove.
12482         * decl.c (lang_mark_tree): Don't mark search_slot.
12483         * init.c (initialize_vtbl_ptrs): Simplify.
12484         (emit_base_init): Likewise.
12485         * search.c (struct vbase_info): Document decl_ptr.
12486         (convert_pointer_to_single_level): Remove.
12487         (dfs_find_vbases): Remove.
12488         (dfs_init_base_pointers): Simplify.
12489         (dfs_clear_vbase_slots): Remove.
12490         (dfs_vtable_path_unmark): New function.
12491         (init_vbase_pointers): Simplify.
12492         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
12493         (expand_indirect_vtbls_init): Simplify.  Don't call
12494         mark_all_temps_used.
12495         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
12496         initialize_vtbl_ptrs.
12497
12498 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
12499
12500         * except.c: Add static prototypes.
12501
12502 2000-05-20  H.J. Lu  <hjl@gnu.org>
12503
12504         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
12505
12506 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
12507
12508         Don't create a separate copy of virtual bases for the
12509         CLASSTYPE_VBASECLASSES list.
12510         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
12511         (BINFO_FOR_VBASE): Remove.
12512         (CANONICAL_BINFO): Adjust.
12513         (binfo_for_vbase): New function.
12514         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
12515         instead of BINFO_FOR_VBASE.
12516         (build_vbase_pointer): Likewise.
12517         (build_secondary_vtable): Likewise.
12518         (dfs_mark_primary_bases): Likewise.
12519         (mark_primary_bases): Likewise.
12520         (layout_nonempty_base_or_field): Likewise.
12521         (dfs_set_offset_for_shared_vbases): Likewise.
12522         (dfs_set_offset_for_unshared_vbases): Likewise.
12523         (layout_virtual_bases): Likewise.  Adjust for changes to the
12524         CLASSTYPE_VBASECLASSES list.
12525         (dump_class_hierarchy_r): Use binfo_for_vbase
12526         instead of BINFO_FOR_VBASE.
12527         (dump_class_hierarchy): Likewise.
12528         (finish_vtbls): Likewise.
12529         (build_vtbl_initializer): Adjust for changes to the
12530         CLASSTYPE_VBASECLASSES list.
12531         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
12532         * decl.c (finish_destructor_body): Adjust for changes to the
12533         CLASSTYPE_VBASECLASSES list.
12534         * init.c (sort_base_init): Use binfo_for_vbase.
12535         (construct_virtual_bases): Adjust for changes to the
12536         CLASSTYPE_VBASECLASSES list.
12537         (expand_member_init): Use binfo_for_vbase.
12538         (build_vbase_delete):  Adjust for changes to the
12539         CLASSTYPE_VBASECLASSES list.
12540         * method.c (do_build_copy_constructor): Likewise.
12541         * rtti.c (get_base_offset): Use binfo_for_vbase.
12542         (expand_class_desc): Remove #if 0'd code.
12543         * search.c (struct vbase_info): Remove vbase_types.
12544         (get_base_distance):  Use binfo_for_vbase.
12545         (lookup_field_queue_p): Use CANONICAL_BINFO.
12546         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
12547         (get_pure_virtuals): Adjust for changes to the
12548         CLASSTYPE_VBASECLASSES list.
12549         (dfs_find_vbases): Use binfo_for_vbase.
12550         (dfs_init_vbase_pointers): Likewise.
12551         (init_vbase_pointers): Don't initialize vi.vbase_types.
12552         (virtual_context): Use binfo_for_vbase.
12553         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
12554         CLASSTYPE_VBASECLASSES list.
12555         (expand_indirect_vtbls_init): Simplify.
12556         (dfs_get_vbase_types): Don't replicate virtual bases.
12557         (find_vbase_instance): Use binfo_for_vbase.
12558         (binfo_for_vbase): New function.
12559         * typeck.c (get_delta_difference): Use binfo_for_vbase.
12560
12561 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
12562
12563         * decl2.c (finish_anon_union): Generalize error messages to handle
12564         anonymous structures.
12565         * init.c (perform_member_init): Remove `name' parameter.
12566         (build_field_list): New function.
12567         (sort_member_init): Handle anonymous union initialization order
12568         correctly.  Check for multiple initializations of the same union.
12569         (emit_base_init): Don't look up fields by name here.
12570         (expand_member_init): Record the result of name lookup for future
12571         reference.
12572         * typeck.c (build_component_ref): Fix formatting.
12573
12574 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
12575
12576         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
12577         * typeck.c (build_x_compound_expr): Replace warn_unused with
12578         warn_unused_value.
12579
12580         * decl2.c (lang_decode_option): Update -Wall unused flags by
12581         calling set_Wunused.
12582
12583 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
12584
12585         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
12586         * init.c (dfs_vtable_path_unmark): Remove.
12587         * search.c (marked_new_vtable_p): Likewise.
12588         (unmarked_new_vtable_p): Likewise.
12589         (dfs_search_slot_nonempty_p): Likewise.
12590         (dfs_mark): Likewise.
12591         (dfs_vtable_path_unmark): Likewise.
12592         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
12593         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
12594         (dfs_init_vbase_pointers): Remove special-case new ABI code.
12595         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
12596         (init_vbase_pointers): Simplify.
12597         (expand_indirect_vtbls_init): Likewise.
12598
12599         * class.c (copy_virtuals): New function.
12600         (build_primary_table): Use it.
12601         (build_secondary_vtable): Likewise.
12602         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
12603         indicate that no vcall offset is required.
12604         (add_virtual_function): Likewise.
12605         (modify_all_vtables): Likewise.
12606         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
12607         (dfs_accumulate_vtbl_inits): Likewise.
12608         (build_vtbl_initializer): Make changes to handle construction
12609         vtables.
12610         (dfs_build_vcall_offset_vtbl_entries): Likewise.
12611         (build_rtti_vtbl_entries): Likewise.
12612         (build_vtable_entries): Handle a NULL vcall_index.
12613
12614 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
12615
12616         * decl2.c (lang_decode_option): Fix thinko.
12617
12618 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
12619
12620         * except.c (check_handlers): New fn.
12621         * cp-tree.h: Declare it.
12622         * semantics.c (finish_handler_sequence): Call it.
12623         (finish_function_handler_sequence): Likewise.
12624         (finish_handler_parms): Set TREE_TYPE on the handler.
12625         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
12626         * search.c (get_base_distance_recursive): If protect>1, ignore
12627         special access.
12628         (get_base_distance): Don't reduce watch_access.
12629
12630 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
12631
12632         * lex.c: #include diagnostic.h.
12633         (lang_init_options): Set default prefixing rules.
12634
12635         * lang-options.h: Add -fdiagnostics-show-location=.
12636
12637         * decl2.c: #include diagnostic.h.
12638         (lang_decode_option): Handle -fdiagnostics-show-location=.
12639
12640 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
12641
12642         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
12643         * vec.cc: Revert my 2000-05-07 change.
12644
12645 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
12646
12647         * class.c (check_field_decls): Complain about non-static data
12648         members with same name as class in class with constructor.
12649
12650 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
12651
12652         * decl.c (grokdeclarator): Allow non-static data members with
12653         same name as class.
12654
12655 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
12656
12657         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
12658         and pending_inline.filename.  Update prototypes.
12659         * decl.c (define_label): Constify filename parameter.
12660         * decl2.c (warn_if_unknown_interface): Constify local char *.
12661         * input.c Constify input_source.filename. Don't declare
12662         input_filename or lineno.  Constify filename parameter to feed_input.
12663         * lex.c (init_parse): Constify parameter and return value.
12664         (cp_pragma_interface, cp_pragma_implementation): Constify
12665         filename argument.
12666         (reinit_parse_for_method, reinit_parse_for_block,
12667         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
12668         Constify local char *.
12669         * pt.c: Don't declare lineno or input_filename.
12670         (print_template_context, tsubst_friend_function, tsubst_decl,
12671         tsubst, instantiate_decl): Constify local char *.
12672         * semantics.c (expand_body): Constify local char *.
12673         * tree.c (build_srcloc): Constify filename parameter.
12674         * typeck.c (c_expand_asm_operands): Constify filename
12675         parameter.
12676
12677 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
12678
12679         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
12680         offsetof expansion.
12681
12682 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
12683
12684         * inc/cxxabi.h:  Fix typos in comment.
12685         (__base_class_info::__offset): Use a static_cast.
12686
12687 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
12688
12689         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
12690         of std::size_t and std::ptrdiff_t respectively.
12691         * tinfo.cc: Likewise.
12692         * vec.cc: Likewise.
12693
12694 2000-05-06  Richard Henderson  <rth@cygnus.com>
12695
12696         * typeck.c (build_c_cast): Don't warn integer->pointer size
12697         mismatch for constants.
12698
12699 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
12700
12701         * rtti.c (ptmd_initializer): Set non-public, if class is
12702         incomplete.
12703
12704         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
12705         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
12706         __cxa_vec_delete): Likewise.
12707         * tinfo.cc (__dynamic_cast): Likewise.
12708         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
12709         __cxa_vec_delete): Likewise.
12710
12711 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
12712
12713         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
12714         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
12715         (lang_decl_flags): Add vcall_offset.
12716         (THUNK_VCALL_OFFSET): Use it.
12717         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
12718         * method.c (make_thunk): Create the lang_decl here, not in
12719         emit_thunk.
12720         (emit_thunk): Make generic thunks into ordinary functions once
12721         they have been fed to expand_body.
12722         * semantics.c (expand_body): Set current_function_is_thunk here.
12723
12724 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12725
12726         * class.c (update_vtable_entry_for_fn): Prototype.
12727
12728         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
12729         and `tmpl'.
12730
12731         * search.c (dfs_build_inheritance_graph_order): Prototype.
12732
12733 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
12734
12735         * cp-tree.h (special_function_kind): Add various kinds of
12736         destructors.
12737         (special_function_p): New function.
12738         * class.c (overrides): Don't let one kind of destructor override
12739         another.
12740         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
12741         whether or not to instantiate a template.
12742         * tree.c (special_function_p): Define.
12743
12744 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
12745
12746         * cp-tree.def (THUNK_DECL): Remove.
12747         * cp-tree.h (DECL_THUNK_P): New macro.
12748         (DECL_NON_THUNK_FUNCTION_P): Likewise.
12749         (DECL_EXTERN_C_FUNCTION_P): Likewise.
12750         (SET_DECL_THUNK_P): Likewise.
12751         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
12752         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
12753         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
12754         * decl.c (decls_match): Use DECL_EXTERN_C_P.
12755         (duplicate_decls): Likewise.
12756         (pushdecl): Likewise.  Adjust thunk handling.
12757         (grokfndecl): Use DECL_EXTERN_C_P.
12758         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
12759         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
12760         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
12761         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
12762         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
12763         DECL_NO_STATIC_CHAIN.
12764         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
12765         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
12766         * search.c (covariant_return_p): Remove THUNK_DECL handling.
12767         * ir.texi: Update.
12768
12769 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
12770
12771         * tree.c (walk_tree): Set lineno.
12772
12773 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
12774
12775         * exception.cc: Update license notice.
12776         * new.cc: Likewise.
12777         * new1.cc: Likewise.
12778         * new2.cc: Likewise.
12779         * tinfo.cc: Likewise.
12780         * tinfo2.cc: Likewise.
12781         * vec.cc: Likewise.
12782         * inc/cxxabi.h: Likewise.
12783         * inc/exception: Likewise.
12784         * inc/new: Likewise.
12785         * inc/new.h: Likewise.
12786         * inc/typeinfo: Likewise.
12787
12788 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
12789
12790         * tree.c (build_target_expr_with_type): If we already have a
12791         TARGET_EXPR, just return it.
12792
12793         * optimize.c (initialize_inlined_parameters): Don't generate an
12794         EXPR_STMT if we can just use DECL_INITIAL.
12795         * decl.c (emit_local_var): Only make the initialization a
12796         full-expression if stmts_are_full_exprs_p.
12797
12798 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
12799
12800         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
12801         macro.
12802         * call.c (standard_conversion): Use it.
12803         (direct_reference_binding): Likewise.
12804         (build_over_call): Likewise.
12805         (is_properly_derived_from): Likewise.
12806         (compare_ics): Likewise.
12807         * class.c (resolves_to_fixed_type_p): Likewise.
12808         * optimize.c (declare_return_variable): Likewise.
12809         * pt.c (is_specialization_of): Likewise.
12810         (unify): Likewise.
12811         * typeck.c (comp_target_parms): Likeiwse.
12812         (build_static_cast): Likewise.
12813         (build_reinterpret_cast): Likewise.
12814         (build_const_cast): Likewise.
12815         (comp_ptr_ttypes_real): Likewise.
12816         (comp_ptr_ttypes_const): Likewise.
12817         * typeck2.c (process_init_constructor): Likewise.
12818
12819 2000-04-30  Scott Snyder <snyder@fnal.gov>
12820
12821         * decl.c (finish_destructor_body): Use the base destructor when
12822         destroying virtual bases.
12823
12824 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
12825
12826         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
12827         STMT_EXPRs.
12828         * optimize.c (struct inline_data): Add target_exprs field.
12829         (declare_return_variable): When a function returns an aggregate,
12830         use the variable declared in the TARGET_EXPR as the remapped
12831         DECL_RESULT.
12832         (expand_call_inline): Update the pending target_exprs stack.
12833         (optimize_function): Initialize the stack.
12834
12835         * decl2.c (finish_file): Fix typo in comment.
12836
12837         * method.c (emit_thunk): Don't try to return a `void' value.
12838
12839         * optimize.c (initialize_inlined_parameters): If the parameter is
12840         addressable, we need to make a new VAR_DECL, even if the
12841         initializer is constant.
12842
12843 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
12844
12845         * decl.c (grok_op_properties): Add an extra check of argtypes.
12846
12847 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
12848
12849         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
12850         variables.
12851         (initialize_inlined_parameters): Try to avoid creating new
12852         VAR_DECLs.
12853
12854 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
12855
12856         * lex.c (my_get_run_time): Remove.
12857         (init_filename_times): Use get_run_time instead of my_get_run_time.
12858         (check_newline): Likewise.
12859         (dump_time_statistics): Likewise.
12860         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
12861         of computing elapsed time explicitly.
12862
12863 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
12864
12865         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
12866         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
12867         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
12868         before calling decl_constant_value.
12869         * class.c (check_bitfield_decl): Likewise.
12870         * cvt.c (ocp_convert): Likewise.
12871         (convert): Likewise.
12872         * decl.c (compute_array_index_type): Likewise.
12873         (build_enumerator): Likewise.
12874         * decl2.c (check_cp_case_value): Likewise.
12875         * pt.c (convert_nontype_argument): Likewise.
12876         (tsubst): Likewise.
12877         * typeck.c (decay_conversion): Likewise.
12878         (build_compound_expr): Likewise.
12879         (build_reinterpret_cast): Likewise.
12880         (build_c_cast): Likewise.
12881         (convert_for_assignment): Likewise.
12882
12883 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
12884
12885         * decl.c (finish_function): Don't play games with DECL_INLINE.
12886
12887 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
12888
12889         * ir.texi: Correct typo.
12890
12891 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12892
12893         * decl.c (grokdeclarator): Reject VLAs as members.
12894
12895 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
12896
12897         * call.c (standard_conversion): Accept conversion between
12898         COMPLEX_TYPEs.
12899
12900         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
12901
12902 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
12903
12904         * decl2.c (finish_file): Remove double setup for accounting
12905         compile time.
12906
12907 2000-04-24  Robert Lipe <robertlipe@usa.net>
12908
12909         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
12910
12911 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
12912
12913         * new.cc (set_new_handler): Needs to be in std::.
12914
12915 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
12916
12917         * cp-tree.h (lang_decl): Remove pretty_function_p.
12918         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
12919         language-specific node.
12920         * decl.c (cp_make_fname_decl): Use build_decl, not
12921         build_lang_decl, to build the variables.
12922         (grokvardecl): Don't call build_lang_decl for local variables in
12923         templates.
12924         (grokdeclarator): Don't call build_lang_decl for local type
12925         declarations in templates.
12926         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
12927         zero'd memory, rather than calling memset.
12928         * pt.c: Include hashtab.h.
12929         (local_specializations): New variable.
12930         (retrieve_local_specialization): Use it.
12931         (register_local_specialization): Likewise.
12932         (tsubst_decl): Don't assume local variables have
12933         DECL_LANG_SPECIFIC.
12934         (instantiate_decl): Set up local_specializations.
12935         * Makefile.in (HTAB_H): New variable.
12936
12937 2000-04-23  Richard Henderson  <rth@cygnus.com>
12938
12939         * typeck.c (c_expand_asm_operands): Restore the original
12940         contents of the output list.
12941
12942 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
12943
12944         * ir.texi:  Document complex number representation.
12945
12946 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12947
12948         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
12949         (target_incomplete_p): New function.
12950         (tinfo_base_init): Create comdat NTBS name variable.
12951         (ptr_initializer): Add non_public parameter. Calculate it.
12952         (ptmd_initializer): Likewise.
12953         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
12954         (create_real_tinfo_var): Add non_public parameter. Use it.
12955         Push proxy into global namespace.
12956         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
12957         New enumeration.
12958         * inc/typeinfo (type_info::before, type_info::operator==):
12959         Compare __name addresses.
12960
12961         * tinfo2.cc: Remove new-abi builtins comment.
12962
12963 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
12964
12965         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
12966
12967         * call.c (joust): Exit early if we get the same function, too.
12968
12969         * decl2.c (key_method): Return NULL_TREE for template classes.
12970         (import_export_class): Don't need to check for template classes.
12971
12972 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
12973
12974         * lex.c: Remove references to cccp.c.
12975
12976 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
12977
12978         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
12979         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
12980         (DECL_DESTRUCTOR_P): Use destructor_attr.
12981         (DECL_CONST_MEMFUNC_P): Reimplement.
12982         (DECL_VOLATILE_MEMFUNC_P): Remove.
12983         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
12984         (overrides): Use DECL_DESTRUCTOR_P.
12985         (check_for_override): Likewise.
12986         * decl.c (start_function): Likewise.
12987         * decl2.c (grokfclassfn): Likewise.
12988         (check_classfn): Likewise.
12989         (grok_function_init): Likewise.
12990
12991 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
12992
12993         * decl2.c (grokfield): Issue error on illegal data member
12994         declaration.
12995
12996 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
12997
12998         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
12999
13000 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
13001
13002         * class.c (build_vtable_entry): Don't build thunks for type-info
13003         functions.
13004
13005 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
13006
13007         * decl.c (decls_match): Allow a redeclaration of a builtin to
13008         specify args while the builtin did not.
13009
13010 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
13011
13012         * cp-tree.def (THUNK_DECL): Add to documentation.
13013         * cp-tree.h (flag_huge_objects): Declare.
13014         * class.c (modify_vtable_entry): Tidy.
13015         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
13016         Calculate delta appropriately for the new ABI.
13017         (dfs_modify_vtables): Use it.
13018         (modify_all_vtables): Fix thinko in code to add overriding copies
13019         of functions to primary vtables.
13020         (build_clone): Fix typo in comment.
13021         (clone_function_decl): Correct order of destructors in vtable.
13022         (build_vbase_offset_vtbl_entries): Adjust comment.
13023         (dfs_vcall_offset_queue_p): Remove.
13024         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
13025         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
13026         (build_vtable_entry): Correct check for pure virtual functions.
13027         Don't declare flag_huge_objects.
13028         * decl.c (flag_huge_objects): Remove declaration.
13029         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
13030         Use int_size_in_bytes.
13031         (emit_thunk): Handle vcall offset thunks.
13032
13033 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13034
13035         * decl2.c (parse_time, varconst_time): Delete declarations.
13036         (finish_file): Delete LINENO declaration.
13037         START_TIME and THIS_TIME now long.
13038
13039 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
13040
13041         * class.c (build_base_field): Reformat comment.
13042
13043         * inc/cxxabi.h (stddef.h): Comment inclusion.
13044         (__base_class_info::__offset): Comment shift.
13045
13046 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
13047
13048         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
13049         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
13050         (cp_push_exception_identifier): New macro.
13051         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
13052         (DECL_BASE_DESTRUCTOR_P): Likewise.
13053         (DECL_DELETING_DESTRUCTOR_P): Likewise.
13054         (get_vtbl_decl_for_binfo): Fix formatting.
13055         (in_charge_arg_for_name): New macro.
13056         (maybe_build_cleanup_and_delete): Remove declaration.
13057         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
13058         (in_charge_arg_for_name): New function.
13059         (build_new_method_call): Use it.  Handle cloned destructors.
13060         (build_clone): Don't make the base constructor virtual.
13061         Automatically defer generated functions.
13062         (clone_function_decl): Handle destructors, too.
13063         (clone_constructors_and_destructors): Likewise.
13064         (create_vtable_ptr): Don't create a vtable entry for a cloned
13065         function.
13066         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
13067         (initialize_predefined_identifiers): Update appropriately.
13068         (finish_destructor_body): Simplify.
13069         (maybe_build_cleanup_and_delete): Remove.
13070         * except.c (expand_throw): Handle new-ABI destructors.
13071         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
13072         (build_dtor_call): New function.
13073         (build_delete): Use it.  Simplify.
13074         * optimize.c (maybe_clone_body): Handle destructors.
13075         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
13076
13077         * exception.cc (cleanup_fn): New typedef.
13078         (CALL_CLEANUP): New macro.
13079         (cp_eh_info): Use them.
13080         (__cp_push_exception): Likewise.
13081         (__cp_pop_exception): Likewise.
13082
13083 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
13084
13085         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
13086         (complete_dtor_identifier): New macro.
13087         (CLASSTYPE_FIRST_CONVERSION): Remove.
13088         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
13089         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
13090         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
13091         (CLASSTYPE_CONSTRUCTORS): Likewise.
13092         (CLASSTYPE_DESTRUCTORS): Likewise.
13093         (lang_decl): Add cloned_function.
13094         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
13095         (DECL_BASE_CONSTRUCTOR_P): Likewise.
13096         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
13097         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
13098         (DECL_CLONED_FUNCTION_P): Likewise.
13099         (DECL_CLONED_FUNCTION): Likewise.
13100         (clone_function_decl): Declare.
13101         (maybe_clone_body): Likewise.
13102         * call.c (build_user_type_conversion_1): Call complete object
13103         constructors in the new ABI.
13104         (build_new_method_call): Don't add in-charge parameters under the
13105         new ABI.
13106         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
13107         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
13108         CLASSTYPE_DESTRUCTOR_SLOT.
13109         (build_clone): New function.
13110         (clone_function_decl): Likewise.
13111         (clone_constructors_and_destructors): Likewise.
13112         (check_bases_and_members): Use it.
13113         * decl.c (iniitialize_predefined_identifiers): Initialize
13114         complete_dtor_identifier.
13115         (finish_function): Don't add extra code to a clone.
13116         (lang_mark_tree): Mark cloned_function.
13117         * decl2.c (mark_used): Don't bother trying to instantiate things
13118         we synthesized.
13119         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
13120         * method.c (set_mangled_name_for_decl): Don't treat clones as
13121         constructors.
13122         (synthesize_method): Sythesize cloned functions, not the clones.
13123         * optimize.c (inline_data): Update comment on ret_label.
13124         (remap_block): Don't assume DECL_INITIAL exists.
13125         (copy_body_r): Allow ret_label to be NULL.
13126         (maybe_clone_body): Define.
13127         * pt.c (tsubst_decl): Handle clones.
13128         (instantiate_clone): New function.
13129         (instantiate_template): Use it.
13130         (set_mangled_name_for_template_decl): Don't treat clones as
13131         constructors.
13132         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
13133         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
13134         * semantics.c (expand_body): Clone function bodies as necessary.
13135
13136         * optimize.c (remap_decl): Avoid sharing structure for arrays
13137         whose size is only known at run-time.
13138         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
13139
13140         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
13141         to has_in_charge_parm_p.
13142         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
13143         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
13144         (DECL_COPY_CONSTRUCTOR_P): New macro.
13145         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
13146         (build_user_type_conversion_1): Likewise.
13147         (convert_like_real): Likewise.
13148         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
13149         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
13150         (copy_args_p): Likewise.
13151         (grok_ctor_properties): Likewise.
13152         (start_function): Likewise.
13153         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
13154         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
13155         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
13156         * method.c (do_build_copy_constructor): Use
13157         DECL_HAS_IN_CHARGE_PARM_P.
13158         (synthesize_method): Likewise.
13159         * pt.c (instantiate_template): Remove goto.
13160         * tree.c (build_cplus_method_type): Remove mention of obstacks in
13161         comment.
13162
13163         * cp-tre.h (finish_function): Change prototype.
13164         * decl.c (end_cleanup_fn): Adjust caller.
13165         (finish_function): Take only one parameter.
13166         * decl2.c (finish_objects): Adjust caller.
13167         (finish_static_storage_duration_function): Likewise.
13168         * method.c (emit_thunk): Likewise.
13169         * parse.y: Likewise.
13170         * parse.c: Regenerated.
13171         * pt.c (instantiate_decl): Likewise.
13172         * rtti.c (synthesize_tinfo_fn): Likewise.
13173         * semantics.c (expand_body): Likewise.
13174
13175         * cp-tree.h (copy_decl): New function.
13176         * class.c (finish_struct_1): Use it.
13177         * lex.c (copy_decl): Define it.
13178         * pt.c (tsubst_decl): Likewise.
13179         * tree.c (copy_template_template_parm): Likewise.
13180
13181         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
13182         has_nonpublic_assign_ref.
13183         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
13184         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
13185         * class.c (finish_struct_methods): Don't set
13186         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
13187         (interface_only): Don't declare.
13188         (interface_unknown): Likewise.
13189
13190 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13191
13192         * tree.h (HAVE_TEMPLATES): Remove definition.
13193         * lang-options.h (-fthis-is-variable): Remove documentation.
13194
13195 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
13196
13197         * class.c (instantiate_type): Handle object-relative template-id.
13198
13199         * semantics.c (finish_expr_stmt): Call convert_to_void here.
13200         * decl.c (cplus_expand_expr_stmt): Not here.
13201
13202         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
13203         Initialize exprtype earlier.
13204
13205         * parse.y (fn.def1): Check for defining types in return types.
13206
13207         * decl.c (check_tag_decl): Notice extra fundamental types.
13208         Diagnose empty decls in classes, too.
13209
13210         * decl.c (grokdeclarator): Don't override an anonymous name if no
13211         declarator was given.
13212
13213         * cvt.c (convert_to_void): Call resolve_offset_ref.
13214
13215         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
13216
13217         * decl2.c (decl_namespace): Handle getting a type.
13218
13219         * typeck.c (build_c_cast): Re-enable warning for cast between
13220         pointer and integer of different size.
13221
13222 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
13223
13224         * inc/cxxabi.h (__pointer_type_info): Add restrict and
13225         incomplete flags.
13226         (__pointer_type_info::__pointer_catch): New virtual function.
13227         (__pointer_to_member_type_info): Derive from
13228         __pointer_type_info. Adjust.
13229         (__pointer_to_member_type_info::__do_catch): Remove.
13230         (__pointer_to_member_type_info::__is_pointer_p): Declare.
13231         (__pointer_to_member_type_info::__pointer_catch): Declare.
13232         * rtti.c (qualifier_flags): Add restrict flag.
13233         (ptmd_initializer): Reorder members.
13234         (create_tinfo_types): Expand comments. Reorder
13235         ptmd_desc_type_node members.
13236         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
13237         Implement.
13238         (__pointer_type_info::__do_catch): Move specific code into
13239         __pointer_catch. Call it.
13240         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
13241         specific catch checking. Fix void conversion check.
13242         (__pointer_to_member_type_info::__do_catch): Remove.
13243         (__pointer_to_member_type_info::__pointer_catch): Implement.
13244
13245 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13246
13247         * lex.c (init_parse): Remove traces of classof and headof.
13248         * decl2.c (flag_operator_names): Default to 1.
13249         (lang_decode_option): Do not set it for -ansi.
13250
13251 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
13252
13253         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
13254         (DECL_MAIN_VARIANT): Remove.
13255         * decl.c (duplicate_decls): Don't set it.
13256         (start_function): Likewise.
13257         (lang_mark_tree): Don't mark it.
13258         * decl2.c (defer_fn): Don't use it.
13259         * lex.c (retrofit_lang_decl): Don't set it.
13260         * pt.c (tsubst_decl): Likewise.
13261         * ptree.c (print_lang_decl): Don't print it.
13262         * typeck.c (mark_addressable): Don't use it.
13263
13264 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
13265
13266         * vec.cc: Include <new> and <exception>.
13267         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
13268         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
13269         terminate.
13270         (__cxa_vec_delete): Catch dtor exceptions.
13271
13272 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
13273
13274         Prepend __ to implementation defined names.
13275         * inc/typeinfo (type_info): Rename _name to __name.
13276         (type_info::type_info): Rename parameter.
13277         (type_info::operator==, type_info::operator!=,
13278         type_info::before): Likewise.
13279         (type_info::is_pointer_p, type_info::is_function_p,
13280         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
13281         parameters.
13282         * inc/cxxabi.h
13283         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
13284         (__pointer_type_info::__pointer_type_info): Likewise.
13285         (__pointer_type_info::is_pointer_p,
13286         __pointer_type_info::do_catch): Prepend __. Rename parameters.
13287         (__array_type_info::__array_type_info): Rename parameters.
13288         (__function_type_info::__function_type_info): Likewise.
13289         (__function_type_info::is_function_p): Prepend __.
13290         (__enum_type_info::__enum_type_info): Rename parameters.
13291         (__pointer_to_member_type_info::__pointer_to_member_type_info):
13292         Likewise.
13293         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
13294         parameters.
13295         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
13296         (__class_type_info::__class_type_info): Rename parameters.
13297         (__class_type_info::sub_kind): Prepend __. Adjust member names.
13298         (__class_type_info::upcast_result,
13299         __class_type_info::dyncast_result): Prepend __. Move definition
13300         into tinfo.cc.
13301         (__class_type_info::do_upcast, __class_type_info::do_catch,
13302         __class_type_info::find_public_src,
13303         __class_type_info::do_dyncast,
13304         __class_type_info::do_find_public_src): Prepend __. Rename
13305         parameters.
13306         (__si_class_type_info::__si_class_type_info): Rename parameters.
13307         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
13308         __si_class_type_info::do_find_public_src): Prepent __. Rename
13309         parameters.
13310         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
13311         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
13312         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
13313         parameters.
13314         (__dynamic_cast): Rename parameters.
13315         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
13316         type_info::do_catch, type_info::do_upcast): Prepend __.
13317         (contained_p, public_p, virtual_p, contained_public_p,
13318         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
13319         (__class_type_info::do_catch,
13320         __class_type_info::do_upcast): Prepend __. Adjust.
13321         (__class_type_info::__upcast_result,
13322         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
13323         Adjust.
13324         (__class_type_info::find_public_src): Prepend __. Adjust.
13325         (__class_type_info::do_find_public_src,
13326         __si_class_type_info::do_find_public_src,
13327         __vmi_class_type_info::do_find_public_src): Likewise.
13328         (__class_type_info::do_dyncast,
13329         __si_class_type_info::do_dyncast,
13330         __vmi_class_type_info::do_dyncast): Likewise.
13331         (__class_type_info::do_upcast,
13332         __si_class_type_info::do_upcast,
13333         __vmi_class_type_info::do_upcast): Likewise.
13334         (__dynamic_cast): Adjust.
13335         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
13336         (__function_type_info::is_function_p): Likewise.
13337         (__pointer_type_info::do_catch): Likewise. Adjust.
13338         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
13339         (__throw_type_match_rtti_2): Adjust.
13340         (__is_pointer): Adjust.
13341
13342 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
13343
13344         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
13345         (complete_ctor_identifier): New macro.
13346         (special_function_kind): Add sfk_copy_constructor and
13347         sfk_assignment_operator.
13348         (LOOKUP_HAS_IN_CHARGE): Remove.
13349         (cons_up_default_function): Rename to ...
13350         (implicitly_declare_fn): ... this.
13351         * call.c (build_new_method_call): Add in-charge parameters for
13352         constructors here.
13353         * class.c (add_implicitly_declared_members): Change parameter name
13354         from cant_have_assignment to cant_have_const_assignment.
13355         Replace calls to cons_up_default_function to implicitly_declare_fn.
13356         * cvt.c (ocp_convert): Use complete_ctor_identifier.
13357         * decl.c (initialize_predefined_identifiers): Initialize it.
13358         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
13359         complex expression.
13360         * init.c (expand_default_init): Don't calculate the in-charge
13361         parameter here.
13362         (build_new_1): Likewise.
13363         * lex.c (cons_up_default_function): Move to method.c.
13364         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
13365         (implicitly_declare_fn): New function.
13366         * typeck.c (build_static_cast): Use complete_ctor_identifier.
13367         (build_modify_expr): Likewise.
13368         * typeck2.c (build_functional_cast): Likewise.
13369
13370         Under the new ABI, constructors don't return `this'.
13371         * cp-tree.h (warn_reorder): Declare.
13372         (special_function_kind): New enum.
13373         (global_base_init_list): Remove declaration.
13374         (emit_base_init): Don't return a value.
13375         (check_base_init): Don't declare.
13376         (is_aggr_typedef): Likewise.
13377         * decl.c (check_special_function_return_type): New function.
13378         (return_types): Remove.
13379         (grokdeclarator): Use check_special_function_return_type.
13380         (start_function): Don't initialize ctor_label under the new ABI.
13381         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
13382         * init.c (begin_init_stmts): Move to top of file.
13383         (finish_init_stmts): Likewise.
13384         (warn_reorder): Don't declare.
13385         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
13386         value.
13387         (check_base_init): Remove.
13388         (is_aggr_typedef): Likewise.
13389         (build_new_1): Don't use the return value of a constructor.
13390         * semantics.c (setup_vtbl_ptr): Don't use the return value
13391         of emit_base_init.
13392         * typeck.c (check_return_expr): Don't magically convert return
13393         statements into `return this' in constructors under the new ABI.
13394
13395         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
13396         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
13397         (base_ctor_identifier): New macro.
13398         (base_dtor_identifier): Likewise.
13399         (deleting_dtor_identifier): Likewise.
13400         * decl.c: Don't include obstack.h.
13401         (obstack_chunk_alloc): Don't define.
13402         (obstack_chunk_free): Likewise.
13403         (struct predefined_identifier): New type.
13404         (initialize_predefined_identifiers): New function.
13405         (init_decl_processing): Use it.
13406         (debug_temp_inits): Remove.
13407         (start_method): Don't call preserve_data.
13408         (hack_incomplete_structures): Update comment.
13409         * init.c (init_init_processing): Don't initialize
13410         nelts_identifier.
13411         (build_offset_rf): Remove dead code.
13412         (build_delete): Use CLASSTYPE_N_BASECLASSES.
13413         * search.c (init_search_processing): Don't initialize
13414         vptr_identifier.
13415
13416 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13417
13418         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
13419         some sign_compare warnings.
13420
13421 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
13422
13423         Rename abi::__vmi_class_type_info members.
13424         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
13425         base_list, detail_masks members to vmi_flags, vmi_base_count,
13426         vmi_bases and vmi_flags_masks respectively.
13427         (__vmi_class_type_info::vmi_flags_masks): Rename
13428         details_unknown_mask to flags_unknown_mask.
13429         * tinfo.cc (__class_type_info::do_upcast): Adjust.
13430         (__vmi_class_type_info::do_find_public_src): Adjust.
13431         (__vmi_class_type_info::do_dyncast): Adjust.
13432         (__vmi_class_type_info::do_upcast): Adjust.
13433
13434 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
13435
13436         * tinfo.cc (convert_to_base): New function.
13437         (get_vbase_offset): Remove. Move into convert_to_base.
13438         (__vmi_class_type_info::do_find_public_src): Adjust.
13439         (__vmi_class_type_info::do_dyncast): Adjust.
13440         (__vmi_class_type_info::do_upcast): Adjust.
13441
13442 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
13443
13444         * tinfo.cc (operator=): Use __builtin_strcmp.
13445         * tinfo2.cc (before): Likewise.
13446
13447 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
13448
13449         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
13450         (DECL_SAVED_INLINE): Rename to ...
13451         (DECL_DEFERRED_FN): ... this.
13452         (in_function_p): Remove declaration.
13453         (mark_inline_for_output): Rename to ...
13454         (defer_fn): ... this.
13455         * decl.c (finish_function): Adjust call to mark_inline_for_output.
13456         (in_function_p): Remove definition.
13457         * decl2.c (saved_inlines): Rename to ...
13458         (deferred_fns): ... this.
13459         (saved_inlines_used): Rename to ...
13460         (deferred_fns_used): ... this.
13461         (mark_inline_for_output): Rename to ...
13462         (defer_fn): ... this.
13463         (finish_file): Adjust accordingly.
13464         (init_decl2): Likewise.
13465         * lex.c (cons_up_default_function): Likewise.
13466         * pt.c (mark_decl_instantiated): Likewise.
13467         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
13468         circumstances.
13469         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
13470         * semantics.c (expand_body): Defer more functions.
13471
13472 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
13473
13474         * vec.cc: New file.
13475         * Make-lang.in (CXX_LIB2FUNCS): Add it.
13476         (vec.o): Build it.
13477         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13478         __cxa_vec_delete): Declare.
13479
13480 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
13481
13482         * rtti.c (dfs_class_hint_mark): New static function.
13483         (dfs_class_hint_unmark): New static function.
13484         (class_hint_flags): Use them.
13485
13486 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
13487
13488         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
13489
13490 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
13491
13492         * cp-tree.h (instantiate_decl): Change prototype.
13493         * decl2.c (mark_used): Adjust call.
13494         * optimize.c (inlinable_function_p): Adjust handling of templates.
13495         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
13496         (do_type_instantiation): Likewise.
13497         (instantiate_decl): Defer more templates.
13498         (instantiate_pending_templates): Adjust logic to handle inline
13499         friend functions.
13500
13501         * Makefile.in (GGC_H): New variable.  Use it throughout in place
13502         of ggc.h.
13503
13504         * call.c: Don't include obstack.h.  Include ggc.h.
13505         (obstack_chunk_alloc): Don't define.
13506         (obstack_chunk_free): Likewise.
13507         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
13508         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
13509         (pop_switch): Free it.
13510
13511         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
13512
13513         * dump.c (dequeue_and_dump): Don't try to print the bit_position
13514         if we don't have a DECL_FIELD_OFFSET.
13515
13516 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
13517
13518         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
13519         special_function_p.
13520
13521 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13522
13523         * cfns.gperf (hash, libc_name_p): Prototype.
13524
13525         * rtti.c (build_dynamic_cast_1): Constification.
13526
13527         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
13528
13529         * semantics.c (deferred_type_access_control): Prototype.
13530
13531 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
13532
13533         Correct many new ABI issues regarding vbase and vcall offset
13534         layout.
13535         * cp-tree.h (BINFO_VTABLE): Document.
13536         (struct lang_type): Tweak formatting.
13537         (BINFO_PRIMARY_BINFO): Add to documentation.
13538         (CLASSTYPE_VSIZE): Fix typo in comment.
13539         (CLASSTYPE_VBASECLASSES): Update documentation.
13540         (BINFO_VBASE_MARKED): Remove.
13541         (SET_BINFO_VBASE_MARKED): Likewise.
13542         (CLEAR_BINFO_VBASE_MARKED): Likewise.
13543         (BINFO_FIELDS_MARKED): Remove.
13544         (SET_BINFO_FIELDS_MARKED): Likewise.
13545         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
13546         (enum access_kind): New enumeration.
13547         (num_extra_vtbl_entries): Remove declaration.
13548         (size_extra_vtbl_entries): Likewise.
13549         (get_vtbl_decl_for_binfo): New function.
13550         (dfs_vbase_unmark): Remove declaration.
13551         (mark_primary_bases): Likewise.
13552         * class.c (SAME_FN): Remove.
13553         (struct vcall_offset_data_s): Move definition.
13554         (build_vbase_pointer): Use `build', not `build_binary_op', to
13555         access the vbase pointer under the new ABI.
13556         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
13557         (build_primary_vtable): Likewise.
13558         (dfs_mark_primary_bases): Move here from search.c.
13559         (mark_primary_bases): Likewise.
13560         (determine_primary_bases): Under the new ABI, don't make a base
13561         class a primary base just because we don't yet have any virtual
13562         functions.
13563         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
13564         (num_vfun_entries): Remove.
13565         (dfs_count_virtuals): Likewise.
13566         (num_extra_vtbl_entries): Likewise.
13567         (size_extra_vtbl_entries): Likewise.
13568         (layout_virtual_bases): Iterate in inheritance graph order under
13569         the new ABI.
13570         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
13571         indicate that a vfield is present.
13572         (init_class_processing): Initialize access_public_node, etc., from
13573         ak_public, etc.
13574         (get_vtbl_decl_for_binfo): New function.
13575         (dump_class_hierarchy_r): Likewise.
13576         (dump_class_hierarchy): Use it.
13577         (finish_vtbls): Build the vtbls in inheritance graph order.
13578         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
13579         (initialize_vtable): Use get_vtbl_decl_for_binfo.
13580         (accumulate_vtbl_inits): Add comments explaining why a pre-order
13581         walk is required.
13582         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
13583         where the vptr points, even for primary vtables.
13584         (build_vtbl_initializer): Adjust handling of vbase and vcall
13585         offsets.
13586         (build_vcall_and_vbase_vtable_entries): New function.
13587         (dfs_build_vbase_offset_vtbl_entries): Remove.
13588         (build_vbase_offset_vtbl_entries): Reimplement.
13589         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
13590         were already handled in a primary base class vtable.
13591         (build_vcall_offset_vtbl_entries): Adjust.
13592         (build_rtti_vtbl_entries): Adjust.
13593         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
13594         * init.c (expand_virtual_init): Simplify.
13595         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
13596         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
13597         * search.c (BINFO_ACCESS): New macro.
13598         (SET_BINFO_ACCESS): Likewise.
13599         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
13600         (access_in_type): Likewise.
13601         (dfs_accessible_p): Likewise.
13602         (protected_accessible_p): Likewise.
13603         (lookup_fnfields_1): Adjust documentation.
13604         (dfs_mark_primary_bases): Move to class.c
13605         (mark_primary_bases): Likewise.
13606         (dfs_vbase_unmark): Remove.
13607         (virtual_context): Use BINFO_FOR_VBASE.
13608         (dfs_get_vbase_types): Simplify.
13609         (dfs_build_inheritance_graph_order): New function.
13610         (get_vbase_types): Use it.
13611         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
13612
13613         * tinfo.cc (get_vbase_offset): New function.
13614         (__vmi_class_type_info::do_find_public_src): Use it.
13615         (__vmi_class_type_info::do_dyncast): Likewise.
13616         (__vmi_class_type_info::do_upcast): Likewise.
13617
13618 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
13619
13620         * lang-specs.h: Pass -fno-show-column to the preprocessor.
13621
13622 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
13623
13624         * rtti.c (class_hint_flags): Rename flags.
13625         (class_initializer): Remove flags.
13626         (synthesize_tinfo_var): Combine offset and flags. Add flags
13627         for __vmi_class_type_info.
13628         (create_tinfo_types): Remove flags from __class_type_info and
13629         __si_class_type_info. Merge flags and offset from
13630         base_class_type_info.
13631         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
13632         (__base_class_info::is_virtual_p): Adjust.
13633         (__base_class_info::is_public_p): Adjust.
13634         (__base_class_info::offset): New accessor.
13635         (__class_type_info::details): Remove member.
13636         (__class_type_info::__class_type_info): Lose details.
13637         (__class_type_info::detail_masks): Remove.
13638         (__si_class_type_info::__si_class_type_info): Lose details.
13639         (__vmi_class_type_info::details): New member.
13640         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
13641         (__vmi_class_type_info::detail_masks): New member.
13642         * tinfo.cc (__class_type_info::do_upcast): Initialize result
13643         with unknown_details_mask.
13644         (__vmi_class_type_info::do_find_public_src): Adjust
13645         (__vmi_class_type_info::do_dyncast): Adjust.
13646         (__vmi_class_type_info::do_upcast): Set result details, if
13647         needed. Adjust.
13648         (__dynamic_cast): Temporarily #if out optimization.
13649
13650 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
13651
13652         * rtti.c (get_tinfo_decl): Mark used.
13653         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
13654         mark as dealt with, if we output it.
13655
13656 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
13657
13658         * class.c: Reorganize to put virtual function table initialization
13659         machinery at the end of the file.
13660
13661 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
13662
13663         * class.c (finish_struct): Use bitsize_zero_node.
13664         * pt.c (instantiate_class_template): Likewise.
13665
13666 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
13667
13668         Put RTTI entries at negative offsets in new ABI.
13669         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
13670         vbase offset at index -3, not -1.
13671         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
13672         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
13673         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
13674         (build_rtti_vtbl_entries): New function.
13675         (set_rtti_entry): Remove.
13676         (build_primary_vtable): Don't use it.
13677         (build_secondary_vtable): Likewise.
13678         (start_vtable): Remove.
13679         (first_vfun_index): New function.
13680         (set_vindex): Likewise.
13681         (add_virtual_function): Don't call start_vtable.  Do call
13682         set_vindex.
13683         (set_primary_base): Rename parameter.
13684         (determine_primary_base): Likewise.
13685         (num_vfun_entries): Don't use skip_rtti_stuff.
13686         (num_extra_vtbl_entries): Include RTTI information.
13687         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
13688         (skip_rtti_stuff): Remove.
13689         (dfs_modify_vtables): Don't use it.
13690         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
13691         (layout_nonempty_base_or_field): Update size handling.
13692         (create_vtable_ptr): Tweak.
13693         (layout_class_type): Adjust parameter names.
13694         (finish_struct_1): Simplify.
13695         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
13696         (skip_rtti_stuff): Remove.
13697         (first_vfun_index): New function.
13698         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
13699         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
13700         (marked_vtable_pathp): Declare.
13701         (unmarked_vtable_pathp): Likewise.
13702         * error.c (dump_expr): Use first_vfun_index to calculate vtable
13703         offsets.
13704         * rtti.c (build_headof): Look for RTTI at negative offsets.
13705         (get_tinfo_decl_dynamic): Likewise.
13706         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
13707         here.
13708         (create_pseudo_type_info): Do it here instead.  Adjust so that
13709         vptr points at first virtual function.
13710         * search.c (marked_vtable_pathp): Make it global.
13711         (unmarked_vtable_pathp): Likewise.
13712         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
13713         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
13714         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
13715         (get_pure_virtuals): Likewise.
13716         (expand_upcast_fixups): Likewise.
13717         * tree.c (debug_binfo): Likewise.
13718         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
13719         negative offset.
13720
13721 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13722
13723         * class.c (check_field_decl): Fix typo.
13724         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
13725         (check_methods): Likewise.
13726         (check_field_decls): Likewise.
13727         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
13728         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
13729         Use DECL_RESULT_FLD, not DECL_RESULT.
13730         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
13731         * lex.c (identifier_type): Likewise.
13732         * pt.c (determine_specialization, lookup_template_class): Likewise.
13733         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
13734         (resolve_overloaded_unification, more_specialized): Likewise.
13735         * semantics.c (finish_member_declaration): Likewise.
13736         * typeck.c (build_x_function_call): Likewise.
13737
13738 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
13739
13740         * class.c (layout_empty_base): Handle empty bases with non-byte
13741         alignment.
13742         (build_base_field): Likewise.
13743         (layout_virtual_bases): Likewise.
13744
13745         * class.c (finish_struct_1): Fix typo in this change:
13746
13747         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13748
13749 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
13750
13751         * decl.c (grokdeclarator): Count partial specializations when
13752         keeping track of how many template classes have been seen.
13753
13754         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
13755
13756 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13757
13758         * class.c (build_vbase_pointer_fields): layout_field now place_field.
13759         (get_vfield_offset): Use byte_position.
13760         (set_rtti_entry): Set OFFSET to ssizetype zero.
13761         (get_binfo_offset_as_int): Deleted.
13762         (dfs_record_base_offsets): Use tree_low_cst.
13763         (dfs_search_base_offsets): Likewise.
13764         (layout_nonempty_base_or_field): Reflect changes in RLI format
13765         and call byte_position.
13766         (layout_empty_base): Convert offset to ssizetype.
13767         (build_base_field): use rli_size_unit_so_far.
13768         (dfs_propagate_binfo_offsets): Do computation in proper type.
13769         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
13770         (layout_class_type): Reflect changes in RLI names and fields.
13771         (finish_struct_1): Set DECL_FIELD_OFFSET.
13772         * dump.c (dequeue_and_dump): Call bit_position.
13773         * expr.c (cplus_expand_constant): Use byte_position.
13774         * rtti.c (expand_class_desc): Use bitsize_one_node.
13775         * typeck.c (build_component_addr): Use byte_position and don't
13776         special case for zero offset.
13777
13778 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
13779
13780         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
13781
13782         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
13783         tinfo object.
13784         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
13785         vtable.
13786
13787 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13788
13789         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
13790         DECL_P macros.
13791         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
13792         make_typename_type, check_initializer, cp_finish_decl,
13793         xref_tag): Likewise.
13794         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
13795         decl_namespace, arg_assoc_template_arg, arg_assoc,
13796         validate_nonmember_using_decl, do_class_using_decl): Likewise.
13797         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
13798         args_to_string): Likewise.
13799         * friend.c (is_friend): Likewise.
13800         * lex.c (note_got_semicolon, note_list_got_semicolon,
13801         is_global): Likewise.
13802         * method.c (build_overload_nested_name, build_overload_value,
13803         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
13804         * parse.y (typename_sub, typename_sub1): Likewise.
13805         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
13806         process_partial_specialization, convert_template_argument,
13807         template_args_equal, add_pending_template, lookup_template_class,
13808         for_each_template_parm_r, maybe_fold_nontype_arg,
13809         tsubst, instantiate_template, type_unification_real, unify,
13810         instantiate_pending_templates, set_mangled_name_for_template_decl):
13811         Likewise.
13812         * repo.c (repo_get_id, repo_template_used): Likewise.
13813         * search.c (lookup_field_1): Likewise.
13814         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
13815         * xref.c (classname): Likewise.
13816
13817 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
13818
13819         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
13820         (CANONICAL_BINFO): New macro.
13821         (BINFO_NEW_VTABLE_MARKED): Use it.
13822         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
13823         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
13824         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
13825         not TREE_TYPE.
13826         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13827         (build_secondary_vtable): Likewise.
13828         (dfs_finish_vtbls): Likewise.
13829         (dfs_accumulate_vtbl_inits): Likewise.
13830         (accumulate_vtbl_inits): New function.
13831         (finish_vtbls): Make sure that virtual bases come after
13832         non-virtual bases in the vtable group.
13833         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
13834         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13835         * search.c (struct vbase_info): Move definition.
13836         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13837         (unmarked_new_vtable_p): Likewise.
13838         (dfs_mark_vtable_path): Remove.
13839         (dfs_mark_new_vtable): Remove.
13840         (dfs_unmark_new_vtable): Likewise.
13841         (dfs_clear_search_slot): Likewise.
13842         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
13843         (dfs_clear_vbase_slots): Likewise.
13844         (init_vbase_pointers): LIkewise.
13845
13846 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
13847
13848         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
13849         SIZETYPE to a non-SIZETYPE.
13850
13851 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
13852
13853         * class.c (layout_virtual_bases): Adjust names in conditionally
13854         compiled code.
13855
13856         * class.c (record_base_offsets): New function.
13857         (layout_conflict_p): Likewise.
13858         (layout_nonempty_base_or_field): Use it.
13859         (layout_empty_base): New function.
13860         (build_base_field): Use it.
13861         (build_base_fields): Update comment.
13862         (layout_virtual_bases): Fold in a little code form
13863         layout_basetypes.  Use layout_empty_base.
13864         (layout_basetypes): Remove.
13865         (end_of_class): New function.
13866         (layout_class_type): Use it.  Adjust.
13867
13868         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
13869         (fntype_p): Remove.
13870         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
13871         comment.
13872         (dfs_skip_nonprimary_vbases_markedp): Likewise.
13873         * typeck.c (fntype_p): Remove.
13874
13875         * cp-tree.h (TI_SPEC_INFO): Remove.
13876         (CLASSTYPE_TI_SPEC_INFO): Likewise.
13877         * pt.c (process_partial_specialization): Likewise.
13878
13879         * class.c (build_base_field): Fix thinko in computation of binfo
13880         offsets.
13881
13882         * tree.c (mark_local_for_remap_p): Mark variables declared in
13883         TARGET_EXPRs as well.
13884
13885 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
13886
13887         * typeck.c (require_complete_type, complete_type,
13888         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
13889         build_array_ref, convert_arguments, pointer_diff,
13890         build_x_unary_op, build_unary_op, build_c_cast,
13891         build_modify_expr): Use COMPLETE_TYPE_P etc.
13892         * call.c (is_complete, convert_like_real,
13893         build_new_method_call): Likewise.
13894         * class.c (build_vbase_pointer_fields, check_bases,
13895         build_base_field, finish_struct_1, pushclass): Likewise.
13896         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
13897         * decl.c (maybe_process_template_type_declaration, pushtag,
13898         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
13899         layout_var_decl, check_initializer, cp_finish_decl,
13900         grokdeclarator, require_complete_types_for_parms,
13901         grok_op_properties, xref_tag, xref_basetypes,
13902         check_function_type): Likewise.
13903         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
13904         * friend.c (do_friend): Likewise.
13905         * init.c (build_offset_ref): Likewise.
13906         * parse.y (structsp): Likewise.
13907         * pt.c (maybe_process_partial_specialization,
13908         tsubst_friend_function, instantiate_class_template, tsubst,
13909         do_type_instantiation, instantiate_pending_templates): Likewise.
13910         * repo.c (repo_get_id): Likewise.
13911         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
13912         synthesize_tinfo_var, emit_support_tinfos): Likewise.
13913         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
13914         * semantics.c (begin_class_definition): Likewise.
13915         * tree.c (build_cplus_method_type): Likewise.
13916         * typeck2.c (digest_init, build_functional_cast,
13917         add_exception_specifier): Likewise.
13918         * parse.h, parse.c: Regenerated.
13919
13920 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
13921
13922         * inc/cxxabi.h: New header file. Define new-abi entry points.
13923         (__pointer_type_info::target): Rename member to ...
13924         (__pointer_type_info::type): ... here.
13925         (__base_class_info::type): Rename member to ...
13926         (__base_class_info::base): ... here.
13927         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
13928         * cp-tree.h (CPTI_ABI): New global tree enumeration.
13929         (abi_node): New global tree node.
13930         * decl.c (abi_node): Document.
13931         (init_decl_processing): Initialize abi_node.
13932         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
13933         (get_vmi_pseudo_type_info): Likewise.
13934         (create_tinfo_types): Likewise.
13935         (emit_support_tinfos): Likewise.
13936         * tinfo.h (cxxabi.h): Include for new-abi.
13937         Move rtti class definitions to new header file.
13938         * tinfo.cc (abi): Use the namespace.
13939         (std): Move new abi rtti classes from here ...
13940         (__cxxabiv1): ... to here.
13941         * tinfo2.cc (cxxabi.h): Include for new-abi.
13942         Move rtti class definitions to new header file.
13943         (std): Move new abi rtti classes from here ...
13944         (__cxxabiv1): ... to here.
13945         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
13946         namespace.
13947
13948 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
13949             Jason Merrill  <jason@casey.cygnus.com>
13950
13951         * method.c (build_overload_int): Use host_integerp.
13952
13953 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13954
13955         * init.c (build_offset_ref): Handle the case of a templated member
13956         function.
13957
13958 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13959
13960         * except.c (expand_exception_blocks): Clear catch_clauses_last.
13961
13962 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
13963
13964         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
13965         * class.c (check_bitfield_decl): Turn illegal bitfields into
13966         non-bitfields.
13967         (dfs_propagate_binfo_offsets): Adjust for new size_binop
13968         semantics.
13969         (dfs_offset_for_unshared_vbases): Likewise.
13970         * cvt.c (cp_convert_to_pointer): Convert NULL to a
13971         pointer-to-member correctly under the new ABI.
13972         * expr.c (cplus_expand_constant): Don't use cp_convert when
13973         turning an offset into a pointer-to-member.
13974         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
13975         when dereferencing them under the new ABI.
13976         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
13977         of pointers-to-members under the new ABI.
13978
13979         * class.c (check_bitfield_decl): Remove restriction on really long
13980         bitfields.
13981         (layout_class_type): Implement new ABI handling of bitfields
13982         longer than their types.
13983
13984 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13985
13986         * parse.y (extdefs): Call ggc_collect.
13987         * parse.c: Regenerated.
13988
13989 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
13990
13991         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
13992         (note_name_declared_in_class): Use OVL_CURRENT to get at a
13993         potential overload.
13994
13995 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13996
13997         * class.c (build_vbase_path): Use integer_zerop.
13998         (build_vtable_entry): Use tree_low_cst.
13999         (get_vfield_offset): Use bit_position.
14000         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
14001         Use tree_low_cst.
14002         (check_bitfield_decl): Set DECL_SIZE using convert.
14003         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
14004         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
14005         Use tree_low_cst.
14006         (finish_struct_1): Use bit_position.
14007         (dump_class_hierarchy): Use tree_low_cst.
14008         * cp-tree.h (min_precision): Add declaration.
14009         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
14010         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
14011         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
14012         * expr.c (cplus_expand_constant): Use bit_position.
14013         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
14014         * rtti.c (get_base_offset): Use bit_position.
14015         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
14016         host_integerp, and tree_low_cst.
14017         (pointer_int_sum): Use integer_zerop.
14018         (build_component_addr): Use bit_position.
14019
14020 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
14021
14022         * typeck.c (require_complete_type): Don't assume size_zero_node.
14023         (complete_type_or_else): Likewise.
14024
14025 2000-03-16  Steven Grady <grady@digitaldeck.com>
14026             Jason Merrill  <jason@casey.cygnus.com>
14027
14028         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
14029
14030 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
14031
14032         * decl2.c (grokfield): Bail out if type is error_mark_node.
14033
14034 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14035
14036         * tinfo2.cc (__ptr_to_member_data): Rename to ...
14037         (__pointer_to_member_data): ... here. Adjust.
14038         * rtti.c (create_tinfo_types): Adjust.
14039
14040 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14041
14042         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
14043         * decl.c (ref_desc_type_node): Undocument.
14044         * rtti.c (ptr_ref_initializer): Rename to ...
14045         (ptr_initializer): ... here. Adjust comments.
14046         (ptmd_initializer): Fix comment thinko.
14047         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
14048         (create_tinfo_types): Remove ref_desc_type_node init.
14049         * tinfo2.cc (__reference_type_info): Remove.
14050
14051 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14052
14053         * decl.c (cp_finish_decl): Remove obsolete comment.
14054
14055         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
14056
14057 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
14058
14059         * cp-tree.h: Tweak documentation.
14060         * class.c (build_vbase_pointer_fields): Layout the fields, too.
14061         (avoid_overlap): Remove.
14062         (get_binfo_offset_as_int): New function.
14063         (dfs_serach_base_offsets): Likewise.
14064         (layout_nonempty_base_or_field): Likewise.
14065         (build_base_field): Layout fields here.  Avoid placing two objects
14066         of the same type at the same address, under the new ABI.
14067         (build_base_fields): Adjust accordingly.
14068         (create_vtable_ptr): Return the new field, but don't attach it to
14069         TYPE_FIELDS.
14070         (remove_base_field): Remove.
14071         (remove_base_fields): Remove.
14072         (layout_basetypes): Adjust accordingly.
14073         (layout_class_type): Call layout_field for each field, rather than
14074         just making a wholesale call to layout_type.
14075
14076 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
14077
14078         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
14079
14080 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
14081
14082         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
14083
14084         * except.c (dtor_nothrow): New fn.
14085         (do_pop_exception): Use it.  Take type parm.
14086         (push_eh_cleanup): Take type parm.
14087         (expand_start_catch_block): Pass it.
14088         (build_eh_type_type_ref): Accept null type.
14089
14090 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
14091
14092         * cp-tree.h (revert_static_member_fn): Change prototype.
14093         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
14094         (grok_op_properties): Likewise.
14095         (start_function): Likewise.
14096         (revert_static_member_fn): Simplify.
14097         * pt.c (check_explicit_specialization): Adjust call to
14098         revert_static_member_fn.
14099
14100 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
14101
14102         * cp-tree.h (scope_kind): New type.
14103         (tmpl_spec_kind): Likewise.
14104         (declare_pseudo_global_level): Remove.
14105         (pseudo_global_level_p): Rename to template_parm_scope_p.
14106         (pushlevel): Remove declaration.
14107         (begin_scope): New function.
14108         (finish_scope): Likewise.
14109         (current_tmpl_spec_kind): Likewise.
14110         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
14111         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
14112         Add template_spec_p.
14113         (toplevel_bindings_p): Adjust.
14114         (declare_pseudo_global_level): Remove.
14115         (pseudo_global_level_p): Rename to template_parm_scope_p.
14116         (current_tmpl_spec_kind): New function.
14117         (begin_scope): Likewise.
14118         (finish_scope): Likewise.
14119         (maybe_push_to_top_level): Adjust.
14120         (maybe_process_template_type_declaration): Likewise.
14121         (pushtag): Likewise.
14122         (pushdecl_nonclass_level): Likewise.
14123         (lookup_tag): Likewise.
14124         (grokfndecl): Handle member template specializations.  Share
14125         constructor and non-constructor code.
14126         * decl2.c (check_classfn): Handle member template specializations.
14127         * pt.c (begin_template_parm_list): Use begin_scope.
14128         (begin_specialization): Likewise.
14129         (end_specialization): Likewise.
14130         (check_explicit_specialization): Use current_tmpl_spec_kind.
14131         Handle member template specializations.
14132         (end_template_decl): Use finish_scope.  Remove call to
14133         get_pending_sizes.
14134         (push_template_decl_real): Remove bogus error message.
14135         (tsubst_decl): Fix typo in code contained in comment.
14136         (instantiate_template): Handle member template specializations.
14137         (most_general_template): Likewise.
14138
14139 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
14140
14141         * lex.c (whitespace_cr): Compress consecutive calls to warning().
14142         (do_identifier): Ditto for error().
14143
14144         * pt.c (convert_nontype_argument): Ditto for cp_error().
14145         (convert_template_argument): Ditto for cp_pedwarn().
14146
14147 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
14148
14149         * exception.cc (__check_null_eh_spec): New fn.
14150         * except.c (expand_end_eh_spec): Call it if the spec is throw().
14151
14152 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
14153
14154         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
14155         * except.c (expand_end_eh_spec): Add the return type.
14156         * rtti.c (throw_bad_cast): Add the parmtypes.
14157         (throw_bad_typeid): Likewise.
14158
14159         * semantics.c (expand_stmt): Only leave out rtl for unused
14160         artificials, and set DECL_IGNORED_P on them as well.
14161         * decl.c (wrapup_globals_for_namespace): Likewise.
14162
14163 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
14164
14165         * decl.c (maybe_commonize_var): Skip all artificial decls.
14166         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
14167
14168 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
14169
14170         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
14171         * cp-tree.h: Declare flag_enforce_eh_specs.
14172         * decl.c (store_parm_decls, finish_function): Check it.
14173
14174         C library functions don't throw.
14175         * Makefile.in (cfns.h): New target.
14176         (except.o): Depend on it.
14177         * Make-lang.in (cc1plus): Depend on cfns.gperf.
14178         * cfns.gperf: New file.
14179         * cfns.h: Generated.
14180         * except.c: Include it.
14181         (nothrow_libfn_p): New fn.
14182         * decl.c (grokfndecl): Use it.
14183         * cp-tree.h: Declare it.
14184
14185         * decl.c (push_overloaded_decl_1, auto_function,
14186         define_function): Lose.
14187         (build_library_fn_1): New static fn.
14188         (builtin_function): Use it.
14189         (get_atexit_node): Use build_library_fn_ptr.
14190         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
14191         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
14192         push_void_library_fn, push_throw_library_fn): New fns.
14193         * cp-tree.h: Declare them.
14194         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
14195         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
14196         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
14197         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
14198         * rtti.c (build_runtime_decl): Lose.
14199         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
14200         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
14201         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
14202
14203         * call.c (build_call): Remove result_type parm.
14204         Call mark_used on unused artificial fns.
14205         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
14206
14207 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
14208
14209         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
14210         appropriate.
14211         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
14212         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
14213         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
14214         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
14215         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
14216         expand_generic_desc): Likewise.
14217
14218 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14219
14220         * exception.cc (__cp_pop_exception): Cleanup the original object.
14221
14222 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14223
14224         * decl.c (grok_op_properties): Merge conversion to void warning
14225         with other silly op warnings.
14226
14227 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
14228
14229         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
14230         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
14231
14232 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14233
14234         * decl.c (cp_make_fname_decl): New function.
14235         (wrapup_globals_for_namespace): Don't emit unused static vars.
14236         (init_decl_processing): Remove comment about use of
14237         array_domain_type. Set make_fname_decl.
14238         (cp_finish_decl): Remove __FUNCTION__ nadgering.
14239         * semantics.c (begin_compound_stmt): Remove
14240         current_function_name_declared flagging.
14241         (expand_stmt): Don't emit unused local statics.
14242         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
14243         specially.
14244
14245 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14246
14247         * typeck.c (convert_for_assignment): Don't look at array
14248         initializer.
14249         * call.c (convert_like_real): Likewise.
14250
14251 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
14252
14253         Add initial support for '\uNNNN' specifier.
14254         * lex.c (read_ucs): New fn.
14255         (readescape, skip_white_space): Call it.
14256         (is_extended_char, is_extended_char_1): New fns.
14257         (utf8_extend_token): New fn, #if 0'd out.
14258         (real_yylex): Treat extended chars like letters.
14259
14260         * search.c (note_debug_info_needed): Walk the bases even if we
14261         weren't deferring the type itself.
14262
14263 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14264
14265         * decl2.c (finish_objects): Constify a char*.
14266
14267         * method.c (emit_thunk): Likewise.
14268
14269 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
14270
14271         * typeck.c (dubious_conversion_warnings): Look through
14272         REFERENCE_TYPE.
14273
14274 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14275
14276         * class.c (dfs_modify_vtables): I is now unsigned.
14277         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
14278         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
14279         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
14280         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14281         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
14282         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
14283         Call integer_all_onesp.
14284         * typeck2.c (process_init_constructor): Use compare_tree_int.
14285
14286         * lang-specs.h (as): Don't call if -syntax-only.
14287
14288 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
14289
14290         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
14291         RTL_EXPR_HAS_NO_SCOPE after all.
14292
14293 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
14294
14295         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
14296         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
14297         RTL_EXPR_HAS_NO_SCOPE.
14298
14299         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
14300         later.
14301
14302         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
14303
14304 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
14305
14306         * call.c (convert_like): Macrofy.
14307         (convert_like_with_context): New macro.
14308         (convert_like_real): Renamed from convert_like.  Add calling
14309         context parameters, for diagnostics. Add recursive flag.  Call
14310         dubious_conversion_warnings for outer conversion.
14311         (build_user_type_conversion): Use convert_like_with_context.
14312         (build_over_call): Likewise. Don't warn about dubious
14313         conversions here. Adjust convert_default_arg calls.
14314         (convert_default_arg): Add context parameters for diagnostics.
14315         Pass through to convert_like_with_context.
14316         * cp-tree.h (convert_default_arg): Add context parameters.
14317         (dubious_conversion_warnings): Prototype new function.
14318         * typeck.c (convert_arguments): Adjust convert_default_arg call.
14319         (dubious_conversion_warnings): New function, broken
14320         out of convert_for_assignment.
14321         (convert_for_assignment): Adjust.
14322
14323 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
14324
14325         * decl2.c (key_method): Break out from...
14326         (import_export_vtable, import_export_class): ...here.
14327
14328         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
14329         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
14330
14331         * search.c (note_debug_info_needed, dfs_debug_mark,
14332         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
14333         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
14334
14335 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
14336
14337         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
14338         typos.
14339
14340 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
14341
14342         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
14343         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
14344         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
14345         (lang_type): Split gets_new into has_new and has_array_new.
14346         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14347         (TYPE_GETS_NEW): Split into ...
14348         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
14349         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
14350         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
14351         (build_op_new_call): Don't declare.
14352         (build_new_1): Likewise.
14353         * call.c (build_op_new_call): Remove.
14354         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
14355         instead of TYPE_NEEDS_DESTRUCTOR.
14356         (finish_struct_bits): Likewise.
14357         (add_implicitly_declared_members): Likewise.
14358         (check_field_decl): Likewise.
14359         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
14360         correctly under the new ABI.
14361         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
14362         instead of TYPE_NEEDS_DESTRUCTOR.
14363         (initialize_local_var): Likewise.
14364         (destroy_local_var): Likewise.
14365         (cp_finish_decl): Likewise.
14366         (register_dtor_fn): Likewise.
14367         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
14368         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
14369         TYPE_VEC_DELETE_TAKES_SIZE here.
14370         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
14371         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
14372         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14373         (finish_destructor_body): Likewise.
14374         (maybe_build_cleanup_1): Likewise.
14375         * decl2.c (do_static_destruction): Likewise.
14376         * init.c (build_new_1): Make it static.
14377         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14378         (expand_cleanup_for_base): Likewise.
14379         (get_cookie_size): New function.
14380         (build_new_1): Handle array-new cookies correctly under the new
14381         ABI.
14382         (build_vec_delete_1): Likewise.
14383         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14384         (build_delete): Likewise.
14385         (build_vec_delete): Handle array-new cookies correctly under the new
14386         ABI.
14387         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14388         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
14389         TYPE_HAS_ARRAY_NEW_OPERATOR.
14390         * ptree.c (print_lang_type): Check them.
14391         * search.c (context_for_name_lookup): Fix typo in comment.
14392         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14393         * tree.c (break_out_cleanups): Likewise.
14394         (build_cplus_array_test_1): Likewise.
14395         (cp_build_qualified_type_real): Likewise.
14396         * typeck.c (complete_type): Likewise.
14397
14398         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
14399         the command-line, not the end.
14400
14401 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
14402
14403         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
14404
14405 2000-03-02  Tom Tromey  <tromey@cygnus.com>
14406
14407         * cp-tree.h (build_java_class_ref): Declare.
14408         * init.c (build_java_class_ref): No longer static.
14409         * except.c (expand_throw): Generate a Java-style `throw' if the
14410         thrown object is a "Java" object.
14411         (initialize_handler_parm): Generate a Java-style lookup of
14412         exception info if the caught object is a "Java" object.
14413         (catch_language, catch_language_init): New globals.
14414         (decl_is_java_type): New function.
14415         (expand_start_catch_block): Don't call push_eh_info() or
14416         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
14417         class reference to build_catch_block.
14418
14419 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14420
14421         * typeck.c (comptypes): Treat sizetype like its language equivalent.
14422
14423 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
14424
14425         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
14426         to merge reference/pointer code and fix incorrect warnings.
14427
14428 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
14429
14430         * search.c (protected_accessible_p): Use context_for_name_lookup.
14431
14432         * init.c (construct_virtual_bases): Fix thinko.
14433         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
14434
14435 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
14436
14437         * decl.c (current_function_decl): Move to toplev.c.
14438
14439 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
14440
14441         * pt.c (fn_type_unification): Unify return type, whenever
14442         provided.
14443         (get_bindings_real): Only pass return type when necessary.
14444         Remove explicit return type check.
14445         * class.c (resolve_address_of_overloaded_function): Pass desired
14446         return type to fn_type_unification.
14447
14448 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14449
14450         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
14451         DECL_FIELD_SIZE.
14452         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
14453         DECL_FIELD_SIZE.
14454         * rtti.c (expand_class_desc): Likewise.
14455         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
14456         (THUNK_VCALL_OFFSET): Likewise.
14457         (THUNK_DELTA): Reflect changes in ../tree.h.
14458
14459 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
14460
14461         * search.c (protected_accessible_p): Also allow the access if
14462         the member is public in DERIVED.  Lose TYPE parm.
14463         (friend_accessible_p): Lose TYPE parm.
14464         (accessible_p): Adjust.
14465
14466 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14467
14468         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
14469         on things that are not sizes; ssize_binop deleted.
14470         Call size_diffop when appropriate.
14471         (dfs_build_vcall_offset_vtbl_entries): Likewise.
14472         (build_primary_vtable, build_secondary_vtable): Likewise.
14473         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
14474         Variable I is HOST_WIDE_INT.
14475         (get_vfield_offset): Pass proper types to size_binop.
14476         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
14477         (finish_struct_1): Likewise.
14478         (skip_rtti_stuff): Arg N is now pointer to signed.
14479         (layout_class_type): Use size_zero_node.
14480         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
14481         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
14482         * decl.c (complete_arry_type): Pass proper types to size_binop.
14483         (xref_basetypes): BINFO_OFFSET is sizetype.
14484         * error.c (dump_expr): Don't use size_binop non-sizes.
14485         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
14486         * init.c (construct_virtual_bases): Fix type error.
14487         (build_vec_delete_1): Pass proper type to size_binop and don't
14488         fold result.
14489         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
14490         * rtti.c (get_base_offset): Pass proper type to size_binop.
14491         * search.c (dfs_find_vbases): Fix type error.
14492         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
14493         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
14494         * tree.c (debug_binfo): Variable N is signed.
14495         Use HOST_WIDE_INT_PRINT_DEC.
14496         * typeck.c (comptypes): sizetype is same as equivalent integer type.
14497         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
14498         size_one_node and size_zero_node.
14499         (c_alignof): Use size_one_node.
14500         (build_component_addr): Pass proper types to size_binop.
14501         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
14502
14503 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
14504
14505         Implement class scope using-declarations for functions.
14506         * class.c (handle_using_decl): Call add_method for used functions.
14507         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
14508         (add_method): Used functions are hidden by local functions.
14509         (check_bases_and_members): Handle using-decls before finalizing
14510         CLASSTYPE_METHOD_VEC.
14511         * call.c (add_function_candidate): Add ctype parm; if nonzero,
14512         override the type of 'this' accordingly.
14513         (add_template_candidate, add_template_candidate_real): Add ctype parm.
14514         (convert_class_to_reference, build_user_type_conversion_1,
14515         build_new_function_call, build_object_call, build_new_op,
14516         build_new_method_call): Pass ctype parm.
14517
14518         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
14519         the baselink.
14520         * call.c (convert_class_to_reference, build_user_type_conversion_1,
14521         build_new_function_call, build_object_call, build_new_op,
14522         build_new_method_call, build_op_delete_call): Don't get basetype_path
14523         from a baselink.
14524         * typeck.c (build_component_ref): Likewise.
14525         * init.c (build_offset_ref): Likewise.
14526         (resolve_offset_ref): Don't call enforce_access.
14527         Call build_scoped_ref.
14528         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
14529         would cause an error or if -pedantic.
14530         * class.c (alter_access): Lose binfo parm.
14531
14532 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
14533
14534         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
14535         types.
14536
14537 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
14538
14539         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
14540         pseudo_type_info creation into the std namespace
14541
14542 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
14543
14544         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
14545         (import_export_class): Remove declaration.
14546         * decl2.c (import_export_class): Make it static.
14547         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
14548         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
14549         EXPR_WITH_FILE_LOCATION.
14550         * lex.c (check_newline): Tweak filename/lineno setting.
14551         * semantics.c (begin_while_stmt): Fix typo in comment.
14552
14553 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14554
14555         * lang-options.h (-fmessage-length=): Add missing option.
14556
14557         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
14558
14559 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
14560
14561         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
14562
14563 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
14564
14565         * optimize.c (expand_call_inline): Emit the return label before
14566         evaluating the return value.
14567
14568 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
14569
14570         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
14571         than duplicating functionality here.
14572         * optimize.c: Include input.h.
14573         (expand_call_inline): Use push_srcloc and pop_srcloc.
14574         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
14575         * parse.c: Regenerated.
14576         * Makefile.in (lex.o): Depend on input.h.
14577         (optimize.o): Likewise.
14578
14579 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
14580
14581         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
14582         function type, rather than ICE.
14583
14584 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
14585
14586         * decl.c (grokdeclarator): Call decl_type_access_control.
14587         * parse.y (parse_end_decl): Don't call decl_type_access_control if
14588         decl is null.
14589
14590 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
14591
14592         * decl.c (decls_match): Remove obsolete static member nadgering.
14593
14594 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14595
14596         * decl.c (grokdeclarator): Change ANSI to ISO.
14597         * lex.c (consume_string, readescape, do_identifier): Likewise.
14598         (parse_float, real_yylex): Likewise.
14599         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
14600         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
14601         new_type_id, maybe_label_decls, simple_stmt,
14602         for.init.statement): Likewise.
14603         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
14604         * semantics.c (finish_named_return_value): Likewise.
14605         * parse.c: Regenerate.
14606
14607 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
14608
14609         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
14610         (CPTI_CLASS_STAR_TYPE): Remove.
14611         (vtable_index_type): Likewise.
14612         (class_star_type_node): Remove.
14613         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
14614         (build_binary_op_nodefault): Remove.
14615         * call.c (build_new_op): Use build_binary_op instead of
14616         build_binary_op_nodefault.
14617         * decl.c (init_decl_processing): Remove class_star_type_node
14618         initialization.  Make delta_type_node ptrdiff_type_node under the
14619         new ABI.  Initialize vtable_index_type.
14620         (build_ptrmemfunc_type): Build different structures for the new
14621         ABI.
14622         (build_enumerator): Use build_binary_op instead of
14623         build_binary_op_nodefault.
14624         * method.c (build_overload_value): Mangle pointers-to-members
14625         appropriately under the new ABI.
14626         * typeck.c (build_array_ref): Use build_binary_op instead of
14627         build_binary_op_nodefault.
14628         (get_member_function_from_ptrfunc): Adjust for the new ABI.
14629         (build_binary_op_nodefault): Rename to ...
14630         (build_binary_op): ... this.  Remove old version.  Adjust for
14631         pointer-to-member comparisons under the new ABI.
14632         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
14633         (build_ptrmemfunc): Adjust for the new ABI.
14634         (expand_ptrmemfunc_cst): Likewise.
14635         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
14636         (pfn_from_ptrmemfunc): Adjust for the new ABI.
14637
14638 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
14639
14640         * call.c (build_object_call): Compress consecutive calls to
14641         cp_error.
14642         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
14643         (build_op_delete_call): Adjust message formatting.
14644
14645         * class.c (check_bases): Compress consecutive calls to
14646         cp_pedwarn.
14647         (finish_struct_anon): Say 'ISO C++'.
14648
14649         * decl.c (start_decl): Same here.
14650         (grok_reference_init): Likewise.
14651         (grokfndecl): Correct message formatting.
14652         (grokfndecl): Improve diagnostic.
14653         (check_static_variable_definition): Likewise. Say 'ISO C++'
14654         (compute_array_index_type): Say 'ISO C++'
14655         (create_array_type_for_decl): Compress consecutive calls to
14656         cp_error.
14657         (grokdeclarator): Say 'ISO C++'
14658         (grok_op_properties): Likewise.
14659
14660         * decl2.c (delete_sanity): Clairify diagnostic.
14661         (check_member_template): Same here.
14662         (grok_function_init): Use consistent terminology.
14663
14664         * expr.c (do_case): Say 'ISO C++'
14665
14666         * friend.c (do_friend): Compress consecutive calls to warning.
14667
14668 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
14669
14670         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
14671         * class.c (build_secondary_vtable): Reorganize.  Don't create a
14672         new vtable under the new ABI.
14673         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
14674         computing the size.
14675         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
14676         the initializing elements.
14677         (initialize_vtable): New function.
14678         (dfs_finish_vtbls): Use it.
14679         (dfs_accumulate_vtbl_inits): New function.
14680         (finish_vtbls): Merge primary and secondary vtables under the new
14681         ABI.
14682         (finish_struct_1): Remove redundant call to layout_vtable_decl.
14683         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
14684         aren't VAR_DECLs.
14685
14686         * class.c (build_vtable): New function, split out from ...
14687         (get_vtable_decl): ... here, and ...
14688         (build_secondary_vtable): ... here.
14689
14690         * pt.c (tsubst_decl): Fix formatting.
14691
14692 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14693
14694         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
14695         (avoid_overlap, build_base_field): Likewise.
14696         (build_base_field, build_base_fields, is_empty_class):
14697         Test DECL_SIZE with integer_zero.
14698         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
14699         * cp-tree.h (struct lang_type): New field size_unit.
14700         (CLASSTYPE_SIZE_UNIT): New macro.
14701         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
14702         (cp_finish_decl): Delete -Wlarger-than processing.
14703         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
14704         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
14705         * tree.c (make_binfo): binfo vector is one entry longer.
14706         (walk_tree): Walk DECL_SIZE_UNIT.
14707
14708 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
14709
14710         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
14711         comment.
14712         (build_vtable_entry): Don't assume all vtable entries are
14713         functions.
14714         (build_vtbl_initializer): Adjust accordingly.
14715         (get_vtable_decl): Fix formatting.
14716
14717 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
14718
14719         * semantics.c (deferred_type_access_control): Walk the entire
14720         type_lookups list.
14721         (save_type_access_control): Rename from
14722         initial_deferred_type_access_control.  Just remember the value.
14723         (decl_type_access_control): New fn.
14724         (begin_function_definition): Use deferred_type_access_control, after
14725         we've started the function.  Set type_lookups to error_mark_node.
14726         * parse.y (frob_specs, fn.def1): Adjust.
14727         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
14728         (parse_end_decl, parse_bitfield0, parse_method): New fns.
14729         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
14730         (after_type_component_declarator0): Likewise.
14731         (after_type_component_declarator): Likewise.
14732         (notype_component_declarator): Likewise.
14733         * cp-tree.h: Adjust.
14734
14735         * decl.c (redeclaration_error_message): Allow redeclaration of
14736         namespace-scope decls.
14737
14738 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
14739
14740         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
14741
14742 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
14743
14744         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
14745         * decl2.c (grokclassfn): Likewise.
14746
14747         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
14748
14749         * decl2.c (lang_decode_option): Don't set default message length
14750         here.
14751         * lex.c (lang_init_options): Set it here.
14752
14753 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
14754
14755         Make DECL_CONTEXT mean the class in which a member function was
14756         declared, even for a virtual function.
14757         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
14758         (DECL_FRIEND_CONTEXT): New macro.
14759         (DECL_REAL_CONTEXT): Remove.
14760         (SET_DECL_FRIEND_CONTEXT): Likewise.
14761         (DECL_VIRTUAL_CONTEXT): Adjust.
14762         (DECL_CLASS_SCOPE_P): Use TYPE_P.
14763         (add_friends): Remove.
14764         (hack_decl_function_context): Likewise.
14765         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
14766         CP_DECL_CONTEXT.
14767         (build_over_call): Fix indentation.  Use DECL_CONTEXT
14768         instead of DECL_CLASS_CONTEXT.
14769         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
14770         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
14771         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14772         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
14773         (build_base_field): Likewise.
14774         (finish_struct_1): Likewise.
14775         (build_self_reference): Likewise.
14776         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
14777         DECL_REAL_CONTEXT.
14778         (pushtag): Use decl_function_context, not
14779         hack_decl_function_context.
14780         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
14781         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
14782         (pushdecl): Remove bogus code.
14783         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
14784         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
14785         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14786         Use decl_function_context, nothack_decl_function_context.
14787         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
14788         (grokdeclarator): Likewise.  Use decl_function_context, not
14789         hack_decl_function_context.
14790         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
14791         (start_function): Use DECL_FRIEND_CONTEXT, not
14792         DECL_CLASS_CONTEXT.  Use decl_function_context, not
14793         hack_decl_function_context.
14794         (finish_function): Use decl_function_context, not
14795         hack_decl_function_context.
14796         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
14797         DECL_CLASS_CONTEXT.
14798         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
14799         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
14800         (grokfield): Likewise.
14801         (finish_builtin_type): Likewise.
14802         (finish_vtable_vardec): Use decl_function_context, not
14803         hack_decl_function_context.
14804         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14805         (start_static_initialization_or_destruction): Likewise.
14806         (finish_static_initialization_or_destruction): Likewise.
14807         (mark_used): Adjust logic for deciding when to synthesize methods.
14808         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
14809         DECL_REAL_CONTEXT.
14810         * error.c (dump_function_decl): Use DECL_CONTEXT, not
14811         DECL_CLASS_CONTEXT.
14812         * friend.c (is_friend): Likewise.
14813         (add_friends): Remove.
14814         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
14815         * lex.c (begin_definition_of_inclass_inline): Use
14816         decl_function_context, not hack_decl_function_context.
14817         (process_next_inline): Likewise.
14818         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
14819         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
14820         DECL_CLASSS_CONTEXT.
14821         (hack_identifier): Likewise.
14822         (synthesize_method):  Use decl_function_context, not
14823         hack_decl_function_context.
14824         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
14825         DECL_REAL_CONTEXT.
14826         (is_member_template): Use decl_function_context, not
14827         hack_decl_function_context.  Use DECL_CONTEXT, not
14828         DECL_CLASS_CONTEXT.
14829         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
14830         DECL_CLASS_CONTEXT.
14831         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
14832         DECL_REAL_CONTEXT.
14833         (push_template_decl_real): Likewise.
14834         (instantiate_class_template): Don't call add_friends.
14835         (tsubst_default_argument): Use DECL_CONTEXT, not
14836         DECL_REAL_CONTEXT.
14837         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
14838         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14839         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
14840         DECL_CLASS_CONTEXT.
14841         * repo.c (repo_inline_used): Likewise.
14842         * search.c (current_scope): Adjust for new _CONTEXT macros.
14843         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
14844         DECL_REAL_CONTEXT.
14845         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14846         (lookup_fnfields_here):Likewise.
14847         (check_final_overrider): Likewise.
14848         (init_vbase_pointers): Likewise.
14849         (virtual_context): Likewise.
14850         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
14851         (expand_body): Use decl_function_context, not
14852         hack_decl_function_context.
14853         * tree.c (hack_decl_function_context): Remove.
14854         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
14855         DECL_CLASS_CONTEXT.
14856         * typeck2.c (error_not_base_type): Likewise.
14857
14858 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
14859
14860         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
14861
14862 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14863
14864         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
14865
14866 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
14867
14868         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
14869
14870 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
14871
14872         * decl2.c (lang_decode_option): Enable automatic line wrapping.
14873
14874 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
14875
14876         * parse.y (frob_specs): Split out...
14877         (parse_decl): From here.
14878         (fn.def2): Call initial_deferred_type_access_control.
14879         (after_type_component_declarator0): Call frob_specs.
14880         (notype_component_declarator0): Likewise.
14881         * search.c (friend_accessible_p): Nested classes are friends of their
14882         enclosing classes.
14883
14884 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
14885
14886         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
14887         used to create an implicit temporary.
14888
14889         * class.c (dfs_modify_vtables): Tweak calculation of functions to
14890         override.
14891
14892 2000-02-08  Nathan Sidwell  <nathan@acm.org>
14893
14894         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
14895         strip array element qualifiers too.
14896
14897 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
14898
14899         * decl.c (store_parm_decls): Don't build cleanups for parameters
14900         while processing_template_decl.
14901
14902 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
14903
14904         * cp-tree.h (struct saved_scope): Add incomplete field.
14905         (namespace_scope_incomplete): New macro.
14906         * decl.c (pushdecl): Use it.
14907         (hack_incomplete_structures): Use it.  See through artificial
14908         binding levels.
14909         (mark_saved_scope): Mark it.
14910
14911         Implement access control for nested types.
14912         * search.c (type_access_control): New fn.
14913         (accessible_p): Now we do perform access control for types.
14914         * semantics.c (deferred_type_access_control): New fn.
14915         (initial_deferred_type_access_control): New fn.
14916         (begin_function_definition): Call it.  Add lookups parm.
14917         * decl.c (struct binding_level): Add this_class field.
14918         (pushlevel_class): Set it.
14919         (mark_binding_level): Mark it.
14920         (lookup_name_real): Use it.  Call type_access_control.
14921         (mark_saved_scope): Mark lookups field.
14922         * cp-tree.h (flagged_type_tree): Add lookups field.
14923         (struct saved_scope): Add lookups field.
14924         (type_lookups): New macro.
14925         * parse.y (declmods): Now <ftype>.
14926         (parse_decl): Add lookups parm.  Call
14927         initial_deferred_type_access_control.
14928         (lang_extdef): Clear type_lookups.
14929         (typed_declspecs, declmods, typespec): Set lookups field.
14930         (initdcl): Call deferred_type_access_control.
14931         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
14932         component_decl_1, named_parm): Adjust.
14933         * friend.c (is_friend): Nested classes are friends of their
14934         enclosing classes.
14935
14936         * class.c (currently_open_derived_class): New fn.
14937         * method.c (hack_identifier): Use it.
14938
14939         * lex.c (do_identifier): Remove obsolete code.
14940
14941         * parse.y (typed_typespecs): Propagate new_type_flag properly.
14942
14943 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
14944
14945         * tinfo.h: Remove apostrophes from C++ comment (xgettext
14946         thinks this file is plain C).
14947
14948 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14949
14950         * Makefile.in (call.o): Depend on $(EXPR_H).
14951
14952         * call.c: Include "expr.h".
14953
14954         * class.c (dump_class_hierarchy): Add prototype.
14955
14956         * search.c (dfs_get_pure_virtuals): Likewise.
14957
14958 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
14959
14960         * parse.y (simple_stmt): Allow :: token in asm parameter list.
14961         * parse.c: Rebuilt.
14962
14963 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
14964
14965         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
14966         Store it in DECL_FCONTEXT.
14967         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
14968
14969 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
14970
14971         * tinfo.h (old abi): #include "tconfig.h".
14972         * tinfo.cc (convert_to_base): Move into old abi section.
14973
14974 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
14975
14976         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
14977         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
14978         (BINFO_PRIMARY_BINFO): New macro.
14979         (BF_DELTA): Rename to ...
14980         (BV_DELTA): ... this.
14981         (BF_VCALL_INDEX): Rename to ...
14982         (BV_VCALL_INDEX): ... this.
14983         (BF_FN): Rename to ...
14984         (BV_FN): ... this.
14985         * class.c (build_vbase_path): Adjust for changes to reverse_path.
14986         (set_rtti_entry): Rename BF_ macros to BV_ variants.
14987         (modify_vtable_entry): Simplify.
14988         (add_virtual_function): Rename BF_ macros to BV_ variants.
14989         (build_vtable_initializer): Likewise.
14990         (get_class_offset_1): Remove.
14991         (dfs_get_class_offset): Likewise.
14992         (get_class_offset): Likewise.
14993         (dfs_find_final_overrider): New function.
14994         (find_final_overrider): Likewise.
14995         (modify_one_vtable): Remove.
14996         (dfs_find_base): New function.
14997         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
14998         find_final_overrider.
14999         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
15000         virtuals.
15001         (dfs_fixup_vtable_deltas): Remove.
15002         (override_one_vtable): Remove.
15003         (merge_overrides): Likewise.
15004         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
15005         unreal chilren of virtual bases.
15006         (finish_struct_1): Don't use merge_overrides.  Don't use
15007         dfs_fixup_vtable_deltas.
15008         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
15009         BINFOs.
15010
15011 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
15012             Jason Merrill  <jason@yorick.cygnus.com>
15013
15014         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
15015
15016 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
15017
15018         * exception.cc (__throw_bad_typeid): Add missing std::.
15019
15020 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15021
15022         * cp-tree.h (make_thunk): PROTO -> PARAMS.
15023
15024 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
15025
15026         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
15027
15028         Runtime support for new-abi rtti.
15029         * inc/typeinfo (type_info::operator!=): Define in class.
15030         (type_info::before, type_info::name, type_info::operator==,
15031         type_info::operator!=): Define new ABI implementations.
15032         (type_info::is_pointer_p, type_info::is_function_p): Declare
15033         new virtual functions.
15034         (type_info::do_catch, type_info::do_upcast): Likewise.
15035
15036         * tinfo.h (__base_class_info): Define new class.
15037         (__class_type_info): Likewise.
15038         (__si_class_type_info): Likewise.
15039         (__vmi_class_type_info): Likewise.
15040         (__dynamic_cast): Prototype.
15041
15042         * tinfo.cc: Conditionalize old and new rtti mechanisms.
15043         (type_info::is_pointer_p): Define new function.
15044         (type_info::is_function_p): Likewise.
15045         (type_info::do_catch): Likewise.
15046         (type_info::do_upcast): Likewise.
15047         (vtable_prefix): New structure for vtable access.
15048         (adjust_pointer): Define new template function.
15049         (contained_p, public_p, virtual_p, contained_public_p,
15050         contained_nonpublic_p, contained_nonvirtual_p): Define new
15051         functions.
15052         (nonvirtual_base_type): New local variable.
15053         (__class_type_info::~__class_type_info): Define.
15054         (__si_class_type_info::~__si_class_type_info): Likewise.
15055         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
15056         (__class_type_info::do_catch): Define new function.
15057         (__class_type_info::do_upcast): Likewise.
15058         (__class_type_info::find_public_src): Likewise.
15059         (__class_type_info::do_find_public_src): Likewise.
15060         (__si_class_type_info::do_find_public_src): Likewise.
15061         (__vmi_class_type_info::do_find_public_src): Likewise.
15062         (__class_type_info::do_dyncast): Likewise.
15063         (__si_class_type_info::do_dyncast): Likewise.
15064         (__vmi_class_type_info::do_dyncast): Likewise.
15065         (__class_type_info::do_upcast): Likewise.
15066         (__si_class_type_info::do_upcast): Likewise.
15067         (__vmi_class_type_info::do_upcast): Likewise.
15068         (__dynamic_cast): Likewise.
15069
15070         * tinfo2.cc (__fundamental_type_info): Define new class.
15071         (__pointer_type_info): Likewise.
15072         (__reference_type_info): Likewise.
15073         (__array_type_info): Likewise.
15074         (__function_type_info): Likewise.
15075         (__enum_type_info): Likewise.
15076         (__ptr_to_member_type_info): Likewise.
15077         (__fundamental_type_info::~__fundamental_type_info): Define.
15078         (__pointer_type_info::~__pointer_type_info): Likewise.
15079         (__reference_type_info::~__reference_type_info): Likewise.
15080         (__array_type_info::~__array_type_info): Likewise.
15081         (__function_type_info::~__function_type_info): Likewise.
15082         (__enum_type_info::~__enum_type_info): Likewise.
15083         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
15084         (__pointer_type_info::do_catch): Define new function.
15085         (__ptr_to_member_type_info::do_catch): Define new function.
15086
15087         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
15088         (__is_pointer): Likewise.
15089
15090         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
15091
15092 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
15093
15094         * cp/class.c (build_vtable): Rename to build_primary_vtable.
15095         (prepare_fresh_vtable): Rename to build_secondary_vtable.
15096         (make_new_vtable): New function.
15097         (modify_vtable_entry): Handle generation of new vtables correctly.
15098         (modify_one_vtable): Remove unused parameter.
15099         (dfs_fixup_vtable_deltas): Likewise.
15100         (override_one_vtable): Use build_secondary_vtable.
15101         (finish_struct_1): Use build_primary_vtable and
15102         build_secondary_vtable.
15103
15104 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
15105
15106         * cp/decl.c: Adjust variable names, comments, help strings.
15107
15108 2000-01-29  Nathan Sidwell  <nathan@acm.org>
15109
15110         * new2.cc (operator delete[]): Use operator delete, don't assume
15111         implementation.
15112
15113 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
15114
15115         * class.c (build_vtbl_initializer): Add argument to
15116         build_vtable_entry call.
15117
15118 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
15119
15120         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
15121         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
15122         (BF_DELTA): New macro.
15123         (BF_VCALL_INDEX): Likewise.
15124         (BF_FN): Likewise.
15125         (THUNK_VCALL_OFFSET): Likewise.
15126         (make_thunk): Change prototype.
15127         * class.c (build_vtable_entry): Integrate
15128         build_vtable_entry_for_fn.  Handle vcall indices.
15129         (build_vtable_entry_for_fn): Remove.
15130         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
15131         BF_VCALL_INDEX, BF_FN.
15132         (modify_vtable_entry): Integrate common code from
15133         modify_one_vtable and dfs_fixup_vtable_deltas.
15134         (add_virtual_function): Set BF_VCALL_INDEX.
15135         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
15136         and BF_FN.
15137         (modify_one_vtable): Simplify.
15138         (dfs_fixup_vtable_deltas): Likewise.
15139         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
15140         * method.c (make_thunk): Handle vcall indices.
15141
15142 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
15143
15144         Compiler side new abi rtti (not enabled).
15145         * cp-tree.h (new_abi_rtti_p): New macro.
15146         (emit_support_tinfos): Prototype new function.
15147         (tinfo_decl_p): Likewise.
15148         (emit_tinfo_decl): Likwise.
15149         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
15150         macros.
15151         (doing_runtime): New local static.
15152         (init_rtti_processing): Add new-abi initializer.
15153         (get_tinfo_decl): Add new-abi logic.
15154         (tinfo_from_decl): Likewise.
15155         (build_dynamic_cast_1): Likewise.
15156         (qualifier_flags): New static function.
15157         (tinfo_base_init): Likewise.
15158         (generic_initializer): Likewise.
15159         (ptr_ref_initializer): Likewise.
15160         (ptmd_initializer): Likewise.
15161         (class_hint_flags): Likewise.
15162         (class_initializer): Likewise.
15163         (synthesize_tinfo_var): Likewise.
15164         (create_real_tinfo_var): Likewise.
15165         (create_pseudo_type_info): Likewise.
15166         (get_vmi_pseudo_type_info): Likewise.
15167         (create_tinfo_types): Likewise.
15168         (emit_support_tinfos): New global function.
15169         (tinfo_decl_p): New global predicate.
15170         (emit_tinfo_decl): New global function.
15171         * class.c (set_rtti_entry): Generalize for old and new rtti.
15172         (build_vtbl_initializer): Likewise.
15173         * decl2.c (finish_file): Likewise.
15174
15175 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
15176
15177         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
15178         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
15179
15180 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
15181
15182         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
15183         for scopes.
15184
15185 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
15186
15187         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
15188
15189 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
15190
15191         * optimize.c (calls_setjmp_r): Supply new argument
15192         to special_function_p.
15193
15194 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15195
15196         * call.c: PROTO -> PARAMS.
15197         * class.c: Likewise.
15198         * cp-tree.h: Likewise.
15199         * cvt.c: Likewise.
15200         * decl.c: Likewise.
15201         * decl.h: Likewise.
15202         * decl2.c: Likewise.
15203         * dump.c: Likewise.
15204         * errfn.c: Likewise.
15205         * error.c: Likewise.
15206         * except.c: Likewise.
15207         * expr.c: Likewise.
15208         * init.c: Likewise.
15209         * input.c: Likewise.
15210         * lex.c: Likewise.
15211         * lex.h: Likewise.
15212         * method.c: Likewise.
15213         * optimize.c: Likewise.
15214         * parse.y: Likewise.
15215         * pt.c: Likewise.
15216         * repo.c: Likewise.
15217         * rtti.c: Likewise.
15218         * search.c: Likewise.
15219         * semantics.c: Likewise.
15220         * spew.c: Likewise.
15221         * tree.c: Likewise.
15222         * typeck.c: Likewise.
15223         * typeck2.c: Likewise.
15224         * xref.c: Likewise.
15225
15226 2000-01-25  Richard Henderson  <rth@cygnus.com>
15227
15228         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
15229
15230 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
15231
15232         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
15233         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
15234         (struct vcall_offset_data_s): New type.
15235         (dfs_vcall_offset_queue_p): New function.
15236         (dfs_build_vcall_offset_vtbl_entries): Likewise.
15237         (build_vcall_offset_vtbl_entries): Likewise.
15238         (layout_vtable_decl): Likewise.
15239         (num_vfun_entries): Likewise.
15240         (num_extra_vtbl_entries): Add the entries for vcall offsets.
15241         (build_vtbl_initializer): Likewise.
15242         (dfs_finish_vtabls): Use layout_vtable_decl.
15243         (modify_one_vtables): Always duplicate vtables under the new ABI.
15244         (finish_struct_1): Use layout_vtable_decl.
15245
15246 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15247
15248         * decl.c (member_function_or_else): Change third arg from a format
15249         specifier to an `enum overload_flags'.  Callers changed.
15250
15251 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15252
15253         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
15254         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
15255         build_const_cast, get_delta_difference, check_return_expr): Avoid
15256         ANSI string concatenation usage.
15257
15258 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
15259
15260         * class.c (layout_class_type): Put the fields required to make a
15261         class non-empty at the end, not the beginning, of the TYPE_FIELDs
15262         list.
15263
15264 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
15265
15266         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
15267         template.
15268
15269         * decl2.c (mark_used): Do instantiate inlines that have been
15270         explicitly instantiated.
15271
15272 2000-01-24  Richard Henderson  <rth@cygnus.com>
15273
15274         * call.c (build_over_call): Use expand_tree_builtin.
15275         * typeck.c (build_function_call_real): Likewise.
15276         (build_binary_op_nodefault): Handle unordered compares.
15277
15278 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
15279
15280         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
15281         cp_tree_index values.
15282         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
15283         New global node #defines for them.
15284         * rtti.c (call_void_fn): Replace with ...
15285         (build_runtime_decl): ... new static function.
15286         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
15287         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
15288         (build_dynamic_cast_1): Always produce correctly typed result.
15289         Explicitly produce type_info addresses. Use dynamic_cast_node.
15290         * exception.cc (__throw_bad_cast): Return `void *'.
15291         (__throw_bad_typeid): Return `const type_info &'.
15292
15293 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
15294
15295         * cp-tree.h (get_vtable_decl): Prototype new function.
15296         * class.c (get_vtable_decl): New function. Broken out from ...
15297         (build_vtable): ... here. Use it.
15298         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
15299         by get_vtable_decl.
15300
15301 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
15302
15303         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
15304         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
15305         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
15306         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
15307         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
15308         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
15309         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
15310         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
15311         (CPTI_TINFO_VAR_ID): New enumeration.
15312         (__tp_desc_type_node, __access_mode_type_node,
15313         __bltn_desc_type_node, __user_desc_type_node,
15314         __class_desc_type_node, __ptr_desc_type_node,
15315         __attr_desc_type_node, __func_desc_type_node,
15316         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
15317         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
15318         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
15319         enum_desc_type_node, class_desc_type_node,
15320         si_class_desc_type_node, vmi_class_desc_type_node,
15321         ptmd_desc_type_node, base_desc_type_node): New #defines.
15322         (tinfo_fn_id, tinfo_fn_type): Rename to ...
15323         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
15324         (tinfo_var_id): New enumeration.
15325         (DECL_TINFO_FN_P): Augment comment.
15326         * decl.c (cp_global_trees): Adjust documentation.
15327         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
15328         tinfo_decl_type and tinfo_var_id.
15329         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
15330         (build_typeid): Remove unused variable.
15331         (get_tinfo_var): Use tinfo_var_id.
15332         (tinfo_name): New static function.
15333         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
15334         (tinfo_from_decl): Likewise.
15335         (get_base_offset): New static function, broken out of
15336         expand_class_desc.
15337         (expand_si_desc): Use tinfo_name.
15338         (expand_class_desc): Likewise. Lose local static variable.
15339         Use base_desc_type_node. Use get_base_offset.
15340         (expand_ptr_desc): Use tinfo_name.
15341         (expand_attr_desc): Likewise.
15342         (expand_generic_desc): Likewise.
15343
15344         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
15345         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
15346
15347 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
15348
15349         * cp-tree.h (__eprintf): Remove declaration.
15350         * tree.c (__eprintf): Remove definition.
15351
15352 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
15353             Mark Mitchell  <mark@codesourcery.com>
15354
15355         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
15356         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
15357
15358 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
15359
15360         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
15361
15362 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
15363
15364         * cp-tree.h (register_dtor_fn): New function.
15365         * decl.c (destroy_local_static): Rename to ...
15366         (register_dtor_fn): ... this.  Give it external linkage.
15367         (expand_static_init): Use it.
15368         * decl2.c (do_static_initialization): Likewise, if using
15369         __cxa_atexit.
15370         (do_static_destruction): Check that __cxa_atexit is not in use.
15371         (finish_file): Don't call do_static_destruction if using
15372         __cxa_atexit.
15373
15374         * typeck.c (convert_arguments): Restore two-message error
15375         reporting.
15376
15377 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
15378
15379         Remap dynamic cast hint values to be consistent across ABIs.
15380         * search.c (dynamic_cast_base_recurse): Remap generated value.
15381         (get_dynamic_cast_base_type): Adjust documentation.
15382         * tinfo.h (__user_type_info::dyncast): Likewise.
15383         (__user_type_info::find_public_subobj): Remap BOFF meaning.
15384         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
15385         (__class_type_info::do_dyncast): Likewise.
15386         (__class_type_info::do_find_public_subobj): Likewise.
15387         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
15388
15389 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
15390
15391         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
15392
15393         * typeck2.c (incomplete_type_error): Restore previous
15394         cp_error and cp_error_at call sequence.
15395
15396 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
15397
15398         * class.c (dump_class_hierarchy): Make format agree with argument;
15399         cast pointer to unsigned long and print with %lx.
15400
15401 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
15402
15403         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
15404
15405         * typeck.c (composite_pointer_type, common_type,
15406         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
15407         build_function_call_real, convert_arguments,
15408         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
15409         build_unary_op, mark_addressable, build_compound_expr,
15410         build_static_cast, build_reinterpret_cast, build_const_cast,
15411         build_c_cast, build_modify_expr, get_delta_difference,
15412         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
15413         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
15414         into a single one.
15415         * typeck2.c (readonly_error, abstract_virtuals_error,
15416         process_init_constructor, check_for_new_type): Likewise.
15417
15418 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
15419
15420         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
15421         VAR_DECLs.
15422
15423 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
15424
15425         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
15426         (build_x_typeid): Likewise.
15427         (get_tinfo_fn): Likewise.
15428         (get_tinfo_fn_unused): Rename to ...
15429         (get_tinfo_decl): ... here.
15430         * rtti.c (build_headof): Replace logic error with assertion.
15431         (get_tinfo_fn_dynamic): Rename to ...
15432         (get_tinfo_decl_dynamic): ... here. Make static. Use
15433         complete_type_or_else.
15434         (build_x_typeid): Move into ...
15435         (build_typeid): ... here. Adjust call to
15436         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
15437         throw_bad_typeid expression.
15438         (get_tinfo_fn_unused): Rename to ...
15439         (get_tinfo_decl): ... here. Adjust comment.
15440         (get_tinfo_fn): Delete.
15441         (tinfo_from_decl): New static function.
15442         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
15443         (get_typeid): Use complete_type_or_else.
15444         (build_dynamic_cast_1): Adjust calls to
15445         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
15446         * parse.y (primary): Adjust call to build_typeid.
15447         * except.c (build_eh_type_type_ref): Adjust call to
15448         get_tinfo_decl. Mark as used.
15449         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
15450         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
15451         * parse.c: Regenerated.
15452
15453 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
15454
15455         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
15456         calling convention.
15457         (resolves_to_fixed_type_p): Document calling convention.
15458         * rtti.c (build_x_typeid): Initialize NONNULL.
15459
15460         * cp-tree.h (build_shared_int_cst): New function.
15461         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
15462         * class.c (modify_vtable_entry): Likewise.
15463         (add_virtual_function): Split out code to generated shared
15464         INTEGER_CSTs to build_share_int_cst.
15465         (modify_all_vtables): Handle all the overridden functions here.
15466         Add overridden functions from non-primary virtual bases to the
15467         primary vtable.
15468         (finish_struct_1): Adjust call to modify_all_vtables.  Add
15469         overridden functions from non-primary bases to the vtable.
15470         * tree.c (build_shared_int_cst): New function.
15471
15472         * cp-tree.h (scratchalloc): Remove.
15473         (build_scratch_list): Likewise.
15474         * call.c (convert_class_to_reference): Replace build_scratch_list
15475         and build_expr_list with build_tree_list.
15476         (add_candidate): Replace scratchalloc with expralloc.  Note memory
15477         leak.
15478         (build_user_type_conversion_1):  Replace build_scratch_list
15479         and build_expr_list with build_tree_list.
15480         (build_new_op): Likewise.
15481         (build_op_delete_call): Likewise.
15482         (convert_like): Likewise.
15483         * cvt.c (ocp_convert): Likewise.
15484         * decl.c (start_decl): Likewise.
15485         (start_function): Likewise.
15486         (finish_destructor_body): Likewise.
15487         (maybe_build_cleanup_1): Likewise.
15488         * decl2.c (reparse_decl_as_expr): Likewise.
15489         * init.c (perform_member_init): Likewise.
15490         (expand_cleanup_for_base): Likewise.
15491         (build_builtin_delete_call): Likewise.
15492         (build_new_1): Likewise.
15493         (build_delete): Likewise.
15494         * method.c (do_build_assign_ref): Likewise.
15495         * parse.y (already_scoped_stmt): Likewise.
15496         (nontrivial_exprlist): Likewise.
15497         (net_initializer): Likewise.
15498         (initlist): Likewise.
15499         * parse.c: Regenerated.
15500         * rtti.c (build_x_typeid): Likewise.
15501         (build_dynamic_cast_1): Likewise.
15502         * typeck.c (build_x_compound_expr): Likewise.
15503         (build_static_cast): Likewise.
15504         (build_modify_expr): Likewise.
15505
15506         * cp-tree.h (DECL_VINDEX): Add documentation.
15507         * class.c (build_vtable_entry): Likewise.
15508         (start_vtable): Add comment.
15509         (add_virtual_function): Replace pending_hard_virtuals with
15510         overridden_virtuals and pending_virtuals with new_virtuals.
15511         Replace redundant assignments with assertions.
15512         (check_for_override): Add comment.
15513         (check_bases_and_members): Replace pending_hard_virtuals with
15514         overridden_virtuals and pending_virtuals with new_virtuals.
15515         (create_vtbl_ptr): Likewise.
15516         (layout_class_type): Likewise.
15517         (finish_struct_1): Likewise.  Add comments.
15518
15519 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
15520
15521         * class.c (finish_struct_1): Replace redundant code with
15522         assertions.
15523
15524         * cp-tree.h (flag_new_abi): Move.
15525         (flag_use_cxa_atexit): Likewise.
15526         (flag_honor_std): Likewise.
15527         (flag_rtti): Likewise.
15528         (vbase_offsets_in_vtable_p): Define.
15529         (vptrs_present_everywhere_p): Likewise.
15530         (TYPE_CONTAINS_VPTR_P): Likewise.
15531         (dfs_walk_real): Declare.
15532         * class.c (build_vbase_pointer_fields): Check
15533         vbase_offsets_in_vtable_p.
15534         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
15535         BINFO_VPTR_FIELD.
15536         (build_vbase_offset_vtbl_entries): Simplify.
15537         (build_vbase_offset_vtbl_entries): Adjust.
15538         (build_vbase_pointer): Add ability to look up vbase offsets in
15539         vtable.
15540         (start_vtable): New function.
15541         (add_virtual_function): Use it.
15542         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
15543         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
15544         (build_vtbl_initializer): Take the type of the complete object as
15545         input.  Use it to correctly calculate vbase offsets.
15546         (dfs_finish_vtbls): Pass the complete type to
15547         build_vtbl_initializer.
15548         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
15549         (create_vtable_ptr): Create a vtable even if there are no
15550         new virtual functions, under the new ABI.
15551         (finish_struct_1): Likewise.
15552         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
15553         * decl.c (exapnd_static_init): Remove call to
15554         preserve_initializer.
15555         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
15556         vtables.
15557         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
15558         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
15559         (construct_virtual_bases): Don't initialize virtual base pointers
15560         under the new ABI.
15561         (build_aggr_init): Clean up comment.
15562         (expand_aggr_init_1): Likewise.
15563         * rtti.c (expand_class_desc): Store the virtual function table
15564         index where the vbase offset lives in the offset field.
15565         * search.c (dfs_walk_real): Make it global.
15566         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
15567         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
15568
15569         * tinfo.h (USItype): Make it signed under the new ABI.
15570         * tinfo.cc (convert_to_base): New function.  Encapsulate base
15571         conversion logic here.
15572         (__class_type_info::do_upcast): Use it.
15573         (__class_type_info::do_dyncast): Likewise.
15574         (__class_type_info::do_find_public_subobj): Likewise.
15575
15576         * init.c (construct_virtual_bases): Don't look up the addresses of
15577         virtual bases at run-time.
15578
15579         * class.c (build_vbase_pointer): Relocate.
15580         (build_vbase_pointer_fields): Likewise.
15581         (dfs_build_vbase_offset_vtbl_entries): Likewise.
15582         (build_vbase_offset_vtbl_entries): Likewise.
15583
15584         * decl.c (init_decl_processing): Complain if -fnew-abi
15585         -fno-vtable-thunks is used.
15586
15587         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
15588         flag_new_abi.
15589
15590 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
15591
15592         * cp-tree.h (num_extra_vtbl_entries): New function.
15593         (size_extra_vtbl_entries): Likewise.
15594         (dfs_vtable_path_unmark): Likewise.
15595         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
15596         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
15597         * class.c (num_extra_vtbl_entries): New function.
15598         (size_extra_vtbl_entries): Likewise.
15599         (dfs_build_vbase_offset_vtbl_entries): New function.
15600         (build_vbase_offset_vtbl_entries): Likewise.
15601         (build_vtbl_initializer): Use it.
15602         (finish_struct_1): Adjust vtable sizes (using
15603         num_extra_vtbl_entries).
15604         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
15605         THUNK_DECL is non-NULL before expanding it.
15606         * init.c (expand_virtual_init): Adjust the vtable pointer by
15607         size_extra_vtbl_entries before storing it.
15608         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
15609         Handle TREE_LIST parameters here, not in the dfs_* functions.
15610         (dfs_unmarked_real_bases_queue_p): Adjust.
15611         (dfs_marked_real_bases_queue_p): Likewise.
15612         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
15613         (dfs_vtable_path_marked_real_bases_queue_p): New function.
15614         (dfs_vtable_path_unmark): Likewise.
15615
15616 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
15617
15618         * optimize.c (copy_body_r): Clear the operand three of a
15619         TARGET_EXPR when copying it.
15620
15621 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15622
15623         * method.c (build_decl_overload_real): Check whether we are in ::
15624         before returning __builtin_new/delete.
15625
15626 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
15627
15628         * pt.c (tsubst_friend_function): Improve comment.
15629         (instantiate_decl): Avoid crashing when a "nested" function is
15630         instantiated from the top level.
15631
15632         * dump.c (dqeueue_and_dump): Dump
15633         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
15634
15635 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15636
15637         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
15638
15639 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
15640
15641         * g++spec.c (lang_specific_driver): Add -fnew-abi if
15642         ENABLE_NEW_GXX_ABI defined.
15643         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
15644         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
15645         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
15646
15647 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
15648
15649         * decl.c (start_cleanup_fn): Call pushdecl.
15650
15651         * call.c (convert_class_to_reference): Fix typos.
15652         (build_conditional_expr): Handle errors gracefully.
15653         * class.c (push_nested_class): Likewise.
15654         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
15655         (DECL_THIS_EXTERN): Use it.
15656         (DECL_THIS_STATIC): Likewise.
15657         * cvt.c (convert_to_void): Handle errors gracefully.
15658         (build_expr_type_conversion): Likewise.
15659         * decl.c (maybe_push_decl): Likewise.
15660         (start_decl_1): Likewise.
15661         (require_complete_types_for_parms): Likewise.
15662         * parse.y (structsp): Likewise.
15663         (base_class): Likewise.
15664         * parse.c: Regenerated.
15665         * pt.c (finish_member_template_decl): Likewise.
15666         * typeck.c (decay_conversion): Likewise.
15667
15668         * cp-tree.h (dfs_skip_vbases): New function.
15669         (find_vbase_instance): Likewise.
15670         * class.c (determine_primary_base): Allow a nearly empty base to
15671         serve as a primary base class under the new ABI.
15672         (get_class_offset_1): Rename to ...
15673         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
15674         messages here.
15675         (get_class_offset): Use it.  Issue error messages here.
15676         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
15677         find the right copies of virtual bases.
15678         (fixup_vtable_deltas1): Rename to ...
15679         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
15680         bases as primary bases.
15681         (fixup_vtable_deltas): Remove.
15682         (override_one_vtable): Handle virtual bases as primary bases.
15683         (merge_overrides): Likewise.
15684         (finish_struct_1): Likewise.
15685         (dump_class_hierarchy): Dump primary-ness of bases as well.
15686         * search.c (mark_primary_bases): Use a pre-order traversal to
15687         handle primary virtual bases.
15688         (dfs_skip_vbases): New fiunction.
15689         (expand_upcast_fixups): Adjust to handle primary virtual bases.
15690         (fixup_virtual_upcast_offsets): Likewise.
15691         (fixup_all_virtual_upcast_offsets): Likewise.
15692         (dfs_find_vbase_instances): New function.
15693         (find_vbase_instance): Likewise.
15694
15695 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
15696
15697         * lex.c (DIR_SEPARATOR): Delete macro.
15698
15699 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
15700
15701        * decl2.c (lang_decode_option): Handle automatic line wrapping
15702        option.
15703
15704 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
15705
15706         * friend.c (do_friend): Don't resolve scopes when processing
15707         template declarations, even if the qualifying scope doesn't
15708         involve template parameters.
15709
15710 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
15711
15712         * class.c (dfs_modify_vtables_queue_p): Remove.
15713         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
15714         and dfs_marked_real_bases_queue_p instead of
15715         dfs_modify_vtables_queue_p.
15716
15717         * class.c (build_vbase_path): Simplify.
15718         (dfs_propagate_binfo_offsets): New function.
15719         (propagate_binfo_offsets): Use it.
15720         (remove_base_field): Simplify.
15721         (dfs_set_offset_for_vbases): Remove.
15722         (dfs_set_offset_for_shared_vbases): New function.
15723         (dfs_set_offset_for_unshared_vbases): Likewise.
15724         (layout_virtual_bases): Use them.
15725         (layout_basetypes): Don't call propagate_binfo_offsets.
15726         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
15727         for the vbases.
15728
15729         * class.c (build_base_field): New function, split out from ...
15730         (build_base_fields): ... here.  Use it.  Allocate primary bases
15731         first, under the new ABI.
15732         (get_vtable_entry): Remove.
15733         (remove_base_field): New function, split out from ...
15734         (remove_base_fields): ... here.  Adjust since primary bases come
15735         first under the new ABI.
15736
15737         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
15738         (initialize_vtbl_ptrs): New function.
15739         (expand_indirect_vtbls_init): Change prototype.
15740         (convert_pointer_to_vbase): Declare.
15741         * init.c (expand_direct_vtbls_init): Remove.
15742         (dfs_initialize_vtbl_ptrs): New function.
15743         (initialize_vtbl_ptrs): Likewise.
15744         (emit_base_init): Use initialize_vtbl_ptrs.
15745         * search.c (convert_pointer_to_vbase): Make it global.
15746         (expand_indirect_vtbls_init): Remove vtable initialization code.
15747         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
15748
15749         * class.c (dfs_finish_vtbls): New function.
15750         (finish_vtbls): Use it.
15751         (dump_class_hierarchy): New function.
15752
15753         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
15754         (BINFO_VBASE_PRIMARY_P): New macro.
15755         (BINFO_VIRTUALS): Add to documentation.
15756         (SET_BINFO_PRIMARY_MARKED_P): Remove.
15757         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
15758         (dfs_mark_primary_bases_queue_p): Likewise.
15759         (dfs_unmarked_real_bases_queue_p): New function.
15760         (dfs_marked_real_bases_queue_p): Likewise.
15761         * search.c (dfs_mark_primary_bases): Adjust.
15762         (mark_primary_bases): Likewise.
15763         (get_shared_vbase_if_not_primary): New function.
15764         (dfs_unmarked_real_bases_queue_p): Likewise.
15765         (dfs_marked_real_bases_queue_p): Likewise.
15766         (dfs_get_pure_virtuals): Simplify.
15767         (get_pure_virtuals): Likewise.
15768
15769 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15770
15771         * lex.c: Include tm_p.h.
15772
15773 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
15774
15775         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
15776
15777 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
15778
15779         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
15780         * pt.c (instantiate_decl): Defer comdat templates that might not be
15781         needed.
15782
15783         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
15784         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
15785         (finish_file): Likewise.
15786
15787         * decl2.c (import_export_class): Undo 12/14 change.
15788
15789         * error.c (dump_decl): operator new, not operatornew.
15790
15791         * class.c (field_decl_cmp): A nontype is "greater" than a type.
15792         * search.c (lookup_field_1): Look for the last field with the
15793         desired name.
15794
15795 2000-01-05  Nathan Sidwell  <nathan@acm.org>
15796
15797         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
15798         FUNCTION_DECL.
15799
15800 2000-01-05  Nathan Sidwell  <nathan@acm.org>
15801
15802         * typeck.c (build_static_cast): Don't strip target qualifiers
15803         when casting from a class.
15804
15805 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15806
15807         * class.c (warn_hidden): Initialize variable `fndecl'.
15808
15809 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
15810
15811         * decl.c (flag_isoc9x): New variable to be able to use code in
15812         c-common.c.  For now always zero.
15813
15814 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
15815
15816         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
15817         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
15818         or unshare_base_binfos for virtual bases here.
15819         * search.c (dfs_get_vbase_types): Do it here.
15820         (get_vbase_types): Adjust.
15821
15822 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
15823
15824         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
15825         (BINFO_PRIMARY_MARKED_P): Use flag 5.
15826         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
15827         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
15828         (unmark_primary_bases): Remove declaration.
15829         (unmarkedp): Declare.
15830         (dfs_vbase_unmark): Likewise.
15831         * class.c (determine_primary_base): Return immediately if there
15832         are no base classes.  Call mark_primary_bases here.
15833         (modify_all_direct_vtables): Remove.
15834         (modify_all_indirect_vtables): Remove.
15835         (dfs_modify_vtables_queue_p): New function.
15836         (dfs_modify_vtables): New function.
15837         (modify_all_vtables): Use them.
15838         (build_base_fields): Build FIELD_DECLs for primary virtual base
15839         classes.
15840         (create_vtable_ptr): Don't call determine_primary_base here.
15841         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
15842         (dfs_set_offset_for_vbases): ... this.
15843         (layout_virtual_bases): Use it.
15844         (layout_class_type): Call determine_primary_base here.
15845         * search.c (unmarkedp): Make it global.
15846         (shared_marked_p): Simplify.
15847         (shared_unmarked_p): Likewise.
15848         (dfs_primary_bases_queue_p): Remove.
15849         (dfs_unmark_primary_bases): Likewise.
15850         (unmark_primary_bases): Likewise.
15851         (mark_primary_bases): Simplify.
15852         (get_pure_virtuals): Don't call mark_primary_bases here.
15853         (dfs_vbase_unmark): New function.
15854         (get_vbase_types): Simplify.
15855
15856         * class.c (struct base_info): Remove.
15857         (determine_primary_base): Take has_virtual_p rather than a
15858         base_info as input.  Don't calculate max_has_virtual.
15859         (finish_struct_bits): Remove max_has_virtual argument.
15860         (create_vtable_ptr): Remove max_has_virtual_p argument.
15861         (layout_virtual_bases): Remove max argument.
15862         (layout_basetypes): Likewise.
15863         (layout_class_type): Remove max_has_virtual_p argument.
15864         (finish_struct_1): Remove max_has_virtual.
15865
15866         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
15867         (layout_basetypes): Remove.
15868         * class.c (propagate_binfo_offsets): Moved here from tree.c.
15869         Update to handle primary virtual bases.
15870         (remove_base_fields): New function, split out from
15871         layout_basetypes.
15872         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
15873         (layout_virtual_bases): New function, split out from
15874         layout_basetypes.  Update to handle primary virtual bases.
15875         (layout_basetypes): Moved here from tree.c.  Use
15876         remove_base_fields and layout_virtual_bases.
15877         * search.c (dfs_mark_primary_bases_queue_p): New function.
15878         (mark_primary_bases): Use it.
15879         * tree.c (CEIL): Remove.
15880         (propagate_binfo_offsets): Remove.
15881         (layout_basetypes): Remove.
15882
15883 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
15884
15885         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
15886         (BINFO_PRIMARY_MARKED_P): New macro.
15887         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
15888         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
15889         (mark_primary_bases): New function.
15890         (unmark_primary_bases): Likewise.
15891         * search.c (get_abstract_virtuals_1): Remove.
15892         (dfs_mark_primary_bases): New function.
15893         (mark_primary_bases): Likewise.
15894         (dfs_unmark_primary_bases): Likewise.
15895         (unmark_primary_bases): Likewise.
15896         (dfs_get_pure_virtuals): Likewise.
15897
15898 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
15899
15900         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
15901         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
15902         (modify_one_vtable): Adjust.
15903         (fixup_vtable_deltas1): Likewise.
15904         (override_one_vtable): Likewise.
15905         * search.c (get_abstract_virtuals_1): Likewise.
15906         (get_pure_virtuals): Likewise.
15907         (expand_upcast_fixups): Likewise.
15908         * tree.c (debug_binfo): Likewise.
15909
15910         * class.c (build_vtable): Don't return a value.  Don't rebuild
15911         vtables for bases that have already been handled.
15912         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
15913         already been handled.
15914         (modify_one_vtable): Adjust accordingly.
15915         (fixup_vtable_deltas1): Likewise.
15916         (finish_struct_1): Likewise.
15917
15918 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15919
15920         * call.c (build_new_method_call): Also check destructors.