OSDN Git Service

PR c++/9030
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2
3         PR c++/9030
4         * decl.c (make_typename_type): Check access only when tf_error.
5         (make_unbound_class_template): Likewise.
6         * pt.c (saved_access_scope): New variable.
7         (push_access_scope_real): New function.
8         (push_access_scope): Likewise.
9         (pop_access_scope): Likewise.
10         (tsubst_default_argument): Use them.
11         (instantiate_template): Likewise.
12         (regenerate_decl_from_template): Likewise.
13         (instantiate_decl): Likewise.
14         (get_mostly_instantiated_function_type): Likewise.
15
16 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
17
18         * tree.c: Delete bogus #if 0 code.
19
20 2003-01-07  Andreas Schwab  <schwab@suse.de>
21
22         * class.c (layout_class_type): Don't use
23         PCC_BITFIELD_TYPE_MATTERS if not defined.
24
25 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
26
27         PR c++/9165
28         * decl2.c (build_cleanup): Mark the object as used.
29
30         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
31         (hash_local_specialization): New function.
32         (register_local_specialization): Revert 2003-01-05 change.
33         (instantiate_decl): Use hash_local_specialization when creating
34         the local_specializations table.
35         
36         * decl2.c (mark_used): Do not synthesize thunks.
37
38         * class.c (layout_class_type): Correct handling of unnamed
39         bitfields wider than their types.
40
41         PR c++/9189
42         * parser.c (cp_parser): Remove default_arg_types.  Update
43         documentation for unparsed_functions_queues.
44         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
45         parameter.
46         (cp_parser_new): Don't set parser->default_arg_types.
47         (cp_parser_function_definition): Adjust usage of
48         unparsed_funtions_queues.
49         (cp_parser_class_specifier): Don't mess with
50         parser->default_arg_types.  Handle default argument processing in
51         a separate phase from function body processing.
52         (cp_parser_template_declaration_after_export): Adjust usage of
53         unparsed_functions_queues.
54         (cp_parser_late_parsing_for_member): Do not handle default
55         arguments.
56
57 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
58
59         PR c++/9109
60         * parser.c (cp_parser_declarator_kind): New enum.
61         (cp_parser_declarator): Adjust.
62         (cp_parser_direct_declarator): Adjust. Allow for either named or
63         abstract declarator. Prefer abstract, if possible. Allow
64         parenthesized function name.
65         (cp_parser_condition): Adjust cp_parser_declarator call.
66         (cp_parser_explicit_instantiation): Likewise.
67         (cp_parser_init_declarator): Likewise.
68         (cp_parser_type_id): Likewise.
69         (cp_parser_function_definition): Likewise.
70         (cp_parser_member_declaration): Likewise.
71         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
72         the tentative parsing.
73         (cp_parser_exception_declaration): Likewise.
74
75 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
76
77         * parser.c (cp_parser_template_parameter): Adjust call to
78         cp_parser_parameter_declaration.
79         (cp_parser_parameter_declaration_list): Likewise.
80         (cp_parser_parameter_declaration): Replace
81         greater_than_is_operator_p with template_parm_p parameter.  Do not
82         cache tokens for template default arguments.
83
84         * pt.c (retrieve_local_specialization): Use htab_find, not
85         htab_find_with_hash.
86         (register_local_specialization): Use htab_find_slot, not
87         htab_find_slot_with_hash.
88         (instantiate_decl): Pass a hash function to htab_create.
89         
90 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
91
92         * parser.c (cp_parser_binary_expression,
93         cp_parser_multiplicative_expression,
94         cp_parser_additive_expression, cp_parser_shift_expression,
95         cp_parser_relational_expression, cp_parser_equality_expression,
96         cp_parser_and_expression, cp_parser_exclusive_or_expression,
97         cp_parser_inclusive_or_expression,
98         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
99         cp_parser_binary_expression): Const-ify.
100
101 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
102
103         * method.c (use_thunk): Disable access control while building the
104         body of the thunk.
105
106 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
107
108         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C 
109         front end.
110
111 2003-01-03  Matt Austern  <austern@apple.com>
112
113         * cp-tree.h (struct lang_type_class): add field for key method
114         (cp_global_trees): rename dynamic_classes to keyed_classes
115         (key_method): add definition
116         * class.c (finish_struct_1): compute class's key method, and add
117         the class to keyed_classes list if there is no key method.
118         * decl.c (finish_function): add class to keyed_classes list if we
119         see a definition of the class's key method.
120         * pt.c (instantiate_class_template): add template specialization
121         of a dynamic class to keyed_classes list.
122         * decl2.c (key_method): remove
123         (finish_file): iterate only through keyed_classes list when
124         deciding whether to emit vtables, remove class from its list after
125         we do the emission.
126         
127 2003-01-02  Jason Merrill  <jason@redhat.com>
128
129         * call.c (build_conditional_expr): Stabilize lvalues properly.
130         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
131         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
132         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
133
134         * call.c (convert_like_real): Call decl_constant_value for an
135         IDENTITY_CONV even if there are no more conversions.
136
137         * cvt.c (build_up_reference): Don't push unnamed temps.
138
139         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
140
141         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
142         for a backend struct.
143
144         * except.c (wrap_cleanups_r, build_throw): Make
145         MUST_NOT_THROW_EXPRs void.
146         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
147
148         * init.c (build_vec_delete_1): Pre-evaluate the base address.
149
150         * init.c (get_temp_regvar): Simplify logic.
151
152         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
153         our replacement is a decl.
154
155         * decl.c (cp_make_fname_decl): Push the decls inside the
156         outermost scope.
157
158 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
159
160         PR c++/45, c++/3784
161         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
162         the same too.
163
164 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
165
166         * parser.c (struct cp_parser): Add access_checks_lists field
167         (cp_parser_simple_declaration): Use.
168         (cp_parser_init_declarator): Likewise. 
169
170 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
171
172         * parser.c (cp_parser_declaration): Accept the __extension__
173         keyword before the declaration.
174
175         PR c++/2843
176         * parser.c (cp_parser_parameter_declaration): Allow attributes to
177         appear after the declarator.
178
179         * call.c (build_new_method_call): Fix typo in message format
180         string.
181
182 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
183
184         * parser.c (cp_lexer_next_token_is): Declare it inline.
185         (cp_lexer_set_source_position_from_token): Likewise.
186         (cp_lexer_debugging_p): Likewise.
187         (cp_parser_parsing_tentatively): Likewise.
188         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
189         to the cp_lexer_peek_token.
190
191         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
192         expression.
193
194 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
195
196         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
197         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
198         cp/repo.c: Fix copyright years.
199
200 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
201
202         * lex.c: Remove superfluous include of cpplib.h.
203         (CONSTRAINT): Define without conditions.
204         (init_cp_pragma): Use c_register_pragma.
205
206 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
207
208         * .cvsignore: Remove.
209
210 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
211
212         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
213           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
214           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
215           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
216           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
217           copyright header.
218         * lex.h: parse.y is dead, so don't mention it.  Also replace the
219           copyright header with the default GNU copyright header.
220
221 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
222
223         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
224         (lookup_name_namespace_only): Likewise.
225         (begin_only_namespace_names): Likewise.
226         (end_only_namespace_names): Likewise.
227         * decl.c (only_namespace_names): Remove.
228         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
229         (lookup_name_real): Do not check only_namespace_names.
230         (lookup_name_namespace_only): Remove.
231         (begin_only_namespace_names): Likewise.
232         (end_only_namespace_names): Likewise.
233         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
234         nested-name-specifiers more gracefully.
235         (cp_parser_class_or_namespace_name): Avoid looking up namespace
236         names when they cannot possibly appear.
237         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
238         (cp_parser_elaborated_type_specifier): Likewise.
239         (cp_parser_namespace_name): Only look for namespace names.
240         (cp_parser_lookup_name): Add is_namespace parameter.
241         (cp_parser_lookup_name_simple): Adjust call to
242         cp_parser_lookup_name.
243
244         * parser.c (cp_parser_dependent_type_p): Fix thinko.
245
246 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
247
248         * .cvsignore: Update.
249
250 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
251
252         * class.c (modify_vtable_entry): Remove unused variable.
253         (get_vcall_index): Always expect a non-thunk.
254         (update_vtable_entry_for_fn): Combine covariant adjustments, when
255         overriding a thunk. Pass get_vcall_index a non-thunk.
256
257         * decl2.c (finish_file): Mark undefined inlines as extern.
258
259 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
260
261         * cp-tree.def (RETURN_INIT): Remove.
262         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
263         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
264         (note_level_for_for): Remove.
265         (note_level_for_try): Likewise.
266         (note_level_for_catch): Likewise.
267         (finish_named_return_value): Likewise.
268         (do_pushlevel): Change prototype.
269         (pending_lang_change): Remove.
270         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
271         sk_for.
272         (note_level_for_for): Remove.
273         (note_level_for_try): Likewise.
274         (note_level_for_catch): Likewise.
275         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
276         * parser.c (cp_parser_context_free_list): Make it "deletable".
277         (cp_parser_template_argument): Remove misleading comment.
278         * pt.c (tsubst_expr): Remove RETURN_INIT code.
279         * semantics.c (genrtl_named_return_value): Remove.
280         (do_pushlevel): Take a scope kind as an argument.
281         (begin_if_stmt): Adjust.
282         (begin_while_stmt): Likewise.
283         (begin_for_stmt): Likewise.
284         (finish_for_init_stmt): Likewise.
285         (begin_switch_stmt): Likewise.
286         (begin_handler): Likewise.
287         (begin_compound_stmt): Likewise.
288         (finish_named_return_value): Remove.
289         (cp_expand_stmt): Remove RETURN_INIT case.
290         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
291
292 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
293
294         PR c++/9112
295         * parser.c (cp_parser_direct_declarator): Handle erroneous
296         parenthesized declarators correctly.
297
298 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
299
300         * cp-tree.h (pending_lang_change): Declare.
301
302 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
303
304         * parser.c (cp_parser_context_free_list): New variable.
305         (cp_parser_context_new): Use it.
306         (cp_parser_error): Check return code from
307         cp_parser_simulate_error.
308         (cp_parser_simulate_error): Return a value.
309         (cp_parser_id_expression): Optimize common case.
310         (cp_parser_class_name): Likewise.
311         (cp_parser_class_specifier): Adjust call to
312         cp_parser_late_parsing_default_args.
313         (cp_parser_lookup_name): Optimize common case.
314         (cp_parser_late_parsing_for_member): Adjust call to
315         cp_parser_late_parsing_default_args.
316         (cp_parser_late_parsing_default_args): Add scope parameter.
317         (cp_parser_require): Avoid creating the error message unless it's
318         needed.
319         (cp_parser_parse_definitely): Place free'd contexts on the free
320         list.
321
322         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
323
324 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
325
326         * parser.c (cp_parser_parameter_declaration_clause): Treat system
327         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
328
329 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
330
331         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
332         GCC, not GNU CC.
333
334 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
335
336         * parse.y: Remove.
337         * spew.c: Likewise.
338         * Make-lang.in (gt-cp-spew.h): Remove.
339         * cp-tree.h (do_pending_lang_change): Remove.
340         (do_identifier): Change prototype.
341         (finish_id_expr): Remove.
342         * decl.c (lookup_name_real): Remove yylex variable.
343         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
344         * lex.c (init_cpp_parse): Remove.
345         (reduce_cmp): Likewise.
346         (token_cmp): Likewise.
347         (yychar): Likewise.
348         (lastiddecl): Likewise.
349         (token_count): Likewise.
350         (reduce_count): Likewise.
351         (yyhook): Likewise.
352         (print_parse_statistics): Likewise.
353         (do_pending_lang_change): Likewise.
354         (do_identifier): Remove parsing parameter.
355         * lex.h (lastiddecl): Remove.
356         (looking_for_typename): Remove.
357         (looking_for_template): Likewise.
358         (pending_lang_change): Likewise.
359         (yylex): Likewise.
360         * semantics.c (finish_id_expr): Remove.
361
362         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
363         thread" correctly.
364
365 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
366
367         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
368         end, not the C front end.
369
370 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
371
372         * cp-tree.h (THUNK_TARGET): New macro.
373         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
374         (finish_thunk): Remove offset parms.
375         * class.c (find_final_overrider): Look through thunks.
376         (get_vcall_index): Use THUNK_TARGET.
377         (update_vtable_entry_for_fn): Look through thunks. Set covariant
378         fixed offset here. Adjust finish_thunk call.
379         (build_vtbl_initializer): Adjust finish_thunk calls.
380         * mangle.c (mangle_call_offset): Remove superfluous if.
381         (mangle_thunk): Adjust.
382         * method.c (make_thunk): Adjust.
383         (finish_thunk): Adjust.
384         (thunk_adjust): Remove assert.
385         (use_thunk): Use THUNK_TARGET
386         * dump1.c (cp_dump_tree): Adjust thunk dumping.
387
388         PR c++/9054
389         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
390         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
391
392 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
393
394         Remove traditional C constructs 4/n.
395         * decl2.c (grok_method_quals, warn_if_unknown_interface,
396         grok_x_components, cp_build_parm_decl, build_artificial_parm,
397         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
398         delete_sanity, check_member_template, check_java_method,
399         check_classfn, finish_static_data_member_decl, grokfield,
400         grokbitfield, grokoptypename, grok_function_init,
401         cplus_decl_attributes, constructor_name, defer_fn,
402         build_anon_union_vars, finish_anon_union, coerce_new_type,
403         coerce_delete_type, comdat_linkage, maybe_make_one_only,
404         key_method, import_export_vtable, import_export_class,
405         output_vtable_inherit, import_export_decl, import_export_tinfo,
406         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
407         set_guard, start_objects, finish_objects,
408         start_static_storage_duration_function,
409         finish_static_storage_duration_function, get_priority_info,
410         start_static_initialization_or_destruction,
411         finish_static_initialization_or_destruction,
412         do_static_initialization, do_static_destruction,
413         prune_vars_needing_no_initialization, write_out_vars,
414         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
415         add_using_namespace, merge_functions, ambiguous_decl,
416         lookup_using_namespace, lookup_using_namespace,
417         qualified_lookup_using_namespace, set_decl_namespace,
418         decl_namespace, current_decl_namespace, push_decl_namespace,
419         pop_decl_namespace, push_scope, pop_scope, add_function,
420         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
421         lookup_arg_dependent, do_namespace_alias,
422         validate_nonmember_using_decl, do_nonmember_using_decl,
423         do_toplevel_using_decl, do_local_using_decl,
424         do_class_using_decl, do_using_directive, check_default_args,
425         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
426         * parser.c (cp_parser_class_head): Use booleanss.
427         * decl.c (walk_globals, walk_vtables): Likewise.
428         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
429         walk_globals): Change return type from 'int' to 'bool'.
430         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
431         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
432         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
433         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
434         qualifier_flags, tinfo_base_init, generic_initializer,
435         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
436         dfs_class_hint_unmark, class_hint_flags, class_initializer,
437         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
438         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
439         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
440         * repo.c (repo_compile_flags, repo_template_declared,
441         repo_template_defined, repo_class_defined, repo_get_id,
442         repo_template_used, repo_vtable_used, repo_inline_used,
443         repo_tinfo_used, repo_template_instantiated, extract_string,
444         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
445         finish_repo): Likewise.
446         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
447         cxx_print_xnode): Likewise..
448         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
449         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
450         * cxxfilt.c (demangle_it, print_demangler_list, usage,
451         standard_symbol_characters, hp_symbol_characters, main, fatal):
452         Likewise.
453         (strip_underscore):  Change type from 'int' to 'bool'.
454         (main): Use boolean constants.
455
456 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
457
458         Remove traditional C constructs 3/n.
459         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
460         build_up_reference, warn_ref_binding, convert_to_reference,
461         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
462         convert_to_void, convert, convert_force, build_type_conversion,
463         build_expr_type_conversion, type_promotes_to,
464         perform_qualification_conversions): Use C90 prototyping style.
465         * decl2.c (grok_array_decl): Use boolean constant.
466         (delete_sanity): Likewise.
467         * typeck.c (build_unary_op): Likewise.
468         * semantics.c (finish_switch_cond): Likewise.
469         * parser.c (cp_parser_direct_new_declarator): Likewise.
470         * init.c (build_new): Likewise.
471
472 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
473
474         * Make-lang.in (po-generated): Remove parse.c.
475         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
476         ($(srcdir)/cp/parse.h): Remove target.
477         ($(srcdir)/cp/parse.c): Likewise.
478         (gt-cp-parse.h): Likewise.
479         (gt-cp-parser.h): New target.
480         (c++.distclean): Do not remove parse.output.
481         (c++.maintainer-clean): Do not remove parse.c or parse.h.
482         (cp/spew.o): Remove target.
483         (cp/lex.o): Adjust dependencies.
484         (cp/pt.o): Likewise.
485         (cp/parse.o): Likewise.
486         (cp/TAGS): Do not mention parse.c.
487         (cp/parser.o): New target.
488         * NEWS: Mention the new parser.
489         * call.c (build_scoped_method_call): Simplify.
490         (build_method_call): Likewise.
491         (build_new_function_call): Adjust calls to add_function_candidate
492         and add_template_candidate.
493         (build_new_op): Improve handling of erroroneous operands.
494         (convert_default_arg): Remove circular argument processing.
495         (name_as_c_string): New function.
496         (build_new_method_call): Use it.
497         (perform_implicit_conversion): Use error_operand_p.
498         * class.c (finish_struct_anon): Use constructor_name_p.
499         (check_field_decls): Likewise.
500         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
501         (resolve_address_of_overloaded_function): Likewise.
502         (instantiate_type): Tweak pointer-to-member handling.
503         (get_primary_binfo): Remove incorrect assertion.
504         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
505         * cp-tree.h (DEFARG_TOKENS): New macro.
506         (default_arg): New structure.
507         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
508         (lang_tree_node): Add default_arg.
509         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
510         (type_info_ref_type): New macro.
511         (saved_scope): Make processing_explicit_instantiation a boolean.
512         (check_access): New field.
513         (unparsed_text): Remove.
514         (language_function): Remove unparsed_inlines.
515         (error_operand_p): New macro.
516         (lang_decl): Adjust pending_inline_info.
517         (DEFARG_POINTER): Remove.
518         (tag_types): Add typenames.
519         (lookup_ualified_name): Declare.
520         (lookup_name_real): Likewise.
521         (shadow_tag): Adjust prototype.
522         (get_scope_of_declarator): Declare it.
523         (process_next_inline): Remove it.
524         (check_for_missing_semicolon): Likewise.
525         (maybe_get_template_decl_from_type_decl): Declare it.
526         (finish_label_stmt): Adjust prototype.
527         (finish_non_static_data_meber): Declare it.
528         (finish_pseudo_destructor_call_expr): Rename to ...
529         (finish_pseudo_destructor_expr): ... this.
530         (finish_compound_literal): Declare it.
531         (begin_inline_definitions): Remove it.
532         (init_spew): Remove.
533         (peekyylex): Likewise.
534         (arbitrate_lookup): Likewise.
535         (frob_opname): Likewise.
536         (maybe_snarf_defarg): Likewise.
537         (add_defarg_fn): Likewise.
538         (do_pending_defargs): Likewise.
539         (done_pending_defargs): Likewise.
540         (unprocessed_defarg_fn): Likewise.
541         (replace_defarg): Likewise.
542         (end_input): Likewise.
543         (get_overloaded_fn): Likewise.
544         * cvt.c (convert_to_reference): Improve error handling.
545         * decl.c (lookup_name_real): Do not declare it static.
546         (maybe_push_to_top_level): Set check_access.
547         (identifier_type_value): Adjust call to lookup_name_real.
548         (lookup_qualified_name): New method.
549         (lookup_name_real): Remove special-case parsing code.
550         (lookup_name-nonclass): Adjust call to lookup_name_real.
551         (lookup_name_namespace_only): Likewise.
552         (lookup_name): Likewise.
553         (check_tag_decl): Return the type declared.
554         (shadow_tag): Likewise.
555         (register_dtor_fn): Tweak check_access.
556         (grokfndecl): Use constructor_name_p.
557         (get_scope_of_declarator): New function.
558         (grokdeclarator): Obscure tweaks for slightly different declarator
559         representations.
560         (start_method): Return error_mark_node to indicate failure.
561         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
562         * decl2.c (constructor_name_full): Simplify.
563         (constructor_name): Use it.
564         (build_expr_from_tree): Adjust for changes to do new parser.
565         (push_scope): Improve robustness.
566         (validate_nonmember_using_decl): Process declarations, not names.
567         (do_class_using_decl): Likewise.
568         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
569         here.
570         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
571         * expr.c (cxx_expand_expr): Handle BASELINKs.
572         * init.c (member_init_ok_or_else): Issue more errors.
573         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
574         * lex.c: Do not include parse.h.
575         (yypring): Do not declare.
576         (yylval): Likewise.
577         (make_reference_declarator): Remove error-generating code.
578         (rid_to_yy): Remove.
579         (cxx_init): Do not call init_spew.
580         (yypring): Remove.
581         (check_for_missing_semicolon): Remove.
582         * lex.h (got_scope): Remove.
583         (got_object): Remove.
584         * method.c (hack_identifier): Use finish_non_static_data_member.
585         (implicitly_declare_fn): Adjust use of constructor_name.
586         * parser.c: New file.
587         * pt.c (parse.h): Do not include it.
588         (maybe_get_template_decl_from_template): Do not declare it.
589         (finish_member_template_decl): Tweak.
590         (begin_explicit_instantiation): Adjust for
591         processing_explicit_instantiation being boolean.
592         (end_explicit_instantiation): Likewise.
593         (maybe_process_partial_specialization): Tighten specialization
594         test.
595         (retrieve_local_specialization): Adjust ue of hash table.
596         (eq_local_specializations): New function.
597         (register_local_specialization): Likewise.
598         (push_template_decl_real): Remove unnecessary test.
599         (maybe_get_template_decl_from_type_decl): Don't make it static.
600         (for_each_template_parm_r): Handle TYPEOF_TYPE.
601         (tsubst_copy): Use retrieive_local_specialization to handle
602         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
603         Handle COMPONENT_REFs with pseudo-destructor-expressions.
604         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
605         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
606         (unify): Tweak handling of CONST_DECLs.
607         (regenerate_decl_from_template): Use push_nested_class.
608         (template_for_substitution): New funciton.
609         (instantiate_decl): Use it.  Register parameters as local
610         specializations.
611         * rtti.c (init_rtti_processing): Set type_info_ref_type.
612         (build_typeid): Use it.
613         (get_typeid): Likeise.
614         * search.c (accessible_p): Use check_access, not
615         flag_access_control.
616         (adjust_result_of_qualified_name_lookup): Pay attention to the
617         context_class.
618         * semantics.c (finish_asm_stmt): Adjust error handling.
619         (finish_label_stmt): Return the statement.
620         (finish_non_static_data_member): New function.
621         (finish_class_expr): Handle BASELINKs.
622         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
623         (finish_object_call_expr): Simplify handling during templates.
624         (finish_pseudo_destructor_call_expr): Rename to ...
625         (finish_pseudo_dtor_expr): ... this.
626         (finish_compound_literal): New function.
627         (begin_inline_definitions): Remove.
628         (finish_sizeof): Remove special template handling.
629         * spew.c: Do not include parse.h.
630         * tree.c (get_overloaded_fn): Remove.
631         * typeck.c (build_class_member_access_expr): Handle
632         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
633         (lookup_destructor): New function.
634         (finish_class_member_access_expr): Use it.
635         (convert_arguments): Simplify.
636         (build_unary_op): Handle BASELINKs.
637
638 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
639
640         PR c++/4803
641         * decl2.c (mark_used): Defer inline functions.
642         (finish_file): Merge deferred_fns loops. Check all used
643         inline functions have a definition.
644         * method.c (make_thunk): Thunks are not inline.
645
646         PR c++/5116, c++/764
647         * call.c (build_new_op): Make sure template class operands are
648         instantiated.
649
650 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
651
652         PR C++/7964
653         * cp-tree.h (resolve_scoped_fn_name): Prototype.
654         * call.c (resolve_scoped_fn_name): New function. Deal with
655         more template expansion. Broken out of ...
656         * parse.y (parse_finish_call_expr): ... here. Call it.
657         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
658         resolve_scoped_fn_name and build_call_from_tree.
659
660         PR c++/9053
661         * decl.c (duplicate_decls): Templates may be disambiguated by
662         return type.
663
664         PR c++/8702
665         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
666         conversion operators on failure.
667
668 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
669
670         Remove traditional C constructs 2/n.
671         * call.c (tourney, build_field_call, equal_functions, joust,
672         compare_ics, build_over_call, build_java_interface_fn_ref,
673         convert_like_real, op_error, build_object_call, resolve_args,
674         build_vfield_ref, check_dtor_name, build_scoped_method_call,
675         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
676         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
677         standard_conversion, reference_related_p,
678         reference_compatible_p, convert_class_to_reference,
679         direct_reference_binding, reference_binding,
680         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
681         add_template_conv_candidate, any_viable, any_strictly_viable,
682         build_this, splice_viable, print_z_candidates,
683         build_user_type_conversion, build_new_function_call,
684         conditional_conversion, build_conditional_expr, build_new_op,
685         build_op_delete_call, enforce_access, call_builtin_trap,
686         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
687         convert_default_arg, type_passed_as, convert_for_arg_passing,
688         in_charge_arg_for_name, is_properly_derived_from,
689         maybe_handle_implicit_object, maybe_handle_ref_bind,
690         source_type, add_warning, can_convert, can_convert_arg,
691         perform_implicit_conversion, can_convert_arg_bad,
692         initialize_reference, add_conv_candidate,
693         add_template_candidate_real, add_template_candidate): Ansify.
694
695 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
696
697         PR c++/8572
698         * cp-tree.h (grokoptypename): Add SCOPE parameter.
699         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
700         if in a template scope.
701         * parse.y (unoperator): Return the scope.
702         (operator_name): Adjust grokoptypename call.
703
704 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
705
706         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
707         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
708         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
709
710 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
711
712         * ChangeLog: Fix a typo.
713         * class.c: Fix comment typos.
714         * cp-tree.h: Likewise.
715
716 2002-12-18  Jason Merrill  <jason@redhat.com>
717
718         Handle anonymous unions at the tree level.
719         C++ ABI change: Mangle anonymous unions using the name of their
720         first named field (by depth-first search).  Should not cause
721         binary compatibility problems, though, as the compiler previously
722         didn't emit anything for affected unions.
723         * cp-tree.def (ALIAS_DECL): New tree code.
724         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
725         first field, not the largest.
726         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
727         push the decl, and write it out at namespace scope.
728         * decl.c (lookup_name_real): See through an ALIAS_DECL.
729         (pushdecl): Add namespace bindings for ALIAS_DECLs.
730         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
731         of a decl which doesn't have one.
732         * typeck.c (build_class_member_access_expr): Don't recurse if
733         we already have the type we want.
734
735 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
736
737         PR c++/8099
738         * friend.c (make_friend_class): Allow partial specialization
739         when declaration is not a template friend.
740
741 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
742
743         PR c++/3663
744         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
745         TREE_PROTECTED to created decl nodes.
746
747 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
748
749         * class.c (build_base_field): Do not set DECL_PACKED on the
750         FIELD_DECL.
751
752 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
753
754         * cp-tree.h (struct tree_srcloc): Use location_t.
755         (SOURCE_LOCUS): New.
756         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
757
758 2002-12-17  Jason Merrill  <jason@redhat.com>
759
760         * decl.c (finish_function): Also complain about no return in
761         templates.
762         * semantics.c (finish_return_stmt): Also call check_return_expr in
763         templates.
764         * typeck.c (check_return_expr): In a template, just remember that we
765         saw a return.
766
767 2002-12-16  Jason Merrill  <jason@redhat.com>
768
769         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
770         of the CALL_EXPR.
771
772         * semantics.c (do_pushlevel): Call pushlevel after adding the
773         SCOPE_STMT.
774         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
775         * parse.y (function_body): Go back to using compstmt.
776         * decl.c (pushdecl): Skip another level to get to the parms level.
777
778         * call.c (build_new_method_call): Use is_dummy_object to determine
779         whether or not to evaluate the object parameter to a static member
780         function.
781
782 2002-12-14  Jason Merrill  <jason@redhat.com>
783
784         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
785         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
786         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
787         don't bother with an AGGR_INIT_EXPR.
788         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
789         just generate a new decl normally.  Take return slot parm.
790         * cp-tree.h: Adjust prototype.
791
792 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
793
794         PR C++/8031
795         * cvt.c (convert_to_pointer_force): Don't try comparing against
796         erronous type.
797
798 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
799
800         * cp-tree.h: Have the multiple-include guards around
801         the entire file.
802
803 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
804
805         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
806         for SPEW_DEBUG.
807         (snarf_method): Same.
808         (snarf_defarg): Same.
809
810 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
811
812         PR c++/8372
813         * pt.c (tsubst_copy): Handle destructor names more correctly.
814
815 2002-12-10  Matt Austern   <austern@apple.com>
816
817         * cp-tree.h: get rid of needs_virtual_reinit bit.
818
819 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
820
821         * NEWS: Document removal of in-class initialization extension for
822         static data members of non-arithmetic, non-enumeration type.
823         * decl.c (check_static_variable_definition): Do not allow that
824         extension.
825         * decl2.c (grokfield): Do not call digest_init when processing
826         templates.
827
828 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
829
830         * error.c (dump_expr): Fix format specifier warning.
831
832 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
833
834         * class.c (finish_struct_1): Correct comment.
835         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
836
837 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
838
839         PR C++/8799
840         * error.c (dump_expr): Don't ever try to dump a non-existent
841         expression.
842
843 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
844
845         Implement covariant returns.
846         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
847         (struct lang_decl_flags): Add this_thunk_p flag.
848         Rename vcall_offset to virtual_offset.
849         (struct lang_decl): Rename delta to fixed_offset.
850         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
851         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
852         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
853         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
854         (make_thunk): Add this_adjusting arg.
855         (finish_thunk): Declare.
856         (mangle_thunk): Add this_adjusting arg.
857         * class.c (get_vcall_index): Use base function for lookup.
858         (update_vtable_entry_for_fn): Generate covariant thunk.
859         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
860         (build_vtbl_initializer): Use base function for lookup.
861         Finish covariant thunk here. Adjust thunk generation.
862         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
863         Adjust thunk dumping.
864         * mangle.c (mangle_call_offset): New function.
865         (mangle_thunk): Adjust for covariant thunks.
866         * method.c (make_thunk): Adjust. Do not set name here.
867         (finish_thunk): New function. Set name here.
868         (use_thunk): Generate covariant thunks too.
869         (thunk_adjust): New function.
870         * search.c (covariant_return_p): Remove. Fold into ...
871         (check_final_overrider): ... here. Simplify.
872         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
873
874 2002-12-03  Jason Merrill  <jason@redhat.com>
875
876         PR c++/8674
877         * call.c (build_over_call): Check specifically for TARGET_EXPR
878         when eliding.
879
880         PR c++/8461, c++/8625
881         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
882         (cp_convert_parm_for_inlining): Remove.
883         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
884         Remove.
885         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
886         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
887
888         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
889         an ambiguous conversion.
890
891 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
892
893         PR c++/8688
894         * decl.c (reshape_init): Handle erroneous initializers.
895
896 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
897
898         PR c++/8720
899         * spew.c (remove_last_token): Make sure that last_chunk is set
900         correctly.
901
902         PR c++/8615
903         * error.c (dump_expr): Handle character constants with
904         TREE_OVERFLOW set.
905
906 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
907
908         DR 180
909         * decl.c (grokdeclarator): Require class-key for all friend class.
910         Output the correct type and context in the error message.
911
912 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
913
914         PR c++/5919
915         * pt.c (unify): Use variably_modified_type_p to test validity of
916         template argument types.
917
918         PR c++/8727
919         * cp-tree.h (lang_type_class): Add typeinfo_var.
920         (CLASSTYPE_TYPEINFO_VAR): New macro.
921         * rtti.c (get_tinfo_decl): Use it.
922
923         PR c++/8663
924         * init.c (expand_member_init): Always get the main variant of a
925         base class.
926
927 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
928
929         PR c++/8332
930         PR c++/8493
931         * decl.c (cxx_init_decl_processing): Use size_type_node, not
932         c_size_type_node.
933         * decl2.c (coerce_new_type): Likewise.
934         * except.c (do_allocate_exception): Likewise.
935
936 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
937
938         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
939         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
940         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
941         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
942         typeck2.c: Include coretypes.h and tm.h.
943         * Make-lang.in: Update dependencies.
944
945 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
946
947         PR c++/8227
948         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
949         (check_initializer): Validate the type of the initialized
950         variable, even if the initializer is absent.
951         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
952
953         PR c++/8214
954         * typeck.c (convert_for_assignment): Do not use
955         decl_constant_value on the operand.
956
957         PR c++/8511
958         * pt.c (instantiate_decl): Handle template friends defined outside
959         of the class correctly.
960
961 2002-11-29  Joe Buck <jbuck@synopsys.com>
962
963         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
964         anonymous structs.
965
966 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
967
968         * class.c (walk_subobject_offsets): Recur on binfos as well as on
969         types.
970         (layout_nonempty_base_or_field): Pass it a binfo when processing a
971         base class.
972         (layout_empty_base): Likewise.
973         (build_base_field): Likewise.
974
975 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
976
977         * class.c (build_base_field): Make sure we get the canonical base
978         when descending through primary bases.
979
980 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
981
982         * decl.c (check_initializer): Don't error on initialisation of
983         a scalar with a brace-enclosed expression.
984
985 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
986
987         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
988         (template_parms_equal): Remove prototype.
989         * typeck.c (buuld_indirect_ref): Reformat.
990
991 2002-11-25  Jason Merrill  <jason@redhat.com>
992
993         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
994         and a DO_STMT.
995
996 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
997
998         * tree.c (cp_build_qualified_type_real): Correct handling of
999         array types.
1000         * class.c (walk_subobject_offsets): Fix thinko.
1001         (build_base_field): Record offsets of empty bases in primary
1002         virtual bases.
1003         (layout_class_type): Record offsets of empty bases in fields.
1004
1005         * search.c (is_subobject_of_p_1): Fix thinko.
1006         (lookup_field_queue_p): Likewise.
1007
1008 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
1009
1010         * class.c (layout_class_type): Reuse tail padding when laying out
1011         virtual bases.
1012
1013 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
1014
1015         * rtti.c (qualifier_flags): Fix thinko.
1016
1017 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1018
1019         Remove traditional C constructs 1/n.
1020         * cp-tree.h (init_method, set_mangled_name_for_decl,
1021         build_opfncall, hack_identifier, make_thunk, use_thunk,
1022         synthesize_method, implicitly_declare_fn,
1023         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
1024         maybe_clone_body): Remove use of PARAMS.
1025
1026         * method.c (do_build_assign_ref, do_build_copy_constructor,
1027         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
1028         Likewise.
1029         (synthesize_method): Use 'bool' type and constants instead of
1030         'int'.
1031         (locate_copy): Likewise.
1032         (implicitly_declare_fn): Likewise.
1033
1034         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
1035         Remove old-style declaration.
1036         (maybe_clone_body): Use 'bool' type and constants.
1037
1038 2002-11-21  Glen Nakamura  <glen@imodulo.com>
1039
1040         PR c++/8342
1041         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
1042         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
1043         of the branches of a COND_EXPR.
1044
1045 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
1046
1047         * pt.c (for_each_template_parm): Free allocated memory.
1048         * search.c (is_subobject_of_p_1): New function.
1049         (is_subobject_of_p): Avoid walking virtual bases multiple times.
1050
1051 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
1052
1053         * g++spec.c (lang_specific_spec_functions): New.
1054
1055 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
1056
1057         * ChangeLog: Follow spelling conventions.
1058         * class.c: Likewise.
1059         * decl2.c: Likewise.
1060
1061 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
1062
1063         * search.c (dfs_push_decls): Do not try to reorder elements
1064         3..n of method_vec if method_vec has only two elements.
1065         Reverse order of two tests to avoid accessing unallocated
1066         memory.
1067
1068 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
1069
1070         * class.c (dfs_find_final_overrider): Adjust so that the most
1071         derived object is a binfo, rather than a class type.
1072         (find_final_overrider): Likewise.
1073         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
1074         (add_vcall_offset): Likewise.
1075
1076 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1077
1078         PR c++/8389
1079         * pt.c (instantiate_template): Push class scope for member
1080         functions.
1081         (get_mostly_instantiated_function_type): Likewise.  Don't call
1082         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
1083         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
1084         * mangle.c (write_encoding, write_unqualified_name): Adjust.
1085
1086 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
1087
1088         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
1089         vcall offfsets.  Split out ...
1090         (add_vcall_offset): ... new function.
1091
1092         PR c++/8338
1093         * pt.c (for_each_template_parm): Add htab parameter.
1094         (process_partial_specialization): Adjust call.
1095         (push_template_decl_real): Likewise.
1096         (pair_fn_data): Add visited.
1097         (for_each_template_parm_r): Avoid walking duplicates more than
1098         once.
1099         (uses_template_parms): Adjust call to for_each_template_parm.
1100
1101 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
1102
1103         * class.c (add_implicitly_declared_members): Put implicitly
1104         declared functions at the end of TYPE_METHODs when -fabi-version
1105         is at least 2.
1106
1107 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
1108
1109         * decl2.c (finish_file): Correct spelling.
1110
1111 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
1112
1113         * call.c (build_special_member_call): Do not try to lookup VTTs by
1114         name.
1115         * class.c (vtbl_init_data): Add generate_vcall_entries.
1116         (get_vtable_decl): Do not look up virtual tables by name.
1117         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
1118         (set_primary_base): Do not set CLASSTYPE_RTTI.
1119         (determine_primary_base): Likewise.
1120         (get_matching_virtual): Remove.
1121         (get_vcall_index): New function.
1122         (update_vtable_entry_for_fn): Do not try to use virtual thunks
1123         when they are not required.  Assign vcall indices at this point.
1124         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
1125         Do update dynamic_classes.
1126         (build_vtt): Do not add VTTs to the symbol table.
1127         (build_ctor_vtbl_group): Likewise.
1128         (build_vtbl_initializer): Simplify handling of vcall indices.
1129         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
1130         for the most derived class.
1131         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
1132         the vtable.
1133         * cp-tree.h (dynamic_classes): New macro.
1134         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
1135         (CLASSTYPE_RTTI): Remove.
1136         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
1137         (CLASSTYPE_VCALL_INDICES): New macro.
1138         (CLASSTYPE_VTABLES): Likewise.
1139         (BV_USE_VCALL_INDEX_P): Remove.
1140         (build_vtable_path): Remove.
1141         * decl2.c (finish_vtable_vardecl): Remove.
1142         (key_method): Remove #if 0'd code.
1143         (finish_vtable_vardecl): Rename to ...
1144         (maybe_emit_vtables): ... this.
1145         (finish_file): Use it.
1146         * search.c (look_for_overrides_here): Update comment.
1147
1148 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
1149
1150         PR c/7353 redux
1151         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
1152
1153 2002-10-30  Jason Merrill  <jason@redhat.com>
1154
1155         PR c++/8186
1156         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
1157         * call.c (convert_for_arg_passing): Set it.
1158         * except.c (stabilize_throw_expr): Recurse for such an arg.
1159
1160 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
1161
1162         * cp-tree.h (lang_decl_flags): Remove init_priority.
1163         (lang_decl): Add delta.
1164         (GLOBAL_INIT_PRIORITY): Remove.
1165         (THUNK_DELTA): Revise definition.
1166         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
1167         * dump.c (cp_dump_tree): Don't dump it.
1168
1169 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
1170
1171         PR c++/8160
1172         * typeck2.c (process_init_constructor): Call complete_array_type.
1173
1174         PR c++/8149
1175         * decl.c (make_typename_type): Issue errors about invalid results.
1176
1177 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1178
1179         Core issue 287, PR c++/7639
1180         * cp-tree.h (lang_type_class): Add decl_list field.
1181         (CLASSTYPE_DECL_LIST): New macro.
1182         (maybe_add_class_template_decl_list): Add declaration.
1183         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
1184         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
1185         (maybe_add_class_template_decl_list): New function.
1186         (add_implicitly_declared_members): Use it.
1187         * decl.c (maybe_process_template_type_declaration): Likewise.
1188         (pushtag): Likewise.
1189         * friend.c (add_friend): Likewise.
1190         (make_friend_class): Likewise.
1191         * semantics.c (finish_member_declaration): Likewise.
1192         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
1193         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
1194         to process members and friends in the order of declaration.
1195
1196 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
1197
1198         PR c++/8287
1199         * decl.c (finish_destructor_body): Create the label to jump to
1200         when returning from a destructor here.
1201         (finish_function_body): Rather than here.
1202
1203 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
1204
1205         PR c++/7266
1206         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
1207         SCOPE_REF is not null before dereferencing it.
1208
1209 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
1210
1211         * call.c (build_over_call): Use DECL_CONTEXT, not
1212         DECL_VIRTUAL_CONTEXT.
1213         * class.c (modify_vtable_entry): Don't mess with
1214         DECL_VIRTUAL_CONTEXT.
1215         (set_vindex): Remove.
1216         (set_primary_base): Remove vfuns_p parameter.
1217         (determine_primary_base): Likewise.
1218         (modify_all_vtables): Likewise.
1219         (layout_class_type): Likewise.  Adjust calls to other functions
1220         accordingly.
1221         (finish_struct_1): Adjust calls to modified functions.  Set
1222         DECL_VINDEX here.
1223         * cp-tree.h (lang_type_class): Remove vsize.
1224         (CLASSTYPE_VSIZE): Remove.
1225         (lang_decl): Remove thunks.
1226         (DECL_THUNKS): Adjust.
1227         (DECL_VIRTUAL_CONTEXT): Remove.
1228         (duplicate_decls): Don't copy it.
1229         * pt.c (build_template_decl): Don't set it.
1230         (tsubst_decl): Likewise.
1231         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
1232
1233         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
1234         (build_vtable_entry): Remove.
1235         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
1236         (lang_decl): Add thunks.
1237         (DECL_THUNKS): New macro.
1238         * decl.c (duplicate_decls): Copy it.
1239         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
1240         * semantics.c (emit_associated_thunks): Simplify.
1241
1242 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
1243
1244         PR c++/7228
1245         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
1246         lang_type structure exists before accessing field.
1247         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
1248         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
1249         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
1250         * class.c (check_field_decls): Use new macros.
1251         * typeck2.c (process_init_constructor): Remove redundant check for
1252         existence of lang_type structure.
1253
1254 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
1255
1256         * class.c (end_of_base): New method.
1257         (end_of_class): Use it.  Check indirect virtual bases.
1258
1259         * class.c (check_field_decls): Fix typo.
1260
1261 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
1262
1263         PR c++/8067
1264         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
1265         related variables.
1266
1267         PR c++/7679
1268         * spew.c (next_token): Do not return an endless stream of
1269         END_OF_SAVED_INPUT tokens.
1270         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
1271         the cached token stream.
1272         (snarf_defarg): Likewise.
1273
1274 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
1275
1276         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
1277         variably_modified_type_p.
1278         * cp-tree.h: Remove prototype of variably_modified_type_p.
1279         * tree.c (variably_modified_type_p): Remove; now implemented
1280         in language-independent code.
1281
1282 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
1283
1284         PR c++/6579
1285         * spew.c (snarf_parenthesized_expression): New function.
1286         (snarf_block): Use it.
1287
1288 2002-10-22  Richard Henderson  <rth@redhat.com>
1289
1290         * method.c (use_thunk): Always compute vcall_value; assert that
1291         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
1292         for vcall thunks as well.
1293
1294 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
1295
1296         * class.c (empty_base_at_nonzero_offset_p): New function.
1297         (layout_nonempty_base_or_field): Do not check for conflicts when
1298         laying out a virtual base using the GCC 3.2 ABI.
1299         (build_base_field): Correct checking for presence of empty classes
1300         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
1301
1302         * class.c (include_empty_classes): Use normalize_rli.
1303         (layout_class_type): Likewise.
1304
1305         * decl.c (reshape_init): Tweak handling of character arrays.
1306
1307         PR c++/8218
1308         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
1309         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
1310         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
1311         (check_field_decls): Likewise.
1312         (layout_class_type): Likewise.
1313         (finish_struct_1): Initialize it.
1314         (walk_subobject_offsets): Use it to prune searches.
1315
1316 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
1317
1318         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
1319         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
1320         TARGET_ASM_OUTPUT_MI_THUNK in comments.
1321
1322 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
1323
1324         * decl.c (start_decl): Point users of the old initialized-
1325         typedef extension at __typeof__.
1326
1327 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
1328
1329         * Make-lang.in (method.o): Depend on TARGET_H.
1330         * method.c (target.h): Include it.
1331         (use_thunk): Use target hooks.  Use vcall thunks, if available.
1332
1333 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
1334
1335         * class.c (base_derived_from): Make sure return value is a bool.
1336
1337 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
1338
1339         * class.c (find_final_overrider_data_s): Remove overriding_fn and
1340         overriding_base.
1341         (dfs_base_derived_from): New function.
1342         (base_derived_from): Likewise.
1343         (dfs_find_final_overrider): Use base_derived_from.
1344         (find_final_overrider): Adjust.
1345
1346 2002-10-18  Jason Merrill  <jason@redhat.com>
1347
1348         PR c++/8080
1349         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
1350         with condition decls in a template.
1351
1352 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
1353
1354         * class.c (add_method): Compare template parms too.
1355
1356 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
1357
1358         PR c++/7584
1359         * class.c (handle_using_decl): Allow the declaration used to be
1360         from an ambiguous base.
1361
1362         * pt.c (convert_template_argument): Revert this change:
1363                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
1364                 * pt.c (convert_template_argument): Do not fold non-type
1365                 template rguments when inside a template.
1366
1367         * init.c (expand_default_init): Handle brace-enclosed initializers
1368         correctly.
1369
1370 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
1371
1372         * mangle.c (write_expression): Correct handling of enumeration
1373         constants.
1374         (write_template_arg): Likewise.
1375         * pt.c (convert_template_argument): Do not fold non-type template
1376         arguments when inside a template.
1377
1378         PR c++/7478
1379         * cvt.c (convert_to_reference): Allow references as the incoming
1380         type.
1381
1382 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
1383
1384         PR c++/7524
1385         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
1386         build_qualified_type.
1387
1388 2002-10-15  Richard Henderson  <rth@redhat.com>
1389
1390         * error.c (dump_expr): Use real_to_decimal directly, and with
1391         the new arguments.
1392
1393 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
1394
1395         * decl.c (reshape_init): Fix typo.
1396
1397         * cp-tree.h (operator_name_info_t): Add arity.
1398         * lex.c (init_operators): Initialize it.
1399         * mangle.c (write_conversion_operator_name): New function.
1400         (write_unqualified_name): Use it.
1401         (write_template_args): Accept template arguments as a TREE_LIST.
1402         (write_expression): Adjust handling of qualified names to match
1403         specification.
1404
1405 2002-10-15  Jason Merrill  <jason@redhat.com>
1406
1407         * call.c (call_builtin_trap): New fn.
1408         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
1409         (build_call): Don't set current_function_returns_abnormally outside
1410         a function.
1411
1412 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
1413
1414         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
1415         clear CLASSTYPE_EMPTY_P.
1416         (build_base_field): Likewise.
1417         (build_base_fields): Likewise.
1418         (check_bases_and_members): Likewise.
1419         (create_vtbl_ptr): Likewise.
1420         (layout_class_type): Likewise.  Ensure that empty classes have
1421         size zero when used as base classes in the 3.2 ABI.
1422         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
1423         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
1424         parameter.
1425         (is_empty_class): Correct definition when using post-3.2 ABI.
1426         * cp-tree.h (lang_type_class): Add empty_p.
1427         (CLASSTYPE_EMPTY_P): New macro.
1428
1429 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
1430
1431         * init.c (build_delete): Do not apply save_expr for arrays.
1432         (build_vec_delete): Likewise.
1433
1434 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
1435
1436         * decl.c (layout_var_decl): Call layout_decl even for variables
1437         whose type is an array with unspecified bounds.
1438
1439         PR c++/7176
1440         * lex.c (do_identifier): Add another option for the parsing
1441         parameter.
1442         * parse.y (do_id): Use it.
1443
1444 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1445
1446         PRs C++/6803, C++/7721 and C++/7803
1447         * decl.c (grokdeclarator): Gracefully handle template-name as
1448         decl-specifier.
1449
1450 2002-10-11  Jason Molenda  <jmolenda@apple.com>
1451
1452         * init.c (build_field_list): Provide uses_unions_p with a default
1453         value.
1454
1455 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
1456
1457         PR c++/5661
1458         * cp-tree.h (variably_modified_type_p): New function.
1459         (grokdeclarator) Tighten check for variably modified types as
1460         fields.
1461         * pt.c (convert_template_argument): Do not allow variably modified
1462         types as template arguments.
1463         * tree.c (variably_modified_type_p): New function.
1464
1465         * NEWS: Document removal of "new X = ..." extension.
1466         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
1467         brace-enclosed initializers.
1468         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
1469         (initialize_local_var): Remove declaration.
1470         (expand_static_init): Likewise.
1471         * decl.c (next_initializable_field): New function.
1472         (reshape_init): Likewise.
1473         (check_initializer): Use them.  Build dynamic initializer for
1474         aggregates here too.
1475         (initialize_local_var): Simplify, and incorporate cleanup
1476         insertion code as well.
1477         (destroy_local_var): Remove.
1478         (cp_finish_decl): Tidy.
1479         (expand_static_init): Fold checks for whether or not a variable
1480         needs initialization into this function.  Simplify.
1481         * decl2.c (do_static_initialization): Simplify.
1482         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
1483         be done for us automatically.
1484         (expand_default_init): Handle brace-enclosed initializers
1485         correctly.
1486         (expand_aggr_init_1): Remove RTL-generation code.
1487         (build_vec_init): Remove "new X = ..." support.
1488         * parse.y (new_initializer): Likewise.
1489         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
1490         brace-enclosed initializer.
1491         (create_pseudo_type_info): Likewise.
1492         * typeck2.c (store_init_value): Don't try to handle digest_init
1493         being called more than once.
1494         (digest_init): Tidy handling of brace-enclosed initializers.
1495
1496 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1497
1498         * decl.c (typename_hash): Use htab_hash_pointer.
1499
1500 2002-10-10  Jim Wilson  <wilson@redhat.com>
1501
1502         * decl.c (duplicate_decls): Don't call decl_attributes.
1503
1504 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
1505
1506         PR c/7353
1507         * decl.c (start_decl): Unconditionally issue error for
1508         'typedef foo = bar'.
1509         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
1510         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
1511
1512 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1513
1514         * decl2.c (prune_vtable_vardecl): Delete unused function.
1515
1516 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
1517
1518         PR c++/7754
1519         * decl2.c (finish_anon_union): Do not expand anonymous unions when
1520         procesing template functions.
1521         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
1522         type. Call layout_decl.
1523         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
1524
1525 2002-10-07  Richard Henderson  <rth@redhat.com>
1526
1527         * decl2.c, pt.c: Revert c++/7754 fix.
1528
1529 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1530
1531         PR c++/7804
1532         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
1533
1534 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
1535
1536         PR c++/7931
1537         * pt.c (for_each_template_parm_r): Handle BASELINKs.
1538
1539         PR c++/7754
1540         * decl2.c (finish_anon_union): Do not expand anonymous unions when
1541         procesing template functions.
1542         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
1543         type. Call layout_decl.
1544         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
1545
1546 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
1547
1548         PR c++/8006
1549         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
1550         template parameters.
1551         (globals): Add entity and need_abi_warning.
1552         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
1553         CLASSTYPE_TEMPLATE_INFO.
1554         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
1555         TYPE_TI_TEMPLATE.
1556         (write_prefix): Handle typename types correctly.
1557         (write_template_prefix): Handle template template parameters
1558         correctly.
1559         (start_mangling): Add entity parameter.
1560         (finish_mangling): Warn about names whose mangling will change.
1561         (mangle_decl_string): Adjust.
1562         (mangle_type_string): Likewise.
1563         (mangle_special_for_type): Likewise.
1564         (mangle_ctor_vtbl_for_type): Likewise.
1565         (mangle_thunk): Likewise.
1566         (mangle_guard_variable): Likewise.
1567         (mangle_ref_init_variable): Likewise.
1568
1569 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
1570
1571         PR c++/7188.
1572         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
1573         * cp-tree.h (emit_base_init): Rename to ....
1574         (emit_mem_initializers): ... this.
1575         (expand_member_init): Change prototype.
1576         * init.c (perform_member_init): Compute explicit, rather than
1577         requiring it as a parameter.
1578         (sort_member_init): Rename to ...
1579         (sort_mem_initializers): ... this.  Process bases and data members
1580         together.
1581         (sort_base_init): Remove.
1582         (emit_base_init): Rename to ...
1583         (emit_mem_initializers): ... this.
1584         (expand_aggr_vbase_init_1): Remove.
1585         (construct_virtual_bases): Rename to ...
1586         (construct_virtual_base): ... this.
1587         (expand_member_init): Rework handling of base initializers.
1588         * method.c (do_build_copy_constructor): Use
1589         finish_mem_initializers.
1590         * parse.y (member_init): Adjust calls to expand_member_init.
1591         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
1592         (tsubst_initializer_list): Use expand_member_init.
1593         * semantics.c (finish_mem_intiailizers): Simplify.
1594
1595 2002-10-02  Matt Austern  <austern@apple.com>
1596         * decl.c (walk_vtables_r): Fixed typo that caused result to
1597         never get a nonzero value.
1598
1599 2002-10-02  Roger Sayle  <roger@eyesopen.com>
1600
1601         PR optimization/6627
1602         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
1603         from here, and move it to tree.h.
1604         * decl.c (cxx_init_decl_processing): If storing the vbit
1605         in function pointers, ensure that force_align_functions_log
1606         is atleast one.
1607
1608 2002-10-02  Matt Austern  <austern@apple.com>
1609
1610         * class.c (check_field_decls): Changed warning about const member
1611         variables so that it doesn't get issued for a class aggregate.
1612
1613 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
1614
1615         * decl.c (cp_finish_decl): Make sure array types are laid out,
1616         even if the array bounds are unknown.
1617
1618 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
1619
1620         * class.c (build_vtbl_initializer): Change build_c_cast
1621         to build1.
1622
1623 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
1624
1625         * decl.c (cp_finish_decl): Make sure array types are laid out,
1626         even if the array bounds are unknown.
1627
1628         * decl.c (cp_finish_decl): Correct check for dynamic
1629         initialization of thread-local storage.
1630
1631 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
1632
1633         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
1634         overloaded.
1635
1636 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
1637
1638         * class.c (build_vtbl_initializer): Add cast.
1639         (add_vcall_offset_vtbl_entries_1):
1640         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
1641
1642 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
1643
1644         * class.c (walk_subobject_offsets): Correct the calculation of
1645         offsets for virtual bases.  Correct the counting of array
1646         elements.
1647         (layout_nonempty_base_or_field): Simplify.  Correct the
1648         calculation of offsets to be propagated through the binfo
1649         hierarchy.
1650         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
1651         Add the FIELD_DECL to TYPE_FIELDS.
1652         (build_base_fields): Adjust accordingly.
1653         (layout_virtual_bases): Use build_base_field.
1654         (end_of_class): Return a tree, not an integer.
1655         (warn_about_ambiguous_direct_bases): Rename to ...
1656         (warn_about_ambiguous_bases): ... this.
1657         (include_empty_classes): New function.
1658         (layout_class_type): Create an alternative version of the type to
1659         be used when as a base class type.  Do not call
1660         finish_record_layout until we are done laying out the class.
1661         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
1662         as_base.
1663         (CLASSTYPE_SIZE): Reimplement.
1664         (CLASSTYPE_SIZE_UNIT): Likewise.
1665         (CLASSTYPE_ALIGN): Likweise.
1666         (CLASSTYPE_USER_ALIGN): Likewise.
1667         (CLASSTYPE_AS_BASE): New macro.
1668         (DECL_INITIALIZED_P): Likewise.
1669         (extract_init): Remove prototype.
1670         (build_forced_zero_init): Rename to ...
1671         (build_zero_init): ... this.
1672         (force_store_init_value): Remove.
1673         * decl.c (obscure_complex_init): Remove.
1674         (duplicate_decls): Copy DECL_INITIALIZED_P.
1675         (check_initializer): Do not leave junk in DECL_INITIAL.
1676         (cp_finish_decl): Handle zero-initialization of entities with
1677         static storage duration.
1678         * expr.c (extract_init): Remove.
1679         * init.c (build_forced_zero_init): Remove.
1680         (build_zero_init): New function.
1681         (build_default_init): Use it.
1682         (build_field_list): Skip FIELD_DECLs for base subobjects.
1683         (push_base_cleanups): Likewise.
1684         * method.c (do_build_assign_ref): Likewise.
1685         (synthesize_exception_spec): Likewise.
1686         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
1687         (regenerate_decl_from_template): To not set DECL_INITIAL for a
1688         static data member whose initialization took place in its class.
1689         (instantiate_decl): Do not pass an initializer to cp_finish_decl
1690         in that situation.
1691         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
1692         (dfs_unuse_fields): Likewise.
1693         * tree.c (pod_type_p): Handle error_mark_node.
1694         (zero_init_p): Likewise.
1695         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
1696         subobjects.
1697         * typeck2.c (store_init_value): Remove #if 0'd code.
1698         (force_store_init_value): Remove.
1699         (process_init_constructor): Use build_zero_init.
1700
1701 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
1702
1703         PR c++/7788
1704         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
1705
1706 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
1707
1708         * cp-tree.h: Fix comment typos.
1709         * decl.c: Likewise.
1710         * pt.c: Likewise.
1711
1712 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
1713
1714         * cp/class.c (contains_empty_class_p): New method.
1715         (walk_subobject_offsets): Correct computation of field offset.
1716         (layout_empty_base): Correct placement of emtpy base classes.
1717         (layout_class_type): Warn about ABI changes.
1718
1719 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
1720
1721         * cp/class.c (layout_virtual_bases): Do not round the size of the
1722         type to a multiple of the alignment before laying out virtual bases.
1723         (layout_class_type): Correct handling of bit-fields that are wider
1724         than their type inside unions.  Round the size of the type to a
1725         even number of bytes when computing the size without virtual
1726         bases.
1727         * cp/cp-tree.h (abi_version_at_least): New macro.
1728
1729 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
1730
1731         * ChangeLog: Follow spelling conventions.
1732         * ChangeLog.2: Likewise.
1733         * call.c: Likewise.
1734         * class.c: Likewise.
1735         * cp-tree.h: Likewise.
1736         * cvt.c: Likewise.
1737         * decl.c: Likewise.
1738         * decl2.c: Likewise.
1739         * except.c: Likewise.
1740         * friend.c: Likewise.
1741         * g++spec.c: Likewise.
1742         * init.c: Likewise.
1743         * lex.c: Likewise.
1744         * mangle.c: Likewise.
1745         * method.c: Likewise.
1746         * operators.def: Likewise.
1747         * optimize.c: Likewise.
1748         * pt.c: Likewise.
1749         * rtti.c: Likewise.
1750         * search.c: Likewise.
1751         * semantics.c: Likewise.
1752         * spew.c: Likewise.
1753         * tree.c: Likewise.
1754         * typeck.c: Likewise.
1755
1756 2002-09-18  Devang Patel  <dpatel@apple.com>
1757
1758         * cp/cp-tree.h: New prototype for walk_vtabls().
1759         * cp/decl.c (walk_vtables_r): New function.
1760         (struct cp_binding_level): Add new members, namespaces,
1761         names_size and vtables.
1762         (add_decl_to_level): Add decl in namespaces or vtables
1763         chain, if conditions match.
1764         (walk_vtables): New function.
1765         (walk_namespaces_r): Travers separate namespace chain
1766         for namespace decls.
1767         (wrapup_globals_for_namespace): Use names_size instead
1768         of list_length().
1769         * cp/decl2.c (finish_file): Use walk_vtables() instead of
1770         walk_globals() to walk vtable decls.
1771
1772 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
1773
1774         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
1775         ICE with invalid pointers & references.
1776
1777 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
1778
1779         * Make-lang.in: Remove all references to the demangler.
1780         * cxxfilt.c: Moved to binutils.
1781
1782 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
1783
1784         PR c++/7718
1785         * pt.c (tsubst_decl): Remove assert.
1786
1787         Remove DR 295 implementation.
1788         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
1789         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
1790         about ignoring volatile qualifiers.
1791
1792         * search.c (lookup_member): Correct documentation.
1793
1794 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
1795
1796         * cp-tree.h (union lang_tree_node): Add chain_next option.
1797
1798 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
1799
1800         * parse.y (parse_finish_call_expr): Check lookup_member result.
1801
1802         PR c++/7015
1803         * semantic.c (finish_asm_stmt): Fix operand/output_operands
1804         thinko.
1805         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
1806
1807 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
1808
1809         PR c++/7919
1810         * call.c (build_over_call): Convert this pointer for fns found by
1811         using decls.
1812
1813 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
1814
1815         * ChangeLog: Follow spelling conventions.
1816         * ChangeLog.1: Likewise.
1817
1818 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
1819
1820         PR c++/7768
1821         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
1822
1823 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
1824
1825         * error.c: Fix comment formatting.
1826         * except.c: Likewise.
1827         * expr.c: Likewise.
1828         * friend.c: Likewise.
1829         * g++spec.c: Likewise.
1830         * init.c: Likewise.
1831         * lex.c: Likewise.
1832         * mangle.c: Likewise.
1833         * method.c: Likewise.
1834         * optimize.c: Likewise.
1835         * pt.c: Likewise.
1836         * rtti.c: Likewise.
1837         * search.c: Likewise.
1838         * semantics.c: Likewise.
1839         * spew.c: Likewise.
1840         * tree.c: Likewise.
1841         * typeck.c: Likewise.
1842         * typeck2.c: Likewise.
1843
1844 2002-09-13  Matt Austern  <austern@apple.com>
1845
1846         PR C++/7828
1847         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
1848         * cp/call.c: Change call-by-const-reference mechanism to use
1849         non_cast_lvalue_p when deciding whether the create a temporary.
1850         We need a temporary when passing, e.g. (long) x by const ref.
1851
1852 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
1853
1854         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
1855
1856 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
1857
1858         * decl.c: Fix comment formatting.
1859         * decl2.c: Likewise.
1860
1861 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
1862
1863         * call.c: Fix comment formatting.
1864         * class.c: Likewise.
1865         * cp-lang.c: Likewise.
1866         * cp-tree.h: Likewise.
1867         * cvt.c: Likewise.
1868
1869 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
1870
1871         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
1872         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
1873         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
1874         minor adjustments (use version_string, eliminate yet another
1875         duplicate of xmalloc)
1876
1877 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1878
1879         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
1880
1881 2002-09-05  Jason Merrill  <jason@redhat.com>
1882
1883         * typeck2.c (add_exception_specifier): Only pedwarn for an
1884         incomplete type.
1885         (require_complete_eh_spec_types): New fn.
1886         (cxx_incomplete_type_diagnostic): Also support pedwarning.
1887         * typeck.c (complete_type_or_diagnostic): Likewise.
1888         * call.c (build_call): Call require_complete_eh_spec_types.
1889         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
1890         on an incomplete type.
1891
1892 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
1893
1894         * decl.c (start_cleanup_fn): Clear interface_only before
1895         start_function, restore it afterwards.
1896
1897 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
1898
1899         * cp-tree.h (finish_builtin_type): Remove.
1900         * decl2.c (finish_builtin_type): Move to common code.
1901         * decl.c (build_ptrmemfunc_type): Adjust.
1902         * rtti.c (create_pseudo_type_info): Adjust.
1903         (create_tinfo_types): Adjust.
1904
1905 2002-08-31  Jason Merrill  <jason@redhat.com>
1906
1907         * cp-lang.c (cp_expr_size): Allow initialization from a
1908         CONSTRUCTOR.
1909
1910 2002-08-30  Richard Henderson  <rth@redhat.com>
1911
1912         PR opt/7515
1913         * tree.c: Include target.h.
1914         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
1915         don't bind locally.
1916         * Makefile.in (tree.o): Update.
1917
1918 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
1919
1920         * class.c (layout_virtual_bases): Warn about bugs in G++ that
1921         result in incorrect object layouts.
1922         (layout_class_type): Likewise.
1923
1924 2002-08-24  Matt Austern  <austern@apple.com>
1925
1926         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
1927         are allowable.
1928         (real_lvalue_p): Update caller.
1929         (lvalue_p): Ditto.
1930         (non_cast_lvalue_or_else): New.
1931         * tree.h: Declare it.
1932         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
1933
1934 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
1935
1936         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
1937         and COND_EXPR specially; fix error message output.
1938
1939 2002-08-22  Jason Merrill  <jason@redhat.com>
1940
1941         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
1942         * semantics.c (nullify_returns_r): Likewise.
1943
1944 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1945
1946         Fix PR/7621
1947         * typeck.c (finish_class_member_access_expr): Diagnose cases where
1948         name lookup finds nothing.
1949
1950 2002-08-15  Jason Merrill  <jason@redhat.com>
1951
1952         * semantics.c (finish_then_clause): Remove redundant assignment.
1953         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
1954         extra binding level outside the if/switch statement.
1955         (finish_while_cond, finish_for_cond): Rewrite complex condition
1956         into the loop body.
1957
1958 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
1959
1960         * parse.y (sizeof, alignof, typeof): New non-terminals to
1961         increment skip_evaluation.  Replace terminals with them and
1962         decrement skip_evaluation at the end of rules using them.
1963         * decl2.c (mark_used): Don't assemble_external if
1964         skipping evaluation.
1965
1966 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
1967
1968         Fix PR/7504
1969         * parse.y (parse_finish_call_expr): Handle incomplete
1970         type used to name a scope.
1971
1972 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1973
1974         PR c++/7598
1975         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
1976         regression caused by my 2002-08-08 patch.
1977
1978 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
1979
1980         * decl.c (pushdecl_class_level): Honor requests to bind names to
1981         OVERLOADs.
1982
1983 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1984
1985         * decl2.c (build_call_from_tree): Fix uninitialized variable.
1986         * parse.y (parse_finish_call_expr): Likewise.
1987         * repo.c (old_args, old_dir, old_main): Const-ify.
1988
1989 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
1990
1991         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
1992         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
1993         * optimize.c (maybe_clone_body): Likewise.
1994         * pt.c (tsubst_enum): Likewise.
1995         (lookup_template_class): Likewise.
1996         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
1997
1998 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
1999
2000         * lang-specs.h: Remove -ansi.
2001
2002 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
2003
2004         * tree.c (maybe_dummy_object): Replace // with /* */
2005
2006 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
2007
2008         * call.c (standard_conversion): Use build_ptrmem_type.
2009         * cp-tree.h (build_ptrmem_type): New function.
2010         (adjust_result_of_qualified_name_lookup): Likewise.
2011         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
2012         static data members.
2013         (build_ptrmem_type): New function.
2014         (grokdeclarator): Do not use build_offset_type when encountering a
2015         qualified name.
2016         * parse.y (parse_finish_call_expr): Use
2017         adjust_result_of_qualified_name_lookup.
2018         * search.c (adjust_result_of_qualified_name_lookup): New function.
2019         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
2020         accessing OFFSET_TYPEs directly.
2021
2022 2002-08-08  Mike Stump  <mrs@apple.com>
2023
2024         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
2025         (type_decays_to): Likewise.
2026         * class.c (find_final_overrider): Likewise.
2027         (maybe_note_name_used_in_class): Likewise.
2028         * decl.c (current_tmpl_spec_kind): Likewise.
2029         (add_binding): Likewise.
2030         (push_class_binding): Likewise.
2031         (duplicate_decls): Likewise.
2032         (layout_var_decl): Likewise.
2033         (grokfndecl): Likewise.
2034         (grokdeclarator): Likewise.
2035         (check_default_argument): Likewise.
2036         * decl2.c (handle_class_head): Likewise.
2037         * error.c (dump_template_decl): Likewise.
2038         * init.c (build_offset_ref): Likewise.
2039         * pt.c (check_specialization_scope): Likewise.
2040         (determine_specialization): Likewise.
2041         (check_explicit_specialization): Likewise.
2042         (maybe_check_template_type): Likewise.
2043         (process_partial_specialization): Likewise.
2044         (check_default_tmpl_args): Likewise.
2045         (push_template_decl_real): Likewise.
2046         (convert_template_argument): Likewise.
2047         (try_class_unification): Likewise.
2048         (get_bindings_real): Likewise.
2049         (do_decl_instantiation): Likewise.
2050         * semantics.c (begin_function_definition): Likewise.
2051         (finish_member_declaration): Likewise.
2052         (check_multiple_declarators): Likewise.
2053         * typeck.c (comp_array_types): Likewise.
2054         (comptypes): Likewise.
2055         (expr_sizeof): Likewise.
2056         (build_binary_op): Likewise.
2057         (dubious_conversion_warnings): Likewise.
2058         (check_return_expr): Likewise.
2059
2060 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
2061
2062         * typeck.c (build_class_member_access_expr): Do not return
2063         error_mark_node when no error has occurred.
2064
2065 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2066
2067         * typeck.c (build_component_addr): Remove.
2068         (build_unary_op): Just check it's not a bitfield, and then build
2069         an ADDR_EXPR.
2070
2071 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2072
2073         * class.c (convert_to_base): Correct check for error_mark_node.
2074         (create_vtable_ptr): Remove unused VFUNS_P parm.
2075
2076 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2077
2078         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
2079
2080 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
2081
2082         Rework build_component_ref.
2083         * call.c (build_vfield_ref): Do not go through build_component_ref.
2084         (build_field_call): Use build_class_member_access_expr.
2085         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
2086         (build_object_call): Likewise.
2087         * class.c (convert_to_base): New function.
2088         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
2089         (instantiate_type): Handle BASELINKs.
2090         * cp-tree.def (BASELINK): New tree code.
2091         * cp-tree.h (BASELINK_P): Reimplement.
2092         (SET_BASELINK_P): Remove.
2093         (BASELINK_BINFO): Reimplement.
2094         (BASELINK_FUNCTIONS): Likewise.
2095         (BASELINK_ACCESS_BINFO): Likewise.
2096         (BASELINK_OPTYPE): Likewise.
2097         (convert_to_base): New function.
2098         (name_p): Likewise.
2099         (build_object_ref): Remove.
2100         (build_component_ref_1): Likewise.
2101         (build_component_ref): Likewise.
2102         (build_x_component_ref): Likewise.
2103         (build_class_member_access_expr): New function.
2104         (finish_class_member_access_expr): Likewise.
2105         (build_ptrmemfunc_access_expr): Likewise.
2106         * decl.c (grokdeclarator): Handle BASELINKs.
2107         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
2108         finish_class_member_access_expr.
2109         (arg_assoc): Handle BASELINKs.
2110         (do_class_using_decl): Likewise.
2111         * error.c (dump_decl): Likewise.
2112         (dump_expr): Use build_ptrmemfunc_access_expr.
2113         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
2114         destructors.
2115         (build_throw): Use BASELINK_FUNCTIONS.
2116         * init.c (perform_member_init): Use
2117         build_class_member_access_expr.
2118         (build_offset_ref): Handle BASELINKs.  Use
2119         build_class_member_access_expr.
2120         * method.c (hack_identifier): Likewise.
2121         * parse.y (do_id): Use BASELINK, not TREE_LIST.
2122         (primary): Remove uses of build_object_ref.
2123         * pt.c (lookup_template_function): Handle BASELINKs.
2124         (resolve_overloaded_unification): Likewise.
2125         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
2126         (lookup_field): Use BASELINK, not TREE_LIST.
2127         (lookup_fnfiels): Likewise.
2128         (setup_class_bindings): Likewise.
2129         * semantics.c (finish_object_call_expr): Do not use
2130         build_method_call when we already know what function is being
2131         called.
2132         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
2133         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
2134         TREE_CHAIN.
2135         (name_p): New function.
2136         * typeck.c (build_object_ref): Remove.
2137         (build_component_ref_1): Likewise.
2138         (build_x_component_ref): Likewise.
2139         (build_class_member_access_expr): New function.
2140         (finish_class_member_access_expr): Likewise.
2141         (build_ptrmemfunc_access_expr): Likewise.
2142         (get_member_function_from_ptrfunc): Use
2143         build_ptrmemfunc_access_expr.
2144         (build_binary_op): Likewise.
2145         (build_unary_op): Likewise.
2146         (build_ptrmemfunc): Likewise.
2147         (pfn_from_ptrmemfunc): Likewise.
2148         * typeck2.c (build_m_component_ref): Adjust comment.
2149
2150 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
2151
2152         * Make-lang.in (CXX_C_OBJS): Update.
2153         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
2154         * cp-tree.h (cxx_decode_option): Remove.
2155         * decl2.c (compare_options, lang_f_options, unsupported_options,
2156         cxx_decode_option): Remove.
2157
2158 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
2159
2160         * typeck.c (build_x_unary_op): Handle pointer-to-member.
2161
2162 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
2163
2164         * class.c: Don't include obstack.h.
2165         (popclass):
2166         * decl2.c: Delete bogus comment.
2167         * error.c: Don't include obstack.h.
2168         * except.c: Likewise.
2169         (dump_type): Correct comment.
2170         * method.c: Don't include obstack.h.
2171         * tree.c: Likewise.
2172
2173 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
2174
2175         Fix PR/2213
2176         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
2177         expressions to pointer-to-data-member of pointer-to-member-functions.
2178
2179 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
2180
2181         * cvt.c (ocp_convert): Delete obsolete code.
2182         * parse.y (permanent_obstack): Delete declaration.
2183         * pt.c (permanent_obstack): Delete declaration.
2184         * repo.c (permanent_obstack): Delete declaration.
2185         (open_repo_file): Use xmalloc instead of permanent_obstack.
2186         (init_repo): Use xstrdup instead of permanent_obstack.
2187
2188 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
2189
2190         * cp-tree.h (VF_DERIVED_VALUE): Remove.
2191         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
2192
2193 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
2194
2195         PR 7470.
2196         C++ ABI change - vfunc ordering.
2197         * class.c (add_virtual_function): Remove.
2198         (dfs_modify_all_vtables): Take list of all declared
2199         virtuals. Assign all that are not in primary base.
2200         (check_for_override): Adjust comments.
2201         (create_vtable_ptr): Take single list of virtuals. Build chain
2202         of declared virtuals here.
2203         (layout_class_type): Take single list of virtuals. Adjust.
2204         (finish_struct_1): Keep virtuals on single list. Adjust.
2205
2206 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
2207
2208         * init.c (build_member_call): Use build_new_method_call, not
2209         build_method_call.
2210
2211 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
2212
2213         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
2214
2215 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
2216
2217         * call.c (build_method_call): Issue a more helpful error message
2218         about ambiguous method names.
2219
2220 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
2221
2222         * tree.c (build_shared_int_cst): Make cache file scope, and
2223         GTY it.
2224
2225 2002-08-02  Jason Merrill  <jason@redhat.com>
2226
2227         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
2228         (cp_expr_size): New fn.
2229         * call.c (build_over_call): Lose empty class hackery.
2230         (convert_arg_to_ellipsis): Promote non-POD warning to error.
2231         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
2232
2233         * semantics.c (expand_body): Do tree optimization in the function
2234         context, too.
2235
2236 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
2237
2238         * cp-tree.h: Move all warning and flag declarations to c-common.h.
2239         * decl.c: Move all warning and flag variables to c-common.c.
2240         * decl2.c: Move all warning and flag variables to c-common.c.
2241         * lex.c (flag_digraphs): Remove.
2242         (warn_traditional): Now in c-common.c.
2243
2244 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
2245
2246         * call.c (build_field_call): Do not look up the field by name.
2247         (build_method_call): Simplify.
2248         (struct z_candidate): Add access_path and conversion_path.  Remove
2249         basetype_path.
2250         (convert_class_to_reference): Adjust use of
2251         add_function_candidate.
2252         (add_candidate): Add conversion_path argument.
2253         (add_function_candidate): Use it.
2254         (add_conv_dndidate): Likewise.
2255         (build_builtin_candidate): Likewise.
2256         (add_template_candidate_real): Add conversion_path argument.
2257         (add_template_conv_candidate): Likewise.
2258         (add_template_candidate): Likewise.
2259         (build_user_type_conversion_1): Use it.
2260         (build_new_function_call): Remove name lookup code.  Adjust use of
2261         add_template_candidate and add_function_candidate.
2262         (build_new_op): Likewise.
2263         (convert_like_real): Use build_special_member_call.
2264         (build_over_call): Use cand->conversion_path.
2265         (build_special_member_call): New method.
2266         (build_new_method_call): Remove name lookup code.
2267         * cp-tree.def (OFFSET_REF): Update documentation.
2268         (TEMPLATE_ID_EXPR): Likewise.
2269         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
2270         (BASELINK_OPTYPE): Likewise.
2271         (build_new_method_call): Adjust prototype.
2272         (build_special_member_call): New method.
2273         (build_baselink): New method.
2274         (build_offset_ref_call_from_tree): Likewise.
2275         (build_call_from_tree): Likewise.
2276         (finish_qualified_call_expr): Remove.
2277         (finish_call_expr): Adjust prototype.
2278         (build_x_function_call): Remove.
2279         * cvt.c (ocp_convert): Use build_special_member_call.
2280         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
2281         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
2282         CALL_EXPR.
2283         (build_offset_ref_call_from_tree): New function.
2284         (build_call_from_tree): Likewise.
2285         * init.c (expand_cleanup): Use build_special_member_call.
2286         (expand_default_init): Likewise.
2287         (build_member_call): Use finish_call_expr.
2288         (build_new_1): Use build_special_member_call.
2289         (push_base_cleanups): Likewise.
2290         * method.c (do_build_assign_ref): Likewise.
2291         * parse.y (template_id): Do not pass a COMPONENT_REF to
2292         lookup_template_function.
2293         (primary): Use parse_finish_call_epxr, not finish_call_expr.
2294         (parse_finish_call_expr): New function.
2295         * pt.c (lookup_template_function): Add assertions.
2296         * search.c (lookup_base): Allow T to be a binfo.
2297         (build_baselink): New function.
2298         (lookup_member): Use it.
2299         * semantics.c (finish_call_expr): Do not do name lookup.
2300         (finish_object_call_expr): Remove #if 0'd code.
2301         (finish_qualified_call_expr): Remove.
2302         * typeck.c (build_x_function_call): Remove.
2303         (build_static_case): Use build_special_member_call.
2304         * typeck2.c (build_functional_cast): Likewise.
2305
2306 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
2307
2308         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
2309
2310 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
2311
2312         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
2313
2314 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
2315
2316         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
2317         documentation.
2318
2319 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
2320
2321         * cp-tree.h: Comment typo fix.
2322
2323 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
2324
2325         * spew.c (space_for_token): Allocate zeroed memory for a new token
2326         chunk.
2327
2328 2002-07-27  Roger Sayle  <roger@eyesopen.com>
2329
2330         * decl.c (builtin_function_1): No need to explicitly mark
2331         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
2332
2333 2002-07-27  Roger Sayle  <roger@eyesopen.com>
2334
2335         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
2336
2337 2002-07-26  Jason Merrill  <jason@redhat.com>
2338
2339         * call.c (build_over_call): Likewise.
2340         (cp_convert_parm_for_inlining): New fn.
2341         (convert_for_arg_passing): New fn.
2342         (convert_default_arg, build_over_call): Use it.
2343         (type_passed_as): New fn.
2344         * pt.c (tsubst_decl): Use it.
2345         * decl2.c (cp_build_parm_decl): New fn.
2346         (build_artificial_parm): Use it.
2347         (start_static_storage_duration_function): Likewise.
2348         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
2349         (grokparms): Don't mess with DECL_ARG_TYPE.
2350         * typeck.c (convert_arguments): Use convert_for_arg_passing.
2351         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
2352         Define.
2353         * cp-tree.h: Declare new fns.
2354
2355 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
2356
2357         * cp-tree.h (flag_operator_names): Remove.
2358         * decl2.c (flag_operator_names): Remove.
2359         (lang_f_options): Remove operator-names.
2360         * lex.c (D_OPNAME): Remove.
2361         (reswords): Remove operator names.
2362         (rid_to_yy): Remove operator names.
2363         (init_reswords): No need to handle D_OPNAME.
2364         * spew.c (read_process_identifier): There are no operator
2365         names.
2366
2367 2002-07-26  Jason Merrill  <jason@redhat.com>
2368
2369         * dump.c (cp_dump_tree): Call c_dump_tree.
2370         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
2371
2372 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
2373
2374         * error.c (print_whitespace): Remove.
2375         * g++spec.c (LIBUNWIND): Move.
2376         * mangle.c (mangled_position, write_signed_number): Remove.
2377
2378 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
2379
2380         * decl2.c (cxx_decode_option): Similarly.
2381
2382 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
2383
2384         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
2385         (cxx_sizeof_or_alignof_type): Take a third argument.
2386         (cxx_sizeof): Adjust definition.
2387         (cxx_alignof): Likewise.
2388         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
2389         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
2390         complaining.
2391         (c_sizeof_nowarn): Remove definition.
2392         (build_unary_op): Use cxx_sizeof_nowarn.
2393
2394 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
2395
2396         * tree.c (cp_build_qualified_type_real): When copying
2397         pointer-to-method types, unshare the record that holds
2398         the cached pointer-to-member-function type.
2399
2400 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
2401
2402         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
2403
2404 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
2405
2406         Fix PR/7363:
2407         * typeck.c (cxx_sizeof_or_alignof_type): New function.
2408         (c_sizeof): Remove definition.
2409         (expr_sizeof): Use cxx_sizeof.
2410         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
2411         * decl.c (finish_destructor_body): Use cxx_sizeof.
2412         * semantics.c (finish_alignof): Likewise.
2413         (finish_alignof): Use cxx_alignof.
2414         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
2415         (cxx_sizeof_or_alignof_type): Declare.
2416         (my_friendly_assert): Move to ../c-common.h.
2417
2418 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
2419
2420         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
2421
2422 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2423
2424         PR c++/7347, c++/7348
2425         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
2426         * decl.c (make_typename_type): Use it.
2427         (make_unbound_class_template): Likewise.
2428         (lookup_name_real): Don't call type_access_control if scope is
2429         template parameter dependent.
2430         * parse.y (template_arg): Call make_unbound_class_template with
2431         tf_parsing set.
2432         (nest_name_specifier): Call make_typename_type with tf_parsing set.
2433         (typename_sub0): Likewise.
2434         (typename_sub1): Likewise.
2435         (instantiate_decl): Push class scope.
2436         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
2437         for both static variable and member function template.
2438         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
2439         and arguments.
2440         * search.c (type_access_control): Do type access for TEMPLATE_DECL
2441         too.
2442
2443 2002-07-20  Roger Sayle  <roger@eyesopen.com>
2444
2445         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
2446         test by using positive_option.  Make whitespace consistent.
2447
2448 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
2449
2450         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
2451         members with 'locus'.  Adjust use throughout.
2452         (struct feed):  Likewise.
2453         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
2454         Adjust use.
2455         (snarf_defarg): Use error(), not error_with_file_and_line().
2456
2457 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
2458
2459         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
2460         cpp_options is included.
2461
2462 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2463
2464         PR c++/2862, c++/2863
2465         * pt.c (determine_specialization): Compare the length of
2466         TYPE_ARG_TYPES.  Tidy.
2467
2468 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2469
2470         PR c++/3797
2471         * decl.c (duplicate_decls): Don't propagate inlining parameters from
2472         olddecl to newdecl when newdecl is a specialization of the
2473         instantiation olddecl.
2474
2475 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2476
2477         PR c++/4802, c++/5387
2478         * decl.c (make_typename_type): Use enforce_access.
2479
2480 2002-07-17  Scott Snyder <snyder@fnal.gov>
2481
2482         PR c++/7320
2483         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
2484
2485 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
2486
2487         * class.c (add_method): Correct handling of conversion operators.
2488
2489 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
2490
2491         PR c++/7224
2492         * class.c (add_method): Simplify.
2493
2494 2002-07-11  Jason Merrill  <jason@redhat.com>
2495
2496         PR c++/7279
2497         * tree.c (cp_copy_res_decl_for_inlining): Also copy
2498         TREE_ADDRESSABLE.
2499
2500 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
2501
2502         * pt.c (template_parm_this_level_p, push_template_decl_real):
2503         Pass depth as int pointer.
2504
2505 2002-07-11  Tim Josling  <tej@melbpc.org.au>
2506
2507         Remove front end hard coding from gengtype.c.
2508
2509         * config-lang.in (gtfiles): Add files needed for this front end.
2510
2511 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
2512
2513         * cp-tree.h (unqualified_name_lookup_error): Declare it.
2514         (begin_function_definition): Adjust prototype.
2515         * lex.c (unqualified_name_lookup_error): New function, split out
2516         from ...
2517         (do_identifier): ... here.
2518         * parse.y (parse_begin_function_definition): New function.
2519         (fn.def1): Use it.
2520         * semantics.c (begin_function_definition): Accept decl-specifiers
2521         and attributes as separate parameters.
2522
2523 2002-07-10  Jason Merrill  <jason@redhat.com>
2524
2525         PR c++/6255
2526         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
2527         modifying the old one.
2528
2529 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
2530
2531         * cp-tree.h (constructor_name_p): Declare it.
2532         (check_template_template_default_arg): Likewise.
2533         * class.c (handle_using_decl): Use constructor_name_p.
2534         * decl.c (grokdeclarator): Likewise.
2535         * decl2.c (constructor_name_p): Define it.
2536         * init.c (build_member_call): Use constructor_name_p.
2537         * parse.y (template_parm): Use check_template_template_default_arg.
2538         * pt.c (check_explicit_specialization): Use constructor_name_p.
2539         * semantics.c (check_template_template_default_arg): New function.
2540
2541 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2542
2543         * pt.c (can_complete_type_without_circularity): Add static to
2544         function definition.
2545
2546 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
2547
2548         * cp-tree.h (have_extern_spec): Declare it
2549         * decl.c (have_extern_spec): Define it.
2550         (start_decl): Eliminate use of used_extern_spec.
2551         (start_function): Likewise.
2552         * parse.y (have_extern_spec): Remove declaration.
2553         (used_extern_spec): Likewise.
2554         (frob_specs): Eliminate use of used_extern_spec.
2555         (.hush_warning): Likewise.
2556
2557 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
2558
2559         * Make-lang.in (cp/parse.o): Depend on decl.h.
2560         * cp-tree.h (do_decl_instantiation): Change prototype.
2561         * parse.y: Include decl.h.
2562         (parse_decl_instantiation): New function.
2563         (explicit_instantiation): Use it.
2564         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
2565         and DECLSPECS.
2566
2567 2002-07-07  Roger Sayle  <roger@eyesopen.com>
2568
2569         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
2570         constructor and destructor tests when passed a TEMPLATE_DECL.
2571
2572 2002-07-05  Jason Merrill  <jason@redhat.com>
2573
2574         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
2575         pointers.
2576
2577         PR optimization/7145
2578         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
2579
2580 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
2581
2582         Repair damage on weak-impared targets caused by my previous patch.
2583         * cp-tree.h (import_export_tinfo): Add parameter.
2584         * decl2.c (import_export_tinfo): Add parameter, post adjust
2585         DECL_COMDAT.
2586         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
2587         import_export_tinfo.
2588
2589 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2590
2591         PR c++/6944
2592         * init.c (build_aggr_init): Remove qualifiers of init before calling
2593         build_vec_init.
2594         (build_vec_init): Flatten multi-dimensional array during cleanup.
2595         (build_vec_delete_1): Abort if the type of each element is array.
2596
2597 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
2598
2599         * pt.c (instantiate_class_template): Fix typo.
2600
2601 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2602
2603         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
2604         by CVS conflict in my last patch.
2605
2606 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2607
2608         PR c++/6716
2609         * pt.c (can_complete_type_without_circularity): New function.
2610         (instantiate_class_template): Use it.
2611         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
2612         message due to incomplete fields.
2613
2614 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
2615
2616         PR c++/7112
2617         * mangle.c (write_expression): Add mangling for sizeof when
2618         applied to a type.
2619         * operators.def: Remove stale comment.
2620
2621 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
2622
2623         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
2624         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
2625         (tinfo_decl_type): Replace with ...
2626         (type_info_ptr_type): ... this.
2627         (import_export_tinfo): Declare.
2628         (tinfo_decl_p): Rename to ...
2629         (unemitted_tinfo_decl_p): ... this.
2630         * decl2.c (import_export_decl): Break out tinfo handling into ...
2631         (import_export_tinfo): ... here. New function.
2632         (finish_file): Adjust.
2633         * rtti.c (TINFO_REAL_NAME): New macro.
2634         (init_rtti_processing): Create the tinfo types.
2635         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
2636         (get_tinfo_decl): Adjust.
2637         (get_tinfo_ptr): New function.
2638         (get_type_id): Use it.
2639         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
2640         (ptr_initializer): Use get_tinfo_ptr.
2641         (ptm_initializer): Likewise.
2642         (synthesize_tinfo_var): Break into ...
2643         (get_pseudo_ti_init): ... this. Just create the initializer.
2644         (get_pseudo_ti_desc): .. and this.
2645         (create_real_tinfo_var): Remove.
2646         (create_pseudo_type_info): Don't create the vtable decl here.
2647         (get_vmi_pseudo_type_info): Remove.
2648         (create_tinfo_types): Adjust.
2649         (tinfo_decl_p): Rename to ...
2650         (unemitted_tinfo_decl_p): ... here. Adjust.
2651         (emit_tinfo_decl): Adjust. Create the initializer.
2652
2653 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
2654
2655         PR c++/6695
2656         * pt.c (tsubst_friend_class): Substitute into the context of the
2657         friend before using it.
2658
2659 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
2660
2661         * cp-tree.h (xref_tag): Change prototype.
2662         (handle_class_head): Likewise.
2663         (build_x_component_ref): Likewise.
2664         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
2665         (xref_tag): Take attributes as a separate parameter.
2666         (xref_tag_from_type): Adjust call to xref_tag.
2667         * decl2.c (build_expr_from_tree): Adjust call to
2668         build_x_component_ref.
2669         (handle_class_head): Take attributes as a separate parameter.
2670         * parse.y (parse_xref_tag): New function.
2671         (parse_handle_class_head): Likewise.
2672         (primary): Use parse_xref_tag.
2673         (class_head_decl): Use parse_handle_class_head.
2674         (class_head_defn): Likewise.
2675         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
2676         (build_dynamic_cast_1): Likewise.
2677         (create_pseudo_type_info): Likewise.
2678         (emit_support_tinfos): Likewise.
2679         * typeck.c (build_object_ref): Adjust call to
2680         build_x_component_ref.
2681         (build_x_component_ref): Remove protect parameter.
2682
2683 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
2684
2685         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
2686         * class.c (handle_using_decl): Likewise.
2687         (instantiate_type): Likewise.
2688         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
2689         (xref_basetypes): Change prototype.
2690         (begin_mem_initializers): New function.
2691         (get_overloaded_fn): Likewise.
2692         * decl.c (xref_basetypes): Simplify.
2693         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
2694         * init.c (build_offset_ref): Likewise.
2695         * parse.y (base_init): Use begin_mem_initializers().
2696         (structsp): Adjust call to xref_basetypes.
2697         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
2698         (instantiate_class_template): Adjust call to xref_basetypes.
2699         * semantics.c (begin_mem_initializers): New function.
2700         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
2701         (really_overlaoded_fn): Likewise.
2702         (get_overloaded_fn): New function.'
2703         (get_first_fn): USe BASELINK_FUNCTIONS.
2704
2705 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
2706
2707         * cp-tree.h (SCALAR_TYPE_P): New macro.
2708         (check_for_out_of_scope_variable): New function.
2709         (at_class_scope_p): Likewise.
2710         (finish_fname): Likewise.
2711         * class.c (finish_struct): Use at_function_scope_p.
2712         * decl.c (check_for_out_of_scope_variable): New function, split
2713         out from do_identifier.
2714         (finish_enum): Use at_function_scope_p.
2715         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
2716         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
2717         (primary): Use at_function_scope_p.
2718         * search.c (at_class_scope_p): New function.
2719         * semantics.c (finish_fname): Likewise.
2720         (check_multiple_declarators): Use at_function_scope_p.
2721
2722 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
2723
2724         * parse.y (parse_scoped_id): New function.
2725         (primary): Use it.
2726         * cp-tree.h (do_scoped_id): Adjust declaration.
2727         * lex.c (do_scoped_id): Remove call to yylex.
2728         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
2729         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
2730         expanding it inline.
2731
2732 2002-06-23  Matt Thomas  <matt@3am-software.com>
2733
2734         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
2735         "#if VMS_TARGET".
2736
2737 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2738
2739         * mangle.c (integer_type_codes): Const-ify.
2740
2741 2002-06-20  Richard Henderson  <rth@redhat.com>
2742
2743         PR c++/6747
2744         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
2745         Call put_var_into_stack.
2746
2747 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2748
2749         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
2750         array size calculation.
2751
2752 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2753
2754         PR c++/6892
2755         * pt.c (tsubst_expr): Handle FILE_STMT.
2756
2757 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2758
2759         PR c++/6723
2760         * pt.c (lookup_template_class): Don't build complete argument of
2761         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
2762         argument.
2763
2764 2002-06-19  Akim Demaille  <akim@epita.fr>
2765
2766         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
2767         decl.h's TYPENAME.
2768         * spew.c, lex.c: Adjust.
2769         * parse.y (explicit_instantiation): Add empty action to override
2770         the default $$ = $1 where it introduces a type clash.
2771
2772 2002-06-14  Jason Merrill  <jason@redhat.com>
2773
2774         * semantics.c (begin_for_stmt): Push the 'for' scope before
2775         adding the FOR_STMT.
2776
2777         C++ ABI changes.
2778         * class.c (build_base_field): Set DECL_PACKED.
2779         (layout_class_type): Don't use tail padding of PODs.
2780         * mangle.c (write_unqualified_name): Fix template conversion op
2781         mangling.
2782
2783 2002-06-16  Richard Henderson  <rth@redhat.com>
2784
2785         PR opt/6793
2786         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
2787         after template instantiation.
2788
2789 2002-06-16  Richard Henderson  <rth@redhat.com>
2790
2791         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
2792
2793 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
2794
2795         * cp-tree.h (compiler_error): Remove declaration.
2796         * lex.c (compiler_error): Remove definition.
2797
2798 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
2799
2800         * g++spec.c (LIBUNWIND): New.
2801         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
2802
2803 2002-06-13  Jessica Han  <jessica@cup.hp.com>
2804
2805         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
2806         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
2807         (build_vbase_offset_vtbl_entries): Likewise.
2808         * rtti.c (build_headof): Likewise.
2809         (get_tinfo_decl_dynamic): Likewise.
2810         (create_pseudo_type_info): Likewise.
2811
2812 2002-06-12  Stan Shebs  <shebs@apple.com>
2813
2814         * mpw-config.in: Remove file, no longer used.
2815         * mpw-make.sed: Ditto.
2816
2817 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
2818
2819         * decl2.c: Update call to cpp_handle_option.
2820
2821 2002-06-07  H.J. Lu  (hjl@gnu.org)
2822
2823         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
2824
2825 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
2826
2827         * error.c (cp_error_at): Fix typo.
2828
2829 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
2830
2831         * error.c (cp_diagnostic_starter): Adjust call.
2832         (maybe_print_instantiation_context): Change prototype to take a
2833         'diagnostic_info *'.
2834         (print_instantiation_full_context): Likewise.
2835         (print_instantiation_partial_context): Likewise.
2836         (cp_diagnostic_starter): Likewise.
2837         (cp_diagnostic_finalizer): Likewise.
2838         (cp_print_error_function): Likewise.
2839         (cp_printer): Take a secondary parameter as a 'text_info *'.
2840         Remove output_state savings.  Adjust calls.
2841
2842 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
2843
2844         * pt.c (inline_parm_levels): Mark for GC.
2845
2846         * mangle.c (start_mangling): Allocate G.substitutions here...
2847         (init_mangle): ... rather than here.
2848         (finish_mangling): Clear the varray pointer when done with it.
2849         * spew.c (yylexstring): Don't use VARRAY_FREE.
2850         * search.c (bfs_walk): Don't use VARRAY_FREE.
2851         * decl2.c (pending_statics): Use gengtype to mark.
2852         (deferred_fns): Likewise.
2853         (ssdf_decls): Likewise.
2854         (init_decl2): Delete.
2855         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
2856         (cxx_init_decl_processing): Don't call init_decl2.
2857         (cxx_pop_function_context): Don't use VARRAY_FREE.
2858         * cp-tree.h (struct saved_scope): No need for special marking
2859         of varrays.
2860         (struct language_function): Likewise.
2861         (local_classes): Use gengtype to mark.
2862         (init_decl2): Delete prototype.
2863         * class.c (init_class_processing): Don't use
2864         ggc_add_tree_varray_root.
2865         (build_vtbl_initializer): Don't use VARRAY_FREE.
2866
2867         * decl.c (typename_compare): Don't use same_type_p.
2868
2869         * decl.c: Include hashtab.h instead of hash.h.
2870         (typename_hash): Update to use htab_h.
2871         (typename_compare): Likewise.
2872         (typename_htab): Use gengtype to mark.
2873         (build_typename_type): Update to use htab_h.
2874         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
2875
2876         * Make-lang.in (gt-cp-tree.h): New rule.
2877         (cp/tree.o): Depend on gt-cp-tree.h.
2878         * config-lang.in (gtfiles): Add cp/tree.c.
2879         * tree.c: Include gt-cp-tree.h.
2880         (list_hash_table): Use gengtype to mark.
2881         (init_tree): Use gengtype to mark trees.
2882
2883         * Make-lang.in (cp/decl.o): Add debug.h dependency.
2884         * call.c (struct z_candidate): Use gengtype.
2885         (USER_CONV_CAND): Use WRAPPER_ZC.
2886         (convert_class_to_reference): Use build_zc_wrapper.
2887         (build_type_conversion_1): Likewise.
2888         (build_over_call): Use WRAPPER_ZC.
2889         (add_warning): Use build_zc_wrapper.
2890         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
2891         * cp-tree.h (struct lang_identifier): Use gengtype.
2892         (struct template_parm_index_s): Likewise.
2893         (struct ptrmem_cst): Likewise.
2894         (struct tree_binding): Likewise.
2895         (struct tree_overload): Likewise.
2896         (struct tree_srcloc): Likewise.
2897         (struct tree_wrapper): Likewise.  Also modify to have a pointer
2898         to struct z_candidate rather than void.
2899         (enum cp_tree_node_structure_enum): New.
2900         (union lang_tree_node): New.
2901         (cxx_mark_tree): Delete prototype.
2902         (cp_tree_node_structure): New prototype.
2903         (build_ptr_wrapper): Delete prototype.
2904         (build_int_wrapper): Delete prototype.
2905         (build_zc_wrapper): New prototype.
2906         * decl.c: Include debug.h
2907         (cxx_mark_tree): Delete.
2908         (cp_tree_node_structure): New.
2909         * tree.c (build_ptr_wrapper): Delete.
2910         (build_int_wrapper): Delete.
2911         (build_zc_wrapper): New.
2912
2913         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
2914         Correct typo.  Patch from k_fukui@highway.ne.jp.
2915
2916         * semantics.c (current_stmt_tree): Update for change to
2917         struct language_function.
2918         (finish_mem_initializers): Likewise.
2919         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
2920         * cp-tree.h (struct language_function): Rename from
2921         cp_language_function.  Change all uses.
2922         (cp_function_chain): Don't need to cast.
2923
2924         * class.c (duplicate_tag_error): Reset discriminator.
2925         (check_bases_and_members): Update for data structure changes.
2926         * cp-tree.h (struct lang_id2): Use gengtype.
2927         (flagged_type_tree): Likewise.
2928         (SET_LANG_ID): Use GGC on struct lang_id2.
2929         (struct cp_language_function): Use gengtype.  Remove field
2930         'x_vcalls_possible_p'.
2931         (current_vcalls_possible_p): Delete.
2932         (struct lang_type_header): New.
2933         (struct lang_type_class): Rename from struct lang_type.  Include
2934         struct lang_type_header.
2935         (struct lang_type_ptrmem): New.
2936         (struct lang_type): New.
2937         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
2938         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
2939         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
2940         (struct lang_decl_flags): Use gengtype.  Add discriminators.
2941         (struct lang_decl): Use gengtype.  Add and use discriminators.
2942         Update the macros that reference moved fields.
2943         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
2944         (SET_DECL_THUNK_P): Set discriminator too.
2945         (clear_inline_text_obstack): Delete prototype.
2946         (finish_inline_definitions): Delete prototype.
2947         (mark_pending_inlines): Delete prototype.
2948         (lang_check_failed): New prototype.
2949         * decl.c (struct named_label_use_list): Use gengtype.
2950         (struct named_label_list): Likewise.
2951         (mark_binding_level): Delete.
2952         (mark_named_label_lists): Delete.
2953         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
2954         (cxx_init_decl_processing): Use generated marker routine.
2955         (begin_destructor_body): Delete dead set to
2956         current_vcalls_possible_p.
2957         (mark_lang_function): Delete.
2958         (mark_cp_function_context): Delete.
2959         (lang_mark_tree): Use generated marker routines.
2960         * decl2.c (start_objects): Set discriminator when setting
2961         GLOBAL_INIT_PRIORITY.
2962         * lex.c (retrofit_lang_decl): Set discriminators.
2963         (copy_lang_type): Update for changes to lang_type structure.
2964         (cp_make_lang_type): Set discriminator.
2965         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
2966         * search.c: Include ggc.h.
2967         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
2968         (finish_inline_definitions): Delete.
2969         * spew.c (struct token): Use gengtype.
2970         (struct token_chunk): New.
2971         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
2972         (struct feed): Use gengtype.
2973         (feed_obstack): Delete.
2974         (feed): Mark as GC root.
2975         (pending_inlines): Mark as GC root.
2976         (pending_inlines_tail): Likewise.
2977         (processing_these_inlines): Likewise.
2978         (token_obstack): Make static.
2979         (first_token): Likewise.
2980         (init_spew): Don't initialize deleted things; use gengtype for roots.
2981         (clear_inline_text_obstack): Delete.
2982         (feed_input): Use GC for struct feed.  Update for changes to
2983         struct unparsed_text.
2984         (mark_pending_inlines): Delete.
2985         (next_token): Rename from add_token.  Change all callers.  Update
2986         for changes to struct unparsed_text.
2987         (space_for_token): New.
2988         (remove_last_token): New.
2989         (alloc_unparsed_text): New.
2990         (snarf_block): Take an unparsed_text.  Update for changes to struct
2991         unparsed_text.
2992         (snarf_method): Update for changes to struct unparsed_text.
2993         (snarf_defarg): Update for changes to struct unparsed_text.
2994         * tree.c (lang_check_failed): New.
2995
2996         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
2997         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
2998         (cp/spew.o): Add dependency on gt-<filename>.h.
2999         (cp/decl2.o): Add dependency on gt-<filename>.h.
3000         (cp/call.o): Add dependency on gt-<filename>.h.
3001         (cp/pt.o): Add dependency on gt-<filename>.h.
3002         (cp/repo.o): Add dependency on gt-<filename>.h.
3003         (cp/parse.o): Add dependency on gt-<filename>.h.
3004         * call.c: Use gengtype for roots.
3005         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
3006         decl2.c parse.y pt.c repo.c spew.c.
3007         * cp-tree.h: Use gengtype for roots.
3008         (struct saved_scope): Use GGC, gengtype.
3009         (cp_parse_init): Delete prototype.
3010         (init_pt): Delete prototype.
3011         * decl.c: Use gengtype for roots.
3012         (mark_saved_scope): Delete.
3013         (cxx_init_decl_processing): Don't call deleted initilisation
3014         routines.
3015         (signed_size_zero_node): Delete, unused.
3016         * decl.h: Use gengtype for roots.
3017         * decl2.c: Use gengtype for roots.
3018         * lex.h: Use gengtype for roots.
3019         * parse.y: Use gengtype for roots.
3020         (cp_parse_init): Delete.
3021         * pt.c: Use gengtype for roots.
3022         (init_pt): Delete.
3023         * repo.c: Use gengtype for roots.
3024         * spew.c: Use gengtype for roots.
3025
3026         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
3027         (cp/decl.o): Add dependency on gtype-cp.h.
3028         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
3029         Include gtype-cp.h.  Allow for filename changes.
3030
3031         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
3032         (cp/decl.o): Add cp/gt-decl.h dependency.
3033         * config-lang.in (gtfiles): New.
3034         * tree.h: Rename struct binding_level to struct cp_binding_level.
3035         * decl.c: Rename struct binding_level to struct cp_binding_level.
3036         Include cp/gt-decl.h.
3037         (struct cp_binding_level): Use gengtype.
3038         (make_binding_level): Use GGC on struct cp_binding_level.
3039         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
3040         (cxx_init_decl_processing): Mark free_binding_level as
3041         deletable.
3042
3043         * decl.c (mark_cp_function_context): Update calling sequence.
3044
3045         * decl.c (start_function): Don't free 'struct
3046         cp_language_function'.
3047         (pop_cp_function_context): Likewise.
3048         (save_function_data): Allocate it using GC.
3049         * semantics.c (genrtl_start_function): Don't free 'struct
3050         cp_language_function'.
3051
3052 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
3053
3054         * lang-specs.h: Use cpp_debug_options.
3055
3056 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
3057
3058         * mangle.c, tree.c: Include real.h.
3059         * Make-lang.in: Update dependency lists.
3060
3061 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3062
3063         * lex.c: Don't include c-lex.h.
3064         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
3065
3066 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
3067
3068         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
3069
3070 2002-05-22  Richard Henderson  <rth@redhat.com>
3071
3072         * decl.c (obscure_complex_init): Check for VAR_DECL
3073         before using DECL_THREAD_LOCAL.
3074
3075 2002-05-22  Richard Henderson  <rth@redhat.com>
3076
3077         * decl.c (check_tag_decl): Handle RID_THREAD.
3078         (obscure_complex_init): Reject run-time init of tls.
3079         (grokvardecl, grokdeclarator): Handle RID_THREAD.
3080         * lex.c (reswords): Add __thread.
3081         (rid_to_yy): Map RID_THREAD to SCSPEC.
3082
3083 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
3084
3085         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
3086         * cp-tree.h (cxx_post_options): Kill.
3087         * cp-lex.c (cxx_post_options): Kill.
3088
3089 2002-05-21  Richard Henderson  <rth@redhat.com>
3090
3091         * lex.c (rid_to_yy): Add RID_THREAD.
3092
3093 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
3094
3095         * init.c (build_vec_init): Test for trivial copy-assignment when
3096         copy-assigning arrays.
3097
3098 2002-05-20  Andreas Jaeger  <aj@suse.de>
3099
3100         * init.c (build_default_init): Remove unused variable.
3101
3102 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
3103
3104         * call.c (any_strictly_viable): New.
3105         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
3106
3107 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3108
3109         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
3110
3111 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3112
3113         PR c++/186, DR 259
3114         * pt.c (do_decl_instantiation): Don't complain explicit
3115         instantiation after explicit specialization.
3116         (do_type_instantiation): Likewise.
3117
3118 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
3119
3120         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
3121         renamed from...
3122         (complete_type_or_else): ... this.  Redefined as macro.
3123         (cxx_incomplete_type_diagnostic): Declare.
3124         (cxx_incomplete_type_error): Define as macro.
3125         * init.c (build_delete): Warn about incomplete types other than
3126         void, and use the built-in operator delete for them.
3127         * typeck.c (complete_type_or_diagnostic): Renamed from
3128         complete_type_or_else.  Added warn_only argument, passed to...
3129         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
3130         warnings or errors depending on new warn_only argument.  Renamed
3131         from...
3132         (cxx_incomplete_type_error): ... this.  New implementation in
3133         terms of cxx_incomplete_type_diagnostic.
3134
3135 2002-05-18  Jason Merrill  <jason@redhat.com>
3136
3137         PR c++/6611
3138         * decl2.c (import_export_decl): If we clear
3139         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
3140
3141 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3142
3143         PR c++/6620
3144         * pt.c (verify_class_unification): Don't check if PARM is template
3145         parameter dependent.  Simplify.
3146         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
3147         parameter dependent expression.
3148
3149 2002-05-14  Jason Merrill  <jason@redhat.com>
3150
3151         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
3152         Do set DECL_COMDAT.
3153         (synthesize_tinfo_var): Take the public decl.
3154         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
3155         (emit_tinfo_decl): Adjust.  Call import_export_decl.
3156         * decl2.c (import_export_decl): Simplify tinfo decl handling.
3157
3158 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
3159
3160         * cp-tree.h (struct lang_type): Added non_zero_init.
3161         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
3162         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
3163         * class.c (check_field_decls): Test non_zero_init.
3164         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
3165         zero-to-NULL conversions.
3166         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
3167         type that needs zero-initialization without zeros.
3168         (check_initializer_decl): Compute zero-initializer for types
3169         that require a non-trivial one.
3170         * init.c (build_forced_zero_init): New function.
3171         (build_default_init): Use it.
3172         * tree.c (zero_init_p): New function.
3173         * typeck2.c (force_store_init_value): New function.
3174         (process_init_constructor): Create non-trivial zero-initializers
3175         for array members and class fields.
3176
3177 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
3178
3179         * lang-specs.h: Remove redundant -lang-c++.
3180
3181 2002-05-13  Jason Merrill  <jason@redhat.com>
3182
3183         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
3184         (fixed_type_or_null): See through reference vars.
3185         (build_base_path): Vtable contents are constant.
3186         * typeck.c (get_member_function_from_ptrfunc): Likewise.
3187
3188 2002-05-12  Jason Merrill  <jason@redhat.com>
3189
3190         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
3191         structs are safe.
3192
3193 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
3194
3195         * cp-tree.h (flag_ansi): Remove.
3196         * decl2.c (flag_ansi): Remove.
3197         (cxx_decode_option): Set flag_iso and flag_undef.
3198
3199 2002-05-09  Jason Merrill  <jason@redhat.com>
3200
3201         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
3202         Use subtraction rather than a bitmask to get the index.
3203         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
3204
3205         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
3206
3207 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
3208
3209         * Make-lang.in (decl2.o): Update.
3210         * cp-tree.h (warn_multichar): Remove.
3211         * decl2.c: Include c-common.h.
3212         (warn_multichar): Remove.
3213
3214 2002-05-03  Jason Merrill  <jason@redhat.com>
3215
3216         * tree.c (build_cplus_array_type): Only const and volatile get
3217         special handling.
3218
3219         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
3220
3221 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
3222
3223         ABI change, returning simple classes from functions.
3224         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
3225         TYPE_HAS_TRIVIAL_INIT_REF is false or
3226         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
3227
3228 2002-04-30  Jason Merrill  <jason@redhat.com>
3229
3230         PR debug/6436
3231         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
3232         anonymous class with a typedef if there are attributes.
3233
3234 2002-04-29  Paul Eggert  <eggert@twinsun.com>
3235
3236         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
3237
3238 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
3239
3240         PR c++/6477
3241         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
3242         non-NULL first.
3243
3244 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
3245
3246         PR c++/6492
3247         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
3248         enter that scope before name lookup.
3249
3250         PR c++/6486
3251         * method.c (do_build_copy_constructor): Avoid building
3252         cv-qualified reference types.
3253
3254 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
3255
3256         PR c++/5719
3257         * decl.c (grok_op_properties): Assignment ops don't have to return
3258         by value. operator% should.
3259
3260 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
3261
3262         PR c/6343
3263         * decl.c (duplicate_decls): Call merge_weak.
3264
3265 2002-04-26  Richard Henderson  <rth@redhat.com>
3266
3267         * parse.y (malloced_yyss, malloced_yyvs): New.
3268         (yyoverflow): Re-add.  Set them.
3269         (free_parser_stacks): New.
3270
3271 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
3272
3273         PR c++/6497
3274         * method.c (do_build_assign_ref): Pass a derivation to
3275         build_method_call when calling base class assignment operators.
3276
3277 2002-04-26  Richard Henderson  <rth@redhat.com>
3278
3279         * parse.y (yyoverflow): Revert.
3280
3281 2002-04-26  Richard Henderson  <rth@redhat.com>
3282
3283         PR c/3581
3284         * parse.y (string): Remove.  Update all uses to use STRING
3285         instead, and not call combine_strings.
3286         * rtti.c (tinfo_name): Use fix_string_type.
3287         * semantics.c (finish_asm_stmt): Don't call combine_strings.
3288         * spew.c (yylexstring): New.
3289         (read_token): Use it.
3290
3291 2002-04-25  Richard Henderson  <rth@redhat.com>
3292
3293         PR c/2161
3294         * parse.y (yyoverflow): New.
3295
3296 2002-04-25  Jason Merrill  <jason@redhat.com>
3297
3298         PR c++/5607
3299         * search.c (check_final_overrider): No longer static.
3300         * class.c (update_vtable_entry_for_fn): Call it.
3301         * cp-tree.h: Adjust.
3302
3303 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3304
3305         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
3306         * cp-tree.h (cxx_set_yydebug): Die.
3307         * lex.c (YYDEBUG): Get from c-lex.h.
3308         (cxx_set_yydebug): Remove.
3309         * parse.y: Include c-lex.h.
3310         (YYDEBUG): Get from c-lex.h.
3311
3312 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
3313
3314         PR c++/6438.
3315         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
3316         void.
3317
3318 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
3319
3320         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
3321         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
3322         Redefine.
3323         * cp-tree.h (cp_attribute_table): Rename.
3324         * decl.c (lang_attribute_table): Remove declaration.
3325         (cxx_init_decl_processing): Don't set it.
3326         * tree.c (cp_attribute_table): Rename.
3327
3328 2002-04-24  Jason Merrill  <jason@redhat.com>
3329
3330         PR c++/6331
3331         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
3332         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
3333         The pedwarn for array assignment is now unconditional.
3334         * tree.c (build_cplus_array_type_1): Still process simple array types
3335         normally in templates.
3336
3337         PR c++/6395
3338         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
3339         stuff for comdats.
3340
3341 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
3342
3343         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
3344         node with attributes.
3345
3346 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
3347
3348         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
3349         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
3350
3351 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
3352
3353         PR c++/6256:
3354         * pt.c (tsubst_friend_class): Handle templates with explicit
3355         nested names.
3356
3357         PR c++/6331:
3358         * typeck.c (merge_types): Remember the cv-qualification of pointer
3359         types when merging them.
3360
3361 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3362
3363         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
3364         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
3365         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
3366         cxx_mark_function_context): New.
3367         * decl.c (push_cp_function_context, pop_cp_function_context,
3368         mark_cp_function_context): Rename for consistency.
3369         (cxx_init_decl_processing): Don't set old hooks.
3370
3371 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
3372
3373         * call.c (convert_type_from_ellipsis): Rename, update.
3374         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
3375         * cp-tree.h (convert_type_from_ellipsis): Rename.
3376         * decl.c (cxx_init_decl_processing): Don't set hook.
3377
3378 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
3379
3380         * call.c (build_new_method_call): Update.
3381         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
3382         * cp-tree.h (cxx_incomplete_type_error): New.
3383         * decl.c (grokdeclarator, grokparms): Update.
3384         * decl2.c (check_classfn): Update.
3385         * pt.c (tsubst): Update.
3386         * typeck.c (complete_type_or_else, expr_sizeof,
3387         decay_conversion): Update.
3388         * typeck2.c (incomplete_type_error): Rename.
3389         (add_exception_specifier): Update.
3390
3391 2002-04-18  Jason Merrill  <jason@redhat.com>
3392
3393         PR c++/5658
3394         * search.c (setup_class_bindings): A class template qualifies as a
3395         type binding.
3396
3397 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
3398
3399         PR c++/6316
3400         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
3401         before expanding.
3402
3403 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
3404
3405         * init.c (begin_init_stmts): Remove commented out code.
3406         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
3407         * semantics.c (begin_gobal_stmt_expr): Adjust call to
3408         expand_start_stmt_expr.
3409
3410 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
3411
3412         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
3413         dso_handle itself, to __cxa_atexit.
3414
3415 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3416
3417         * error.c (cxx_print_error_function): Adjust call to macros.
3418
3419 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
3420
3421         * class.c (layout_virtual_bases): Do all dsize computation on trees.
3422
3423 2002-04-14  Jason Merrill  <jason@redhat.com>
3424
3425         * typeck.c (get_member_function_from_ptrfunc): Don't do
3426         gratuitious division and multiplication on
3427         ptrmemfunc_vbit_in_delta targets.
3428
3429 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
3430
3431         PR c++/5373.
3432         * semantics.c (finish_expr_stmt): Remember the type of the
3433         expression before any conversions are performed.
3434
3435 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
3436
3437         PR c++/5189.
3438         * call.c (add_template_candidate_real): Do not treat member
3439         templates as copy constructors.
3440
3441 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
3442
3443         * decl.c (duplicate_decls): Do not copy the RTL for a variable
3444         declaration if the old variable had an incomplete type and the new
3445         variable does not.
3446         (complete_vars): Do not call layout_decl for completed variables.
3447
3448 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
3449
3450         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
3451         with an explicit one.
3452         (follow_tag_typedef): New.
3453         (lookup_tag): Use it to extract the tag of an explicit typedef.
3454         (xref_tag): Likewise.
3455
3456 2002-04-11  Andrew Haley  <aph@redhat.com>
3457
3458         * typeck.c (type_after_usual_arithmetic_conversions):
3459         If two types have the same variant, return immediately.
3460         When two floating-point operands are the same precision:
3461           convert to float if one of the operands is float;
3462           if neither operand is one of the standard types, return the type
3463           of the first operand.
3464
3465 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
3466
3467         PR c++/5507
3468         * decl.c (make_typename_type): Remove implicit typenameness.
3469
3470 2002-04-09  Jason Merrill  <jason@redhat.com>
3471
3472         PR optimization/6189
3473         * semantics.c (genrtl_start_function): Don't free
3474         DECL_SAVED_FUNCTION_DATA for inline functions.
3475
3476         * init.c (build_member_call): For now, don't convert to
3477         intermediate base if it would cause an error.
3478
3479 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
3480
3481         * parse.y (namespace_qualifier, maybe_identifier,
3482         begin_explicit_instantiation, end_explicit_instantiation,
3483         apparent_template_type, .finish_template_type,
3484         do_id, maybe_init, defarg_again, component_decl_1):
3485         Add ending ';', in accordance with POSIX.
3486
3487 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
3488
3489         PR c++/5571
3490         * class.c (layout_class_type): Remember incomplete static
3491         variables.
3492         (finish_struct_1): Call complete_vars, not
3493         hack_incomplete_structures.
3494         * cp-tree.h (hack_incomplete_structures): Rename to ...
3495         (complete_vars): ... this.
3496         (struct saved_scope): Remove incomplete.
3497         (namespace_scope_incomplete): Remove.
3498         * decl.c (struct binding_level): Remove incomplete.
3499         (incomplete_vars): New variable.
3500         (mark_binding_level): Don't mark incomplete.
3501         (print_binding_level): Don't print it.
3502         (mark_saved_scope): Don't mark incomplete.
3503         (pushdecl): Use maybe_register_incopmlete_var.
3504         (cxx_init_decl_processing): Register incomplete_vars for GC.
3505         (start_decl_1): Clarify error message.
3506         (hack_incomplete_vars): Remove.
3507         (maybe_register_incomplete_var): New function.
3508         (complete_vars): Likewise.
3509
3510 2002-04-06  Jason Merrill  <jason@redhat.com>
3511
3512         PR c++/4934
3513         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
3514         set before checking it.
3515
3516         PR c++/525
3517         * init.c (build_member_call): Use build_scoped_ref.
3518         (resolve_offset_ref): Likewise.
3519         * call.c (build_scoped_method_call): Likewise.
3520         * tree.c (maybe_dummy_object): Kludge around current_class_type being
3521         wrong.
3522         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
3523         * cp-tree.h: Adjust.
3524
3525         * init.c (push_base_cleanups): Just use build_scoped_method_call.
3526
3527         PR c++/6179
3528         * method.c (implicitly_declare_fn): Pass unqualified type to
3529         synthesize_exception_spec.
3530
3531 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
3532
3533         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
3534         * cvt.c: Update comment.
3535         * init.c (expand_cleanup_for_base): Update.
3536         * semantics.c (finish_parenthesized_expr): Update.
3537         * typeck.c (cp_truthvalue_conversion): Update.
3538
3539 2002-04-04  Jason Merrill  <jason@redhat.com>
3540
3541         * semantics.c (finish_eh_cleanup): New fn.
3542         * cp-tree.h: Add prototype.
3543         * init.c (perform_member_init, expand_cleanup_for_base): Use
3544         finish_eh_cleanup.
3545         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
3546         * cp-tree.h: Remove references.
3547         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
3548         * dump.c (cp_dump_tree): Likewise.
3549         * pt.c (tsubst_expr): Likewise.
3550         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
3551         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
3552         * tree.c (cp_statement_code_p): Likewise.
3553
3554         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
3555
3556         PR c++/5636
3557         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
3558         cleanup for nrv.
3559
3560         PR c++/5104
3561         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
3562         specifiers.
3563         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
3564
3565 2002-04-03  Richard Henderson  <rth@redhat.com>
3566
3567         * cp-lang.c (cxx_warn_unused_global_decl): New.
3568         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
3569
3570 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
3571
3572         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
3573         * tree.c (init_tree): Don't set hook.
3574
3575 2002-04-03  Roger Sayle  <roger@eyesopen.com>
3576
3577         PR c++/5998:
3578         * decl.c (duplicate_decls): Don't mess with assembler names when
3579         redeclaring builtin functions as static.
3580
3581 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3582
3583         * call.c (build_addr_func): Update.
3584         * class.c (resolve_address_of_overloaded_function): Update.
3585         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
3586         * cp-tree.h (cxx_mark_addressable): New.
3587         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
3588         * decl2.c (build_cleanup): Update.
3589         * except.c (build_throw): Update.
3590         * init.c (resolve_offset_ref): Update.
3591         * pt.c (convert_nontype_argument): Update.
3592         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
3593         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
3594         unary_complex_lvalue): Update.
3595         (mark_addressable): Rename.
3596
3597 2002-04-01  Roger Sayle  <roger@eyesopen.com>
3598
3599         PR c++/5998:
3600         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
3601         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
3602         but follow the SET_DECL_RTL idiom used elsewhere in the function.
3603
3604 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3605
3606         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3607         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
3608         * decl.c (grokdeclarator): Update.
3609         * mangle.c (write_integer_cst): Update.
3610         * typeck.c (build_binary_op): Update.
3611
3612 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
3613
3614         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
3615         * lex.c (cxx_init): Don't set hook.
3616
3617 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
3618
3619         * Make-lang.in (error.o): Update.
3620         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
3621         * cp-tree.h (struct diagnostic_context): Predeclare.
3622         (cxx_print_error_function): New.
3623         * error.c: Include langhooks-def.h.
3624         (lang_print_error_function): Rename.  Update.
3625         (init_error): Don't set hook.
3626
3627 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
3628
3629         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
3630         Redefine.
3631         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
3632         * decl.c (finish_enum): Similarly.
3633         * error.c (dump_type): Similarly.
3634         * lex.c (cxx_init): Similarly.
3635         * mangle.c (write_builtin_type): Similarly.
3636         * typeck.c (comptypes): Similarly.
3637
3638 2002-03-28  Roger Sayle  <roger@eyesopen.com>
3639
3640         PR c++/5998:
3641         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
3642         in the g++ front-end.
3643         (duplicate_decl): Allow redefinition of anticipated built-ins.
3644         Fix inlining problem by over-writing the old DECL_RTL.
3645         (lookup_namespace_name): Fail to find an identifier in the
3646         specified namespace if its still anticipated.
3647         (builtin_function_1): New function split out from builtin_function
3648         to create a builtin in the current namespace with given context.
3649         (builtin_function): Call builtin_function_1 to define the
3650         appropriate builtins in both the std and global namespaces.
3651         (select_decl): Don't test for anticipated decls here.
3652         (unqualified_namespace_lookup): Instead ignore them whilst
3653         searching through scopes and namespaces.
3654         * decl2.c (do_nonmember_using_decl): If a using declaration
3655         specifies an anticipated built-in function, mark it as no longer
3656         anticipated in that scope.
3657         (ambiguous_decl):  Avoid resolving to an anticipated decl.
3658         * lex.c (do_scoped_id): Fail to find an identifier in the global
3659         namespace if its still anticipated.
3660
3661 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
3662
3663         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
3664         * cp-tree.h (cp_make_lang_type): Rename.
3665         * lex.c (cp_make_lang_type): Rename.
3666         (make_aggr_type): Update.
3667         * tree.c (init_tree): Don't set make_lang_type_fn.
3668
3669 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
3670
3671         PR c++/6073
3672         * class.c (finish_struct_1): Update static field's DECL_MODE even
3673         if its type is a variant of t.
3674
3675 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
3676
3677         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
3678         * cp-tree.h (cxx_insert_default_attributes): New.
3679         * decl.c (insert_default_attributes): Rename.
3680
3681 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
3682
3683         PR c++/4884
3684         * call.c (build_op_delete_call): Allow for the fact the placement
3685         may be a COMPOUND_EXPR.
3686
3687 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
3688
3689         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
3690         * cp-tree.h (init_cplus_expand): Remove.
3691         (cxx_expand_expr): New.
3692         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
3693         fix prototype.
3694         (init_cplus_expand): Remove.
3695         * lex.c (cxx_init): Don't call init_cplus_expand.
3696
3697 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
3698
3699         PR c++/4884.
3700         * init.c (build_new_1): Allow for the fact the result of
3701         build_function_call may be a COMPOUND_EXPR.
3702
3703 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
3704
3705         PR c++/5682
3706         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
3707         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
3708         (dfs_skip_nonprimary_vbases_markedp): Remove.
3709         * search.c (get_shared_vbase_if_not_primary): Remove.
3710         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
3711         (dfs_skip_nonprimary_vbases_markedp): Remove.
3712         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
3713         (dfs_marked_real_bases_queue_p): Likewise.
3714
3715 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
3716
3717         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
3718         * cp-tree.h (cxx_mark_tree): New.
3719         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
3720
3721 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3722
3723         * cp-tree.h (cxx_maybe_build_cleanup): New.
3724         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
3725         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
3726         * tree.c (build_target_expr): Update.
3727         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
3728
3729 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
3730
3731         * decl2.c (cxx_decode_option): Handle -E.
3732         * lang-specs.h (default_compilers): Preprocess with cc1plus.
3733         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
3734
3735 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
3736
3737         PR c++/6037
3738         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
3739
3740 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3741
3742         * error.c (dump_type): Be careful about implicit typenames.
3743
3744 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3745
3746         PR C++/3656
3747         * semantics.c (finish_base_specifier): Handle erronous base
3748         classes.
3749
3750 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
3751
3752         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
3753         REAL_IS_NOT_DOUBLE.
3754
3755 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
3756
3757         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
3758         an index into the vtable_entry array regardless of
3759         TARGET_PTRMEMFUNC_VBIT_LOCATION.
3760
3761 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
3762
3763         * tree.c (cp_cannot_inline_tree_fn): Same.
3764
3765 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
3766
3767         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
3768         insert_block, getdecls, global_bindings_p): New.
3769
3770 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
3771
3772         PR c++/4361
3773         * mangle.c (struct globals) Add internal_mangling_p member.
3774         (write_template_param): Do internal mangling, if needed.
3775         (mangle_conv_op_name_for_type): Request internal mangling.
3776
3777 2002-03-20  Jason Merrill  <jason@redhat.com>
3778
3779         PR c++/2136
3780         * init.c (build_delete): Check access for a member op delete here.
3781         * decl2.c (delete_sanity): Not here.
3782
3783 2002-03-19  Jason Merrill  <jason@redhat.com>
3784
3785         PR c++/5118
3786         * class.c (get_vfield_name): Use the constructor_name.
3787
3788 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3789
3790         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
3791         * cp-tree.h (lang_printable_name): Rename.
3792         * error.c (lang_decl_name): Use new hook.
3793         * lex.c (cxx_init): Remove old hook.
3794         * pt.c (tsubst_decl): Use new hook.
3795         * tree.c (lang_printable_name): Rename.
3796
3797 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
3798
3799         PR c++/3882
3800         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
3801         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
3802         only after recording the declaration.
3803
3804 2002-03-18  Jason Merrill  <jason@redhat.com>
3805
3806         PR c++/2039
3807         * init.c (resolve_offset_ref): Hand off to build_component_ref.
3808
3809         PR c++/4222, c++/5995
3810         * call.c (build_over_call): Fix empty class logic.
3811
3812         PR c++/3870
3813         * cp-tree.h (struct saved_scope): Add last_parms field.
3814         * decl.c (maybe_push_to_top_level): Save last_function_parms.
3815         (pop_from_top_level): Restore it.
3816
3817         PR c++/4377
3818         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
3819         NON_LVALUE_EXPRs.
3820
3821         PR c++/4003
3822         * pt.c (tsubst_friend_function): Use decl_namespace_context.
3823
3824         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
3825         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
3826         type with a nontrivial destructor.
3827
3828 2002-03-17  Jason Merrill  <jason@redhat.com>
3829
3830         PR c++/4460
3831         * class.c (build_base_path): Virtual base layout is fixed in
3832         in-charge [cd]tors.
3833
3834 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
3835
3836         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
3837         * parse.y (yyparse): Remove macro.
3838
3839 2002-03-17  Jason Merrill  <jason@redhat.com>
3840
3841         PR c++/5757
3842         * init.c (build_new_1): Pass the right pointer to op delete.
3843
3844 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
3845
3846         PR c++/4361
3847         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
3848         conversion operators go.
3849         (struct lang_decl_flags): Add template_conv_p and unused
3850         bitfields.
3851         (DECL_TEMPLATE_CONV_FN_P): New macro.
3852         * call.c (build_user_type_conversion_1): Don't check second type
3853         conversion of overload set first.
3854         * class.c (add_method): Make sure templated conversion operators
3855         all end up on slot 2.
3856         * lex.c (do_identifier): A conversion operator token might be
3857         satisfied by a templated conversion operator.
3858         * pt.c (check_explicit_specialization): Use
3859         CLASSTYPE_FIRST_CONVERSION_SLOT.
3860         (template_parm_this_level_p): New function.
3861         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
3862         * search.c (lookup_fnfields_1): Template conversions will be on
3863         the first slot.
3864         * typeck.c (build_component_ref): Preserve the type of an
3865         conversion operator name on the overload type.
3866         (build_x_function_call): Retrieve the conversion operator name.
3867
3868 2002-03-15  Richard Henderson  <rth@redhat.com>
3869
3870         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
3871
3872 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
3873
3874         * cp-tree.h (CLEANUP_DECL): Remove.
3875         (CLEANUP_EXPR): Likewise.
3876         * decl.c (destroy_local_var): Simplify.
3877         (maybe_build_cleanup): Tidy.
3878         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
3879         * semantics.c (cp_expand_stmt): Likewise.
3880         * cp/tree.c (cp_statement_code_p): Likewise.
3881
3882 2002-03-15  Jason Merrill  <jason@redhat.com>
3883
3884         PR c++/5857
3885         * decl.c (duplicate_decls): Use merge_types instead of common_type.
3886         * typeck.c (common_type): Just hand off to
3887         type_after_usual_arithmetic_conversions and
3888         composite_pointer_type.
3889         (merge_types): New fn.
3890         (commonparms): Use it instead of common_type.
3891         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
3892         (composite_pointer_type): Also handle attributes.
3893         * cp-tree.h: Declare merge_types.
3894
3895         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
3896         variables.
3897         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
3898
3899 2002-03-14  Richard Henderson  <rth@redhat.com>
3900
3901         * decl.c: Include c-pragma.h.
3902         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
3903         * Make-lang.in: Update dependencies.
3904
3905 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
3906
3907         PR c++/5908
3908         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
3909         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
3910
3911 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
3912
3913         * mangle.c (write_builtin_type): Handle 128-bit integers even if
3914         they are not a standard integer type.
3915
3916 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
3917
3918         * cp-tree.h (init_init_processing): Remove declaration.
3919         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
3920         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
3921
3922 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3923
3924         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
3925         Define.
3926         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
3927         tree_code_length.
3928         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
3929         cplus_tree_code_name): Delete.
3930         (cxx_init): Don't call add_c_tree_codes, instead set
3931         lang_unsafe_for_reeval.  Don't try to copy into the various
3932         tree_code arrays.
3933
3934 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
3935
3936         PR c++/5659
3937         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
3938         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
3939         definitions.
3940
3941 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
3942
3943         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
3944         DR209 is now not a defect.
3945         * cp-tree.h (skip_type_access_control): Remove.
3946         * decl.c (grokdeclarator): Do type access control for friend
3947         declarations.
3948         * semantics.c (decl_type_access_control): Don't reset
3949         current_type_lookups.
3950         (save_type_access_control): Always save the lookups.
3951         (skip_type_access_control): Remove.
3952         (finish_class_definition): Don't change type_lookups.
3953
3954 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
3955
3956         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
3957         It is incorrect.
3958         * typeck.c (build_static_cast): Compare non-qualified types
3959         with pointer to member conversions.
3960
3961 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
3962             Daniel Berlin  <dan@dberlin.org>
3963
3964         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
3965         (cxx_get_alias_set): Use it.
3966
3967 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3968
3969         * cp-tree.h (stabilize_expr): Prototype.
3970
3971 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
3972
3973         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
3974         conditional return void.
3975
3976 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
3977
3978         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
3979         * cp-tree.h (cxx_unsave): New.
3980         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
3981         (init_tree): Update.
3982
3983 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3984
3985         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
3986         explicit sizeof/sizeof.
3987         * decl2.c (cxx_decode_option): Likewise.
3988         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
3989
3990 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
3991
3992         PR c++/775
3993         * decl.c (lookup_tag): Only reject enum/class mismatch, not
3994         class/union mismatch.
3995         * parse.y (check_class_key): New function.
3996         (structsp): Call it.
3997
3998 2002-03-01  Michael Matz  <matz@suse.de>
3999
4000         * typeck.c (cp_pointer_int_sum): Complete inner type which is
4001         used later by size_in_bytes().
4002
4003 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
4004
4005         * cp-tree.h:  Require __GNUC__ to be #defined.
4006         (build_init):  Add missing prototype.
4007
4008 2002-03-01  Jason Merrill  <jason@redhat.com>
4009
4010         * except.c: Don't include decl.h or obstack.h.  Do include
4011         tree-inline.h.
4012         (build_throw): Destroy temporaries from the thrown
4013         expression before calling __cxa_throw.  Construct a thrown
4014         temporary directly into the exception object.
4015         (stabilize_throw_expr): New function.
4016         (wrap_cleanups_r): New function.
4017         * tree.c (stabilize_expr): New function.
4018         * init.c (build_init): New function.
4019         * Make-lang.in (cp/except.o): Adjust .h deps.
4020
4021 2002-02-28  Jason Merrill  <jason@redhat.com>
4022
4023         * search.c (lookup_base_r): Don't clear is_non_public just because
4024         we found a friendly scope.
4025
4026         * decl.c (finish_function): Only warn about missing return
4027         statement with -Wreturn-type.
4028
4029 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
4030
4031         * class.c (build_clone): Update.
4032         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
4033         * cp-tree.h (cxx_dup_lang_specific_decl): New.
4034         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
4035         (copy_decl): Update.
4036         * method.c (make_thunk): Update.
4037
4038 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
4039
4040         * decl2.c: Delete traditional-mode-related code copied from
4041         the C front end but not used, or used only to permit the
4042         compiler to link.
4043
4044 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
4045
4046         PR c++/4093
4047         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
4048         to void.
4049
4050 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
4051
4052         PR other/5746
4053         * semantics.c (finish_switch_cond): Don't call get_unwidened
4054         if error_mark_node.
4055
4056 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
4057
4058         PR c++/2645, DR 295
4059         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
4060         tf_keep_type_decl.
4061         (make_typename_type): Use tsubst_flags_t.
4062         * decl.c (make_typename_type): Adjust. Return non-artificial
4063         TYPE_DECLs, if required.
4064         (grokdeclarator): Simplify CVR qualification handling. Allow bad
4065         qualifiers on typedef types.
4066         * decl2.c (handle_class_head): Adjust make_typename_type call.
4067         * parse.y (nested_name_specifier): Likewise.
4068         (typename_sub0): Likewise.
4069         (typename_sub1): Likewise.
4070         * pt.c (convert_template_argument): Adjust make_typename_type
4071         return value.
4072         (tsubst): Adjust cp_build_qualified_type_real calls.
4073         (check_cv_quals_for_unify): Cope with allowing bad qualifications
4074         on template type parms.
4075         (instantiate_decl): Recheck substitutions to give warnings on bad
4076         qualifications.
4077         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
4078
4079 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
4080
4081         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
4082
4083         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
4084         unless DECL_ALWAYS_INLINE.
4085
4086 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
4087
4088         * typeck.c (cp_pointer_int_sum): Renamed from
4089         pointer_int_sum, call pointer_int_sum.
4090
4091 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
4092
4093         * decl.c (duplicate_decls): Return 0 if issued error about
4094         redeclaration.
4095
4096 2002-02-19  Jason Merrill  <jason@redhat.com>
4097
4098         ABI change: Mangle `void (A::*)() const' as
4099         M1AKFvvE, not MK1AFvvE.
4100         * mangle.c (write_function_type): Write cv-quals for member
4101         function type here.
4102         (write_pointer_to_member_type): Not here.
4103
4104 2002-02-18  Jason Merrill  <jason@redhat.com>
4105
4106         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
4107         (do_decl_instantiation): Likewise.
4108
4109 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4110
4111         PR c++/5685
4112         * decl.c (duplicate_decls): Make warning unconditional
4113         if duplicate default argument declarations are present.
4114
4115 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
4116
4117         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
4118         shortening.
4119
4120 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
4121
4122         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
4123         remove incorrect comment. Move #if 0'd code to common path. Use
4124         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
4125
4126 2002-02-13  Jason Merrill  <jason@redhat.com>
4127
4128         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
4129         (finish_function): Don't warn if current_function_returns_null.
4130
4131         * typeck2.c (digest_init): Do handle values of vector type.
4132
4133         * typeck2.c (digest_init, process_init_constructor): Treat vectors
4134         like arrays.
4135
4136 2002-02-11  Jason Merrill  <jason@redhat.com>
4137
4138         * parse.y (reserved_declspecs): Don't handle attributes.
4139         (reserved_typespecquals): Handle them here.
4140         * Make-lang.in (parse.c): Adjust expected conflicts.
4141
4142 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
4143
4144         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
4145         instead of compstmt.
4146         (compstmt_or_stmtexpr): Renamed from compstmt.
4147         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
4148
4149 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
4150
4151         Rename instantiate_type_flags to tsubst_flags_t & expand use.
4152         * cp-tree.h (instantiate_type_flags): Rename to ...
4153         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
4154         add tf_warning flag.
4155         (instantiate_type): Adjust prototype.
4156         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
4157         do_type_instantiation, cp_build_qualified_type_real): Likewise.
4158         cp_build_qualified_type: Adjust.
4159         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
4160         tf_*.
4161         * call.c (standard_conversion): Rename itf_* to tf_*.
4162         (reference_binding): Likewise.
4163         (convert_like_real): Likewise.
4164         * cvt.c (cp_convert_to_pointer): Likewise.
4165         (convert_to_reference): Likewise.
4166         * decl.c (lookup_namespace_name): Use tf_* flags.
4167         (make_typename_type): Likewise.
4168         (grokdeclarator): Likewise.
4169         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
4170         (coerce_template_template_parms, convert_template_argument,
4171         coerce_template_parms, maybe_get_template_decl_from_type_decl,
4172         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
4173         instantiate_class_template, tsubst_template_arg_vector,
4174         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
4175         tsubst_decl, tsubst_arg_types, tsubst_function_type,
4176         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
4177         instantiate_template, fn_type_unification,
4178         resolve_overloaded_unification, verify_class_unification,
4179         unify, get_bindings_real, do_type_instantiation,
4180         regenerate_decl_from_template, instantiate_decl,
4181         tsubst_initializer_list, tsubst_enum,
4182         get_mostly_instantiated_function_type,
4183         invalid_nontype_parm_type_p): Likewise.
4184         * tree.c (cp_build_qualified_type_real): Likewise.
4185         * typeck.c (build_binary_op): Rename itf_* to tf_*.
4186         (build_ptrmemfunc): Likewise.
4187         (convert_for_assignment): Likewise.
4188
4189 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
4190
4191         PR c++/109
4192         * decl.c (grokdeclarator): Allow friend declarations from
4193         dependent types.
4194         * decl2.c (handle_class_head): Don't push into template parm contexts.
4195         * pt.c (push_template_decl_real): Template parm contexts are never
4196         being defined.
4197
4198 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
4199
4200         * class.c: Include target.h.
4201         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
4202         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
4203         bit-field layout.
4204         * Make-lang.in: Adjust deps.
4205
4206 2002-02-05  Jason Merrill  <jason@redhat.com>
4207
4208         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
4209
4210 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
4211
4212         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
4213         (finish_switch_cond): Set SWITCH_TYPE.
4214
4215 2002-02-04  Richard Henderson  <rth@redhat.com>
4216
4217         * method.c (use_thunk): Always initialize the block tree.  Reindent.
4218         * semantics.c (expand_body): Emit thunks after function, not before.
4219
4220 2002-02-04  Jason Merrill  <jason@redhat.com>
4221
4222         * decl.c (start_function): Call cplus_decl_attributes immediately
4223         after grokdeclarator.
4224
4225         * decl.c (start_function): Combine DECL_RESULT handling code.
4226
4227 2002-02-03  Jason Merrill  <jason@redhat.com>
4228
4229         * xref.c: Remove.
4230         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
4231         (cp/xref.o): Remove dependencies.
4232         * class.c (finish_struct_1, check_methods): Don't call xref fns.
4233         (finish_struct_1): Likewise.
4234         * friend.c (make_friend_class): Likewise.
4235         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
4236         * spew.c (read_process_identifier): Likewise.
4237
4238 2002-02-01  Jason Merrill  <jason@redhat.com>
4239
4240         PR c++/4872
4241         * decl.c (finish_function): Warn about a non-void function with
4242         no return statement and no abnormal exit.
4243         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
4244         (current_function_returns_abnormally): New macro.
4245         * call.c (build_call): Set it.
4246
4247         * typeck.c (build_component_ref): Always complain about offsetof
4248         constructs on non-PODs.  Only make it an error for members of
4249         virtual bases.
4250
4251         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
4252         (dump_function_decl): Always dump parms.
4253
4254         * decl2.c (finish_static_data_member_decl): Complain about a local
4255         class with a static data member.
4256
4257         PR c++/4286
4258         * search.c (lookup_field_1): Don't xref a static data member
4259         just because we looked it up.
4260
4261 2002-01-31  Jason Merrill  <jason@redhat.com>
4262
4263         * Make-lang.in (parse.c): Handle .output file.
4264
4265         PR c++/3395
4266         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
4267         not TREE_TYPE.
4268         * semantics.c (finish_class_definition): Adjust.
4269
4270         Allow attributes in parms and casts.
4271         * parse.y (named_parm): Don't strip attrs.
4272         (declmods): Remove 'attributes' production.
4273         (nonempty_cv_qualifiers): Accept attributes.
4274         (ATTRIBUTE): Give precedence.
4275         * decl.c (groktypename): Handle attributes.
4276         (grokparms): Likewise.
4277
4278 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
4279
4280         * decl2.c (cxx_decode_option): Pass 0 as last argument to
4281         cpp_handle_option.
4282         * lang-specs.h: Use cpp_unique_options instead of cpp_options
4283         when used together with cc1_options.
4284
4285 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
4286
4287         PR c++/5132
4288         * typeck2.c (digest_init): Make sure non-array core type is
4289         instantiated.
4290         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
4291         constructor, rather than build a new one.
4292         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
4293         PURPOSE of constructor elts.
4294
4295 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
4296
4297         * Make-lang.in (parse.c): Adjust expected number of
4298         shift-reduce conflicts.
4299         (decl.o): Depend on diagnostic.h.
4300         * decl.c: Include diagnostic.h.
4301         (grokdeclarator): Check for null pointer.
4302         (finish_function): Don't abort when
4303         current_binding_level->parm_flag != 1, if errors have
4304         occurred; throw away the statement tree and extra binding
4305         levels, and continue.
4306         * lex.c (note_list_got_semicolon): Check for null pointer.
4307         * method.c (hack_identifier): Just return error_mark_node if
4308         value is error_mark_node.
4309         * parse.y (primary: TYPEID(type_id)): No need to use
4310         TYPE_MAIN_VARIANT here.
4311         (handler_seq): Accept an empty list of catch clauses and
4312         generate a fake handler block to avoid later crashes.
4313         (ansi_raise_identifier): Accept the error token too.
4314         * semantics.c (begin_class_definition,
4315         finish_class_definition): Check for error_mark_node.
4316
4317 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
4318
4319         * typeck2.c (friendly_abort): Delete definition.
4320         * cp-tree.h (friendly_abort): Don't prototype.
4321         (my_friendly_assert): Use fancy_abort.
4322
4323 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4324
4325         * cp-tree.h (my_friendly_abort): Remove.
4326
4327 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
4328
4329         * spew.c (pending_inlines, pending_inlines_tail,
4330         processing_these_inlines): Make static.
4331         (mark_pending_inlines): Remove static.
4332         (begin_parsing_inclass_inline): If in function, save pi
4333         for GC to cp_function_chain->unparsed_inlines instead.
4334         (process_next_inline): Likewise.
4335         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
4336         (mark_pending_inlines): Add prototype.
4337         * decl.c (spew_debug): Remove unused extern.
4338         (mark_lang_function): Call mark_pending_inlines.
4339
4340 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4341
4342         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
4343         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
4344         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
4345         Change my_fancy_abort() to abort().
4346
4347 2002-01-23  Jason Merrill  <jason@redhat.com>
4348
4349         PR c++/5453
4350         * class.c (fixed_type_or_null): Fix thinko.
4351
4352         PR c++/3331
4353         * init.c (resolve_offset_ref): Use build_indirect_ref.
4354
4355         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
4356
4357 2002-01-22  Jason Merrill  <jason@redhat.com>
4358
4359         * parse.y (function_body): Suppress the block for the outermost
4360         curly braces.
4361         * decl.c (pushdecl): Don't try to skip it.
4362         (begin_function_body): Keep the block we create, not the next one.
4363         * init.c (emit_base_init): Don't mess with keep_next_level.
4364
4365         * class.c (build_base_path): Tweak formatting.
4366
4367 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
4368
4369         Fix regression introduced with patch for c++/775
4370         * parse.y (class_head_defn): Check for template specializations
4371         with a different class-key.
4372
4373 2002-01-17  Jason Merrill  <jason@redhat.com>
4374
4375         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
4376         (begin_function_body): Call them and keep_next_level.
4377         * init.c (emit_base_init): Call keep_next_level.
4378         * semantics.c (setup_vtbl_ptr): Lose.
4379         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
4380         (vtbls_set_up_p): Lose.
4381         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
4382         * method.c (do_build_copy_constructor): Likewise.
4383         (synthesize_method): Call finish_mem_initializers.
4384         * parse.y (nodecls): Likewise.
4385
4386         * error.c (dump_type_suffix): Print the exception specs before
4387         recursing.
4388         (dump_function_decl): Here, too.
4389
4390         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
4391
4392 2002-01-10  Ira Ruben   <ira@apple.com>
4393
4394         PR c++/907
4395         * decl.c (start_method): Handle attrlist.
4396
4397 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
4398
4399         * decl2.c (max_tinst_depth): Increase default limit to 500.
4400
4401 2002-01-10  Graham Stott  <grahams@redhat.com>
4402
4403         * spew.c (YYCHAR): Uppercase macro parameter and add
4404         parenthesis.
4405         (YYCODE): Likewise.
4406         (NAME): Uppercase macro parameter.
4407
4408 2002-01-09  Graham Stott  <grahams@redhat.com>
4409
4410         * decl.h (grokdeclarator): Wrap long line.
4411
4412         * semantics.c (FINISH_COND): Uppercase macro paramaters and
4413         add parenthesis.
4414
4415 2002-01-08  Graham Stott  <grahams@redhat.com>
4416
4417         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
4418         (PALLOC): Uppercase macro parameter and whitespace.
4419         (SALLOC): Uppercase macro parameter.
4420         (SFREE): Uppercase macros parameter, add parenthese and
4421         whitespace.
4422         (STREQL): Uppercase macro parameter and whitespace.
4423         (STRNEQ): Likewise.
4424         (STRLSS): Likewise.
4425         (STRLEQ): Likewise.
4426         (STRGTR): Likewise.
4427         (STRGEQ): Likewise.
4428
4429         * call.c (convert_like): Add parenthesis and wrap.
4430         (convert_like_with_context): Likewise.
4431         (ICS_RANK): Whitespace.
4432         (NEED_TEMPORARY_P): Remove parenthesis.
4433
4434         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
4435         whitespace.
4436         (VTT_MARKED_BINFO_P): Likewise.
4437
4438         * decl.c (BINDING_LEVEL): Add parenthesis.
4439         (DEF_OPERATOR): Likewise.
4440
4441         * mangle.c (MANGLE_TRACE): Add parenthesis.
4442         (MANGLE_TRACE_TREE): Likewise.
4443         (write_signed_number): Likewise.
4444         (write_unsigned_number): Likewise.
4445
4446         * pt.c (ccat): Uppercase macro parameter.
4447         (cat): Likewise
4448
4449         * search.c (SET_BINFO_ACCESS): Add parenthesis.
4450
4451 2002-01-07  Jason Merrill  <jason@redhat.com>
4452
4453         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
4454         to pedwarn.
4455
4456         PR c++/3536
4457         * method.c (make_thunk): If !flag_weak, give the thunk the
4458         function's linkage.
4459         (use_thunk): Here, too.
4460
4461 2002-01-07  Graham Stott  <grahams@redhat.com>
4462
4463         * error.c: Update copyright date.
4464         (print_scope_operator): Add parenthesis.
4465         (print_left_paren): Likewise.
4466         (print_right_paren): Likewise.
4467         (print_left_bracket): Likewise.
4468         (print_right_bracket): Likewise.
4469         (print_template_argument_list_start): Likewise.
4470         (print_template_argument_list_end): Likewise.
4471         (print_non_consecutive_character): Likewise.
4472         (print_tree_identifier): Likewise.
4473         (print_identifier): Likewise.
4474         (NEXT_CODE): Uppercase macro parameter.
4475         (ident_fndecl): Delete unused.
4476         (GLOBAL_THING): Likewise.
4477
4478 2002-01-06  Graham Stott  <grahams@redhat.com>
4479
4480         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
4481         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
4482         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
4483         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
4484         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
4485         (C_IS_RESERVED_WORD): Uppercase macro parameter.
4486         (C_RID_YYCODE) Likewise.
4487         (ptrmem_cst): Use rtx.
4488         (LOCAL_BINDING_P): Add whitespace.
4489         (INHERITED_VALUE_BINDING_P): Likewise.
4490         (BINDING_SCOPE): Wrap long line.
4491         (BINDING_HAS_LEVEL_P): Remove parenthesis.
4492         (BINDING_VALUE): Wrap long line.
4493         (BINDING_TYPE): Whitespace.
4494         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
4495         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
4496         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
4497         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
4498         (same_type_p): Uppercase macro parameters.
4499         (same_type_ignoring_top_level_qualifiers_p): Likewise.
4500         (OVL_FUNCTION): Wrap long line.
4501         (OVL_CHAIN): Whitespace.
4502         (OVL_CURRENT): Add parenthesis and whitespace.
4503         (OVL_NEXT): Whitespace.
4504         (OVL_USED): Likewise.
4505         (IDENTIFIER_TYPE_VALUE): Likewise.
4506         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
4507         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
4508         (LANG_ID_FIELD): Whitespace.
4509         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
4510         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
4511         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
4512         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
4513         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
4514         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
4515         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
4516         (IDENTIFIER_VIRTUAL_P): Likewise.
4517         (IDENTIFIER_OPNAME_P): Likewise.
4518         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
4519         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
4520         (C_SET_EXP_ORIGINAL_CODE): Likewise.
4521         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
4522         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
4523         (IS_AGGR_TYPE): Uppercase macro parameter.
4524         (CLASS_TYPE_P): Likewise.
4525         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
4526         (IS_AGGR_TYPE_2): Whitespace.
4527         (TAGGED_TYPE_P): Uppercase macro parameter.
4528         (TYPE_BUILT_IN): Whitespace.
4529         (TYPE_FOR_JAVA): Likewise.
4530         (FUNCTION_ARG_CHAIN): Remove parenthesis.
4531         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
4532         (FUNCTION_FIRST_USER_PARAM): Likewise.
4533         (PROMOTES_TO_AGGR_TYPE): Whitespace.
4534         (DERIVED_FROM_P): Add parenthesis and wrap.
4535         (UNIQUELY_DERIVED_FROM_P): Likewise.
4536         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
4537         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
4538         (CLASSTYPE_USE_TEMPLATE): Whitespace.
4539         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
4540         (TYPE_GETS_DELETE): Add parenthesis.
4541         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
4542         (TYPE_HAS_ASSIGN_REF): Likewise,
4543         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
4544         (TYPE_HAS_INIT_REF): Likewise.
4545         (TYPE_HAS_CONST_INIT_REF): Likewise.
4546         (TYPE_BEING_DEFINED): Likewise.
4547         (TYPE_LANG_SPECIFIC): Likewise.
4548         (CLASSTYPE_RTTI): Likewise.
4549         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
4550         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
4551         (TYPE_OVERLOADS_ARROW): Likewise.
4552         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
4553         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
4554         (CLASSTYPE_METHOD_VEC): Likewise.
4555         (CLASSTYPE_MARKED_N): Likewise.
4556         (CLASSTYPE_MARKED): Likewise.
4557         (CLASSTYPE_MARKED2): Likewise.
4558         (CLASSTYPE_MARKED3): Likewise.
4559         (CLASSTYPE_MARKED4): Likewise.
4560         (CLASSTYPE_MARKED5): Likewise.
4561         (CLASSTYPE_MARKED6): Likewise.
4562         (SET_CLASSTYPE_MARKED): Whitespace.
4563         (CLEAR_CLASSTYPE_MARKED): Likewise.
4564         (SET_CLASSTYPE_MARKED2): Likewise.
4565         (CLEAR_CLASSTYPE_MARKED2): Likewise.
4566         (SET_CLASSTYPE_MARKED3): Likewise.
4567         (CLEAR_CLASSTYPE_MARKED3): Likewise.
4568         (SET_CLASSTYPE_MARKED4): Likewise.
4569         (CLEAR_CLASSTYPE_MARKED4): Likewise.
4570         (SET_CLASSTYPE_MARKED5): Likewise.
4571         (CLEAR_CLASSTYPE_MARKED5): Likewise.
4572         (SET_CLASSTYPE_MARKED6): Likewise.
4573         (CLEAR_CLASSTYPE_MARKED6): Likewise.
4574         (CLASSTYPE_TAGS): Likewise.
4575         (CLASSTYPE_VSIZE): Likewise.
4576         (CLASSTYPE_VBASECLASSES): Likewise.
4577         (CANONICAL_BINFO): Add parenthesis.
4578         (CLASSTYPE_SIZE(NODE): Likewise.
4579         (CLASSTYPE_SIZE_UNIT): Likewise.
4580         (CLASSTYPE_ALIGN(NODE): Likewise.
4581         (CLASSTYPE_USER_ALIGN): Likewise.
4582         (TYPE_JAVA_INTERFACE): Likewise.
4583         (CLASSTYPE_PURE_VIRTUALS): Likewise.
4584         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
4585         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
4586         (CLASSTYPE_HAS_MUTABLE): Likewise.
4587         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
4588         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
4589         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
4590         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
4591         (CLASSTYPE_INTERFACE_ONLY): Likewise.
4592         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
4593         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
4594         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
4595         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
4596         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
4597         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
4598         (BINFO_UNSHARED_MARKED): Whitespace.
4599         (BINFO_MARKED): Whitespace and wrap.
4600         (SET_BINFO_MARKED): Likewise.
4601         (CLEAR_BINFO_MARKED): Likewise.
4602         (BINFO_VTABLE_PATH_MARKED): Likewise.
4603         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
4604         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
4605         (BINFO_SUBVTT_INDEX): Remove parenthesis.
4606         (BINFO_VPTR_INDEX): Likewise.
4607         (BINFO_PRIMARY_BASE_OF): Likewise,
4608         (CLASSTYPE_VFIELDS): Whitespace.
4609         (VF_DERIVED_VALUE): Wrap long line.
4610         (NAMESPACE_LEVEL): Whitespace.
4611         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
4612         (DEFARG_POINTER): Whitespace.
4613         (DECL_NEEDED_P): Remove parenthesis.
4614         (DECL_LANGUAGE): Whitespace.
4615         (SET_DECL_LANGUAGE): Add parenthesis.
4616         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
4617         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
4618         (DECL_IN_AGGR_P): Whitespace.
4619         (DECL_FRIEND_P): Likewise.
4620         (DECL_BEFRIENDING_CLASSES): Likewise.
4621         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
4622         (DECL_NONCONVERTING_P): Whitespace.
4623         (DECL_PURE_VIRTUAL_P): Likewise.
4624         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
4625         (DECL_PENDING_INLINE_INFO): Whitespace.
4626         (DECL_SORTED_FIELDS): Likewise.
4627         (DECL_DEFERRED_FN): Likewise.
4628         (DECL_TEMPLATE_INFO): Likewise.
4629         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
4630         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
4631         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
4632         (TMPL_ARGS_LEVEL): Likewise.
4633         (SET_TMPL_ARGS_LEVEL): Likewise.
4634         (INNERMOST_TEMPLATE_PARMS): Whitespace.
4635         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
4636         (INTEGRAL_CODE_P(CODE): Add parenthesis.
4637         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
4638         (TYPE_HAS_CONSTRUCTOR): Whitespace.
4639         (TREE_HAS_CONSTRUCTOR): Likewise.
4640         (TYPE_HAS_DESTRUCTOR): Likewise.
4641         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
4642         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
4643         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
4644         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
4645         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
4646         (TYPE_PTRMEMFUNC_P): Likewise.
4647         (TYPE_PTRMEMFUNC_FLAG): Likewise.
4648         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
4649         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
4650         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
4651         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
4652         (DECL_ACCESS): Whitespace.
4653         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
4654         (DECL_GLOBAL_DTOR_P): Likewise.
4655         (GLOBAL_INIT_PRIORITY): Likewise.
4656         (DECL_TEMPLATE_PARMS): Likewise.
4657         (DECL_TEMPLATE_RESULT): Likewise.
4658         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
4659         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
4660         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
4661         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
4662         (PRIMARY_TEMPLATE_P): Add parenthesis.
4663         (DECL_USE_TEMPLATE): Whitespace.
4664         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
4665         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
4666         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
4667         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
4668         (CALL_DECLARATOR_PARMS): Remove parenthesis.
4669         (CALL_DECLARATOR_QUALS): Likewise.
4670         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
4671         (TEMP_NAME_P): Wrap.
4672         (VFIELD_NAME_P): Likewise.
4673         (B_SET): Uppercase macro parameters and add parenthesis.
4674         (B_CLR): Likewise.
4675         (B_TST): Likewise.
4676         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
4677         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
4678         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
4679         (same_or_base_type_p): Likewise.
4680         (cp_deprecated): Likewise.
4681
4682 2002-01-05  Richard Henderson  <rth@redhat.com>
4683
4684         * semantics.c (expand_body): Revert last change.
4685
4686 2002-01-04  Jason Merrill  <jason@redhat.com>
4687
4688         PR c++/4122
4689         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
4690         lost primary.
4691
4692         * class.c (build_vtbl_initializer): Check for a lost primary
4693         before calculating the vtable entry to throw away.
4694
4695 2002-01-02  Jason Merrill  <jason@redhat.com>
4696
4697         * semantics.c (expand_body): Call outlining_inline_function when
4698         emitting an inline function out of line.
4699
4700 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4701
4702         PR c++/5116, c++/764 reversion
4703         * call.c (build_new_op): Revert the instantiations. They are
4704         incorrect.
4705
4706 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4707
4708         PR c++/5089
4709         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
4710
4711 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4712
4713         PR c++/3716
4714         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
4715         (tsubst, case POINTER_TYPE): Handle pmfs here.
4716         (tsubst, case OFFSET_TYPE): Check it is not an offset to
4717         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
4718
4719 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4720
4721         PR c++/35
4722         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
4723         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
4724         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
4725         PARM_DECL.
4726         (tsubst_template_parms): Break up loop statements.
4727         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
4728         parm PARM_DECLs don't get promoted.
4729
4730 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4731
4732         PR c++/5123
4733         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
4734         (build_x_function_call): Cope with a COMPONENT_REF containing a
4735         TEMPLATE_ID_EXPR.
4736
4737 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4738
4739         PR c++/5213
4740         * pt.c (convert_template_argument): Be more careful determining
4741         when RECORD_TYPE templates are or are not templates.
4742
4743 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4744
4745         PR c++/775
4746         * cp-tree.h (handle_class_head): Adjust prototype.
4747         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
4748         parameters. Use for all class heads.
4749         * parse.y (named_class_head_sans_basetype, named_class_head,
4750         named_complex_class_head_sans_basetype,
4751         named_class_head_sans_basetype_defn,
4752         unnamed_class_head): Remove.
4753         (class_head, class_head_apparent_template): Recognize class heads
4754         (class_head_decl, class_head_defn): New reductions. Process class
4755         heads.
4756         (structsp): Adjust class definition and class declaration
4757         reductions.
4758         (maybe_base_class_list): Give diagnostic on empty list.
4759
4760 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4761
4762         PR c++/4379
4763         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
4764         single non-static member.
4765         (unary_complex_lvalue): If it cannot be a pointer to member, don't
4766         make it so. Check it is not pointer to reference.
4767
4768 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4769
4770         PR c++/5132
4771         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
4772         are processing a template decl.
4773
4774 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
4775
4776         PR c++/5116, c++/764
4777         * call.c (build_new_op): Make sure template class operands are
4778         instantiated. Simplify arglist construction.
4779
4780 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
4781
4782         * call.c (build_user_type_conversion_1): Use my_friendly_assert
4783         rather than if ... abort.
4784         * cvt.c (convert_to_reference): Likewise.
4785         * semantics.c (setup_vtbl_ptr): Likewise.
4786         * pt.c (lookup_template_class): Comment typo.
4787
4788 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
4789
4790         PR c++/5125
4791         * pt.c (push_template_decl_real): Make sure DECL has
4792         DECL_LANG_SPECIFIC.
4793
4794 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
4795
4796         PR c++/335
4797         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
4798         for non-reference fields.
4799         * typeck.c (require_complete_type): Use resolve_offset_ref).
4800
4801 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
4802
4803         PR c++/196
4804         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
4805
4806 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
4807
4808         PR c++/160
4809         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
4810         up. Don't stabilize_references when initializing a reference.
4811
4812 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4813
4814         * decl2.c (lang_f_options): Const-ify.
4815
4816 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
4817
4818         * config-lang.in (diff_excludes): Remove.
4819
4820 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
4821
4822         PR c++/90
4823         * typeck.c (build_function_call_real): Use original function
4824         expression for errors.
4825
4826 2001-12-18  Jason Merrill  <jason@redhat.com>
4827
4828         PR c++/3242
4829         * class.c (add_method): Do compare 'this' quals when trying to match a
4830         used function.  Don't defer to another used function.
4831
4832 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
4833
4834         * pt.c (instantiate_clone): Remove, fold into ...
4835         (instantiate_template): ... here. Simplify by removing mutual
4836         recursion.
4837         * typeck2.c (build_m_component_ref): Don't cv qualify the function
4838         pointed to by a pointer to function.
4839         * class.c (delete_duplicate_fields_1): Typo.
4840
4841 2001-12-18  Jason Merrill  <jason@redhat.com>
4842
4843         C++ ABI change: destroy value arguments in caller.
4844         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
4845         create an extra binding level for the parameters.
4846         * decl.c (store_parm_decls): Don't do parameter cleanups.
4847
4848 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
4849
4850         * call.c (build_new_method_call): Use '%#V'.
4851         * error.c (cv_to_string): Use V parameter to determine padding.
4852
4853 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
4854
4855         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
4856         spellings in messages.
4857
4858 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
4859
4860         * cp-tree.h: Delete #defines for cp_error, cp_warning,
4861         cp_pedwarn, and cp_compiler_error.
4862         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
4863         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
4864         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
4865         typeck2.c: Change calls to the above macros to use their
4866         language-independent equivalents: error, warning, pedwarn, and
4867         internal_error respectively.
4868
4869 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
4870
4871         * decl2.c (finish_file): Remove back_end_hook.
4872
4873 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
4874
4875         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
4876         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
4877         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
4878
4879 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
4880
4881         * lang-options.h: Use American spelling in messages.
4882
4883 2001-12-13  Jason Merrill  <jason@redhat.com>
4884
4885         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
4886
4887         Use cleanups to run base and member destructors.
4888         * init.c (push_base_cleanups): New function, split out from...
4889         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
4890         * decl.c (finish_destructor_body): Move vbase destruction code to
4891         push_base_cleanups.
4892         (begin_function_body, finish_function_body): New fns.
4893         (finish_function): Move [cd]tor handling and call_poplevel to
4894         finish_function_body.
4895         (pushdecl): Skip the new level.
4896         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
4897         (setup_vtbl_ptr): Call push_base_cleanups.
4898         * method.c (synthesize_method): Call {begin,end}_function_body.
4899         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
4900         * cp-tree.h: Declare new fns.
4901         * parse.y (function_body, .begin_function_body): New nonterminals.
4902         (fndef, pending_inline, function_try_block): Use function_body.
4903         (ctor_initializer_opt, function_try_block): No longer has a value.
4904         (base_init): Remove .set_base_init token.
4905         (.set_base_init, compstmt_or_error): Remove.
4906         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
4907
4908         * optimize.c (maybe_clone_body): Fix parameter updating.
4909
4910 2001-12-12  Jason Merrill  <jason@redhat.com>
4911
4912         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
4913         * semantics.c (genrtl_start_function): Don't pass
4914         parms_have_cleanups or push an extra binding level.
4915         (genrtl_finish_function): Lose cleanup_label cruft.
4916
4917         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
4918         (ctor_label): Remove.
4919         * semantics.c (finish_return_stmt): Lose ctor_label support.
4920         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
4921         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
4922         dtor_label.
4923
4924         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
4925         check for [cd]tors.
4926         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
4927
4928         * decl.c (finish_function): Check VMS_TARGET, not VMS.
4929
4930         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
4931         (end_cleanup_fn): And poplevel.
4932
4933         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
4934         if we're in a template.
4935
4936 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
4937
4938         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
4939         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
4940         THIS_NAME_P): Delete.
4941         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
4942         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
4943         with internal naming scheme.
4944         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
4945
4946 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
4947
4948         * decl.c (grokdeclarator): Deprecated implicit typename use.
4949
4950 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
4951
4952         PR g++/51
4953         * parse.y (frob_specs): Indicate it is a language linkage which
4954         contained the extern.
4955         * decl.c (grokdeclarator): Allow extern language linkage with
4956         other specifiers.
4957
4958 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
4959
4960         PR g++/72
4961         * decl.c (add_binding): Don't reject duplicate typedefs involving
4962         template parameters.
4963
4964 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
4965
4966         * parse.y, semantics.c: Similarly.
4967
4968 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
4969
4970         PR g++/87
4971         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
4972         (copy_args_p): Rename to ...
4973         (copy_fn_p): ... here.
4974         (grok_special_member_properties): New function.
4975         (grok_op_properties): Lose VIRTUALP parameter.
4976         (copy_assignment_arg_p): Remove.
4977         * call.c (build_over_call): Use copy_fn_p.
4978         * decl.c (grokfndecl): Reformat. Adjust call to
4979         grok_op_properties.
4980         (copy_args_p): Rename to ...
4981         (copy_fn_p): ... here. Reject template functions. Check for pass
4982         by value.
4983         (grok_special_member_properties): Remember special functions.
4984         (grok_ctor_properties): Don't remember them here, just check.
4985         (grok_op_properties): Likewise.
4986         (start_method): Call grok_special_member_properties.
4987         * decl2.c (grokfield): Likewise.
4988         (copy_assignment_arg_p): Remove.
4989         (grok_function_init): Don't remember abstract assignment here.
4990         * pt.c (instantiate_class_template): Call
4991         grok_special_member_properties.
4992         (tsubst_decl): Adjust grok_op_properties call.
4993
4994 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
4995
4996         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
4997         RID_TYPES_COMPATIBLE_P.
4998
4999 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5000
5001         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
5002         call to build_aggr_init.
5003         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
5004
5005 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
5006
5007         * parse.y: Replace uses of the string non-terminal with STRING.
5008         Don't perform string concatentaion here.
5009         (string): Remove non-terminal.
5010         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
5011
5012 2001-12-05  Jason Merrill  <jason@redhat.com>
5013
5014         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
5015         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
5016         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
5017         * pt.c (push_tinst_level): No longer static.
5018         * cp-tree.h: Declare them.
5019
5020         * init.c (resolve_offset_ref): Don't check access for the base
5021         conversion to access a FIELD_DECL.
5022
5023         * cp-tree.h (TYPE_REFFN_P): New macro.
5024         * decl.c (bad_specifiers): Check it, too.
5025
5026         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
5027         on the __*_type_info type if we haven't seen a definition.
5028
5029 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
5030
5031         * decl.c: Include c-common.h.
5032         (shadow_warning): Move to c-common.c.
5033
5034 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5035
5036         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
5037
5038 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
5039
5040         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
5041
5042 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
5043
5044         PR g++/164
5045         * init.c (sort_base_init): Allow binfos to be directly specified.
5046         * method.c (do_build_copy_constructor): Explicitly convert to the
5047         base instance.
5048         (do_build_assign_ref): Likewise.
5049
5050 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
5051
5052         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
5053         declaration and initialization.
5054
5055 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
5056
5057         * typeck2.c: Remove leading capital from diagnostic messages, as
5058         per GNU coding standards.
5059
5060 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
5061
5062         PR c++/3394
5063         * decl.c (xref_basetypes): Handle attributes between
5064         'class' and name.
5065
5066 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
5067
5068         PR g++/3381
5069         * parse.y (named_complex_class_head_sans_basetype): Add new
5070         reduction.
5071         * Make-lang.in (parse.c): Adjust expected conflict count.
5072
5073 2001-12-03  Jason Merrill  <jason@redhat.com>
5074
5075         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
5076         immediate binfos for our virtual bases.
5077
5078 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
5079
5080         * call.c (build_java_interface_fn_ref): Similarly.
5081         * except.c (is_admissible_throw_operand): Similarly.
5082         * init.c (build_java_class_ref): Similarly.
5083         * xref.c (open_xref_file): Similarly.
5084
5085 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5086
5087         * class.c (finish_struct): Remove trailing periods from messages.
5088         * decl.c (check_tag_decl): Similarly.
5089         * lex.c (cxx_set_yydebug): Similarly.
5090         * typeck2.c (friendly_abort): Similarly.
5091
5092 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5093
5094         PR c++/3048
5095         * cp-tree.h (ovl_member): Remove.
5096         * decl2.c (merge_functions): Handle extern "C" functions
5097         specially.
5098         * tree.c (ovl_member): Remove.
5099
5100 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5101
5102         PR c++/4842
5103         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
5104         FUNCTION_DECL, as input.
5105         (mark_overriders): Remove.
5106         (warn_hidden): Rework for the new ABI.
5107
5108 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5109
5110         PR c++/3471
5111         * call.c (convert_like_real): Do not build additional temporaries
5112         for rvalues of class type.
5113
5114 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5115
5116         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
5117         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
5118         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
5119         (DERIVED_FROM_P): Likewise.
5120         (enum base_access): Renumber, add ba_quiet bit mask.
5121         (get_binfo): Remove.
5122         (get_base_distance): Remove.
5123         (binfo_value): Remove.
5124         (ACCESSIBLY_DERIVED_FROM_P): Remove.
5125         * call.c (standard_conversion): Use lookup_base.
5126         * class.c (strictly_overrides): Likewise.
5127         (layout_virtual_bases): Likewise.
5128         (warn_about_ambiguous_direct_bases): Likewise.
5129         (is_base_of_enclosing_class): Likewise.
5130         (add_vcall_offset_vtbl_entries_1): Likewise.
5131         * cvt.c (build_up_reference): Adjust comment.
5132         * init.c (build_member_call): Reformat.
5133         * search.c (get_binfo): Remove.
5134         (get_base_distance_recursive): Remove.
5135         (get_base_distance): Remove.
5136         (lookup_base_r): Tweak.
5137         (lookup_base): Add ba_quiet control. Complete the types here.
5138         (covariant_return_p): Use lookup_base.
5139         * tree.c (binfo_value): Remove.
5140         (maybe_dummy_object): Use lookup_base.
5141         * typeck.c (build_static_cast): Use lookup_base.
5142         (get_delta_difference): Likewise.
5143         * typeck2.c (binfo_or_else): Use lookup_base.
5144         (build_scoped_ref): Add back error_mark_check.
5145         (build_m_component_ref): Use lookup_base.
5146
5147 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
5148
5149         * Make-lang.in (c++.generated-manpages): New dummy target.
5150
5151 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5152
5153         * Make-lang.in (cp-lang.o): Depends on c-common.h.
5154         * cp-lang.c (c-common.h): Include.
5155         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
5156         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
5157         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
5158
5159 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5160
5161         * decl2.c (c_language): Move to c-common.c.
5162         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
5163         functions.
5164         (cxx_init): Update.
5165
5166 2001-11-26  Jason Merrill  <jason@redhat.com>
5167
5168         * call.c (joust): Remove COND_EXPR hack.
5169
5170 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
5171
5172         * search.c (lookup_base_r): Declare bk in variable declaration
5173         space.
5174
5175 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
5176
5177         PR g++/3145
5178         * class.c (build_vbase_pointer): Remove.
5179         (build_vbase_path): Remove.
5180         (build_base_path): New function.
5181         * cp-tree.h (base_access, base_kind): New enumerations.
5182         (build_base_path): Declare.
5183         (convert_pointer_to_real): Remove.
5184         (convert_pointer_to): Remove.
5185         (lookup_base): Declare.
5186         (convert_pointer_to_vbase): Remove.
5187         * call.c (build_scoped_method_call): Use lookup_base &
5188         build_base_path instead of convert_pointer_to_real,
5189         get_base_distance & get_binfo.
5190         (build_over_call): Likewise.
5191         * cvt.c (cp_convert_to_pointer): Likewise.
5192         (convert_to_pointer_force): Likewise.
5193         (build_up_reference): Likewise.
5194         (convert_pointer_to_real): Remove.
5195         (convert_pointer_to): Remove.
5196         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
5197         instead of convert_pointer_to_vbase & build_vbase_path.
5198         (emit_base_init): Use build_base_path instead of
5199         convert_pointer_to_real.
5200         (expand_virtual_init): Lose unrequired conversions.
5201         (resolve_offset_ref): Use lookup_base and build_base_path
5202         instead of convert_pointer_to.
5203         * rtti.c (build_dynamic_cast_1): Use lookup_base &
5204         build_base_path instead of get_base_distance & build_vbase_path.
5205         * search.c (get_vbase_1): Remove.
5206         (get_vbase): Remove.
5207         (convert_pointer_to_vbase): Remove.
5208         (lookup_base_r): New function.
5209         (lookup_base): New function.
5210         * typeck.c (require_complete_type): Use lookup_base &
5211         build_base_path instead of convert_pointer_to.
5212         (build_component_ref): Likewise.
5213         (build_x_function_call): Likewise.
5214         (get_member_function_from_ptrfunc): Likewise.
5215         (build_component_addr): Likewise.
5216         * typeck2.c (build_scoped_ref): Likewise.
5217
5218 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5219
5220         * cp-tree.h (CP_TYPE_QUALS): Removed.
5221         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
5222         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
5223         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
5224         * dump.c (cp_dump_tree): Use void* dump_info argument to match
5225         lang-hooks prototype.
5226         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
5227         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
5228         CP_TYPE_QUALS changed to cp_type_quals.
5229         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
5230         (CXX_C_OBJS): Remove c-dump.o.
5231
5232 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
5233
5234         PR c++/3637
5235         * pt.c (lookup_template_class): Ensure that all specializations
5236         are registered on the list corresponding to the most general
5237         template.
5238
5239 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
5240
5241         * call.c (non_reference): Add documentation.
5242         (convert_class_to_reference): Do not strip reference types
5243         from conversion operators.
5244         (maybe_handle_ref_bind): Simplify.
5245         (compare_ics): Correct handling of references.
5246
5247 2001-11-19  John Wilkinson <johnw@research.att.com>
5248
5249         * dump.c (dump_op): New function.
5250         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
5251         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
5252         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
5253
5254 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
5255
5256         PR4629
5257         * semantics.c (finish_sizeof): Make sure that expression created
5258         while processing a template do not have a type.
5259         (finish_alignof): Likewise.
5260         * typeck.c (c_sizeof): Likewise.
5261         (expr_sizeof): Likewise.
5262
5263 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5264
5265         * lex.c (cxx_finish): Call c_common_finish.
5266         (finish_parse): Remove.
5267
5268 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5269
5270         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
5271         when displaying error message about missing array bounds.
5272
5273 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5274
5275         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
5276         CONST_CAST_EXPR.
5277         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
5278
5279 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
5280
5281         * cp-tree.h (print_class_statistics): Restore.
5282
5283 2001-11-15  Jason Merrill  <jason@redhat.com>
5284
5285         * method.c (use_thunk): Don't emit debugging information for thunks.
5286
5287         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
5288         * decl.c (make_typename_type): Handle getting a class template.
5289         * search.c (lookup_field_r): A class template is good enough for
5290         want_type.
5291
5292         * call.c (convert_like_real): Only use cp_convert for the bad part.
5293         (standard_conversion): Also allow bad int->enum.
5294         * typeck.c (ptr_reasonably_similar): Also allow functions to
5295         interconvert.  Pointers to same-size integers are reasonably
5296         similar.
5297
5298         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
5299         give it void type.
5300
5301 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
5302
5303         PR g++/3154
5304         * init.c (sort_base_init): Remove unreachable code.
5305         (expand_member_init): Adjust comment to reflect reality. Simplify
5306         and remove unreachable code.
5307
5308 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
5309
5310         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
5311         (cxx_init): Update prototype.
5312         * decl.c (init_decl_processing): Rename.  Move null node init
5313         to its creation time.
5314         * lex.c (cxx_init_options): Update.
5315         (cxx_init): Combine with old init_parse; also call
5316         cxx_init_decl_processing.
5317
5318 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
5319
5320         * decl.c (check_initializer): Try to complete the type of an
5321         array element before checking whether it's complete.  Don't
5322         complain about arrays with complete element types but an
5323         unknown size.
5324         (cp_finish_decl): Build the hierarchical constructor before
5325         calling maybe_deduce_size_from_array_init.
5326
5327 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
5328
5329         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
5330
5331 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
5332
5333         PR g++/4206
5334         * parse.y (already_scoped_stmt): Remove.
5335         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
5336
5337 2001-11-12  H.J. Lu <hjl@gnu.org>
5338
5339         * cvt.c (ocp_convert): Don't warn the address of a weak
5340         function is always `true'.
5341
5342 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5343
5344         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
5345         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
5346         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
5347         * cp-tree.h (print_class_statistics): Remove.
5348         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
5349         cxx_print_identifier, cxx_set_yydebug): New.
5350         * lex.c (set_yydebug): Rename c_set_yydebug.
5351         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
5352         lang_print_xnode): Rename.
5353         * tree.c (print_lang_statistics): Rename.
5354
5355 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5356
5357         * class.c (dump_array): Fix format specifier warning.
5358
5359 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5360
5361         * cp-lang.c (LANG_HOOKS_NAME): Override.
5362         (struct lang_hooks): Constify.
5363         * lex.c (cxx_init_options): Update.
5364         (lang_identify): Remove.
5365         * parse.y (language_string): Remove.
5366
5367 2001-11-08  Andreas Franck  <afranck@gmx.de>
5368
5369         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
5370         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
5371         suggested by autoconf.
5372         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
5373         (c++.install-common): Use the transformed target alias names.
5374
5375 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
5376
5377         * Make-lang.in: Update.
5378         * cp-lang.c: Include langhooks-def.h.
5379
5380 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5381
5382         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
5383
5384 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5385
5386         * lex.c (copy_lang_type): Add static prototype.
5387
5388 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5389
5390         * pt.c (unify): Handle SCOPE_REF.
5391
5392 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
5393
5394         * tree.c (cp_copy_res_decl_for_inlining): Adjust
5395         DECL_ABSTRACT_ORIGIN for the return variable.
5396
5397 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
5398
5399         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
5400
5401 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
5402
5403         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
5404         semantics.c, spew.c: Fix spelling errors.
5405
5406 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5407
5408         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
5409
5410 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
5411
5412         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
5413         pop_everything.
5414
5415 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5416
5417         * cp-lang.c (cxx_get_alias_set): New function.
5418         Point LANG_HOOKS_GET_ALIAS_SET to it.
5419
5420 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5421
5422         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
5423         * cp-tree.h (make_unbound_class_template): Prototype new function.
5424         * decl.c (make_unbound_class_template): New function.
5425         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
5426         * error.c (dump_type): Likewise.
5427         * mangle.c (write_type): Likewise.
5428         * parse.y (template_parm): Likewise.
5429         (template_argument): Use make_unbound_class_template.
5430         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
5431         (tsubst): Likewise.
5432         (tsubst_copy): Likewise.
5433         (unify): Likewise.
5434         * tree.c (walk_tree): Likewise.
5435         * typeck.c (comptypes): Likewise.
5436
5437 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5438
5439         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
5440         extra calls into fewer ones.
5441
5442 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
5443
5444         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
5445         Warn when merging inline with attribute noinline.
5446         (start_decl, start_function): Warn if inline and attribute
5447         noinline appear in the same declaration.
5448
5449 2001-10-16  H.J. Lu <hjl@gnu.org>
5450
5451         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
5452         for tree checking disabled.
5453
5454 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
5455
5456         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
5457         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
5458
5459 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
5460
5461         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
5462         (unify): Only handle MINUS_EXPR specially if the above flag is set
5463         and the subtracted constant is 1.  Clear the flag on recursive calls.
5464         Set it when unifying the maximum value in an INTEGER_TYPE's range.
5465
5466 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
5467
5468         * decl.c (bad_specifiers): Don't allow exception specifications
5469         on any typedefs.
5470
5471 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
5472
5473         * cp/lex.c (init_cp_pragma): Similarly.
5474
5475 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5476
5477         * pt.c (lookup_template_class): Build complete template arguments
5478         for BOUND_TEMPLATE_TEMPLATE_PARM.
5479
5480 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5481
5482         * cp-tree.h (TYPE_BINFO): Update comment.
5483         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
5484         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
5485         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
5486         (copy_type): Prototype new function.
5487         * lex.c (copy_lang_decl): Gather tree node statistics.
5488         (copy_lang_type): New function.
5489         (copy_type): Likewise.
5490         (cp_make_lang_type): Create lang_type for
5491         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
5492         and BOUND_TEMPLATE_TEMPLATE_PARM.
5493         * pt.c (tsubst): Use copy_type instead of copy_node.
5494         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
5495
5496 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5497
5498         * pt.c (determine_specialization): Ignore functions without
5499         DECL_TEMPLATE_INFO.
5500
5501 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
5502
5503         PR g++/4476
5504         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
5505
5506 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
5507
5508         * typeck2.c (store_init_value): Don't re-digest a bracketed
5509         initializer.
5510
5511         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
5512         ANON_AGGR_TYPE_P.
5513
5514 2001-10-11  Richard Henderson  <rth@redhat.com>
5515
5516         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
5517         of an asm statement.
5518         (build_vtbl_ref_1): Split out from build_vtbl_ref.
5519         (build_vfn_ref): Use it to handle vtable descriptors before
5520         calling build_vtable_entry_ref.
5521         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
5522
5523 2001-10-10  Richard Henderson  <rth@redhat.com>
5524
5525         * parse.y (asm_operand): Allow named operands.
5526         * semantics.c (finish_asm_stmt): Tweek for changed location
5527         of the operand constraint.
5528
5529 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
5530
5531         * call.c (standard_conversion): Add bad conversion between
5532         integers and pointers.
5533         (convert_like_real): Don't use convert_for_initialization for bad
5534         conversions; complain here and use cp_convert.
5535         (build_over_call): Don't handle bad conversions specially.
5536         (perform_implicit_conversion): Allow bad conversions.
5537         (can_convert_arg_bad): New fn.
5538         * cp-tree.h: Declare it.
5539         * typeck.c (convert_for_assignment): Use it.
5540         (ptr_reasonably_similar): Any target type is similar to void.
5541
5542 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
5543
5544         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
5545         (cp/cp-lang.o): New rule.
5546         * cp-tree.h: Declare hooks.
5547         * tree.c: Make hooks non-static.
5548         (init_tree): Don't initialize hooks here.
5549         * lex.c: Likewise.  Move definition of lang_hooks to...
5550         * cp-lang.c: ... new file.
5551
5552 2001-10-08  Richard Henderson  <rth@redhat.com>
5553
5554         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
5555         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
5556
5557 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5558
5559         * class.c (build_vtable_entry_ref): Const-ify.
5560         * decl.c (predefined_identifier,
5561         initialize_predefined_identifiers): Likewise.
5562         * init.c (build_new_1): Likewise.
5563         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
5564         Likewise.
5565
5566 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
5567
5568         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
5569         (INSNS_PER_STMT): Likewise.
5570         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
5571         (copy_body, initialize_inlined_parameters): Likewise.
5572         (declare_return_variable, inlinable_function_p): Likewise.
5573         (expand_call_inline, expand_calls_inline): Likewise.
5574         (optimize_inline_calls, clone_body): Likewise.
5575         * tree.c (walk_tree): Moved to ../tree-inline.c.
5576         (walk_tree_without_duplicates): Likewise.
5577         (copy_tree_r, remap_save_expr): Likewise.
5578
5579 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
5580
5581         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
5582         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
5583         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
5584         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
5585         (flag_inline_trees): Moved declaration to ../tree-inline.h.
5586         (walk_tree): Moved declaration to ../tree-inline.h.
5587         (walk_tree_without_duplicates, copy_tree_r): Likewise.
5588         (remap_save_expr): Likewise.
5589         * decl.c: Include tree-inline.h.
5590         (lang_mark_tree): Don't mark inlined_fns.
5591         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
5592         * optimize.c: Include tree-inline.h.
5593         (optimize_inline_calls): Move declaration to ../tree.h, as
5594         non-static.
5595         (remap_decl): Use language-independent constructs and hooks.
5596         (remap_block, copy_body_r, declare_return_variable): Likewise.
5597         (inlinable_function_p): Likewise.  Don't test for
5598         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
5599         no longer language-specific.
5600         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
5601         call of dump_function to...
5602         (optimize_function): Here...
5603         (clone_body): New function, extracted from...
5604         (maybe_clone_body): ... here.  Build decl_map locally and pass
5605         it on to clone_body.
5606         * pt.c, semantics.c: Include tree-inline.h.
5607         * tree.c: Likewise.
5608         (cp_walk_subtrees): New language-specific hook for tree inlining.
5609         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
5610         cp_is_overload_p, cp_auto_var_in_fn_p,
5611         cp_copy_res_decl_for_inlining): Likewise.
5612         (walk_tree): Move language-specific constructs into...
5613         (cp_walk_subtrees): this new function.
5614         (copy_tree_r): Use language-independent constructs and hooks.
5615         (init_tree): Initialize tree inlining hooks.
5616         (remap_save_expr): Adjust prototype so that the declaration
5617         does not require the definition of splay_tree.
5618
5619 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5620
5621         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
5622         to build the declaration instead of the declaration itself.
5623
5624 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
5625
5626         * decl2.c (cxx_decode_option): Add 'else'.
5627
5628         * spew.c (end_input): No longer static.
5629         * cp-tree.h: Declare it.
5630         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
5631
5632 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
5633
5634         * call.c (build_over_call), typeck.c (build_function_call_real):
5635         Pass type attributes to check_function_format rather than name or
5636         assembler name.  Don't require there to be a name or assembler
5637         name to check formats.
5638
5639 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
5640
5641         * decl.c (init_decl_processing): Don't call
5642         init_function_format_info.  Initialize lang_attribute_table
5643         earlier.
5644         (builtin_function): Call decl_attributes.
5645         (insert_default_attributes): New.
5646
5647 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
5648
5649         * decl.c (grokdeclarator): Copy array typedef handling from C
5650         frontend.
5651
5652         * decl.c (grokdeclarator): Copy too-large array handling from C
5653         frontend.
5654
5655 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
5656
5657         * config-lang.in (target_libs): Added target-gperf, so that we
5658         don't try to build it if C++ is disabled.
5659
5660 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
5661
5662         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
5663         (cp/errfn.o): Delete rule.
5664         (cp/error.o): Depend on flags.h.
5665         * errfn.c: Delete file.
5666         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
5667         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
5668         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
5669         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
5670         internal_error respectively.  Make cp_deprecated into a macro.
5671         Don't define cp_printer typedef or declare cp_printers.
5672         * error.c: Include flags.h.
5673         Delete: struct tree_formatting_info, print_function_argument_list,
5674         print_declaration, print_expression, print_function_declaration,
5675         print_function_parameter, print_type_id, print_cv_qualifier_seq,
5676         print_type_specifier_seq, print_simple_type_specifier,
5677         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
5678         print_parameter_declaration_clause, print_exception_specification,
5679         print_nested_name_specifier, and definition of cp_printers.
5680         (locate_error): New function.
5681         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
5682         rewritten in terms of locate_error and diagnostic.c.
5683         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
5684         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
5685         (init_error): Adjust to match.
5686
5687 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5688
5689         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
5690
5691 2001-09-21  Richard Henderson  <rth@redhat.com>
5692
5693         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
5694         (build_vtbl_initializer): Likewise.
5695         (build_vfn_ref): New.
5696         * cp-tree.h: Declare it.
5697         * call.c (build_over_call): Use it.
5698         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
5699         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
5700
5701 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
5702
5703         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
5704
5705 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
5706
5707         Table-driven attributes.
5708         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
5709         * decl2.c (cplus_decl_attributes): Only take one attributes
5710         parameter.
5711         * cp-tree.c (cplus_decl_attributes): Update prototype.
5712         * class.c (finish_struct), decl.c (start_decl, start_function),
5713         decl2.c (grokfield), friend.c (do_friend), parse.y
5714         (parse_bitfield): Update calls to cplus_decl_attributes.
5715         * decl.c (grokdeclarator): Take a pointer to a single ordinary
5716         attribute list.
5717         * decl.h (grokdeclarator): Update prototype.
5718         * decl2.c (grokfield): Take a single ordinary attribute list.
5719         * friend.c (do_friend): Likewise.
5720         * decl.c (shadow_tag, groktypename, start_decl,
5721         start_handler_parms, grokdeclarator, grokparms, start_function,
5722         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
5723         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
5724         (process_template_parm, do_decl_instantiation): Pass single
5725         ordinary attribute lists around.
5726         * decl.c (grokdeclarator): Correct handling of nested attributes.
5727         Revert the patch
5728         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
5729                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
5730                 not the left.
5731         .
5732         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
5733         (cp_attribute_table): Declare.
5734         * decl.c (valid_lang_attribute): Don't define.
5735         (lang_attribute_table): Define.
5736         (init_decl_processing): Initialize lang_attribute_table instead of
5737         valid_lang_attribute.
5738         * tree.c (cp_valid_lang_attribute): Remove.
5739         (handle_java_interface_attribute, handle_com_interface_attribute,
5740         handle_init_priority_attribute): New functions.
5741         (cp_attribute_table): New array.
5742         * decl2.c (import_export_class): Don't use
5743         targetm.valid_type_attribute.
5744
5745 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5746
5747         * Make-lang.in (cp/error.o): Depend on real.h
5748         * error.c: #include "real.h"
5749
5750 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5751
5752         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
5753         xmalloc/strcpy/strcat.
5754
5755 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5756
5757         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
5758         Const-ification.
5759         * pt.c (tsubst_decl): Likewise.
5760
5761 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5762
5763         * decl2.c (lang_f_options): Const-ification.
5764         * lex.c (cplus_tree_code_name): Likewise.
5765         * spew.c (yyerror): Likewise.
5766
5767 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
5768
5769         PR c++/3986
5770         * class.c (force_canonical_binfo_r): Check & move an indirect
5771         primary base first.
5772         (force_canonical_binfo): Check that it's not already
5773         canonical.
5774         (mark_primary_virtual_base): Remove BINFO parameter.
5775         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
5776
5777 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
5778
5779         Remove TYPE_NONCOPIED_PARTS.
5780         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
5781         CLASSTYPE_PURE_VIRTUALS.
5782         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
5783         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
5784         (layout_class_type): Don't call fixup_inline_methods here ...
5785         (finish_struct_1): ... call it here.
5786
5787 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
5788
5789         * decl.c (duplicate_decls): Remove code deadling with
5790         DECL_SAVED_INSNS.
5791         * decl2.c (finish_file): Likewise.
5792         * pt.c (instantiate_decl): Likewise.
5793         * semantics.c (expand_body): Don't defer local functions if
5794         they wouldn't be deferred for some other reason.  Don't
5795         generate RTL for functions that will not be emitted.
5796         (genrtl_start_function): Remove code deadling with
5797         DECL_SAVED_INSNS.
5798         (genrtl_finish_function): Likewise.
5799
5800 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
5801
5802         PR c++/4203
5803         * call.c (build_over_call): Do not optimize any empty base
5804         construction.
5805
5806 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5807
5808         * error.c (dump_template_decl): Output template parameters
5809         together with their specifiers.
5810         Output `class' prefix for template template parameter.
5811         (dump_decl): Fix formatting.
5812
5813 2001-08-30  Kurt Garloff  <garloff@suse.de>
5814
5815         * optimize.c (inlinable_function_p): Allow only smaller single
5816         functions. Halve inline limit after reaching recursive limit.
5817
5818 2001-08-30  Joern Rennecke <amylaar@redhat.com>
5819             Jason Merrill  <jason_merrill@redhat.com>
5820
5821         * class.c (build_vtable_entry_ref): Subtract in char*, not
5822         ptrdiff_t.
5823
5824 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
5825
5826         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
5827         (build_cplus_array_type): Use cp_build_qualified_type, not
5828         TYPE_MAIN_VARIANT, to get an unqualified version.
5829
5830         * decl2.c (grok_alignof): Lose.
5831         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
5832         * typeck.c (c_alignof): Lose.
5833         * semantics.c (finish_sizeof, finish_alignof): New.
5834         * parse.y: Use them.
5835         * cp-tree.h: Declare them.
5836
5837 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
5838
5839         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
5840         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
5841         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
5842
5843 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
5844
5845         * typeck2.c (add_exception_specifier): Only require complete type if
5846         not in processing template declaration.
5847
5848 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5849
5850         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
5851         GNU_xref_start_scope and GNU_xref_end_scope.
5852
5853         * tree.c (TYPE_HASH): Moved to ../tree.h.
5854
5855 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
5856
5857         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
5858         on COMPOUND_EXPRs.
5859
5860 2001-08-14  Richard Henderson  <rth@redhat.com>
5861
5862         * class.c, cp-tree.h (build_vfn_ref): Remove.
5863         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
5864
5865 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
5866
5867         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
5868         empty class assignment as having side-effects to avoid
5869         spurious warnings.
5870
5871 2001-08-13  Zack Weinberg  <zackw@panix.com>
5872
5873         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
5874         * except.c: Include libfuncs.h.
5875
5876 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5877
5878         * decl.c (grokdeclarator): Clarify diagnostic message.
5879
5880 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5881
5882         * decl2.c (do_nonmember_using_decl): Replace using directive
5883         with using declaration in the error message.
5884
5885 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5886
5887         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
5888         criterion to avoid rebuilding expression tree instead of
5889         processing_template_decl.
5890
5891 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
5892
5893         Support named return value optimization for inlines, too.
5894         * decl.c (finish_function): Nullify returns here.
5895         * semantics.c (genrtl_start_function): Not here.
5896         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
5897         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
5898         Also nullify the CLEANUP_STMT for the nrv.
5899         * cp-tree.h: Declare it.
5900         * optimize.c (declare_return_variable): Replace the nrv with the
5901         return variable.
5902         * typeck.c (check_return_expr): Be more flexible on alignment check.
5903         Ignore cv-quals when checking for a matching type.
5904
5905 2001-08-09  Richard Henderson  <rth@redhat.com>
5906
5907         * decl2.c (finish_objects): Use target hooks instead of
5908         assemble_constructor and assemble_destructor.
5909
5910 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5911
5912         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
5913
5914 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
5915
5916         PR c++/3820
5917         Stop using TYPE_NONCOPIED_PARTS.
5918         * call.c (build_over_call): Be careful when copy constructing
5919         or assigning to an empty class.
5920         * class.c (check_bases_and_members): It has a
5921         COMPLEX_ASSIGN_REF if it has a vptr.
5922         (layout_class_type): Don't add empty class padding to
5923         TYPE_NONCOPIED_PARTS.
5924         (finish_struct_1): Don't add the VFIELD either.
5925         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
5926         initialization.
5927
5928 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
5929
5930         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
5931
5932 2001-08-06  Richard Henderson  <rth@redhat.com>
5933
5934         * decl2.c (finish_objects): Pass a symbol_ref and priority to
5935         assemble_{constructor,destructor}.  Remove priority handling.
5936
5937 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5938
5939         Don't allow template-id in using-declaration.
5940         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
5941         (do_class_using_decl): Likewise.
5942
5943 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
5944
5945         * cp/spew.c (read_token): No need to pop buffers.
5946
5947 2001-08-02  Stan Shebs  <shebs@apple.com>
5948
5949         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
5950         (fnaddr_from_vtable_entry): Remove decl.
5951         * method.c (use_thunk): Update comment.
5952
5953 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
5954
5955         * repo.c (get_base_filename): Change return value to const char
5956         pointer.
5957
5958 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
5959
5960         Kill -fhonor-std.
5961         * NEWS: Document.
5962         * cp-tree.h (flag_honor_std): Remove.
5963         (CPTI_FAKE_STD): Remove.
5964         (std_node): Remove comment about it being NULL.
5965         (fake_std_node): Remove.
5966         * decl.c (in_fake_std): Remove.
5967         (walk_namespaces_r): Remove fake_std_node check.
5968         (push_namespace): Remove in_fake_std code.
5969         (pop_namespace): Likewise.
5970         (lookup_name_real): Remove fake_std_node check.
5971         (init_decl_processing): Always create std_node. Always add
5972         std:: things there.
5973         (builtin_function): Always put non '_' fns in std.
5974         * decl2.c (flag_honor_std): Remove.
5975         (lang_f_options): Remove honor-std.
5976         (unsupported_options): Add honor-std.
5977         (set_decl_namespace): Remove fake_std_node check.
5978         (validate_nonmember_using_decl): Likewise.
5979         (do_using_directive): Likewise.
5980         (handle_class_head): Likewise.
5981         * dump.c (cp_dump_tree): Likewise.
5982         * except.c (init_exception_processing): Adjust.
5983         * init.c (build_member_call): Remove fake_std_node check.
5984         (build_offset_ref): Likewise.
5985         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
5986         * rtti.c (init_rtti_processing): Adjust.
5987
5988 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
5989
5990         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
5991         operand while calling cp_tree_equal.
5992
5993 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
5994
5995         The 3.0 ABI no longer has vbase pointer fields.
5996         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
5997         FORMAT_VBASE_NAME): Remove.
5998         * method.c (do_build_copy_constructor): Adjust.
5999         (do_build_assign_ref): Adjust.
6000         * search.c (lookup_field_r): Adjust.
6001         * typeck.c (build_component_ref): Adjust.
6002
6003         The 3.0 ABI always has a vtable pointer at the start of every
6004         polymorphic class.
6005         * rtti.c (build_headof_sub): Remove.
6006         (build_headof): Adjust.
6007         (get_tinfo_decl_dynamic): No need to check flag_rtti
6008         here. Adjust.
6009         (create_real_tinfo_var): Explain why we need a hidden name.
6010
6011 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6012
6013         PR c++/3631
6014         * class.c (update_vtable_entry_for_fn): The fixed adjustment
6015         of a virtual thunk should be from declaring base.
6016
6017 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6018
6019         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
6020         the shared virtual base, so preserving inheritance graph order.
6021
6022 2001-07-30  Andreas Jaeger  <aj@suse.de>
6023
6024         * decl2.c: Remove unused var global_temp_name_counter.
6025
6026 2001-07-28  Richard Henderson  <rth@redhat.com>
6027
6028         * method.c (pending_inlines): Remove.
6029
6030 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
6031
6032         * class.c (mark_primary_virtual_base): Don't adjust base
6033         offsets here.
6034         (dfs_unshared_virtual_bases): Adjust them here.
6035         (mark_primary_bases): Explain why we adjust at the end.
6036
6037 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
6038
6039         * class.c (finish_struct_1): When copying the primary base's
6040         VFIELD, make sure we find it is at offset zero.
6041
6042 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6043
6044         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
6045         tsubst_expr for default template arguments.
6046
6047 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6048
6049         PR c++/3621
6050         * spew.c (yylex): Only copy the token's lineno, if it is
6051         nonzero.
6052
6053 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6054
6055         PR c++/3624
6056         * call.c (resolve_args): Simplify, call
6057         convert_from_reference.
6058         (build_new_op): Resolve and convert from reference ARG1
6059         earlier. Adjust ARG2 & ARG3 resolve and conversion.
6060
6061 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6062
6063         * decl.c (last_function_parm_tags): Remove.
6064         (current_function_parm_tags): Remove.
6065         (init_decl_processing): Adjust.
6066         (start_function): Adjust.
6067         (store_parm_decls): Adjust.
6068
6069         PR c++/3152
6070         * decl.c (grokdeclarator): Detect when a function typedef is
6071         declaring a function, and create last_function_parms correctly.
6072
6073 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
6074
6075         * call.c (joust): Only prefer a non-builtin candidate to a builtin
6076         one if they have the same signature.
6077
6078         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
6079         it rather than toplevel_bindings_p.  Give it a mangled name if static.
6080         (convert_to_reference): Adjust.
6081         * decl2.c (get_temp_name): Lose.
6082         * mangle.c (mangle_ref_init_variable): New fn.
6083         (mangle_guard_variable): Strip the ref-init header.
6084         * cp-tree.h: Adjust.
6085         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
6086         initializer.
6087         (grok_reference_init): Always use DECL_INITIAL.
6088
6089 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6090
6091         PR c++/3416
6092         * call.c (build_conditional_expr): Recheck args after
6093         conversions.
6094         * cp-tree.h (build_conditional_expr): Move to correct file.
6095         * typeck.c (decay_conversion): Diagnose any unknown types
6096         reaching here.
6097         (build_binary_op): Don't do initial decay or default
6098         conversions on overloaded functions.
6099         (build_static_cast): Don't do a decay conversion here.
6100
6101 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6102
6103         PR c++/3543
6104         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
6105         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
6106
6107 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6108
6109         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
6110         (create_vtbl_ptr): ... here.
6111
6112 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6113
6114         * class.c (build_vbase_offset_vbtl_entries): Look for
6115         non-primary base of which we are a sub vtable.
6116
6117 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
6118
6119         * semantics.c (finish_this_expr):  Remove unused code.
6120
6121 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
6122
6123         Simplify rtti, now we've only one ABI.
6124         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
6125         CPTI_TINFO_VAR_ID.
6126         (tinfo_decl_id, tinfo_var_id): Remove.
6127         (get_typeid_1): Remove.
6128         * rtti.c
6129         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
6130         (typeid_ok_p): New function.
6131         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
6132         (get_tinfo_decl): Remove old abi documentation.
6133         (tinfo_from_decl): Remove.
6134         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
6135         (get_typeid_1): Remove.
6136         (get_base_offset): Remove.
6137         (synthesize_tinfo_var): Absorb get_base_offset.
6138         (create_real_tinfo_var): Don't use tinfo_decl_id.
6139
6140 2001-07-23  Graham Stott  <grahams@redhat.com>
6141
6142         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
6143         variable has_two_argument_delete_p.
6144
6145 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
6146
6147         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
6148         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
6149         (CPTI_INDEX_IDENTIFIER): Remove.
6150         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
6151         (delta2_identifier): Remove.
6152         (index_identifier): Remove.
6153         (pfn_or_delta2_identifier): Remove.
6154         (flag_vtable_thunks): Remove.
6155         (VTABLE_DELTA2_NAME): Remove.
6156         (VTABLE_INDEX_NAME): Remove.
6157         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
6158         (vfunc_ptr_type_node): Adjust.
6159         (VTABLE_NAME_PREFIX): Adjust.
6160         (build_vfn_ref): Lose first parameter.
6161         (fixup_all_virtual_upcast_offsets): Remove.
6162         * decl.c (initialize_predefined_identifiers): Remove
6163         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
6164         (init_decl_processing): Remove no-vtable-thunk code.
6165         * decl2.c (flag_vtable_thunks): Remove.
6166         (mark_vtable_entries): Remove no-vtable-thunk code.
6167         * error.c (dump_decl): Remove no-vtable-thunk code.
6168         (dump_expr): Adjust ptr to member function code.
6169         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
6170         code.
6171         * rtti.c (build_headof): Remove no-vtable-thunk code.
6172         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
6173         * search.c (get_base_distance): Remove expand_upcast_fixups case.
6174         (virtual_context) Remove.
6175         (expand_upcast_fixups): Remove.
6176         (fixup_virtual_upcast_offsets): Remove.
6177         (fixup_all_virtual_upcast_offsets): Remove.
6178         * typeck.c (get_member_function_from_ptrfunc): Remove
6179         no-vtable-thunk code.
6180         * call.c (build_over_call): Adjust call to build_vfn_ref.
6181         * class.c (build_vfn_ref): Lose first parameter. Remove
6182         no-vtable-thunk code.
6183         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
6184         (build_vtable_entry): Remove no-vtable-thunk code.
6185
6186 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
6187
6188         Remove old-abi remnants. Remove comments about old abi
6189         behavior. Remove references to 'new-abi' in comments.
6190         * cp-tree.h: Adjust comments.
6191         (vbase_offsets_in_vtable_p): Delete.
6192         (vcall_offsets_in_vtable_p): Delete.
6193         (vptrs_present_everywhere_p): Delete.
6194         (all_overridden_vfuns_in_vtables_p): Delete.
6195         (merge_primary_and_secondary_vtables_p): Delete.
6196         (TYPE_CONTAINS_VPTR_P): Adjust.
6197         (VTT_NAME_PREFIX): Remove.
6198         (CTOR_VTBL_NAME_PREFIX): Remove.
6199         (init_vbase_pointers): Remove.
6200         * class.c: Adjust coments.
6201         (build_vbase_pointer_fields): Delete.
6202         (build_vbase_pointer): Remove old-abi code.
6203         (build_secondary_vtable): Likewise.
6204         (modify_all_vtables): Likewise.
6205         (create_vtable_ptr): Likewise.
6206         (layout_class_type): Likewise.
6207         (finish_struct_1): Likewise.
6208         (finish_vtbls): Likewise.
6209         (dfs_finish_vtbls): Delete.
6210         (build_vbase_offset_vtbl_entries): Remove old-abi code.
6211         * cvt.c: Adjust comments.
6212         * decl.c: Adjust comments.
6213         * decl2.c: Adjust comments.
6214         * init.c: Adjust comments.
6215         (construct_virtual_bases): Remove old-abi code.
6216         * lang-specs.h: Remove -fno-new-abi.
6217         * mangle.c: Adjust comments.
6218         * rtti.c: Adjust comments.
6219         (get_base_offset): Remove old-abi-code.
6220         * search.c: Adjust comments.
6221         (dfs_init_vbase_pointers): Remove.
6222         (dfs_vtable_path_unmark): Remove.
6223         (init_vbase_pointers): Remove.
6224         * semantics.c: Adjust comments.
6225         (emit_associated_thunks): Remove old-abi code.
6226         * typeck.c: Adjust comments.
6227
6228 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
6229
6230         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
6231         params.h.
6232
6233 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
6234
6235         * class.c (finish_struct_anon): Forbid nested classes.
6236
6237 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
6238
6239         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
6240         * optimize.c: Include debug.h.
6241         (maybe_clone_body): Use debug hook.
6242         * semantics.c: Include debug.h.
6243         (expand_body): Use debug hook.
6244
6245 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
6246
6247         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
6248
6249 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
6250
6251         * class.c (type_requires_array_cookie): New function.
6252         (check_methods): Don't try to figure out whether the type needs a
6253         cookie here.
6254         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
6255         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
6256         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
6257         * pt.c (instantiate_class_template): Don't set
6258         TYPE_VEC_DELETE_TAKES_SIZE.
6259         * NEWS: Document ABI changes from GCC 3.0.
6260
6261 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
6262             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
6263
6264         * NEWS (Changes in GCC 3.0): Fix typo.
6265
6266 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6267
6268         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
6269         which attributes are to be attached, and a flags argument.  Update
6270         call to decl_attributes.
6271         (grokfield): Update call to decl_attributes.
6272         * class.c (finish_struct): Update call to cplus_decl_attributes.
6273         * cp-tree.h (cplus_decl_attributes): Update prototype.
6274         * decl.c (start_decl, grokdeclarator, start_function): Update
6275         calls to decl_attributes and cplus_decl_attributes.
6276         * friend.c (do_friend): Update call to cplus_decl_attributes.
6277         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
6278
6279 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
6280
6281         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
6282         for `register' variables with an asm-specification.
6283
6284 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
6285
6286         * semantics.c (finish_asm_stmt): Mark the output operands
6287         to an asm addressable, if necessary.
6288
6289 2001-07-11  Ben Elliston  <bje@redhat.com>
6290
6291         * Revert this change -- there is a subtle bug.
6292
6293         PR c++/80
6294         * decl.c (finish_enum): New "attributes" argument; pass it to
6295         cplus_decl_attributes.  Use a narrower type if the enum is packed.
6296         * cp-tree.h (finish_enum): Adjust prototype.
6297         * parse.y (enum_head): New non-terminal.
6298         (structsp): Use it. Enums now may be preceded or followed by
6299         optional attributes -- pass their chained tree to finish_enum().
6300         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
6301
6302 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
6303
6304         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
6305         variables.
6306
6307 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
6308
6309         * semantics.c (cp_expand_stmt): Fix for null
6310         current_function_return_value.
6311
6312 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
6313
6314         * call.c (build_op_delete_call): Initialize fn.
6315         (convert_like_real): Delete conditional.
6316         (joust): Initialize *w and *l.
6317         * class.c: Add prototype for binfo_ctor_vtable.
6318         (get_primary_binfo): Initialize result.
6319         * init.c (build_java_class_ref): Initialize name.
6320
6321 2001-07-09  Erik Rozendaal  <dlr@acm.org>
6322
6323         * typeck.c (unary_complex_lvalue): Do not duplicate the
6324         argument to modify, pre-, or post-increment when used as an
6325         lvalue and when the argument has side-effects.
6326
6327 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6328
6329         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
6330         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
6331         cplus_decl_attributes even if attrs is NULL.
6332         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
6333
6334 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6335
6336         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
6337         calls to decl_attributes.
6338
6339 2001-07-06  Ira Ruben   <ira@apple.com>
6340
6341         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
6342         be DECL_TEMPLATE_RESULT.
6343
6344 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6345
6346         * cp-tree.h (copy_template_template_parm): Rename to ...
6347         (bind_template_template_parm): ... here.
6348         * tree.c (copy_template_template_parm): Rename to ...
6349         (bind_template_template_parm): ... here.  Remove the case when
6350         NEWARGS is NULL_TREE.
6351         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
6352         BOUND_TEMPLATE_TEMPLATE_PARM.
6353         * pt.c (lookup_template_class): Adjust.
6354
6355 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
6356
6357         * cvt.c (convert_lvalue): New fn.
6358         * cp-tree.h: Declare it.
6359         * method.c (do_build_assign_ref): Use it.
6360         (do_build_copy_constructor): Convert parm to base types
6361         before calling base constructors.
6362
6363         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
6364         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
6365         optimize.
6366         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
6367
6368 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
6369
6370         * optimize.c (optimize_inline_calls): New function, broken out
6371         of ...
6372         (optimize_function): ... here. Call it. Don't inline if it is
6373         a thunk.
6374         (dump_function): Print name of dump flag causing this dump.
6375         * semantics.c (expand_body): Move thunk inline check to
6376         optimize_function.
6377
6378 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6379
6380         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
6381         (comptypes): Use target.comp_type_attributes.
6382
6383 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
6384
6385         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
6386
6387 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6388
6389         * error.c (lang_print_error_function): Add a `diagnostic_context *'
6390         parameter. Tweak.
6391
6392 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6393
6394         * decl2.c (import_export_class): Update.
6395
6396 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6397
6398         * error.c (init_error): Adjust settings.
6399
6400 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6401
6402         * error.c (init_error): Adjust settings.
6403
6404 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
6405
6406         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
6407         return pointers to data members by reference rather than by value.
6408
6409 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
6410
6411         Implement the Named Return Value optimization.
6412         * cp-tree.h (struct cp_language_function): Add x_return_value.
6413         (current_function_return_value): Now a macro.
6414         * decl.c: Don't define it.
6415         (define_label, finish_case_label): Don't clear it.
6416         (init_decl_processing): Don't register it with GC.
6417         * semantics.c (genrtl_finish_function): Don't check it for
6418         no_return_label.  Copy the RTL from the return value to
6419         current_function_return_value and walk, calling...
6420         (nullify_returns_r): ...this new fn.
6421         * typeck.c (check_return_expr): Set current_function_return_value.
6422
6423 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
6424
6425         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
6426         sharing a ctor vtable with.  Merge code for cases 1 and 2.
6427         (binfo_ctor_vtable): New fn.
6428         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
6429
6430 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
6431
6432         * class.c (dfs_find_final_overrider): Fix logic.
6433
6434         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
6435         virtual thunk instead of non-virtual.
6436         (get_matching_virtual): Uncomment.
6437
6438         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
6439         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
6440         PARM, not ARG.
6441
6442 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
6443
6444         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
6445         we've not emerged from the hierarchy of RTTI_BINFO on reaching
6446         a non-virtual base.
6447
6448 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
6449
6450         * NEWS: Update release number.
6451
6452 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
6453
6454         PR c++/3130, c++/3131, c++/3132
6455         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
6456         * class.c (force_canonical_binfo_r): Move
6457         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
6458         virtual bases unless they're primary and what they're primary
6459         too has been moved.
6460         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
6461         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
6462         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
6463         derived binfo.
6464         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
6465         (layout_nonempty_base_or_field): Add most derived type
6466         parameter. Adjust.
6467         (layout_empty_base): Likewise.
6468         (build_base_field): Likewise.
6469         (build_base_fields): Likewise.
6470         (propagate_binfo_offsets): Add most derived type
6471         parameter. Skip non canonical virtual bases too.
6472         (dfs_set_offset_for_unshared_vbases): Don't skip primary
6473         bases. Do skip canonical bases.
6474         (layout_virtual_bases): Adjust.
6475         (layout_class_type): Adjust.
6476         (dfs_get_primary_binfo): Build list of virtual primary base
6477         candidates.
6478         (get_primary_binfo): Check that the shared virtual primary
6479         base candidate was found first.
6480         (accumulate_vtbl_inits): Don't do anything for non-vptr
6481         containing binfos. For case 1 primary virtual bases, keep
6482         checking that we've not emerged from the hierarchy of RTTI_BINFO.
6483
6484 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
6485
6486         PR c++/3089
6487         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
6488         hierarchy looking for primary bases for a ctor
6489         vtable. Recursively call oneself, if we meet our primary via
6490         this route and haven't met it yet via inheritance graph order.
6491
6492 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
6493
6494         * lang-options.h: Emit documentation for -fno-honor-std, not
6495         -fhonor-std.
6496
6497 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
6498
6499         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
6500         Don't clobber delta.
6501         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
6502
6503 2001-06-10  Mark Mitchell <mark@codesourcery.com>
6504             Gabriel Dos Reis  <gdr@codesourcery.com>
6505
6506         * Make-lang.in (cp/call.o): Depend on diagnostic.h
6507         (cp/typeck.o): Depend on diagnostic.h
6508         (cp/typeck2.o): Depend on diagnostic.h
6509         (cp/repo.o): Depend on dignostic.h
6510         * typeck.c: #include diagnostic.h
6511         (convert_for_initialization): Remove extern declaration for
6512         warningcount and errorcount.
6513
6514         * call.c: #include diagnostic.h
6515         (convert_like_real): Remove extern declaration for warnincount and
6516         errorcount.
6517
6518         * repo.c: #include diagnostic.h
6519         * typeck2.c: #include diagnostic.h
6520
6521 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
6522
6523         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
6524         in previous change.
6525
6526 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
6527
6528         PR c++/2929
6529         * friend.c (do_friend): Use push_decl_namespace for classes at
6530         namespace scope.
6531
6532 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
6533             Jason Merrill <jason_merrill@redhat.com>
6534
6535         PR c++/3061
6536         * class.c (build_secondary_vtable): Use assert, rather than an error
6537         message.
6538         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
6539         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
6540         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
6541         Don't set BINFO_VTABLE for a primary virtual base.
6542
6543 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
6544
6545         * decl.c (duplicate_decls): Update source position information
6546         when a template function is defined.
6547
6548 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
6549
6550         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
6551
6552 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
6553
6554         PR c++/2914
6555         * decl.c (pushtag): Don't push into a complete type's scope.
6556
6557 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
6558
6559         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
6560         (struct lang_decl_flags): Lose generate_with_vtable_p.
6561         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
6562         * class.c (copy_virtuals): Adjust.
6563         * decl2.c (mark_vtable_entries): Adjust.
6564         * method.c (make_thunk, build_vtable_entry): Adjust.
6565         * class.c (update_vtable_entry_for_fn): Only look as far as the
6566         first defining class.
6567         (build_vtbl_initializer): Put nothing in the slot for a function only
6568         defined in a lost primary virtual base.
6569         (add_vcall_offset_vtbl_entries_1): Use the same code for
6570         the lost primary case and the normal case.
6571         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
6572         (get_vfield_offset, get_derived_offset): Lose.
6573         (dfs_find_final_overrider): Use look_for_overrides_here.
6574         (get_matching_virtual): New fn.
6575         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
6576         not BV_VCALL_INDEX.
6577         * search.c (look_for_overrides_here): Split out from...
6578         (look_for_overrides_r): Here.
6579
6580         * class.c (find_final_overrider): Return error_mark_node on error.
6581
6582         * decl2.c (key_method): #if 0 accidental change.
6583
6584 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6585
6586         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
6587         (build_over_call): Likewise.
6588         * decl.c (grokparms): Likewise.
6589         * pt.c (tsubst_decl): Likewise.
6590         * typeck.c (convert_arguments): Likewise.
6591
6592 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
6593
6594         * semantics.c (begin_class_definition): Robustify.
6595
6596         * pt.c (instantiate_decl): Tell the repository code about the
6597         clones, not the cloned functions.
6598         * repo.c (repo_template_used): Explicitly instantiate the cloned
6599         function, not the clones.
6600
6601 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
6602
6603         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
6604         ICS_BAD_FLAG on created conversion.
6605         (compare_ics): Break out rank.
6606
6607 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
6608
6609         * decl.c (xref_tag): Remove extraneous %s on dependent name
6610         lookup warning.
6611
6612 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
6613
6614         * class.c (layout_vtable_decl): Fix off by one error on
6615         build_index_type.
6616         (build_vtt): Likewise.
6617         (build_ctor_vtbl_group): Likewise.
6618
6619 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
6620
6621         * class.c (maybe_indent_hierarchy): New function.
6622         (dump_class_hierarchy_r): Add flags. Dump extra binfo
6623         information, if enabled. Use maybe_indent_hierarchy. Adjust
6624         output format.
6625         (dump_class_hierarchy): Adjust prototype. Adjust output format.
6626         (dump_array, dump_vtable, dump_vtt): New functions.
6627         (finish_struct_1): Adjust hierarchy dumping.
6628         (initialize_vtable): Call dump_vtable.
6629         (build_vtt): Call dump_vtt.
6630         (build_ctor_vtbl_group): Call dump_vtable.
6631         * decl2.c (flag_dump_class_layout): Remove.
6632         (cxx_decode_option): Remove dump translation unit
6633         and dump class hierarchy check. Call dump_switch_p.
6634         (finish_file): Adjust dumping.
6635         (dump.c): Only dump base classes if not TDF_SLIM.
6636         Only dump namespace members if not TDF_SLIM.
6637         * optimize.c (dump_function): New function.
6638         (optimize_function): Call dump_function.
6639         * semantics.c (expand_body): Use dump_enabled_p.
6640
6641 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
6642
6643         PR g++/2936
6644         Part missed from first commit
6645         * decl2.c (finish_anon_union): Copy context.
6646
6647 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
6648
6649         PR g++/2936
6650         * optimize.c (remap_decl): Remap anonymous aggregate members too.
6651
6652 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
6653
6654         PR g++/2823
6655         * semantics.c (expand_body): Don't optimize thunks.
6656
6657 2001-05-25  Sam TH  <sam@uchicago.edu>
6658
6659         * cp-tree.h lex.h: Fix header include guards.
6660
6661 2001-05-25  Mark Mitchell <mark@codesourcery.com>
6662
6663         * decl.c (init_decl_processing): Tweak.
6664
6665 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
6666
6667         * decl.c (duplicate_decls): Tidy.
6668         (init_decl_processing): Always set flag_no_builtin.
6669
6670 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
6671
6672         PR c++/2184
6673         * decl2.c (do_local_using_decl): Push the decls, even in a
6674         template.
6675
6676 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
6677
6678         * optimize.c (initialize_inlined_parameters): Don't set
6679         TREE_READONLY for a VAR_DECL taking the place of an inlined
6680         PARM_DECL.
6681
6682 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
6683
6684         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
6685         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
6686         attribute.
6687
6688 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
6689
6690         * parse.y: Refer to compound literals as such, not as
6691         constructor-expressions.
6692
6693 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
6694
6695         * call.c (build_op_delete_call): Ignore exception-specifications
6696         when looking for matching delete operators.
6697         * init.c (build_new_1): Compute whether or not the allocation
6698         function used is a placement allocation function or not, and
6699         communicate this information to build_op_delete_call.
6700
6701 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
6702
6703         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
6704         (build_vtbl_ref): Adjust.
6705         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
6706         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
6707         Re-add vtable-gc.
6708         (unsupported_options): Correspondingly.
6709
6710         * decl2.c (maybe_make_one_only): Check flag_weak, not
6711         supports_one_only().
6712
6713         * cp-tree.def (START_CATCH_STMT): Lose.
6714         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
6715         * tree.c (cp_statement_code_p): Don't case it.
6716         * semantics.c (cp_expand_stmt): Likewise.
6717         * cp-tree.h (START_CATCH_TYPE): Lose.
6718         (HANDLER_TYPE): New.
6719         * except.c (expand_start_catch_block): Don't start any blocks.
6720         Return the type.
6721         (expand_end_catch_block): Don't end any blocks.
6722         * parse.y (handler): Don't pass anything from finish_handler_parms
6723         to finish_handler.
6724         * pt.c (tsubst_expr): Likewise.
6725         * semantics.c (begin_handler): Call note_level_for_catch here.
6726         (finish_handler_parms): Don't return anything.
6727         (genrtl_catch_block, begin_catch_block): Lose.
6728         (genrtl_handler): Call expand_start_catch here.
6729
6730 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
6731
6732         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
6733         (get_vtable_decl, build_vtt): Not here.
6734
6735 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
6736
6737         PR c++/2781
6738         * optimize.c (update_cloned_parm): Copy addressability and other
6739         flags.
6740
6741 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6742
6743         * pt.c (determine_specialization): Ignore artificial functions.
6744
6745 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
6746
6747         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
6748         (C_RID_CODE): Remove.
6749         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
6750         (init_parse): Don't do it here.
6751
6752 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
6753
6754         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
6755         function declaration to avoid stripping the symbol's attributes.
6756
6757 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
6758
6759         * decl.c (pushdecl): Adjust error string.
6760         (xref_tag): Adjust friend class injection warning. Remove the
6761         inherited name from the class shadowed scope.
6762
6763 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
6764
6765         * except.c (cp_protect_cleanup_actions): New function.
6766         (init_exception_processing): Don't set protect_cleanup_actions
6767         here.  Do set lang_protect_cleanup_actions.
6768
6769 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
6770
6771         * spew.c (read_token): Call yyerror on all unexpected tokens.
6772
6773 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
6774
6775         * init.c (member_init_ok_or_else): Take a tree rather than
6776         string for name.
6777         (expand_member_init): Adjust.
6778
6779 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
6780
6781         * decl.c (duplicate_decls): Suppress warning about duplicate
6782         decls if the first decl is a friend.
6783
6784 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
6785
6786         * except.c (choose_personality_routine): Export.  Add
6787         explanatory comment.  Take an enum languages, not a boolean.
6788         (initialize_handler_parm): Adjust to match.
6789         * cp-tree.h: Prototype choose_personality_routine.
6790         * lex.c (handle_pragma_java_exceptions): New function.
6791         (init_cp_pragma): Register #pragma GCC java_exceptions.
6792
6793 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6794
6795         * method.c (build_mangled_C99_name): Remove unused prototype.
6796
6797 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
6798
6799         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
6800         * typeck.c (get_member_function_from_ptrfunc,
6801         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
6802         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
6803
6804         Reverted Geoff Keating's 2001-05-03's patch.
6805
6806 2001-05-11  Ira Ruben   <ira@apple.com>
6807
6808         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
6809
6810 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
6811
6812         * cp-tree.h (finish_label_expr, lookup_label): Delete.
6813         * parse.y: Update for '&&'; don't issue warning here.
6814         * semantics.c (finish_label_expr): Delete.
6815
6816 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
6817
6818         * splay-tree.h (splay_tree_max): New function.
6819         (splay_tree_min): Likewise.
6820
6821 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
6822
6823         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
6824         (pfn_vflag_identifier): Define.
6825         Update comment about layout of pointer functions.
6826         (build_ptrmemfunc1): Update prototype.
6827         (expand_ptrmemfunc_cst): Update prototype.
6828         * decl.c (initialize_predefined_identifiers): Initialize
6829         pfn_vflag_identifier.
6830         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
6831         an extra field to the type.
6832         * expr.c (cplus_expand_constant): Pass 'flag' between
6833         expand_ptrmemfunc_cst and build_ptrmemfunc1.
6834         * typeck.c (get_member_function_from_ptrfunc): When
6835         FUNCTION_BOUNDARY < 16, look at additional field to determine
6836         if a pointer-to-member is a real pointer or a vtable offset.
6837         (build_ptrmemfunc1): Add new parameter to contain extra field.
6838         (build_ptrmemfunc): Pass the extra field around.
6839         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
6840         (pfn_from_ptrmemfunc): Ignore the extra field.
6841
6842 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
6843
6844         * cp-tree.h (flag_inline_trees): Update documentation.
6845         * decl.c (init_decl_processing): Adjust handling of
6846         flag_inline_functions and flag_inline_trees to support -O3.
6847         (grokfndecl): Set DECL_INLINE on all functions if that's what
6848         the user requested.
6849         (save_function_data): Clear DECL_INLINE in
6850         current_function_cannot_inline is non-NULL.
6851         * decl2.c (flag_inline_trees): Update documentation.
6852
6853 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
6854
6855         * dump.c (cp_dump_tree, USING_STMT case): New case.
6856         * tree.c (cp_statement_code_p): Add USING_STMT.
6857         * decl2.c (do_using_directive): Add the using directive statement.
6858
6859         * tree.c (walk_tree): Reformat an if block.
6860
6861 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
6862
6863         * decl.c (compute_array_index_type): Don't try to do anything with
6864         the indices when processing a template.
6865
6866 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6867
6868         * call.c: NULL_PTR -> NULL.
6869         * class.c: Likewise.
6870         * cvt.c: Likewise.
6871         * decl.c: Likewise.
6872         * decl2.c: Likewise.
6873         * except.c: Likewise.
6874         * init.c: Likewise.
6875         * rtti.c: Likewise.
6876         * search.c: Likewise.
6877         * tree.c: Likewise.
6878         * typeck.c: Likewise.
6879         * typeck2.c: Likewise.
6880
6881 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
6882
6883         * decl2.c (do_using_directive): Revert previous patch.
6884
6885 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6886
6887         * cp-tree.def (USING_STMT): New statement node.
6888         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
6889         * decl2.c (do_using_directive): Add USING_STMT to statement
6890         tree. Don't emit errors when processing template decl.
6891         * pt.c (tsubst_expr, USING_STMT case): New case.
6892         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
6893
6894 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6895
6896         * call.c (build_new_op): Convert args from reference here.
6897         (build_conditional_expr): Don't convert here.
6898
6899 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6900
6901         * spew.c (last_token_id): New static variable.
6902         (read_token): Set it here.
6903         (yyerror): Use it here.
6904
6905 2001-04-30  Richard Henderson  <rth@redhat.com>
6906
6907         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
6908         * decl.c: Likewise.
6909
6910 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
6911
6912         * gxxint.texi: Remove.
6913         * Make-lang.in: Remove all traces of gxxint.texi.
6914
6915 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
6916
6917         * decl2.c (start_static_initialization_or_destruction): Correct
6918         logic to handle the -fno-use-cxa-atexit case.
6919
6920 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
6921
6922         * optimize.c (update_cloned_parm): New function.
6923         (maybe_clone_body): Use it.  Update the `this' parameter too.
6924
6925 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6926
6927         * decl2.c (unsupported_options): Add new-abi.
6928         * lang-options.h: Remove no longer supported options.
6929
6930 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
6931
6932         * except.c (can_convert_eh): Don't check template parms,
6933         typename types etc.
6934
6935 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
6936
6937         * optimize.c (maybe_clone_body): Copy parameter names and locations.
6938
6939 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
6940
6941         * cp-tree.h (adjust_clone_args): Prototype new function.
6942         * class.c (adjust_clone_args): New function.
6943         * decl.c (start_function): Call it for in charge ctors.
6944
6945 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
6946
6947         * method.c (use_thunk): Make sure that thunks really are emitted
6948         when requested.
6949
6950 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
6951
6952         * mangle.c (write_chars): New macro.
6953         (hwint_to_ascii): New function
6954         (write_number): Use it.
6955         (write_integer_cst): Deal with really big numbers.
6956
6957 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
6958
6959         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
6960         the clone.
6961
6962 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
6963
6964         * decl.c (grokdeclarator): Set context of namespace scope
6965         TYPE_DECLS.
6966
6967 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
6968
6969         * cp/optimize.c: Include hashtab.h.
6970         (struct inline_data): Add tree_pruner.
6971         (expand_call_inline, expand_calls_inline): Use it when calling
6972         walk_tree.
6973         (optimize_function): Initialize and free tree_pruner.
6974
6975 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
6976
6977         Lazy __FUNCTION__ generation.
6978         * cp-tree.def (FUNCTION_NAME): Remove.
6979         * cp-tree.h (function_name_declared_p): Remove.
6980         (cp_fname_init): Prototype.
6981         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
6982         don't call declare_function_name. Call start_fname_decls.
6983         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
6984         clobber the line number.
6985         (cp_fname_init): New function.
6986         (start_function): Call start_fname_decls.
6987         (finish_function): Call finish_fname_decls.
6988         * lex.c (reswords): Add slots for __FUNCTION__ et al.
6989         (rid_to_yy): Add mappings for __FUNCTION__ et al.
6990         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
6991         * parse.y (VAR_FUNC_NAME): New token.
6992         (primary): Add VAR_FUNC_NAME.
6993         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
6994         generation.
6995         (tsubst, FUNCTION_NAME case): Remove.
6996         (tsubst_copy, FUNCTION_NAME case): Remove.
6997         (tsubst_expr, DECL_STMT case): Be careful with a
6998         DECL_PRETTY_FUNCTION_P.
6999         (instantiate_decl): Remove function_name_declared_p.
7000         * semantics.c (begin_compound_statement): Don't call
7001         declare_function_name here.
7002         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
7003         (finish_translation_unit): Call finish_fname_decls.
7004         (expand_body): Remove function_name_declared_p.
7005         * typeck2.c (digest_init): Allow any ERROR_MARK.
7006
7007 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
7008
7009         * pt.c (tsubst_decl): Use VOID_TYPE_P.
7010         * semantics.c: Fix some typos.
7011
7012 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
7013
7014         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
7015
7016 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7017
7018         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
7019
7020 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
7021
7022         * except.c (build_throw): Wrap the initialization of the exception
7023         object in a MUST_NOT_THROW_EXPR.
7024         (do_free_exception): #if 0.
7025
7026 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
7027
7028         * cp-tree.h (finish_enum): Change prototype.
7029         * decl.c (finish_enum): Reorganize.
7030         * parse.y (structsp): Adjust calls to finish_enum.
7031
7032 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7033
7034         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
7035         't' case.
7036
7037 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7038
7039         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
7040         (layout_empty_base): Return at end flag.
7041         (build_base_field): Likewise.
7042         (build_base_fields): Likewise.
7043         (layout_virtual_bases): Don't add 1 to eoc value.
7044         (end_of_class): Use full size for empty bases.
7045         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
7046         empty bases. Don't add 1 to eoc value. Only add trailing padding
7047         if we're an empty class with no empty bases.
7048         (dump_class_hierarchy): Dump size and alignment.
7049
7050 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
7051
7052         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
7053         ICS_BAD_FLAG.
7054
7055 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
7056
7057         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
7058         is found, look first if name does not match the structure name.
7059
7060 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
7061
7062         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
7063         set.
7064         (SET_DECL_LANGUAGE): New macro.
7065         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
7066         (pushdecl): Likewise.
7067         (build_library_fn_1): Likewise.
7068         (build_cp_library_fn): Likewise.
7069         (grokfndecl): Likewise.
7070         (grokvardecl): Mark `extern "C"' variables as having C linkage.
7071         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
7072         * lex.c (retrofit_lang_decl): Likewise.
7073         * mangle.c (mangle_decl_string): Don't mangle the names of
7074         variables declared with C language linkage.
7075         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
7076
7077 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7078
7079         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
7080         flag_access_control from uninitialized storage.
7081
7082 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
7083
7084         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
7085         * mangle.c (write_pointer_to_member_type): Fix mangling of
7086         pointers to cv-qualified member function types.
7087
7088         * init.c (build_delete): Create a SAVE_EXPR for the address if
7089         we're going to use it more than once.
7090
7091 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
7092
7093         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
7094         (expand_ptremfunc_cst): Change prototype.
7095         (delta2_from_ptrmemfunc): Remove.
7096         * expr.c (cplus_expand_constant): Adjust call to
7097         expand_ptrmemfunc_cst.
7098         * typeck.c (build_ptrmemfunc1): Simplify.
7099         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
7100         results in a constant.
7101         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
7102         (delta2_from_ptrmemfunc): Remove.
7103         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
7104
7105 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
7106
7107         * cp-tree.h (decl_namespace_list): New macro.
7108         (struct saved_scope): Add decl_ns_list.
7109         * decl.c (mark_saved_scope): Mark it.
7110         * decl2.c: Lose static decl_namespace_list.
7111         (init_decl2): Don't save it.
7112
7113 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7114
7115         * cp-tree.h (warn_return_type, yylex): Delete redundant
7116         declarations.
7117
7118         * decl.c (current_class_depth, global_namespace): Likewise.
7119
7120         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
7121
7122         * repo.c (flag_use_repository): Likewise.
7123
7124 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7125
7126         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
7127         set_block, pushdecl, getdecls, gettags, init_decl_processing,
7128         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
7129         lvalue_or_else, print_lang_statistics, comp_target_types,
7130         unsigned_type, signed_type, signed_or_unsigned_type,
7131         build_function_call, mark_addressable, incomplete_type_error):
7132         Delete redundant declarations.
7133
7134 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
7135
7136         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
7137         (TYPE_ANONYMOUS_P): New macro.
7138         (TAGGED_TYPE_P): New macro.
7139         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
7140         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
7141         * tree.c (no_linkage_helper): Likewise.
7142         * semantics.c (begin_class_definition): Likewise.
7143         * pt.c (convert_template_argument): Likewise.
7144         * lex.c (check_for_missing_semicolon): Likewise.
7145
7146 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
7147
7148         * class.c (dfs_unshared_virtual_bases): New function.
7149         (mark_primary_bases): Call it.
7150         (check_bases): Ignore virtual bases when determining
7151         nearly-emptiness.
7152
7153 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
7154
7155         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
7156
7157 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
7158
7159         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
7160         cloned function to the clone.
7161
7162 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7163
7164         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
7165
7166         * semantics.c: Include expr.h.
7167
7168 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
7169
7170         * method.c (implicitly_declare_fn): Commonize code for copy ctor
7171         and assignment op. Set TREE_USED for parameter.
7172
7173 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
7174
7175         * class.c (find_final_overrider_data): Add `candidates'.
7176         (dfs_find_final_overrider): Don't issue error messages
7177         prematurely.
7178         (find_final_overrider): Issue error messages here.
7179         (build_base_field): Don't warn about amgibuous direct bases here.
7180         (warn_about_ambiguous_direct_bases): New function.
7181         (layout_class_type): Use it.
7182
7183 2001-04-10  Richard Henderson  <rth@redhat.com>
7184
7185         * typeck.c (build_array_ref): Push the array reference inside
7186         COMPOUND_EXPR and COND_EXPR.
7187
7188 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
7189
7190         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
7191         * decl.c (duplicate_decls): Adjust accordingly.
7192         (maybe_commonize_var): Likewise.
7193         (grokfndecl): Likewise.
7194         (start_function): Likewise.
7195         (start_method): Likewise.
7196         * decl2.c (key_method): Likewise.
7197         (import_export_decl): Likewise.
7198         * method.c (implicitly_declare_fn): Likewise.
7199         * optimize.c (maybe_clone_body): Likewise.
7200
7201 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
7202
7203         * lang-specs.h: Add __DEPRECATED.
7204
7205 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
7206
7207         * search.c (get_dynamic_cast_base_type): When building a new
7208         constant, set its type to ssizetype.
7209
7210 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
7211
7212         * optimize.c (expand_call_inline): Only add newly inlined statements
7213         into inlined_stmts.
7214
7215 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
7216
7217         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
7218         (OPERATOR_FORMAT): Likewise.
7219         (OPERATOR_TYPENAME_FORMAT): Likewise.
7220         * operators.def: Remove old name-mangling information.
7221         * decl.c (grok_op_properties): Adjust accordingly.
7222         * lex.c (init_operators): Likewise.
7223         * rtti.c (get_tinfo_decl): Issue error messages about types that
7224         have variable size.
7225
7226 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
7227
7228         * decl2.c (import_export_decl): Don't call import_export_class
7229         when processing an inline member function.
7230         * semantics.c (expand_body): Call import_export_decl before
7231         emitting inline functions.
7232
7233 2001-03-28  Richard Henderson  <rth@redhat.com>
7234
7235         IA-64 ABI Exception Handling:
7236         * cp-tree.def (EH_SPEC_BLOCK): New.
7237         (MUST_NOT_THROW_EXPR): New.
7238         * cp-tree.h: Update changed function declarations.
7239         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
7240         (CPTI_CALL_UNEXPECTED): New.
7241         (struct cp_language_function): Rename x_eh_spec_try_block
7242         to x_eh_spec_block.
7243         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
7244         * decl.c (current_binding_level): If no current function
7245         bindings, revert to scope_chain.
7246         (initialize_predefined_identifiers): Remove __cp_push_exception.
7247         (store_parm_decls): Use begin_eh_spec_block.
7248         (finish_function): Use finish_eh_spec_block.
7249         (mark_lang_function): Update for name changes.
7250         * decl2.c (finish_file): No mark_all_runtime_matches.
7251         * dump.c (cp_dump_tree): Handle new tree codes.
7252         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
7253         * except.c (catch_language_init, catch_language): Remove.
7254         (init_exception_processing): Don't set language code.
7255         Initialize call_unexpected_node, protect_cleanup_actions,
7256         eh_personality_libfunc, lang_eh_runtime_type.
7257         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
7258         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
7259         (prepare_eh_type): Split out type canonicalizations ...
7260         (build_eh_type_type): ... from here.
7261         (build_eh_type_type_ref): Remove.
7262         (mark_all_runtime_matches): Remove.
7263         (build_exc_ptr): New.
7264         (do_begin_catch, do_end_catch): New.
7265         (do_pop_exception): Remove.
7266         (build_terminate_handler): Remove.
7267         (choose_personality_routine): Split out language choice from ...
7268         (initialize_handler_parm): ... here.
7269         Use MUST_NOT_THROW_EXPR.
7270         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
7271         exception object handling.
7272         (expand_start_eh_spec, expand_end_eh_spec): Remove.
7273         (expand_exception_blocks, alloc_eh_object): Remove.
7274         (begin_eh_spec_block, finish_eh_spec_block): New.
7275         (do_allocate_exception, do_free_exception): New.
7276         (expand_throw): Merge into ...
7277         (build_throw): ... here.  Update for abi.
7278         * expr.c (cplus_expand_expr): No expand_internal_throw.
7279         Handle MUST_NOT_THROW_EXPR.
7280         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
7281         * semantics.c (*) Update for except.h name changes.
7282         (genrtl_try_block): No protect_with_terminate.
7283         (genrtl_eh_spec_block): New.
7284         (genrtl_handler): Don't emit the goto here.
7285         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
7286         (genrtl_finish_function): Don't expand_exception_blocks.
7287         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
7288
7289 2001-03-28  Richard Henderson  <rth@redhat.com>
7290
7291         * decl.c (struct named_label_list): Rename eh_region to
7292         in_try_scope, add in_catch_scope.
7293         (struct binding_level): Rename eh_region to is_try_scope,
7294         add is_catch_scope.
7295         (note_level_for_try): Rename from note_level_for_eh.
7296         (note_level_for_catch): New.
7297         (poplevel): Copy both is_try_scope and is_catch_scope to
7298         the named_label_list struct.
7299         (check_previous_goto_1): Don't check for catch block via
7300         DECL_ARTIFICIAL; use in_try_scope instead.
7301         (check_goto): Likewise.
7302         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
7303         * except.c (expand_start_catch_block): Call note_level_for_catch.
7304         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
7305
7306 2001-03-27  Richard Henderson  <rth@redhat.com>
7307
7308         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
7309         exceptions_via_longjmp.
7310
7311 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
7312
7313         * pt.c (check_default_tmpl_args):  Make error messages clearer.
7314
7315 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
7316
7317         * error.c:  Also undefine 'A' macro used for cp_printers definition.
7318
7319 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7320
7321         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
7322
7323 2001-03-26  Mike Yang <yang@research.att.com>
7324             Mark Mitchell  <mark@codesourcery.com>
7325
7326         * dump.c (dump_access): New function.
7327         (cp_dump_tree): Use it.  Dump basetype information for class
7328         types.
7329
7330 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
7331
7332         * Makefile.in (optimize.o): Depend on params.h.
7333         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
7334         (init_decl_processing): Set flag_no_inline when doing
7335         inlining-on-trees.
7336         * optimize.c: Include params.h.
7337         (struct inline_data): Improve documentation of FNS.  Add
7338         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
7339         (INSNS_PER_STMT): New macro.
7340         (remap_block): Use CLONING_P.
7341         (inlinable_function_p): Don't inline big functions.
7342         (expand_call_inline): Keep track of how much inlining we've done.
7343         (optimize_function): Set FIRST_INLINED_FN.
7344         (maybe_clone_body): Set CLONING_P.
7345         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
7346         tree nodes.
7347         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
7348         rest_of_compilation.  Clear DECL_RTL for local variables
7349         afterwards.
7350         (clear_decl_rtl): New function.
7351
7352 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
7353
7354         Implement DR 209
7355         * cp-tree.h (skip_type_access_control,
7356         reset_type_access_control): Prototype.
7357         * decl.c (grokdeclarator): Access of friends is not checked.
7358         * parse.y (component_decl_list): Reset type access control.
7359         * semantics.c (decl_type_access_control): Clear
7360         current_type_lookups.
7361         (save_type_access_control): Don't save if not deferring.
7362         (skip_type_access_control, reset_type_access_control): New
7363         functions.
7364         (begin_class_definition): Do type access control for basetypes.
7365         Start deferred access control.
7366         (finish_class_definition): Resume immediate access control if
7367         this is a local class.
7368
7369 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7370
7371         * class.c (add_method): Use memcpy/memmove, not bcopy.
7372
7373         * decl.c (duplicate_decls): Likewise.
7374
7375 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
7376
7377         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
7378         not `_'.
7379
7380 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
7381
7382         * decl.c (local_names): Define.
7383         (push_local_name): New.
7384         (grok_reference_init): Return init if initializing static reference
7385         variable with non-constant instead of emitting it.
7386         Move expand_static_init call to cp_finish_decl.
7387         (layout_var_decl): Call push_local_name.
7388         (maybe_commonize_var): Allow inlining functions even if they have
7389         static local variables, use comdat_linkage for them if flag_weak.
7390         (check_initializer): Call obscure_complex_init if
7391         grok_reference_init returned nonzero.
7392         (save_function_data): Clear x_local_names.
7393         (pop_cp_function_context): Free x_local_names.
7394         (mark_inlined_fns): Remove.
7395         (mark_lang_function): Mark x_local_names.
7396         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
7397         Mark inlined_fns as tree, remove call to mark_inlined_fns.
7398         * class.c (alter_access): Ensure DECL_ACCESS is never set if
7399         DECL_DISCRIMINATOR_P.
7400         * cp-tree.h (cp_language_function): Add x_local_names.
7401         (lang_decl_flags): Add discriminator into u2.
7402         (lang_decl_inlined_fns): Remove.
7403         (lang_decl): inlined_fns is now a TREE_VEC.
7404         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
7405         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
7406         TREE_VEC, not a custom structure.
7407         (optimize_function): Likewise.
7408         * mangle.c (discriminator_for_local_entity): Discriminate among
7409         VAR_DECL local entities.
7410         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
7411         is not valid.
7412
7413 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
7414
7415         Add support for Java interface method calls.
7416         * cp-tree.h (struct lang_type): Add java_interface flag.
7417         (TYPE_JAVA_INTERFACE): New macro.
7418         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
7419         by setting TYPE_JAVA_INTERFACE.
7420         * call.c (java_iface_lookup_fn): New static.
7421         (build_over_call): If calling a method declared in a
7422         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
7423         expression which resolves the function address.
7424         (build_java_interface_fn_ref): New function.
7425
7426 2001-03-22  Richard Henderson  <rth@redhat.com>
7427
7428         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
7429         * except.c: Don't include it.
7430
7431 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7432             based on an idea from Joe Buck <jbuck@synopsys.com>
7433
7434         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
7435         New nonterminals.
7436         (data_def, component_decl): Add reductions to bad_decl.
7437
7438 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
7439
7440         * method.c (do_build_assign_ref): Don't use build_modify_expr for
7441         anonymous aggregates, since they don't have assignment operator
7442         method.
7443         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
7444         assignment operators for anonymous structure fields.
7445
7446 2001-03-21  Jason Merrill  <jason@redhat.com>
7447
7448         * pt.c (instantiate_decl): Abort if we see a member constant
7449         instantiation that doesn't already have its initializer.
7450         Downgrade explicit instantiation without definition to pedwarn.
7451
7452         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
7453         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
7454         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
7455
7456         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
7457         (pending_vtables): Remove.
7458         * decl2.c (pending_vtables): Remove.
7459         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
7460         CLASSTYPE_VTABLE_NEEDS_WRITING.
7461         (import_export_class): Likewise.
7462         (init_decl2): Don't mark pending_vtables.
7463         * lex.c (handle_pragma_vtable): Just sorry.
7464         * pt.c (instantiate_class_template): Don't mess with
7465         CLASSTYPE_VTABLE_NEEDS_WRITING.
7466         (mark_class_instantiated): Likewise.
7467         * ptree.c (print_lang_type): Don't print it.
7468         * semantics.c (begin_class_definition): Don't set it.
7469
7470         * pt.c (template_tail): Replace with last_pending_template.
7471         (maybe_templates, maybe_template_tail): Remove.
7472         (add_pending_template): Adjust.
7473         (instantiate_pending_templates): Adjust.
7474
7475         * cp-tree.h (struct saved_scope): Remove lang_stack field.
7476         (current_lang_stack): Remove.
7477         * decl.c (maybe_push_to_top_level): Don't initialize it.
7478         (duplicate_decls): Use current_lang_depth.
7479         (xref_basetypes): Likewise.
7480         * class.c (current_lang_depth): New fn.
7481         (push_lang_context): Use more varray functionality.
7482         (pop_lang_context): Likewise.
7483
7484         * error.c (GLOBAL_THING): Always use '__'.
7485
7486 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
7487
7488         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
7489
7490         * mangle.c (mangle_decl_string): Mangle the names of overloaded
7491         operators, even when they have `extern "C"' linkage.
7492
7493 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
7494
7495         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
7496         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7497         where it's not necessary.
7498         (add_method): Remove optimization involving comparison of
7499         DECL_ASSEMBLER_NAME.
7500         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
7501         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7502         where it's not necessary.
7503         (check_methods): Likewise.
7504         (build_clone): Likewise.
7505         (built_vtt): Likewise.
7506         * cp-tree.h (DECL_NEEDED_P): Likewise.
7507         * decl.c (pushtag): Likewise.
7508         (duplicate_decls): Likewise.
7509         (pushdecl): Likewise.
7510         (builtin_function): Likewise.
7511         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
7512         (build_cp_library_fn): Likewise.
7513         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
7514         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7515         where it's not necessary.
7516         (make_rtl_for_nonlocal_decl): Likewise.
7517         (cp_finish_decl): Likewise.
7518         (grokfndecl): Likewise.
7519         (grokvardecl): Likewise.
7520         (grokdeclarator): Likewise.
7521         (start_function): Likewise.
7522         (cp_missing_return_ok_p): Likewise.
7523         * decl2.c (grokclassfn): Likewise.
7524         (check_classfn): Likewise.
7525         (finish_static_data_member_decl): Likewise.
7526         (grokfield): Likewise.
7527         * error.c (GLOBAL_IORD_P): Remove.
7528         (dump_global_iord): Improve output.
7529         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
7530         * except.c (nothrow_libfn_p): Summarily reject any function not in
7531         namespace-scope.
7532         * init.c (build_java_class_ref): Don't explicitly set
7533         DECL_ASSEMBLER_NAME after calling mangle_decl.
7534         * mangle.c (mangle_decl_string): Handle extern "C" functions.
7535         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
7536         * method.c (set_mangled_name_for_decl): Don't explicitly set
7537         DECL_ASSEMBLER_NAME after calling mangle_decl.
7538         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
7539         IDENTIFIER_GLOBAL_VALUE for the thunk.
7540         * pt.c (set_mangled_name_for_template_decl): Remove.
7541         (check_explicit_specialization): Don't use it.
7542         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
7543         (tsubst_friend_function): Likewise.
7544         (tsubst_decl): Likewise.
7545         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
7546         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
7547         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
7548         where it's not necessary.
7549         (tinfo_base_init): Likewise.
7550         (create_real_tinfo_var): Likewise.
7551         * search.c (looup_field_1): Likewise.
7552         * semantics.c (finish_named_return_value): Likewise.
7553         * tree.c (init_tree): Set lang_set_decl_assembler_name.
7554
7555 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
7556
7557         Correct semantics restrictions checking in throw-expression.
7558         * except.c (is_admissible_throw_operand): New function.
7559         (build_throw): Use it.
7560
7561 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
7562
7563         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
7564         and its ilk.
7565
7566 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
7567
7568         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
7569         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
7570         * decl.c (duplicate_decls): Likewise.
7571         (builtin_function): Likewise.
7572         (build_library_fn): Likewise.
7573         (build_cp_library_fn): Likewise.
7574         (check_initializer): Likewise.
7575         (cp_finish_decl): Likewise.
7576         * decl2.c (grokfield): Likewise.
7577         (grok_function_init): Remove #if 0'd code.
7578         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
7579         * friend.c (do_friend): Likewise.
7580         * init.c (get_temp_regvar): Likewise.
7581         * method.c (make_thunk): Likewise.
7582         * pt.c (tsubst_friend_function): Likewise.
7583         (tsubst_decl): Likewise.
7584         (regenerate_decl_from_template): Likewise.
7585         * semantics.c (genrtl_named_return_value): Likewise.
7586         (expand_body): Likewise.
7587         (genrtl_finish_function): Likewise.
7588         * tree.c (cp_tree_equal): Likewise.
7589
7590 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
7591
7592         * call.c (convert_like_real): Add extra semantics to INNER
7593         parameter. Don't convert to temporary if a user conversion
7594         gives us an lvalue that we're about to bind to a reference.
7595         Set INNER to indicate pending reference binding on recursive
7596         calls.
7597
7598 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
7599
7600         * cp/lex.c: Delete duplicate pending_lang_change.
7601
7602 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
7603
7604         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
7605         Similarly.
7606         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
7607         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
7608
7609 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
7610
7611         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
7612
7613 2001-03-08  Stan Shebs  <shebs@apple.com>
7614
7615         * cp-tree.h (set_identifier_local_value): Remove unused decl.
7616
7617 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
7618
7619         * spew.c: Remove references to CPP_OSTRING.
7620
7621 2001-03-06  Andrew Haley  <aph@redhat.com>
7622
7623         * typeck.c (convert_arguments): Check that we have an fndecl.
7624
7625 2001-03-05  Andrew Haley  <aph@redhat.com>
7626
7627         * typeck.c (convert_arguments): Don't do ellipsis conversion for
7628         __built_in_constant_p.
7629
7630 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
7631
7632         * typeck.c (build_static_cast): Allow enum to enum conversions
7633         as per DR 128.
7634
7635 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
7636
7637         * class.c (check_field_decls): Pointers to member do not a
7638         non-pod struct make, as per DR 148.
7639
7640 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
7641
7642         * call.c (joust): cp_pedwarn when using gnu extension concerning
7643         worst conversion sequences.
7644
7645 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
7646
7647         * decl.c: Replace all uses of 'boolean' with 'bool'.
7648
7649 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
7650
7651         * lang-specs.h: Add zero initializer for cpp_spec field to
7652         all array elements that need one.  Don't put an #ifdef inside
7653         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
7654         use it.
7655
7656 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
7657
7658         Implement using decls inside template functions.
7659         * decl2.c (validate_nonmember_using_decl): Don't special case
7660         fake_std_node in the global namespace. Don't reject early when
7661         processing a template.
7662         (do_local_using_decl): Add to statement tree. Don't do further
7663         processing when building a template.
7664         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
7665
7666 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
7667
7668         * decl2.c (do_nonmember_using_decl): Don't complain if we find
7669         same function. Do complain about ambiguating extern "C"
7670         declarations.
7671
7672 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
7673
7674         Remove floating point and complex type template constant parms.
7675         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
7676         COMPLEX_TYPE extensions.
7677         (invalid_nontype_parm_type_p): Likewise.
7678
7679 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
7680
7681         * except.c (call_eh_info): Revert "match_function"'s type.
7682
7683 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
7684
7685         Fix ctor vtable vcall offsets.
7686         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
7687         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
7688         (get_matching_base): Remove.
7689         (get_original_base): New function.
7690         (build_vtbl_initializer): Initialize vid.rtti_binfo.
7691         Use a virtual thunk for a ctor vtable with an index
7692         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
7693         primary base within a constructor vtable. Only set
7694         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
7695         when primary base has been lost.
7696         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
7697
7698 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
7699
7700         * call.c (joust): Ensure more_specialized()'s argument length
7701         parameter has correct value for constructors.
7702
7703 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
7704
7705         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
7706
7707         * decl.c (mark_inlined_fns): Prototype.
7708
7709 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
7710
7711         * spew.c (yylex): Correct handling of friends.
7712
7713 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
7714
7715         * mangle.c (write_encoding): Pass write_function_type the
7716         FUNCTION_DECL for the function being encoded.
7717         (write_function_type): Pass it along to write_bare_function_type.
7718         (write_bare_function_type): Pass it along to write_method_parms.
7719         (write_method_parms): Don't mangle the compiler-generated
7720         parameters to a constructor or destructor.
7721
7722 2001-02-22  Andreas Jaeger  <aj@suse.de>
7723
7724         * optimize.c: Include toplev.h for
7725         note_deferral_of_defined_inline_function prototype.
7726
7727 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
7728
7729         * cp-tree.h (struct lang_decl_inlined_fns): New.
7730         (struct lang_decls): Add inlined_fns.
7731         (DECL_INLINED_FNS): New macro.
7732         * optimize.c (struct inline_data): Add inlined_fns.
7733         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
7734         (inlinable_function_p): Likewise, fix typo in comment,
7735         function is not inlinable if it already inlined function currently
7736         being optimized.
7737         (expand_call_inline): Add fn to inlined_fns if necessary.
7738         (optimize_function): Initialize inlined_fns.
7739         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
7740         * decl.c (mark_inlined_fns): New function.
7741         (lang_mark_tree): Call it.
7742
7743 2001-02-21  Jason Merrill  <jason@redhat.com>
7744
7745         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
7746         (DECL_UNINLINABLE): Move to middle-end.
7747
7748         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
7749         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
7750         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
7751         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
7752         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
7753
7754         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
7755         second parm of op=.
7756
7757 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
7758
7759         * decl2.c (set_decl_namespace): Allow explicit instantiations in
7760         any namespace.
7761
7762 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7763
7764         * optimize.c (expand_call_inline): Don't walk subtrees of type
7765         nodes.
7766
7767 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
7768
7769         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
7770         for a destructor.
7771
7772 2001-02-18  Jason Merrill  <jason@redhat.com>
7773
7774         Do put the VTT parameter in DECL_ARGUMENTS.
7775         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
7776         (current_vtt_parm): New macro.
7777         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
7778         (DECL_HAS_VTT_PARM_P): New macro.
7779         (DECL_VTT_PARM): Remove.
7780         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
7781         * decl.c (duplicate_decls): Only copy the operator code if
7782         appropriate.
7783         (start_function): Set current_vtt_parm.
7784         (lang_mark_tree): Don't mark vtt_parm.
7785         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
7786         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
7787         * class.c (build_clone): Maybe remove the VTT parm.
7788         * optimize.c (maybe_clone_body): Set up the VTT parm.
7789         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
7790         * call.c (build_over_call): Just allow the VTT arg.
7791         * method.c (make_thunk): Don't set DECL_VTT_PARM.
7792         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
7793         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
7794         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
7795         * error.c (dump_function_decl): Likewise.
7796         * call.c (build_user_type_conversion_1, convert_like_real): Abort
7797         if we try to call a constructor with in-charge or VTT parms.
7798         * method.c (skip_artificial_parms_for): New fn.
7799         * call.c (add_function_candidate, build_over_call): Call it.
7800         * call.c (build_new_method_call): Use current_vtt_parm.
7801         * init.c (expand_virtual_init): Likewise.
7802         * class.c (same_signature_p): No longer static.
7803         * cp-tree.h: Declare it.
7804         * search.c (look_for_overrides_r): Use it.
7805
7806 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
7807
7808         * cp-tree.h (new_abi_rtti_p): Remove.
7809         (name_mangling_version): Likewise.
7810         (flag_do_squangling): Likewise.
7811         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
7812         * decl.c (grokfndecl): Likewise.
7813         * decl2.c (name_mangling_version): Remove.
7814         (flag_do_squangling): Likewise.
7815         (lang_f_options): Remove `squangle'.
7816         (unsupported_options): Add `squangle'.
7817         (cxx_decode_option): Issue a warning about uses of
7818         -fname-mangling-version.
7819         (finish_file): Remove old ABI support.
7820         * pt.c (check_explicit_specialization): Likewise.
7821         (tsubst_decl): Likewise.
7822         * rtti.c (init_rtti_processing): Likewise.
7823         (build_headof): Likewise.
7824         (get_tinfo_decl_dynamic): Likewise.
7825         (tinfo_from_decl): Likewise.
7826         (build_dynamic_cast_1): Likewise.
7827         (synthesize_tinfo_var): Likewise.
7828         * init.c (build_new): Allow enumeration types for the array-bounds
7829         in a direct-new-declarator.
7830
7831         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
7832
7833         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
7834         TREE_PROTECTED from the template being specialized.
7835
7836 2001-02-17  Jason Merrill  <jason@redhat.com>
7837
7838         * decl2.c (build_artificial_parm): Set TREE_READONLY.
7839
7840         * decl.c (bad_specifiers): Allow throw specs on things with
7841         pointer-to-function or -member-function type.
7842         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
7843         a pmf.
7844
7845 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
7846
7847         * call.c (check_dtor_name): Handle template names correctly.
7848
7849 2001-02-16  Jason Merrill  <jason@redhat.com>
7850
7851         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
7852         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
7853         * optimize.c (maybe_clone_body): Don't substitute it.
7854         * call.c (build_new_method_call): Check in_chrg instead.
7855         * init.c (expand_virtual_init): Likewise.
7856
7857 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
7858
7859         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
7860         class-type introduces at least a type-name.
7861
7862 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
7863
7864         * call.c (convert_like_real): Create a temporary for non-lvalue.
7865
7866 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
7867
7868         * cp-tree.h: Fix typos in comments.
7869
7870 2001-02-16  Jason Merrill  <jason@redhat.com>
7871
7872         * optimize.c (remap_block): If we're compiling a clone, pass the
7873         new block to insert_block.
7874
7875 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
7876
7877         * semantics.c (finish_asm_stmt): Robustify.
7878
7879 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
7880
7881         * pt.c (push_template_decl_real): Don't remangle the name of a
7882         class template.
7883
7884 2001-02-15  Jim Meyering  <meyering@lucent.com>
7885
7886         * Make-lang.in (c++.install-common): Depend on installdirs.
7887         (c++.install-info): Likewise.
7888         (c++.install-man): Likewise.
7889
7890 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
7891
7892         * typeck2.c (build_m_component_ref): Robustify.
7893
7894 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
7895
7896         * friend.c (do_friend): Don't take the nested [template] class
7897         into account when deciding whether to warn about the friend
7898         function not referring to a template function.
7899
7900 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
7901
7902         * typeck.c (build_unary_op): Clarify error message.
7903
7904 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
7905
7906         * parse.y (component_constructor_declarator): allow optional
7907         parentheses around constructor class name.
7908
7909 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7910
7911         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
7912         section.
7913         * init.c (emit_base_init): Remove incorrect comment about
7914         virtual bases.
7915         * method.c (make_thunk): Fix comment alignment.
7916
7917 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7918
7919         Kill remnants of this is variable.
7920         * cp-tree.h (flag_this_is_variable): Remove.
7921         * decl2.c (flag_this_is_variable): Remove.
7922         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
7923         (build_vbase_path): The path is non-static, even in a cdtor.
7924         (resolves_to_fixed_type_p): Add additional return value.
7925         * search.c (init_vbase_pointers): Adjust.
7926         * tree.c (lvalue_p_1): Adjust.
7927         * typeck.c (mark_addressable): Adjust.
7928
7929 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7930
7931         * pt.c (unify): Don't check cv quals of array types.
7932
7933 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
7934
7935         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
7936         check whether we already have the type.
7937
7938 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
7939
7940         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
7941         * call.c (build_op_delete_call): Simplify to remove duplicate
7942         code.
7943         * class.c (clone_function_decl): Don't build the deleting variant
7944         of a non-virtual destructor.
7945         * decl.c (finish_destructor_body): Don't call delete if this is a
7946         non-virtual destructor.
7947         * init.c (build_delete): Explicitly call `operator delete' when
7948         deleting an object with a non-virtual destructor.
7949
7950 2001-02-13  Jason Merrill  <jason@redhat.com>
7951
7952         * lang-specs.h: Add more __EXCEPTIONS.
7953
7954 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
7955
7956         * typeck2.c (process_init_constructor): Check
7957         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
7958
7959 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
7960
7961         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
7962         Remove spurious information in comment. Allow further
7963         adjustments of REFERENCE_TYPE args.
7964
7965 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
7966
7967         * errfn.c (cp_deprecated): Tweak diagnostic text.
7968         * parse.y (new_initializer): Deprecate initializer lists
7969         extension.
7970
7971 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
7972
7973         Remove old ABI support.
7974
7975 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
7976
7977         * decl2.c (flag_vtable_thunks): Always set it to 1.
7978         (flag_new_abi): Likewise.
7979         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
7980
7981         * Makefile.in (g++spec.o): Fix typo.
7982
7983 2001-02-09  Jason Merrill  <jason@redhat.com>
7984
7985         * lang-specs.h: Restore definition of __EXCEPTIONS.
7986
7987 2001-02-08  Jason Merrill  <jason@redhat.com>
7988
7989         * search.c (shared_member_p): New function.
7990         (lookup_field_r): Use it.
7991         * cp-tree.h (SHARED_MEMBER_P): Remove.
7992
7993         * method.c (process_overload_item): Handle template-dependent array
7994         bounds.
7995         * pt.c (type_unification_real): If we end up with undeduced nontype
7996         parms, try again.
7997
7998         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
7999         types.
8000
8001         * typeck2.c (friendly_abort): Don't say anything if we have
8002         earlier errors or sorries.
8003
8004         * decl.c (check_tag_decl): Notice attempts to redefine bool and
8005         wchar_t.  Ignore if in_system_header.
8006
8007         * decl.c (maybe_push_cleanup_level): New fn...
8008         (start_decl_1): ...split out from here.
8009         * cvt.c (build_up_reference): Use it.
8010         * cp-tree.h: Declare it.
8011
8012 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
8013
8014         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
8015         spec.
8016
8017 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
8018
8019         * pt.c (lookup_template_class): Make sure it's a primary
8020         template or template_template_parm when called from the parser.
8021         (instantiate_template_class): Add assertion.
8022
8023 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
8024
8025         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
8026         from error_mark_node.
8027
8028 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
8029
8030         Fix specification and implementation bugs in V3 ABI
8031         construction vtables.
8032         * cp-tree.h (flag_dump_class_layout): New flag.
8033         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
8034         (BINFO_LOST_PRIMARY_P): New flag.
8035         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
8036         (BINFO_PRIMARY_MARKED_P): Rename to ...
8037         (BINFO_PRIMARY_P): ... here.
8038         (binfo_via_virtual): New prototype.
8039         * decl2.c (flag_dump_class_layout): New flag.
8040         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
8041         use `=' as a file name separator.
8042         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
8043         bases.
8044         (build_vtbl_address): If this is a virtual primary base, then
8045         get the vtbl of what it is ultimately primary for.
8046         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
8047         for BINFO_PRIMARY_P.
8048         (dfs_skip_nonprimary_vbases_markedp): Likewise.
8049         (get_shared_vbase_if_not_primary): Likewise.
8050         (dfs_get_pure_virtuals): Likewise.
8051         (expand_upcast_fixups): Likewise.
8052         (fixup_virtual_upcast_offsets): Likewise.
8053         (dfs_find_vbase_instance): Likewise.
8054         (find_vbase_instance): Likewise.
8055         (binfo_from_vbase): Adjust comment to reflect reality.
8056         (binfo_via_virtual): New function.
8057         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
8058         for binfo walking during VTT construction.
8059         (dfs_mark_primary_bases): Remove.
8060         (force_canonical_binfo_r): New function.
8061         (force_canonical_binfo): New function.
8062         (mark_primary_virtual_base): New function.
8063         (mark_primary_bases): Walk in inheritance graph order, use
8064         mark_primary_virtual_base.
8065         (determine_primary_base): Use some more intermediate variables.
8066         (dfs_find_final_overrider): Don't check for overriding along a
8067         virtual path.
8068         (dfs_modify_vtables): Walk into primary virtual bases too.
8069         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
8070         (build_base_fields): Likewise.
8071         (dfs_set_offset_for_unshared_vbases): Likewise.
8072         (layout_virtual_bases): Likewise.
8073         (end_of_class): Likewise.
8074         (finish_struct_1): Call dump_class_hierarchy, if requested.
8075         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
8076         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
8077         (dump_class_hierarchy): Add file parameter. Append to file, if
8078         required.
8079         (finish_vtbls): Adjust accumulate_vtbl_inits call.
8080         Use canonical base for virtual bases.
8081         (build_vtt): Add more comments. Adjust build_vtt_inits call.
8082         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
8083         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
8084         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
8085         virtual VTTs.
8086         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
8087         from DATA.  We want virtual primary bases and all bases via virtual.
8088         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
8089         virtual base when not a construction vtable.
8090         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
8091         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
8092         Use canonical bases when processing virtual bases.
8093         (accumulate_vtbl_inits): We're interested in any base via a
8094         virtual path.
8095         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
8096         within a construction vtable, determine what is being overridden.
8097         (build_vtbl_initializer): Add more comments
8098         (add_vcall_offset_vtbl_entries_1): Adjust comment.
8099         (build_rtti_vtbl_entries): Check if the base has lost its
8100         primary.
8101
8102 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
8103
8104         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
8105
8106 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8107
8108         * decl.c (pushdecl): Call abort instead of fatal.
8109         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
8110         * init.c (build_new_1): Likewise.
8111         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
8112         * decl.c (build_typename_type): hash_table_init now returns void.
8113         decl.c (init_decl_processing): Make an error non-fatal.
8114
8115 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
8116
8117         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
8118         Document.
8119         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
8120         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
8121         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8122         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
8123         * decl.c (maybe_commonize_var): Use the new name-mangling where
8124         appropriate.
8125         * decl2.c (comdat_linkage): Enhance comments.  Make all
8126         compiler-generated things static, if COMDAT is not available.
8127         (get_tinfo_decl): Do not make typeinfo objects that belong in the
8128         library COMDAT.
8129         (tinfo_base_init): Use the correct mangled name for typeinfo
8130         strings, and push them into the global scope.
8131         (typeinfo_in_lib_p): New function.
8132         (synthesize_tinfo_var): Use it.
8133         (create_real_tinfo_var): Likewise.
8134
8135 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
8136
8137         * decl.c (push_class_binding): Use context_for_name_lookup instead
8138         of CP_DECL_CONTEXT.
8139         * search.c (context_for_name_lookup): Remove static.  Check for NULL
8140         context in the loop.
8141         * cp-tree.h (context_for_name_lookup): Add prototype.
8142
8143 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
8144
8145         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
8146         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
8147         Remove.
8148         * call.c (convert_class_to_reference, build_user_type_conversion_1,
8149         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
8150
8151 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
8152
8153         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
8154         of macros used when compiling g++spec.c.
8155         * g++spec.c (lang_specific_driver): Link with the shared
8156         libgcc by default.
8157
8158 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8159
8160         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
8161         make_reference_declarator, make_call_declarator), method.c
8162         (implicitly_declare_fn), parse.y (namespace_using_decl,
8163         notype_unqualified_id, expr_or_declarator, new_type_id,
8164         after_type_declarator, direct_after_type_declarator,
8165         notype_declarator, complex_notype_declarator,
8166         complex_direct_notype_declarator, qualified_id,
8167         notype_qualified_id, overqualified_id, direct_new_declarator,
8168         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
8169         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
8170         instead of build_parse_node.
8171
8172 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8173
8174         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
8175         (minus_one_node): Moved to top level gcc directory.  Renamed
8176         to integer_minus_one_node.
8177
8178         * init.c (init_init_processing): Don't set minus_one_node.
8179         (build_vec_init): Use integer_minus_one_node.
8180
8181         * rtti.c (get_tinfo_decl_dynamic): Likewise.
8182
8183 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
8184
8185         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
8186         identical and they would be replaced with constant, remove
8187         MODIFY_EXPR from the tree.
8188
8189 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8190
8191         * Make-lang.in: Remove all dependencies on defaults.h.
8192         * call.c: Don't include defaults.h.
8193         * decl.c: Likewise.
8194         * decl2.c: Likewise.
8195         * except.c: Likewise.
8196         * pt.c: Likewise.
8197         * rtti.c: Likewise.
8198         * tree.c: Likewise.
8199         * typeck.c: Likewise.
8200
8201 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
8202
8203         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
8204         operators even in "C" linkage.
8205         * method.c (set_mangled_name_for_decl): Likewise.
8206         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
8207         overloaded operators in "C" linkage.
8208
8209 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
8210
8211         * pt.c (tsubst_decl): Remove IN_DECL parameter.
8212         (tsubst_arg_types): Check parameter is not void.
8213         (tsubst): Adjust tsubst_decl call.
8214
8215 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
8216
8217         * call.c (add_builtin_candidate): Quote std properly, from
8218         previous change.
8219
8220 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8221
8222         * pt.c (check_explicit_specialization): Clone constructors and
8223         destructors.
8224
8225 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
8226
8227         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
8228         indicates anything special about template depth. Make sure we
8229         only count the user visible template classes.
8230
8231 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
8232
8233         * call.c (build_conv): Typo in comment.
8234         (add_builtin_candidate): Add more explanation.
8235         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
8236         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
8237         when we have enumeral types.
8238         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
8239         candidates for relops and eqops.
8240         (joust): Simplify control flow. Allow a non-template user
8241         function to hide a builtin.
8242
8243 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
8244
8245         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
8246         (more_specialized): Add deduction parameter.
8247         * call.c (joust): Adjust more_specialized call.
8248         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
8249         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
8250         (get_bindings_order): Remove.
8251         (get_bindings_real): Add DEDUCE parameter.
8252         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
8253         REFERENCE_TYPE jig for DEDUCE_ORDER.
8254         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
8255         maybe_adjust_types_for_deduction.
8256         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
8257         directly.
8258         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
8259         (check_cv_quals_for_unify): Use new unify qualifier flags.
8260         (unify): Clear new unify qualifier flags.
8261         (get_bindings_real): Add DEDUCE parameter.
8262         (get_bindings): Adjust call to get_bindings_real.
8263         (get_bindings_overload): Likewise.
8264         (most_specialized_instantiation): Adjust call to
8265         more_specialized.
8266
8267 2001-01-19  Jason Merrill  <jason@redhat.com>
8268
8269         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
8270
8271         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
8272         -fnew-abi.
8273
8274 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
8275
8276         * decl2.c (arg_assoc_class): Fix double iteration logic.
8277
8278 2001-01-19  Jason Merrill  <jason@redhat.com>
8279
8280         * init.c (build_delete): Always call convert_force to strip cv-quals.
8281
8282         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
8283         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
8284         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
8285
8286 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8287
8288         * search.c (get_vbase_1): Count only virtual bases.
8289
8290 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8291
8292         * class.c (duplicate_tag_error): Robustify flag clearing.
8293
8294 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8295
8296         * cp-tree.h (lookup_template_class): Add complain parm.
8297         * decl.c (lookup_namespace_name): Adjust call to
8298         lookup_template_class.
8299         (make_typename_type): Likewise.
8300         * semantics.c (finish_template_type): Likewise.
8301         * pt.c (lookup_template_class): Add complain parm. Adjust.
8302         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
8303         (tsubst): Likewise.
8304
8305 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8306
8307         * pt.c (copy_default_args_to_explicit_spec): Preserve
8308         object's CV quals. Reorganize.
8309
8310 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8311
8312         * typeck.c (build_modify_expr): Say `initialization' for
8313         INIT_EXPRs.
8314         * init.c (build_default_init): Convert to enumeral type, if
8315         needed.
8316
8317 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
8318
8319         * parse.y (nomods_initdcl0): Properly set things up for
8320         initdcl0_innards.
8321
8322 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8323
8324         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
8325         (type_unification_real): Set it.
8326         (unify): Use it.
8327
8328 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8329
8330         * decl.c (finish_destructor_body): Convert to vbase pointer here.
8331
8332 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8333
8334         * semantics.c (begin_class_definition): Check we're not inside a
8335         template parm list.
8336
8337 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
8338
8339         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
8340         BASELINK_P.
8341
8342 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8343
8344         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
8345         * call.c (build_over_call): Add comment.
8346
8347 2001-01-16 Daniel Berlin <dberlin@redhat.com>
8348
8349         * cvt.c (ocp_convert): Handle vector type conversion
8350         * typeck2.c (digest_init): Handle vector type initializations
8351
8352 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
8353
8354         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
8355           was given.
8356
8357 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
8358
8359         * pt.c (check_nontype_parm): Rename to ...
8360         (invalid_nontype_parm_type_p): ... here.
8361         (process_template_parm): Adjust.
8362         (convert_template_argument): Adjust.
8363
8364 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
8365
8366         * pt.c (check_nontype_parm): New function.
8367         (process_template_parm): Use it.
8368         (convert_template_argument): Use it.
8369         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
8370         member.
8371
8372 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
8373
8374         * tree.c: Add defaults.h
8375         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
8376         * Make-lang.in (cp/tree.o): Add defaults.h.
8377
8378 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8379
8380         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
8381
8382 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8383
8384         * g++.1: Change to be ".so man1/gcc.1".
8385
8386 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8387
8388         * Make-lang.in (c++.info, c++.install-info): Build and install g++
8389         internals info.
8390         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
8391         ($(srcdir)/cp/g++int.info): New target.
8392         * gxxint.texi: Add info directory entry.  Use @@ in email address.
8393         * .cvsignore: Update.
8394
8395 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
8396
8397         * typeck.c (build_c_cast): Do template processing earlier.
8398         Always pedwarn on array casts.
8399
8400 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
8401
8402         * friend.c (make_friend_class): Make sure a templated class is
8403         actually a template.
8404
8405 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8406
8407         * decl2.c (get_guard): Set linkage from guarded decl.
8408
8409 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8410
8411         * call.c (convert_default_arg): Check for unprocessed
8412         DEFAULT_ARG.
8413         * cp-tree.h (replace_defarg): Move to spew.c.
8414         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
8415         spew.c, which is where they really are.
8416         (done_pending_defargs): Declare.
8417         (unprocessed_defarg_fn): Declare.
8418         * decl.c (replace_defarg): Move to spew.c
8419         * parse.y (structsp): Call done_pending_defargs.
8420         * spew.c (defarg_fns): Rearrange list structure.
8421         (defarg_fnsdone): New static variable.
8422         (defarg_depfns): New static variable.
8423         (init_spew): Adjust.
8424         (add_defarg_fn): Store the type in TREE_TYPE.
8425         (do_pending_defargs): Detect and deal with ordering constraints
8426         and circularity.
8427         (done_pending_defargs): New function.
8428         (unprocessed_defarg_fn): New function.
8429         (replace_defarg): Moved from decl.c. Robustify. Don't save
8430         if circularity detected.
8431
8432 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8433
8434         * pt.c (unify): Check array has a domain, before checking
8435         whether it is variable sized.
8436
8437 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8438
8439         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
8440         parameters with pointers to arrays of unknown bound.
8441
8442 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
8443
8444         * parse.y (template_parm_header, template_spec_header): New
8445         reductions. Split out from ...
8446         (template_header): ... here. Use them.
8447         (template_template_parm): Use template_parm_header.
8448         * semantics.c (finish_template_template_parm): Add assert.
8449
8450 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
8451
8452         * mangle.c (write_builtin_type): Fix thinko.
8453
8454         * pt.c (copy_default_args_to_explicit_spec_1): New function.
8455         (copy_default_args_to_explicit_spec): Likewise.
8456         (check_explicit_specialization): Use it.
8457
8458         * class.c (finish_struct_1):  Remove last argument in call to
8459         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
8460         * decl.c (builtin_function): Likewise.
8461         (build_cp_library_fn): Likewise.
8462         (check_initializer): Likewise.
8463         (make_rtl_for_nonlocal_decl): Likewise.
8464         (cp_finish_decl): Likewise.
8465         (start_function): Likewise.
8466         * decl2.c (finish_anon_union): Likewise.
8467         * friend.c (do_friend): Likewise.
8468         * init.c (build_java_class_ref): Likewise.
8469         * method.c (make_thunk): Likewise.
8470         * pt.c (tsubst_friend_function): Likewise.
8471         * semantics.c (expand_body): Likewise.
8472
8473 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
8474
8475         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
8476         looking at DECL_CLONED_FUNCTION for non-functions.
8477
8478 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
8479
8480         * error.c (dump_template_parameter): Use parm to determine how
8481         to print default value.
8482
8483 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
8484
8485         * class.c (duplicate_tag_error): Clear more flags.
8486
8487 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
8488
8489         * call.c (build_new_method_call): Use binfo_for_vbase.
8490
8491 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
8492
8493         * cp-tree.h (flag_cond_mismatch): Don't declare.
8494         * decl2.c (flag_cond_mismatch): Don't define.
8495         (lang_f_options): Remove cond-mismatch.
8496         (unsupported_options): Add cond-mismatch.
8497
8498 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
8499
8500         * class.c (handle_using_decl): Reject using of constructor name
8501         of sourcing class. Allow injecting of a method with same name as
8502         nested class. Fixup error messages.
8503
8504 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
8505
8506         * decl2.c (lang_decode_option): Handle -Wformat=2.
8507
8508 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
8509
8510         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
8511         initialized_in_class.
8512         (DECL_DEFINED_IN_CLASS_P): Rename to ...
8513         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
8514         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
8515         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
8516         * pt.c (check_default_tmpl_args): Adjust for
8517         DECL_INITIALIZED_IN_CLASS_P.
8518         (instantiate_class_template): Likewise.
8519         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
8520
8521         * class.c (finish_struct): Constify saved_filename.
8522
8523 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
8524
8525         * class.c (duplicate_tag_error): Adjust diagnostic.
8526         (finish_struct): Locally set location to start of struct.
8527         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
8528
8529 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
8530
8531         * decl.c (struct binding_level): Adjust class_shadowed comments
8532         to reflect reality.
8533         (push_class_level_binding): Adjust comments to reflect reality.
8534         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
8535         Don't set TREE_VALUE on the class_shadowed list.
8536
8537 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8538
8539         * decl2.c (acceptable_java_type): Allow references too.
8540         * init.c (build_java_class_ref): When using the new ABI, search
8541         `class$' and have it mangled with `mangle_decl.'
8542         * mangle.c (write_java_integer_type_codes): New function.
8543         (write_builtin_type): Detect and mangle Java integer and real
8544         types.
8545
8546 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
8547
8548         * decl2.c (grokfield): Don't accept `asm' specifiers for
8549         non-static data members.
8550
8551 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8552
8553         * expr.c (cplus_expand_expr): Don't reset `target'.
8554
8555 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
8556
8557         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
8558
8559 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
8560
8561         * parse.y (template_datadef): Check for error_mark_node.
8562
8563 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
8564
8565         * cp-tree.def (DEFAULT_ARG): Make `x' class.
8566
8567 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
8568
8569         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
8570         (record_builtin_type): Make non-static.
8571         (flag_short_double): Don't declare.
8572         (init_decl_processing): Remove the creation of many tree nodes now
8573         in c_common_nodes_and_builtins.
8574         (build_void_list_node): New function.
8575         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
8576         * cp-tree.h (flag_short_wchar): Don't declare.
8577
8578 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
8579
8580         * call.c (build_conv): Don't use build1 for USER_CONV.
8581         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
8582
8583 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
8584
8585         * lex.c (lang_init): Call c_common_lang_init.
8586
8587 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
8588
8589         * search.c (lookup_fnfields_here): Remove.
8590         (look_for_overrides_r): Use lookup_fnfields_1.
8591         Ignore functions from using declarations.
8592
8593 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
8594
8595         Implement exceptions specifiers for implicit member functions.
8596         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
8597         * method.c (synthesize_exception_spec): New function.
8598         (locate_dtor, locate_ctor, locate_copy): New functions.
8599         (implicitly_declare_fn): Generate the exception spec too.
8600         * search.c (check_final_overrider): Check artificial functions
8601         too.
8602         * typeck2.c (merge_exception_specifiers): New function.
8603
8604 2001-01-03  Jason Merrill  <jason@redhat.com>
8605
8606         * init.c (build_default_init): New fn.
8607         (perform_member_init): Split out from here.
8608         (build_new_1): Use it.  Simplify initialization logic.
8609         (build_vec_init): Take an array, rather than a pointer and maxindex.
8610         Speed up simple initializations.  Don't clean up if we're assigning.
8611         * cp-tree.h: Adjust.
8612         * decl2.c (do_static_initialization): Remove TREE_VEC case.
8613         * parse.y (new_initializer): Return void_zero_node for ().
8614         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
8615         * typeck2.c (digest_init): Only complain about user-written
8616         CONSTRUCTORs.
8617
8618 2000-12-22  Mike Stump  <mrs@wrs.com>
8619
8620         * decl2.c: (max_tinst_depth): Increase to 50.
8621
8622 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
8623
8624         * class.c (invalidate_class_lookup_cache): Zero the
8625         previous_class_values.
8626         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
8627         TREE_INT_CST_HIGH.
8628         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
8629         * decl.c (free_bindings): New variable.
8630         (push_binding): Don't create a new binding if we have one on the
8631         free list.
8632         (pop_binding): Put old bindings on the free list.
8633         (init_decl_processing): Use size_int, not build_int_2.
8634         Register free_bindings as a GC root.
8635         (cp_make_fname_decl): Use size_int, not build_int_2.
8636         (push_inline_template_parms_recursive): Likewise.
8637         (end_template_parm_list): Likewise.
8638         (for_each_template_parm): Do not use walk_tree_without_duplicates.
8639         (tsubst_template_parms): Use size_int, not build_int_2.
8640         (tsubst): Likewise.
8641         * rtti.c (get_vmi_pseudo_type_info): Likewise.
8642
8643 2001-01-02  Richard Henderson  <rth@redhat.com>
8644
8645         * parse.y (asm): Set ASM_INPUT_P.
8646
8647 2001-01-02  Jason Merrill  <jason@redhat.com>
8648
8649         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
8650         for v3 ABI.
8651
8652         * typeck.c (cp_truthvalue_conversion): New fn.
8653         * cvt.c (ocp_convert): Use it.
8654
8655         * cp-tree.h: Lose c-common.c decls.
8656
8657         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
8658         * cvt.c (convert_to_void): Use type_unknown_p.
8659
8660         * typeck.c (strip_all_pointer_quals): Also strip quals from
8661         pointer-to-member types.
8662
8663         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
8664         parse.y as C.
8665
8666         * call.c (build_new_method_call): Do evaluate the object parameter
8667         when accessing a static member.
8668         * typeck.c (build_component_ref): Likewise.
8669
8670 2001-01-02  Andreas Jaeger  <aj@suse.de>
8671
8672         * decl.c (cp_missing_noreturn_ok_p): New.
8673         (init_decl_processing): Set lang_missing_noreturn_ok_p.
8674
8675 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
8676
8677         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
8678
8679 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
8680
8681         * class.c (pushclass): Remove #if 0'd code.
8682         * cp-tree.h (overload_template_name): Remove.
8683         * decl.c (store_bindings): Simplify.
8684         (pop_from_top_level): Likewise.
8685         * pt.c (overload_template_name): Remove.
8686         (instantiate_decl): Don't call push_to_top_level if it's not
8687         needed.
8688
8689 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
8690
8691         * pt.c (register_local_specialization): Don't return a value.
8692         (lookup_template_class): Use move-to-front heuristic when looking
8693         up template instantiations.
8694         (instantiate_decl): Only push_to_top_level when we're actually
8695         going to instantiate the template.
8696
8697 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
8698
8699         * search.c (binfo_for_vtable): Return least derived class, not
8700         most.  Handle secondary vtables.
8701
8702 2000-12-22  Jason Merrill  <jason@redhat.com>
8703
8704         * pt.c (more_specialized): Don't optimize len==0.
8705         (fn_type_unification): If we're adding the return type, increase len.
8706
8707         * typeck.c (build_binary_op): Fix pmf comparison logic.
8708
8709         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
8710         DECL_STATIC_FUNCTION_P.
8711
8712         * semantics.c (genrtl_finish_function): Don't try to jump to
8713         return_label unless it exists.
8714
8715         In partial ordering for a call, ignore parms for which we don't have
8716         a real argument.
8717         * call.c (joust): Pass len to more_specialized.
8718         (add_template_candidate_real): Strip 'this', pass len.
8719         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
8720         (get_bindings_order): New fn.  Pass len down.
8721         (get_bindings_real): Strip 'this', pass len.
8722         (fn_type_unification): Likewise.
8723         (type_unification_real): Succeed after checking 'len' args.
8724         (most_specialized_instantiation): Lose explicit_args parm.
8725         * class.c (resolve_address_of_overloaded_function): Strip 'this',
8726         pass len.
8727
8728 2000-12-21  Jason Merrill  <jason@redhat.com>
8729
8730         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
8731         DECL_TEMPLATE_RESULT.
8732
8733         * search.c (lookup_field_r): Call lookup_fnfields_1, not
8734         lookup_fnfields_here.
8735
8736         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
8737
8738         * call.c (build_object_call): Also allow conversions that return
8739         reference to pointer to function.
8740         (add_conv_candidate): Handle totype being ref to ptr to fn.
8741         (build_field_call): Also allow members of type reference to function.
8742         Lose support for calling pointer to METHOD_TYPE fields.
8743
8744         * error.c (dump_expr): Handle *_CAST_EXPR.
8745
8746         * typeck2.c (build_scoped_ref): Always convert to the naming class.
8747
8748         * tree.c (break_out_cleanups): Lose.
8749         * cp-tree.h: Remove prototype.
8750         * typeck.c (build_component_ref): Don't break_out_cleanups.
8751         (build_compound_expr): Likewise.
8752         * semantics.c (finish_expr_stmt): Likewise.
8753
8754 2000-12-20  Richard Henderson  <rth@redhat.com>
8755
8756         * cp-tree.h: Update declarations.
8757         * decl.c (finish_case_label): Return the new stmt node.
8758         * semantics.c (finish_goto_stmt): Likewise.
8759         (finish_expr_stmt, finish_return_stmt): Likewise.
8760         (finish_break_stmt, finish_continue_stmt): Likewise.
8761         (finish_asm_stmt): Likewise.
8762         * parse.y (already_scoped_stmt): Set STMT_LINENO.
8763         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
8764         (simple_if, simple_stmt): Return the new stmt node.
8765         (save_lineno): New.
8766
8767 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
8768
8769         * cp-tree.h: Don't declare warn_long_long.
8770
8771 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8772
8773         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
8774         IS_AGGR_TYPE.
8775
8776 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8777
8778         * pt.c (unify): Handle when both ARG and PARM are
8779         BOUND_TEMPLATE_TEMPLATE_PARM.
8780
8781 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8782
8783         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
8784         DECL_TEMPLATE_PARM_P.
8785
8786 2000-12-15  Jason Merrill  <jason@redhat.com>
8787
8788         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
8789
8790         * init.c (build_new_1): Don't strip quals from type.
8791
8792         * decl.c (pushdecl): Don't check for linkage on a non-decl.
8793
8794         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
8795
8796         * call.c (build_new_function_call): Lose space before paren in
8797         error message.
8798         (build_new_method_call): Likewise.
8799
8800         * typeck2.c (build_m_component_ref): Propagate quals from datum.
8801
8802 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8803
8804         * pt.c (check_explicit_specialization): Propagate default
8805         function arguments to explicit specializations.
8806
8807 2000-12-13  DJ Delorie  <dj@redhat.com>
8808
8809         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
8810         and <? operators.
8811
8812 2000-12-08  Jason Merrill  <jason@redhat.com>
8813
8814         * error.c (dump_function_name): Don't let the user see __comp_ctor.
8815
8816         Clean up copy-initialization in overloading code.
8817         * call.c (build_user_type_conversion_1): Die if we are asked to
8818         convert to the same or a base type.
8819         (implicit_conversion): Avoid doing so.  Lose reference binding code.
8820         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
8821         direct-initialization.  Also do direct-init part of copy-init.
8822         (build_user_type_conversion): Don't provide context to convert_like.
8823         * cvt.c (ocp_convert): build_user_type_conversion will now provide
8824         the constructor call for copy-init.
8825
8826         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
8827         instantiation of a member template.
8828         (do_decl_instantiation): Not here.
8829
8830 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
8831
8832         * class.c (check_field_decls): Don't special case anonymous
8833         fields in error messages.
8834         (note_name_declared_in_class): Use %D on diagnostic.
8835
8836         * tree.c (pod_type_p): Use strip_array_types.
8837         (cp_valid_lang_attribute): Likewise.
8838         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
8839         multiple evaluations.
8840         (cp_has_mutable_p): Use strip_array_types.
8841
8842 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
8843
8844         * cp-tree.h (sufficient_parms_p): Declare new function.
8845         * call.c (sufficient_parms_p): New function, broken out of ...
8846         (add_function_candidate): ... here. Use it.
8847         (add_conv_candidate): Use it.
8848         * decl.c (grok_ctor_properties): Use it.
8849
8850 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
8851
8852         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
8853
8854 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
8855
8856         * decl2.c (lang_decode_option): Handle -Wformat-security.
8857
8858 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8859
8860         * pt.c (verify_class_unification): New function.
8861         (get_class_bindings): Use it.
8862         (try_class_unification): Tidy.
8863         (unify): Handle when argument of a template-id is not
8864         template parameter dependent.
8865         (template_args_equal): Handle when TREE_CODE's do not match.
8866
8867 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
8868
8869         * lang-specs.h (c++): When invoking the stand-alone preprocessor
8870         for -save-temps, pass all relevant -Defines to it, and then don't
8871         pass them to cc1plus.
8872
8873 2000-12-05  Will Cohen  <wcohen@redhat.com>
8874
8875         * decl.c (finish_case_label): Cleared
8876         more_cleanups_ok in surrounding function scopes.
8877         (define_label): Likewise.
8878
8879 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
8880
8881         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
8882         (get_matching_virtual): Remove.
8883         (look_for_overrides): Declare new function.
8884         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
8885         DECL_VINDEX here.
8886         * class.c (check_for_override): Move base class iteration code
8887         to look_for_overrides.
8888         * search.c (next_baselink): Remove.
8889         (get_virtuals_named_this): Remove.
8890         (get_virtual_destructor): Remove.
8891         (tree_has_any_destructors_p): Remove.
8892         (struct gvnt_info): Remove.
8893         (check_final_overrider): Remove `virtual' from error messages.
8894         (get_matching_virtuals): Remove. Move functionality to ...
8895         (look_for_overrides): ... here, and ...
8896         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
8897         to be overriding.
8898
8899 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
8900
8901         * typeck.c (get_delta_difference): If via a virtual base,
8902         return zero.
8903         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
8904         adjustment.
8905
8906 2000-12-04  Richard Henderson  <rth@redhat.com>
8907
8908         * error.c (dump_tree): Use output_add_string not OB_PUTS.
8909
8910 2000-12-04  Jason Merrill  <jason@redhat.com>
8911
8912         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
8913         (write_builtin_type): Pass intSI_type_node and the like through
8914         type_for_mode.
8915         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
8916         Pass intSI_type_node and the like through type_for_mode.
8917         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
8918         * pt.c (tsubst, unify): Likewise.
8919         * tree.c (walk_tree): Likewise.
8920         * error.c (dump_type): Likewise.
8921         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
8922
8923         * Make-lang.in: Tweak top comment for emacs.
8924         (cp/TAGS): Restore.
8925
8926         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
8927
8928         * class.c (clone_function_decl): Robustify.
8929
8930 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
8931
8932         * decl.c (store_bindings): Only search in the non modified
8933         old_bindings for duplicates.
8934
8935 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
8936
8937         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
8938         TYPE_POLYMORPHIC_P.
8939
8940         * typeck.c (build_static_cast): Remove unused variable.
8941
8942 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8943
8944         * pt.c: Fix typo in comment.
8945
8946 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
8947
8948         * decl2.c (warn_format): Remove definition.
8949         (lang_decode_option): Handle -Wformat-nonliteral,
8950         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
8951
8952 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
8953
8954         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
8955         (init_decl_processing): Don't create string_type_node,
8956         const_string_type_node, wint_type_node, intmax_type_node,
8957         uintmax_type_node, default_function_type, ptrdiff_type_node and
8958         unsigned_ptrdiff_type_node.  Adjust position of call to
8959         c_common_nodes_and_builtins.
8960         (identifier_global_value): New function.
8961
8962 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
8963
8964         * call.c (standard_conversion): Reject pointer to member
8965         conversions from ambiguous, inaccessible or virtual bases.
8966         * typeck.c (build_static_cast): Don't check pointers to members
8967         specially.
8968
8969 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
8970
8971         * method.c (do_build_copy_constructor): Preserve cv
8972         qualifications when accessing source object members.
8973         (do_build_assign_ref): Likewise. Remove separate diagnostics for
8974         unnamed fields.
8975
8976 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
8977
8978         * method.c (do_build_assign_ref): Construct appropriately
8979         CV-qualified base reference. Don't allow const casts in base
8980         conversion.
8981
8982 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
8983
8984         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
8985         incomplete return type.
8986
8987 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8988
8989         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
8990         * semantics.c (finish_base_specifier): Accept a _TYPE not a
8991         _DECL.
8992
8993 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8994
8995         * spew.c (yyerror): Cope if yylval.ttype is NULL.
8996
8997 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
8998
8999         * decl.c (grokdeclarator): Diagnose undefined template contexts.
9000
9001 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9002
9003         * decl.c (grokdeclarator): Do type access control on friend
9004         class.
9005
9006 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
9007
9008         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
9009         bison parser ickiness.
9010         * pt.c (tsubst_friend_function): Enter namespace scope when
9011         tsubsting the function name.
9012         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
9013
9014 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
9015
9016         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
9017         * cvt.c (cp_convert_to_pointer): Add force parameter.
9018         Allow conversions via virtual base if forced.
9019         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
9020         (ocp_convert): Likewise.
9021         * search.c (binfo_from_vbase): Return the virtual base's binfo.
9022         * typeck.c (get_delta_difference): Adjust handling of virtual
9023         bases.
9024
9025 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
9026
9027         * tree.c (struct list_hash): Remove.
9028         (list_hash_table): Make it be an htab.
9029         (struct list_proxy): New type.
9030         (list_hash_eq): New function.
9031         (list_hash_pieces): Renamed from ...
9032         (list_hash): ... this.
9033         (list_hash_lookup): Remove.
9034         (list_hash_add): Remove.
9035         (hash_tree_cons): Use the generic hashtable.
9036         (mark_list_hash): Remove.
9037         (init_tree): Create the hashtable.
9038
9039 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
9040
9041         * method.c (build_mangled_C9x_name): Rename to
9042         build_mangled_C99_name.  Change C9X references in comments to
9043         refer to C99.
9044
9045 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
9046
9047         * parse.y (unary_expr): Move VA_ARG from here ...
9048         (primary): ... to here.
9049
9050 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
9051
9052         * semantics.c (finish_id_expr): If type is error_mark, return
9053         error_mark.
9054
9055 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
9056
9057         * pt.c (lookup_template_class): Simplify loop exit constructs.
9058         Cope when there is no partial instantiation of a template
9059         template member.
9060
9061 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
9062
9063         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
9064
9065 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
9066
9067         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
9068         prefix.
9069
9070         * pt.c (do_decl_instantiate): Explicitly clone constructors and
9071         destructors that haven't already been cloned.
9072
9073 2000-11-20  Richard Henderson  <rth@redhat.com>
9074
9075         * parse.y (yyparse_1): Rename the parser entry point.
9076
9077 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
9078
9079         * mangle.c (write_name): Use <unscoped-name> for names directly in
9080         function scope.
9081         (write_unscoped_name): Accept names directly in function scope.
9082
9083 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
9084
9085         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
9086         * parse.y (extdef): Add EXPORT reduction.
9087         * spew.c (yylex): Don't skip export here.
9088
9089 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
9090
9091         * decl.c (init_decl_processing): Correct name of pure virtual
9092         function under the new ABI.
9093         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
9094         (throw_bad_typeid): Likewise for bad typeid function.
9095
9096 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
9097
9098         * decl.c (grokparms): Don't even function types of `void' type,
9099         either.
9100         * mangle.c (write_type): Don't crash when confronted with the
9101         error_mark_node.
9102
9103         * decl.c (grokparms): Don't create parameters of `void' type.
9104
9105 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
9106
9107         * lex.c (mark_impl_file_chain): Delete.
9108         (init_parse): Remove call to ggc_add_string_root.  No need to
9109         ggc_strdup a string constant.  Do not add impl_file_chain to GC
9110         roots.
9111         (handle_pragma_implementation): No need to ggc_strdup main_filename.
9112
9113 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9114
9115         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
9116
9117 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9118
9119         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
9120         * decl.c (grokdeclarator): Don't reject void parms here.
9121         (require_complete_types_for_parms): Simplify, use
9122         complete_type_or_else.
9123         (grokparms): Remove bitrot. Remove funcdef parm.
9124         Deal with ellipsis parm lists here.
9125         * semantics.c (finish_parmlist): Don't append void_list_node
9126         here. Set PARMLIST_ELLIPSIS_P.
9127
9128 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9129
9130         * typeck2.c (incomplete_type_error): Reorganize to avoid
9131         excessive diagnostics.
9132
9133 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
9134
9135         * lex.c (struct impl_files, internal_filename): Constify a char *.
9136
9137 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
9138
9139         * mangle.c (write_special_name_constructor): Don't generate
9140         assembler junk when confronted with an old-style constructor.
9141         (write_special_name_destructor): Likewise.
9142         (mangle_decl_string): Do it here instead.
9143
9144 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
9145
9146         * call.c (op_error): Make error messages clearer.
9147
9148 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
9149
9150         * decl.c (wrapup_globals_for_namespace): Don't mark things
9151         TREE_ASM_WRITTEN when they're not.
9152
9153 2000-11-15  Jason Merrill  <jason@redhat.com>
9154
9155         * typeck2.c (friendly_abort): Uncount the error before handing
9156         off to fancy_abort.
9157
9158 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
9159
9160         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
9161
9162 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
9163
9164         * class.c (build_vtbl_initializer): Fix typo in comment.
9165         * typeck.c (expr_sizeof): Don't crash on errors.
9166
9167 2000-11-14  Jim Wilson  <wilson@redhat.com>
9168
9169         * lang-specs.h: Add %2 after %(cc1_options).
9170
9171 2000-11-14  Richard Henderson  <rth@redhat.com>
9172
9173         * typeck.c (c_sizeof): Be strict about casting result value
9174         back to c_size_type_node.
9175         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
9176
9177 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9178
9179         * typeck.c (build_unary_op): Use boolean_increment from
9180         c-common.c, moving the relevant code there.
9181
9182 2000-11-11  Jason Merrill  <jason@redhat.com>
9183
9184         * typeck.c (mark_addressable): Don't call put_var_into_stack.
9185
9186         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
9187         in inlines.
9188
9189 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9190
9191         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
9192         * lex.c (copy_lang_decl): Likewise.
9193
9194 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
9195
9196         * dump.c (cp_dump_tree): Don't dump function bodies here.
9197
9198         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
9199         (dump.o): Update dependency list.
9200         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
9201         (flag_dump_translation_unit): Likewise.
9202         (CP_TYPE_QUALS): Adjust definition.
9203         (DECL_C_BIT_FIELD): Remove.
9204         (SET_DECL_C_BIT_FIELD): Likewise.
9205         (CLEAR_DECL_C_BIT_FIELD): Likewise.
9206         (add_maybe_template): Likewise.
9207         (strip_array_types): Likewise.
9208         (dump_node_to_file): Likewise.
9209         (cp_dump_tree): New function.
9210         * decl.c (init_decl_processing): Set lang_dump_tree.
9211         * decl2.c (flag_dump_translation_unit): Remove.
9212         * dump.c: Move most of it to ../c-dump.c.
9213         (cp_dump_tree): New function.
9214         * pt.c (add_maybe_template): Remove.
9215         * typeck.c (strip_array_types): Likewise.
9216
9217 2000-11-07  Eric Christopher  <echristo@redhat.com>
9218
9219         * decl.c (init_decl_processing): Change definition of
9220         __wchar_t to wchar_t.  Remove artificial declaration of
9221         wchar_t.
9222         * lex.c: Change instances of __wchar_t to wchar_t.
9223
9224 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
9225
9226         * lex.c (do_identifier): Don't lookup_name for operators.
9227         * parse.y (operator): Save looking_for_typename.
9228         (unoperator): Restore it.
9229         * spew.c (frob_opname): Use nth_token for lookahead.
9230
9231 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
9232
9233         * decl.c (grok_op_properties): Always use coerce_new_type and
9234         coerce_delete_type.
9235         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
9236         exception specification. Tidy up.
9237         (coerce_delete_type): Preserve exception specification. Tidy up.
9238
9239 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
9240
9241         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
9242         (push_binding_level), error.c (cp_tree_printer), pt.c
9243         (process_partial_specialization, tsubst_template_arg_vector),
9244         search.c (lookup_member): Use memset () instead of bzero ().
9245
9246 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
9247
9248         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
9249
9250 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
9251
9252         * Make-lang.in (c++.distdir): Remove.
9253
9254 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
9255
9256         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
9257         declarations from different namespaces to be combined.
9258
9259 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
9260
9261         * decl.c: Include tm_p.h.
9262
9263 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
9264
9265         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
9266
9267 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9268
9269         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
9270         (build_overload_value), repo.c (open_repo_file), xref.c
9271         (open_xref_file): Use strchr () and strrchr () instead of index ()
9272         and rindex ().
9273
9274 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
9275
9276         * call.c (build_over_call): Call fold on the CALL_EXPR.
9277
9278 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
9279
9280         * error.c (dump_template_decl): Separate template hearders with
9281         space not comma.
9282
9283 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
9284
9285         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
9286         TS_* flags with corresponding TFF_*.  Adjust prototypes of
9287         functions (which used to take a tree_string_flags) to take an int.
9288
9289         * cp-tree.h (enum tree_string_flags): Remove
9290         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
9291         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
9292         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
9293         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
9294         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
9295         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
9296         (type_as_string, decl_as_string, expr_as_string,
9297         context_as_string): Adjust prototype.
9298
9299         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
9300         instead of TS_PLAIN.
9301
9302         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
9303         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
9304         plain `0'.
9305
9306 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
9307
9308         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
9309         (linkage_kind): New enumeration.
9310         (decl_linkage): New function.
9311         * decl2.c (comdat_linkage): Extend comment.
9312         * error.c (dump_function_decl): Print the arguments used to
9313         instantiate a template, even when not printing the type of the
9314         function.
9315         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
9316         not TREE_PUBLIC, to test for external linkage.
9317         * tree.c (decl_linkage): New function.
9318
9319 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
9320
9321         * pt.c (instantiate_decl): Always instantiate static data members
9322         initialized in-class.
9323
9324 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
9325
9326         * Make-lang.in: Move all build rules here from Makefile.in,
9327         adapt to new context.  Wrap all rules that change the current
9328         directory in parentheses.  Expunge all references to $(P).
9329         When one command depends on another and they're run all at
9330         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
9331         all object-file generation rules.  Delete obsolete variables.
9332
9333         * Makefile.in: Delete.
9334         * config-lang.in: Delete outputs= line.
9335
9336 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
9337
9338         * error.c (dump_function_decl): Print no space between
9339         `ptr-operator' the `type-specifier' of the return type.
9340         (dump_type_prefix): Make sure we put space at the appropriate
9341         place.
9342
9343 2000-10-23  Jason Merrill  <jason@redhat.com>
9344
9345         * call.c (equal_functions): Also call decls_match for extern "C" fns.
9346
9347 2000-10-22  Jason Merrill  <jason@redhat.com>
9348
9349         * call.c (build_conditional_expr): Use ocp_convert to force
9350         rvalue conversion.
9351
9352 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
9353
9354         * call.c (standard_conversion): Use RVALUE_CONVs for all
9355         expressions that satisfy lvalue_p, not just those that satisfy
9356         real_lvalue_p.
9357
9358         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
9359
9360         * typeck.c (c_sizeof): Return an expression of `size_t' type,
9361         not one with TYPE_IS_SIZETYPE set.
9362         (dubious_conversion_warnings): Remove special-case code.
9363
9364 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
9365
9366         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
9367         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
9368         (dump_type_prefix): Print vector-of-int as 'int vector'.
9369         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
9370         * tree.c (walk_tree): Handle VECTOR_TYPE.
9371
9372         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
9373
9374 2000-10-21  Jason Merrill  <jason@redhat.com>
9375
9376         * parse.y (operator): Set got_object from got_scope.
9377         Set looking_for_typename.
9378         * decl.c (lookup_name_real): Clear val after setting from_obj.
9379         Reorganize diagnostic.
9380
9381 2000-10-20  Jason Merrill  <jason@redhat.com>
9382
9383         * tree.c (walk_tree): Don't walk into default args.
9384
9385         * error.c (dump_expr): Use host_integerp.
9386
9387 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
9388
9389         * typeck2.c (abstract_virtuals_error): Use "because" instead of
9390         "since" in error message.
9391
9392 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9393
9394         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
9395
9396 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
9397
9398         * decl.c (revert_static_member_fn): Fixed typo.
9399
9400 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
9401
9402         * class.c (subobject_offset_fn): New type.
9403         (dfs_record_base_offsets): Remove.
9404         (record_base_offsets): Likewise.
9405         (dfs_search_base_offsets): Likewise.
9406         (record_subobject_offset): New function.
9407         (check_subobject_offset): Likewise.
9408         (walk_subobject_offsets): Likewise.
9409         (record_subobject_offsets): Likewise.
9410         (layout_conflict_p): Reimplement.
9411         (layout_nonempty_base_or_field): Correct handling of type
9412         conflicts during layout.
9413         (layout_empty_base): Likewise.
9414         (build_base_field): Adjust to handle new representation of empty
9415         base offset table.
9416         (build_base_fields): Likewise.
9417         (layout_virtual_bases): Likewise.
9418         (splay_tree_compare_integer_csts): New function.
9419         (layout_class_type): Use a splay_tree, rather than a varray, to
9420         represent the offsets of empty bases.
9421
9422         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
9423         * decl.c (select_decl): Don't return declarations that are
9424         DECL_ANTICIPATED.
9425
9426 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
9427
9428         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
9429         (fake_std_node): New macro.
9430         * decl.c (in_std): Rename to ...
9431         (in_fake_std): ... this.
9432         (flag_no_builtin): Remove.
9433         (flag_no_nonansi_builtin): Likewise.
9434         (walk_namespaces_r): Use fake_std_node.
9435         (push_namespace): Use std_identifier.
9436         (pop_namespace): Use in_fake_std.
9437         (lookup_name_real): Use fake_std_node.
9438         (init_decl_processing): When -fhonor-std, create the `std'
9439         namespace.  Don't create a dummy fake_std_node in that case.
9440         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
9441         (builtin_function): Put builtins whose names don't begin
9442         with `_' in the std namespace.
9443         * decl2.c (flag_no_builtin): Remove.
9444         (flag_no_nonansi_builtin): Likewise.
9445         (set_decl_namespace): Use fake_std_node.
9446         (validate_nonmember_using_decl): Likewise.
9447         (do_using_directive): Likewise.
9448         (handle_class_head): Likewise.
9449         * dump.c (dequeue_and_dump): Likewise.
9450         * except.c (init_exception_processing): Use std_identifier.
9451         * init.c (build_member_call): Use fake_std_node.
9452         * rtti.c (init_rtti_processing): Use std_identifier.
9453
9454 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
9455
9456         * cp-tree.h (back_end_hook): Remove declaration.
9457         * decl2.c (back_end_hook): Remove definition.
9458
9459         * dump.c (dequeue_and_dump): Dump TREE_USED.
9460
9461 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
9462
9463         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
9464
9465 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
9466
9467         * decl.c (WINT_TYPE): Define.
9468         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
9469         c_size_type_node, signed_size_type_node and wint_type_node.
9470
9471 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
9472
9473         * decl2.c (warn_missing_format_attribute): New variable.
9474         (lang_decode_option): Decode -Wmissing-format-attribute.
9475
9476 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
9477
9478         * typeck.c (qualify_type): Remove.
9479         (composite_pointer_type): Fix handling of conversions to `cv void*'.
9480
9481 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9482
9483         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
9484
9485 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9486
9487         * Makefile.in (parse.c, parse.h): Create atomically.
9488
9489 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
9490
9491         * class.c (current_obstack): Remove.
9492         * decl.c (ggc_p): Remove.
9493         (start_decl): Don't use decl_tree_cons.
9494         (grokdeclarator): Don't use build_decl_list.
9495         (start_function): Don't use decl_tree_cons.
9496         (finish_function): Don't mess with obstacks.
9497         * decl2.c (grok_x_components): Don't use build_decl_list.
9498         * lex.c (make_call_declarator): Don't call decl_tree_cons.
9499         (implicitly_declare_fn): Don't call build_decl_list.
9500         * parse.y (frob_specs): Don't call build_decl_list or
9501         decl_tree_cons.
9502         (expr_or_declarator_intern): Don't call decl_tree_cons.
9503         (primary): Don't call build_decl_list.
9504         (fcast_or_absdcl): Likewise.
9505         (typed_declspecs): Don't call decl_tree_cons.
9506         (reserved_declspecs): Don't call build_decl_list.
9507         (declmods): Likewise.
9508         (reserved_typespecquals): Likewise.
9509         (aggr): Likewise.
9510         (new_type_id): Likewise.
9511         (cv_qualifiers): Likewise.
9512         (after_type_declarator_intern): Likewise.
9513         (notype_declarator_intern): Likewise.
9514         (absdcl_intern): Likewise.
9515         (named_parm): Likewise.
9516         * pt.c (most_specialized_class): Likewise.
9517         * repo.c (temporary_obstack): Make it a structure, not a pointer.
9518         (init_repo): Initialize it.
9519         * search.c (current_obstack): Remove.
9520         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
9521
9522 2000-10-09  Richard Henderson  <rth@cygnus.com>
9523
9524         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
9525         (c++ language support bits for libgcc): Remove.
9526         (c++.clean): Remove cplib2.txt cleanup.
9527         * config-lang.in (headers, lib2funcs): Remove.
9528
9529         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
9530         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
9531         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
9532         * inc/new.h, inc/typeinfo: Remove files.
9533
9534 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
9535
9536         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
9537         defined.
9538         (init_decl_processing): Initialize intmax_type_node and
9539         uintmax_type_node.
9540
9541 2000-10-06  Richard Henderson  <rth@cygnus.com>
9542
9543         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
9544         (original_result_rtx): Remove.
9545         * decl.c (save_function_data): Don't clear x_result_rtx.
9546         (mark_lang_function): Don't mark it either.
9547         * expr.c (fixup_result_decl): Remove.
9548         * semantics.c (genrtl_named_return_value): Frob the return decl
9549         before calling emit_local_var.
9550         (genrtl_finish_function): Don't call fixup_result_decl.
9551         Always emit the jump to return_label.
9552
9553 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
9554
9555         * pt.c (lookup_template_class): Set current access for enum.
9556         (tsubst_enum): Set file & line for enum decl.
9557
9558         * spew.c (yylex): Remove unused variable.
9559
9560 2000-10-05  Richard Henderson  <rth@cygnus.com>
9561
9562         * semantics.c (genrtl_finish_function): Don't init or check
9563         can_reach_end; remove noreturn and return value checks.
9564
9565 2000-10-05  Tom Tromey  <tromey@cygnus.com>
9566
9567         * init.c (build_java_class_ref): Use `build_static_name' with a
9568         suffix, not a prefix, to build the class object's name.
9569
9570 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
9571
9572         * cp-tree.h (access_kind): Fix comment typo.
9573         * decl2.c (grokfield): Fix diagnostic typo.
9574         * semantics.c (finish_template_type): Fix comment typo.
9575         (finish_qualified_object_call_expr): Likewise.
9576
9577 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
9578
9579         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
9580         tsubsting fails.
9581
9582 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
9583
9584         * spew.c (frob_id): New static function.
9585         (frob_opname): Use it.
9586         (yylex): Use it.
9587
9588 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
9589
9590         * decl.c (lang_mark_false_label_stack): Remove.
9591         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
9592
9593 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
9594
9595         * gxxint.texi: Use @email for formatting email addresses.
9596
9597 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
9598
9599         * error.c: Remove direct obstack manipulation.  Replace with
9600         output_buffer-based formatting.  Adjust calls to removed macros.
9601         (obstack_chunk_alloc, obstack_chunk_free): Remove.
9602         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
9603         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
9604
9605 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
9606
9607         * ir.texi: Move to ../c-tree.texi.
9608
9609 2000-09-20  Jason Merrill  <jason@redhat.com>
9610
9611         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
9612
9613 2000-09-21  Andreas Jaeger  <aj@suse.de>
9614
9615         * errfn.c: Move declaration of cp_printer and cp_printers to ...
9616         * cp-tree.h: ... here.
9617
9618         * error.c: Remove declaration of cp_printer.
9619
9620 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
9621
9622         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
9623
9624 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
9625
9626         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
9627         users.
9628
9629 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
9630
9631         * decl.c (start_function): Robustify.
9632
9633 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9634
9635         * cp-tree.h (check_function_format): Accept a `status' parameter.
9636
9637         * call.c, typeck.c: Updates calls to `check_function_format'.
9638
9639 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
9640
9641         * decl2.c (handle_class_head): Always push some scope even
9642         in the error case.
9643
9644 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
9645
9646         * cp-tree.h (struct cp_language_function): Remove
9647         x_scope_stmt_stack and name_declared.
9648         (current_scope_stmt_stack): Remove.
9649         (function_name_declared_p): New macro.
9650         (struct lang_decl_flags): Use c_lang_decl as a base class.
9651         (context): Remove.
9652         (struct lang_decl): Replace saved_tree with context.
9653         (DECL_FRIEND_CONTEXT): Adjust accordingly.
9654         (SET_DECL_FRIEND_CONTEXT): Likewise.
9655         (DECL_VIRTUAL_CONTEXT): Likewise.
9656         (DECL_SAVED_TREE): Remove.
9657         (C_DECLARED_LABEL_FLAG): Likewise.
9658         (cplus_expand_expr_stmt): Don't declare.
9659         (add_decl_stmt): Likewise.
9660         (add_scope_stmt): Likewise.
9661         * decl.c (mark_stmt_tree): Remove.
9662         (case_compare): Likewise.
9663         (finish_case_label): Use c_add_case_label.
9664         (init_decl_processing): Set more language-specific hooks.
9665         (build_enumerator): Fix typo in comment.
9666         (cplus_expand_expr_stmt): Remove.
9667         (mark_lang_function): Use mark_c_language_function.
9668         (lang_mark_tree): Use c_mark_lang_decl.
9669         * decl2.c: Change order of inclusion.
9670         * except.c: Likewise.
9671         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
9672         back on c_expand_expr.
9673         * friend.c: Include expr.h.
9674         * init.c: Change order of inclusion.
9675         * Makefile.in: Update dependencies.
9676         * lex.h (free_lang_decl_chain): Remove.
9677         * optimize.c (maybe_clone_body): Use function_name_declared_p.
9678         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
9679         it doesn't exist.
9680         (instantiate_decl): Use function_name_declared_p.
9681         * semantics.c (lang_expand_expr_stmt): Remove.
9682         (set_current_function_name_declared): Likewise.
9683         (current_function_name_declared): Likewise.
9684         (begin_compound_stmt): Use function_name_declared_p.
9685         (add_decl_stmt): Remove.
9686         (setup_vtbl_ptr): Use function_name_declared_p.
9687         (add_scope_stmt): Remove.
9688         (current_scope_stmt_stack): New function.
9689         (cp_expand_stmt): Don't handle SCOPE_STMTs.
9690         (expand_body): Use function_name_declared_p.
9691         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
9692         * typeck.c: Change order of includes.
9693         (convert_sequence): Remove.
9694
9695 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
9696
9697         * lex.c (reswords): Add _Complex.
9698
9699 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9700
9701         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
9702
9703 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
9704
9705         * init.c (begin_init_stmts): Don't use // comments.
9706
9707 2000-09-12  Jason Merrill  <jason@redhat.com>
9708
9709         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
9710         all non-extern arrays.
9711
9712         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
9713         typenames, too.  Downgrade complaint to pedwarn.
9714         (xref_tag): Warn about surprising behavior of 'friend struct T'.
9715         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
9716         'class This::Inherited'.
9717
9718 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
9719
9720         * decl.c (finish_case_label): Given the LABEL_DECL a
9721         DECL_CONTEXT.
9722
9723 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
9724
9725         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
9726         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
9727         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
9728         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
9729         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
9730         New macros.
9731         (sorry_for_unsupported_tree, print_scope_operator,
9732         print_left_paren, print_right_paren, print_left_bracket,
9733         print_right_bracket, print_whitespace): Likewise.
9734         (aggr_variety): Rename to class_key_or_enum.
9735         (print_type): Rename to print_type_id.
9736         (print_type_specifier_seq, print_simple_type_specifier,
9737         print_elaborated_type_specifier,
9738         print_rest_of_abstract_declarator,
9739         print_parameter_declaration_clause, print_exception_specification,
9740         print_nested_name_specifier, print_template_id,
9741         typedef_original_name,  print_template_argument_list_start,
9742         print_template_argument_list_end): New functions.
9743
9744 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
9745
9746         * ir.texi: Add more documentation.
9747
9748 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
9749
9750         * cp-tree.h (struct saved_scope): Remove x_function_parms.
9751         (current_function_parms): Don't define.
9752         (struct cp_language_function): Remove parms_stored.
9753         (current_function_just_assigned_this): Don't define.
9754         (current_function_parms_stored): Likewise.
9755         (static_ctors): Declare.
9756         (static_dtors): Likewise.
9757         (SF_EXPAND): Don't define.
9758         (expand_start_early_try_stmts): Remove declaration.
9759         (store_parm_decls): Likewise.
9760         * decl.c (static_ctors): Don't declare.
9761         (static_dtors): Likewise.
9762         (struct binding_level): Remove this_block.
9763         (poplevel): Remove dead code.
9764         (set_block): Likewise.
9765         (mark_binding_level): Don't mark this_block.
9766         (mark_saved_scope): Don't mark x_function_parms.
9767         (init_decl_processing): Don't add current_function_parms as a GC
9768         root.
9769         (check_function_type): Change prototype.
9770         (start_function): Remove RTL-generation code.
9771         (expand_start_early_try_stmts): Remove.
9772         (store_parm_decls): Give it internal linkage.  Remove
9773         RTL-generation code.
9774         (finish_function): Remove RTL-generation code.
9775         * decl2.c (static_ctors): Fix formatting.
9776         (static_dtors): Likewise.
9777         * method.c (use_thunk): Don't call store_parm_decls.
9778         (synthesize_method): Likewise.
9779         * optimize.c (maybe_clone_body): Likewise.
9780         * parse.y (fn.def2): Likewise.
9781         (.set_base_init): Likewise.
9782         (nodecls): Likewise.
9783         * pt.c (instantiate_decl): Likewise.
9784         * rtti.c (synthesize_tinfo_fn): Likewise.
9785         * semantics.c (genrtl_try_block): Simplify.
9786         (expand_body): Use genrtl_start_function and
9787         genrtl_finish_function.
9788         (genrtl_start_function): New function.
9789         (genrtl_finish_function): Likewise.
9790
9791 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
9792
9793         * error.c (cp_tree_printer, case 'P'): Append break.
9794
9795 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
9796
9797         * cp-tree.h (frob_opname): Declare.
9798         * parse.y (saved_scopes): New static variable.
9799         (cp_parse_init): Adjust.
9800         (do_id): If lastiddecl is NULL, do do_identifier.
9801         (operator): Save scope information.
9802         (unoperator): New reduction. Restore scope information.
9803         (operator_name): Append unoperator. Call frob_opname.
9804         * spew.c (frob_opname): Define.
9805
9806 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
9807
9808         * decl.c, rtti.c: Include defaults.h if not already included.
9809         Don't define the *_TYPE_SIZE macros.
9810
9811 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
9812
9813         * cp-tree.h (push_switch): Change prototype.
9814         (check_cp_case_value): Remove declaration.
9815         (decl_constant_value): Likewise.
9816         * decl.c (struct cp_switch): Add switch_stmt and cases.
9817         (case_compare): New function.
9818         (push_switch): Set switch_stmt.  Initialize cases.
9819         (pop_switch): Clean up cases.
9820         (define_case_label): Rename to ...
9821         (finish_case_label): ... this.  Do semantic analysis for case
9822         labels here.
9823         (start_function): Correct comment.
9824         * decl2.c (check_cp_case_value): Remove.
9825         * expr.c (do_case): Remove.
9826         * pt.c (tsubst_expr): Adjust call to finish_case_label.
9827         * semantics.c (genrtl_do_poplevel): Remove declaration.
9828         (RECHAIN_STMTS): Remove.
9829         (finish_break_stmt): Use build_break_stmt.
9830         (finish_continue_stmt): Use build_continue_stmt.
9831         (finish_switch_cond): Adjust condition here, rater than in
9832         c_expand_start_case.
9833         (finish_case_label): Remove.
9834         * typeck.c (c_expand_return): Remove.
9835         (c_expand_start_case): Likewise.
9836
9837 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
9838
9839         * ir.texi: Document type nodes.
9840
9841 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
9842
9843         * cp-tree.h (init_cp_semantics): Declare.
9844         (genrtl_try_block): Don't declare.
9845         (genrtl_handler): Likewise.
9846         (genrtl_catch_block): Likewise.
9847         (genrtl_ctor_stmt): Likewise.
9848         (genrtl_subobject): Likewise.
9849         (genrtl_do_poplevel): Likewise.
9850         (genrtl_named_return_value): Likewise.
9851         * lex.c (init_parse): Call init_cp_semantics.
9852         * semantics.c (genrtl_try_block): Give it internal linkage.
9853         (genrtl_handler): Likewise.
9854         (genrtl_catch_block): Likewise.
9855         (genrtl_ctor_stmt): Likewise.
9856         (genrtl_subobject): Likewise.
9857         (genrtl_do_poplevel): Likewise.
9858         (genrtl_named_return_value): Likewise.
9859         (lang_expand_stmt): Rename to ...
9860         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
9861         (init_cp_semantics): Define.
9862
9863         * decl.c (initialize_local_var): Remove RTL-generating code.
9864         * semantics.c (genrtl_try_block): Fix formatting.
9865
9866         Move statement-tree facilities from C++ to C front-end.
9867         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
9868         (void_zero_node): Remove.
9869         (stmt_tree): Likewise.
9870         (scope_chain): Adjust.
9871         (language_function): Rename to cp_language_function.
9872         (cp_function_chain): Adjust.
9873         (current_stmt_tree): Remove.
9874         (last_tree): Likewise.
9875         (last_expr_type): Likewise.
9876         (struct lang_decl): Adjust.
9877         (STMT_IS_FULL_EXPR_P): Remove.
9878         (add_tree): Remove.
9879         (begin_stmt_tree): Likewise.
9880         (finish_stmt_tree): Likewise.
9881         (walk_tree_fn): Likewise.
9882         (walk_stmt_tree): Likewise.
9883         * class.c (finish_struct): Replace use of add_tree with add_stmt.
9884         * decl.c (mark_stmt_tree): Adjust type.
9885         (init_decl_processing): Don't build void_zero_node.
9886         (initialize_local_var): Adjust usage of current_stmt_tree.
9887         (finish_enum): Use add_stmt, not add_tree.
9888         (save_function_data): Adjust use of language_function.
9889         (finish_constructor_body): Use add_stmt, not add_tree.
9890         (finish_destructor_body): Likewise.
9891         (push_cp_function_context): Adjust use of language_function.
9892         (pop_cp_function_context): Likewise.
9893         (mark_lang_function): Likewise.
9894         (mark_cp_function_context): Likewise.
9895         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
9896         (build_vec_init): Likewise.
9897         * semantics.c (SET_LAST_STMT): Remove.
9898         (RECHAIN_STMTS): Don't use it.
9899         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
9900         (current_stmt_tree): Define.
9901         (add_tree): Remove.
9902         (finish_goto_stmt): Use add_stmt, not add_tree.
9903         (finish_expr_stmt): Likewise.
9904         (begin_if_stmt): Likewise.
9905         (finish_then_clause): Likewise.
9906         (begin_while_stmt): Likewise.
9907         (begin_do_stmt): Likewise.
9908         (finish_return_stmt): Likewise.
9909         (begin_for_stmt): Likewise.
9910         (finish_break_stmt): Likewise.
9911         (finish_continue_stmt): Likewise.
9912         (begin_switch_stmt): Likewise.
9913         (finish_case_label): Likewise.
9914         (begin_try_block): Likewise.
9915         (begin_function_try_block): Likewise.
9916         (begin_handler): Likewise.
9917         (begin_catch_block): Likewise.
9918         (begin_compound_stmt): Likewise.
9919         (begin_asm_stmt): Likewise.
9920         (finish_asm_stmt): Likewise.
9921         (finish_label_stmt): Likewise.
9922         (add_decl_stmt): Likewise.
9923         (finish_subobject): Likewise.
9924         (finish_decl_cleanup): Likewise.
9925         (finish_named_return_value): Likewise.
9926         (setup_vtbl_ptr): Likewise.
9927         (add_scope_stmt): Likewise.
9928         (finish_stmt_expr): Likewise.
9929         (prune_unused_decls): Remove.
9930         (begin_stmt_tree): Likewise.
9931         (finish_stmt_tree): Likewise.
9932         (prep_stmt): Adjust use of current_stmt_tree.
9933         (lang_expand_stmt): Likewise.
9934         * tree.c (statement_code_p): Remove.
9935         (cp_statement_code_p): New function.
9936         (walk_stmt_tree): Remove.
9937         (init_tree): Set lang_statement_code_p.
9938
9939 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
9940
9941         Integrated preprocessor.
9942
9943         * Make-lang.in, Makefile.in: Remove all references to input.c,
9944         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
9945         * gxx.gperf, hash.h, input.c: Delete.
9946         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
9947         initialized properly.
9948
9949         * class.c (fixup_pending_inline): Take a tree, not a
9950         struct pending_inline *.  All callers changed.
9951         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
9952         RID_PROTECTED entries in ridpointers[] array here.
9953         * decl.c (duplicate_decls): Do not refer to struct
9954         pending_inline.
9955         (record_builtin_type, init_decl_processing): Use RID_MAX not
9956         CP_RID_MAX.
9957         (grokdeclarator): Use C_IS_RESERVED_WORD.
9958         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
9959         cpplib.
9960         (grok_x_components): Do not inspect pending_inlines chain.
9961
9962         * cp-tree.h (struct lang_identifier): Add rid_code entry.
9963         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
9964         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
9965         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
9966         TIME_IDENTIFIER_FILEINFO): Kill.
9967         Update prototypes.
9968         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
9969         single 32-bit word.
9970         * parse.y: Call do_pending_inlines unconditionally.
9971         reinit_parse_for_method is now snarf_method.  fn.defpen is no
9972         longer necessary.  Remove unnecessary <itype> annotation on
9973         SCOPE.  Do not refer to end_of_file or struct pending_inline.
9974         * semantics.c (begin_inline_definitions): Call
9975         do_pending_inlines unconditionally.
9976
9977         * lex.c: Remove all code now shared with C front end.
9978         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
9979         into the get_identifier table.  Rewrite pragma handling to
9980         work with the registry.  Move code to save tokens for later
9981         processing to spew.c.
9982
9983         * spew.c: Rewrite everything in terms of token streams instead
9984         of text.  Move routines here from lex.c / input.c as
9985         appropriate.  GC-mark trees hanging off the pending inlines
9986         chain.
9987
9988 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
9989
9990         * NEWS: Mention that the named return value extension has been
9991         deprecated.
9992         * cp-tree.h (original_result_rtx): Define.
9993         (TREE_REFERENCE_EXPR): Remove.
9994         (DECL_VPARENT): Likewise.
9995         (pushdecl_nonclass_level): Likewise.
9996         (store_return_init): Likewise.
9997         (reinit_lang_specific): Likewise.
9998         (genrtl_named_return_value): Change prototype.
9999         * decl.c (original_result_rtx): Remove.
10000         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
10001         Do not generate RTL for local variables here.
10002         (store_return_init): Remove.
10003         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
10004         store_return_init.
10005         (finish_named_return_value): Adjust accordingly.  Warn that this
10006         extension is deprecated.
10007         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
10008
10009 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10010
10011         * pt.c (type_unification_real): Replace switch with if.
10012         (unify): Tsubst non-type parms before comparing.
10013
10014 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10015
10016         * error.c (dump_typename): New function, broken out of ...
10017         (dump_type): ... here. Use it.
10018         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
10019
10020 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10021
10022         * init.c (build_offset_ref): Deal with namespace scoped
10023         TEMPLATE_ID_EXPRs.
10024
10025 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10026
10027         * class.c (resolve_address_of_overloaded_function): Add
10028         explanation message.
10029         * decl.c (define_case_label): Reformat explanation.
10030         * decl2.c (finish_static_data_member_decl): Likewise.
10031         (grokfield): Likewise.
10032         * friend.c (do_friend): Likewise.
10033
10034 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
10035
10036         * tree.c (walk_tree): Expose tail recursion.
10037         (walk_stmt_tree): New function.
10038         * cp-tree.h: Prototype walk_stmt_tree.
10039         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
10040         the BLOCKs directly.  If a BLOCK has no variables after
10041         pruning, discard it.
10042         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
10043         restore the line number.
10044
10045 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
10046
10047         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
10048         (pt.o): Remove dependency on HTAB_H.
10049         * cp-tree.h: Include hashtab.h.
10050         (walk_tree): Change prototype.
10051         (walk_tree_without_duplicates): New function.
10052         * decl.c (check_default_argument): Use it.
10053         * optimize.c (remap_decl): Adjust calls to walk_tree.
10054         (copy_body): Likewise.
10055         (expand_calls_inline): Likewise.
10056         (calls_setjmp_p): Use walk_tree_without_duplicates.
10057         * pt.c: Don't include hashtab.h.
10058         (for_each_template_parm): Use walk_tree_without_duplicates.
10059         * semantics.c (finish-stmt_tree): Likewise.
10060         (expand_body): Likewise.
10061         * tree.c (walk_tree): Add additional parameter.
10062         (walk_tree_without_duplicates): New function.
10063         (count_trees): Use it.
10064         (verify_stmt_tree): Adjust call to walk_tree.
10065         (find_tree): Use walk_tree_without_duplicates.
10066         (no_linkage_check): Likewise.
10067         (break_out_target_exprs): Adjust call to walk_tree.
10068         (cp_unsave): Likewise.
10069
10070 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10071
10072         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
10073         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
10074         * cp-tree.h (TYPE_BINFO): Adjust comment.
10075         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
10076         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
10077         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
10078         (TYPE_TEMPLATE_INFO): Likewise.
10079         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
10080         * class.c (push_nested_class): Likewise.
10081         * decl.c (lookup_name_real): Likewise.
10082         (grokdeclarator): Likewise.
10083         (grok_op_properties): Likewise.
10084         (xref_tag): Likewise.
10085         (xref_basetypes): Likewise.
10086         * decl2.c (constructor_name_full): Likewise.
10087         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
10088         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
10089         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
10090         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10091         (dump_type_suffix): Likewise.
10092         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
10093         instead.
10094         (get_aggr_from_typedef): Likewise.
10095         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
10096         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10097         (write_template_parm): Likewise.
10098         (write_template_template_parm): Check tree code instead of
10099         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10100         * method.c (build_overload_nested_name): Add
10101         BOUND_TEMPLATE_TEMPLATE_PARM.
10102         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
10103         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10104         * pt.c (convert_template_argument): Check tree code instead of
10105         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10106         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
10107         (for_each_template_parm): Adjust comment.
10108         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
10109         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10110         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
10111         template_args_equal to compare template template parameter cases.
10112         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10113         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
10114         instead.
10115         * tree.c (copy_template_template_parm): Decide whether to create
10116         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
10117         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10118         (copy_tree_r): Likewise.
10119         * typeck.c (comptypes): Likewise.  Check tree code instead of
10120         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10121
10122 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
10123
10124         * decl.c (finish_function): Move the code for handling functions
10125         marked with the constructor and destructor attributes inside the
10126         expand_p block.
10127
10128 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10129
10130         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
10131
10132 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10133
10134         * pt.c (lookup_template_class): Remove abort.
10135         * tree.c (get_type_decl): Allow error_mark_node.
10136
10137 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10138
10139         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
10140         TEMPLATE_ID_EXPRs.
10141
10142 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
10143
10144         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
10145         new ABI mangling.
10146
10147 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
10148
10149         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
10150         union tag mismatch error reporting.
10151
10152 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
10153
10154         * call.c (build_scoped_method_call): Check it is not a namespace.
10155
10156 2000-08-30  Jason Merrill  <jason@redhat.com>
10157
10158         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
10159
10160         * tree.c (bot_manip): Check TREE_CONSTANT rather than
10161         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
10162         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
10163
10164         * decl.c (start_function): Always call make_function_rtl.
10165
10166 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
10167
10168         * semantics.c (prune_unused_decls): New function.
10169         (finish_stmt_tree): Call it via walk_tree.
10170
10171 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
10172
10173         * class.c (build_secondary_vtable): Constify a char *.
10174         * decl.c (init_decl_processing): Initialize function_id_node,
10175         pretty_function_id_node, and func_id_node.
10176         * input.c (struct input_source): Constify 'str'.
10177         (feed_input): Constify first argument.
10178         * mangle.c (write_identifier): Constify argument.
10179         * pt.c (mangle_class_name_for_template): Constify argument.
10180
10181 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
10182
10183         * typeck.c (mark_addressable): Remove code that pokes around in
10184         RTL.
10185
10186 2000-08-28  Jason Merrill  <jason@redhat.com>
10187
10188         * lex.c (file_name_nondirectory): Move to toplev.c.
10189
10190         * cp-tree.h (LOCAL_CLASS_P): New macro.
10191         * class.c (finish_struct_1): Use it.
10192
10193 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
10194
10195         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
10196         (write_encoding): Pass another argument to write_name.
10197         (write_name): Add ignore_local_scope parameter.  Fix handling of
10198         local names.
10199         (write_nested_name): Use write_unqualified_name.
10200         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
10201         (write_template_prefix): Use write_unqualified_name.
10202         (write_component): Remove.
10203         (write_local_name): Add parameter.  Use direct local entity to
10204         discriminator calculation.
10205         (write_class_enum_type): Pass another argument to write_name.
10206         (write_template_template_arg): Likewise.
10207         (make_guard_variable): Likewise.
10208
10209 2000-08-27  Jason Merrill  <jason@redhat.com>
10210
10211         * decl.c (pushdecl): Matching decls for local externs are found in
10212         the current level.  Propagate linkage information from previous
10213         declarations.
10214
10215 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10216
10217         * ir.texi (Expressions): Fix typo.
10218
10219 2000-08-25  Greg McGary  <greg@mcgary.org>
10220
10221         * tree.c (init_tree): Use ARRAY_SIZE.
10222
10223 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
10224
10225         * error.c (cp_tree_printer): Rework.
10226
10227 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
10228
10229         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
10230         dyn-string.o.
10231         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
10232         (cp-demangle.o): Remove target.
10233         (dyn-string.o): Likewise.
10234
10235         * decl.c (grokfndecl): Require that `main' return an `int'.
10236         * mangle.c (write_encoding): Don't mangle return types for
10237         conversion functions.
10238
10239 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
10240
10241         * error.c (tree_formatting_info): New data type.
10242         (tree_being_formatted): New macro.
10243         (tree_formatting_flags): Likewise.
10244         (put_whitespace): Likewise.
10245         (print_tree_identifier): Likewise.
10246         (print_identifier): Likewise.
10247         (cp_tree_printer, print_function_argument_list, print_declaration,
10248         print_expression, print_function_declaration,
10249         print_function_parameter, print_type, print_cv_qualifier): New
10250         functions.
10251         (init_error): Initialize lang_printer.
10252
10253 2000-08-24  Jason Merrill  <jason@redhat.com>
10254
10255         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
10256         adjustment necessary.
10257
10258 2000-08-24  Greg McGary  <greg@mcgary.org>
10259
10260         * cp-tree.h (MAIN_NAME_P): Remove macro.
10261
10262 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
10263
10264         * error.c (print_instantiation_context): Don't forget to flush the
10265         buffer.
10266
10267 2000-08-23  Jason Merrill  <jason@redhat.com>
10268
10269         * typeck.c (build_ptrmemfunc): Save the input pmf.
10270
10271         * method.c (process_modifiers): Use same_type_p.
10272
10273 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
10274
10275         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
10276         * mangle.c (write_function_type): Change prototype.
10277         (write_encoding): Don't mangle return types for
10278         constructors or destructors.
10279         (write_type): Adjust call to write_function_type.
10280         * pt.c (instantiate_template): Instantiate alternate entry points
10281         when instantiating the main function.
10282
10283 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
10284
10285         * error.c (cp_print_error_function): Don't use embedded '\n' in
10286         output_printf.
10287
10288 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
10289
10290         * decl.c (init_decl_processing): Remove bogus initialization.
10291         * error.c (lang_print_error_function): Restore here.
10292         (init_error): Initialize print_error_function.
10293
10294 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10295
10296         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
10297
10298 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
10299
10300         * Makefile.in (error.o): Depends on diagnostic.h
10301
10302         * cp-tree.h (problematic_instantiation_changed,
10303         record_last_problematic_instantiation, current_instantiation,
10304         print_instantiation_context): Declare.
10305         (maybe_print_template_context): Remove.
10306
10307         * decl.c (init_decl_processing): Set print_error_function to NULL.
10308         (lang_print_error_function): Remove, since we're using a new
10309         machinery.
10310
10311         * error.c: #include diagnostic.h
10312         (function_category): New function.
10313         (cp_diagnostic_starter): Likewise.
10314         (cp_diagnostic_finalizer): Likewise.
10315         (cp_print_error_function): Likewise.
10316         (maybe_print_instantiation_context): Likewise.
10317         (print_instantiation_full_context): Likewise.
10318         (print_instantiation_partial_context): Likewise.
10319         (print_instantiation_context): Define.
10320         (init_error): Initialize diagnostic pager and finalizer.
10321
10322         * pt.c (problematic_instantiation_changed): Define.
10323         (record_last_problematic_instantiation): Likewise.
10324         (current_instantiation): Likewise.
10325         (maybe_print_template_context): Remove.
10326         (print_template_context): Likewise.
10327         (current_tinst_level): Make static to reflect Brendan Kehoe's
10328         change of 1995-04-13.
10329         (push_tinst_level): Call print_instantiation_context.
10330
10331 2000-08-21  Nix  <nix@esperi.demon.co.uk>
10332
10333         * lang-specs.h: Do not process -o or run the assembler if
10334         -fsyntax-only.
10335
10336 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
10337
10338         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
10339         variables.
10340         * decl2.c (lang_decode_option): Disable gettext attributes for
10341         -ansi.
10342
10343 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
10344
10345         * lex.c (lang_init_options): Default diagnostic message maximum
10346         length to 80, when line-wrapping.
10347
10348 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
10349
10350         * class.c (build_vtbl_initializer): Clear the entire
10351         vtbl_init_data.  Start keeping track of the functions for which we
10352         have created vcall offsets here.
10353         (dfs_build_vcall_offset_vtbl_entries): Remove.
10354         (build_vcall_offset_vtbl_entries): Reimplement.
10355         (add_vcall_offset_vtbl_entries_r): New function.
10356         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
10357         computing when vcall offsets are necessary.
10358
10359 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10360
10361         * decl.c (member_function_or_else): Use cp_error ... %T.
10362         (grokdeclarator): Likewise.
10363         (start_method): Likewise.
10364         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
10365
10366 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10367
10368         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
10369         TYPE_DECLs.
10370
10371 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10372
10373         * cp-tree.h (PTRMEM_OK_P): New macro.
10374         (itf_ptrmem_ok): New enumeration value.
10375         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
10376         argument. Diagnose implicit pointer to member.
10377         (instantiate_type): Don't diagnose implicit pointer to member
10378         here. Pass itf_ptrmem_ok if ok. Adjust calls to
10379         resolve_address_of_overloaded_function.
10380         * init.c (build_offset_ref): Set PTRMEM_OK_P.
10381         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
10382         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
10383         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
10384         (build_unary_op): Deal with single non-static member in
10385         microsoft-land.
10386
10387 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10388
10389         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
10390
10391 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
10392
10393         * cp-tree.h (enum_name_string): Remove prototype.
10394         (report_case_error): Remove prototype.
10395         * cp/typeck2.c (enum_name_string): Remove.
10396         (report_case_error): Remove.
10397         * error.c (dump_expr): Deal with enum values directly.
10398         Correctly negate integer constant.
10399
10400 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10401
10402         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
10403         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
10404         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
10405         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
10406         (__cxa_vec_new): Use __cxa_vec_new2.
10407         (__cxa_vec_delete): Use __cxa_vec_delete2.
10408
10409 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10410
10411         * vec.cc (__cxa_vec_new): Set "C" linkage.
10412         (__cxa_vec_ctor): Likewise.
10413         (__cxa_vec_cctor): Likewise.
10414         (__cxa_vec_dtor): Likewise.
10415         (__cxa_vec_delete): Likewise.
10416         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
10417         (__cxa_vec_ctor): Likewise.
10418         (__cxa_vec_cctor): Likewise.
10419         (__cxa_vec_dtor): Likewise.
10420         (__cxa_vec_delete): Likewise.
10421
10422 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10423
10424         * class.c (instantiate_type): Reinstate local variable
10425         deleted in previous change.
10426
10427         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
10428         itf_no_attributes.
10429
10430 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10431
10432         * cp-tree.h (instantiate_type_flags): New enumeration.
10433         (instantiate_type): Change parameter.
10434         * class.c (instantiate_type): Adjust prototype. Adjust.
10435         * call.c (standard_conversion): Adjust instantiate_type call.
10436         (reference_binding): Likewise.
10437         (build_op_delete_call): Likewise.
10438         (convert_like_real): Likewise.
10439         * cvt.c (cp_convert_to_pointer): Likewise.
10440         (convert_to_reference): Likewise.
10441         * pt.c (convert_nontype_argument): Likewise.
10442         * typeck.c (build_binary_op): Likewise.
10443         (build_ptrmemfunc): Likewise.
10444         (convert_for_assignment): Likewise.
10445
10446 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
10447
10448         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
10449         (current_aggr): Define.
10450         * decl.c (grokdeclarator): Make sure a friend class is an
10451         elaborated type specifier.
10452         * parse.y (current_aggr): Remove static definition.
10453         (cp_parse_init): Adjust.
10454         (structsp): Clear and restore current_aggr.
10455         (component_decl_list): Clear current_aggr.
10456
10457         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
10458         aggregate tag on the typename's context.
10459
10460         * pt.c (tsubst_friend_class): Return error_mark_node, if
10461         parms becomes NULL.
10462         (instantiate_class_template): Ignore error_mark_node friend types.
10463
10464 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
10465
10466         * cvt.c (warn_ref_binding): New static function, broken out of ...
10467         (convert_to_reference): ... here. Use it.
10468
10469 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10470
10471         * parse.y (template_arg): Add rule for template qualified with
10472         global scope.
10473
10474 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10475
10476         * decl2.c (add_function): Reorganize.
10477         (arg_assoc): Do not consider function template decls.
10478
10479 2000-08-11  Jason Merrill  <jason@redhat.com>
10480
10481         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
10482         looking inside.
10483
10484 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10485
10486         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
10487         (lookup_nested_tag): Likewise.
10488
10489         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
10490         can be produced.
10491
10492 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10493
10494         * parse.y (named_complex_class_head_sans_basetype): Remove
10495         always true if.
10496
10497 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10498
10499         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
10500         explicit TEMPLATE_ID_EXPR args.
10501         (build_expr_from_tree, case CALL_EXPR): Likewise.
10502
10503 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
10504
10505         * decl.c (check_tag_decl): Diagnose typename's which don't
10506         declare anything.
10507
10508 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
10509
10510         * init.c (build_aggr_init): Reject bogus array initializers
10511         early.
10512
10513 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
10514
10515         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
10516         runtime.
10517         * cp/tinfo.cc (__dynamic_cast): Likewise.
10518         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
10519
10520 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
10521
10522         * cvt.c (convert_to_pointer_force): Fix error message when
10523         attempting to cast from ambiguous base.
10524
10525 2000-08-08  Jason Merrill  <jason@redhat.com>
10526
10527         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
10528         (tsubst_template_arg_vector): Likewise.
10529
10530         * decl2.c (build_anon_union_vars): Choose the largest field; don't
10531         assume that one will be as large as the union.
10532
10533 2000-08-07  Kazu Hirata  <kazu@hxi.com>
10534
10535         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
10536         * decl.c (pop_labels): Likewise.
10537
10538 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
10539
10540         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
10541         specifications.
10542         (__pointer_to_member_type_info): Likewise.
10543         (__base_class_info): Likewise.
10544         (__class_type_info): Likewise.
10545         (__si_class_type_info): Likewise.
10546         (__vmi_class_type_info): Likewise.
10547         * tinfo.cc (__si_class_type_info::__do_find_public_src):
10548         Changed member names to match specifications.
10549         (__vmi_class_type_info::__do_find_public_src): Likewise.
10550         (__si_class_type_info::__do_dyncast): Likewise.
10551         (__vmi_class_type_info::__do_dyncast): Likewise.
10552         (__si_class_type_info::__do_upcast): Likewise.
10553         (__vmi_class_type_info::__do_upcast): Likewise.
10554         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
10555         (__pbase_type_info::__pointer_catch): Likewise.
10556         (__pointer_type_info::__pointer_catch): Likewise.
10557         (__pointer_to_member_type_info::__pointer_catch): Likewise.
10558
10559 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
10560
10561         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
10562         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
10563         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
10564
10565 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
10566
10567         * cp-tree.h (add_method): Change prototype.
10568         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
10569         Don't double the size of the method vector in the error case.
10570         (handle_using_decl): Adjust call to add_method.
10571         (add_implicitly_declared_members): Likewise.
10572         (clone_function_decl): Likewise.
10573         * decl2.c (check_classfn): Likewise.
10574         * semantics.c (finish_member_declaration): Likewise.
10575
10576 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10577
10578         * decl.c (flag_isoc94): New variable.
10579
10580 2000-08-02  Jason Merrill  <jason@redhat.com>
10581
10582         * pt.c (do_type_instantiation): Add complain parm; don't complain
10583         if called recursively.
10584         * cp-tree.h, parse.y: Adjust.
10585
10586 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
10587
10588         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
10589         -Wno-strict-prototypes.
10590
10591         * g++spec.c: Adjust type of second argument to
10592         lang_specific_driver, and update code as necessary.
10593
10594         * cp-tree.h: Don't prototype min_precision here.
10595         (my_friendly_assert): Cast expression to void.
10596         * semantics.c (do_poplevel): Initialize scope_stmts.
10597
10598 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
10599
10600         * cp-tree.h (DECL_NEEDED_P): Tweak.
10601
10602 2000-07-28  Jason Merrill  <jason@redhat.com>
10603
10604         * lang-specs.h: Use %i in rule for .ii files.
10605
10606 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
10607
10608         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
10609
10610 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
10611
10612         Allow indirect primary bases.
10613         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
10614         primary_base.
10615         (CLASSTYPE_VFIELD_PARENT): Remove.
10616         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
10617         (BINFO_PRIMARY_BINFO): Remove.
10618         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
10619         (BINFO_VBASE_PRIMARY_P): Likewise.
10620         (BINFO_PRIMARY_BASE_OF): New macro.
10621         (BINFO_INDIRECT_PRIMARY_P): Likewise.
10622         (get_primary_binfo): New function.
10623         * decl.c (lang_mark_tree): Make lang_type::primary_base.
10624         * class.c (vcall_offset_data_s): Rename to ...
10625         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
10626         and add ctor_vtbl_p.
10627         (get_derived_offset): Use get_primary_binfo.
10628         (dfs_mark_primary_bases): Adjust handling of virtual primary
10629         bases.
10630         (mark_primary_bases): Likewise.
10631         (set_primary_base): Take a binfo, not an integer, as a
10632         representation of the primary base.
10633         (indirect_primary_base_p): Remove.
10634         (determine_primary_base): Adjust for indirect primary bases.
10635         (dfs_find_final_overrider): Fix typo in coment.
10636         (update_vtable_entry_for_fn): Use get_primary_binfo.
10637         (layout_nonempty_base_or_field): Tweak.
10638         (build_base_fields): Adjust for new primary base semantics.
10639         (dfs_propagate_binfo_offsets): Remove.
10640         (propagate_binfo_offsets): Rewrite.
10641         (dfs_set_offset_for_shared_vbases): Remove.
10642         (layout_virtual_bases): Don't use it.
10643         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
10644         ABI.
10645         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
10646         CLASSTYPE_VFIELD_PARENT.
10647         (dfs_get_primary_binfo): New function.
10648         (get_primary_binfo): Likewise.
10649         (dump_class_hierarchy_r): Tweak printing of primary bases.
10650         (build_vtbl_initializer): Fix typo in comments.  Use
10651         vtbl_init_data.
10652         (build_vcall_and_vbase_vtbl_entries): Likewise.
10653         (build_vbaes_offset_vtbl_entries): Likewise.
10654         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
10655         BV_VCALL_INDEX to handle indirect primary bases.
10656         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
10657         (build_rtti_vtbl_entries): Likewise.
10658         * search.c (get_shared_vbase_if_not_primary): Tweak.
10659         (find_vbase_instance): Likewise.
10660         (binfo_for_vtable): Simplify.
10661         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
10662         (make_binfo): Make it have 11 entries.
10663
10664 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
10665
10666         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
10667         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
10668         ascertaining primaryness.
10669         (G): Remove template_args.
10670         (decl_is_template_id): New function.
10671         (write_encoding): Use decl_is_template_id.
10672         (write_name): Likewise.  Handle type_decls.  Get main variant of
10673         type decls.
10674         (write_nested_name): Likewise.
10675         (write_prefix): Likewise.
10676         (write_template_prefix): Likewise.
10677         (write_special_name_constructor): Remove defunct production from
10678         comment.
10679         (write_bare_function_type): Remove comment about absent parameter.
10680         (write_template_template_arg): Add missing grammar production to
10681         comment.
10682
10683 2000-07-27  Jason Merrill  <jason@redhat.com>
10684
10685         * decl.c (duplicate_decls): If common_type produces a non-typedef
10686         type for a typedef, just use the old type.
10687
10688 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
10689
10690         * cp-tree.h (function_depth): Declare.
10691         (verify_stmt_tree): Likewise.
10692         (find_tree): Likewise.
10693         * decl.c (function_depth): Give it external linkage.
10694         * optimize.c (optimize_function): Increment and decrement it.
10695         * tree.c (verify_stmt_tree_r): New function.
10696         (verify_stmt_tree): Likewise.
10697         (find_tree_r): Likewise.
10698         (find_tree): Likewise.
10699
10700 2000-07-27  Jason Merrill  <jason@redhat.com>
10701
10702         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
10703         TYPE_PTRMEMFUNC_P.
10704         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
10705
10706 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
10707
10708         * decl.c (start_cleanup_fn): Mark the function as `inline'.
10709         * decl2.c (get_guard): Call cp_finish_decl, not
10710         rest_of_decl_compilation, for local guards.
10711         * lex.c (do_identifier): Remove unused variable.
10712
10713 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
10714
10715         * parse.y:  Add missing ';'.
10716
10717 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
10718
10719         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
10720         of `extern "C++"'.
10721
10722 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10723
10724         Kill strict_prototype. Backwards compatibility only for
10725         non NO_IMPLICIT_EXTERN_C systems.
10726         * cp-tree.h (flag_strict_prototype): Remove.
10727         (strict_prototype): Remove.
10728         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
10729         * decl.c (maybe_push_to_top_level): Adjust.
10730         (pop_from_top_level): Adjust.
10731         (decls_match): Only allow sloppy parm matching for ancient
10732         system headers.
10733         (init_decl_processing): Adjust.
10734         (grokdeclarator): Adjust.
10735         * decl2.c (flag_strict_prototype): Remove.
10736         (strict_prototype): Remove.
10737         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
10738         (lang_f_options): Remove "strict-prototype".
10739         (unsupported-options): Add "strict-prototype".
10740         * lex.c (do_identifier): Adjust.
10741         (do_scoped_id): Adjust.
10742         * parse.y (empty_parms): Adjust.
10743         * class.c (push_lang_context): Adjust.
10744         (pop_lang_context): Adjust.
10745         * typeck.c (comp_target_parms): Adjust.
10746
10747 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10748
10749         * decl.c (poplevel): Deal with anonymous variables at for scope.
10750         (maybe_inject_for_scope_var): Likewise.
10751
10752 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
10753
10754         * decl.c: Remove all signal handling code, now done in toplev.c.
10755
10756 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
10757
10758         * decl.c (make_rtl_for_nonlocal_decl): Rework.
10759
10760         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
10761         correctly.
10762
10763 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
10764
10765         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
10766         Define my_friendly_assert and my_friendly_abort as macros
10767         which may call friendly_abort.  Prototype friendly abort, not
10768         my_friendly_abort or my_friendly_assert.
10769         * decl.c (signal_catch): Report the signal caught in the error
10770         message.  Call fatal directly.
10771         * typeck2.c (ack, my_friendly_assert): Delete.
10772         (my_friendly_abort): Rename to friendly_abort.  Expect file,
10773         line, and function parameters.  Report the abort code, then
10774         call fancy_abort.  Do not mask an abort if errors have
10775         already occurred.
10776
10777 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
10778
10779         * typeck.c (comp_target_parms): Remove obsolete parameter.
10780         (comp_target_types): Adjust.
10781
10782 2000-07-17  Jason Merrill  <jason@redhat.com>
10783
10784         * typeck.c (mark_addressable): Never set TREE_USED.
10785         * call.c (build_call): Don't abort on calls to library functions
10786         that have been declared normally.
10787
10788         * typeck.c (build_binary_op): Fix grammar in warning.
10789
10790         * exception.cc (__eh_free): Fix prototype.
10791
10792         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
10793
10794         * decl.c (pushdecl): Handle seeing an OVERLOAD in
10795         IDENTIFIER_NAMESPACE_VALUE.
10796
10797 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
10798
10799         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
10800         * method.c (use_thunk): Correct handling of vcall offsets.
10801
10802 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
10803
10804         * .cvsignore: parse.h and parse.c have no cp- prefix.
10805
10806 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
10807
10808         * .cvsignore: New file.
10809
10810 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
10811
10812         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
10813
10814 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
10815
10816         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
10817         * parse.c: Remove.
10818         * parse.h: Likewise.
10819
10820 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
10821
10822         * class.c (layout_class_type): Add pointers to virtual bases after
10823         base classes under the old ABI.
10824
10825 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
10826
10827         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
10828         (finish_continue_stmt): Likewise.
10829         (begin_for_stmt): Remove call to note_level_for_for.
10830         (finish_goto_stmt): Change call from build_min_nt
10831         to build_stmt.
10832         (finish_expr_stmt): Likewise.
10833         (begin_if_stmt): Likewise.
10834         (begin_while_stmt): Likewise.
10835         (finish_while_stmt): Likewise.
10836         (finish_return_stmt): Likewise.
10837         (begin_for_stmt): Likewise.
10838         (finish_for_stmt): Likewise.
10839         (finish_break_stmt): Likewise.
10840         (begin_switch_stmt): Likewise.
10841         (finish_case_label): Likewise.
10842         (genrtl_try_block): Likewise.
10843         (begin_try_block): Likewise.
10844         (begin_handler): Likewise.
10845         (begin_compound_stmt): Likewise.
10846         (finish_asm_stmt): Likewise.
10847         (finish_label_stmt): Likewise.
10848         (add_decl_stmt): Likewise.
10849         (finish_subobject): Likewise.
10850         (finish_decl_cleanup): Likewise.
10851         (finish_named_return_value): Likewise.
10852         (setup_vtbl_ptr): Likewise.
10853         (add_scope_stmt): Likewise.
10854         * decl.c (finish_constructor_body): Likewise.
10855         (finish_destructor_body): Likewise.
10856         * optimize.c (copy_body_r): Likewise.
10857         (initialize_inlined_parameters): Likewise.
10858         (declare_return_variable): Likewise.
10859         (expand_call_inline): Likewise.
10860
10861 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
10862
10863         * semantics.c (expand_body): Sync interface information
10864         at the end of function body expansion.
10865
10866 2000-07-09  Jason Merrill  <jason@redhat.com>
10867
10868         * init.c (build_new_1): Bail early if the call to new fails.
10869
10870         * decl.c (compute_array_index_type): Check specifically for
10871         an INTEGER_CST, not just TREE_CONSTANT.
10872
10873         * decl.c (duplicate_decls): Don't call duplicate_decls on
10874         the DECL_TEMPLATE_RESULT.
10875         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
10876         codes.
10877
10878         * error.c (dump_template_bindings): Don't crash if we had an
10879         invalid argument list.
10880
10881         * typeck.c (c_expand_start_case): Do narrowing here.
10882         * semantics.c (finish_switch_cond): Not here.
10883
10884 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
10885
10886         * parse.y (asm_clobbers): Do string concatenation.
10887
10888 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
10889
10890         * decl.c (pushtag): Don't put local classes in template functions
10891         on the local_classes list.
10892
10893 2000-07-04  Scott Snyder  <snyder@fnal.gov>
10894
10895         * decl2.c (get_guard): Add missing return for old ABI local
10896         variable case.
10897
10898 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
10899
10900         * cp-tree.h (char_type_p): New function.
10901         * decl.c (init_decl_processing): Don't initialize
10902         signed_wchar_type_node or unsigned_wchar_type_node.
10903         (complete_array_type): Handle brace-enclosed string-constants.
10904         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
10905         * tree.c (char_type_p): New function.
10906         * typeck2.c (digest_init): Use char_type_p.
10907
10908 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
10909
10910         * pt.c (tsubst): Don't layout type, if it's error_mark.
10911
10912 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
10913
10914         * pt.c (instantiate_pending_templates): Reset template level.
10915
10916 2000-07-05  Jason Merrill  <jason@redhat.com>
10917
10918         * call.c (joust): Don't complain about `operator char *()' beating
10919         `operator const char *() const'.
10920
10921 2000-07-04  scott snyder  <snyder@fnal.gov>
10922             Jason Merrill  <jason@redhat.com>
10923
10924         * repo.c (repo_get_id): Handle the case where a class with virtual
10925         bases has a null TYPE_BINFO_VTABLE.
10926
10927 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
10928             Jason Merrill  <jason@redhat.com>
10929
10930         * parse.y (member_init): Just pass in the type.
10931         * init.c (expand_member_init): Handle getting a type.
10932
10933 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10934             Jason Merrill  <jason@redhat.com>
10935
10936         * decl.c (finish_function): Warn if a function has no return
10937         statement.
10938         Suggested by Andrew Koenig.
10939         * typeck.c (check_return_expr): Do set current_function_returns_value
10940         if we got an error_mark_node.
10941
10942 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
10943
10944         * decl2.c (push_decl_namespace): Push the original namespace.
10945
10946 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
10947
10948         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
10949         * semantics.c (begin_class_definition): Clear it.
10950
10951 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
10952
10953         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
10954         (genrtl_expr_stmt): Likewise.
10955         (genrtl_decl_stmt): Likewise.
10956         (genrtl_if_stmt): Likewise.
10957         (genrtl_while_stmt): Likewise.
10958         (genrtl_do_stmt): Likewise.
10959         (genrtl_return_stmt): Likewise.
10960         (genrtl_for_stmt): Likewise.
10961         (genrtl_break_stmt): Likewise.
10962         (genrtl_continue_stmt): Likewise.
10963         (genrtl_scope_stmt): Likewise.
10964         (genrtl_switch_stmt): Likewise.
10965         (genrtl_case_label): Likewise.
10966         (genrtl_begin_compound_stmt): Likewise.
10967         (genrtl_finish_compound_stmt): Likewise.
10968         (genrtl_compound_stmt): Likewise.
10969         (genrtl_asm_stmt): Likewise.
10970
10971         * init.c (begin_init_stmts): Remove call to
10972         genrtl_begin_compound_stmt.
10973         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
10974
10975         * semantics.c (lang_expand_stmt): Changed call to
10976         genrtl_compound_stmt to ignore return value.
10977
10978 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
10979
10980         * mangle.c (canonicalize_for_substitution): Return the canonical
10981         variant of a type.
10982
10983         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
10984         TYPE_DECL.
10985         * typeck.c (commonparms): Remove obstack manipulations.
10986
10987 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
10988
10989         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
10990
10991         * Makefile.in (OBJS): Added ../c-semantics.o.
10992         (OBJDEPS): Likewise.
10993
10994         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
10995         ../c-common.h.
10996         (struct stmt_tree): Added comment.
10997         (current_function_name_declared): Removed.
10998         (stmts_are_full_exprs_p): Likewise.
10999         (genrtl_do_pushlevel): Likewise.
11000         (genrtl_clear_out_block): Likewise.
11001         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
11002         (DECL_ANON_UNION_ELEMS): Likewise.
11003         (emit_local_var): Likewise.
11004         (make_rtl_for_local_static): Likewise.
11005         (do_case): Likewise.
11006         (expand_stmt): Likewise.
11007         (genrtl_decl_cleanup): Likewise.
11008         (c_expand_asm_operands): Likewise.
11009         (c_expand_return): Likewise.
11010         (c_expand_start_case): Likewise.
11011
11012         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
11013         (emit_local_var): Likewise.
11014         (initialize_local_var): Change reference to
11015         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
11016         Change reference to stmts_are_full_exprs_p to
11017         current_stmt_tree->stmts_are_full_exprs_p.
11018         (push_cp_function_context): Likewise.
11019
11020         * expect.c (expand_throw): Change reference to
11021         stmts_are_full_exprs_p.
11022
11023         * init.c (build_aggr_init): Change reference to
11024         stmts_are_full_exprs_p.
11025         (build_vec_init): Likewise.
11026
11027         * optimize.c (maybe_clone_body): Change reference to
11028         current_function_name_declared to
11029         cp_function_chain->name_declared.
11030
11031         * pt.c (instantiate_decl): Change reference to
11032         current_function_name_declared to
11033         cp_function_chain->name_declared.
11034
11035         * semantics.c (expand_cond): Moved declaration to c-common.h.
11036         (genrtl_do_pushlevel): Moved to c-semantics.c.
11037         (genrtl_clear_out_block): Likewise.
11038         (genrtl_goto_stmt): Likewise.
11039         (genrtl_expr_stmt): Likewise.
11040         (genrtl_decl_stmt): Likewise.
11041         (gerntl_if_stmt): Likewise.
11042         (genrtl_while_stmt): Likewise.
11043         (genrtl_do_stmt): Likewise.
11044         (genrtl_return_stmt): Likewise.
11045         (genrtl_for_stmt): Likewise.
11046         (genrtl_break_stmt): Likewise.
11047         (genrtl_continue_stmt): Likewise.
11048         (genrtl_scope_stmt): Likewise.
11049         (genrtl_switch_stmt): Likewise.
11050         (genrtl_case_label): Likewise.
11051         (genrtl_begin_compound_stmt): Likewise.
11052         (genrtl_finish_compound_stmt): Likewise.
11053         (genrtl_compound_stmt): Likewise.
11054         (genrtl_asm_stmt): Likewise.
11055         (genrtl_decl_cleanup): Likewise.
11056         (expand_cond): Likewise.
11057         (expand_stmt): Renamed to ...
11058         (lang_expand_stmt): ... this.
11059         (lang_expand_expr_stmt): Initialize.
11060         (set_current_function_name_declared): Likewise.
11061         (stmts_are_full_exprs_p): Likewise.
11062         (current_function_name_declared): Likewise.
11063         (anon_aggr_type_p): Likewise.
11064         (do_poplevel): Change reference to
11065         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
11066         Change reference to stmts_are_full_exprs_p to
11067         current_stmt_tree->stmts_are_full_exprs_p.
11068         (add_tree): Likewise.
11069         (finish_expr_stmt): Likewise.
11070         (prep_stmt): Likewise.
11071         (lang_expand_stmt): Likewise.
11072         (begin_compound_stmt): Change reference to
11073         current_function_name_declared to
11074         cp_function_chain->name_declared and call to
11075         current_function_name_declared().
11076         (setup_vtbl_ptr): Likewise.
11077         (genrtl_do_poplevel): Removed.
11078
11079 2000-06-30  Jason Merrill  <jason@redhat.com>
11080
11081         * init.c (init_init_processing): Go back to aligning like
11082         double_type_node for old ABI.
11083         (get_cookie_size): Make cookie larger if we get a type that needs
11084         more alignment.
11085         (build_vec_delete): Call it.
11086
11087         * typeck.c (qualify_type_recursive): New fn.
11088         (composite_pointer_type): Use it.
11089         (build_binary_op): Use composite_pointer_type.
11090
11091 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
11092             Jason Merrill  <jason@redhat.com>
11093
11094         * typeck.c (check_return_expr): Don't complain about returning
11095         NULL from operator new if -fcheck-new.
11096         * cp-tree.h: Declare flag_check_new here.
11097         * init.c: Not here.
11098
11099 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
11100
11101         * mangle.c (find_substitution): Use same_type_p.
11102         (write_encoding): Don't check for substitutions.
11103
11104 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
11105
11106         * parse.y (expr_no_comma_rangle): New non-terminal.
11107         (template_parm): Use it for default parameter case.
11108         (template_arg): Use it.
11109         (expr_no_commas): Remove commented out undefined extensions.
11110         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
11111         * parse.h, parse.c: Rebuilt.
11112
11113 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
11114
11115         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
11116         (finish_asm_stmt): Do it here, instead.
11117
11118         * cp-tree.h (ridpointers): Don't declare.
11119         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
11120         (record_builtin_java_type): Likewise.
11121         (init_decl_processing): Likewise.
11122         * lex.c: Move inclusion of lex.h.
11123         (ridpointers): Don't define.
11124         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
11125         RID_MAX.
11126         * lex.h (enum rid): Rename to ...
11127         (enum cp_rid): ... this.
11128         (ridpointers): Don't declare.
11129         * parse.y: Move inclusion of lex.h.
11130         * parse.c: Regenerated.
11131         * spew.c: Move inclusion of lex.h.
11132
11133         * cp-tree.h (struct language_function): Remove temp_name_counter.
11134         (temp_name_counter): Remove.
11135         (get_temp_name): Change prototype.
11136         (get_guard): New function.
11137         (get_guard_cond): Likewise.
11138         (set_guard): Likewise.
11139         * cvt.c (build_up_reference): Adjust call to get_temp_name.
11140         * decl.c (expand_static_init): Use get_guard and friends to
11141         implement guard variables.
11142         * decl2.c (get_temp_name): Assume that the variables created are
11143         always static.
11144         (get_sentry): Rename to ...
11145         (get_guard): ... this.  Implement new ABI guard variables.
11146         (get_guard_bits): New function.
11147         (get_guard_cond): Likewise.
11148         (set_guard): Likewise.
11149         (start_static_initialization_or_destruction): Use them.
11150         (do_static_initialization): Replace sentry with guard throughout.
11151         (do_static_destruction): Likewise.
11152         * init.c (create_temporary_var): Add comment.
11153
11154 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
11155
11156         * mangle.c (find_substitution): Use same_type_p.
11157         (write_encoding): Don't check for substitutions.
11158
11159 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
11160
11161         * parse.y (expr_no_comma_rangle): New non-terminal.
11162         (template_parm): Use it for default parameter case.
11163         (template_arg): Use it.
11164         (expr_no_commas): Remove commented out undefined extensions.
11165         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
11166         * parse.h, parse.c: Rebuilt.
11167
11168 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
11169
11170         * cp-tree.h (flag_const_strings): Remove.
11171         (warn_parentheses): Likewise.
11172         (warn_format): Likewise.
11173         (common_type): Likewise.
11174         (default_conversion): Likewise.
11175         (build_binary_op): Likewise.
11176         (cp_build_binary_op): New macro.
11177         * call.c (build_new_op): Use cp_build_binary_op instead of
11178         build_binary_op.
11179         * class.c (build_vtable_entry_ref): Likewise.
11180         * decl.c (expand_static_init): Likewise.
11181         (compute_array_index_type): Likewise.
11182         (build_enumerator): Likewise.
11183         * decl2.c (delete_sanity): Likewise.
11184         (start_static_initialization_or_destruction): Likewise.
11185         * error.c (dump_type_suffix): Likewise.
11186         * init.c (resolve_offset_ref): Likewise.
11187         (build_new): Likewise.
11188         (build_new_1): Likewise.
11189         (build_vec_delete_1): Likewise.
11190         (build_vec_init): Likewise.
11191         (build_delete): Likewise.
11192         * rtti.c (synthesize_tinfo_fn): Likewise.
11193         (synthesize_tinfo_var): Likewise.
11194         * search.c (expand_upcast_fixups): Likewise.
11195         (fixup_all_virtual_upcast_offsets): Likewise.
11196         * typeck.c (build_array_ref): Likewise.
11197         (get_member_function_from_ptrfunc): Likewise.
11198         (build_binary_op): Add parameter.
11199         (pointer_int_sum): Use cp_build_binary_op.
11200         (pointer_diff): Likewise.
11201         (build_modify_expr): Likewise.
11202         (get_delta_difference): Likewise.
11203         (build_ptrmemfunc): Likewise.
11204
11205 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
11206
11207         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
11208         * decl.c (create_implicit_typedef): Adjust.
11209         * decl2.c (build_artificial_parm): Adjust.
11210         * method.c (implicitly_declare_fn): Adjust.
11211         * pt.c (push_inline_template_parms_recursive): Adjust.
11212         (process_template_parm): Adjust.
11213         (overloaded_template_name): Adjust.
11214         * semantics.c (finish_template_template_parm): Adjust.
11215
11216 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
11217
11218         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
11219         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
11220         where to emit thunks.
11221         (build_vtt): Adjust call to build_vtt_inits.
11222         (build_vtt_inits): Add parameter to indicate whether or not
11223         sub-VTTs for virtual bases should be included.  Adjust handling of
11224         construction vtables.
11225         (get_matching_base): New function.
11226         (dfs_build_vtt_inits): Rename to ...
11227         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
11228         construction vtables.
11229         (dfs_fixup_binfo_vtbls): Likewise.
11230         (build_ctor_vtbl_groups): Build construction vtables for virtual
11231         bases, too.
11232         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
11233         to build construction vtbls.
11234         (dfs_accumulate_vtbl_inits): Adjust handling of
11235         construction vtables.
11236
11237         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
11238         types correctly.
11239
11240 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
11241
11242         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
11243
11244 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
11245
11246         * search.c (hides): Remove.
11247         (is_subobject_of_p): Add most_derived parameter. Use
11248         CANONICAL_BINFO.
11249         (lookup_field_queue_p): Adjust.
11250         (lookup_field_r): Adjust.
11251
11252 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
11253
11254         * decl2.c (handle_class_head): Bash typedefs to the type's main
11255         decl.
11256
11257 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
11258
11259         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
11260         (begin_global_stmt_expr): ... this.
11261         (genrtl_finish_stmt_expr): Rename to ...
11262         (finish_global_stmt_expr): ... this.
11263         * init.c (begin_init_stmts): Adjust calls.
11264         (finish_init_stmts): Likewise.
11265         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
11266         (begin_global_stmt_expr): ... this.
11267         (genrtl_finish_stmt_expr): Rename to ...
11268         (finish_global_stmt_expr): ... this.
11269
11270 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11271
11272         * search.c (lookup_member): Fix typo in comment.
11273
11274 2000-06-24  Jason Merrill  <jason@redhat.com>
11275
11276         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
11277         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
11278
11279 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11280
11281         * parse.y (complex_direct_notype_declarator): Support global_scope.
11282         * Makefile.in: Adjust conflict count.
11283
11284 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11285
11286         * parse.y (template_arg): Convert TEMPLATE_DECL
11287         that is a template template parameter to
11288         TEMPLATE_TEMPLATE_PARM here.
11289
11290         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
11291         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
11292         (copy_template_template_parm): Adjust prototype.
11293         * decl.c (grokdeclarator): Remove dead code.
11294         * pt.c (process_template_parm): Tidy.
11295         (lookup_template_class): Construct nodes in
11296         copy_template_template_parm.
11297         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
11298         lookup_template_class.  Use TYPE_TI_TEMPLATE.
11299         * tree.c (copy_template_template_parm): Add NEWARGS
11300         parameter.
11301         (mapcar): Adjust call to copy_template_template_parm.
11302         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
11303         * method.c (build_template_template_parm_names): Change error
11304         code to avoid compilation warning.
11305
11306         * gxxint.texi: Document template template parameter
11307         name mangling.
11308
11309 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
11310
11311         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
11312         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
11313         (cp-demangle.o): New rule.
11314         (dyn-string.o): Likewise.
11315         * inc/cxxabi.h (__cxa_demangle): New declaration.
11316
11317 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
11318
11319         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
11320         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
11321         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
11322         a tree, not an int.
11323         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
11324         (make_thunk): Change prototype.
11325         (emit_thunk): Rename to use_thunk.
11326         (mangle_thunk): Change prototype.
11327         * class.c (get_derived_offset): Simplify.
11328         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
11329         BV_GENERATE_THUNK_WITH_VTABLE_P.
11330         (build_primary_vtable): Simplify.
11331         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
11332         (dfs_find_base): Remove.
11333         (update_vtable_entry_for_fn): Correct bug in finding the base
11334         where a virtual function was first declared.  Figure out whether
11335         or not to emit a vcall-thunk with the vtables in which it appears.
11336         Correct logic for deciding whether to use an ordinary thunk, or a
11337         vcall thunk.
11338         (finish_struct_1): Remove unnecssary code.
11339         (build_vtbl_initializer): Use ssize_int for the running counter of
11340         negative indices.
11341         (build_vtbl_initializer): Only use vcall thunks where necessary.
11342         Mark thunks as needing to be emitted with their vtables, or not.
11343         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
11344         indices.  Use size_binop.
11345         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
11346         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
11347         size_binop.
11348         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
11349         (build_vtable_entry): Mark thunks as needing to be emitted with
11350         their vtables, or not.
11351         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
11352         * decl2.c (mark_vtable_entries): Use use_thunk instead of
11353         emit_thunk.
11354         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
11355         information.
11356         * error.c (dump_expr): Use BV_FN.
11357         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
11358         not an int.
11359         * method.c (make_thunk): Likewise.
11360         (emit_thunk): Rename to use_thunk.  Allow callers to decide
11361         whether or not to actually emit the thunk.  Adjust for changes in
11362         representation of vcall offsets.
11363         * search.c (dfs_get_pure_virtuals): Use BV_FN.
11364         * semantics.c (emit_associated_thunks): New function.
11365         (expand_body): Use it.
11366         * ir.texi: Adjust decriptions of thunks.
11367
11368 2000-06-22  Jason Merrill  <jason@redhat.com>
11369
11370         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
11371         (tsubst_friend_function): Copy it here.
11372
11373         * decl.c (grok_op_properties): Fix typo.
11374
11375         * decl2.c (delete_sanity): Clarify warning, avoid failure on
11376         deleting void*.
11377
11378         * pt.c (check_explicit_specialization): Clarify error.
11379
11380         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
11381         an old OVERLOAD when we're declaring a non-function.
11382         (pushdecl, destroy_local_var): Check for error_mark_node.
11383         (warn_extern_redeclared_static): Also bail early if
11384         we're a CONST_DECL.
11385         (push_overloaded_decl): Ignore an old error_mark_node.
11386
11387 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
11388
11389         * call.c (build_x_va_arg): Check if in a template decl.
11390         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
11391
11392 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11393
11394         * class.c (push_lang_context): TYPE_NAME gets you to the Java
11395         types DECLs.
11396         * decl.c (check_goto): Computed gotos assumed OK.
11397
11398 2000-06-20  Jason Merrill  <jason@redhat.com>
11399
11400         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
11401         for which we don't need to look for instantiations.
11402
11403 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
11404
11405         * parse.y (program): Always call finish_translation_unit.
11406         * parse.c, parse.h: Rebuilt.
11407
11408 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
11409
11410         * method.c: Don't include hard-reg-set.h.
11411
11412 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
11413
11414         * rtti.c (get_base_offset): Cope when vbase field is in a base.
11415
11416 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
11417
11418         * call.c (build_conditional_expr): Use VOID_TYPE_P.
11419         * cvt.c (cp_convert_to_pointer): Likewise.
11420         (convert_to_void): Likewise.
11421         * error.c (dump_expr): Likewise.
11422         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
11423         * init.c (build_delete): Likewise.
11424         * method.c (emit_thunk): Likewise.
11425         * optmize.c (declare_return_variable): Likewise.
11426         * rtti.c (get_tinfo_decl_dynamic): Likewise.
11427         (get_typeid): Likewise.
11428         (build_dynamic_cast_1): Likewise.
11429         * typeck.c (composite_pointer_type): Likewise.
11430         (common_type): Likewise.
11431         (build_indirect_ref): Likewise.
11432         (build_binary_op): Likewise.
11433         (build_x_compound_expr): Likewise.
11434         (check_return_expr): Likewise.
11435         * typeck2.c (add_exception_specifier): Likewise.
11436
11437         * mangle.c (write_method_parms): Use direct comparison for end
11438         of parmlist.
11439
11440 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
11441
11442         * cp-tree.h (genrtl_try_block): Declare function.
11443         (genrtl_handler): Likewise.
11444         (genrtl_catch_block): Likewise.
11445         (genrtl_ctor_stmt): Likewise.
11446         (genrtl_subobject): Likewise.
11447         (genrtl_decl_cleanup): Likewise.
11448         (genrtl_do_poplevel): Likewise.
11449         (genrtl_do_pushlevel): Likewise.
11450         (genrtl_clear_out_block): Likewise.
11451         (genrtl_goto_stmt): Likewise.
11452         (genrtl_expr_stmt): Likewise.
11453         (genrtl_decl_stmt): Likewise.
11454         (genrtl_if_stmt): Likewise.
11455         (genrtl_while_stmt): Likewise.
11456         (genrtl_do_stmt): Likewise.
11457         (genrtl_return_stmt): Likewise.
11458         (genrtl_for_stmt): Likewise.
11459         (genrtl_break_stmt): Likewise.
11460         (genrtl_continue_stmt): Likewise.
11461         (genrtl_scope_stmt): Likewise.
11462         (genrtl_switch_stmt): Likewise.
11463         (genrtl_case_label): Likewise.
11464         (genrtl_begin_compound_stmt): Likewise.
11465         (genrtl_finish_compound_stmt): Likewise.
11466         (genrtl_compound_stmt): Likewise.
11467         (genrtl_asm_stmt): Likewise.
11468         (genrtl_named_return_value): Likewise.
11469         (genrtl_begin_stmt_expr): Likewise.
11470         (genrtl_finish_stmt_expr): Likewise.
11471         (finish_for_stmt): Removed first argument.
11472         (finish_switch_stmt): Likewise.
11473
11474         * semantics.c (genrtl_try_block): Define function.
11475         (genrtl_handler): Likewise.
11476         (genrtl_catch_block): Likewise.
11477         (genrtl_ctor_stmt): Likewise.
11478         (genrtl_subobject): Likewise.
11479         (genrtl_decl_cleanup): Likewise.
11480         (genrtl_do_poplevel): Likewise.
11481         (genrtl_do_pushlevel): Likewise.
11482         (genrtl_clear_out_block): Likewise.
11483         (genrtl_goto_stmt): Likewise.
11484         (genrtl_expr_stmt): Likewise.
11485         (genrtl_decl_stmt): Likewise.
11486         (genrtl_if_stmt): Likewise.
11487         (genrtl_while_stmt): Likewise.
11488         (genrtl_do_stmt): Likewise.
11489         (genrtl_return_stmt): Likewise.
11490         (genrtl_for_stmt): Likewise.
11491         (genrtl_break_stmt): Likewise.
11492         (genrtl_continue_stmt): Likewise.
11493         (genrtl_scope_stmt): Likewise.
11494         (genrtl_switch_stmt): Likewise.
11495         (genrtl_case_label): Likewise.
11496         (genrtl_begin_compound_stmt): Likewise.
11497         (genrtl_finish_compound_stmt): Likewise.
11498         (genrtl_compound_stmt): Likewise.
11499         (genrtl_asm_stmt): Likewise.
11500         (genrtl_named_return_value): Likewise.
11501         (genrtl_begin_stmt_expr): Likewise.
11502         (genrtl_finish_stmt_expr): Likewise.
11503         (finish_for_stmt): Removed first argument and generate rtl
11504         specific code.
11505         (finish_switch_stmt): Likewise.
11506         (do_poplevel): Removed generate rtl specific code.
11507         (do_pushlevel): Likewise.
11508         (add_tree): Likewise.
11509         (finish_goto_stmt): Likewise.
11510         (finish_expr_stmt): Likewise.
11511         (begin_if_stmt): Likewise.
11512         (finish_if_stmt_cond): Likewise.
11513         (finish_then_clause): Likewise.
11514         (begin_else_clause): Likewise.
11515         (finish_else_clause): Likewise.
11516         (finish_if_stmt): Likewise.
11517         (clear_out_block): Likewise.
11518         (begin_while_stmt): Likewise.
11519         (finish_while_stmt_cond): Likewise.
11520         (finish_while_stmt): Likewise.
11521         (begin_do_stmt): Likewise.
11522         (finish_do_body): Likewise.
11523         (finish_do_stmt): Likewise.
11524         (finish_return_stmt): Likewise.
11525         (begin_for_stmt): Likewise.
11526         (finish_for_init_stmt): Likewise.
11527         (finish_for_cond): Likewise.
11528         (finish_for_expr): Likewise.
11529         (finish_break_stmt): Likewise.
11530         (finish_continue_stmt): Likewise.
11531         (begin_switch_stmt): Likewise.
11532         (finish_switch_cond): Likewise.
11533         (finish_case_label): Likewise.
11534         (begin_try_block): Likewise.
11535         (begin_function_try_block): Likewise.
11536         (finish_try_block): Likewise.
11537         (finish_cleanup_try_block): Likewise.
11538         (finish_cleanup): Likewise.
11539         (finish_function_try_block): Likewise.
11540         (finish_handler_sequence): Likewise.
11541         (finish_function_handler_sequence): Likewise.
11542         (begin_handler): Likewise.
11543         (finish_handler_parms): Likewise.
11544         (begin_catch_block): Likewise.
11545         (finish_handler): Likewise.
11546         (begin_compound_stmt): Likewise.
11547         (finish_compound_stmt): Likewise.
11548         (finish_asm_stmt): Likewise.
11549         (finish_label_stmt): Likewise.
11550         (finish_label_decl): Likewise.
11551         (finish_subobject): Likewise.
11552         (finish_decl_cleanup): Likewise.
11553         (finish_named_return_value): Likewise.
11554         (begin_stmt_expr): Likewise.
11555         (finish_stmt_expr): Likewise.
11556
11557         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
11558         to call genrtl_expr_stmt when appropriate.
11559
11560         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
11561         begin_compound_expr to call genrtl_begin_stmt_expr and
11562         genrtl_begin_compound_expr when appropriate.
11563         (finish_init_stmts): Changed calls to finish_compound_expr and
11564         finish_stmt_expr to call genrtl_finish_compound_expr and
11565         genrtl_finish_stmt_expr when appropriate.
11566         (expand_default_init): Changed call to finish_expr_stmt to call
11567         genrtl_expr_stmt when appropriate.
11568         (build_vec_init): Likewise.
11569
11570         * parse.y (simple_stmt): Removed first argument from call to
11571         finish_for_stmt. Removed first argument from call to
11572         finish_switch_stmt.
11573
11574         * parse.c: Regenerated.
11575
11576         * pt.c (tsubst_expr): Removed first argument from call to
11577         finish_for_stmt. Removed first argument from call to
11578         finish_switch_stmt.
11579
11580 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
11581
11582         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
11583         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
11584
11585         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
11586         (cplus_tree_code_length[]): Likewise.
11587         (cplus_tree_code_name[]): Likewise.
11588         (init_parse): Added call to add_c_tree_codes. Changed
11589         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
11590
11591 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
11592
11593         * cp-tree.h (finish_mem_initializers): Declare.
11594         (count_trees): Likewise.
11595         * parse.y (base_init): Use finish_mem_initializers.
11596         * semantics.c (finish_mem_initializers): New function.
11597
11598         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
11599         the number of trees.
11600         (n_trees): Remove.
11601         (count_trees): Don't use it.
11602
11603 2000-06-15  Jason Merrill  <jason@redhat.com>
11604
11605         * tree.c (count_trees): New debugging function.
11606
11607         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
11608         * init.c (build_member_call): Pull out the name of a DECL.
11609
11610         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
11611         * semantics.c (expand_body): Push to TV_INTEGRATION here.
11612         * optimize.c (optimize_function): Not here.
11613         * pt.c (instantiate_decl): Push to TV_PARSE.
11614
11615 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
11616
11617         * cp-tree.h (struct language_function): Remove x_base_init_list
11618         and x_member_init_list.
11619         (current_base_init_list): Remove.
11620         (current_member_init_list): Likewise.
11621         (setup_vtbl_ptr): Change prototype.
11622         (emit_base_init): Likewise.
11623         (expand_member_init): Likewise.
11624         (reinit_parse_for_function): Remove.
11625         * decl.c (save_function_data): Don't clear x_base_init_list and
11626         x_member_init_list.
11627         (mark_language_function): Don't mark them.
11628         * init.c (perform_member_init): Tweak comment.
11629         (sort_member_init): Take the list of initializers as an argument.
11630         (sort_base_init): Likewise.
11631         (emit_base_init): Likewise.
11632         (expand_member_init): Return the initializer.  Don't use global
11633         variables.
11634         * lex.c (reinit_parse_for_function): Remove.
11635         * method.c (build_template_parm_names): Correct substitution.
11636         (do_build_copy_constructor): Don't use current_member_init_list
11637         and current_base_init_list.
11638         (synthesize_method): Likewise.
11639         * parse.y (base_init): Split mem-initializers into
11640         base-initializers and field-initializers.
11641         (member_init_list): Build up the list here.
11642         (member_init): Return the initializer.
11643         (fn.depfn): Don't use reinit_parse_for_function.
11644         * parse.c: Regenerated.
11645         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
11646         ERROR_MARK.
11647         (tsubst_expr): Don't use current_member_init_list
11648         and current_base_init_list.
11649         (tsubst_expr_values): Rename to ...
11650         (tsubst_initializer_list): ... this.  Use convert_from_reference.
11651         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
11652         and current_base_init_list.
11653         (begin_function_definition): Don't call reinit_parse_for_function.
11654
11655         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
11656
11657         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
11658         correctly.
11659
11660         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
11661
11662 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
11663
11664         * cp-tree.h (IF_COND): Move to c-common.h.
11665         (THEN_CLAUSE): Likewise.
11666         (ELSE_CLAUSE): Likewise.
11667         (WHILE_COND): Likewise.
11668         (WHILE_BODY): Likewise.
11669         (DO_COND): Likewise.
11670         (DO_BODY): Likewise.
11671         (RETURN_EXPR): Likewise.
11672         (EXPR_STMT_EXPR): Likewise.
11673         (FOR_INIT_STMT): Likewise.
11674         (FOR_COND): Likewise.
11675         (FOR_EXPR): Likewise.
11676         (FOR_BODY): Likewise.
11677         (SWITCH_COND): Likewise.
11678         (SWITCH_BODY): Likewise.
11679         (CASE_LOW): Likewise.
11680         (CASE_HIGH): Likewise.
11681         (GOTO_DESTINATION): Likewise.
11682         (COMPOUND_BODY): Likewise.
11683         (ASM_CV_QUAL): Likewise.
11684         (ASM_STRING): Likewise.
11685         (ASM_OUTPUTS): Likewise.
11686         (ASM_INPUTS): Likewise.
11687         (ASM_CLOBBERS): Likewise.
11688         (DECL_STMT_DECL): Likewise.
11689         (STMT_EXPR_STMT): Likewise.
11690         (LABEL_STMT_LABEL): Likewise.
11691         (SCOPE_BEGIN_P): Likewise.
11692         (SCOPE_END_P): Likewise.
11693         (SCOPE_STMT_BLOCK): Likewise.
11694         (SCOPE_NULLIFIED_P): Likewise.
11695         (SCOPE_NO_CLEANUPS_P): Likewise.
11696         (SCOPE_PARTIAL_P): Likewise.
11697         (ASM_VOLATILE_P): Likewise.
11698         (STMT_LINENO): Likewise.
11699         (STMT_LINENO_FOR_FN_P): Likewise.
11700
11701         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
11702         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
11703         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
11704         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
11705         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
11706
11707         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
11708
11709         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
11710         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
11711
11712         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
11713         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
11714         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
11715
11716 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
11717
11718         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
11719         * class.c (dfs_find_final_overrider): Set it appropriately.
11720         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
11721         avoid unneeded secondary vptrs.
11722
11723 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
11724
11725         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
11726         (check_bitfield_decl, check_field_decl): Likewise.
11727         (build_vtbl_or_vbase_field, build_base_field): Likewise.
11728         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
11729         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
11730         (xfer_tag, finish_enum): Likewise.
11731         * decl2.c (finish_builtin_type): Likewise.
11732         * init.c (init_init_processing): Likewise.
11733         * pt.c (instantiate_class_template): Likewise.
11734         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
11735         * cp-tree.h (struct lang_type): Add user_align member.
11736         (CLASSTYPE_USER_ALIGN): Define.
11737
11738 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
11739
11740         * Make-lang.in (c++.install-common): Install g++-cross in
11741         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
11742         $(target_alias)-g++ and $(target_alias)-c++.
11743
11744 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
11745
11746         * class.c (vcall_offset_data_s): Add last_init and fns.
11747         (overrides): Rename to same_signature_p.
11748         (dfs_find_final_overrider): Adjust accordingly.
11749         (mark_overriders): Likewise.
11750         (warn_hidden): Likewise.
11751         (build_vtbl_initializer): Reorganize machinery for building things
11752         at negative offsets.
11753         (build_vcall_and_vbase_vtbl_entries): Likewise.
11754         (build_vbase_offset_vtbl_entries): Likewise.
11755         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
11756         offset entries.  Do not create two entries for functions with the
11757         same signature.
11758         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
11759         (build_rtti_vtbl_entries): Reorganize machinery for building things
11760         at negative offsets.
11761
11762         * optimize.c (expand_call_inline): Don't recurse into the code
11763         used to initialize the parameters more than once.
11764
11765 2000-06-11  Mark Mitchell <mark@codesourcery.com>
11766
11767         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
11768         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
11769         (find_substitution): Only use the `Sa' substitution for
11770         std::allocator, not instantiations of it.
11771         (write_template_prefix): Move comment.  Only use a TREE_LIST to
11772         represent substitutions for a member template.
11773         (write_array_type): Mangle array dimensions correctly.
11774         * optimize.c (maybe_clone_body): Copy more information from the
11775         cloned function.
11776         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
11777         on the regenerated declaration.
11778
11779 2000-06-11  Chip Salzenberg  <chip@valinux.com>
11780             Mark Mitchell <mark@codesourcery.com>
11781
11782         * class.c (build_vtable): Clarify comment.
11783         (build_ctor_vtbl_group): Pass the most derived type to
11784         build_vtable.
11785
11786 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11787
11788         * decl2.c (compare_options): Don't needlessly cast away const-ness.
11789
11790 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
11791
11792         * decl.c (add_binding): Handle duplicate declarations of external
11793         variables.
11794
11795 2000-06-09  Chip Salzenberg  <chip@valinux.com>
11796             Mark Mitchell <mark@codesourcery.com>
11797
11798         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
11799         argument.
11800         (write_signed_number): New macro.
11801         (write_unsigned_number): Likewise.
11802         (write_source_name): Use them.
11803         (write_number): Handle signed and unsigned values.
11804         (write_integer_cst): Use tree_int_cst_sgn, and use
11805         write_unsigned_number or write_signed_number as appropriate.
11806         (write_discriminator): Use write_unsigned_number or
11807         write_signed_number as appropriate.
11808         (write_template_arg_literal): Likewise.
11809         (write_array_type): Use tree_low_cst.
11810         (write_template_parm):  Use write_unsigned_number or
11811         write_signed_number as appropriate.
11812         (write_substitution): Adjust call to write_number.
11813         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
11814         (write_expression): Handle non-type template arguments of
11815         reference type correctly.
11816         (mangle_thunk): Use write_signed_number.
11817
11818 2000-06-09  Chip Salzenberg  <chip@valinux.com>
11819
11820         * mangle.c (find_substition): Don't mangle objects with typename
11821         substitutions (e.g. "cin" as "Si").
11822
11823 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
11824
11825         * call.c (add_candidate): Use ggc_alloc_cleared.
11826         * decl.c (lookup_label): Likewise.
11827         * lex.c (retrofit_lang_decl): Likewise.
11828
11829 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
11830
11831         * semantics.c (expand_body): Push to TV_EXPAND.
11832         * optimize.c (optimize_function): Push to TV_INTEGRATION.
11833         * decl.c (start_function): Always call announce_function.
11834
11835         * tinfo2.cc: Just declare abort.
11836
11837 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
11838
11839         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
11840         whenever @ is a symbolic name.
11841
11842 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
11843
11844         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
11845
11846 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
11847
11848         * decl.c (pushdecl): Look up functions by DECL_NAME, not
11849         DECL_ASSEMBLER_NAME.
11850
11851 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
11852
11853         * decl2.c (c_language): Define.
11854
11855 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
11856
11857         * lex.c (lang_init_options): Tweak.
11858
11859         * decl2.c: Remove #inclusion of diagnostic.h
11860         (lang_decode_option): Move diagnostic formatting options to
11861         toplevel.
11862
11863         * lang-options.h: Remove documentation for diagnostic options.
11864
11865         * Makefile.in (lex.o): Depends upon diagnostic.h
11866
11867 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
11868
11869         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
11870         the same DECL_RESULT, it's not a redefinition.
11871         * pt.c (tsubst_decl): Remove code to handle illegal
11872         specializations.
11873
11874 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
11875
11876         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
11877
11878 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
11879
11880         * search.c (maybe_suppress_debug_info): Don't check
11881         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
11882
11883         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
11884         here if extern_p.
11885
11886         Remember instantiation context in deferred instantiations.
11887         * cp-tree.h (struct tinst_level): Remove.
11888         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
11889         * pt.c (current_tinst_level): Now a tree.
11890         (print_template_context, push_tinst_level, pop_tinst_level,
11891         tinst_for_decl): Adjust.
11892         (reopen_tinst_level): New fn.
11893         (init_pt): Register current_tinst_level as a root.
11894         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
11895         of the pending templates list.
11896         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
11897         * lex.c (extract_interface_info): Adjust.
11898         * decl2.c (warn_if_unknown_interface): Adjust.
11899
11900 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
11901
11902         * class.c (indirect_primary_base_p): New function.
11903         (determine_primary_base): Use it.
11904
11905 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
11906
11907         Update new-abi dynamic cast algorithm.
11908         * tinfo.cc (__class_type_info::__dyncast_result): Add
11909         whole_details. Adjust constructor.
11910         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
11911         Avoid unnecessary searching.
11912         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
11913
11914 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11915
11916         * decl.c (init_decl_processing): Don't call record_component_aliases.
11917         * tree.c (build_cplus_array_type_1): Likewise.
11918
11919 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
11920
11921         * ir.texi: Correct typo.
11922         * mangle.c (write_expression): Handle non-type template arguments
11923         with reference type.
11924         * method.c (build_overload_value): Likewise.
11925         * pt.c (convert_nontype_argument): Explicitly represent conversion
11926         to a reference with an ADDR_EXPR.
11927         (unify): Always unify arguments in left-to-right order.
11928
11929 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
11930             Mark Mitchell  <mark@codesourcery.com>
11931
11932         * Make-lang.in (CXX_SRCS): Add mangle.c.
11933         * Makefile.in (CXX_OBJS): Add mangle.o.
11934         (mangle.o): New rule.
11935
11936         * class.c (local_classes): New variable.
11937         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
11938         (get_vtt_name): Use mangle_vtt_name for new ABI.
11939         (init_class_processing): Initialize local_classes.
11940         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
11941         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
11942         (std_identifier): New macro.
11943         (DECL_VOLATILE_MEMFUNC_P): New macro.
11944         (DECL_NAMESPACE_STD_P): Likewise.
11945         (local_classes): Declare.
11946         (get_mostly_instantiated_function_type): Declare.
11947         (init_mangle): Declare.
11948         (mangle_decl): Likewise.
11949         (mangle_type_string): Likewise.
11950         (mangle_type): Likewise.
11951         (mangle_typeinfo_for_type): Likewise.
11952         (mangle_typeinfo_string_for_type): Likewise.
11953         (mangle_vtbl_for_type): Likewise.
11954         (mangle_vtt_for_type): Likewise.
11955         (mangle_ctor_vtbl_for_type): Likewise.
11956         (mangle_thunk): Likewise.
11957         (mangle_conv_op_name_for_type): Likewise.
11958         (mangle_guard_variable): Likewise.
11959         * decl.c (pushtag): Keep track of local classes.
11960         (initialize_predefined_identifiers): Initialize std_identifier.
11961         (init_decl_processing): Use std_identifier.
11962         (start_decl): Don't treat instantiations as specializations.
11963         (grokdeclarator): Likewise.
11964         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
11965         name for fully-instantiated templates.
11966         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
11967         destructors with the new ABI.
11968         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
11969         (grokfield): Use mangle_type for new ABI.
11970         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
11971         (get_sentry): Use mangle_guard_variable for new ABI.
11972         (start_static_initialization_or_destruction): Likewise.
11973         * expr.c (extract_aggr_init): Remove.
11974         (extract_scalar_init): Likewise.
11975         (extract_init): Remove #if 0'd code.
11976         * mangle.c: New function.
11977         * method.c (build_mangled_name): Assert not flag_new_abi.
11978         (build_static_name): Likewise.
11979         (build_decl_overload_real): Likewise.
11980         (build_typename_overload): Likewise.
11981         (build_overload_with_type): Likewise.
11982         (build_overload_name): Likewise.
11983         (get_ctor_vtbl_name): Likewise.
11984         (start_squangling): Likewise.
11985         (get_id_2): Likewise.
11986         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
11987         (init_method): Call init_mangle for new ABI.
11988         (make_thunk): Call mangle_thunk for new ABI.
11989         * operators.def: Correct new ABI manglings for the `%' operator.
11990         Add `::' operator.
11991         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
11992         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
11993         (lookup_template_class): Call mangle_decl for new ABI.
11994         (get_mostly_instantiated_function_type): New function.
11995         (set_mangled_name_for_template_decl): Use it.
11996         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
11997         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
11998         conversion op names.
11999         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
12000         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
12001         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
12002         mangle_typeinfo_string_for_type.
12003
12004 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
12005
12006         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
12007         (INNERMOST_TEMPLATE_ARGS): New macro.
12008         (innermost_args): Remove.
12009         (get_innermost_template_args): New function.
12010         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
12011         * error.c (dump_function_decl): Be caution when using
12012         most_general_template.
12013         * method.c (build_template_parm_names):  Use
12014         INNERMOST_TEMPLATE_ARGS.
12015         * pt.c (add_to_template_args): Tidy comment
12016         (get_innermost_template_args): New function.
12017         (check_explicit_specialization): Clear DECL_INITIAL for a new
12018         specialization.
12019         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
12020         Tidy.
12021         (push_template_decl): Always register specializations of the most
12022         general template.
12023         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
12024         (coerce_template_parms): Likewise.
12025         (lookup_template_class): Likewise.
12026         (innermost_args): Remove.
12027         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
12028         (tsubst_decl): Handle tricky specializations.  Use
12029         get_innermost_template_args.
12030         (instantiate_template): Simplify handling of partial
12031         instantiations.
12032         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
12033         (most_general_template): Reimplement, in a more straightforward
12034         manner.
12035         (regenerate_decl_from_template): Tweak formatting.  Use
12036         TMPL_ARGS_DEPTH for clarity.
12037         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
12038
12039         * dump.c (dequeue_and_dump): Dump information about thunks.
12040
12041 2000-06-01  Richard Henderson  <rth@cygnus.com>
12042
12043         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
12044
12045 2000-06-01  Richard Henderson  <rth@cygnus.com>
12046
12047         * decl2.c (unsupported_options): Fix typo, make const.
12048         (lang_decode_option): Fix bsearch argument order.
12049
12050 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
12051
12052         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
12053         on FIELD_DECLs.
12054
12055 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12056
12057         * cp-tree.h (c_get_alias_set): Deleted.
12058         * Makefile.in (decl.o): Include ../expr.h.
12059         * decl.c (expr.h): Include.
12060         (init_decl_processing): Call record_component_aliases for arrays.
12061         (grokdeclarator): Likewise.
12062         Set TREE_ADDRESSABLE for fields that aren't bitfields.
12063         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
12064
12065 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
12066
12067         Remove guiding declaration support.
12068         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
12069         (flag_guiding_decls): Remove.
12070         * call.c (build_user_type_conversion_1): Remove support for
12071         guiding decls.
12072         (build_new_function_call): Likewise.
12073         (build_new_op): Likewise.
12074         (build_new_method_call): Likewise.
12075         * decl.c (start_function): Likewise.
12076         * friend.c (is_friend): Likewise.
12077         (do_friend): Likewise.
12078         * decl2.c ((flag_dump_translation_unit): Make it const.
12079         (flag_guiding_decls): Remove.
12080         (unsupported_options): New variable
12081         (compare_options): New function.
12082         (lang_decode_option): Use them.
12083
12084         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
12085
12086         * method.c (mangle_expression): Adjust test for legal expression
12087         operators.
12088
12089         * pt.c (instantiate_decl): Save and restore the local
12090         specializations list.
12091
12092 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
12093
12094         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
12095
12096 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
12097
12098         * call.c (add_template_candidate_real): Handle member template
12099         constructors for classes with virtual bases.
12100         (build_user_type_conversion_1): Use in_charge_arg_for_name.
12101         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
12102
12103         * ir.texi: Update thunk documentation.
12104
12105         * call.c (joust): Fix handling of overloaded builtin operators.
12106
12107 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
12108
12109         * cp-tree.h (DECL_ANTICIPATED): New macro.
12110         Document new use of DECL_LANG_FLAG_7.
12111         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
12112         in the user namespace.
12113         * lex.c (do_identifier): If the identifier's declaration has
12114         DECL_ANTICIPATED on, it has not yet been declared.  But do not
12115         replace it with an ordinary implicit declaration.
12116
12117         * tinfo2.cc: Include stdlib.h.
12118
12119 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
12120
12121         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
12122         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
12123         CLASSTYPE_ALIGN.
12124
12125 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
12126
12127         * decl2.c (lang_decode_option): Use skip_leading_substring instead
12128         of plain strncmp.
12129
12130 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
12131
12132         * operators.def (<?): Duplicated, should have been...
12133         (>?): this.  Fixed.
12134
12135 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
12136             Mark Mitchell  <mark@codesourcery.com>
12137
12138         * cp-tree.h (ansi_opname): Make it a macro.
12139         (ansi_assopname): Likewise.
12140         (struct lang_decl_flags): Add assignment_operator_p.
12141         (struct lang_decl): Add operator_code.
12142         (DECL_VTT_PARM): Adjust.
12143         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
12144         overloaded operator.
12145         (SET_OVERLOADED_OPERATOR_CODE): New macro.
12146         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
12147         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
12148         (opname_tab): Remove.
12149         (assignop_tab): Likewise.
12150         (operator_name_info_t): New type.
12151         (operator_name_info): New variable.
12152         (assignment_operator_name_info): Likewise.
12153         (build_cp_library_fn): Remove declaration.
12154         (push_cp_library_fn): Likewise.
12155         (operator_name_string): Likewise.
12156         (build_decl_overload): Likewise.
12157         * call.c (print_z_candidates): Simplify.
12158         (build_object_call): Adjust usage of ansi_opname.  Use
12159         DECL_OVERLOADED_OPERATOR_P.
12160         (op_error): Adjust operator name lookup.
12161         (build_conditional_expr): Adjust usage of ansi_opname.
12162         (build_new_op): Likewise.
12163         (build_op_delete_call): Likewise.
12164         (build_over_call): Likewise.
12165         (joust): Use DECL_OVERLOADED_OPERATOR_P.
12166         * decl.c (duplicate_decls): Copy operator_code.
12167         (init_decl_processing): Adjust parameters to push_cp_library_fn.
12168         (builtin_function): Adjust parameters to build_library_fn_1.
12169         (build_library_fn_1): Accept an overloaded operator code.
12170         (build_library_fn): Pass ERROR_MARK.
12171         (build_cp_library_fn): Accept an overloaded operator code.
12172         (push_cp_library_fn): Likewise.
12173         (grokfndecl): Tweak.
12174         (grokdeclarator): Simplify code to compute names of overloaded
12175         operators.  Adjust use of ansi_opname.
12176         (ambi_op_p): Work on tree_codes, not identifiers.
12177         (unary_op_p): Likewise.
12178         (grok_op_properties): Likewise.
12179         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
12180         (lang_mark_tree): Don't try to mark the operator_code.
12181         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
12182         * error.c (dump_decl): Remove special handling for operator
12183         names.
12184         (dump_function_name): Likewise.
12185         (dump_expr): Adjust name lookup of operators.
12186         (op_to_string): Simplify.
12187         (assop_to_string): Likewise.
12188         * init.c (build_new_1): Adjust use of ansi_opname.
12189         * lex.c (opname_tab): Remove.
12190         (assignop_tab): Likewise.
12191         (ansi_opname): Likewise.
12192         (ansi_assopname): Likewise.
12193         (operator_name_string): Likewise.
12194         (reinit_lang_specific): Likewise.
12195         (operator_name_info): New variable.
12196         (assignment_operator_name_info): Likewise.
12197         (init_operators): New function.
12198         (init_parse): Use it.
12199         (do_identifier): Adjust use of ansi_opname.
12200         * method.c (mangle_expression): Don't use ansi_opname for
12201         mangling.
12202         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
12203         (build_decl_overload): Remove.
12204         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
12205         (do_build_assign_ref): Adjust use of ansi_opname.
12206         (synthesize_method): Likewise.
12207         (implicitly_declare_fn): Likewise.
12208         * operators.def: New file.
12209         * parse.y (operator): Adjust use of ansi_opname.
12210         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
12211         (set_mangled_name_for_template_decl): Don't play games with
12212         current_namespace.
12213         (special_function_p): Adjust use of ansi_opname.
12214         * typeck.c (check_return_expr): Likewise.
12215         * Make-lang.in (cc1plus): Depend on operators.def.
12216         * Makefile.in (lex.o): Likewise.
12217         (decl.o): Likewise.
12218
12219 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
12220
12221         * Make-lang.in (cplib2.ready): Eradicate.
12222
12223 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12224
12225         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
12226         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
12227         (built_min, cp_tree_equal): Likewise.
12228
12229 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
12230
12231         * class.c (layout_nonempty_base_or_field): Replace
12232         `record_layout_info' with `record_layout_info_s'.
12233
12234 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
12235
12236         Fix goto checking.
12237         * cp-tree.h (struct language_function): x_named_labels is now
12238         a struct named_label_list*.
12239         * decl.c (struct named_label_use_list): Renamed from...
12240         (struct named_label_list): ...this.  New struct.
12241         (push_binding_level): Don't set eh_region.
12242         (note_level_for_eh): New fn.
12243         (pop_label): Take label and old value directly.
12244         (pop_labels): Adjust for new named_labels format.
12245         (lookup_label): Likewise.
12246         (poplevel): Note characteristics of a binding level containing a
12247         named label.  Mess with named label lists earlier.
12248         (mark_named_label_lists): New fn.
12249         (mark_lang_function): Call it.
12250         (use_label): New fn, split out from...
12251         (make_label_decl): ...here.  Don't call it.
12252         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
12253         check_previous_gotos): New fns, split out from...
12254         (define_label): ...here.
12255         (check_switch_goto): New fn.
12256         (define_case_label): Call it.
12257         (check_goto): New fn.
12258         * semantics.c (finish_goto_stmt): Call it and use_label.
12259         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
12260         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
12261
12262 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
12263
12264         * class.c (build_vtable_entry_ref): Correct usage of
12265         get_vtbl_decl_for_binfo.
12266
12267         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
12268         * method.c (implicitly_declare_fn): Not here.
12269
12270 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
12271
12272         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
12273         (CPTI_PTMD_DESC_TYPE): ... here.
12274         (ptmd_desc_type_node): Rename to ...
12275         (ptm_desc_type_node): ... here.
12276         * decl.c: Likewise.
12277         * rtti.c (ptmd_initializer): Rename to ...
12278         (ptm_initializer): ... here.
12279         (sythesize_tinfo_var): Adjust. Deal with pointer to member
12280         function.
12281         (create_tinfo_types): Adjust.
12282
12283 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
12284
12285         Finish implementation of VTTs.
12286         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
12287         CPTI_VTT_PARM_IDENTIFIER.
12288         (vtt_parm_identifier): New macro.
12289         (vtt_parm_type): Likewise.
12290         (BINFO_SUBVTT_INDEX): Likewise.
12291         (BINFO_VPTR_INDEX): Likewise.
12292         (struct lang_decl): Add vtt_parm.
12293         (DECL_VTT_PARM): New macro.
12294         (DECL_USE_VTT_PARM): Likewise.
12295         (DECL_NEEDS_VTT_PARM_P): Likewise.
12296         (get_vtt_name): Declare.
12297         (build_artificial_parm): Likewise.
12298         (fixup_all_virtual_upcast_offsets): Likewise.
12299         (expand_indirect_vtbls_init): Remove.
12300         * call.c (build_new_method_call): Pass the vtt to subobject
12301         constructors and destructors.
12302         * class.c (get_vtt_name): Give it external linkage.
12303         (build_clone): Handle the magic VTT parameters for clones.
12304         (clone_function_decl): Fix typo in comment.
12305         (build_vtt): Keep track of the indices in the VTTs where various
12306         entities are stored.
12307         (build_vtt_inits): Likewise.
12308         (dfs_build_vtt_inits): Likewise.
12309         (build_ctor_vtbl_group): Tweak type of construction vtables.
12310         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
12311         primary bases, when building construction vtables.
12312         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
12313         (initialize_predefined_identifiers): Add vtt_parm_identifier.
12314         (init_decl_processing): Initialize vtt_parm_type.
12315         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
12316         (lang_mark_tree): Make vtt_parm.
12317         * decl2.c (build_artificial_parm): New function.
12318         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
12319         (grokclassfn): Use build_artificial_parm.
12320         * init.c (initialize_vtbl_ptrs): Call
12321         fixup_all_virtual_upcast_offsets directly.
12322         (perform_member_init): Use the complete subobject destructor for
12323         member cleanups.
12324         (build_vtbl_address): New function.
12325         (expand_virtual_init): Handle VTTs.
12326         * optimize (maybe_clone_body): Likewise.
12327         * search.c (fixup_all_virtual_upcast_offsets): Give it external
12328         linkage.
12329         (expand_indirect_vtbls_init): Remove.
12330         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
12331         * tree.c (make_binfo): Make them bigger.
12332
12333 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
12334
12335         * inc/cxxabi.h (__pbase_type_info): Define, based on
12336         __pointer_type_info.
12337         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
12338         (__pointer_to_member_type_info): Likewise.
12339         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
12340         (__pointer_to_member_type_info::__is_pointer_p): Remove.
12341         (__pointer_type_info::__do_catch): Rename to ...
12342         (__pbase_type_info::__do_catch): ... here. Adjust.
12343         (__pbase_type_info::__pointer_catch): Implement.
12344         (__pointer_type_info::__pointer_catch): Adjust.
12345         (__pointer_to_member_type_info::__pointer_catch): Adjust.
12346
12347 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
12348
12349         * tinfo.h (__user_type_info::contained_virtual_p): New
12350         predicate.
12351         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
12352         shaped hierarchy.
12353         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
12354         diamond shaped hierarchy. Add early out for mixed diamond and
12355         duplicate shaped hierarchy.
12356
12357 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
12358
12359         * cp-tree.h (build_delete): Change prototype.
12360         (build_vec_delete): Likewise.
12361         * call.c (build_scoped_method_call): Use special_function_kind
12362         values to indicate the kind of destruction to be done.
12363         (build_method_call): Likewise.
12364         * decl.c (finish_destructor_body): Likewise.
12365         (maybe_build_cleanup_1): Likewise.  Rename to ...
12366         (maybe_build_cleanup): ... this.
12367         * decl2.c (delete_sanity): Use special_function_kind
12368         values to indicate the kind of destruction to be done.
12369         (build_cleanup): Likewise.
12370         * init.c (perform_member_init): Likewise.
12371         (build_vec_delete_1): Likewise.
12372         (build_dtor_call): Simplify.
12373         (build_delete): Use special_function_kind
12374         values to indicate the kind of destruction to be done.
12375         (build_vbase_delete): Likewise.
12376         (build_vec_delete): Likewise.
12377
12378         * init.c (sort_member_init): Fix typo in error message generation
12379         code.
12380
12381 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
12382
12383         * semantics.c (begin_class_definition): make the packed
12384         attribute be sensitive to the "-fpack-struct" command line flag
12385
12386 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
12387
12388         Update new-abi upcast algorithm.
12389         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
12390         prototype and meaning of return value.
12391         (__si_class_type_info::__do_upcast): Likewise.
12392         (__vmi_class_type_info::__do_upcast): Likewise.
12393         * tinfo.cc (__class_type_info::__upcast_result): Replace
12394         whole2dst with part2dst. Adjust ctor.
12395         (__class_type_info::__do_upcast): Adjust call of worker function.
12396         (__class_type_info::__do_upcast): Adjust.
12397         (__si_class_type_info::__do_upcast): Adjust. Use parent's
12398         __do_upcast.
12399         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
12400         virtual base in diamond hierarchy bug.
12401
12402 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
12403
12404         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
12405         and bitfield to tinfo_fn_p.
12406         (DECL_TINFO_FN_P): Adjust.
12407         (SET_DECL_TINFO_FN_P): Likewise.
12408         (DECL_MUTABLE_P): Likewise.
12409         (DECL_C_BIT_FIELD): Likewise.
12410         (SET_DECL_C_BIT_FIELD): Likewise.
12411         (CLEAR_DECL_C_BIT_FIELD): Likewise.
12412         (DECL_UNINLINABLE): Likewise.
12413         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
12414         (handle_using_decl): Remove assertion.
12415         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
12416         to build FIELD_DECLs.
12417         (build_base_field): Likewise.
12418         (layout_class_type): Likewise.
12419         * decl.c (init_decl_processing): Likewise.
12420         (build_ptrmemfunc_type): Likewise.
12421         (grokdeclarator): Likewise.
12422         * decl2.c (grok_x_components): Likewise.
12423         * except.c (call_eh_info): Likewise.
12424         * init.c (init_init_processing): Likewise.
12425         * rtti.c (expand_class_desc): Likewise.
12426         (create_pseudo_type_info): Likewise.
12427         (get_vmi_pseudo_type_info): Likewise.
12428         (create_tinfo_types): Likewise.
12429         * ptree.c (print_lang_decl): Adjust.
12430         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
12431         before checking DECL_MUTABLE_P.
12432
12433         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
12434         parameters for template functions.
12435         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
12436         destructors as well as constructors.
12437
12438 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
12439
12440         * class.c (build_ctor_vtbl_group): Set inits.
12441         * optimize.c (maybe_clone_body): Set DECL_INLINE and
12442         DECL_THIS_INLINE appropriately for clones.
12443
12444         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
12445         (DECL_CONV_FN_P): Simplify.
12446         (DECL_OPERATOR): Remove.
12447         (language_to_string): Declare.
12448         * decl.c (duplicate_decls): Fix typo in comment.
12449         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
12450         (grok_op_properties): Use DECL_CONV_FN_P instead of
12451         IDENTIFIER_TYPENAME_P.
12452         * dump.c (dequeue_and_dump): Dump the language linkage of
12453         declarations.
12454         * error.c (language_to_string): Give it external linkage.
12455         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
12456         (implicitly_declare_fn): Set DECL_LANGUAGE.
12457         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
12458         IDENTIFIER_TYPENAME_P.
12459         (tsubst_decl): Likewise.
12460         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
12461         * semantics.c (finish_member_declaration): Don't mark members of
12462         classes declared in an extern "C" region as extern "C".
12463
12464 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12465
12466         * decl2.c (qualified_lookup_using_namespace): Look through
12467         namespace aliases.
12468
12469         * decl.c (push_using_decl): Return the old decl on namespace level.
12470
12471 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
12472
12473         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
12474         (VTT_NAME_PREFIX): New macro.
12475         (CTOR_VTBL_NAME_PREFIX): Likewise.
12476         (get_ctor_vtbl_name): New function.
12477         * class.c (get_vtable_name): Simplify.
12478         (get_vtt_name): New function.
12479         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
12480         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
12481         when a virtual base becomes primary.
12482         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
12483         VTTs.
12484         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
12485         additional parameters.
12486         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
12487         (initialize_array): New function.
12488         (build_vtt): Likewise.
12489         (build_vtt_inits): Likewise.
12490         (dfs_build_vtt_inits): Likewise.
12491         (dfs_fixup_binfo_vtbls): Likewise.
12492         (build_ctor_vtbl_group): Likewise.
12493         (initialize_vtable): Use initialize_array.
12494         (accumulate_vtbl_inits): Reimplement to handle construction
12495         vtables.
12496         (dfs_accumulate_vtbl_inits): Likewise.
12497         (bulid_vtbl_initializer): Adjust parameter name.
12498         * method.c (build_typename_overload): Remove #if 0'd code.
12499         (get_ctor_vtbl_name): New function.
12500         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
12501         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
12502
12503         * cp-tree.h (struct lang_type): Remove search_slot.
12504         (CLASSTYPE_SEARCH_SLOT): Remove.
12505         (emit_base_init): Change prototype.
12506         (initialize_vtbl_ptrs): Likewise.
12507         (expand_indirect_vtbls_init): Likewise.
12508         (clear_search_slots): Remove.
12509         * decl.c (lang_mark_tree): Don't mark search_slot.
12510         * init.c (initialize_vtbl_ptrs): Simplify.
12511         (emit_base_init): Likewise.
12512         * search.c (struct vbase_info): Document decl_ptr.
12513         (convert_pointer_to_single_level): Remove.
12514         (dfs_find_vbases): Remove.
12515         (dfs_init_base_pointers): Simplify.
12516         (dfs_clear_vbase_slots): Remove.
12517         (dfs_vtable_path_unmark): New function.
12518         (init_vbase_pointers): Simplify.
12519         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
12520         (expand_indirect_vtbls_init): Simplify.  Don't call
12521         mark_all_temps_used.
12522         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
12523         initialize_vtbl_ptrs.
12524
12525 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
12526
12527         * except.c: Add static prototypes.
12528
12529 2000-05-20  H.J. Lu  <hjl@gnu.org>
12530
12531         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
12532
12533 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
12534
12535         Don't create a separate copy of virtual bases for the
12536         CLASSTYPE_VBASECLASSES list.
12537         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
12538         (BINFO_FOR_VBASE): Remove.
12539         (CANONICAL_BINFO): Adjust.
12540         (binfo_for_vbase): New function.
12541         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
12542         instead of BINFO_FOR_VBASE.
12543         (build_vbase_pointer): Likewise.
12544         (build_secondary_vtable): Likewise.
12545         (dfs_mark_primary_bases): Likewise.
12546         (mark_primary_bases): Likewise.
12547         (layout_nonempty_base_or_field): Likewise.
12548         (dfs_set_offset_for_shared_vbases): Likewise.
12549         (dfs_set_offset_for_unshared_vbases): Likewise.
12550         (layout_virtual_bases): Likewise.  Adjust for changes to the
12551         CLASSTYPE_VBASECLASSES list.
12552         (dump_class_hierarchy_r): Use binfo_for_vbase
12553         instead of BINFO_FOR_VBASE.
12554         (dump_class_hierarchy): Likewise.
12555         (finish_vtbls): Likewise.
12556         (build_vtbl_initializer): Adjust for changes to the
12557         CLASSTYPE_VBASECLASSES list.
12558         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
12559         * decl.c (finish_destructor_body): Adjust for changes to the
12560         CLASSTYPE_VBASECLASSES list.
12561         * init.c (sort_base_init): Use binfo_for_vbase.
12562         (construct_virtual_bases): Adjust for changes to the
12563         CLASSTYPE_VBASECLASSES list.
12564         (expand_member_init): Use binfo_for_vbase.
12565         (build_vbase_delete):  Adjust for changes to the
12566         CLASSTYPE_VBASECLASSES list.
12567         * method.c (do_build_copy_constructor): Likewise.
12568         * rtti.c (get_base_offset): Use binfo_for_vbase.
12569         (expand_class_desc): Remove #if 0'd code.
12570         * search.c (struct vbase_info): Remove vbase_types.
12571         (get_base_distance):  Use binfo_for_vbase.
12572         (lookup_field_queue_p): Use CANONICAL_BINFO.
12573         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
12574         (get_pure_virtuals): Adjust for changes to the
12575         CLASSTYPE_VBASECLASSES list.
12576         (dfs_find_vbases): Use binfo_for_vbase.
12577         (dfs_init_vbase_pointers): Likewise.
12578         (init_vbase_pointers): Don't initialize vi.vbase_types.
12579         (virtual_context): Use binfo_for_vbase.
12580         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
12581         CLASSTYPE_VBASECLASSES list.
12582         (expand_indirect_vtbls_init): Simplify.
12583         (dfs_get_vbase_types): Don't replicate virtual bases.
12584         (find_vbase_instance): Use binfo_for_vbase.
12585         (binfo_for_vbase): New function.
12586         * typeck.c (get_delta_difference): Use binfo_for_vbase.
12587
12588 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
12589
12590         * decl2.c (finish_anon_union): Generalize error messages to handle
12591         anonymous structures.
12592         * init.c (perform_member_init): Remove `name' parameter.
12593         (build_field_list): New function.
12594         (sort_member_init): Handle anonymous union initialization order
12595         correctly.  Check for multiple initializations of the same union.
12596         (emit_base_init): Don't look up fields by name here.
12597         (expand_member_init): Record the result of name lookup for future
12598         reference.
12599         * typeck.c (build_component_ref): Fix formatting.
12600
12601 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
12602
12603         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
12604         * typeck.c (build_x_compound_expr): Replace warn_unused with
12605         warn_unused_value.
12606
12607         * decl2.c (lang_decode_option): Update -Wall unused flags by
12608         calling set_Wunused.
12609
12610 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
12611
12612         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
12613         * init.c (dfs_vtable_path_unmark): Remove.
12614         * search.c (marked_new_vtable_p): Likewise.
12615         (unmarked_new_vtable_p): Likewise.
12616         (dfs_search_slot_nonempty_p): Likewise.
12617         (dfs_mark): Likewise.
12618         (dfs_vtable_path_unmark): Likewise.
12619         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
12620         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
12621         (dfs_init_vbase_pointers): Remove special-case new ABI code.
12622         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
12623         (init_vbase_pointers): Simplify.
12624         (expand_indirect_vtbls_init): Likewise.
12625
12626         * class.c (copy_virtuals): New function.
12627         (build_primary_table): Use it.
12628         (build_secondary_vtable): Likewise.
12629         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
12630         indicate that no vcall offset is required.
12631         (add_virtual_function): Likewise.
12632         (modify_all_vtables): Likewise.
12633         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
12634         (dfs_accumulate_vtbl_inits): Likewise.
12635         (build_vtbl_initializer): Make changes to handle construction
12636         vtables.
12637         (dfs_build_vcall_offset_vtbl_entries): Likewise.
12638         (build_rtti_vtbl_entries): Likewise.
12639         (build_vtable_entries): Handle a NULL vcall_index.
12640
12641 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
12642
12643         * decl2.c (lang_decode_option): Fix thinko.
12644
12645 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
12646
12647         * except.c (check_handlers): New fn.
12648         * cp-tree.h: Declare it.
12649         * semantics.c (finish_handler_sequence): Call it.
12650         (finish_function_handler_sequence): Likewise.
12651         (finish_handler_parms): Set TREE_TYPE on the handler.
12652         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
12653         * search.c (get_base_distance_recursive): If protect>1, ignore
12654         special access.
12655         (get_base_distance): Don't reduce watch_access.
12656
12657 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
12658
12659         * lex.c: #include diagnostic.h.
12660         (lang_init_options): Set default prefixing rules.
12661
12662         * lang-options.h: Add -fdiagnostics-show-location=.
12663
12664         * decl2.c: #include diagnostic.h.
12665         (lang_decode_option): Handle -fdiagnostics-show-location=.
12666
12667 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
12668
12669         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
12670         * vec.cc: Revert my 2000-05-07 change.
12671
12672 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
12673
12674         * class.c (check_field_decls): Complain about non-static data
12675         members with same name as class in class with constructor.
12676
12677 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
12678
12679         * decl.c (grokdeclarator): Allow non-static data members with
12680         same name as class.
12681
12682 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
12683
12684         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
12685         and pending_inline.filename.  Update prototypes.
12686         * decl.c (define_label): Constify filename parameter.
12687         * decl2.c (warn_if_unknown_interface): Constify local char *.
12688         * input.c Constify input_source.filename. Don't declare
12689         input_filename or lineno.  Constify filename parameter to feed_input.
12690         * lex.c (init_parse): Constify parameter and return value.
12691         (cp_pragma_interface, cp_pragma_implementation): Constify
12692         filename argument.
12693         (reinit_parse_for_method, reinit_parse_for_block,
12694         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
12695         Constify local char *.
12696         * pt.c: Don't declare lineno or input_filename.
12697         (print_template_context, tsubst_friend_function, tsubst_decl,
12698         tsubst, instantiate_decl): Constify local char *.
12699         * semantics.c (expand_body): Constify local char *.
12700         * tree.c (build_srcloc): Constify filename parameter.
12701         * typeck.c (c_expand_asm_operands): Constify filename
12702         parameter.
12703
12704 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
12705
12706         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
12707         offsetof expansion.
12708
12709 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
12710
12711         * inc/cxxabi.h:  Fix typos in comment.
12712         (__base_class_info::__offset): Use a static_cast.
12713
12714 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
12715
12716         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
12717         of std::size_t and std::ptrdiff_t respectively.
12718         * tinfo.cc: Likewise.
12719         * vec.cc: Likewise.
12720
12721 2000-05-06  Richard Henderson  <rth@cygnus.com>
12722
12723         * typeck.c (build_c_cast): Don't warn integer->pointer size
12724         mismatch for constants.
12725
12726 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
12727
12728         * rtti.c (ptmd_initializer): Set non-public, if class is
12729         incomplete.
12730
12731         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
12732         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
12733         __cxa_vec_delete): Likewise.
12734         * tinfo.cc (__dynamic_cast): Likewise.
12735         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
12736         __cxa_vec_delete): Likewise.
12737
12738 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
12739
12740         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
12741         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
12742         (lang_decl_flags): Add vcall_offset.
12743         (THUNK_VCALL_OFFSET): Use it.
12744         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
12745         * method.c (make_thunk): Create the lang_decl here, not in
12746         emit_thunk.
12747         (emit_thunk): Make generic thunks into ordinary functions once
12748         they have been fed to expand_body.
12749         * semantics.c (expand_body): Set current_function_is_thunk here.
12750
12751 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12752
12753         * class.c (update_vtable_entry_for_fn): Prototype.
12754
12755         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
12756         and `tmpl'.
12757
12758         * search.c (dfs_build_inheritance_graph_order): Prototype.
12759
12760 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
12761
12762         * cp-tree.h (special_function_kind): Add various kinds of
12763         destructors.
12764         (special_function_p): New function.
12765         * class.c (overrides): Don't let one kind of destructor override
12766         another.
12767         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
12768         whether or not to instantiate a template.
12769         * tree.c (special_function_p): Define.
12770
12771 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
12772
12773         * cp-tree.def (THUNK_DECL): Remove.
12774         * cp-tree.h (DECL_THUNK_P): New macro.
12775         (DECL_NON_THUNK_FUNCTION_P): Likewise.
12776         (DECL_EXTERN_C_FUNCTION_P): Likewise.
12777         (SET_DECL_THUNK_P): Likewise.
12778         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
12779         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
12780         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
12781         * decl.c (decls_match): Use DECL_EXTERN_C_P.
12782         (duplicate_decls): Likewise.
12783         (pushdecl): Likewise.  Adjust thunk handling.
12784         (grokfndecl): Use DECL_EXTERN_C_P.
12785         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
12786         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
12787         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
12788         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
12789         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
12790         DECL_NO_STATIC_CHAIN.
12791         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
12792         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
12793         * search.c (covariant_return_p): Remove THUNK_DECL handling.
12794         * ir.texi: Update.
12795
12796 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
12797
12798         * tree.c (walk_tree): Set lineno.
12799
12800 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
12801
12802         * exception.cc: Update license notice.
12803         * new.cc: Likewise.
12804         * new1.cc: Likewise.
12805         * new2.cc: Likewise.
12806         * tinfo.cc: Likewise.
12807         * tinfo2.cc: Likewise.
12808         * vec.cc: Likewise.
12809         * inc/cxxabi.h: Likewise.
12810         * inc/exception: Likewise.
12811         * inc/new: Likewise.
12812         * inc/new.h: Likewise.
12813         * inc/typeinfo: Likewise.
12814
12815 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
12816
12817         * tree.c (build_target_expr_with_type): If we already have a
12818         TARGET_EXPR, just return it.
12819
12820         * optimize.c (initialize_inlined_parameters): Don't generate an
12821         EXPR_STMT if we can just use DECL_INITIAL.
12822         * decl.c (emit_local_var): Only make the initialization a
12823         full-expression if stmts_are_full_exprs_p.
12824
12825 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
12826
12827         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
12828         macro.
12829         * call.c (standard_conversion): Use it.
12830         (direct_reference_binding): Likewise.
12831         (build_over_call): Likewise.
12832         (is_properly_derived_from): Likewise.
12833         (compare_ics): Likewise.
12834         * class.c (resolves_to_fixed_type_p): Likewise.
12835         * optimize.c (declare_return_variable): Likewise.
12836         * pt.c (is_specialization_of): Likewise.
12837         (unify): Likewise.
12838         * typeck.c (comp_target_parms): Likeiwse.
12839         (build_static_cast): Likewise.
12840         (build_reinterpret_cast): Likewise.
12841         (build_const_cast): Likewise.
12842         (comp_ptr_ttypes_real): Likewise.
12843         (comp_ptr_ttypes_const): Likewise.
12844         * typeck2.c (process_init_constructor): Likewise.
12845
12846 2000-04-30  Scott Snyder <snyder@fnal.gov>
12847
12848         * decl.c (finish_destructor_body): Use the base destructor when
12849         destroying virtual bases.
12850
12851 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
12852
12853         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
12854         STMT_EXPRs.
12855         * optimize.c (struct inline_data): Add target_exprs field.
12856         (declare_return_variable): When a function returns an aggregate,
12857         use the variable declared in the TARGET_EXPR as the remapped
12858         DECL_RESULT.
12859         (expand_call_inline): Update the pending target_exprs stack.
12860         (optimize_function): Initialize the stack.
12861
12862         * decl2.c (finish_file): Fix typo in comment.
12863
12864         * method.c (emit_thunk): Don't try to return a `void' value.
12865
12866         * optimize.c (initialize_inlined_parameters): If the parameter is
12867         addressable, we need to make a new VAR_DECL, even if the
12868         initializer is constant.
12869
12870 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
12871
12872         * decl.c (grok_op_properties): Add an extra check of argtypes.
12873
12874 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
12875
12876         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
12877         variables.
12878         (initialize_inlined_parameters): Try to avoid creating new
12879         VAR_DECLs.
12880
12881 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
12882
12883         * lex.c (my_get_run_time): Remove.
12884         (init_filename_times): Use get_run_time instead of my_get_run_time.
12885         (check_newline): Likewise.
12886         (dump_time_statistics): Likewise.
12887         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
12888         of computing elapsed time explicitly.
12889
12890 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
12891
12892         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
12893         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
12894         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
12895         before calling decl_constant_value.
12896         * class.c (check_bitfield_decl): Likewise.
12897         * cvt.c (ocp_convert): Likewise.
12898         (convert): Likewise.
12899         * decl.c (compute_array_index_type): Likewise.
12900         (build_enumerator): Likewise.
12901         * decl2.c (check_cp_case_value): Likewise.
12902         * pt.c (convert_nontype_argument): Likewise.
12903         (tsubst): Likewise.
12904         * typeck.c (decay_conversion): Likewise.
12905         (build_compound_expr): Likewise.
12906         (build_reinterpret_cast): Likewise.
12907         (build_c_cast): Likewise.
12908         (convert_for_assignment): Likewise.
12909
12910 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
12911
12912         * decl.c (finish_function): Don't play games with DECL_INLINE.
12913
12914 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
12915
12916         * ir.texi: Correct typo.
12917
12918 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12919
12920         * decl.c (grokdeclarator): Reject VLAs as members.
12921
12922 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
12923
12924         * call.c (standard_conversion): Accept conversion between
12925         COMPLEX_TYPEs.
12926
12927         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
12928
12929 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
12930
12931         * decl2.c (finish_file): Remove double setup for accounting
12932         compile time.
12933
12934 2000-04-24  Robert Lipe <robertlipe@usa.net>
12935
12936         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
12937
12938 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
12939
12940         * new.cc (set_new_handler): Needs to be in std::.
12941
12942 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
12943
12944         * cp-tree.h (lang_decl): Remove pretty_function_p.
12945         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
12946         language-specific node.
12947         * decl.c (cp_make_fname_decl): Use build_decl, not
12948         build_lang_decl, to build the variables.
12949         (grokvardecl): Don't call build_lang_decl for local variables in
12950         templates.
12951         (grokdeclarator): Don't call build_lang_decl for local type
12952         declarations in templates.
12953         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
12954         zero'd memory, rather than calling memset.
12955         * pt.c: Include hashtab.h.
12956         (local_specializations): New variable.
12957         (retrieve_local_specialization): Use it.
12958         (register_local_specialization): Likewise.
12959         (tsubst_decl): Don't assume local variables have
12960         DECL_LANG_SPECIFIC.
12961         (instantiate_decl): Set up local_specializations.
12962         * Makefile.in (HTAB_H): New variable.
12963
12964 2000-04-23  Richard Henderson  <rth@cygnus.com>
12965
12966         * typeck.c (c_expand_asm_operands): Restore the original
12967         contents of the output list.
12968
12969 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
12970
12971         * ir.texi:  Document complex number representation.
12972
12973 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12974
12975         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
12976         (target_incomplete_p): New function.
12977         (tinfo_base_init): Create comdat NTBS name variable.
12978         (ptr_initializer): Add non_public parameter. Calculate it.
12979         (ptmd_initializer): Likewise.
12980         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
12981         (create_real_tinfo_var): Add non_public parameter. Use it.
12982         Push proxy into global namespace.
12983         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
12984         New enumeration.
12985         * inc/typeinfo (type_info::before, type_info::operator==):
12986         Compare __name addresses.
12987
12988         * tinfo2.cc: Remove new-abi builtins comment.
12989
12990 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
12991
12992         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
12993
12994         * call.c (joust): Exit early if we get the same function, too.
12995
12996         * decl2.c (key_method): Return NULL_TREE for template classes.
12997         (import_export_class): Don't need to check for template classes.
12998
12999 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
13000
13001         * lex.c: Remove references to cccp.c.
13002
13003 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
13004
13005         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
13006         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
13007         (DECL_DESTRUCTOR_P): Use destructor_attr.
13008         (DECL_CONST_MEMFUNC_P): Reimplement.
13009         (DECL_VOLATILE_MEMFUNC_P): Remove.
13010         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
13011         (overrides): Use DECL_DESTRUCTOR_P.
13012         (check_for_override): Likewise.
13013         * decl.c (start_function): Likewise.
13014         * decl2.c (grokfclassfn): Likewise.
13015         (check_classfn): Likewise.
13016         (grok_function_init): Likewise.
13017
13018 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
13019
13020         * decl2.c (grokfield): Issue error on illegal data member
13021         declaration.
13022
13023 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
13024
13025         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
13026
13027 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
13028
13029         * class.c (build_vtable_entry): Don't build thunks for type-info
13030         functions.
13031
13032 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
13033
13034         * decl.c (decls_match): Allow a redeclaration of a builtin to
13035         specify args while the builtin did not.
13036
13037 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
13038
13039         * cp-tree.def (THUNK_DECL): Add to documentation.
13040         * cp-tree.h (flag_huge_objects): Declare.
13041         * class.c (modify_vtable_entry): Tidy.
13042         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
13043         Calculate delta appropriately for the new ABI.
13044         (dfs_modify_vtables): Use it.
13045         (modify_all_vtables): Fix thinko in code to add overriding copies
13046         of functions to primary vtables.
13047         (build_clone): Fix typo in comment.
13048         (clone_function_decl): Correct order of destructors in vtable.
13049         (build_vbase_offset_vtbl_entries): Adjust comment.
13050         (dfs_vcall_offset_queue_p): Remove.
13051         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
13052         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
13053         (build_vtable_entry): Correct check for pure virtual functions.
13054         Don't declare flag_huge_objects.
13055         * decl.c (flag_huge_objects): Remove declaration.
13056         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
13057         Use int_size_in_bytes.
13058         (emit_thunk): Handle vcall offset thunks.
13059
13060 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13061
13062         * decl2.c (parse_time, varconst_time): Delete declarations.
13063         (finish_file): Delete LINENO declaration.
13064         START_TIME and THIS_TIME now long.
13065
13066 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
13067
13068         * class.c (build_base_field): Reformat comment.
13069
13070         * inc/cxxabi.h (stddef.h): Comment inclusion.
13071         (__base_class_info::__offset): Comment shift.
13072
13073 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
13074
13075         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
13076         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
13077         (cp_push_exception_identifier): New macro.
13078         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
13079         (DECL_BASE_DESTRUCTOR_P): Likewise.
13080         (DECL_DELETING_DESTRUCTOR_P): Likewise.
13081         (get_vtbl_decl_for_binfo): Fix formatting.
13082         (in_charge_arg_for_name): New macro.
13083         (maybe_build_cleanup_and_delete): Remove declaration.
13084         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
13085         (in_charge_arg_for_name): New function.
13086         (build_new_method_call): Use it.  Handle cloned destructors.
13087         (build_clone): Don't make the base constructor virtual.
13088         Automatically defer generated functions.
13089         (clone_function_decl): Handle destructors, too.
13090         (clone_constructors_and_destructors): Likewise.
13091         (create_vtable_ptr): Don't create a vtable entry for a cloned
13092         function.
13093         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
13094         (initialize_predefined_identifiers): Update appropriately.
13095         (finish_destructor_body): Simplify.
13096         (maybe_build_cleanup_and_delete): Remove.
13097         * except.c (expand_throw): Handle new-ABI destructors.
13098         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
13099         (build_dtor_call): New function.
13100         (build_delete): Use it.  Simplify.
13101         * optimize.c (maybe_clone_body): Handle destructors.
13102         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
13103
13104         * exception.cc (cleanup_fn): New typedef.
13105         (CALL_CLEANUP): New macro.
13106         (cp_eh_info): Use them.
13107         (__cp_push_exception): Likewise.
13108         (__cp_pop_exception): Likewise.
13109
13110 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
13111
13112         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
13113         (complete_dtor_identifier): New macro.
13114         (CLASSTYPE_FIRST_CONVERSION): Remove.
13115         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
13116         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
13117         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
13118         (CLASSTYPE_CONSTRUCTORS): Likewise.
13119         (CLASSTYPE_DESTRUCTORS): Likewise.
13120         (lang_decl): Add cloned_function.
13121         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
13122         (DECL_BASE_CONSTRUCTOR_P): Likewise.
13123         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
13124         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
13125         (DECL_CLONED_FUNCTION_P): Likewise.
13126         (DECL_CLONED_FUNCTION): Likewise.
13127         (clone_function_decl): Declare.
13128         (maybe_clone_body): Likewise.
13129         * call.c (build_user_type_conversion_1): Call complete object
13130         constructors in the new ABI.
13131         (build_new_method_call): Don't add in-charge parameters under the
13132         new ABI.
13133         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
13134         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
13135         CLASSTYPE_DESTRUCTOR_SLOT.
13136         (build_clone): New function.
13137         (clone_function_decl): Likewise.
13138         (clone_constructors_and_destructors): Likewise.
13139         (check_bases_and_members): Use it.
13140         * decl.c (iniitialize_predefined_identifiers): Initialize
13141         complete_dtor_identifier.
13142         (finish_function): Don't add extra code to a clone.
13143         (lang_mark_tree): Mark cloned_function.
13144         * decl2.c (mark_used): Don't bother trying to instantiate things
13145         we synthesized.
13146         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
13147         * method.c (set_mangled_name_for_decl): Don't treat clones as
13148         constructors.
13149         (synthesize_method): Sythesize cloned functions, not the clones.
13150         * optimize.c (inline_data): Update comment on ret_label.
13151         (remap_block): Don't assume DECL_INITIAL exists.
13152         (copy_body_r): Allow ret_label to be NULL.
13153         (maybe_clone_body): Define.
13154         * pt.c (tsubst_decl): Handle clones.
13155         (instantiate_clone): New function.
13156         (instantiate_template): Use it.
13157         (set_mangled_name_for_template_decl): Don't treat clones as
13158         constructors.
13159         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
13160         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
13161         * semantics.c (expand_body): Clone function bodies as necessary.
13162
13163         * optimize.c (remap_decl): Avoid sharing structure for arrays
13164         whose size is only known at run-time.
13165         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
13166
13167         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
13168         to has_in_charge_parm_p.
13169         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
13170         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
13171         (DECL_COPY_CONSTRUCTOR_P): New macro.
13172         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
13173         (build_user_type_conversion_1): Likewise.
13174         (convert_like_real): Likewise.
13175         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
13176         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
13177         (copy_args_p): Likewise.
13178         (grok_ctor_properties): Likewise.
13179         (start_function): Likewise.
13180         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
13181         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
13182         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
13183         * method.c (do_build_copy_constructor): Use
13184         DECL_HAS_IN_CHARGE_PARM_P.
13185         (synthesize_method): Likewise.
13186         * pt.c (instantiate_template): Remove goto.
13187         * tree.c (build_cplus_method_type): Remove mention of obstacks in
13188         comment.
13189
13190         * cp-tre.h (finish_function): Change prototype.
13191         * decl.c (end_cleanup_fn): Adjust caller.
13192         (finish_function): Take only one parameter.
13193         * decl2.c (finish_objects): Adjust caller.
13194         (finish_static_storage_duration_function): Likewise.
13195         * method.c (emit_thunk): Likewise.
13196         * parse.y: Likewise.
13197         * parse.c: Regenerated.
13198         * pt.c (instantiate_decl): Likewise.
13199         * rtti.c (synthesize_tinfo_fn): Likewise.
13200         * semantics.c (expand_body): Likewise.
13201
13202         * cp-tree.h (copy_decl): New function.
13203         * class.c (finish_struct_1): Use it.
13204         * lex.c (copy_decl): Define it.
13205         * pt.c (tsubst_decl): Likewise.
13206         * tree.c (copy_template_template_parm): Likewise.
13207
13208         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
13209         has_nonpublic_assign_ref.
13210         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
13211         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
13212         * class.c (finish_struct_methods): Don't set
13213         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
13214         (interface_only): Don't declare.
13215         (interface_unknown): Likewise.
13216
13217 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13218
13219         * tree.h (HAVE_TEMPLATES): Remove definition.
13220         * lang-options.h (-fthis-is-variable): Remove documentation.
13221
13222 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
13223
13224         * class.c (instantiate_type): Handle object-relative template-id.
13225
13226         * semantics.c (finish_expr_stmt): Call convert_to_void here.
13227         * decl.c (cplus_expand_expr_stmt): Not here.
13228
13229         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
13230         Initialize exprtype earlier.
13231
13232         * parse.y (fn.def1): Check for defining types in return types.
13233
13234         * decl.c (check_tag_decl): Notice extra fundamental types.
13235         Diagnose empty decls in classes, too.
13236
13237         * decl.c (grokdeclarator): Don't override an anonymous name if no
13238         declarator was given.
13239
13240         * cvt.c (convert_to_void): Call resolve_offset_ref.
13241
13242         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
13243
13244         * decl2.c (decl_namespace): Handle getting a type.
13245
13246         * typeck.c (build_c_cast): Re-enable warning for cast between
13247         pointer and integer of different size.
13248
13249 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
13250
13251         * inc/cxxabi.h (__pointer_type_info): Add restrict and
13252         incomplete flags.
13253         (__pointer_type_info::__pointer_catch): New virtual function.
13254         (__pointer_to_member_type_info): Derive from
13255         __pointer_type_info. Adjust.
13256         (__pointer_to_member_type_info::__do_catch): Remove.
13257         (__pointer_to_member_type_info::__is_pointer_p): Declare.
13258         (__pointer_to_member_type_info::__pointer_catch): Declare.
13259         * rtti.c (qualifier_flags): Add restrict flag.
13260         (ptmd_initializer): Reorder members.
13261         (create_tinfo_types): Expand comments. Reorder
13262         ptmd_desc_type_node members.
13263         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
13264         Implement.
13265         (__pointer_type_info::__do_catch): Move specific code into
13266         __pointer_catch. Call it.
13267         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
13268         specific catch checking. Fix void conversion check.
13269         (__pointer_to_member_type_info::__do_catch): Remove.
13270         (__pointer_to_member_type_info::__pointer_catch): Implement.
13271
13272 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13273
13274         * lex.c (init_parse): Remove traces of classof and headof.
13275         * decl2.c (flag_operator_names): Default to 1.
13276         (lang_decode_option): Do not set it for -ansi.
13277
13278 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
13279
13280         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
13281         (DECL_MAIN_VARIANT): Remove.
13282         * decl.c (duplicate_decls): Don't set it.
13283         (start_function): Likewise.
13284         (lang_mark_tree): Don't mark it.
13285         * decl2.c (defer_fn): Don't use it.
13286         * lex.c (retrofit_lang_decl): Don't set it.
13287         * pt.c (tsubst_decl): Likewise.
13288         * ptree.c (print_lang_decl): Don't print it.
13289         * typeck.c (mark_addressable): Don't use it.
13290
13291 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
13292
13293         * vec.cc: Include <new> and <exception>.
13294         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
13295         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
13296         terminate.
13297         (__cxa_vec_delete): Catch dtor exceptions.
13298
13299 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
13300
13301         Prepend __ to implementation defined names.
13302         * inc/typeinfo (type_info): Rename _name to __name.
13303         (type_info::type_info): Rename parameter.
13304         (type_info::operator==, type_info::operator!=,
13305         type_info::before): Likewise.
13306         (type_info::is_pointer_p, type_info::is_function_p,
13307         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
13308         parameters.
13309         * inc/cxxabi.h
13310         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
13311         (__pointer_type_info::__pointer_type_info): Likewise.
13312         (__pointer_type_info::is_pointer_p,
13313         __pointer_type_info::do_catch): Prepend __. Rename parameters.
13314         (__array_type_info::__array_type_info): Rename parameters.
13315         (__function_type_info::__function_type_info): Likewise.
13316         (__function_type_info::is_function_p): Prepend __.
13317         (__enum_type_info::__enum_type_info): Rename parameters.
13318         (__pointer_to_member_type_info::__pointer_to_member_type_info):
13319         Likewise.
13320         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
13321         parameters.
13322         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
13323         (__class_type_info::__class_type_info): Rename parameters.
13324         (__class_type_info::sub_kind): Prepend __. Adjust member names.
13325         (__class_type_info::upcast_result,
13326         __class_type_info::dyncast_result): Prepend __. Move definition
13327         into tinfo.cc.
13328         (__class_type_info::do_upcast, __class_type_info::do_catch,
13329         __class_type_info::find_public_src,
13330         __class_type_info::do_dyncast,
13331         __class_type_info::do_find_public_src): Prepend __. Rename
13332         parameters.
13333         (__si_class_type_info::__si_class_type_info): Rename parameters.
13334         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
13335         __si_class_type_info::do_find_public_src): Prepent __. Rename
13336         parameters.
13337         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
13338         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
13339         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
13340         parameters.
13341         (__dynamic_cast): Rename parameters.
13342         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
13343         type_info::do_catch, type_info::do_upcast): Prepend __.
13344         (contained_p, public_p, virtual_p, contained_public_p,
13345         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
13346         (__class_type_info::do_catch,
13347         __class_type_info::do_upcast): Prepend __. Adjust.
13348         (__class_type_info::__upcast_result,
13349         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
13350         Adjust.
13351         (__class_type_info::find_public_src): Prepend __. Adjust.
13352         (__class_type_info::do_find_public_src,
13353         __si_class_type_info::do_find_public_src,
13354         __vmi_class_type_info::do_find_public_src): Likewise.
13355         (__class_type_info::do_dyncast,
13356         __si_class_type_info::do_dyncast,
13357         __vmi_class_type_info::do_dyncast): Likewise.
13358         (__class_type_info::do_upcast,
13359         __si_class_type_info::do_upcast,
13360         __vmi_class_type_info::do_upcast): Likewise.
13361         (__dynamic_cast): Adjust.
13362         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
13363         (__function_type_info::is_function_p): Likewise.
13364         (__pointer_type_info::do_catch): Likewise. Adjust.
13365         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
13366         (__throw_type_match_rtti_2): Adjust.
13367         (__is_pointer): Adjust.
13368
13369 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
13370
13371         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
13372         (complete_ctor_identifier): New macro.
13373         (special_function_kind): Add sfk_copy_constructor and
13374         sfk_assignment_operator.
13375         (LOOKUP_HAS_IN_CHARGE): Remove.
13376         (cons_up_default_function): Rename to ...
13377         (implicitly_declare_fn): ... this.
13378         * call.c (build_new_method_call): Add in-charge parameters for
13379         constructors here.
13380         * class.c (add_implicitly_declared_members): Change parameter name
13381         from cant_have_assignment to cant_have_const_assignment.
13382         Replace calls to cons_up_default_function to implicitly_declare_fn.
13383         * cvt.c (ocp_convert): Use complete_ctor_identifier.
13384         * decl.c (initialize_predefined_identifiers): Initialize it.
13385         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
13386         complex expression.
13387         * init.c (expand_default_init): Don't calculate the in-charge
13388         parameter here.
13389         (build_new_1): Likewise.
13390         * lex.c (cons_up_default_function): Move to method.c.
13391         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
13392         (implicitly_declare_fn): New function.
13393         * typeck.c (build_static_cast): Use complete_ctor_identifier.
13394         (build_modify_expr): Likewise.
13395         * typeck2.c (build_functional_cast): Likewise.
13396
13397         Under the new ABI, constructors don't return `this'.
13398         * cp-tree.h (warn_reorder): Declare.
13399         (special_function_kind): New enum.
13400         (global_base_init_list): Remove declaration.
13401         (emit_base_init): Don't return a value.
13402         (check_base_init): Don't declare.
13403         (is_aggr_typedef): Likewise.
13404         * decl.c (check_special_function_return_type): New function.
13405         (return_types): Remove.
13406         (grokdeclarator): Use check_special_function_return_type.
13407         (start_function): Don't initialize ctor_label under the new ABI.
13408         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
13409         * init.c (begin_init_stmts): Move to top of file.
13410         (finish_init_stmts): Likewise.
13411         (warn_reorder): Don't declare.
13412         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
13413         value.
13414         (check_base_init): Remove.
13415         (is_aggr_typedef): Likewise.
13416         (build_new_1): Don't use the return value of a constructor.
13417         * semantics.c (setup_vtbl_ptr): Don't use the return value
13418         of emit_base_init.
13419         * typeck.c (check_return_expr): Don't magically convert return
13420         statements into `return this' in constructors under the new ABI.
13421
13422         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
13423         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
13424         (base_ctor_identifier): New macro.
13425         (base_dtor_identifier): Likewise.
13426         (deleting_dtor_identifier): Likewise.
13427         * decl.c: Don't include obstack.h.
13428         (obstack_chunk_alloc): Don't define.
13429         (obstack_chunk_free): Likewise.
13430         (struct predefined_identifier): New type.
13431         (initialize_predefined_identifiers): New function.
13432         (init_decl_processing): Use it.
13433         (debug_temp_inits): Remove.
13434         (start_method): Don't call preserve_data.
13435         (hack_incomplete_structures): Update comment.
13436         * init.c (init_init_processing): Don't initialize
13437         nelts_identifier.
13438         (build_offset_rf): Remove dead code.
13439         (build_delete): Use CLASSTYPE_N_BASECLASSES.
13440         * search.c (init_search_processing): Don't initialize
13441         vptr_identifier.
13442
13443 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13444
13445         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
13446         some sign_compare warnings.
13447
13448 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
13449
13450         Rename abi::__vmi_class_type_info members.
13451         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
13452         base_list, detail_masks members to vmi_flags, vmi_base_count,
13453         vmi_bases and vmi_flags_masks respectively.
13454         (__vmi_class_type_info::vmi_flags_masks): Rename
13455         details_unknown_mask to flags_unknown_mask.
13456         * tinfo.cc (__class_type_info::do_upcast): Adjust.
13457         (__vmi_class_type_info::do_find_public_src): Adjust.
13458         (__vmi_class_type_info::do_dyncast): Adjust.
13459         (__vmi_class_type_info::do_upcast): Adjust.
13460
13461 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
13462
13463         * tinfo.cc (convert_to_base): New function.
13464         (get_vbase_offset): Remove. Move into convert_to_base.
13465         (__vmi_class_type_info::do_find_public_src): Adjust.
13466         (__vmi_class_type_info::do_dyncast): Adjust.
13467         (__vmi_class_type_info::do_upcast): Adjust.
13468
13469 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
13470
13471         * tinfo.cc (operator=): Use __builtin_strcmp.
13472         * tinfo2.cc (before): Likewise.
13473
13474 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
13475
13476         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
13477         (DECL_SAVED_INLINE): Rename to ...
13478         (DECL_DEFERRED_FN): ... this.
13479         (in_function_p): Remove declaration.
13480         (mark_inline_for_output): Rename to ...
13481         (defer_fn): ... this.
13482         * decl.c (finish_function): Adjust call to mark_inline_for_output.
13483         (in_function_p): Remove definition.
13484         * decl2.c (saved_inlines): Rename to ...
13485         (deferred_fns): ... this.
13486         (saved_inlines_used): Rename to ...
13487         (deferred_fns_used): ... this.
13488         (mark_inline_for_output): Rename to ...
13489         (defer_fn): ... this.
13490         (finish_file): Adjust accordingly.
13491         (init_decl2): Likewise.
13492         * lex.c (cons_up_default_function): Likewise.
13493         * pt.c (mark_decl_instantiated): Likewise.
13494         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
13495         circumstances.
13496         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
13497         * semantics.c (expand_body): Defer more functions.
13498
13499 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
13500
13501         * vec.cc: New file.
13502         * Make-lang.in (CXX_LIB2FUNCS): Add it.
13503         (vec.o): Build it.
13504         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13505         __cxa_vec_delete): Declare.
13506
13507 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
13508
13509         * rtti.c (dfs_class_hint_mark): New static function.
13510         (dfs_class_hint_unmark): New static function.
13511         (class_hint_flags): Use them.
13512
13513 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
13514
13515         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
13516
13517 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
13518
13519         * cp-tree.h (instantiate_decl): Change prototype.
13520         * decl2.c (mark_used): Adjust call.
13521         * optimize.c (inlinable_function_p): Adjust handling of templates.
13522         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
13523         (do_type_instantiation): Likewise.
13524         (instantiate_decl): Defer more templates.
13525         (instantiate_pending_templates): Adjust logic to handle inline
13526         friend functions.
13527
13528         * Makefile.in (GGC_H): New variable.  Use it throughout in place
13529         of ggc.h.
13530
13531         * call.c: Don't include obstack.h.  Include ggc.h.
13532         (obstack_chunk_alloc): Don't define.
13533         (obstack_chunk_free): Likewise.
13534         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
13535         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
13536         (pop_switch): Free it.
13537
13538         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
13539
13540         * dump.c (dequeue_and_dump): Don't try to print the bit_position
13541         if we don't have a DECL_FIELD_OFFSET.
13542
13543 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
13544
13545         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
13546         special_function_p.
13547
13548 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13549
13550         * cfns.gperf (hash, libc_name_p): Prototype.
13551
13552         * rtti.c (build_dynamic_cast_1): Constification.
13553
13554         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
13555
13556         * semantics.c (deferred_type_access_control): Prototype.
13557
13558 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
13559
13560         Correct many new ABI issues regarding vbase and vcall offset
13561         layout.
13562         * cp-tree.h (BINFO_VTABLE): Document.
13563         (struct lang_type): Tweak formatting.
13564         (BINFO_PRIMARY_BINFO): Add to documentation.
13565         (CLASSTYPE_VSIZE): Fix typo in comment.
13566         (CLASSTYPE_VBASECLASSES): Update documentation.
13567         (BINFO_VBASE_MARKED): Remove.
13568         (SET_BINFO_VBASE_MARKED): Likewise.
13569         (CLEAR_BINFO_VBASE_MARKED): Likewise.
13570         (BINFO_FIELDS_MARKED): Remove.
13571         (SET_BINFO_FIELDS_MARKED): Likewise.
13572         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
13573         (enum access_kind): New enumeration.
13574         (num_extra_vtbl_entries): Remove declaration.
13575         (size_extra_vtbl_entries): Likewise.
13576         (get_vtbl_decl_for_binfo): New function.
13577         (dfs_vbase_unmark): Remove declaration.
13578         (mark_primary_bases): Likewise.
13579         * class.c (SAME_FN): Remove.
13580         (struct vcall_offset_data_s): Move definition.
13581         (build_vbase_pointer): Use `build', not `build_binary_op', to
13582         access the vbase pointer under the new ABI.
13583         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
13584         (build_primary_vtable): Likewise.
13585         (dfs_mark_primary_bases): Move here from search.c.
13586         (mark_primary_bases): Likewise.
13587         (determine_primary_bases): Under the new ABI, don't make a base
13588         class a primary base just because we don't yet have any virtual
13589         functions.
13590         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
13591         (num_vfun_entries): Remove.
13592         (dfs_count_virtuals): Likewise.
13593         (num_extra_vtbl_entries): Likewise.
13594         (size_extra_vtbl_entries): Likewise.
13595         (layout_virtual_bases): Iterate in inheritance graph order under
13596         the new ABI.
13597         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
13598         indicate that a vfield is present.
13599         (init_class_processing): Initialize access_public_node, etc., from
13600         ak_public, etc.
13601         (get_vtbl_decl_for_binfo): New function.
13602         (dump_class_hierarchy_r): Likewise.
13603         (dump_class_hierarchy): Use it.
13604         (finish_vtbls): Build the vtbls in inheritance graph order.
13605         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
13606         (initialize_vtable): Use get_vtbl_decl_for_binfo.
13607         (accumulate_vtbl_inits): Add comments explaining why a pre-order
13608         walk is required.
13609         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
13610         where the vptr points, even for primary vtables.
13611         (build_vtbl_initializer): Adjust handling of vbase and vcall
13612         offsets.
13613         (build_vcall_and_vbase_vtable_entries): New function.
13614         (dfs_build_vbase_offset_vtbl_entries): Remove.
13615         (build_vbase_offset_vtbl_entries): Reimplement.
13616         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
13617         were already handled in a primary base class vtable.
13618         (build_vcall_offset_vtbl_entries): Adjust.
13619         (build_rtti_vtbl_entries): Adjust.
13620         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
13621         * init.c (expand_virtual_init): Simplify.
13622         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
13623         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
13624         * search.c (BINFO_ACCESS): New macro.
13625         (SET_BINFO_ACCESS): Likewise.
13626         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
13627         (access_in_type): Likewise.
13628         (dfs_accessible_p): Likewise.
13629         (protected_accessible_p): Likewise.
13630         (lookup_fnfields_1): Adjust documentation.
13631         (dfs_mark_primary_bases): Move to class.c
13632         (mark_primary_bases): Likewise.
13633         (dfs_vbase_unmark): Remove.
13634         (virtual_context): Use BINFO_FOR_VBASE.
13635         (dfs_get_vbase_types): Simplify.
13636         (dfs_build_inheritance_graph_order): New function.
13637         (get_vbase_types): Use it.
13638         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
13639
13640         * tinfo.cc (get_vbase_offset): New function.
13641         (__vmi_class_type_info::do_find_public_src): Use it.
13642         (__vmi_class_type_info::do_dyncast): Likewise.
13643         (__vmi_class_type_info::do_upcast): Likewise.
13644
13645 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
13646
13647         * lang-specs.h: Pass -fno-show-column to the preprocessor.
13648
13649 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
13650
13651         * rtti.c (class_hint_flags): Rename flags.
13652         (class_initializer): Remove flags.
13653         (synthesize_tinfo_var): Combine offset and flags. Add flags
13654         for __vmi_class_type_info.
13655         (create_tinfo_types): Remove flags from __class_type_info and
13656         __si_class_type_info. Merge flags and offset from
13657         base_class_type_info.
13658         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
13659         (__base_class_info::is_virtual_p): Adjust.
13660         (__base_class_info::is_public_p): Adjust.
13661         (__base_class_info::offset): New accessor.
13662         (__class_type_info::details): Remove member.
13663         (__class_type_info::__class_type_info): Lose details.
13664         (__class_type_info::detail_masks): Remove.
13665         (__si_class_type_info::__si_class_type_info): Lose details.
13666         (__vmi_class_type_info::details): New member.
13667         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
13668         (__vmi_class_type_info::detail_masks): New member.
13669         * tinfo.cc (__class_type_info::do_upcast): Initialize result
13670         with unknown_details_mask.
13671         (__vmi_class_type_info::do_find_public_src): Adjust
13672         (__vmi_class_type_info::do_dyncast): Adjust.
13673         (__vmi_class_type_info::do_upcast): Set result details, if
13674         needed. Adjust.
13675         (__dynamic_cast): Temporarily #if out optimization.
13676
13677 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
13678
13679         * rtti.c (get_tinfo_decl): Mark used.
13680         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
13681         mark as dealt with, if we output it.
13682
13683 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
13684
13685         * class.c: Reorganize to put virtual function table initialization
13686         machinery at the end of the file.
13687
13688 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
13689
13690         * class.c (finish_struct): Use bitsize_zero_node.
13691         * pt.c (instantiate_class_template): Likewise.
13692
13693 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
13694
13695         Put RTTI entries at negative offsets in new ABI.
13696         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
13697         vbase offset at index -3, not -1.
13698         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
13699         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
13700         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
13701         (build_rtti_vtbl_entries): New function.
13702         (set_rtti_entry): Remove.
13703         (build_primary_vtable): Don't use it.
13704         (build_secondary_vtable): Likewise.
13705         (start_vtable): Remove.
13706         (first_vfun_index): New function.
13707         (set_vindex): Likewise.
13708         (add_virtual_function): Don't call start_vtable.  Do call
13709         set_vindex.
13710         (set_primary_base): Rename parameter.
13711         (determine_primary_base): Likewise.
13712         (num_vfun_entries): Don't use skip_rtti_stuff.
13713         (num_extra_vtbl_entries): Include RTTI information.
13714         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
13715         (skip_rtti_stuff): Remove.
13716         (dfs_modify_vtables): Don't use it.
13717         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
13718         (layout_nonempty_base_or_field): Update size handling.
13719         (create_vtable_ptr): Tweak.
13720         (layout_class_type): Adjust parameter names.
13721         (finish_struct_1): Simplify.
13722         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
13723         (skip_rtti_stuff): Remove.
13724         (first_vfun_index): New function.
13725         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
13726         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
13727         (marked_vtable_pathp): Declare.
13728         (unmarked_vtable_pathp): Likewise.
13729         * error.c (dump_expr): Use first_vfun_index to calculate vtable
13730         offsets.
13731         * rtti.c (build_headof): Look for RTTI at negative offsets.
13732         (get_tinfo_decl_dynamic): Likewise.
13733         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
13734         here.
13735         (create_pseudo_type_info): Do it here instead.  Adjust so that
13736         vptr points at first virtual function.
13737         * search.c (marked_vtable_pathp): Make it global.
13738         (unmarked_vtable_pathp): Likewise.
13739         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
13740         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
13741         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
13742         (get_pure_virtuals): Likewise.
13743         (expand_upcast_fixups): Likewise.
13744         * tree.c (debug_binfo): Likewise.
13745         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
13746         negative offset.
13747
13748 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13749
13750         * class.c (check_field_decl): Fix typo.
13751         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
13752         (check_methods): Likewise.
13753         (check_field_decls): Likewise.
13754         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
13755         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
13756         Use DECL_RESULT_FLD, not DECL_RESULT.
13757         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
13758         * lex.c (identifier_type): Likewise.
13759         * pt.c (determine_specialization, lookup_template_class): Likewise.
13760         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
13761         (resolve_overloaded_unification, more_specialized): Likewise.
13762         * semantics.c (finish_member_declaration): Likewise.
13763         * typeck.c (build_x_function_call): Likewise.
13764
13765 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
13766
13767         * class.c (layout_empty_base): Handle empty bases with non-byte
13768         alignment.
13769         (build_base_field): Likewise.
13770         (layout_virtual_bases): Likewise.
13771
13772         * class.c (finish_struct_1): Fix typo in this change:
13773
13774         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13775
13776 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
13777
13778         * decl.c (grokdeclarator): Count partial specializations when
13779         keeping track of how many template classes have been seen.
13780
13781         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
13782
13783 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13784
13785         * class.c (build_vbase_pointer_fields): layout_field now place_field.
13786         (get_vfield_offset): Use byte_position.
13787         (set_rtti_entry): Set OFFSET to ssizetype zero.
13788         (get_binfo_offset_as_int): Deleted.
13789         (dfs_record_base_offsets): Use tree_low_cst.
13790         (dfs_search_base_offsets): Likewise.
13791         (layout_nonempty_base_or_field): Reflect changes in RLI format
13792         and call byte_position.
13793         (layout_empty_base): Convert offset to ssizetype.
13794         (build_base_field): use rli_size_unit_so_far.
13795         (dfs_propagate_binfo_offsets): Do computation in proper type.
13796         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
13797         (layout_class_type): Reflect changes in RLI names and fields.
13798         (finish_struct_1): Set DECL_FIELD_OFFSET.
13799         * dump.c (dequeue_and_dump): Call bit_position.
13800         * expr.c (cplus_expand_constant): Use byte_position.
13801         * rtti.c (expand_class_desc): Use bitsize_one_node.
13802         * typeck.c (build_component_addr): Use byte_position and don't
13803         special case for zero offset.
13804
13805 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
13806
13807         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
13808
13809         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
13810         tinfo object.
13811         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
13812         vtable.
13813
13814 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13815
13816         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
13817         DECL_P macros.
13818         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
13819         make_typename_type, check_initializer, cp_finish_decl,
13820         xref_tag): Likewise.
13821         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
13822         decl_namespace, arg_assoc_template_arg, arg_assoc,
13823         validate_nonmember_using_decl, do_class_using_decl): Likewise.
13824         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
13825         args_to_string): Likewise.
13826         * friend.c (is_friend): Likewise.
13827         * lex.c (note_got_semicolon, note_list_got_semicolon,
13828         is_global): Likewise.
13829         * method.c (build_overload_nested_name, build_overload_value,
13830         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
13831         * parse.y (typename_sub, typename_sub1): Likewise.
13832         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
13833         process_partial_specialization, convert_template_argument,
13834         template_args_equal, add_pending_template, lookup_template_class,
13835         for_each_template_parm_r, maybe_fold_nontype_arg,
13836         tsubst, instantiate_template, type_unification_real, unify,
13837         instantiate_pending_templates, set_mangled_name_for_template_decl):
13838         Likewise.
13839         * repo.c (repo_get_id, repo_template_used): Likewise.
13840         * search.c (lookup_field_1): Likewise.
13841         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
13842         * xref.c (classname): Likewise.
13843
13844 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
13845
13846         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
13847         (CANONICAL_BINFO): New macro.
13848         (BINFO_NEW_VTABLE_MARKED): Use it.
13849         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
13850         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
13851         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
13852         not TREE_TYPE.
13853         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13854         (build_secondary_vtable): Likewise.
13855         (dfs_finish_vtbls): Likewise.
13856         (dfs_accumulate_vtbl_inits): Likewise.
13857         (accumulate_vtbl_inits): New function.
13858         (finish_vtbls): Make sure that virtual bases come after
13859         non-virtual bases in the vtable group.
13860         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
13861         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13862         * search.c (struct vbase_info): Move definition.
13863         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13864         (unmarked_new_vtable_p): Likewise.
13865         (dfs_mark_vtable_path): Remove.
13866         (dfs_mark_new_vtable): Remove.
13867         (dfs_unmark_new_vtable): Likewise.
13868         (dfs_clear_search_slot): Likewise.
13869         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
13870         (dfs_clear_vbase_slots): Likewise.
13871         (init_vbase_pointers): LIkewise.
13872
13873 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
13874
13875         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
13876         SIZETYPE to a non-SIZETYPE.
13877
13878 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
13879
13880         * class.c (layout_virtual_bases): Adjust names in conditionally
13881         compiled code.
13882
13883         * class.c (record_base_offsets): New function.
13884         (layout_conflict_p): Likewise.
13885         (layout_nonempty_base_or_field): Use it.
13886         (layout_empty_base): New function.
13887         (build_base_field): Use it.
13888         (build_base_fields): Update comment.
13889         (layout_virtual_bases): Fold in a little code form
13890         layout_basetypes.  Use layout_empty_base.
13891         (layout_basetypes): Remove.
13892         (end_of_class): New function.
13893         (layout_class_type): Use it.  Adjust.
13894
13895         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
13896         (fntype_p): Remove.
13897         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
13898         comment.
13899         (dfs_skip_nonprimary_vbases_markedp): Likewise.
13900         * typeck.c (fntype_p): Remove.
13901
13902         * cp-tree.h (TI_SPEC_INFO): Remove.
13903         (CLASSTYPE_TI_SPEC_INFO): Likewise.
13904         * pt.c (process_partial_specialization): Likewise.
13905
13906         * class.c (build_base_field): Fix thinko in computation of binfo
13907         offsets.
13908
13909         * tree.c (mark_local_for_remap_p): Mark variables declared in
13910         TARGET_EXPRs as well.
13911
13912 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
13913
13914         * typeck.c (require_complete_type, complete_type,
13915         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
13916         build_array_ref, convert_arguments, pointer_diff,
13917         build_x_unary_op, build_unary_op, build_c_cast,
13918         build_modify_expr): Use COMPLETE_TYPE_P etc.
13919         * call.c (is_complete, convert_like_real,
13920         build_new_method_call): Likewise.
13921         * class.c (build_vbase_pointer_fields, check_bases,
13922         build_base_field, finish_struct_1, pushclass): Likewise.
13923         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
13924         * decl.c (maybe_process_template_type_declaration, pushtag,
13925         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
13926         layout_var_decl, check_initializer, cp_finish_decl,
13927         grokdeclarator, require_complete_types_for_parms,
13928         grok_op_properties, xref_tag, xref_basetypes,
13929         check_function_type): Likewise.
13930         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
13931         * friend.c (do_friend): Likewise.
13932         * init.c (build_offset_ref): Likewise.
13933         * parse.y (structsp): Likewise.
13934         * pt.c (maybe_process_partial_specialization,
13935         tsubst_friend_function, instantiate_class_template, tsubst,
13936         do_type_instantiation, instantiate_pending_templates): Likewise.
13937         * repo.c (repo_get_id): Likewise.
13938         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
13939         synthesize_tinfo_var, emit_support_tinfos): Likewise.
13940         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
13941         * semantics.c (begin_class_definition): Likewise.
13942         * tree.c (build_cplus_method_type): Likewise.
13943         * typeck2.c (digest_init, build_functional_cast,
13944         add_exception_specifier): Likewise.
13945         * parse.h, parse.c: Regenerated.
13946
13947 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
13948
13949         * inc/cxxabi.h: New header file. Define new-abi entry points.
13950         (__pointer_type_info::target): Rename member to ...
13951         (__pointer_type_info::type): ... here.
13952         (__base_class_info::type): Rename member to ...
13953         (__base_class_info::base): ... here.
13954         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
13955         * cp-tree.h (CPTI_ABI): New global tree enumeration.
13956         (abi_node): New global tree node.
13957         * decl.c (abi_node): Document.
13958         (init_decl_processing): Initialize abi_node.
13959         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
13960         (get_vmi_pseudo_type_info): Likewise.
13961         (create_tinfo_types): Likewise.
13962         (emit_support_tinfos): Likewise.
13963         * tinfo.h (cxxabi.h): Include for new-abi.
13964         Move rtti class definitions to new header file.
13965         * tinfo.cc (abi): Use the namespace.
13966         (std): Move new abi rtti classes from here ...
13967         (__cxxabiv1): ... to here.
13968         * tinfo2.cc (cxxabi.h): Include for new-abi.
13969         Move rtti class definitions to new header file.
13970         (std): Move new abi rtti classes from here ...
13971         (__cxxabiv1): ... to here.
13972         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
13973         namespace.
13974
13975 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
13976             Jason Merrill  <jason@casey.cygnus.com>
13977
13978         * method.c (build_overload_int): Use host_integerp.
13979
13980 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13981
13982         * init.c (build_offset_ref): Handle the case of a templated member
13983         function.
13984
13985 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13986
13987         * except.c (expand_exception_blocks): Clear catch_clauses_last.
13988
13989 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
13990
13991         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
13992         * class.c (check_bitfield_decl): Turn illegal bitfields into
13993         non-bitfields.
13994         (dfs_propagate_binfo_offsets): Adjust for new size_binop
13995         semantics.
13996         (dfs_offset_for_unshared_vbases): Likewise.
13997         * cvt.c (cp_convert_to_pointer): Convert NULL to a
13998         pointer-to-member correctly under the new ABI.
13999         * expr.c (cplus_expand_constant): Don't use cp_convert when
14000         turning an offset into a pointer-to-member.
14001         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
14002         when dereferencing them under the new ABI.
14003         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
14004         of pointers-to-members under the new ABI.
14005
14006         * class.c (check_bitfield_decl): Remove restriction on really long
14007         bitfields.
14008         (layout_class_type): Implement new ABI handling of bitfields
14009         longer than their types.
14010
14011 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14012
14013         * parse.y (extdefs): Call ggc_collect.
14014         * parse.c: Regenerated.
14015
14016 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
14017
14018         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
14019         (note_name_declared_in_class): Use OVL_CURRENT to get at a
14020         potential overload.
14021
14022 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14023
14024         * class.c (build_vbase_path): Use integer_zerop.
14025         (build_vtable_entry): Use tree_low_cst.
14026         (get_vfield_offset): Use bit_position.
14027         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
14028         Use tree_low_cst.
14029         (check_bitfield_decl): Set DECL_SIZE using convert.
14030         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
14031         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
14032         Use tree_low_cst.
14033         (finish_struct_1): Use bit_position.
14034         (dump_class_hierarchy): Use tree_low_cst.
14035         * cp-tree.h (min_precision): Add declaration.
14036         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
14037         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
14038         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
14039         * expr.c (cplus_expand_constant): Use bit_position.
14040         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
14041         * rtti.c (get_base_offset): Use bit_position.
14042         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
14043         host_integerp, and tree_low_cst.
14044         (pointer_int_sum): Use integer_zerop.
14045         (build_component_addr): Use bit_position.
14046
14047 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
14048
14049         * typeck.c (require_complete_type): Don't assume size_zero_node.
14050         (complete_type_or_else): Likewise.
14051
14052 2000-03-16  Steven Grady <grady@digitaldeck.com>
14053             Jason Merrill  <jason@casey.cygnus.com>
14054
14055         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
14056
14057 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
14058
14059         * decl2.c (grokfield): Bail out if type is error_mark_node.
14060
14061 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14062
14063         * tinfo2.cc (__ptr_to_member_data): Rename to ...
14064         (__pointer_to_member_data): ... here. Adjust.
14065         * rtti.c (create_tinfo_types): Adjust.
14066
14067 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14068
14069         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
14070         * decl.c (ref_desc_type_node): Undocument.
14071         * rtti.c (ptr_ref_initializer): Rename to ...
14072         (ptr_initializer): ... here. Adjust comments.
14073         (ptmd_initializer): Fix comment thinko.
14074         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
14075         (create_tinfo_types): Remove ref_desc_type_node init.
14076         * tinfo2.cc (__reference_type_info): Remove.
14077
14078 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14079
14080         * decl.c (cp_finish_decl): Remove obsolete comment.
14081
14082         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
14083
14084 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
14085
14086         * cp-tree.h: Tweak documentation.
14087         * class.c (build_vbase_pointer_fields): Layout the fields, too.
14088         (avoid_overlap): Remove.
14089         (get_binfo_offset_as_int): New function.
14090         (dfs_serach_base_offsets): Likewise.
14091         (layout_nonempty_base_or_field): Likewise.
14092         (build_base_field): Layout fields here.  Avoid placing two objects
14093         of the same type at the same address, under the new ABI.
14094         (build_base_fields): Adjust accordingly.
14095         (create_vtable_ptr): Return the new field, but don't attach it to
14096         TYPE_FIELDS.
14097         (remove_base_field): Remove.
14098         (remove_base_fields): Remove.
14099         (layout_basetypes): Adjust accordingly.
14100         (layout_class_type): Call layout_field for each field, rather than
14101         just making a wholesale call to layout_type.
14102
14103 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
14104
14105         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
14106
14107 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
14108
14109         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
14110
14111         * except.c (dtor_nothrow): New fn.
14112         (do_pop_exception): Use it.  Take type parm.
14113         (push_eh_cleanup): Take type parm.
14114         (expand_start_catch_block): Pass it.
14115         (build_eh_type_type_ref): Accept null type.
14116
14117 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
14118
14119         * cp-tree.h (revert_static_member_fn): Change prototype.
14120         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
14121         (grok_op_properties): Likewise.
14122         (start_function): Likewise.
14123         (revert_static_member_fn): Simplify.
14124         * pt.c (check_explicit_specialization): Adjust call to
14125         revert_static_member_fn.
14126
14127 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
14128
14129         * cp-tree.h (scope_kind): New type.
14130         (tmpl_spec_kind): Likewise.
14131         (declare_pseudo_global_level): Remove.
14132         (pseudo_global_level_p): Rename to template_parm_scope_p.
14133         (pushlevel): Remove declaration.
14134         (begin_scope): New function.
14135         (finish_scope): Likewise.
14136         (current_tmpl_spec_kind): Likewise.
14137         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
14138         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
14139         Add template_spec_p.
14140         (toplevel_bindings_p): Adjust.
14141         (declare_pseudo_global_level): Remove.
14142         (pseudo_global_level_p): Rename to template_parm_scope_p.
14143         (current_tmpl_spec_kind): New function.
14144         (begin_scope): Likewise.
14145         (finish_scope): Likewise.
14146         (maybe_push_to_top_level): Adjust.
14147         (maybe_process_template_type_declaration): Likewise.
14148         (pushtag): Likewise.
14149         (pushdecl_nonclass_level): Likewise.
14150         (lookup_tag): Likewise.
14151         (grokfndecl): Handle member template specializations.  Share
14152         constructor and non-constructor code.
14153         * decl2.c (check_classfn): Handle member template specializations.
14154         * pt.c (begin_template_parm_list): Use begin_scope.
14155         (begin_specialization): Likewise.
14156         (end_specialization): Likewise.
14157         (check_explicit_specialization): Use current_tmpl_spec_kind.
14158         Handle member template specializations.
14159         (end_template_decl): Use finish_scope.  Remove call to
14160         get_pending_sizes.
14161         (push_template_decl_real): Remove bogus error message.
14162         (tsubst_decl): Fix typo in code contained in comment.
14163         (instantiate_template): Handle member template specializations.
14164         (most_general_template): Likewise.
14165
14166 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
14167
14168         * lex.c (whitespace_cr): Compress consecutive calls to warning().
14169         (do_identifier): Ditto for error().
14170
14171         * pt.c (convert_nontype_argument): Ditto for cp_error().
14172         (convert_template_argument): Ditto for cp_pedwarn().
14173
14174 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
14175
14176         * exception.cc (__check_null_eh_spec): New fn.
14177         * except.c (expand_end_eh_spec): Call it if the spec is throw().
14178
14179 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
14180
14181         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
14182         * except.c (expand_end_eh_spec): Add the return type.
14183         * rtti.c (throw_bad_cast): Add the parmtypes.
14184         (throw_bad_typeid): Likewise.
14185
14186         * semantics.c (expand_stmt): Only leave out rtl for unused
14187         artificials, and set DECL_IGNORED_P on them as well.
14188         * decl.c (wrapup_globals_for_namespace): Likewise.
14189
14190 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
14191
14192         * decl.c (maybe_commonize_var): Skip all artificial decls.
14193         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
14194
14195 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
14196
14197         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
14198         * cp-tree.h: Declare flag_enforce_eh_specs.
14199         * decl.c (store_parm_decls, finish_function): Check it.
14200
14201         C library functions don't throw.
14202         * Makefile.in (cfns.h): New target.
14203         (except.o): Depend on it.
14204         * Make-lang.in (cc1plus): Depend on cfns.gperf.
14205         * cfns.gperf: New file.
14206         * cfns.h: Generated.
14207         * except.c: Include it.
14208         (nothrow_libfn_p): New fn.
14209         * decl.c (grokfndecl): Use it.
14210         * cp-tree.h: Declare it.
14211
14212         * decl.c (push_overloaded_decl_1, auto_function,
14213         define_function): Lose.
14214         (build_library_fn_1): New static fn.
14215         (builtin_function): Use it.
14216         (get_atexit_node): Use build_library_fn_ptr.
14217         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
14218         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
14219         push_void_library_fn, push_throw_library_fn): New fns.
14220         * cp-tree.h: Declare them.
14221         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
14222         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
14223         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
14224         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
14225         * rtti.c (build_runtime_decl): Lose.
14226         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
14227         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
14228         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
14229
14230         * call.c (build_call): Remove result_type parm.
14231         Call mark_used on unused artificial fns.
14232         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
14233
14234 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
14235
14236         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
14237         appropriate.
14238         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
14239         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
14240         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
14241         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
14242         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
14243         expand_generic_desc): Likewise.
14244
14245 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14246
14247         * exception.cc (__cp_pop_exception): Cleanup the original object.
14248
14249 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14250
14251         * decl.c (grok_op_properties): Merge conversion to void warning
14252         with other silly op warnings.
14253
14254 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
14255
14256         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
14257         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
14258
14259 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14260
14261         * decl.c (cp_make_fname_decl): New function.
14262         (wrapup_globals_for_namespace): Don't emit unused static vars.
14263         (init_decl_processing): Remove comment about use of
14264         array_domain_type. Set make_fname_decl.
14265         (cp_finish_decl): Remove __FUNCTION__ nadgering.
14266         * semantics.c (begin_compound_stmt): Remove
14267         current_function_name_declared flagging.
14268         (expand_stmt): Don't emit unused local statics.
14269         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
14270         specially.
14271
14272 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14273
14274         * typeck.c (convert_for_assignment): Don't look at array
14275         initializer.
14276         * call.c (convert_like_real): Likewise.
14277
14278 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
14279
14280         Add initial support for '\uNNNN' specifier.
14281         * lex.c (read_ucs): New fn.
14282         (readescape, skip_white_space): Call it.
14283         (is_extended_char, is_extended_char_1): New fns.
14284         (utf8_extend_token): New fn, #if 0'd out.
14285         (real_yylex): Treat extended chars like letters.
14286
14287         * search.c (note_debug_info_needed): Walk the bases even if we
14288         weren't deferring the type itself.
14289
14290 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14291
14292         * decl2.c (finish_objects): Constify a char*.
14293
14294         * method.c (emit_thunk): Likewise.
14295
14296 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
14297
14298         * typeck.c (dubious_conversion_warnings): Look through
14299         REFERENCE_TYPE.
14300
14301 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14302
14303         * class.c (dfs_modify_vtables): I is now unsigned.
14304         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
14305         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
14306         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
14307         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14308         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
14309         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
14310         Call integer_all_onesp.
14311         * typeck2.c (process_init_constructor): Use compare_tree_int.
14312
14313         * lang-specs.h (as): Don't call if -syntax-only.
14314
14315 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
14316
14317         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
14318         RTL_EXPR_HAS_NO_SCOPE after all.
14319
14320 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
14321
14322         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
14323         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
14324         RTL_EXPR_HAS_NO_SCOPE.
14325
14326         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
14327         later.
14328
14329         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
14330
14331 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
14332
14333         * call.c (convert_like): Macrofy.
14334         (convert_like_with_context): New macro.
14335         (convert_like_real): Renamed from convert_like.  Add calling
14336         context parameters, for diagnostics. Add recursive flag.  Call
14337         dubious_conversion_warnings for outer conversion.
14338         (build_user_type_conversion): Use convert_like_with_context.
14339         (build_over_call): Likewise. Don't warn about dubious
14340         conversions here. Adjust convert_default_arg calls.
14341         (convert_default_arg): Add context parameters for diagnostics.
14342         Pass through to convert_like_with_context.
14343         * cp-tree.h (convert_default_arg): Add context parameters.
14344         (dubious_conversion_warnings): Prototype new function.
14345         * typeck.c (convert_arguments): Adjust convert_default_arg call.
14346         (dubious_conversion_warnings): New function, broken
14347         out of convert_for_assignment.
14348         (convert_for_assignment): Adjust.
14349
14350 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
14351
14352         * decl2.c (key_method): Break out from...
14353         (import_export_vtable, import_export_class): ...here.
14354
14355         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
14356         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
14357
14358         * search.c (note_debug_info_needed, dfs_debug_mark,
14359         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
14360         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
14361
14362 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
14363
14364         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
14365         typos.
14366
14367 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
14368
14369         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
14370         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
14371         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
14372         (lang_type): Split gets_new into has_new and has_array_new.
14373         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14374         (TYPE_GETS_NEW): Split into ...
14375         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
14376         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
14377         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
14378         (build_op_new_call): Don't declare.
14379         (build_new_1): Likewise.
14380         * call.c (build_op_new_call): Remove.
14381         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
14382         instead of TYPE_NEEDS_DESTRUCTOR.
14383         (finish_struct_bits): Likewise.
14384         (add_implicitly_declared_members): Likewise.
14385         (check_field_decl): Likewise.
14386         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
14387         correctly under the new ABI.
14388         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
14389         instead of TYPE_NEEDS_DESTRUCTOR.
14390         (initialize_local_var): Likewise.
14391         (destroy_local_var): Likewise.
14392         (cp_finish_decl): Likewise.
14393         (register_dtor_fn): Likewise.
14394         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
14395         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
14396         TYPE_VEC_DELETE_TAKES_SIZE here.
14397         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
14398         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
14399         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14400         (finish_destructor_body): Likewise.
14401         (maybe_build_cleanup_1): Likewise.
14402         * decl2.c (do_static_destruction): Likewise.
14403         * init.c (build_new_1): Make it static.
14404         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14405         (expand_cleanup_for_base): Likewise.
14406         (get_cookie_size): New function.
14407         (build_new_1): Handle array-new cookies correctly under the new
14408         ABI.
14409         (build_vec_delete_1): Likewise.
14410         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14411         (build_delete): Likewise.
14412         (build_vec_delete): Handle array-new cookies correctly under the new
14413         ABI.
14414         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14415         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
14416         TYPE_HAS_ARRAY_NEW_OPERATOR.
14417         * ptree.c (print_lang_type): Check them.
14418         * search.c (context_for_name_lookup): Fix typo in comment.
14419         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14420         * tree.c (break_out_cleanups): Likewise.
14421         (build_cplus_array_test_1): Likewise.
14422         (cp_build_qualified_type_real): Likewise.
14423         * typeck.c (complete_type): Likewise.
14424
14425         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
14426         the command-line, not the end.
14427
14428 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
14429
14430         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
14431
14432 2000-03-02  Tom Tromey  <tromey@cygnus.com>
14433
14434         * cp-tree.h (build_java_class_ref): Declare.
14435         * init.c (build_java_class_ref): No longer static.
14436         * except.c (expand_throw): Generate a Java-style `throw' if the
14437         thrown object is a "Java" object.
14438         (initialize_handler_parm): Generate a Java-style lookup of
14439         exception info if the caught object is a "Java" object.
14440         (catch_language, catch_language_init): New globals.
14441         (decl_is_java_type): New function.
14442         (expand_start_catch_block): Don't call push_eh_info() or
14443         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
14444         class reference to build_catch_block.
14445
14446 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14447
14448         * typeck.c (comptypes): Treat sizetype like its language equivalent.
14449
14450 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
14451
14452         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
14453         to merge reference/pointer code and fix incorrect warnings.
14454
14455 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
14456
14457         * search.c (protected_accessible_p): Use context_for_name_lookup.
14458
14459         * init.c (construct_virtual_bases): Fix thinko.
14460         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
14461
14462 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
14463
14464         * decl.c (current_function_decl): Move to toplev.c.
14465
14466 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
14467
14468         * pt.c (fn_type_unification): Unify return type, whenever
14469         provided.
14470         (get_bindings_real): Only pass return type when necessary.
14471         Remove explicit return type check.
14472         * class.c (resolve_address_of_overloaded_function): Pass desired
14473         return type to fn_type_unification.
14474
14475 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14476
14477         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
14478         DECL_FIELD_SIZE.
14479         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
14480         DECL_FIELD_SIZE.
14481         * rtti.c (expand_class_desc): Likewise.
14482         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
14483         (THUNK_VCALL_OFFSET): Likewise.
14484         (THUNK_DELTA): Reflect changes in ../tree.h.
14485
14486 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
14487
14488         * search.c (protected_accessible_p): Also allow the access if
14489         the member is public in DERIVED.  Lose TYPE parm.
14490         (friend_accessible_p): Lose TYPE parm.
14491         (accessible_p): Adjust.
14492
14493 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14494
14495         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
14496         on things that are not sizes; ssize_binop deleted.
14497         Call size_diffop when appropriate.
14498         (dfs_build_vcall_offset_vtbl_entries): Likewise.
14499         (build_primary_vtable, build_secondary_vtable): Likewise.
14500         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
14501         Variable I is HOST_WIDE_INT.
14502         (get_vfield_offset): Pass proper types to size_binop.
14503         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
14504         (finish_struct_1): Likewise.
14505         (skip_rtti_stuff): Arg N is now pointer to signed.
14506         (layout_class_type): Use size_zero_node.
14507         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
14508         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
14509         * decl.c (complete_arry_type): Pass proper types to size_binop.
14510         (xref_basetypes): BINFO_OFFSET is sizetype.
14511         * error.c (dump_expr): Don't use size_binop non-sizes.
14512         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
14513         * init.c (construct_virtual_bases): Fix type error.
14514         (build_vec_delete_1): Pass proper type to size_binop and don't
14515         fold result.
14516         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
14517         * rtti.c (get_base_offset): Pass proper type to size_binop.
14518         * search.c (dfs_find_vbases): Fix type error.
14519         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
14520         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
14521         * tree.c (debug_binfo): Variable N is signed.
14522         Use HOST_WIDE_INT_PRINT_DEC.
14523         * typeck.c (comptypes): sizetype is same as equivalent integer type.
14524         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
14525         size_one_node and size_zero_node.
14526         (c_alignof): Use size_one_node.
14527         (build_component_addr): Pass proper types to size_binop.
14528         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
14529
14530 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
14531
14532         Implement class scope using-declarations for functions.
14533         * class.c (handle_using_decl): Call add_method for used functions.
14534         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
14535         (add_method): Used functions are hidden by local functions.
14536         (check_bases_and_members): Handle using-decls before finalizing
14537         CLASSTYPE_METHOD_VEC.
14538         * call.c (add_function_candidate): Add ctype parm; if nonzero,
14539         override the type of 'this' accordingly.
14540         (add_template_candidate, add_template_candidate_real): Add ctype parm.
14541         (convert_class_to_reference, build_user_type_conversion_1,
14542         build_new_function_call, build_object_call, build_new_op,
14543         build_new_method_call): Pass ctype parm.
14544
14545         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
14546         the baselink.
14547         * call.c (convert_class_to_reference, build_user_type_conversion_1,
14548         build_new_function_call, build_object_call, build_new_op,
14549         build_new_method_call, build_op_delete_call): Don't get basetype_path
14550         from a baselink.
14551         * typeck.c (build_component_ref): Likewise.
14552         * init.c (build_offset_ref): Likewise.
14553         (resolve_offset_ref): Don't call enforce_access.
14554         Call build_scoped_ref.
14555         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
14556         would cause an error or if -pedantic.
14557         * class.c (alter_access): Lose binfo parm.
14558
14559 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
14560
14561         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
14562         types.
14563
14564 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
14565
14566         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
14567         pseudo_type_info creation into the std namespace
14568
14569 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
14570
14571         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
14572         (import_export_class): Remove declaration.
14573         * decl2.c (import_export_class): Make it static.
14574         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
14575         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
14576         EXPR_WITH_FILE_LOCATION.
14577         * lex.c (check_newline): Tweak filename/lineno setting.
14578         * semantics.c (begin_while_stmt): Fix typo in comment.
14579
14580 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14581
14582         * lang-options.h (-fmessage-length=): Add missing option.
14583
14584         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
14585
14586 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
14587
14588         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
14589
14590 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
14591
14592         * optimize.c (expand_call_inline): Emit the return label before
14593         evaluating the return value.
14594
14595 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
14596
14597         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
14598         than duplicating functionality here.
14599         * optimize.c: Include input.h.
14600         (expand_call_inline): Use push_srcloc and pop_srcloc.
14601         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
14602         * parse.c: Regenerated.
14603         * Makefile.in (lex.o): Depend on input.h.
14604         (optimize.o): Likewise.
14605
14606 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
14607
14608         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
14609         function type, rather than ICE.
14610
14611 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
14612
14613         * decl.c (grokdeclarator): Call decl_type_access_control.
14614         * parse.y (parse_end_decl): Don't call decl_type_access_control if
14615         decl is null.
14616
14617 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
14618
14619         * decl.c (decls_match): Remove obsolete static member nadgering.
14620
14621 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14622
14623         * decl.c (grokdeclarator): Change ANSI to ISO.
14624         * lex.c (consume_string, readescape, do_identifier): Likewise.
14625         (parse_float, real_yylex): Likewise.
14626         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
14627         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
14628         new_type_id, maybe_label_decls, simple_stmt,
14629         for.init.statement): Likewise.
14630         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
14631         * semantics.c (finish_named_return_value): Likewise.
14632         * parse.c: Regenerate.
14633
14634 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
14635
14636         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
14637         (CPTI_CLASS_STAR_TYPE): Remove.
14638         (vtable_index_type): Likewise.
14639         (class_star_type_node): Remove.
14640         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
14641         (build_binary_op_nodefault): Remove.
14642         * call.c (build_new_op): Use build_binary_op instead of
14643         build_binary_op_nodefault.
14644         * decl.c (init_decl_processing): Remove class_star_type_node
14645         initialization.  Make delta_type_node ptrdiff_type_node under the
14646         new ABI.  Initialize vtable_index_type.
14647         (build_ptrmemfunc_type): Build different structures for the new
14648         ABI.
14649         (build_enumerator): Use build_binary_op instead of
14650         build_binary_op_nodefault.
14651         * method.c (build_overload_value): Mangle pointers-to-members
14652         appropriately under the new ABI.
14653         * typeck.c (build_array_ref): Use build_binary_op instead of
14654         build_binary_op_nodefault.
14655         (get_member_function_from_ptrfunc): Adjust for the new ABI.
14656         (build_binary_op_nodefault): Rename to ...
14657         (build_binary_op): ... this.  Remove old version.  Adjust for
14658         pointer-to-member comparisons under the new ABI.
14659         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
14660         (build_ptrmemfunc): Adjust for the new ABI.
14661         (expand_ptrmemfunc_cst): Likewise.
14662         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
14663         (pfn_from_ptrmemfunc): Adjust for the new ABI.
14664
14665 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
14666
14667         * call.c (build_object_call): Compress consecutive calls to
14668         cp_error.
14669         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
14670         (build_op_delete_call): Adjust message formatting.
14671
14672         * class.c (check_bases): Compress consecutive calls to
14673         cp_pedwarn.
14674         (finish_struct_anon): Say 'ISO C++'.
14675
14676         * decl.c (start_decl): Same here.
14677         (grok_reference_init): Likewise.
14678         (grokfndecl): Correct message formatting.
14679         (grokfndecl): Improve diagnostic.
14680         (check_static_variable_definition): Likewise. Say 'ISO C++'
14681         (compute_array_index_type): Say 'ISO C++'
14682         (create_array_type_for_decl): Compress consecutive calls to
14683         cp_error.
14684         (grokdeclarator): Say 'ISO C++'
14685         (grok_op_properties): Likewise.
14686
14687         * decl2.c (delete_sanity): Clairify diagnostic.
14688         (check_member_template): Same here.
14689         (grok_function_init): Use consistent terminology.
14690
14691         * expr.c (do_case): Say 'ISO C++'
14692
14693         * friend.c (do_friend): Compress consecutive calls to warning.
14694
14695 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
14696
14697         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
14698         * class.c (build_secondary_vtable): Reorganize.  Don't create a
14699         new vtable under the new ABI.
14700         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
14701         computing the size.
14702         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
14703         the initializing elements.
14704         (initialize_vtable): New function.
14705         (dfs_finish_vtbls): Use it.
14706         (dfs_accumulate_vtbl_inits): New function.
14707         (finish_vtbls): Merge primary and secondary vtables under the new
14708         ABI.
14709         (finish_struct_1): Remove redundant call to layout_vtable_decl.
14710         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
14711         aren't VAR_DECLs.
14712
14713         * class.c (build_vtable): New function, split out from ...
14714         (get_vtable_decl): ... here, and ...
14715         (build_secondary_vtable): ... here.
14716
14717         * pt.c (tsubst_decl): Fix formatting.
14718
14719 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14720
14721         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
14722         (avoid_overlap, build_base_field): Likewise.
14723         (build_base_field, build_base_fields, is_empty_class):
14724         Test DECL_SIZE with integer_zero.
14725         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
14726         * cp-tree.h (struct lang_type): New field size_unit.
14727         (CLASSTYPE_SIZE_UNIT): New macro.
14728         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
14729         (cp_finish_decl): Delete -Wlarger-than processing.
14730         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
14731         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
14732         * tree.c (make_binfo): binfo vector is one entry longer.
14733         (walk_tree): Walk DECL_SIZE_UNIT.
14734
14735 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
14736
14737         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
14738         comment.
14739         (build_vtable_entry): Don't assume all vtable entries are
14740         functions.
14741         (build_vtbl_initializer): Adjust accordingly.
14742         (get_vtable_decl): Fix formatting.
14743
14744 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
14745
14746         * semantics.c (deferred_type_access_control): Walk the entire
14747         type_lookups list.
14748         (save_type_access_control): Rename from
14749         initial_deferred_type_access_control.  Just remember the value.
14750         (decl_type_access_control): New fn.
14751         (begin_function_definition): Use deferred_type_access_control, after
14752         we've started the function.  Set type_lookups to error_mark_node.
14753         * parse.y (frob_specs, fn.def1): Adjust.
14754         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
14755         (parse_end_decl, parse_bitfield0, parse_method): New fns.
14756         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
14757         (after_type_component_declarator0): Likewise.
14758         (after_type_component_declarator): Likewise.
14759         (notype_component_declarator): Likewise.
14760         * cp-tree.h: Adjust.
14761
14762         * decl.c (redeclaration_error_message): Allow redeclaration of
14763         namespace-scope decls.
14764
14765 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
14766
14767         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
14768
14769 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
14770
14771         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
14772         * decl2.c (grokclassfn): Likewise.
14773
14774         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
14775
14776         * decl2.c (lang_decode_option): Don't set default message length
14777         here.
14778         * lex.c (lang_init_options): Set it here.
14779
14780 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
14781
14782         Make DECL_CONTEXT mean the class in which a member function was
14783         declared, even for a virtual function.
14784         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
14785         (DECL_FRIEND_CONTEXT): New macro.
14786         (DECL_REAL_CONTEXT): Remove.
14787         (SET_DECL_FRIEND_CONTEXT): Likewise.
14788         (DECL_VIRTUAL_CONTEXT): Adjust.
14789         (DECL_CLASS_SCOPE_P): Use TYPE_P.
14790         (add_friends): Remove.
14791         (hack_decl_function_context): Likewise.
14792         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
14793         CP_DECL_CONTEXT.
14794         (build_over_call): Fix indentation.  Use DECL_CONTEXT
14795         instead of DECL_CLASS_CONTEXT.
14796         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
14797         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
14798         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14799         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
14800         (build_base_field): Likewise.
14801         (finish_struct_1): Likewise.
14802         (build_self_reference): Likewise.
14803         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
14804         DECL_REAL_CONTEXT.
14805         (pushtag): Use decl_function_context, not
14806         hack_decl_function_context.
14807         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
14808         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
14809         (pushdecl): Remove bogus code.
14810         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
14811         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
14812         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14813         Use decl_function_context, nothack_decl_function_context.
14814         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
14815         (grokdeclarator): Likewise.  Use decl_function_context, not
14816         hack_decl_function_context.
14817         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
14818         (start_function): Use DECL_FRIEND_CONTEXT, not
14819         DECL_CLASS_CONTEXT.  Use decl_function_context, not
14820         hack_decl_function_context.
14821         (finish_function): Use decl_function_context, not
14822         hack_decl_function_context.
14823         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
14824         DECL_CLASS_CONTEXT.
14825         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
14826         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
14827         (grokfield): Likewise.
14828         (finish_builtin_type): Likewise.
14829         (finish_vtable_vardec): Use decl_function_context, not
14830         hack_decl_function_context.
14831         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14832         (start_static_initialization_or_destruction): Likewise.
14833         (finish_static_initialization_or_destruction): Likewise.
14834         (mark_used): Adjust logic for deciding when to synthesize methods.
14835         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
14836         DECL_REAL_CONTEXT.
14837         * error.c (dump_function_decl): Use DECL_CONTEXT, not
14838         DECL_CLASS_CONTEXT.
14839         * friend.c (is_friend): Likewise.
14840         (add_friends): Remove.
14841         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
14842         * lex.c (begin_definition_of_inclass_inline): Use
14843         decl_function_context, not hack_decl_function_context.
14844         (process_next_inline): Likewise.
14845         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
14846         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
14847         DECL_CLASSS_CONTEXT.
14848         (hack_identifier): Likewise.
14849         (synthesize_method):  Use decl_function_context, not
14850         hack_decl_function_context.
14851         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
14852         DECL_REAL_CONTEXT.
14853         (is_member_template): Use decl_function_context, not
14854         hack_decl_function_context.  Use DECL_CONTEXT, not
14855         DECL_CLASS_CONTEXT.
14856         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
14857         DECL_CLASS_CONTEXT.
14858         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
14859         DECL_REAL_CONTEXT.
14860         (push_template_decl_real): Likewise.
14861         (instantiate_class_template): Don't call add_friends.
14862         (tsubst_default_argument): Use DECL_CONTEXT, not
14863         DECL_REAL_CONTEXT.
14864         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
14865         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14866         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
14867         DECL_CLASS_CONTEXT.
14868         * repo.c (repo_inline_used): Likewise.
14869         * search.c (current_scope): Adjust for new _CONTEXT macros.
14870         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
14871         DECL_REAL_CONTEXT.
14872         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14873         (lookup_fnfields_here):Likewise.
14874         (check_final_overrider): Likewise.
14875         (init_vbase_pointers): Likewise.
14876         (virtual_context): Likewise.
14877         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
14878         (expand_body): Use decl_function_context, not
14879         hack_decl_function_context.
14880         * tree.c (hack_decl_function_context): Remove.
14881         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
14882         DECL_CLASS_CONTEXT.
14883         * typeck2.c (error_not_base_type): Likewise.
14884
14885 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
14886
14887         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
14888
14889 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14890
14891         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
14892
14893 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
14894
14895         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
14896
14897 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
14898
14899         * decl2.c (lang_decode_option): Enable automatic line wrapping.
14900
14901 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
14902
14903         * parse.y (frob_specs): Split out...
14904         (parse_decl): From here.
14905         (fn.def2): Call initial_deferred_type_access_control.
14906         (after_type_component_declarator0): Call frob_specs.
14907         (notype_component_declarator0): Likewise.
14908         * search.c (friend_accessible_p): Nested classes are friends of their
14909         enclosing classes.
14910
14911 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
14912
14913         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
14914         used to create an implicit temporary.
14915
14916         * class.c (dfs_modify_vtables): Tweak calculation of functions to
14917         override.
14918
14919 2000-02-08  Nathan Sidwell  <nathan@acm.org>
14920
14921         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
14922         strip array element qualifiers too.
14923
14924 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
14925
14926         * decl.c (store_parm_decls): Don't build cleanups for parameters
14927         while processing_template_decl.
14928
14929 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
14930
14931         * cp-tree.h (struct saved_scope): Add incomplete field.
14932         (namespace_scope_incomplete): New macro.
14933         * decl.c (pushdecl): Use it.
14934         (hack_incomplete_structures): Use it.  See through artificial
14935         binding levels.
14936         (mark_saved_scope): Mark it.
14937
14938         Implement access control for nested types.
14939         * search.c (type_access_control): New fn.
14940         (accessible_p): Now we do perform access control for types.
14941         * semantics.c (deferred_type_access_control): New fn.
14942         (initial_deferred_type_access_control): New fn.
14943         (begin_function_definition): Call it.  Add lookups parm.
14944         * decl.c (struct binding_level): Add this_class field.
14945         (pushlevel_class): Set it.
14946         (mark_binding_level): Mark it.
14947         (lookup_name_real): Use it.  Call type_access_control.
14948         (mark_saved_scope): Mark lookups field.
14949         * cp-tree.h (flagged_type_tree): Add lookups field.
14950         (struct saved_scope): Add lookups field.
14951         (type_lookups): New macro.
14952         * parse.y (declmods): Now <ftype>.
14953         (parse_decl): Add lookups parm.  Call
14954         initial_deferred_type_access_control.
14955         (lang_extdef): Clear type_lookups.
14956         (typed_declspecs, declmods, typespec): Set lookups field.
14957         (initdcl): Call deferred_type_access_control.
14958         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
14959         component_decl_1, named_parm): Adjust.
14960         * friend.c (is_friend): Nested classes are friends of their
14961         enclosing classes.
14962
14963         * class.c (currently_open_derived_class): New fn.
14964         * method.c (hack_identifier): Use it.
14965
14966         * lex.c (do_identifier): Remove obsolete code.
14967
14968         * parse.y (typed_typespecs): Propagate new_type_flag properly.
14969
14970 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
14971
14972         * tinfo.h: Remove apostrophes from C++ comment (xgettext
14973         thinks this file is plain C).
14974
14975 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14976
14977         * Makefile.in (call.o): Depend on $(EXPR_H).
14978
14979         * call.c: Include "expr.h".
14980
14981         * class.c (dump_class_hierarchy): Add prototype.
14982
14983         * search.c (dfs_get_pure_virtuals): Likewise.
14984
14985 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
14986
14987         * parse.y (simple_stmt): Allow :: token in asm parameter list.
14988         * parse.c: Rebuilt.
14989
14990 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
14991
14992         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
14993         Store it in DECL_FCONTEXT.
14994         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
14995
14996 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
14997
14998         * tinfo.h (old abi): #include "tconfig.h".
14999         * tinfo.cc (convert_to_base): Move into old abi section.
15000
15001 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
15002
15003         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
15004         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
15005         (BINFO_PRIMARY_BINFO): New macro.
15006         (BF_DELTA): Rename to ...
15007         (BV_DELTA): ... this.
15008         (BF_VCALL_INDEX): Rename to ...
15009         (BV_VCALL_INDEX): ... this.
15010         (BF_FN): Rename to ...
15011         (BV_FN): ... this.
15012         * class.c (build_vbase_path): Adjust for changes to reverse_path.
15013         (set_rtti_entry): Rename BF_ macros to BV_ variants.
15014         (modify_vtable_entry): Simplify.
15015         (add_virtual_function): Rename BF_ macros to BV_ variants.
15016         (build_vtable_initializer): Likewise.
15017         (get_class_offset_1): Remove.
15018         (dfs_get_class_offset): Likewise.
15019         (get_class_offset): Likewise.
15020         (dfs_find_final_overrider): New function.
15021         (find_final_overrider): Likewise.
15022         (modify_one_vtable): Remove.
15023         (dfs_find_base): New function.
15024         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
15025         find_final_overrider.
15026         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
15027         virtuals.
15028         (dfs_fixup_vtable_deltas): Remove.
15029         (override_one_vtable): Remove.
15030         (merge_overrides): Likewise.
15031         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
15032         unreal chilren of virtual bases.
15033         (finish_struct_1): Don't use merge_overrides.  Don't use
15034         dfs_fixup_vtable_deltas.
15035         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
15036         BINFOs.
15037
15038 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
15039             Jason Merrill  <jason@yorick.cygnus.com>
15040
15041         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
15042
15043 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
15044
15045         * exception.cc (__throw_bad_typeid): Add missing std::.
15046
15047 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15048
15049         * cp-tree.h (make_thunk): PROTO -> PARAMS.
15050
15051 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
15052
15053         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
15054
15055         Runtime support for new-abi rtti.
15056         * inc/typeinfo (type_info::operator!=): Define in class.
15057         (type_info::before, type_info::name, type_info::operator==,
15058         type_info::operator!=): Define new ABI implementations.
15059         (type_info::is_pointer_p, type_info::is_function_p): Declare
15060         new virtual functions.
15061         (type_info::do_catch, type_info::do_upcast): Likewise.
15062
15063         * tinfo.h (__base_class_info): Define new class.
15064         (__class_type_info): Likewise.
15065         (__si_class_type_info): Likewise.
15066         (__vmi_class_type_info): Likewise.
15067         (__dynamic_cast): Prototype.
15068
15069         * tinfo.cc: Conditionalize old and new rtti mechanisms.
15070         (type_info::is_pointer_p): Define new function.
15071         (type_info::is_function_p): Likewise.
15072         (type_info::do_catch): Likewise.
15073         (type_info::do_upcast): Likewise.
15074         (vtable_prefix): New structure for vtable access.
15075         (adjust_pointer): Define new template function.
15076         (contained_p, public_p, virtual_p, contained_public_p,
15077         contained_nonpublic_p, contained_nonvirtual_p): Define new
15078         functions.
15079         (nonvirtual_base_type): New local variable.
15080         (__class_type_info::~__class_type_info): Define.
15081         (__si_class_type_info::~__si_class_type_info): Likewise.
15082         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
15083         (__class_type_info::do_catch): Define new function.
15084         (__class_type_info::do_upcast): Likewise.
15085         (__class_type_info::find_public_src): Likewise.
15086         (__class_type_info::do_find_public_src): Likewise.
15087         (__si_class_type_info::do_find_public_src): Likewise.
15088         (__vmi_class_type_info::do_find_public_src): Likewise.
15089         (__class_type_info::do_dyncast): Likewise.
15090         (__si_class_type_info::do_dyncast): Likewise.
15091         (__vmi_class_type_info::do_dyncast): Likewise.
15092         (__class_type_info::do_upcast): Likewise.
15093         (__si_class_type_info::do_upcast): Likewise.
15094         (__vmi_class_type_info::do_upcast): Likewise.
15095         (__dynamic_cast): Likewise.
15096
15097         * tinfo2.cc (__fundamental_type_info): Define new class.
15098         (__pointer_type_info): Likewise.
15099         (__reference_type_info): Likewise.
15100         (__array_type_info): Likewise.
15101         (__function_type_info): Likewise.
15102         (__enum_type_info): Likewise.
15103         (__ptr_to_member_type_info): Likewise.
15104         (__fundamental_type_info::~__fundamental_type_info): Define.
15105         (__pointer_type_info::~__pointer_type_info): Likewise.
15106         (__reference_type_info::~__reference_type_info): Likewise.
15107         (__array_type_info::~__array_type_info): Likewise.
15108         (__function_type_info::~__function_type_info): Likewise.
15109         (__enum_type_info::~__enum_type_info): Likewise.
15110         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
15111         (__pointer_type_info::do_catch): Define new function.
15112         (__ptr_to_member_type_info::do_catch): Define new function.
15113
15114         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
15115         (__is_pointer): Likewise.
15116
15117         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
15118
15119 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
15120
15121         * cp/class.c (build_vtable): Rename to build_primary_vtable.
15122         (prepare_fresh_vtable): Rename to build_secondary_vtable.
15123         (make_new_vtable): New function.
15124         (modify_vtable_entry): Handle generation of new vtables correctly.
15125         (modify_one_vtable): Remove unused parameter.
15126         (dfs_fixup_vtable_deltas): Likewise.
15127         (override_one_vtable): Use build_secondary_vtable.
15128         (finish_struct_1): Use build_primary_vtable and
15129         build_secondary_vtable.
15130
15131 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
15132
15133         * cp/decl.c: Adjust variable names, comments, help strings.
15134
15135 2000-01-29  Nathan Sidwell  <nathan@acm.org>
15136
15137         * new2.cc (operator delete[]): Use operator delete, don't assume
15138         implementation.
15139
15140 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
15141
15142         * class.c (build_vtbl_initializer): Add argument to
15143         build_vtable_entry call.
15144
15145 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
15146
15147         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
15148         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
15149         (BF_DELTA): New macro.
15150         (BF_VCALL_INDEX): Likewise.
15151         (BF_FN): Likewise.
15152         (THUNK_VCALL_OFFSET): Likewise.
15153         (make_thunk): Change prototype.
15154         * class.c (build_vtable_entry): Integrate
15155         build_vtable_entry_for_fn.  Handle vcall indices.
15156         (build_vtable_entry_for_fn): Remove.
15157         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
15158         BF_VCALL_INDEX, BF_FN.
15159         (modify_vtable_entry): Integrate common code from
15160         modify_one_vtable and dfs_fixup_vtable_deltas.
15161         (add_virtual_function): Set BF_VCALL_INDEX.
15162         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
15163         and BF_FN.
15164         (modify_one_vtable): Simplify.
15165         (dfs_fixup_vtable_deltas): Likewise.
15166         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
15167         * method.c (make_thunk): Handle vcall indices.
15168
15169 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
15170
15171         Compiler side new abi rtti (not enabled).
15172         * cp-tree.h (new_abi_rtti_p): New macro.
15173         (emit_support_tinfos): Prototype new function.
15174         (tinfo_decl_p): Likewise.
15175         (emit_tinfo_decl): Likwise.
15176         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
15177         macros.
15178         (doing_runtime): New local static.
15179         (init_rtti_processing): Add new-abi initializer.
15180         (get_tinfo_decl): Add new-abi logic.
15181         (tinfo_from_decl): Likewise.
15182         (build_dynamic_cast_1): Likewise.
15183         (qualifier_flags): New static function.
15184         (tinfo_base_init): Likewise.
15185         (generic_initializer): Likewise.
15186         (ptr_ref_initializer): Likewise.
15187         (ptmd_initializer): Likewise.
15188         (class_hint_flags): Likewise.
15189         (class_initializer): Likewise.
15190         (synthesize_tinfo_var): Likewise.
15191         (create_real_tinfo_var): Likewise.
15192         (create_pseudo_type_info): Likewise.
15193         (get_vmi_pseudo_type_info): Likewise.
15194         (create_tinfo_types): Likewise.
15195         (emit_support_tinfos): New global function.
15196         (tinfo_decl_p): New global predicate.
15197         (emit_tinfo_decl): New global function.
15198         * class.c (set_rtti_entry): Generalize for old and new rtti.
15199         (build_vtbl_initializer): Likewise.
15200         * decl2.c (finish_file): Likewise.
15201
15202 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
15203
15204         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
15205         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
15206
15207 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
15208
15209         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
15210         for scopes.
15211
15212 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
15213
15214         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
15215
15216 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
15217
15218         * optimize.c (calls_setjmp_r): Supply new argument
15219         to special_function_p.
15220
15221 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15222
15223         * call.c: PROTO -> PARAMS.
15224         * class.c: Likewise.
15225         * cp-tree.h: Likewise.
15226         * cvt.c: Likewise.
15227         * decl.c: Likewise.
15228         * decl.h: Likewise.
15229         * decl2.c: Likewise.
15230         * dump.c: Likewise.
15231         * errfn.c: Likewise.
15232         * error.c: Likewise.
15233         * except.c: Likewise.
15234         * expr.c: Likewise.
15235         * init.c: Likewise.
15236         * input.c: Likewise.
15237         * lex.c: Likewise.
15238         * lex.h: Likewise.
15239         * method.c: Likewise.
15240         * optimize.c: Likewise.
15241         * parse.y: Likewise.
15242         * pt.c: Likewise.
15243         * repo.c: Likewise.
15244         * rtti.c: Likewise.
15245         * search.c: Likewise.
15246         * semantics.c: Likewise.
15247         * spew.c: Likewise.
15248         * tree.c: Likewise.
15249         * typeck.c: Likewise.
15250         * typeck2.c: Likewise.
15251         * xref.c: Likewise.
15252
15253 2000-01-25  Richard Henderson  <rth@cygnus.com>
15254
15255         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
15256
15257 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
15258
15259         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
15260         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
15261         (struct vcall_offset_data_s): New type.
15262         (dfs_vcall_offset_queue_p): New function.
15263         (dfs_build_vcall_offset_vtbl_entries): Likewise.
15264         (build_vcall_offset_vtbl_entries): Likewise.
15265         (layout_vtable_decl): Likewise.
15266         (num_vfun_entries): Likewise.
15267         (num_extra_vtbl_entries): Add the entries for vcall offsets.
15268         (build_vtbl_initializer): Likewise.
15269         (dfs_finish_vtabls): Use layout_vtable_decl.
15270         (modify_one_vtables): Always duplicate vtables under the new ABI.
15271         (finish_struct_1): Use layout_vtable_decl.
15272
15273 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15274
15275         * decl.c (member_function_or_else): Change third arg from a format
15276         specifier to an `enum overload_flags'.  Callers changed.
15277
15278 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15279
15280         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
15281         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
15282         build_const_cast, get_delta_difference, check_return_expr): Avoid
15283         ANSI string concatenation usage.
15284
15285 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
15286
15287         * class.c (layout_class_type): Put the fields required to make a
15288         class non-empty at the end, not the beginning, of the TYPE_FIELDs
15289         list.
15290
15291 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
15292
15293         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
15294         template.
15295
15296         * decl2.c (mark_used): Do instantiate inlines that have been
15297         explicitly instantiated.
15298
15299 2000-01-24  Richard Henderson  <rth@cygnus.com>
15300
15301         * call.c (build_over_call): Use expand_tree_builtin.
15302         * typeck.c (build_function_call_real): Likewise.
15303         (build_binary_op_nodefault): Handle unordered compares.
15304
15305 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
15306
15307         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
15308         cp_tree_index values.
15309         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
15310         New global node #defines for them.
15311         * rtti.c (call_void_fn): Replace with ...
15312         (build_runtime_decl): ... new static function.
15313         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
15314         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
15315         (build_dynamic_cast_1): Always produce correctly typed result.
15316         Explicitly produce type_info addresses. Use dynamic_cast_node.
15317         * exception.cc (__throw_bad_cast): Return `void *'.
15318         (__throw_bad_typeid): Return `const type_info &'.
15319
15320 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
15321
15322         * cp-tree.h (get_vtable_decl): Prototype new function.
15323         * class.c (get_vtable_decl): New function. Broken out from ...
15324         (build_vtable): ... here. Use it.
15325         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
15326         by get_vtable_decl.
15327
15328 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
15329
15330         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
15331         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
15332         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
15333         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
15334         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
15335         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
15336         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
15337         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
15338         (CPTI_TINFO_VAR_ID): New enumeration.
15339         (__tp_desc_type_node, __access_mode_type_node,
15340         __bltn_desc_type_node, __user_desc_type_node,
15341         __class_desc_type_node, __ptr_desc_type_node,
15342         __attr_desc_type_node, __func_desc_type_node,
15343         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
15344         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
15345         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
15346         enum_desc_type_node, class_desc_type_node,
15347         si_class_desc_type_node, vmi_class_desc_type_node,
15348         ptmd_desc_type_node, base_desc_type_node): New #defines.
15349         (tinfo_fn_id, tinfo_fn_type): Rename to ...
15350         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
15351         (tinfo_var_id): New enumeration.
15352         (DECL_TINFO_FN_P): Augment comment.
15353         * decl.c (cp_global_trees): Adjust documentation.
15354         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
15355         tinfo_decl_type and tinfo_var_id.
15356         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
15357         (build_typeid): Remove unused variable.
15358         (get_tinfo_var): Use tinfo_var_id.
15359         (tinfo_name): New static function.
15360         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
15361         (tinfo_from_decl): Likewise.
15362         (get_base_offset): New static function, broken out of
15363         expand_class_desc.
15364         (expand_si_desc): Use tinfo_name.
15365         (expand_class_desc): Likewise. Lose local static variable.
15366         Use base_desc_type_node. Use get_base_offset.
15367         (expand_ptr_desc): Use tinfo_name.
15368         (expand_attr_desc): Likewise.
15369         (expand_generic_desc): Likewise.
15370
15371         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
15372         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
15373
15374 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
15375
15376         * cp-tree.h (__eprintf): Remove declaration.
15377         * tree.c (__eprintf): Remove definition.
15378
15379 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
15380             Mark Mitchell  <mark@codesourcery.com>
15381
15382         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
15383         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
15384
15385 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
15386
15387         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
15388
15389 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
15390
15391         * cp-tree.h (register_dtor_fn): New function.
15392         * decl.c (destroy_local_static): Rename to ...
15393         (register_dtor_fn): ... this.  Give it external linkage.
15394         (expand_static_init): Use it.
15395         * decl2.c (do_static_initialization): Likewise, if using
15396         __cxa_atexit.
15397         (do_static_destruction): Check that __cxa_atexit is not in use.
15398         (finish_file): Don't call do_static_destruction if using
15399         __cxa_atexit.
15400
15401         * typeck.c (convert_arguments): Restore two-message error
15402         reporting.
15403
15404 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
15405
15406         Remap dynamic cast hint values to be consistent across ABIs.
15407         * search.c (dynamic_cast_base_recurse): Remap generated value.
15408         (get_dynamic_cast_base_type): Adjust documentation.
15409         * tinfo.h (__user_type_info::dyncast): Likewise.
15410         (__user_type_info::find_public_subobj): Remap BOFF meaning.
15411         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
15412         (__class_type_info::do_dyncast): Likewise.
15413         (__class_type_info::do_find_public_subobj): Likewise.
15414         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
15415
15416 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
15417
15418         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
15419
15420         * typeck2.c (incomplete_type_error): Restore previous
15421         cp_error and cp_error_at call sequence.
15422
15423 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
15424
15425         * class.c (dump_class_hierarchy): Make format agree with argument;
15426         cast pointer to unsigned long and print with %lx.
15427
15428 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
15429
15430         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
15431
15432         * typeck.c (composite_pointer_type, common_type,
15433         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
15434         build_function_call_real, convert_arguments,
15435         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
15436         build_unary_op, mark_addressable, build_compound_expr,
15437         build_static_cast, build_reinterpret_cast, build_const_cast,
15438         build_c_cast, build_modify_expr, get_delta_difference,
15439         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
15440         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
15441         into a single one.
15442         * typeck2.c (readonly_error, abstract_virtuals_error,
15443         process_init_constructor, check_for_new_type): Likewise.
15444
15445 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
15446
15447         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
15448         VAR_DECLs.
15449
15450 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
15451
15452         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
15453         (build_x_typeid): Likewise.
15454         (get_tinfo_fn): Likewise.
15455         (get_tinfo_fn_unused): Rename to ...
15456         (get_tinfo_decl): ... here.
15457         * rtti.c (build_headof): Replace logic error with assertion.
15458         (get_tinfo_fn_dynamic): Rename to ...
15459         (get_tinfo_decl_dynamic): ... here. Make static. Use
15460         complete_type_or_else.
15461         (build_x_typeid): Move into ...
15462         (build_typeid): ... here. Adjust call to
15463         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
15464         throw_bad_typeid expression.
15465         (get_tinfo_fn_unused): Rename to ...
15466         (get_tinfo_decl): ... here. Adjust comment.
15467         (get_tinfo_fn): Delete.
15468         (tinfo_from_decl): New static function.
15469         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
15470         (get_typeid): Use complete_type_or_else.
15471         (build_dynamic_cast_1): Adjust calls to
15472         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
15473         * parse.y (primary): Adjust call to build_typeid.
15474         * except.c (build_eh_type_type_ref): Adjust call to
15475         get_tinfo_decl. Mark as used.
15476         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
15477         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
15478         * parse.c: Regenerated.
15479
15480 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
15481
15482         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
15483         calling convention.
15484         (resolves_to_fixed_type_p): Document calling convention.
15485         * rtti.c (build_x_typeid): Initialize NONNULL.
15486
15487         * cp-tree.h (build_shared_int_cst): New function.
15488         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
15489         * class.c (modify_vtable_entry): Likewise.
15490         (add_virtual_function): Split out code to generated shared
15491         INTEGER_CSTs to build_share_int_cst.
15492         (modify_all_vtables): Handle all the overridden functions here.
15493         Add overridden functions from non-primary virtual bases to the
15494         primary vtable.
15495         (finish_struct_1): Adjust call to modify_all_vtables.  Add
15496         overridden functions from non-primary bases to the vtable.
15497         * tree.c (build_shared_int_cst): New function.
15498
15499         * cp-tree.h (scratchalloc): Remove.
15500         (build_scratch_list): Likewise.
15501         * call.c (convert_class_to_reference): Replace build_scratch_list
15502         and build_expr_list with build_tree_list.
15503         (add_candidate): Replace scratchalloc with expralloc.  Note memory
15504         leak.
15505         (build_user_type_conversion_1):  Replace build_scratch_list
15506         and build_expr_list with build_tree_list.
15507         (build_new_op): Likewise.
15508         (build_op_delete_call): Likewise.
15509         (convert_like): Likewise.
15510         * cvt.c (ocp_convert): Likewise.
15511         * decl.c (start_decl): Likewise.
15512         (start_function): Likewise.
15513         (finish_destructor_body): Likewise.
15514         (maybe_build_cleanup_1): Likewise.
15515         * decl2.c (reparse_decl_as_expr): Likewise.
15516         * init.c (perform_member_init): Likewise.
15517         (expand_cleanup_for_base): Likewise.
15518         (build_builtin_delete_call): Likewise.
15519         (build_new_1): Likewise.
15520         (build_delete): Likewise.
15521         * method.c (do_build_assign_ref): Likewise.
15522         * parse.y (already_scoped_stmt): Likewise.
15523         (nontrivial_exprlist): Likewise.
15524         (net_initializer): Likewise.
15525         (initlist): Likewise.
15526         * parse.c: Regenerated.
15527         * rtti.c (build_x_typeid): Likewise.
15528         (build_dynamic_cast_1): Likewise.
15529         * typeck.c (build_x_compound_expr): Likewise.
15530         (build_static_cast): Likewise.
15531         (build_modify_expr): Likewise.
15532
15533         * cp-tree.h (DECL_VINDEX): Add documentation.
15534         * class.c (build_vtable_entry): Likewise.
15535         (start_vtable): Add comment.
15536         (add_virtual_function): Replace pending_hard_virtuals with
15537         overridden_virtuals and pending_virtuals with new_virtuals.
15538         Replace redundant assignments with assertions.
15539         (check_for_override): Add comment.
15540         (check_bases_and_members): Replace pending_hard_virtuals with
15541         overridden_virtuals and pending_virtuals with new_virtuals.
15542         (create_vtbl_ptr): Likewise.
15543         (layout_class_type): Likewise.
15544         (finish_struct_1): Likewise.  Add comments.
15545
15546 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
15547
15548         * class.c (finish_struct_1): Replace redundant code with
15549         assertions.
15550
15551         * cp-tree.h (flag_new_abi): Move.
15552         (flag_use_cxa_atexit): Likewise.
15553         (flag_honor_std): Likewise.
15554         (flag_rtti): Likewise.
15555         (vbase_offsets_in_vtable_p): Define.
15556         (vptrs_present_everywhere_p): Likewise.
15557         (TYPE_CONTAINS_VPTR_P): Likewise.
15558         (dfs_walk_real): Declare.
15559         * class.c (build_vbase_pointer_fields): Check
15560         vbase_offsets_in_vtable_p.
15561         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
15562         BINFO_VPTR_FIELD.
15563         (build_vbase_offset_vtbl_entries): Simplify.
15564         (build_vbase_offset_vtbl_entries): Adjust.
15565         (build_vbase_pointer): Add ability to look up vbase offsets in
15566         vtable.
15567         (start_vtable): New function.
15568         (add_virtual_function): Use it.
15569         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
15570         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
15571         (build_vtbl_initializer): Take the type of the complete object as
15572         input.  Use it to correctly calculate vbase offsets.
15573         (dfs_finish_vtbls): Pass the complete type to
15574         build_vtbl_initializer.
15575         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
15576         (create_vtable_ptr): Create a vtable even if there are no
15577         new virtual functions, under the new ABI.
15578         (finish_struct_1): Likewise.
15579         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
15580         * decl.c (exapnd_static_init): Remove call to
15581         preserve_initializer.
15582         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
15583         vtables.
15584         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
15585         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
15586         (construct_virtual_bases): Don't initialize virtual base pointers
15587         under the new ABI.
15588         (build_aggr_init): Clean up comment.
15589         (expand_aggr_init_1): Likewise.
15590         * rtti.c (expand_class_desc): Store the virtual function table
15591         index where the vbase offset lives in the offset field.
15592         * search.c (dfs_walk_real): Make it global.
15593         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
15594         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
15595
15596         * tinfo.h (USItype): Make it signed under the new ABI.
15597         * tinfo.cc (convert_to_base): New function.  Encapsulate base
15598         conversion logic here.
15599         (__class_type_info::do_upcast): Use it.
15600         (__class_type_info::do_dyncast): Likewise.
15601         (__class_type_info::do_find_public_subobj): Likewise.
15602
15603         * init.c (construct_virtual_bases): Don't look up the addresses of
15604         virtual bases at run-time.
15605
15606         * class.c (build_vbase_pointer): Relocate.
15607         (build_vbase_pointer_fields): Likewise.
15608         (dfs_build_vbase_offset_vtbl_entries): Likewise.
15609         (build_vbase_offset_vtbl_entries): Likewise.
15610
15611         * decl.c (init_decl_processing): Complain if -fnew-abi
15612         -fno-vtable-thunks is used.
15613
15614         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
15615         flag_new_abi.
15616
15617 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
15618
15619         * cp-tree.h (num_extra_vtbl_entries): New function.
15620         (size_extra_vtbl_entries): Likewise.
15621         (dfs_vtable_path_unmark): Likewise.
15622         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
15623         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
15624         * class.c (num_extra_vtbl_entries): New function.
15625         (size_extra_vtbl_entries): Likewise.
15626         (dfs_build_vbase_offset_vtbl_entries): New function.
15627         (build_vbase_offset_vtbl_entries): Likewise.
15628         (build_vtbl_initializer): Use it.
15629         (finish_struct_1): Adjust vtable sizes (using
15630         num_extra_vtbl_entries).
15631         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
15632         THUNK_DECL is non-NULL before expanding it.
15633         * init.c (expand_virtual_init): Adjust the vtable pointer by
15634         size_extra_vtbl_entries before storing it.
15635         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
15636         Handle TREE_LIST parameters here, not in the dfs_* functions.
15637         (dfs_unmarked_real_bases_queue_p): Adjust.
15638         (dfs_marked_real_bases_queue_p): Likewise.
15639         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
15640         (dfs_vtable_path_marked_real_bases_queue_p): New function.
15641         (dfs_vtable_path_unmark): Likewise.
15642
15643 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
15644
15645         * optimize.c (copy_body_r): Clear the operand three of a
15646         TARGET_EXPR when copying it.
15647
15648 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15649
15650         * method.c (build_decl_overload_real): Check whether we are in ::
15651         before returning __builtin_new/delete.
15652
15653 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
15654
15655         * pt.c (tsubst_friend_function): Improve comment.
15656         (instantiate_decl): Avoid crashing when a "nested" function is
15657         instantiated from the top level.
15658
15659         * dump.c (dqeueue_and_dump): Dump
15660         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
15661
15662 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15663
15664         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
15665
15666 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
15667
15668         * g++spec.c (lang_specific_driver): Add -fnew-abi if
15669         ENABLE_NEW_GXX_ABI defined.
15670         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
15671         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
15672         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
15673
15674 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
15675
15676         * decl.c (start_cleanup_fn): Call pushdecl.
15677
15678         * call.c (convert_class_to_reference): Fix typos.
15679         (build_conditional_expr): Handle errors gracefully.
15680         * class.c (push_nested_class): Likewise.
15681         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
15682         (DECL_THIS_EXTERN): Use it.
15683         (DECL_THIS_STATIC): Likewise.
15684         * cvt.c (convert_to_void): Handle errors gracefully.
15685         (build_expr_type_conversion): Likewise.
15686         * decl.c (maybe_push_decl): Likewise.
15687         (start_decl_1): Likewise.
15688         (require_complete_types_for_parms): Likewise.
15689         * parse.y (structsp): Likewise.
15690         (base_class): Likewise.
15691         * parse.c: Regenerated.
15692         * pt.c (finish_member_template_decl): Likewise.
15693         * typeck.c (decay_conversion): Likewise.
15694
15695         * cp-tree.h (dfs_skip_vbases): New function.
15696         (find_vbase_instance): Likewise.
15697         * class.c (determine_primary_base): Allow a nearly empty base to
15698         serve as a primary base class under the new ABI.
15699         (get_class_offset_1): Rename to ...
15700         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
15701         messages here.
15702         (get_class_offset): Use it.  Issue error messages here.
15703         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
15704         find the right copies of virtual bases.
15705         (fixup_vtable_deltas1): Rename to ...
15706         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
15707         bases as primary bases.
15708         (fixup_vtable_deltas): Remove.
15709         (override_one_vtable): Handle virtual bases as primary bases.
15710         (merge_overrides): Likewise.
15711         (finish_struct_1): Likewise.
15712         (dump_class_hierarchy): Dump primary-ness of bases as well.
15713         * search.c (mark_primary_bases): Use a pre-order traversal to
15714         handle primary virtual bases.
15715         (dfs_skip_vbases): New fiunction.
15716         (expand_upcast_fixups): Adjust to handle primary virtual bases.
15717         (fixup_virtual_upcast_offsets): Likewise.
15718         (fixup_all_virtual_upcast_offsets): Likewise.
15719         (dfs_find_vbase_instances): New function.
15720         (find_vbase_instance): Likewise.
15721
15722 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
15723
15724         * lex.c (DIR_SEPARATOR): Delete macro.
15725
15726 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
15727
15728        * decl2.c (lang_decode_option): Handle automatic line wrapping
15729        option.
15730
15731 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
15732
15733         * friend.c (do_friend): Don't resolve scopes when processing
15734         template declarations, even if the qualifying scope doesn't
15735         involve template parameters.
15736
15737 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
15738
15739         * class.c (dfs_modify_vtables_queue_p): Remove.
15740         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
15741         and dfs_marked_real_bases_queue_p instead of
15742         dfs_modify_vtables_queue_p.
15743
15744         * class.c (build_vbase_path): Simplify.
15745         (dfs_propagate_binfo_offsets): New function.
15746         (propagate_binfo_offsets): Use it.
15747         (remove_base_field): Simplify.
15748         (dfs_set_offset_for_vbases): Remove.
15749         (dfs_set_offset_for_shared_vbases): New function.
15750         (dfs_set_offset_for_unshared_vbases): Likewise.
15751         (layout_virtual_bases): Use them.
15752         (layout_basetypes): Don't call propagate_binfo_offsets.
15753         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
15754         for the vbases.
15755
15756         * class.c (build_base_field): New function, split out from ...
15757         (build_base_fields): ... here.  Use it.  Allocate primary bases
15758         first, under the new ABI.
15759         (get_vtable_entry): Remove.
15760         (remove_base_field): New function, split out from ...
15761         (remove_base_fields): ... here.  Adjust since primary bases come
15762         first under the new ABI.
15763
15764         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
15765         (initialize_vtbl_ptrs): New function.
15766         (expand_indirect_vtbls_init): Change prototype.
15767         (convert_pointer_to_vbase): Declare.
15768         * init.c (expand_direct_vtbls_init): Remove.
15769         (dfs_initialize_vtbl_ptrs): New function.
15770         (initialize_vtbl_ptrs): Likewise.
15771         (emit_base_init): Use initialize_vtbl_ptrs.
15772         * search.c (convert_pointer_to_vbase): Make it global.
15773         (expand_indirect_vtbls_init): Remove vtable initialization code.
15774         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
15775
15776         * class.c (dfs_finish_vtbls): New function.
15777         (finish_vtbls): Use it.
15778         (dump_class_hierarchy): New function.
15779
15780         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
15781         (BINFO_VBASE_PRIMARY_P): New macro.
15782         (BINFO_VIRTUALS): Add to documentation.
15783         (SET_BINFO_PRIMARY_MARKED_P): Remove.
15784         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
15785         (dfs_mark_primary_bases_queue_p): Likewise.
15786         (dfs_unmarked_real_bases_queue_p): New function.
15787         (dfs_marked_real_bases_queue_p): Likewise.
15788         * search.c (dfs_mark_primary_bases): Adjust.
15789         (mark_primary_bases): Likewise.
15790         (get_shared_vbase_if_not_primary): New function.
15791         (dfs_unmarked_real_bases_queue_p): Likewise.
15792         (dfs_marked_real_bases_queue_p): Likewise.
15793         (dfs_get_pure_virtuals): Simplify.
15794         (get_pure_virtuals): Likewise.
15795
15796 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15797
15798         * lex.c: Include tm_p.h.
15799
15800 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
15801
15802         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
15803
15804 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
15805
15806         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
15807         * pt.c (instantiate_decl): Defer comdat templates that might not be
15808         needed.
15809
15810         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
15811         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
15812         (finish_file): Likewise.
15813
15814         * decl2.c (import_export_class): Undo 12/14 change.
15815
15816         * error.c (dump_decl): operator new, not operatornew.
15817
15818         * class.c (field_decl_cmp): A nontype is "greater" than a type.
15819         * search.c (lookup_field_1): Look for the last field with the
15820         desired name.
15821
15822 2000-01-05  Nathan Sidwell  <nathan@acm.org>
15823
15824         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
15825         FUNCTION_DECL.
15826
15827 2000-01-05  Nathan Sidwell  <nathan@acm.org>
15828
15829         * typeck.c (build_static_cast): Don't strip target qualifiers
15830         when casting from a class.
15831
15832 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15833
15834         * class.c (warn_hidden): Initialize variable `fndecl'.
15835
15836 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
15837
15838         * decl.c (flag_isoc9x): New variable to be able to use code in
15839         c-common.c.  For now always zero.
15840
15841 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
15842
15843         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
15844         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
15845         or unshare_base_binfos for virtual bases here.
15846         * search.c (dfs_get_vbase_types): Do it here.
15847         (get_vbase_types): Adjust.
15848
15849 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
15850
15851         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
15852         (BINFO_PRIMARY_MARKED_P): Use flag 5.
15853         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
15854         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
15855         (unmark_primary_bases): Remove declaration.
15856         (unmarkedp): Declare.
15857         (dfs_vbase_unmark): Likewise.
15858         * class.c (determine_primary_base): Return immediately if there
15859         are no base classes.  Call mark_primary_bases here.
15860         (modify_all_direct_vtables): Remove.
15861         (modify_all_indirect_vtables): Remove.
15862         (dfs_modify_vtables_queue_p): New function.
15863         (dfs_modify_vtables): New function.
15864         (modify_all_vtables): Use them.
15865         (build_base_fields): Build FIELD_DECLs for primary virtual base
15866         classes.
15867         (create_vtable_ptr): Don't call determine_primary_base here.
15868         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
15869         (dfs_set_offset_for_vbases): ... this.
15870         (layout_virtual_bases): Use it.
15871         (layout_class_type): Call determine_primary_base here.
15872         * search.c (unmarkedp): Make it global.
15873         (shared_marked_p): Simplify.
15874         (shared_unmarked_p): Likewise.
15875         (dfs_primary_bases_queue_p): Remove.
15876         (dfs_unmark_primary_bases): Likewise.
15877         (unmark_primary_bases): Likewise.
15878         (mark_primary_bases): Simplify.
15879         (get_pure_virtuals): Don't call mark_primary_bases here.
15880         (dfs_vbase_unmark): New function.
15881         (get_vbase_types): Simplify.
15882
15883         * class.c (struct base_info): Remove.
15884         (determine_primary_base): Take has_virtual_p rather than a
15885         base_info as input.  Don't calculate max_has_virtual.
15886         (finish_struct_bits): Remove max_has_virtual argument.
15887         (create_vtable_ptr): Remove max_has_virtual_p argument.
15888         (layout_virtual_bases): Remove max argument.
15889         (layout_basetypes): Likewise.
15890         (layout_class_type): Remove max_has_virtual_p argument.
15891         (finish_struct_1): Remove max_has_virtual.
15892
15893         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
15894         (layout_basetypes): Remove.
15895         * class.c (propagate_binfo_offsets): Moved here from tree.c.
15896         Update to handle primary virtual bases.
15897         (remove_base_fields): New function, split out from
15898         layout_basetypes.
15899         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
15900         (layout_virtual_bases): New function, split out from
15901         layout_basetypes.  Update to handle primary virtual bases.
15902         (layout_basetypes): Moved here from tree.c.  Use
15903         remove_base_fields and layout_virtual_bases.
15904         * search.c (dfs_mark_primary_bases_queue_p): New function.
15905         (mark_primary_bases): Use it.
15906         * tree.c (CEIL): Remove.
15907         (propagate_binfo_offsets): Remove.
15908         (layout_basetypes): Remove.
15909
15910 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
15911
15912         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
15913         (BINFO_PRIMARY_MARKED_P): New macro.
15914         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
15915         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
15916         (mark_primary_bases): New function.
15917         (unmark_primary_bases): Likewise.
15918         * search.c (get_abstract_virtuals_1): Remove.
15919         (dfs_mark_primary_bases): New function.
15920         (mark_primary_bases): Likewise.
15921         (dfs_unmark_primary_bases): Likewise.
15922         (unmark_primary_bases): Likewise.
15923         (dfs_get_pure_virtuals): Likewise.
15924
15925 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
15926
15927         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
15928         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
15929         (modify_one_vtable): Adjust.
15930         (fixup_vtable_deltas1): Likewise.
15931         (override_one_vtable): Likewise.
15932         * search.c (get_abstract_virtuals_1): Likewise.
15933         (get_pure_virtuals): Likewise.
15934         (expand_upcast_fixups): Likewise.
15935         * tree.c (debug_binfo): Likewise.
15936
15937         * class.c (build_vtable): Don't return a value.  Don't rebuild
15938         vtables for bases that have already been handled.
15939         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
15940         already been handled.
15941         (modify_one_vtable): Adjust accordingly.
15942         (fixup_vtable_deltas1): Likewise.
15943         (finish_struct_1): Likewise.
15944
15945 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15946
15947         * call.c (build_new_method_call): Also check destructors.