parser.c (cp_parser_sizeof_operand): Do not evaluate the expression.
[gcc.git] / gcc / cp / ChangeLog
1 2003-01-02 Mark Mitchell <mark@codesourcery.com>
2
3 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
4 expression.
5
6 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
7
8 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
9 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
10 cp/repo.c: Fix copyright years.
11
12 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
13
14 * lex.c: Remove superfluous include of cpplib.h.
15 (CONSTRAINT): Define without conditions.
16 (init_cp_pragma): Use c_register_pragma.
17
18 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
19
20 * .cvsignore: Remove.
21
22 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
23
24 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
25 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
26 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
27 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
28 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
29 copyright header.
30 * lex.h: parse.y is dead, so don't mention it. Also replace the
31 copyright header with the default GNU copyright header.
32
33 2002-12-31 Mark Mitchell <mark@codesourcery.com>
34
35 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
36 (lookup_name_namespace_only): Likewise.
37 (begin_only_namespace_names): Likewise.
38 (end_only_namespace_names): Likewise.
39 * decl.c (only_namespace_names): Remove.
40 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
41 (lookup_name_real): Do not check only_namespace_names.
42 (lookup_name_namespace_only): Remove.
43 (begin_only_namespace_names): Likewise.
44 (end_only_namespace_names): Likewise.
45 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
46 nested-name-specifiers more gracefully.
47 (cp_parser_class_or_namespace_name): Avoid looking up namespace
48 names when they cannot possibly appear.
49 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
50 (cp_parser_elaborated_type_specifier): Likewise.
51 (cp_parser_namespace_name): Only look for namespace names.
52 (cp_parser_lookup_name): Add is_namespace parameter.
53 (cp_parser_lookup_name_simple): Adjust call to
54 cp_parser_lookup_name.
55
56 * parser.c (cp_parser_dependent_type_p): Fix thinko.
57
58 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
59
60 * .cvsignore: Update.
61
62 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
63
64 * class.c (modify_vtable_entry): Remove unused variable.
65 (get_vcall_index): Always expect a non-thunk.
66 (update_vtable_entry_for_fn): Combine covariant adjustments, when
67 overriding a thunk. Pass get_vcall_index a non-thunk.
68
69 * decl2.c (finish_file): Mark undefined inlines as extern.
70
71 2002-12-31 Mark Mitchell <mark@codesourcery.com>
72
73 * cp-tree.def (RETURN_INIT): Remove.
74 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
75 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
76 (note_level_for_for): Remove.
77 (note_level_for_try): Likewise.
78 (note_level_for_catch): Likewise.
79 (finish_named_return_value): Likewise.
80 (do_pushlevel): Change prototype.
81 (pending_lang_change): Remove.
82 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
83 sk_for.
84 (note_level_for_for): Remove.
85 (note_level_for_try): Likewise.
86 (note_level_for_catch): Likewise.
87 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
88 * parser.c (cp_parser_context_free_list): Make it "deletable".
89 (cp_parser_template_argument): Remove misleading comment.
90 * pt.c (tsubst_expr): Remove RETURN_INIT code.
91 * semantics.c (genrtl_named_return_value): Remove.
92 (do_pushlevel): Take a scope kind as an argument.
93 (begin_if_stmt): Adjust.
94 (begin_while_stmt): Likewise.
95 (begin_for_stmt): Likewise.
96 (finish_for_init_stmt): Likewise.
97 (begin_switch_stmt): Likewise.
98 (begin_handler): Likewise.
99 (begin_compound_stmt): Likewise.
100 (finish_named_return_value): Remove.
101 (cp_expand_stmt): Remove RETURN_INIT case.
102 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
103
104 2002-12-31 Mark Mitchell <mark@codesourcery.com>
105
106 PR c++/9112
107 * parser.c (cp_parser_direct_declarator): Handle erroneous
108 parenthesized declarators correctly.
109
110 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
111
112 * cp-tree.h (pending_lang_change): Declare.
113
114 2002-12-30 Mark Mitchell <mark@codesourcery.com>
115
116 * parser.c (cp_parser_context_free_list): New variable.
117 (cp_parser_context_new): Use it.
118 (cp_parser_error): Check return code from
119 cp_parser_simulate_error.
120 (cp_parser_simulate_error): Return a value.
121 (cp_parser_id_expression): Optimize common case.
122 (cp_parser_class_name): Likewise.
123 (cp_parser_class_specifier): Adjust call to
124 cp_parser_late_parsing_default_args.
125 (cp_parser_lookup_name): Optimize common case.
126 (cp_parser_late_parsing_for_member): Adjust call to
127 cp_parser_late_parsing_default_args.
128 (cp_parser_late_parsing_default_args): Add scope parameter.
129 (cp_parser_require): Avoid creating the error message unless it's
130 needed.
131 (cp_parser_parse_definitely): Place free'd contexts on the free
132 list.
133
134 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
135
136 2002-12-30 David Edelsohn <edelsohn@gnu.org>
137
138 * parser.c (cp_parser_parameter_declaration_clause): Treat system
139 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
140
141 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
142
143 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
144 GCC, not GNU CC.
145
146 2002-12-30 Mark Mitchell <mark@codesourcery.com>
147
148 * parse.y: Remove.
149 * spew.c: Likewise.
150 * Make-lang.in (gt-cp-spew.h): Remove.
151 * cp-tree.h (do_pending_lang_change): Remove.
152 (do_identifier): Change prototype.
153 (finish_id_expr): Remove.
154 * decl.c (lookup_name_real): Remove yylex variable.
155 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
156 * lex.c (init_cpp_parse): Remove.
157 (reduce_cmp): Likewise.
158 (token_cmp): Likewise.
159 (yychar): Likewise.
160 (lastiddecl): Likewise.
161 (token_count): Likewise.
162 (reduce_count): Likewise.
163 (yyhook): Likewise.
164 (print_parse_statistics): Likewise.
165 (do_pending_lang_change): Likewise.
166 (do_identifier): Remove parsing parameter.
167 * lex.h (lastiddecl): Remove.
168 (looking_for_typename): Remove.
169 (looking_for_template): Likewise.
170 (pending_lang_change): Likewise.
171 (yylex): Likewise.
172 * semantics.c (finish_id_expr): Remove.
173
174 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
175 thread" correctly.
176
177 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
178
179 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
180 end, not the C front end.
181
182 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
183
184 * cp-tree.h (THUNK_TARGET): New macro.
185 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
186 (finish_thunk): Remove offset parms.
187 * class.c (find_final_overrider): Look through thunks.
188 (get_vcall_index): Use THUNK_TARGET.
189 (update_vtable_entry_for_fn): Look through thunks. Set covariant
190 fixed offset here. Adjust finish_thunk call.
191 (build_vtbl_initializer): Adjust finish_thunk calls.
192 * mangle.c (mangle_call_offset): Remove superfluous if.
193 (mangle_thunk): Adjust.
194 * method.c (make_thunk): Adjust.
195 (finish_thunk): Adjust.
196 (thunk_adjust): Remove assert.
197 (use_thunk): Use THUNK_TARGET
198 * dump1.c (cp_dump_tree): Adjust thunk dumping.
199
200 PR c++/9054
201 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
202 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
203
204 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
205
206 Remove traditional C constructs 4/n.
207 * decl2.c (grok_method_quals, warn_if_unknown_interface,
208 grok_x_components, cp_build_parm_decl, build_artificial_parm,
209 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
210 delete_sanity, check_member_template, check_java_method,
211 check_classfn, finish_static_data_member_decl, grokfield,
212 grokbitfield, grokoptypename, grok_function_init,
213 cplus_decl_attributes, constructor_name, defer_fn,
214 build_anon_union_vars, finish_anon_union, coerce_new_type,
215 coerce_delete_type, comdat_linkage, maybe_make_one_only,
216 key_method, import_export_vtable, import_export_class,
217 output_vtable_inherit, import_export_decl, import_export_tinfo,
218 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
219 set_guard, start_objects, finish_objects,
220 start_static_storage_duration_function,
221 finish_static_storage_duration_function, get_priority_info,
222 start_static_initialization_or_destruction,
223 finish_static_initialization_or_destruction,
224 do_static_initialization, do_static_destruction,
225 prune_vars_needing_no_initialization, write_out_vars,
226 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
227 add_using_namespace, merge_functions, ambiguous_decl,
228 lookup_using_namespace, lookup_using_namespace,
229 qualified_lookup_using_namespace, set_decl_namespace,
230 decl_namespace, current_decl_namespace, push_decl_namespace,
231 pop_decl_namespace, push_scope, pop_scope, add_function,
232 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
233 lookup_arg_dependent, do_namespace_alias,
234 validate_nonmember_using_decl, do_nonmember_using_decl,
235 do_toplevel_using_decl, do_local_using_decl,
236 do_class_using_decl, do_using_directive, check_default_args,
237 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
238 * parser.c (cp_parser_class_head): Use booleanss.
239 * decl.c (walk_globals, walk_vtables): Likewise.
240 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
241 walk_globals): Change return type from 'int' to 'bool'.
242 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
243 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
244 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
245 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
246 qualifier_flags, tinfo_base_init, generic_initializer,
247 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
248 dfs_class_hint_unmark, class_hint_flags, class_initializer,
249 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
250 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
251 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
252 * repo.c (repo_compile_flags, repo_template_declared,
253 repo_template_defined, repo_class_defined, repo_get_id,
254 repo_template_used, repo_vtable_used, repo_inline_used,
255 repo_tinfo_used, repo_template_instantiated, extract_string,
256 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
257 finish_repo): Likewise.
258 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
259 cxx_print_xnode): Likewise..
260 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
261 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
262 * cxxfilt.c (demangle_it, print_demangler_list, usage,
263 standard_symbol_characters, hp_symbol_characters, main, fatal):
264 Likewise.
265 (strip_underscore): Change type from 'int' to 'bool'.
266 (main): Use boolean constants.
267
268 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
269
270 Remove traditional C constructs 3/n.
271 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
272 build_up_reference, warn_ref_binding, convert_to_reference,
273 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
274 convert_to_void, convert, convert_force, build_type_conversion,
275 build_expr_type_conversion, type_promotes_to,
276 perform_qualification_conversions): Use C90 prototyping style.
277 * decl2.c (grok_array_decl): Use boolean constant.
278 (delete_sanity): Likewise.
279 * typeck.c (build_unary_op): Likewise.
280 * semantics.c (finish_switch_cond): Likewise.
281 * parser.c (cp_parser_direct_new_declarator): Likewise.
282 * init.c (build_new): Likewise.
283
284 2002-12-27 Mark Mitchell <mark@codesourcery.com>
285
286 * Make-lang.in (po-generated): Remove parse.c.
287 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
288 ($(srcdir)/cp/parse.h): Remove target.
289 ($(srcdir)/cp/parse.c): Likewise.
290 (gt-cp-parse.h): Likewise.
291 (gt-cp-parser.h): New target.
292 (c++.distclean): Do not remove parse.output.
293 (c++.maintainer-clean): Do not remove parse.c or parse.h.
294 (cp/spew.o): Remove target.
295 (cp/lex.o): Adjust dependencies.
296 (cp/pt.o): Likewise.
297 (cp/parse.o): Likewise.
298 (cp/TAGS): Do not mention parse.c.
299 (cp/parser.o): New target.
300 * NEWS: Mention the new parser.
301 * call.c (build_scoped_method_call): Simplify.
302 (build_method_call): Likewise.
303 (build_new_function_call): Adjust calls to add_function_candidate
304 and add_template_candidate.
305 (build_new_op): Improve handling of erroroneous operands.
306 (convert_default_arg): Remove circular argument processing.
307 (name_as_c_string): New function.
308 (build_new_method_call): Use it.
309 (perform_implicit_conversion): Use error_operand_p.
310 * class.c (finish_struct_anon): Use constructor_name_p.
311 (check_field_decls): Likewise.
312 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
313 (resolve_address_of_overloaded_function): Likewise.
314 (instantiate_type): Tweak pointer-to-member handling.
315 (get_primary_binfo): Remove incorrect assertion.
316 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
317 * cp-tree.h (DEFARG_TOKENS): New macro.
318 (default_arg): New structure.
319 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
320 (lang_tree_node): Add default_arg.
321 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
322 (type_info_ref_type): New macro.
323 (saved_scope): Make processing_explicit_instantiation a boolean.
324 (check_access): New field.
325 (unparsed_text): Remove.
326 (language_function): Remove unparsed_inlines.
327 (error_operand_p): New macro.
328 (lang_decl): Adjust pending_inline_info.
329 (DEFARG_POINTER): Remove.
330 (tag_types): Add typenames.
331 (lookup_ualified_name): Declare.
332 (lookup_name_real): Likewise.
333 (shadow_tag): Adjust prototype.
334 (get_scope_of_declarator): Declare it.
335 (process_next_inline): Remove it.
336 (check_for_missing_semicolon): Likewise.
337 (maybe_get_template_decl_from_type_decl): Declare it.
338 (finish_label_stmt): Adjust prototype.
339 (finish_non_static_data_meber): Declare it.
340 (finish_pseudo_destructor_call_expr): Rename to ...
341 (finish_pseudo_destructor_expr): ... this.
342 (finish_compound_literal): Declare it.
343 (begin_inline_definitions): Remove it.
344 (init_spew): Remove.
345 (peekyylex): Likewise.
346 (arbitrate_lookup): Likewise.
347 (frob_opname): Likewise.
348 (maybe_snarf_defarg): Likewise.
349 (add_defarg_fn): Likewise.
350 (do_pending_defargs): Likewise.
351 (done_pending_defargs): Likewise.
352 (unprocessed_defarg_fn): Likewise.
353 (replace_defarg): Likewise.
354 (end_input): Likewise.
355 (get_overloaded_fn): Likewise.
356 * cvt.c (convert_to_reference): Improve error handling.
357 * decl.c (lookup_name_real): Do not declare it static.
358 (maybe_push_to_top_level): Set check_access.
359 (identifier_type_value): Adjust call to lookup_name_real.
360 (lookup_qualified_name): New method.
361 (lookup_name_real): Remove special-case parsing code.
362 (lookup_name-nonclass): Adjust call to lookup_name_real.
363 (lookup_name_namespace_only): Likewise.
364 (lookup_name): Likewise.
365 (check_tag_decl): Return the type declared.
366 (shadow_tag): Likewise.
367 (register_dtor_fn): Tweak check_access.
368 (grokfndecl): Use constructor_name_p.
369 (get_scope_of_declarator): New function.
370 (grokdeclarator): Obscure tweaks for slightly different declarator
371 representations.
372 (start_method): Return error_mark_node to indicate failure.
373 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
374 * decl2.c (constructor_name_full): Simplify.
375 (constructor_name): Use it.
376 (build_expr_from_tree): Adjust for changes to do new parser.
377 (push_scope): Improve robustness.
378 (validate_nonmember_using_decl): Process declarations, not names.
379 (do_class_using_decl): Likewise.
380 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
381 here.
382 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
383 * expr.c (cxx_expand_expr): Handle BASELINKs.
384 * init.c (member_init_ok_or_else): Issue more errors.
385 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
386 * lex.c: Do not include parse.h.
387 (yypring): Do not declare.
388 (yylval): Likewise.
389 (make_reference_declarator): Remove error-generating code.
390 (rid_to_yy): Remove.
391 (cxx_init): Do not call init_spew.
392 (yypring): Remove.
393 (check_for_missing_semicolon): Remove.
394 * lex.h (got_scope): Remove.
395 (got_object): Remove.
396 * method.c (hack_identifier): Use finish_non_static_data_member.
397 (implicitly_declare_fn): Adjust use of constructor_name.
398 * parser.c: New file.
399 * pt.c (parse.h): Do not include it.
400 (maybe_get_template_decl_from_template): Do not declare it.
401 (finish_member_template_decl): Tweak.
402 (begin_explicit_instantiation): Adjust for
403 processing_explicit_instantiation being boolean.
404 (end_explicit_instantiation): Likewise.
405 (maybe_process_partial_specialization): Tighten specialization
406 test.
407 (retrieve_local_specialization): Adjust ue of hash table.
408 (eq_local_specializations): New function.
409 (register_local_specialization): Likewise.
410 (push_template_decl_real): Remove unnecessary test.
411 (maybe_get_template_decl_from_type_decl): Don't make it static.
412 (for_each_template_parm_r): Handle TYPEOF_TYPE.
413 (tsubst_copy): Use retrieive_local_specialization to handle
414 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
415 Handle COMPONENT_REFs with pseudo-destructor-expressions.
416 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
417 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
418 (unify): Tweak handling of CONST_DECLs.
419 (regenerate_decl_from_template): Use push_nested_class.
420 (template_for_substitution): New funciton.
421 (instantiate_decl): Use it. Register parameters as local
422 specializations.
423 * rtti.c (init_rtti_processing): Set type_info_ref_type.
424 (build_typeid): Use it.
425 (get_typeid): Likeise.
426 * search.c (accessible_p): Use check_access, not
427 flag_access_control.
428 (adjust_result_of_qualified_name_lookup): Pay attention to the
429 context_class.
430 * semantics.c (finish_asm_stmt): Adjust error handling.
431 (finish_label_stmt): Return the statement.
432 (finish_non_static_data_member): New function.
433 (finish_class_expr): Handle BASELINKs.
434 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
435 (finish_object_call_expr): Simplify handling during templates.
436 (finish_pseudo_destructor_call_expr): Rename to ...
437 (finish_pseudo_dtor_expr): ... this.
438 (finish_compound_literal): New function.
439 (begin_inline_definitions): Remove.
440 (finish_sizeof): Remove special template handling.
441 * spew.c: Do not include parse.h.
442 * tree.c (get_overloaded_fn): Remove.
443 * typeck.c (build_class_member_access_expr): Handle
444 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
445 (lookup_destructor): New function.
446 (finish_class_member_access_expr): Use it.
447 (convert_arguments): Simplify.
448 (build_unary_op): Handle BASELINKs.
449
450 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
451
452 PR c++/4803
453 * decl2.c (mark_used): Defer inline functions.
454 (finish_file): Merge deferred_fns loops. Check all used
455 inline functions have a definition.
456 * method.c (make_thunk): Thunks are not inline.
457
458 PR c++/5116, c++/764
459 * call.c (build_new_op): Make sure template class operands are
460 instantiated.
461
462 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
463
464 PR C++/7964
465 * cp-tree.h (resolve_scoped_fn_name): Prototype.
466 * call.c (resolve_scoped_fn_name): New function. Deal with
467 more template expansion. Broken out of ...
468 * parse.y (parse_finish_call_expr): ... here. Call it.
469 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
470 resolve_scoped_fn_name and build_call_from_tree.
471
472 PR c++/9053
473 * decl.c (duplicate_decls): Templates may be disambiguated by
474 return type.
475
476 PR c++/8702
477 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
478 conversion operators on failure.
479
480 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
481
482 Remove traditional C constructs 2/n.
483 * call.c (tourney, build_field_call, equal_functions, joust,
484 compare_ics, build_over_call, build_java_interface_fn_ref,
485 convert_like_real, op_error, build_object_call, resolve_args,
486 build_vfield_ref, check_dtor_name, build_scoped_method_call,
487 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
488 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
489 standard_conversion, reference_related_p,
490 reference_compatible_p, convert_class_to_reference,
491 direct_reference_binding, reference_binding,
492 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
493 add_template_conv_candidate, any_viable, any_strictly_viable,
494 build_this, splice_viable, print_z_candidates,
495 build_user_type_conversion, build_new_function_call,
496 conditional_conversion, build_conditional_expr, build_new_op,
497 build_op_delete_call, enforce_access, call_builtin_trap,
498 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
499 convert_default_arg, type_passed_as, convert_for_arg_passing,
500 in_charge_arg_for_name, is_properly_derived_from,
501 maybe_handle_implicit_object, maybe_handle_ref_bind,
502 source_type, add_warning, can_convert, can_convert_arg,
503 perform_implicit_conversion, can_convert_arg_bad,
504 initialize_reference, add_conv_candidate,
505 add_template_candidate_real, add_template_candidate): Ansify.
506
507 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
508
509 PR c++/8572
510 * cp-tree.h (grokoptypename): Add SCOPE parameter.
511 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
512 if in a template scope.
513 * parse.y (unoperator): Return the scope.
514 (operator_name): Adjust grokoptypename call.
515
516 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
517
518 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
519 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
520 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
521
522 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
523
524 * ChangeLog: Fix a typo.
525 * class.c: Fix comment typos.
526 * cp-tree.h: Likewise.
527
528 2002-12-18 Jason Merrill <jason@redhat.com>
529
530 Handle anonymous unions at the tree level.
531 C++ ABI change: Mangle anonymous unions using the name of their
532 first named field (by depth-first search). Should not cause
533 binary compatibility problems, though, as the compiler previously
534 didn't emit anything for affected unions.
535 * cp-tree.def (ALIAS_DECL): New tree code.
536 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
537 first field, not the largest.
538 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
539 push the decl, and write it out at namespace scope.
540 * decl.c (lookup_name_real): See through an ALIAS_DECL.
541 (pushdecl): Add namespace bindings for ALIAS_DECLs.
542 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
543 of a decl which doesn't have one.
544 * typeck.c (build_class_member_access_expr): Don't recurse if
545 we already have the type we want.
546
547 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
548
549 PR c++/8099
550 * friend.c (make_friend_class): Allow partial specialization
551 when declaration is not a template friend.
552
553 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
554
555 PR c++/3663
556 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
557 TREE_PROTECTED to created decl nodes.
558
559 2002-12-18 Mark Mitchell <mark@codesourcery.com>
560
561 * class.c (build_base_field): Do not set DECL_PACKED on the
562 FIELD_DECL.
563
564 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
565
566 * cp-tree.h (struct tree_srcloc): Use location_t.
567 (SOURCE_LOCUS): New.
568 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
569
570 2002-12-17 Jason Merrill <jason@redhat.com>
571
572 * decl.c (finish_function): Also complain about no return in
573 templates.
574 * semantics.c (finish_return_stmt): Also call check_return_expr in
575 templates.
576 * typeck.c (check_return_expr): In a template, just remember that we
577 saw a return.
578
579 2002-12-16 Jason Merrill <jason@redhat.com>
580
581 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
582 of the CALL_EXPR.
583
584 * semantics.c (do_pushlevel): Call pushlevel after adding the
585 SCOPE_STMT.
586 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
587 * parse.y (function_body): Go back to using compstmt.
588 * decl.c (pushdecl): Skip another level to get to the parms level.
589
590 * call.c (build_new_method_call): Use is_dummy_object to determine
591 whether or not to evaluate the object parameter to a static member
592 function.
593
594 2002-12-14 Jason Merrill <jason@redhat.com>
595
596 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
597 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
598 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
599 don't bother with an AGGR_INIT_EXPR.
600 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
601 just generate a new decl normally. Take return slot parm.
602 * cp-tree.h: Adjust prototype.
603
604 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
605
606 PR C++/8031
607 * cvt.c (convert_to_pointer_force): Don't try comparing against
608 erronous type.
609
610 2002-12-13 Geoffrey Keating <geoffk@apple.com>
611
612 * cp-tree.h: Have the multiple-include guards around
613 the entire file.
614
615 2002-12-10 David Edelsohn <edelsohn@gnu.org>
616
617 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
618 for SPEW_DEBUG.
619 (snarf_method): Same.
620 (snarf_defarg): Same.
621
622 2002-12-10 Mark Mitchell <mark@codesourcery.com>
623
624 PR c++/8372
625 * pt.c (tsubst_copy): Handle destructor names more correctly.
626
627 2002-12-10 Matt Austern <austern@apple.com>
628
629 * cp-tree.h: get rid of needs_virtual_reinit bit.
630
631 2002-12-09 Mark Mitchell <mark@codesourcery.com>
632
633 * NEWS: Document removal of in-class initialization extension for
634 static data members of non-arithmetic, non-enumeration type.
635 * decl.c (check_static_variable_definition): Do not allow that
636 extension.
637 * decl2.c (grokfield): Do not call digest_init when processing
638 templates.
639
640 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
641
642 * error.c (dump_expr): Fix format specifier warning.
643
644 2002-12-04 Geoffrey Keating <geoffk@apple.com>
645
646 * class.c (finish_struct_1): Correct comment.
647 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
648
649 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
650
651 PR C++/8799
652 * error.c (dump_expr): Don't ever try to dump a non-existent
653 expression.
654
655 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
656
657 Implement covariant returns.
658 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
659 (struct lang_decl_flags): Add this_thunk_p flag.
660 Rename vcall_offset to virtual_offset.
661 (struct lang_decl): Rename delta to fixed_offset.
662 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
663 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
664 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
665 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
666 (make_thunk): Add this_adjusting arg.
667 (finish_thunk): Declare.
668 (mangle_thunk): Add this_adjusting arg.
669 * class.c (get_vcall_index): Use base function for lookup.
670 (update_vtable_entry_for_fn): Generate covariant thunk.
671 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
672 (build_vtbl_initializer): Use base function for lookup.
673 Finish covariant thunk here. Adjust thunk generation.
674 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
675 Adjust thunk dumping.
676 * mangle.c (mangle_call_offset): New function.
677 (mangle_thunk): Adjust for covariant thunks.
678 * method.c (make_thunk): Adjust. Do not set name here.
679 (finish_thunk): New function. Set name here.
680 (use_thunk): Generate covariant thunks too.
681 (thunk_adjust): New function.
682 * search.c (covariant_return_p): Remove. Fold into ...
683 (check_final_overrider): ... here. Simplify.
684 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
685
686 2002-12-03 Jason Merrill <jason@redhat.com>
687
688 PR c++/8674
689 * call.c (build_over_call): Check specifically for TARGET_EXPR
690 when eliding.
691
692 PR c++/8461, c++/8625
693 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
694 (cp_convert_parm_for_inlining): Remove.
695 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
696 Remove.
697 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
698 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
699
700 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
701 an ambiguous conversion.
702
703 2002-12-03 Mark Mitchell <mark@codesourcery.com>
704
705 PR c++/8688
706 * decl.c (reshape_init): Handle erroneous initializers.
707
708 2002-12-02 Mark Mitchell <mark@codesourcery.com>
709
710 PR c++/8720
711 * spew.c (remove_last_token): Make sure that last_chunk is set
712 correctly.
713
714 PR c++/8615
715 * error.c (dump_expr): Handle character constants with
716 TREE_OVERFLOW set.
717
718 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
719
720 DR 180
721 * decl.c (grokdeclarator): Require class-key for all friend class.
722 Output the correct type and context in the error message.
723
724 2002-12-01 Mark Mitchell <mark@codesourcery.com>
725
726 PR c++/5919
727 * pt.c (unify): Use variably_modified_type_p to test validity of
728 template argument types.
729
730 PR c++/8727
731 * cp-tree.h (lang_type_class): Add typeinfo_var.
732 (CLASSTYPE_TYPEINFO_VAR): New macro.
733 * rtti.c (get_tinfo_decl): Use it.
734
735 PR c++/8663
736 * init.c (expand_member_init): Always get the main variant of a
737 base class.
738
739 2002-12-01 Mark Mitchell <mark@codesourcery.com>
740
741 PR c++/8332
742 PR c++/8493
743 * decl.c (cxx_init_decl_processing): Use size_type_node, not
744 c_size_type_node.
745 * decl2.c (coerce_new_type): Likewise.
746 * except.c (do_allocate_exception): Likewise.
747
748 2002-11-30 Zack Weinberg <zack@codesourcery.com>
749
750 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
751 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
752 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
753 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
754 typeck2.c: Include coretypes.h and tm.h.
755 * Make-lang.in: Update dependencies.
756
757 2002-11-30 Mark Mitchell <mark@codesourcery.com>
758
759 PR c++/8227
760 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
761 (check_initializer): Validate the type of the initialized
762 variable, even if the initializer is absent.
763 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
764
765 PR c++/8214
766 * typeck.c (convert_for_assignment): Do not use
767 decl_constant_value on the operand.
768
769 PR c++/8511
770 * pt.c (instantiate_decl): Handle template friends defined outside
771 of the class correctly.
772
773 2002-11-29 Joe Buck <jbuck@synopsys.com>
774
775 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
776 anonymous structs.
777
778 2002-11-29 Mark Mitchell <mark@codesourcery.com>
779
780 * class.c (walk_subobject_offsets): Recur on binfos as well as on
781 types.
782 (layout_nonempty_base_or_field): Pass it a binfo when processing a
783 base class.
784 (layout_empty_base): Likewise.
785 (build_base_field): Likewise.
786
787 2002-11-27 Mark Mitchell <mark@codesourcery.com>
788
789 * class.c (build_base_field): Make sure we get the canonical base
790 when descending through primary bases.
791
792 2002-11-26 Geoffrey Keating <geoffk@apple.com>
793
794 * decl.c (check_initializer): Don't error on initialisation of
795 a scalar with a brace-enclosed expression.
796
797 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
798
799 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
800 (template_parms_equal): Remove prototype.
801 * typeck.c (buuld_indirect_ref): Reformat.
802
803 2002-11-25 Jason Merrill <jason@redhat.com>
804
805 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
806 and a DO_STMT.
807
808 2002-11-25 Mark Mitchell <mark@codesourcery.com>
809
810 * tree.c (cp_build_qualified_type_real): Correct handling of
811 array types.
812 * class.c (walk_subobject_offsets): Fix thinko.
813 (build_base_field): Record offsets of empty bases in primary
814 virtual bases.
815 (layout_class_type): Record offsets of empty bases in fields.
816
817 * search.c (is_subobject_of_p_1): Fix thinko.
818 (lookup_field_queue_p): Likewise.
819
820 2002-11-24 Mark Mitchell <mark@codesourcery.com>
821
822 * class.c (layout_class_type): Reuse tail padding when laying out
823 virtual bases.
824
825 2002-11-22 Mark Mitchell <mark@codesourcery.com>
826
827 * rtti.c (qualifier_flags): Fix thinko.
828
829 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
830
831 Remove traditional C constructs 1/n.
832 * cp-tree.h (init_method, set_mangled_name_for_decl,
833 build_opfncall, hack_identifier, make_thunk, use_thunk,
834 synthesize_method, implicitly_declare_fn,
835 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
836 maybe_clone_body): Remove use of PARAMS.
837
838 * method.c (do_build_assign_ref, do_build_copy_constructor,
839 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
840 Likewise.
841 (synthesize_method): Use 'bool' type and constants instead of
842 'int'.
843 (locate_copy): Likewise.
844 (implicitly_declare_fn): Likewise.
845
846 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
847 Remove old-style declaration.
848 (maybe_clone_body): Use 'bool' type and constants.
849
850 2002-11-21 Glen Nakamura <glen@imodulo.com>
851
852 PR c++/8342
853 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
854 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
855 of the branches of a COND_EXPR.
856
857 2002-11-19 Mark Mitchell <mark@codesourcery.com>
858
859 * pt.c (for_each_template_parm): Free allocated memory.
860 * search.c (is_subobject_of_p_1): New function.
861 (is_subobject_of_p): Avoid walking virtual bases multiple times.
862
863 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
864
865 * g++spec.c (lang_specific_spec_functions): New.
866
867 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
868
869 * ChangeLog: Follow spelling conventions.
870 * class.c: Likewise.
871 * decl2.c: Likewise.
872
873 2002-11-14 Zack Weinberg <zack@codesourcery.com>
874
875 * search.c (dfs_push_decls): Do not try to reorder elements
876 3..n of method_vec if method_vec has only two elements.
877 Reverse order of two tests to avoid accessing unallocated
878 memory.
879
880 2002-11-14 Mark Mitchell <mark@codesourcery.com>
881
882 * class.c (dfs_find_final_overrider): Adjust so that the most
883 derived object is a binfo, rather than a class type.
884 (find_final_overrider): Likewise.
885 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
886 (add_vcall_offset): Likewise.
887
888 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
889
890 PR c++/8389
891 * pt.c (instantiate_template): Push class scope for member
892 functions.
893 (get_mostly_instantiated_function_type): Likewise. Don't call
894 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
895 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
896 * mangle.c (write_encoding, write_unqualified_name): Adjust.
897
898 2002-11-07 Mark Mitchell <mark@codesourcery.com>
899
900 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
901 vcall offfsets. Split out ...
902 (add_vcall_offset): ... new function.
903
904 PR c++/8338
905 * pt.c (for_each_template_parm): Add htab parameter.
906 (process_partial_specialization): Adjust call.
907 (push_template_decl_real): Likewise.
908 (pair_fn_data): Add visited.
909 (for_each_template_parm_r): Avoid walking duplicates more than
910 once.
911 (uses_template_parms): Adjust call to for_each_template_parm.
912
913 2002-11-07 Mark Mitchell <mark@codesourcery.com>
914
915 * class.c (add_implicitly_declared_members): Put implicitly
916 declared functions at the end of TYPE_METHODs when -fabi-version
917 is at least 2.
918
919 2002-11-05 Geoffrey Keating <geoffk@apple.com>
920
921 * decl2.c (finish_file): Correct spelling.
922
923 2002-11-03 Mark Mitchell <mark@codesourcery.com>
924
925 * call.c (build_special_member_call): Do not try to lookup VTTs by
926 name.
927 * class.c (vtbl_init_data): Add generate_vcall_entries.
928 (get_vtable_decl): Do not look up virtual tables by name.
929 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
930 (set_primary_base): Do not set CLASSTYPE_RTTI.
931 (determine_primary_base): Likewise.
932 (get_matching_virtual): Remove.
933 (get_vcall_index): New function.
934 (update_vtable_entry_for_fn): Do not try to use virtual thunks
935 when they are not required. Assign vcall indices at this point.
936 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
937 Do update dynamic_classes.
938 (build_vtt): Do not add VTTs to the symbol table.
939 (build_ctor_vtbl_group): Likewise.
940 (build_vtbl_initializer): Simplify handling of vcall indices.
941 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
942 for the most derived class.
943 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
944 the vtable.
945 * cp-tree.h (dynamic_classes): New macro.
946 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
947 (CLASSTYPE_RTTI): Remove.
948 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
949 (CLASSTYPE_VCALL_INDICES): New macro.
950 (CLASSTYPE_VTABLES): Likewise.
951 (BV_USE_VCALL_INDEX_P): Remove.
952 (build_vtable_path): Remove.
953 * decl2.c (finish_vtable_vardecl): Remove.
954 (key_method): Remove #if 0'd code.
955 (finish_vtable_vardecl): Rename to ...
956 (maybe_emit_vtables): ... this.
957 (finish_file): Use it.
958 * search.c (look_for_overrides_here): Update comment.
959
960 2002-11-01 Zack Weinberg <zack@codesourcery.com>
961
962 PR c/7353 redux
963 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
964
965 2002-10-30 Jason Merrill <jason@redhat.com>
966
967 PR c++/8186
968 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
969 * call.c (convert_for_arg_passing): Set it.
970 * except.c (stabilize_throw_expr): Recurse for such an arg.
971
972 2002-10-31 Mark Mitchell <mark@codesourcery.com>
973
974 * cp-tree.h (lang_decl_flags): Remove init_priority.
975 (lang_decl): Add delta.
976 (GLOBAL_INIT_PRIORITY): Remove.
977 (THUNK_DELTA): Revise definition.
978 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
979 * dump.c (cp_dump_tree): Don't dump it.
980
981 2002-10-30 Mark Mitchell <mark@codesourcery.com>
982
983 PR c++/8160
984 * typeck2.c (process_init_constructor): Call complete_array_type.
985
986 PR c++/8149
987 * decl.c (make_typename_type): Issue errors about invalid results.
988
989 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
990
991 Core issue 287, PR c++/7639
992 * cp-tree.h (lang_type_class): Add decl_list field.
993 (CLASSTYPE_DECL_LIST): New macro.
994 (maybe_add_class_template_decl_list): Add declaration.
995 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
996 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
997 (maybe_add_class_template_decl_list): New function.
998 (add_implicitly_declared_members): Use it.
999 * decl.c (maybe_process_template_type_declaration): Likewise.
1000 (pushtag): Likewise.
1001 * friend.c (add_friend): Likewise.
1002 (make_friend_class): Likewise.
1003 * semantics.c (finish_member_declaration): Likewise.
1004 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
1005 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
1006 to process members and friends in the order of declaration.
1007
1008 2002-10-29 Mark Mitchell <mark@codesourcery.com>
1009
1010 PR c++/8287
1011 * decl.c (finish_destructor_body): Create the label to jump to
1012 when returning from a destructor here.
1013 (finish_function_body): Rather than here.
1014
1015 2002-10-25 Zack Weinberg <zack@codesourcery.com>
1016
1017 PR c++/7266
1018 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
1019 SCOPE_REF is not null before dereferencing it.
1020
1021 2002-10-25 Mark Mitchell <mark@codesourcery.com>
1022
1023 * call.c (build_over_call): Use DECL_CONTEXT, not
1024 DECL_VIRTUAL_CONTEXT.
1025 * class.c (modify_vtable_entry): Don't mess with
1026 DECL_VIRTUAL_CONTEXT.
1027 (set_vindex): Remove.
1028 (set_primary_base): Remove vfuns_p parameter.
1029 (determine_primary_base): Likewise.
1030 (modify_all_vtables): Likewise.
1031 (layout_class_type): Likewise. Adjust calls to other functions
1032 accordingly.
1033 (finish_struct_1): Adjust calls to modified functions. Set
1034 DECL_VINDEX here.
1035 * cp-tree.h (lang_type_class): Remove vsize.
1036 (CLASSTYPE_VSIZE): Remove.
1037 (lang_decl): Remove thunks.
1038 (DECL_THUNKS): Adjust.
1039 (DECL_VIRTUAL_CONTEXT): Remove.
1040 (duplicate_decls): Don't copy it.
1041 * pt.c (build_template_decl): Don't set it.
1042 (tsubst_decl): Likewise.
1043 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
1044
1045 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
1046 (build_vtable_entry): Remove.
1047 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
1048 (lang_decl): Add thunks.
1049 (DECL_THUNKS): New macro.
1050 * decl.c (duplicate_decls): Copy it.
1051 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
1052 * semantics.c (emit_associated_thunks): Simplify.
1053
1054 2002-10-24 David Edelsohn <edelsohn@gnu.org>
1055
1056 PR c++/7228
1057 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
1058 lang_type structure exists before accessing field.
1059 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
1060 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
1061 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
1062 * class.c (check_field_decls): Use new macros.
1063 * typeck2.c (process_init_constructor): Remove redundant check for
1064 existence of lang_type structure.
1065
1066 2002-10-24 Mark Mitchell <mark@codesourcery.com>
1067
1068 * class.c (end_of_base): New method.
1069 (end_of_class): Use it. Check indirect virtual bases.
1070
1071 * class.c (check_field_decls): Fix typo.
1072
1073 2002-10-23 Mark Mitchell <mark@codesourcery.com>
1074
1075 PR c++/8067
1076 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
1077 related variables.
1078
1079 PR c++/7679
1080 * spew.c (next_token): Do not return an endless stream of
1081 END_OF_SAVED_INPUT tokens.
1082 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
1083 the cached token stream.
1084 (snarf_defarg): Likewise.
1085
1086 2002-10-23 Zack Weinberg <zack@codesourcery.com>
1087
1088 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
1089 variably_modified_type_p.
1090 * cp-tree.h: Remove prototype of variably_modified_type_p.
1091 * tree.c (variably_modified_type_p): Remove; now implemented
1092 in language-independent code.
1093
1094 2002-10-22 Mark Mitchell <mark@codesourcery.com>
1095
1096 PR c++/6579
1097 * spew.c (snarf_parenthesized_expression): New function.
1098 (snarf_block): Use it.
1099
1100 2002-10-22 Richard Henderson <rth@redhat.com>
1101
1102 * method.c (use_thunk): Always compute vcall_value; assert that
1103 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
1104 for vcall thunks as well.
1105
1106 2002-10-21 Mark Mitchell <mark@codesourcery.com>
1107
1108 * class.c (empty_base_at_nonzero_offset_p): New function.
1109 (layout_nonempty_base_or_field): Do not check for conflicts when
1110 laying out a virtual base using the GCC 3.2 ABI.
1111 (build_base_field): Correct checking for presence of empty classes
1112 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
1113
1114 * class.c (include_empty_classes): Use normalize_rli.
1115 (layout_class_type): Likewise.
1116
1117 * decl.c (reshape_init): Tweak handling of character arrays.
1118
1119 PR c++/8218
1120 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
1121 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
1122 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
1123 (check_field_decls): Likewise.
1124 (layout_class_type): Likewise.
1125 (finish_struct_1): Initialize it.
1126 (walk_subobject_offsets): Use it to prune searches.
1127
1128 2002-10-20 Mark Mitchell <mark@codesourcery.com>
1129
1130 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
1131 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
1132 TARGET_ASM_OUTPUT_MI_THUNK in comments.
1133
1134 2002-10-18 Zack Weinberg <zack@codesourcery.com>
1135
1136 * decl.c (start_decl): Point users of the old initialized-
1137 typedef extension at __typeof__.
1138
1139 2002-10-18 Mark Mitchell <mark@codesourcery.com>
1140
1141 * Make-lang.in (method.o): Depend on TARGET_H.
1142 * method.c (target.h): Include it.
1143 (use_thunk): Use target hooks. Use vcall thunks, if available.
1144
1145 2002-10-18 Mark Mitchell <mark@codesourcery.com>
1146
1147 * class.c (base_derived_from): Make sure return value is a bool.
1148
1149 2002-10-18 Mark Mitchell <mark@codesourcery.com>
1150
1151 * class.c (find_final_overrider_data_s): Remove overriding_fn and
1152 overriding_base.
1153 (dfs_base_derived_from): New function.
1154 (base_derived_from): Likewise.
1155 (dfs_find_final_overrider): Use base_derived_from.
1156 (find_final_overrider): Adjust.
1157
1158 2002-10-18 Jason Merrill <jason@redhat.com>
1159
1160 PR c++/8080
1161 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
1162 with condition decls in a template.
1163
1164 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
1165
1166 * class.c (add_method): Compare template parms too.
1167
1168 2002-10-17 Mark Mitchell <mark@codesourcery.com>
1169
1170 PR c++/7584
1171 * class.c (handle_using_decl): Allow the declaration used to be
1172 from an ambiguous base.
1173
1174 * pt.c (convert_template_argument): Revert this change:
1175 2002-10-16 Mark Mitchell <mark@codesourcery.com>
1176 * pt.c (convert_template_argument): Do not fold non-type
1177 template rguments when inside a template.
1178
1179 * init.c (expand_default_init): Handle brace-enclosed initializers
1180 correctly.
1181
1182 2002-10-16 Mark Mitchell <mark@codesourcery.com>
1183
1184 * mangle.c (write_expression): Correct handling of enumeration
1185 constants.
1186 (write_template_arg): Likewise.
1187 * pt.c (convert_template_argument): Do not fold non-type template
1188 arguments when inside a template.
1189
1190 PR c++/7478
1191 * cvt.c (convert_to_reference): Allow references as the incoming
1192 type.
1193
1194 2002-10-16 Mark Mitchell <mark@codesourcery.com>
1195
1196 PR c++/7524
1197 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
1198 build_qualified_type.
1199
1200 2002-10-15 Richard Henderson <rth@redhat.com>
1201
1202 * error.c (dump_expr): Use real_to_decimal directly, and with
1203 the new arguments.
1204
1205 2002-10-15 Mark Mitchell <mark@codesourcery.com>
1206
1207 * decl.c (reshape_init): Fix typo.
1208
1209 * cp-tree.h (operator_name_info_t): Add arity.
1210 * lex.c (init_operators): Initialize it.
1211 * mangle.c (write_conversion_operator_name): New function.
1212 (write_unqualified_name): Use it.
1213 (write_template_args): Accept template arguments as a TREE_LIST.
1214 (write_expression): Adjust handling of qualified names to match
1215 specification.
1216
1217 2002-10-15 Jason Merrill <jason@redhat.com>
1218
1219 * call.c (call_builtin_trap): New fn.
1220 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
1221 (build_call): Don't set current_function_returns_abnormally outside
1222 a function.
1223
1224 2002-10-14 Mark Mitchell <mark@codesourcery.com>
1225
1226 * class.c (check_field_decls): Remove empty_p parameter. Instead,
1227 clear CLASSTYPE_EMPTY_P.
1228 (build_base_field): Likewise.
1229 (build_base_fields): Likewise.
1230 (check_bases_and_members): Likewise.
1231 (create_vtbl_ptr): Likewise.
1232 (layout_class_type): Likewise. Ensure that empty classes have
1233 size zero when used as base classes in the 3.2 ABI.
1234 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
1235 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
1236 parameter.
1237 (is_empty_class): Correct definition when using post-3.2 ABI.
1238 * cp-tree.h (lang_type_class): Add empty_p.
1239 (CLASSTYPE_EMPTY_P): New macro.
1240
1241 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
1242
1243 * init.c (build_delete): Do not apply save_expr for arrays.
1244 (build_vec_delete): Likewise.
1245
1246 2002-10-14 Mark Mitchell <mark@codesourcery.com>
1247
1248 * decl.c (layout_var_decl): Call layout_decl even for variables
1249 whose type is an array with unspecified bounds.
1250
1251 PR c++/7176
1252 * lex.c (do_identifier): Add another option for the parsing
1253 parameter.
1254 * parse.y (do_id): Use it.
1255
1256 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
1257
1258 PRs C++/6803, C++/7721 and C++/7803
1259 * decl.c (grokdeclarator): Gracefully handle template-name as
1260 decl-specifier.
1261
1262 2002-10-11 Jason Molenda <jmolenda@apple.com>
1263
1264 * init.c (build_field_list): Provide uses_unions_p with a default
1265 value.
1266
1267 2002-10-11 Mark Mitchell <mark@codesourcery.com>
1268
1269 PR c++/5661
1270 * cp-tree.h (variably_modified_type_p): New function.
1271 (grokdeclarator) Tighten check for variably modified types as
1272 fields.
1273 * pt.c (convert_template_argument): Do not allow variably modified
1274 types as template arguments.
1275 * tree.c (variably_modified_type_p): New function.
1276
1277 * NEWS: Document removal of "new X = ..." extension.
1278 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
1279 brace-enclosed initializers.
1280 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
1281 (initialize_local_var): Remove declaration.
1282 (expand_static_init): Likewise.
1283 * decl.c (next_initializable_field): New function.
1284 (reshape_init): Likewise.
1285 (check_initializer): Use them. Build dynamic initializer for
1286 aggregates here too.
1287 (initialize_local_var): Simplify, and incorporate cleanup
1288 insertion code as well.
1289 (destroy_local_var): Remove.
1290 (cp_finish_decl): Tidy.
1291 (expand_static_init): Fold checks for whether or not a variable
1292 needs initialization into this function. Simplify.
1293 * decl2.c (do_static_initialization): Simplify.
1294 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
1295 be done for us automatically.
1296 (expand_default_init): Handle brace-enclosed initializers
1297 correctly.
1298 (expand_aggr_init_1): Remove RTL-generation code.
1299 (build_vec_init): Remove "new X = ..." support.
1300 * parse.y (new_initializer): Likewise.
1301 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
1302 brace-enclosed initializer.
1303 (create_pseudo_type_info): Likewise.
1304 * typeck2.c (store_init_value): Don't try to handle digest_init
1305 being called more than once.
1306 (digest_init): Tidy handling of brace-enclosed initializers.
1307
1308 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1309
1310 * decl.c (typename_hash): Use htab_hash_pointer.
1311
1312 2002-10-10 Jim Wilson <wilson@redhat.com>
1313
1314 * decl.c (duplicate_decls): Don't call decl_attributes.
1315
1316 2002-10-09 Zack Weinberg <zack@codesourcery.com>
1317
1318 PR c/7353
1319 * decl.c (start_decl): Unconditionally issue error for
1320 'typedef foo = bar'.
1321 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
1322 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
1323
1324 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1325
1326 * decl2.c (prune_vtable_vardecl): Delete unused function.
1327
1328 2002-10-03 Mark Mitchell <mark@codesourcery.com>
1329
1330 PR c++/7754
1331 * decl2.c (finish_anon_union): Do not expand anonymous unions when
1332 procesing template functions.
1333 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
1334 type. Call layout_decl.
1335 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
1336
1337 2002-10-07 Richard Henderson <rth@redhat.com>
1338
1339 * decl2.c, pt.c: Revert c++/7754 fix.
1340
1341 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1342
1343 PR c++/7804
1344 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
1345
1346 2002-10-03 Mark Mitchell <mark@codesourcery.com>
1347
1348 PR c++/7931
1349 * pt.c (for_each_template_parm_r): Handle BASELINKs.
1350
1351 PR c++/7754
1352 * decl2.c (finish_anon_union): Do not expand anonymous unions when
1353 procesing template functions.
1354 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
1355 type. Call layout_decl.
1356 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
1357
1358 2002-10-03 Mark Mitchell <mark@codesourcery.com>
1359
1360 PR c++/8006
1361 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
1362 template parameters.
1363 (globals): Add entity and need_abi_warning.
1364 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
1365 CLASSTYPE_TEMPLATE_INFO.
1366 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
1367 TYPE_TI_TEMPLATE.
1368 (write_prefix): Handle typename types correctly.
1369 (write_template_prefix): Handle template template parameters
1370 correctly.
1371 (start_mangling): Add entity parameter.
1372 (finish_mangling): Warn about names whose mangling will change.
1373 (mangle_decl_string): Adjust.
1374 (mangle_type_string): Likewise.
1375 (mangle_special_for_type): Likewise.
1376 (mangle_ctor_vtbl_for_type): Likewise.
1377 (mangle_thunk): Likewise.
1378 (mangle_guard_variable): Likewise.
1379 (mangle_ref_init_variable): Likewise.
1380
1381 2002-10-02 Mark Mitchell <mark@codesourcery.com>
1382
1383 PR c++/7188.
1384 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
1385 * cp-tree.h (emit_base_init): Rename to ....
1386 (emit_mem_initializers): ... this.
1387 (expand_member_init): Change prototype.
1388 * init.c (perform_member_init): Compute explicit, rather than
1389 requiring it as a parameter.
1390 (sort_member_init): Rename to ...
1391 (sort_mem_initializers): ... this. Process bases and data members
1392 together.
1393 (sort_base_init): Remove.
1394 (emit_base_init): Rename to ...
1395 (emit_mem_initializers): ... this.
1396 (expand_aggr_vbase_init_1): Remove.
1397 (construct_virtual_bases): Rename to ...
1398 (construct_virtual_base): ... this.
1399 (expand_member_init): Rework handling of base initializers.
1400 * method.c (do_build_copy_constructor): Use
1401 finish_mem_initializers.
1402 * parse.y (member_init): Adjust calls to expand_member_init.
1403 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
1404 (tsubst_initializer_list): Use expand_member_init.
1405 * semantics.c (finish_mem_intiailizers): Simplify.
1406
1407 2002-10-02 Matt Austern <austern@apple.com>
1408 * decl.c (walk_vtables_r): Fixed typo that caused result to
1409 never get a nonzero value.
1410
1411 2002-10-02 Roger Sayle <roger@eyesopen.com>
1412
1413 PR optimization/6627
1414 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
1415 from here, and move it to tree.h.
1416 * decl.c (cxx_init_decl_processing): If storing the vbit
1417 in function pointers, ensure that force_align_functions_log
1418 is atleast one.
1419
1420 2002-10-02 Matt Austern <austern@apple.com>
1421
1422 * class.c (check_field_decls): Changed warning about const member
1423 variables so that it doesn't get issued for a class aggregate.
1424
1425 2002-10-01 Mark Mitchell <mark@codesourcery.com>
1426
1427 * decl.c (cp_finish_decl): Make sure array types are laid out,
1428 even if the array bounds are unknown.
1429
1430 2002-10-01 Steve Ellcey <sje@cup.hp.com>
1431
1432 * class.c (build_vtbl_initializer): Change build_c_cast
1433 to build1.
1434
1435 2002-10-01 Mark Mitchell <mark@codesourcery.com>
1436
1437 * decl.c (cp_finish_decl): Make sure array types are laid out,
1438 even if the array bounds are unknown.
1439
1440 * decl.c (cp_finish_decl): Correct check for dynamic
1441 initialization of thread-local storage.
1442
1443 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
1444
1445 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
1446 overloaded.
1447
1448 2002-09-30 Steve Ellcey <sje@cup.hp.com>
1449
1450 * class.c (build_vtbl_initializer): Add cast.
1451 (add_vcall_offset_vtbl_entries_1):
1452 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
1453
1454 2002-09-30 Mark Mitchell <mark@codesourcery.com>
1455
1456 * class.c (walk_subobject_offsets): Correct the calculation of
1457 offsets for virtual bases. Correct the counting of array
1458 elements.
1459 (layout_nonempty_base_or_field): Simplify. Correct the
1460 calculation of offsets to be propagated through the binfo
1461 hierarchy.
1462 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
1463 Add the FIELD_DECL to TYPE_FIELDS.
1464 (build_base_fields): Adjust accordingly.
1465 (layout_virtual_bases): Use build_base_field.
1466 (end_of_class): Return a tree, not an integer.
1467 (warn_about_ambiguous_direct_bases): Rename to ...
1468 (warn_about_ambiguous_bases): ... this.
1469 (include_empty_classes): New function.
1470 (layout_class_type): Create an alternative version of the type to
1471 be used when as a base class type. Do not call
1472 finish_record_layout until we are done laying out the class.
1473 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
1474 as_base.
1475 (CLASSTYPE_SIZE): Reimplement.
1476 (CLASSTYPE_SIZE_UNIT): Likewise.
1477 (CLASSTYPE_ALIGN): Likweise.
1478 (CLASSTYPE_USER_ALIGN): Likewise.
1479 (CLASSTYPE_AS_BASE): New macro.
1480 (DECL_INITIALIZED_P): Likewise.
1481 (extract_init): Remove prototype.
1482 (build_forced_zero_init): Rename to ...
1483 (build_zero_init): ... this.
1484 (force_store_init_value): Remove.
1485 * decl.c (obscure_complex_init): Remove.
1486 (duplicate_decls): Copy DECL_INITIALIZED_P.
1487 (check_initializer): Do not leave junk in DECL_INITIAL.
1488 (cp_finish_decl): Handle zero-initialization of entities with
1489 static storage duration.
1490 * expr.c (extract_init): Remove.
1491 * init.c (build_forced_zero_init): Remove.
1492 (build_zero_init): New function.
1493 (build_default_init): Use it.
1494 (build_field_list): Skip FIELD_DECLs for base subobjects.
1495 (push_base_cleanups): Likewise.
1496 * method.c (do_build_assign_ref): Likewise.
1497 (synthesize_exception_spec): Likewise.
1498 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
1499 (regenerate_decl_from_template): To not set DECL_INITIAL for a
1500 static data member whose initialization took place in its class.
1501 (instantiate_decl): Do not pass an initializer to cp_finish_decl
1502 in that situation.
1503 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
1504 (dfs_unuse_fields): Likewise.
1505 * tree.c (pod_type_p): Handle error_mark_node.
1506 (zero_init_p): Likewise.
1507 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
1508 subobjects.
1509 * typeck2.c (store_init_value): Remove #if 0'd code.
1510 (force_store_init_value): Remove.
1511 (process_init_constructor): Use build_zero_init.
1512
1513 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
1514
1515 PR c++/7788
1516 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
1517
1518 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
1519
1520 * cp-tree.h: Fix comment typos.
1521 * decl.c: Likewise.
1522 * pt.c: Likewise.
1523
1524 2002-09-25 Mark Mitchell <mark@codesourcery.com>
1525
1526 * cp/class.c (contains_empty_class_p): New method.
1527 (walk_subobject_offsets): Correct computation of field offset.
1528 (layout_empty_base): Correct placement of emtpy base classes.
1529 (layout_class_type): Warn about ABI changes.
1530
1531 2002-09-23 Mark Mitchell <mark@codesourcery.com>
1532
1533 * cp/class.c (layout_virtual_bases): Do not round the size of the
1534 type to a multiple of the alignment before laying out virtual bases.
1535 (layout_class_type): Correct handling of bit-fields that are wider
1536 than their type inside unions. Round the size of the type to a
1537 even number of bytes when computing the size without virtual
1538 bases.
1539 * cp/cp-tree.h (abi_version_at_least): New macro.
1540
1541 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
1542
1543 * ChangeLog: Follow spelling conventions.
1544 * ChangeLog.2: Likewise.
1545 * call.c: Likewise.
1546 * class.c: Likewise.
1547 * cp-tree.h: Likewise.
1548 * cvt.c: Likewise.
1549 * decl.c: Likewise.
1550 * decl2.c: Likewise.
1551 * except.c: Likewise.
1552 * friend.c: Likewise.
1553 * g++spec.c: Likewise.
1554 * init.c: Likewise.
1555 * lex.c: Likewise.
1556 * mangle.c: Likewise.
1557 * method.c: Likewise.
1558 * operators.def: Likewise.
1559 * optimize.c: Likewise.
1560 * pt.c: Likewise.
1561 * rtti.c: Likewise.
1562 * search.c: Likewise.
1563 * semantics.c: Likewise.
1564 * spew.c: Likewise.
1565 * tree.c: Likewise.
1566 * typeck.c: Likewise.
1567
1568 2002-09-18 Devang Patel <dpatel@apple.com>
1569
1570 * cp/cp-tree.h: New prototype for walk_vtabls().
1571 * cp/decl.c (walk_vtables_r): New function.
1572 (struct cp_binding_level): Add new members, namespaces,
1573 names_size and vtables.
1574 (add_decl_to_level): Add decl in namespaces or vtables
1575 chain, if conditions match.
1576 (walk_vtables): New function.
1577 (walk_namespaces_r): Travers separate namespace chain
1578 for namespace decls.
1579 (wrapup_globals_for_namespace): Use names_size instead
1580 of list_length().
1581 * cp/decl2.c (finish_file): Use walk_vtables() instead of
1582 walk_globals() to walk vtable decls.
1583
1584 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
1585
1586 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
1587 ICE with invalid pointers & references.
1588
1589 2002-09-17 Zack Weinberg <zack@codesourcery.com>
1590
1591 * Make-lang.in: Remove all references to the demangler.
1592 * cxxfilt.c: Moved to binutils.
1593
1594 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
1595
1596 PR c++/7718
1597 * pt.c (tsubst_decl): Remove assert.
1598
1599 Remove DR 295 implementation.
1600 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
1601 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
1602 about ignoring volatile qualifiers.
1603
1604 * search.c (lookup_member): Correct documentation.
1605
1606 2002-09-16 Geoffrey Keating <geoffk@apple.com>
1607
1608 * cp-tree.h (union lang_tree_node): Add chain_next option.
1609
1610 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
1611
1612 * parse.y (parse_finish_call_expr): Check lookup_member result.
1613
1614 PR c++/7015
1615 * semantic.c (finish_asm_stmt): Fix operand/output_operands
1616 thinko.
1617 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
1618
1619 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
1620
1621 PR c++/7919
1622 * call.c (build_over_call): Convert this pointer for fns found by
1623 using decls.
1624
1625 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
1626
1627 * ChangeLog: Follow spelling conventions.
1628 * ChangeLog.1: Likewise.
1629
1630 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
1631
1632 PR c++/7768
1633 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
1634
1635 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
1636
1637 * error.c: Fix comment formatting.
1638 * except.c: Likewise.
1639 * expr.c: Likewise.
1640 * friend.c: Likewise.
1641 * g++spec.c: Likewise.
1642 * init.c: Likewise.
1643 * lex.c: Likewise.
1644 * mangle.c: Likewise.
1645 * method.c: Likewise.
1646 * optimize.c: Likewise.
1647 * pt.c: Likewise.
1648 * rtti.c: Likewise.
1649 * search.c: Likewise.
1650 * semantics.c: Likewise.
1651 * spew.c: Likewise.
1652 * tree.c: Likewise.
1653 * typeck.c: Likewise.
1654 * typeck2.c: Likewise.
1655
1656 2002-09-13 Matt Austern <austern@apple.com>
1657
1658 PR C++/7828
1659 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
1660 * cp/call.c: Change call-by-const-reference mechanism to use
1661 non_cast_lvalue_p when deciding whether the create a temporary.
1662 We need a temporary when passing, e.g. (long) x by const ref.
1663
1664 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
1665
1666 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
1667
1668 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
1669
1670 * decl.c: Fix comment formatting.
1671 * decl2.c: Likewise.
1672
1673 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
1674
1675 * call.c: Fix comment formatting.
1676 * class.c: Likewise.
1677 * cp-lang.c: Likewise.
1678 * cp-tree.h: Likewise.
1679 * cvt.c: Likewise.
1680
1681 2002-09-11 Zack Weinberg <zack@codesourcery.com>
1682
1683 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
1684 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
1685 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
1686 minor adjustments (use version_string, eliminate yet another
1687 duplicate of xmalloc)
1688
1689 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1690
1691 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
1692
1693 2002-09-05 Jason Merrill <jason@redhat.com>
1694
1695 * typeck2.c (add_exception_specifier): Only pedwarn for an
1696 incomplete type.
1697 (require_complete_eh_spec_types): New fn.
1698 (cxx_incomplete_type_diagnostic): Also support pedwarning.
1699 * typeck.c (complete_type_or_diagnostic): Likewise.
1700 * call.c (build_call): Call require_complete_eh_spec_types.
1701 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
1702 on an incomplete type.
1703
1704 2002-09-04 Jakub Jelinek <jakub@redhat.com>
1705
1706 * decl.c (start_cleanup_fn): Clear interface_only before
1707 start_function, restore it afterwards.
1708
1709 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
1710
1711 * cp-tree.h (finish_builtin_type): Remove.
1712 * decl2.c (finish_builtin_type): Move to common code.
1713 * decl.c (build_ptrmemfunc_type): Adjust.
1714 * rtti.c (create_pseudo_type_info): Adjust.
1715 (create_tinfo_types): Adjust.
1716
1717 2002-08-31 Jason Merrill <jason@redhat.com>
1718
1719 * cp-lang.c (cp_expr_size): Allow initialization from a
1720 CONSTRUCTOR.
1721
1722 2002-08-30 Richard Henderson <rth@redhat.com>
1723
1724 PR opt/7515
1725 * tree.c: Include target.h.
1726 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
1727 don't bind locally.
1728 * Makefile.in (tree.o): Update.
1729
1730 2002-08-27 Mark Mitchell <mark@codesourcery.com>
1731
1732 * class.c (layout_virtual_bases): Warn about bugs in G++ that
1733 result in incorrect object layouts.
1734 (layout_class_type): Likewise.
1735
1736 2002-08-24 Matt Austern <austern@apple.com>
1737
1738 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
1739 are allowable.
1740 (real_lvalue_p): Update caller.
1741 (lvalue_p): Ditto.
1742 (non_cast_lvalue_or_else): New.
1743 * tree.h: Declare it.
1744 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
1745
1746 2002-08-22 Mark Mitchell <mark@codesourcery.com>
1747
1748 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
1749 and COND_EXPR specially; fix error message output.
1750
1751 2002-08-22 Jason Merrill <jason@redhat.com>
1752
1753 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
1754 * semantics.c (nullify_returns_r): Likewise.
1755
1756 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
1757
1758 Fix PR/7621
1759 * typeck.c (finish_class_member_access_expr): Diagnose cases where
1760 name lookup finds nothing.
1761
1762 2002-08-15 Jason Merrill <jason@redhat.com>
1763
1764 * semantics.c (finish_then_clause): Remove redundant assignment.
1765 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
1766 extra binding level outside the if/switch statement.
1767 (finish_while_cond, finish_for_cond): Rewrite complex condition
1768 into the loop body.
1769
1770 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
1771
1772 * parse.y (sizeof, alignof, typeof): New non-terminals to
1773 increment skip_evaluation. Replace terminals with them and
1774 decrement skip_evaluation at the end of rules using them.
1775 * decl2.c (mark_used): Don't assemble_external if
1776 skipping evaluation.
1777
1778 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
1779
1780 Fix PR/7504
1781 * parse.y (parse_finish_call_expr): Handle incomplete
1782 type used to name a scope.
1783
1784 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
1785
1786 PR c++/7598
1787 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
1788 regression caused by my 2002-08-08 patch.
1789
1790 2002-08-13 Mark Mitchell <mark@codesourcery.com>
1791
1792 * decl.c (pushdecl_class_level): Honor requests to bind names to
1793 OVERLOADs.
1794
1795 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1796
1797 * decl2.c (build_call_from_tree): Fix uninitialized variable.
1798 * parse.y (parse_finish_call_expr): Likewise.
1799 * repo.c (old_args, old_dir, old_main): Const-ify.
1800
1801 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
1802
1803 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
1804 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
1805 * optimize.c (maybe_clone_body): Likewise.
1806 * pt.c (tsubst_enum): Likewise.
1807 (lookup_template_class): Likewise.
1808 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
1809
1810 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
1811
1812 * lang-specs.h: Remove -ansi.
1813
1814 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
1815
1816 * tree.c (maybe_dummy_object): Replace // with /* */
1817
1818 2002-08-09 Mark Mitchell <mark@codesourcery.com>
1819
1820 * call.c (standard_conversion): Use build_ptrmem_type.
1821 * cp-tree.h (build_ptrmem_type): New function.
1822 (adjust_result_of_qualified_name_lookup): Likewise.
1823 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
1824 static data members.
1825 (build_ptrmem_type): New function.
1826 (grokdeclarator): Do not use build_offset_type when encountering a
1827 qualified name.
1828 * parse.y (parse_finish_call_expr): Use
1829 adjust_result_of_qualified_name_lookup.
1830 * search.c (adjust_result_of_qualified_name_lookup): New function.
1831 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
1832 accessing OFFSET_TYPEs directly.
1833
1834 2002-08-08 Mike Stump <mrs@apple.com>
1835
1836 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
1837 (type_decays_to): Likewise.
1838 * class.c (find_final_overrider): Likewise.
1839 (maybe_note_name_used_in_class): Likewise.
1840 * decl.c (current_tmpl_spec_kind): Likewise.
1841 (add_binding): Likewise.
1842 (push_class_binding): Likewise.
1843 (duplicate_decls): Likewise.
1844 (layout_var_decl): Likewise.
1845 (grokfndecl): Likewise.
1846 (grokdeclarator): Likewise.
1847 (check_default_argument): Likewise.
1848 * decl2.c (handle_class_head): Likewise.
1849 * error.c (dump_template_decl): Likewise.
1850 * init.c (build_offset_ref): Likewise.
1851 * pt.c (check_specialization_scope): Likewise.
1852 (determine_specialization): Likewise.
1853 (check_explicit_specialization): Likewise.
1854 (maybe_check_template_type): Likewise.
1855 (process_partial_specialization): Likewise.
1856 (check_default_tmpl_args): Likewise.
1857 (push_template_decl_real): Likewise.
1858 (convert_template_argument): Likewise.
1859 (try_class_unification): Likewise.
1860 (get_bindings_real): Likewise.
1861 (do_decl_instantiation): Likewise.
1862 * semantics.c (begin_function_definition): Likewise.
1863 (finish_member_declaration): Likewise.
1864 (check_multiple_declarators): Likewise.
1865 * typeck.c (comp_array_types): Likewise.
1866 (comptypes): Likewise.
1867 (expr_sizeof): Likewise.
1868 (build_binary_op): Likewise.
1869 (dubious_conversion_warnings): Likewise.
1870 (check_return_expr): Likewise.
1871
1872 2002-08-08 Mark Mitchell <mark@codesourcery.com>
1873
1874 * typeck.c (build_class_member_access_expr): Do not return
1875 error_mark_node when no error has occurred.
1876
1877 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
1878
1879 * typeck.c (build_component_addr): Remove.
1880 (build_unary_op): Just check it's not a bitfield, and then build
1881 an ADDR_EXPR.
1882
1883 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
1884
1885 * class.c (convert_to_base): Correct check for error_mark_node.
1886 (create_vtable_ptr): Remove unused VFUNS_P parm.
1887
1888 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
1889
1890 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
1891
1892 2002-08-07 Mark Mitchell <mark@codesourcery.com>
1893
1894 Rework build_component_ref.
1895 * call.c (build_vfield_ref): Do not go through build_component_ref.
1896 (build_field_call): Use build_class_member_access_expr.
1897 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
1898 (build_object_call): Likewise.
1899 * class.c (convert_to_base): New function.
1900 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
1901 (instantiate_type): Handle BASELINKs.
1902 * cp-tree.def (BASELINK): New tree code.
1903 * cp-tree.h (BASELINK_P): Reimplement.
1904 (SET_BASELINK_P): Remove.
1905 (BASELINK_BINFO): Reimplement.
1906 (BASELINK_FUNCTIONS): Likewise.
1907 (BASELINK_ACCESS_BINFO): Likewise.
1908 (BASELINK_OPTYPE): Likewise.
1909 (convert_to_base): New function.
1910 (name_p): Likewise.
1911 (build_object_ref): Remove.
1912 (build_component_ref_1): Likewise.
1913 (build_component_ref): Likewise.
1914 (build_x_component_ref): Likewise.
1915 (build_class_member_access_expr): New function.
1916 (finish_class_member_access_expr): Likewise.
1917 (build_ptrmemfunc_access_expr): Likewise.
1918 * decl.c (grokdeclarator): Handle BASELINKs.
1919 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
1920 finish_class_member_access_expr.
1921 (arg_assoc): Handle BASELINKs.
1922 (do_class_using_decl): Likewise.
1923 * error.c (dump_decl): Likewise.
1924 (dump_expr): Use build_ptrmemfunc_access_expr.
1925 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
1926 destructors.
1927 (build_throw): Use BASELINK_FUNCTIONS.
1928 * init.c (perform_member_init): Use
1929 build_class_member_access_expr.
1930 (build_offset_ref): Handle BASELINKs. Use
1931 build_class_member_access_expr.
1932 * method.c (hack_identifier): Likewise.
1933 * parse.y (do_id): Use BASELINK, not TREE_LIST.
1934 (primary): Remove uses of build_object_ref.
1935 * pt.c (lookup_template_function): Handle BASELINKs.
1936 (resolve_overloaded_unification): Likewise.
1937 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
1938 (lookup_field): Use BASELINK, not TREE_LIST.
1939 (lookup_fnfiels): Likewise.
1940 (setup_class_bindings): Likewise.
1941 * semantics.c (finish_object_call_expr): Do not use
1942 build_method_call when we already know what function is being
1943 called.
1944 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
1945 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
1946 TREE_CHAIN.
1947 (name_p): New function.
1948 * typeck.c (build_object_ref): Remove.
1949 (build_component_ref_1): Likewise.
1950 (build_x_component_ref): Likewise.
1951 (build_class_member_access_expr): New function.
1952 (finish_class_member_access_expr): Likewise.
1953 (build_ptrmemfunc_access_expr): Likewise.
1954 (get_member_function_from_ptrfunc): Use
1955 build_ptrmemfunc_access_expr.
1956 (build_binary_op): Likewise.
1957 (build_unary_op): Likewise.
1958 (build_ptrmemfunc): Likewise.
1959 (pfn_from_ptrmemfunc): Likewise.
1960 * typeck2.c (build_m_component_ref): Adjust comment.
1961
1962 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
1963
1964 * Make-lang.in (CXX_C_OBJS): Update.
1965 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
1966 * cp-tree.h (cxx_decode_option): Remove.
1967 * decl2.c (compare_options, lang_f_options, unsupported_options,
1968 cxx_decode_option): Remove.
1969
1970 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
1971
1972 * typeck.c (build_x_unary_op): Handle pointer-to-member.
1973
1974 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
1975
1976 * class.c: Don't include obstack.h.
1977 (popclass):
1978 * decl2.c: Delete bogus comment.
1979 * error.c: Don't include obstack.h.
1980 * except.c: Likewise.
1981 (dump_type): Correct comment.
1982 * method.c: Don't include obstack.h.
1983 * tree.c: Likewise.
1984
1985 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
1986
1987 Fix PR/2213
1988 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
1989 expressions to pointer-to-data-member of pointer-to-member-functions.
1990
1991 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
1992
1993 * cvt.c (ocp_convert): Delete obsolete code.
1994 * parse.y (permanent_obstack): Delete declaration.
1995 * pt.c (permanent_obstack): Delete declaration.
1996 * repo.c (permanent_obstack): Delete declaration.
1997 (open_repo_file): Use xmalloc instead of permanent_obstack.
1998 (init_repo): Use xstrdup instead of permanent_obstack.
1999
2000 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
2001
2002 * cp-tree.h (VF_DERIVED_VALUE): Remove.
2003 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
2004
2005 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
2006
2007 PR 7470.
2008 C++ ABI change - vfunc ordering.
2009 * class.c (add_virtual_function): Remove.
2010 (dfs_modify_all_vtables): Take list of all declared
2011 virtuals. Assign all that are not in primary base.
2012 (check_for_override): Adjust comments.
2013 (create_vtable_ptr): Take single list of virtuals. Build chain
2014 of declared virtuals here.
2015 (layout_class_type): Take single list of virtuals. Adjust.
2016 (finish_struct_1): Keep virtuals on single list. Adjust.
2017
2018 2002-08-02 Mark Mitchell <mark@codesourcery.com>
2019
2020 * init.c (build_member_call): Use build_new_method_call, not
2021 build_method_call.
2022
2023 2002-08-02 Krister Walfridsson <cato@df.lth.se>
2024
2025 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
2026
2027 2002-08-02 Mark Mitchell <mark@codesourcery.com>
2028
2029 * call.c (build_method_call): Issue a more helpful error message
2030 about ambiguous method names.
2031
2032 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
2033
2034 * tree.c (build_shared_int_cst): Make cache file scope, and
2035 GTY it.
2036
2037 2002-08-02 Jason Merrill <jason@redhat.com>
2038
2039 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
2040 (cp_expr_size): New fn.
2041 * call.c (build_over_call): Lose empty class hackery.
2042 (convert_arg_to_ellipsis): Promote non-POD warning to error.
2043 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
2044
2045 * semantics.c (expand_body): Do tree optimization in the function
2046 context, too.
2047
2048 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
2049
2050 * cp-tree.h: Move all warning and flag declarations to c-common.h.
2051 * decl.c: Move all warning and flag variables to c-common.c.
2052 * decl2.c: Move all warning and flag variables to c-common.c.
2053 * lex.c (flag_digraphs): Remove.
2054 (warn_traditional): Now in c-common.c.
2055
2056 2002-07-31 Mark Mitchell <mark@codesourcery.com>
2057
2058 * call.c (build_field_call): Do not look up the field by name.
2059 (build_method_call): Simplify.
2060 (struct z_candidate): Add access_path and conversion_path. Remove
2061 basetype_path.
2062 (convert_class_to_reference): Adjust use of
2063 add_function_candidate.
2064 (add_candidate): Add conversion_path argument.
2065 (add_function_candidate): Use it.
2066 (add_conv_dndidate): Likewise.
2067 (build_builtin_candidate): Likewise.
2068 (add_template_candidate_real): Add conversion_path argument.
2069 (add_template_conv_candidate): Likewise.
2070 (add_template_candidate): Likewise.
2071 (build_user_type_conversion_1): Use it.
2072 (build_new_function_call): Remove name lookup code. Adjust use of
2073 add_template_candidate and add_function_candidate.
2074 (build_new_op): Likewise.
2075 (convert_like_real): Use build_special_member_call.
2076 (build_over_call): Use cand->conversion_path.
2077 (build_special_member_call): New method.
2078 (build_new_method_call): Remove name lookup code.
2079 * cp-tree.def (OFFSET_REF): Update documentation.
2080 (TEMPLATE_ID_EXPR): Likewise.
2081 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
2082 (BASELINK_OPTYPE): Likewise.
2083 (build_new_method_call): Adjust prototype.
2084 (build_special_member_call): New method.
2085 (build_baselink): New method.
2086 (build_offset_ref_call_from_tree): Likewise.
2087 (build_call_from_tree): Likewise.
2088 (finish_qualified_call_expr): Remove.
2089 (finish_call_expr): Adjust prototype.
2090 (build_x_function_call): Remove.
2091 * cvt.c (ocp_convert): Use build_special_member_call.
2092 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
2093 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
2094 CALL_EXPR.
2095 (build_offset_ref_call_from_tree): New function.
2096 (build_call_from_tree): Likewise.
2097 * init.c (expand_cleanup): Use build_special_member_call.
2098 (expand_default_init): Likewise.
2099 (build_member_call): Use finish_call_expr.
2100 (build_new_1): Use build_special_member_call.
2101 (push_base_cleanups): Likewise.
2102 * method.c (do_build_assign_ref): Likewise.
2103 * parse.y (template_id): Do not pass a COMPONENT_REF to
2104 lookup_template_function.
2105 (primary): Use parse_finish_call_epxr, not finish_call_expr.
2106 (parse_finish_call_expr): New function.
2107 * pt.c (lookup_template_function): Add assertions.
2108 * search.c (lookup_base): Allow T to be a binfo.
2109 (build_baselink): New function.
2110 (lookup_member): Use it.
2111 * semantics.c (finish_call_expr): Do not do name lookup.
2112 (finish_object_call_expr): Remove #if 0'd code.
2113 (finish_qualified_call_expr): Remove.
2114 * typeck.c (build_x_function_call): Remove.
2115 (build_static_case): Use build_special_member_call.
2116 * typeck2.c (build_functional_cast): Likewise.
2117
2118 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
2119
2120 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
2121
2122 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
2123
2124 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
2125
2126 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
2127
2128 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
2129 documentation.
2130
2131 2002-07-29 Alan Modra <amodra@bigpond.net.au>
2132
2133 * cp-tree.h: Comment typo fix.
2134
2135 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
2136
2137 * spew.c (space_for_token): Allocate zeroed memory for a new token
2138 chunk.
2139
2140 2002-07-27 Roger Sayle <roger@eyesopen.com>
2141
2142 * decl.c (builtin_function_1): No need to explicitly mark
2143 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
2144
2145 2002-07-27 Roger Sayle <roger@eyesopen.com>
2146
2147 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
2148
2149 2002-07-26 Jason Merrill <jason@redhat.com>
2150
2151 * call.c (build_over_call): Likewise.
2152 (cp_convert_parm_for_inlining): New fn.
2153 (convert_for_arg_passing): New fn.
2154 (convert_default_arg, build_over_call): Use it.
2155 (type_passed_as): New fn.
2156 * pt.c (tsubst_decl): Use it.
2157 * decl2.c (cp_build_parm_decl): New fn.
2158 (build_artificial_parm): Use it.
2159 (start_static_storage_duration_function): Likewise.
2160 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
2161 (grokparms): Don't mess with DECL_ARG_TYPE.
2162 * typeck.c (convert_arguments): Use convert_for_arg_passing.
2163 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
2164 Define.
2165 * cp-tree.h: Declare new fns.
2166
2167 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
2168
2169 * cp-tree.h (flag_operator_names): Remove.
2170 * decl2.c (flag_operator_names): Remove.
2171 (lang_f_options): Remove operator-names.
2172 * lex.c (D_OPNAME): Remove.
2173 (reswords): Remove operator names.
2174 (rid_to_yy): Remove operator names.
2175 (init_reswords): No need to handle D_OPNAME.
2176 * spew.c (read_process_identifier): There are no operator
2177 names.
2178
2179 2002-07-26 Jason Merrill <jason@redhat.com>
2180
2181 * dump.c (cp_dump_tree): Call c_dump_tree.
2182 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
2183
2184 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
2185
2186 * error.c (print_whitespace): Remove.
2187 * g++spec.c (LIBUNWIND): Move.
2188 * mangle.c (mangled_position, write_signed_number): Remove.
2189
2190 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
2191
2192 * decl2.c (cxx_decode_option): Similarly.
2193
2194 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
2195
2196 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
2197 (cxx_sizeof_or_alignof_type): Take a third argument.
2198 (cxx_sizeof): Adjust definition.
2199 (cxx_alignof): Likewise.
2200 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
2201 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
2202 complaining.
2203 (c_sizeof_nowarn): Remove definition.
2204 (build_unary_op): Use cxx_sizeof_nowarn.
2205
2206 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
2207
2208 * tree.c (cp_build_qualified_type_real): When copying
2209 pointer-to-method types, unshare the record that holds
2210 the cached pointer-to-member-function type.
2211
2212 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
2213
2214 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
2215
2216 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
2217
2218 Fix PR/7363:
2219 * typeck.c (cxx_sizeof_or_alignof_type): New function.
2220 (c_sizeof): Remove definition.
2221 (expr_sizeof): Use cxx_sizeof.
2222 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
2223 * decl.c (finish_destructor_body): Use cxx_sizeof.
2224 * semantics.c (finish_alignof): Likewise.
2225 (finish_alignof): Use cxx_alignof.
2226 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
2227 (cxx_sizeof_or_alignof_type): Declare.
2228 (my_friendly_assert): Move to ../c-common.h.
2229
2230 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
2231
2232 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
2233
2234 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2235
2236 PR c++/7347, c++/7348
2237 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
2238 * decl.c (make_typename_type): Use it.
2239 (make_unbound_class_template): Likewise.
2240 (lookup_name_real): Don't call type_access_control if scope is
2241 template parameter dependent.
2242 * parse.y (template_arg): Call make_unbound_class_template with
2243 tf_parsing set.
2244 (nest_name_specifier): Call make_typename_type with tf_parsing set.
2245 (typename_sub0): Likewise.
2246 (typename_sub1): Likewise.
2247 (instantiate_decl): Push class scope.
2248 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
2249 for both static variable and member function template.
2250 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
2251 and arguments.
2252 * search.c (type_access_control): Do type access for TEMPLATE_DECL
2253 too.
2254
2255 2002-07-20 Roger Sayle <roger@eyesopen.com>
2256
2257 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
2258 test by using positive_option. Make whitespace consistent.
2259
2260 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
2261
2262 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
2263 members with 'locus'. Adjust use throughout.
2264 (struct feed): Likewise.
2265 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
2266 Adjust use.
2267 (snarf_defarg): Use error(), not error_with_file_and_line().
2268
2269 2002-07-19 Chris Demetriou <cgd@broadcom.com>
2270
2271 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
2272 cpp_options is included.
2273
2274 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2275
2276 PR c++/2862, c++/2863
2277 * pt.c (determine_specialization): Compare the length of
2278 TYPE_ARG_TYPES. Tidy.
2279
2280 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2281
2282 PR c++/3797
2283 * decl.c (duplicate_decls): Don't propagate inlining parameters from
2284 olddecl to newdecl when newdecl is a specialization of the
2285 instantiation olddecl.
2286
2287 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2288
2289 PR c++/4802, c++/5387
2290 * decl.c (make_typename_type): Use enforce_access.
2291
2292 2002-07-17 Scott Snyder <snyder@fnal.gov>
2293
2294 PR c++/7320
2295 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
2296
2297 2002-07-12 Mark Mitchell <mark@codesourcery.com>
2298
2299 * class.c (add_method): Correct handling of conversion operators.
2300
2301 2002-07-11 Mark Mitchell <mark@codesourcery.com>
2302
2303 PR c++/7224
2304 * class.c (add_method): Simplify.
2305
2306 2002-07-11 Jason Merrill <jason@redhat.com>
2307
2308 PR c++/7279
2309 * tree.c (cp_copy_res_decl_for_inlining): Also copy
2310 TREE_ADDRESSABLE.
2311
2312 2002-07-10 Graham Stott <graham.stott@btinternet.com>
2313
2314 * pt.c (template_parm_this_level_p, push_template_decl_real):
2315 Pass depth as int pointer.
2316
2317 2002-07-11 Tim Josling <tej@melbpc.org.au>
2318
2319 Remove front end hard coding from gengtype.c.
2320
2321 * config-lang.in (gtfiles): Add files needed for this front end.
2322
2323 2002-07-10 Mark Mitchell <mark@codesourcery.com>
2324
2325 * cp-tree.h (unqualified_name_lookup_error): Declare it.
2326 (begin_function_definition): Adjust prototype.
2327 * lex.c (unqualified_name_lookup_error): New function, split out
2328 from ...
2329 (do_identifier): ... here.
2330 * parse.y (parse_begin_function_definition): New function.
2331 (fn.def1): Use it.
2332 * semantics.c (begin_function_definition): Accept decl-specifiers
2333 and attributes as separate parameters.
2334
2335 2002-07-10 Jason Merrill <jason@redhat.com>
2336
2337 PR c++/6255
2338 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
2339 modifying the old one.
2340
2341 2002-07-09 Mark Mitchell <mark@codesourcery.com>
2342
2343 * cp-tree.h (constructor_name_p): Declare it.
2344 (check_template_template_default_arg): Likewise.
2345 * class.c (handle_using_decl): Use constructor_name_p.
2346 * decl.c (grokdeclarator): Likewise.
2347 * decl2.c (constructor_name_p): Define it.
2348 * init.c (build_member_call): Use constructor_name_p.
2349 * parse.y (template_parm): Use check_template_template_default_arg.
2350 * pt.c (check_explicit_specialization): Use constructor_name_p.
2351 * semantics.c (check_template_template_default_arg): New function.
2352
2353 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2354
2355 * pt.c (can_complete_type_without_circularity): Add static to
2356 function definition.
2357
2358 2002-07-08 Mark Mitchell <mark@codesourcery.com>
2359
2360 * cp-tree.h (have_extern_spec): Declare it
2361 * decl.c (have_extern_spec): Define it.
2362 (start_decl): Eliminate use of used_extern_spec.
2363 (start_function): Likewise.
2364 * parse.y (have_extern_spec): Remove declaration.
2365 (used_extern_spec): Likewise.
2366 (frob_specs): Eliminate use of used_extern_spec.
2367 (.hush_warning): Likewise.
2368
2369 2002-07-07 Mark Mitchell <mark@codesourcery.com>
2370
2371 * Make-lang.in (cp/parse.o): Depend on decl.h.
2372 * cp-tree.h (do_decl_instantiation): Change prototype.
2373 * parse.y: Include decl.h.
2374 (parse_decl_instantiation): New function.
2375 (explicit_instantiation): Use it.
2376 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
2377 and DECLSPECS.
2378
2379 2002-07-07 Roger Sayle <roger@eyesopen.com>
2380
2381 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
2382 constructor and destructor tests when passed a TEMPLATE_DECL.
2383
2384 2002-07-05 Jason Merrill <jason@redhat.com>
2385
2386 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
2387 pointers.
2388
2389 PR optimization/7145
2390 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
2391
2392 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
2393
2394 Repair damage on weak-impared targets caused by my previous patch.
2395 * cp-tree.h (import_export_tinfo): Add parameter.
2396 * decl2.c (import_export_tinfo): Add parameter, post adjust
2397 DECL_COMDAT.
2398 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
2399 import_export_tinfo.
2400
2401 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2402
2403 PR c++/6944
2404 * init.c (build_aggr_init): Remove qualifiers of init before calling
2405 build_vec_init.
2406 (build_vec_init): Flatten multi-dimensional array during cleanup.
2407 (build_vec_delete_1): Abort if the type of each element is array.
2408
2409 2002-07-03 Graham Stott <graham.stott@btinternet.com>
2410
2411 * pt.c (instantiate_class_template): Fix typo.
2412
2413 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2414
2415 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
2416 by CVS conflict in my last patch.
2417
2418 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2419
2420 PR c++/6716
2421 * pt.c (can_complete_type_without_circularity): New function.
2422 (instantiate_class_template): Use it.
2423 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
2424 message due to incomplete fields.
2425
2426 2002-07-01 Mark Mitchell <mark@codesourcery.com>
2427
2428 PR c++/7112
2429 * mangle.c (write_expression): Add mangling for sizeof when
2430 applied to a type.
2431 * operators.def: Remove stale comment.
2432
2433 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
2434
2435 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
2436 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
2437 (tinfo_decl_type): Replace with ...
2438 (type_info_ptr_type): ... this.
2439 (import_export_tinfo): Declare.
2440 (tinfo_decl_p): Rename to ...
2441 (unemitted_tinfo_decl_p): ... this.
2442 * decl2.c (import_export_decl): Break out tinfo handling into ...
2443 (import_export_tinfo): ... here. New function.
2444 (finish_file): Adjust.
2445 * rtti.c (TINFO_REAL_NAME): New macro.
2446 (init_rtti_processing): Create the tinfo types.
2447 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
2448 (get_tinfo_decl): Adjust.
2449 (get_tinfo_ptr): New function.
2450 (get_type_id): Use it.
2451 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
2452 (ptr_initializer): Use get_tinfo_ptr.
2453 (ptm_initializer): Likewise.
2454 (synthesize_tinfo_var): Break into ...
2455 (get_pseudo_ti_init): ... this. Just create the initializer.
2456 (get_pseudo_ti_desc): .. and this.
2457 (create_real_tinfo_var): Remove.
2458 (create_pseudo_type_info): Don't create the vtable decl here.
2459 (get_vmi_pseudo_type_info): Remove.
2460 (create_tinfo_types): Adjust.
2461 (tinfo_decl_p): Rename to ...
2462 (unemitted_tinfo_decl_p): ... here. Adjust.
2463 (emit_tinfo_decl): Adjust. Create the initializer.
2464
2465 2002-06-27 Mark Mitchell <mark@codesourcery.com>
2466
2467 PR c++/6695
2468 * pt.c (tsubst_friend_class): Substitute into the context of the
2469 friend before using it.
2470
2471 2002-06-26 Mark Mitchell <mark@codesourcery.com>
2472
2473 * cp-tree.h (xref_tag): Change prototype.
2474 (handle_class_head): Likewise.
2475 (build_x_component_ref): Likewise.
2476 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
2477 (xref_tag): Take attributes as a separate parameter.
2478 (xref_tag_from_type): Adjust call to xref_tag.
2479 * decl2.c (build_expr_from_tree): Adjust call to
2480 build_x_component_ref.
2481 (handle_class_head): Take attributes as a separate parameter.
2482 * parse.y (parse_xref_tag): New function.
2483 (parse_handle_class_head): Likewise.
2484 (primary): Use parse_xref_tag.
2485 (class_head_decl): Use parse_handle_class_head.
2486 (class_head_defn): Likewise.
2487 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
2488 (build_dynamic_cast_1): Likewise.
2489 (create_pseudo_type_info): Likewise.
2490 (emit_support_tinfos): Likewise.
2491 * typeck.c (build_object_ref): Adjust call to
2492 build_x_component_ref.
2493 (build_x_component_ref): Remove protect parameter.
2494
2495 2002-06-25 Mark Mitchell <mark@codesourcery.com>
2496
2497 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
2498 * class.c (handle_using_decl): Likewise.
2499 (instantiate_type): Likewise.
2500 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
2501 (xref_basetypes): Change prototype.
2502 (begin_mem_initializers): New function.
2503 (get_overloaded_fn): Likewise.
2504 * decl.c (xref_basetypes): Simplify.
2505 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
2506 * init.c (build_offset_ref): Likewise.
2507 * parse.y (base_init): Use begin_mem_initializers().
2508 (structsp): Adjust call to xref_basetypes.
2509 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
2510 (instantiate_class_template): Adjust call to xref_basetypes.
2511 * semantics.c (begin_mem_initializers): New function.
2512 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
2513 (really_overlaoded_fn): Likewise.
2514 (get_overloaded_fn): New function.'
2515 (get_first_fn): USe BASELINK_FUNCTIONS.
2516
2517 2002-06-24 Mark Mitchell <mark@codesourcery.com>
2518
2519 * cp-tree.h (SCALAR_TYPE_P): New macro.
2520 (check_for_out_of_scope_variable): New function.
2521 (at_class_scope_p): Likewise.
2522 (finish_fname): Likewise.
2523 * class.c (finish_struct): Use at_function_scope_p.
2524 * decl.c (check_for_out_of_scope_variable): New function, split
2525 out from do_identifier.
2526 (finish_enum): Use at_function_scope_p.
2527 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
2528 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
2529 (primary): Use at_function_scope_p.
2530 * search.c (at_class_scope_p): New function.
2531 * semantics.c (finish_fname): Likewise.
2532 (check_multiple_declarators): Use at_function_scope_p.
2533
2534 2002-06-23 Mark Mitchell <mark@codesourcery.com>
2535
2536 * parse.y (parse_scoped_id): New function.
2537 (primary): Use it.
2538 * cp-tree.h (do_scoped_id): Adjust declaration.
2539 * lex.c (do_scoped_id): Remove call to yylex.
2540 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
2541 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
2542 expanding it inline.
2543
2544 2002-06-23 Matt Thomas <matt@3am-software.com>
2545
2546 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
2547 "#if VMS_TARGET".
2548
2549 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2550
2551 * mangle.c (integer_type_codes): Const-ify.
2552
2553 2002-06-20 Richard Henderson <rth@redhat.com>
2554
2555 PR c++/6747
2556 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
2557 Call put_var_into_stack.
2558
2559 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2560
2561 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
2562 array size calculation.
2563
2564 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2565
2566 PR c++/6892
2567 * pt.c (tsubst_expr): Handle FILE_STMT.
2568
2569 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2570
2571 PR c++/6723
2572 * pt.c (lookup_template_class): Don't build complete argument of
2573 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
2574 argument.
2575
2576 2002-06-19 Akim Demaille <akim@epita.fr>
2577
2578 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
2579 decl.h's TYPENAME.
2580 * spew.c, lex.c: Adjust.
2581 * parse.y (explicit_instantiation): Add empty action to override
2582 the default $$ = $1 where it introduces a type clash.
2583
2584 2002-06-14 Jason Merrill <jason@redhat.com>
2585
2586 * semantics.c (begin_for_stmt): Push the 'for' scope before
2587 adding the FOR_STMT.
2588
2589 C++ ABI changes.
2590 * class.c (build_base_field): Set DECL_PACKED.
2591 (layout_class_type): Don't use tail padding of PODs.
2592 * mangle.c (write_unqualified_name): Fix template conversion op
2593 mangling.
2594
2595 2002-06-16 Richard Henderson <rth@redhat.com>
2596
2597 PR opt/6793
2598 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
2599 after template instantiation.
2600
2601 2002-06-16 Richard Henderson <rth@redhat.com>
2602
2603 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
2604
2605 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
2606
2607 * cp-tree.h (compiler_error): Remove declaration.
2608 * lex.c (compiler_error): Remove definition.
2609
2610 2002-06-14 Steve Ellcey <sje@cup.hp.com>
2611
2612 * g++spec.c (LIBUNWIND): New.
2613 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
2614
2615 2002-06-13 Jessica Han <jessica@cup.hp.com>
2616
2617 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
2618 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
2619 (build_vbase_offset_vtbl_entries): Likewise.
2620 * rtti.c (build_headof): Likewise.
2621 (get_tinfo_decl_dynamic): Likewise.
2622 (create_pseudo_type_info): Likewise.
2623
2624 2002-06-12 Stan Shebs <shebs@apple.com>
2625
2626 * mpw-config.in: Remove file, no longer used.
2627 * mpw-make.sed: Ditto.
2628
2629 2002-06-07 Zack Weinberg <zack@codesourcery.com>
2630
2631 * decl2.c: Update call to cpp_handle_option.
2632
2633 2002-06-07 H.J. Lu (hjl@gnu.org)
2634
2635 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
2636
2637 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
2638
2639 * error.c (cp_error_at): Fix typo.
2640
2641 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
2642
2643 * error.c (cp_diagnostic_starter): Adjust call.
2644 (maybe_print_instantiation_context): Change prototype to take a
2645 'diagnostic_info *'.
2646 (print_instantiation_full_context): Likewise.
2647 (print_instantiation_partial_context): Likewise.
2648 (cp_diagnostic_starter): Likewise.
2649 (cp_diagnostic_finalizer): Likewise.
2650 (cp_print_error_function): Likewise.
2651 (cp_printer): Take a secondary parameter as a 'text_info *'.
2652 Remove output_state savings. Adjust calls.
2653
2654 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
2655
2656 * pt.c (inline_parm_levels): Mark for GC.
2657
2658 * mangle.c (start_mangling): Allocate G.substitutions here...
2659 (init_mangle): ... rather than here.
2660 (finish_mangling): Clear the varray pointer when done with it.
2661 * spew.c (yylexstring): Don't use VARRAY_FREE.
2662 * search.c (bfs_walk): Don't use VARRAY_FREE.
2663 * decl2.c (pending_statics): Use gengtype to mark.
2664 (deferred_fns): Likewise.
2665 (ssdf_decls): Likewise.
2666 (init_decl2): Delete.
2667 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
2668 (cxx_init_decl_processing): Don't call init_decl2.
2669 (cxx_pop_function_context): Don't use VARRAY_FREE.
2670 * cp-tree.h (struct saved_scope): No need for special marking
2671 of varrays.
2672 (struct language_function): Likewise.
2673 (local_classes): Use gengtype to mark.
2674 (init_decl2): Delete prototype.
2675 * class.c (init_class_processing): Don't use
2676 ggc_add_tree_varray_root.
2677 (build_vtbl_initializer): Don't use VARRAY_FREE.
2678
2679 * decl.c (typename_compare): Don't use same_type_p.
2680
2681 * decl.c: Include hashtab.h instead of hash.h.
2682 (typename_hash): Update to use htab_h.
2683 (typename_compare): Likewise.
2684 (typename_htab): Use gengtype to mark.
2685 (build_typename_type): Update to use htab_h.
2686 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
2687
2688 * Make-lang.in (gt-cp-tree.h): New rule.
2689 (cp/tree.o): Depend on gt-cp-tree.h.
2690 * config-lang.in (gtfiles): Add cp/tree.c.
2691 * tree.c: Include gt-cp-tree.h.
2692 (list_hash_table): Use gengtype to mark.
2693 (init_tree): Use gengtype to mark trees.
2694
2695 * Make-lang.in (cp/decl.o): Add debug.h dependency.
2696 * call.c (struct z_candidate): Use gengtype.
2697 (USER_CONV_CAND): Use WRAPPER_ZC.
2698 (convert_class_to_reference): Use build_zc_wrapper.
2699 (build_type_conversion_1): Likewise.
2700 (build_over_call): Use WRAPPER_ZC.
2701 (add_warning): Use build_zc_wrapper.
2702 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
2703 * cp-tree.h (struct lang_identifier): Use gengtype.
2704 (struct template_parm_index_s): Likewise.
2705 (struct ptrmem_cst): Likewise.
2706 (struct tree_binding): Likewise.
2707 (struct tree_overload): Likewise.
2708 (struct tree_srcloc): Likewise.
2709 (struct tree_wrapper): Likewise. Also modify to have a pointer
2710 to struct z_candidate rather than void.
2711 (enum cp_tree_node_structure_enum): New.
2712 (union lang_tree_node): New.
2713 (cxx_mark_tree): Delete prototype.
2714 (cp_tree_node_structure): New prototype.
2715 (build_ptr_wrapper): Delete prototype.
2716 (build_int_wrapper): Delete prototype.
2717 (build_zc_wrapper): New prototype.
2718 * decl.c: Include debug.h
2719 (cxx_mark_tree): Delete.
2720 (cp_tree_node_structure): New.
2721 * tree.c (build_ptr_wrapper): Delete.
2722 (build_int_wrapper): Delete.
2723 (build_zc_wrapper): New.
2724
2725 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
2726 Correct typo. Patch from k_fukui@highway.ne.jp.
2727
2728 * semantics.c (current_stmt_tree): Update for change to
2729 struct language_function.
2730 (finish_mem_initializers): Likewise.
2731 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
2732 * cp-tree.h (struct language_function): Rename from
2733 cp_language_function. Change all uses.
2734 (cp_function_chain): Don't need to cast.
2735
2736 * class.c (duplicate_tag_error): Reset discriminator.
2737 (check_bases_and_members): Update for data structure changes.
2738 * cp-tree.h (struct lang_id2): Use gengtype.
2739 (flagged_type_tree): Likewise.
2740 (SET_LANG_ID): Use GGC on struct lang_id2.
2741 (struct cp_language_function): Use gengtype. Remove field
2742 'x_vcalls_possible_p'.
2743 (current_vcalls_possible_p): Delete.
2744 (struct lang_type_header): New.
2745 (struct lang_type_class): Rename from struct lang_type. Include
2746 struct lang_type_header.
2747 (struct lang_type_ptrmem): New.
2748 (struct lang_type): New.
2749 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
2750 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
2751 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
2752 (struct lang_decl_flags): Use gengtype. Add discriminators.
2753 (struct lang_decl): Use gengtype. Add and use discriminators.
2754 Update the macros that reference moved fields.
2755 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
2756 (SET_DECL_THUNK_P): Set discriminator too.
2757 (clear_inline_text_obstack): Delete prototype.
2758 (finish_inline_definitions): Delete prototype.
2759 (mark_pending_inlines): Delete prototype.
2760 (lang_check_failed): New prototype.
2761 * decl.c (struct named_label_use_list): Use gengtype.
2762 (struct named_label_list): Likewise.
2763 (mark_binding_level): Delete.
2764 (mark_named_label_lists): Delete.
2765 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
2766 (cxx_init_decl_processing): Use generated marker routine.
2767 (begin_destructor_body): Delete dead set to
2768 current_vcalls_possible_p.
2769 (mark_lang_function): Delete.
2770 (mark_cp_function_context): Delete.
2771 (lang_mark_tree): Use generated marker routines.
2772 * decl2.c (start_objects): Set discriminator when setting
2773 GLOBAL_INIT_PRIORITY.
2774 * lex.c (retrofit_lang_decl): Set discriminators.
2775 (copy_lang_type): Update for changes to lang_type structure.
2776 (cp_make_lang_type): Set discriminator.
2777 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
2778 * search.c: Include ggc.h.
2779 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
2780 (finish_inline_definitions): Delete.
2781 * spew.c (struct token): Use gengtype.
2782 (struct token_chunk): New.
2783 (struct unparsed_text): Use gengtype. Store tokens in chunks.
2784 (struct feed): Use gengtype.
2785 (feed_obstack): Delete.
2786 (feed): Mark as GC root.
2787 (pending_inlines): Mark as GC root.
2788 (pending_inlines_tail): Likewise.
2789 (processing_these_inlines): Likewise.
2790 (token_obstack): Make static.
2791 (first_token): Likewise.
2792 (init_spew): Don't initialize deleted things; use gengtype for roots.
2793 (clear_inline_text_obstack): Delete.
2794 (feed_input): Use GC for struct feed. Update for changes to
2795 struct unparsed_text.
2796 (mark_pending_inlines): Delete.
2797 (next_token): Rename from add_token. Change all callers. Update
2798 for changes to struct unparsed_text.
2799 (space_for_token): New.
2800 (remove_last_token): New.
2801 (alloc_unparsed_text): New.
2802 (snarf_block): Take an unparsed_text. Update for changes to struct
2803 unparsed_text.
2804 (snarf_method): Update for changes to struct unparsed_text.
2805 (snarf_defarg): Update for changes to struct unparsed_text.
2806 * tree.c (lang_check_failed): New.
2807
2808 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
2809 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
2810 (cp/spew.o): Add dependency on gt-<filename>.h.
2811 (cp/decl2.o): Add dependency on gt-<filename>.h.
2812 (cp/call.o): Add dependency on gt-<filename>.h.
2813 (cp/pt.o): Add dependency on gt-<filename>.h.
2814 (cp/repo.o): Add dependency on gt-<filename>.h.
2815 (cp/parse.o): Add dependency on gt-<filename>.h.
2816 * call.c: Use gengtype for roots.
2817 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
2818 decl2.c parse.y pt.c repo.c spew.c.
2819 * cp-tree.h: Use gengtype for roots.
2820 (struct saved_scope): Use GGC, gengtype.
2821 (cp_parse_init): Delete prototype.
2822 (init_pt): Delete prototype.
2823 * decl.c: Use gengtype for roots.
2824 (mark_saved_scope): Delete.
2825 (cxx_init_decl_processing): Don't call deleted initilisation
2826 routines.
2827 (signed_size_zero_node): Delete, unused.
2828 * decl.h: Use gengtype for roots.
2829 * decl2.c: Use gengtype for roots.
2830 * lex.h: Use gengtype for roots.
2831 * parse.y: Use gengtype for roots.
2832 (cp_parse_init): Delete.
2833 * pt.c: Use gengtype for roots.
2834 (init_pt): Delete.
2835 * repo.c: Use gengtype for roots.
2836 * spew.c: Use gengtype for roots.
2837
2838 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
2839 (cp/decl.o): Add dependency on gtype-cp.h.
2840 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
2841 Include gtype-cp.h. Allow for filename changes.
2842
2843 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
2844 (cp/decl.o): Add cp/gt-decl.h dependency.
2845 * config-lang.in (gtfiles): New.
2846 * tree.h: Rename struct binding_level to struct cp_binding_level.
2847 * decl.c: Rename struct binding_level to struct cp_binding_level.
2848 Include cp/gt-decl.h.
2849 (struct cp_binding_level): Use gengtype.
2850 (make_binding_level): Use GGC on struct cp_binding_level.
2851 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
2852 (cxx_init_decl_processing): Mark free_binding_level as
2853 deletable.
2854
2855 * decl.c (mark_cp_function_context): Update calling sequence.
2856
2857 * decl.c (start_function): Don't free 'struct
2858 cp_language_function'.
2859 (pop_cp_function_context): Likewise.
2860 (save_function_data): Allocate it using GC.
2861 * semantics.c (genrtl_start_function): Don't free 'struct
2862 cp_language_function'.
2863
2864 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
2865
2866 * lang-specs.h: Use cpp_debug_options.
2867
2868 2002-05-28 Zack Weinberg <zack@codesourcery.com>
2869
2870 * mangle.c, tree.c: Include real.h.
2871 * Make-lang.in: Update dependency lists.
2872
2873 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
2874
2875 * lex.c: Don't include c-lex.h.
2876 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
2877
2878 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
2879
2880 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
2881
2882 2002-05-22 Richard Henderson <rth@redhat.com>
2883
2884 * decl.c (obscure_complex_init): Check for VAR_DECL
2885 before using DECL_THREAD_LOCAL.
2886
2887 2002-05-22 Richard Henderson <rth@redhat.com>
2888
2889 * decl.c (check_tag_decl): Handle RID_THREAD.
2890 (obscure_complex_init): Reject run-time init of tls.
2891 (grokvardecl, grokdeclarator): Handle RID_THREAD.
2892 * lex.c (reswords): Add __thread.
2893 (rid_to_yy): Map RID_THREAD to SCSPEC.
2894
2895 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
2896
2897 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
2898 * cp-tree.h (cxx_post_options): Kill.
2899 * cp-lex.c (cxx_post_options): Kill.
2900
2901 2002-05-21 Richard Henderson <rth@redhat.com>
2902
2903 * lex.c (rid_to_yy): Add RID_THREAD.
2904
2905 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
2906
2907 * init.c (build_vec_init): Test for trivial copy-assignment when
2908 copy-assigning arrays.
2909
2910 2002-05-20 Andreas Jaeger <aj@suse.de>
2911
2912 * init.c (build_default_init): Remove unused variable.
2913
2914 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
2915
2916 * call.c (any_strictly_viable): New.
2917 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
2918
2919 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2920
2921 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
2922
2923 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2924
2925 PR c++/186, DR 259
2926 * pt.c (do_decl_instantiation): Don't complain explicit
2927 instantiation after explicit specialization.
2928 (do_type_instantiation): Likewise.
2929
2930 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
2931
2932 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
2933 renamed from...
2934 (complete_type_or_else): ... this. Redefined as macro.
2935 (cxx_incomplete_type_diagnostic): Declare.
2936 (cxx_incomplete_type_error): Define as macro.
2937 * init.c (build_delete): Warn about incomplete types other than
2938 void, and use the built-in operator delete for them.
2939 * typeck.c (complete_type_or_diagnostic): Renamed from
2940 complete_type_or_else. Added warn_only argument, passed to...
2941 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
2942 warnings or errors depending on new warn_only argument. Renamed
2943 from...
2944 (cxx_incomplete_type_error): ... this. New implementation in
2945 terms of cxx_incomplete_type_diagnostic.
2946
2947 2002-05-18 Jason Merrill <jason@redhat.com>
2948
2949 PR c++/6611
2950 * decl2.c (import_export_decl): If we clear
2951 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
2952
2953 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2954
2955 PR c++/6620
2956 * pt.c (verify_class_unification): Don't check if PARM is template
2957 parameter dependent. Simplify.
2958 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
2959 parameter dependent expression.
2960
2961 2002-05-14 Jason Merrill <jason@redhat.com>
2962
2963 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
2964 Do set DECL_COMDAT.
2965 (synthesize_tinfo_var): Take the public decl.
2966 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
2967 (emit_tinfo_decl): Adjust. Call import_export_decl.
2968 * decl2.c (import_export_decl): Simplify tinfo decl handling.
2969
2970 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
2971
2972 * cp-tree.h (struct lang_type): Added non_zero_init.
2973 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
2974 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
2975 * class.c (check_field_decls): Test non_zero_init.
2976 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
2977 zero-to-NULL conversions.
2978 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
2979 type that needs zero-initialization without zeros.
2980 (check_initializer_decl): Compute zero-initializer for types
2981 that require a non-trivial one.
2982 * init.c (build_forced_zero_init): New function.
2983 (build_default_init): Use it.
2984 * tree.c (zero_init_p): New function.
2985 * typeck2.c (force_store_init_value): New function.
2986 (process_init_constructor): Create non-trivial zero-initializers
2987 for array members and class fields.
2988
2989 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
2990
2991 * lang-specs.h: Remove redundant -lang-c++.
2992
2993 2002-05-13 Jason Merrill <jason@redhat.com>
2994
2995 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
2996 (fixed_type_or_null): See through reference vars.
2997 (build_base_path): Vtable contents are constant.
2998 * typeck.c (get_member_function_from_ptrfunc): Likewise.
2999
3000 2002-05-12 Jason Merrill <jason@redhat.com>
3001
3002 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
3003 structs are safe.
3004
3005 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
3006
3007 * cp-tree.h (flag_ansi): Remove.
3008 * decl2.c (flag_ansi): Remove.
3009 (cxx_decode_option): Set flag_iso and flag_undef.
3010
3011 2002-05-09 Jason Merrill <jason@redhat.com>
3012
3013 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
3014 Use subtraction rather than a bitmask to get the index.
3015 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
3016
3017 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
3018
3019 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
3020
3021 * Make-lang.in (decl2.o): Update.
3022 * cp-tree.h (warn_multichar): Remove.
3023 * decl2.c: Include c-common.h.
3024 (warn_multichar): Remove.
3025
3026 2002-05-03 Jason Merrill <jason@redhat.com>
3027
3028 * tree.c (build_cplus_array_type): Only const and volatile get
3029 special handling.
3030
3031 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
3032
3033 2002-04-30 Mark Mitchell <mark@codesourcery.com>
3034
3035 ABI change, returning simple classes from functions.
3036 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
3037 TYPE_HAS_TRIVIAL_INIT_REF is false or
3038 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
3039
3040 2002-04-30 Jason Merrill <jason@redhat.com>
3041
3042 PR debug/6436
3043 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
3044 anonymous class with a typedef if there are attributes.
3045
3046 2002-04-29 Paul Eggert <eggert@twinsun.com>
3047
3048 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
3049
3050 2002-04-29 Jakub Jelinek <jakub@redhat.com>
3051
3052 PR c++/6477
3053 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
3054 non-NULL first.
3055
3056 2002-04-29 Mark Mitchell <mark@codesourcery.com>
3057
3058 PR c++/6492
3059 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
3060 enter that scope before name lookup.
3061
3062 PR c++/6486
3063 * method.c (do_build_copy_constructor): Avoid building
3064 cv-qualified reference types.
3065
3066 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
3067
3068 PR c++/5719
3069 * decl.c (grok_op_properties): Assignment ops don't have to return
3070 by value. operator% should.
3071
3072 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
3073
3074 PR c/6343
3075 * decl.c (duplicate_decls): Call merge_weak.
3076
3077 2002-04-26 Richard Henderson <rth@redhat.com>
3078
3079 * parse.y (malloced_yyss, malloced_yyvs): New.
3080 (yyoverflow): Re-add. Set them.
3081 (free_parser_stacks): New.
3082
3083 2002-04-26 Mark Mitchell <mark@codesourcery.com>
3084
3085 PR c++/6497
3086 * method.c (do_build_assign_ref): Pass a derivation to
3087 build_method_call when calling base class assignment operators.
3088
3089 2002-04-26 Richard Henderson <rth@redhat.com>
3090
3091 * parse.y (yyoverflow): Revert.
3092
3093 2002-04-26 Richard Henderson <rth@redhat.com>
3094
3095 PR c/3581
3096 * parse.y (string): Remove. Update all uses to use STRING
3097 instead, and not call combine_strings.
3098 * rtti.c (tinfo_name): Use fix_string_type.
3099 * semantics.c (finish_asm_stmt): Don't call combine_strings.
3100 * spew.c (yylexstring): New.
3101 (read_token): Use it.
3102
3103 2002-04-25 Richard Henderson <rth@redhat.com>
3104
3105 PR c/2161
3106 * parse.y (yyoverflow): New.
3107
3108 2002-04-25 Jason Merrill <jason@redhat.com>
3109
3110 PR c++/5607
3111 * search.c (check_final_overrider): No longer static.
3112 * class.c (update_vtable_entry_for_fn): Call it.
3113 * cp-tree.h: Adjust.
3114
3115 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
3116
3117 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
3118 * cp-tree.h (cxx_set_yydebug): Die.
3119 * lex.c (YYDEBUG): Get from c-lex.h.
3120 (cxx_set_yydebug): Remove.
3121 * parse.y: Include c-lex.h.
3122 (YYDEBUG): Get from c-lex.h.
3123
3124 2002-04-24 Mark Mitchell <mark@codesourcery.com>
3125
3126 PR c++/6438.
3127 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
3128 void.
3129
3130 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
3131
3132 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
3133 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
3134 Redefine.
3135 * cp-tree.h (cp_attribute_table): Rename.
3136 * decl.c (lang_attribute_table): Remove declaration.
3137 (cxx_init_decl_processing): Don't set it.
3138 * tree.c (cp_attribute_table): Rename.
3139
3140 2002-04-24 Jason Merrill <jason@redhat.com>
3141
3142 PR c++/6331
3143 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
3144 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
3145 The pedwarn for array assignment is now unconditional.
3146 * tree.c (build_cplus_array_type_1): Still process simple array types
3147 normally in templates.
3148
3149 PR c++/6395
3150 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
3151 stuff for comdats.
3152
3153 2002-04-23 Jakub Jelinek <jakub@redhat.com>
3154
3155 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
3156 node with attributes.
3157
3158 2002-2-23 David O'Brien <obrien@FreeBSD.org>
3159
3160 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
3161 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
3162
3163 2002-04-23 Mark Mitchell <mark@codesourcery.com>
3164
3165 PR c++/6256:
3166 * pt.c (tsubst_friend_class): Handle templates with explicit
3167 nested names.
3168
3169 PR c++/6331:
3170 * typeck.c (merge_types): Remember the cv-qualification of pointer
3171 types when merging them.
3172
3173 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
3174
3175 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
3176 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
3177 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
3178 cxx_mark_function_context): New.
3179 * decl.c (push_cp_function_context, pop_cp_function_context,
3180 mark_cp_function_context): Rename for consistency.
3181 (cxx_init_decl_processing): Don't set old hooks.
3182
3183 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
3184
3185 * call.c (convert_type_from_ellipsis): Rename, update.
3186 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
3187 * cp-tree.h (convert_type_from_ellipsis): Rename.
3188 * decl.c (cxx_init_decl_processing): Don't set hook.
3189
3190 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
3191
3192 * call.c (build_new_method_call): Update.
3193 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
3194 * cp-tree.h (cxx_incomplete_type_error): New.
3195 * decl.c (grokdeclarator, grokparms): Update.
3196 * decl2.c (check_classfn): Update.
3197 * pt.c (tsubst): Update.
3198 * typeck.c (complete_type_or_else, expr_sizeof,
3199 decay_conversion): Update.
3200 * typeck2.c (incomplete_type_error): Rename.
3201 (add_exception_specifier): Update.
3202
3203 2002-04-18 Jason Merrill <jason@redhat.com>
3204
3205 PR c++/5658
3206 * search.c (setup_class_bindings): A class template qualifies as a
3207 type binding.
3208
3209 2002-04-17 Jakub Jelinek <jakub@redhat.com>
3210
3211 PR c++/6316
3212 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
3213 before expanding.
3214
3215 2002-04-16 Mark Mitchell <mark@codesourcery.com>
3216
3217 * init.c (begin_init_stmts): Remove commented out code.
3218 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
3219 * semantics.c (begin_gobal_stmt_expr): Adjust call to
3220 expand_start_stmt_expr.
3221
3222 2002-04-15 Mark Mitchell <mark@codesourcery.com>
3223
3224 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
3225 dso_handle itself, to __cxa_atexit.
3226
3227 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
3228
3229 * error.c (cxx_print_error_function): Adjust call to macros.
3230
3231 2002-04-14 Jakub Jelinek <jakub@redhat.com>
3232
3233 * class.c (layout_virtual_bases): Do all dsize computation on trees.
3234
3235 2002-04-14 Jason Merrill <jason@redhat.com>
3236
3237 * typeck.c (get_member_function_from_ptrfunc): Don't do
3238 gratuitious division and multiplication on
3239 ptrmemfunc_vbit_in_delta targets.
3240
3241 2002-04-12 Mark Mitchell <mark@codesourcery.com>
3242
3243 PR c++/5373.
3244 * semantics.c (finish_expr_stmt): Remember the type of the
3245 expression before any conversions are performed.
3246
3247 2002-04-12 Mark Mitchell <mark@codesourcery.com>
3248
3249 PR c++/5189.
3250 * call.c (add_template_candidate_real): Do not treat member
3251 templates as copy constructors.
3252
3253 2002-04-12 Mark Mitchell <mark@codesourcery.com>
3254
3255 * decl.c (duplicate_decls): Do not copy the RTL for a variable
3256 declaration if the old variable had an incomplete type and the new
3257 variable does not.
3258 (complete_vars): Do not call layout_decl for completed variables.
3259
3260 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
3261
3262 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
3263 with an explicit one.
3264 (follow_tag_typedef): New.
3265 (lookup_tag): Use it to extract the tag of an explicit typedef.
3266 (xref_tag): Likewise.
3267
3268 2002-04-11 Andrew Haley <aph@redhat.com>
3269
3270 * typeck.c (type_after_usual_arithmetic_conversions):
3271 If two types have the same variant, return immediately.
3272 When two floating-point operands are the same precision:
3273 convert to float if one of the operands is float;
3274 if neither operand is one of the standard types, return the type
3275 of the first operand.
3276
3277 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
3278
3279 PR c++/5507
3280 * decl.c (make_typename_type): Remove implicit typenameness.
3281
3282 2002-04-09 Jason Merrill <jason@redhat.com>
3283
3284 PR optimization/6189
3285 * semantics.c (genrtl_start_function): Don't free
3286 DECL_SAVED_FUNCTION_DATA for inline functions.
3287
3288 * init.c (build_member_call): For now, don't convert to
3289 intermediate base if it would cause an error.
3290
3291 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
3292
3293 * parse.y (namespace_qualifier, maybe_identifier,
3294 begin_explicit_instantiation, end_explicit_instantiation,
3295 apparent_template_type, .finish_template_type,
3296 do_id, maybe_init, defarg_again, component_decl_1):
3297 Add ending ';', in accordance with POSIX.
3298
3299 2002-04-06 Mark Mitchell <mark@codesourcery.com>
3300
3301 PR c++/5571
3302 * class.c (layout_class_type): Remember incomplete static
3303 variables.
3304 (finish_struct_1): Call complete_vars, not
3305 hack_incomplete_structures.
3306 * cp-tree.h (hack_incomplete_structures): Rename to ...
3307 (complete_vars): ... this.
3308 (struct saved_scope): Remove incomplete.
3309 (namespace_scope_incomplete): Remove.
3310 * decl.c (struct binding_level): Remove incomplete.
3311 (incomplete_vars): New variable.
3312 (mark_binding_level): Don't mark incomplete.
3313 (print_binding_level): Don't print it.
3314 (mark_saved_scope): Don't mark incomplete.
3315 (pushdecl): Use maybe_register_incopmlete_var.
3316 (cxx_init_decl_processing): Register incomplete_vars for GC.
3317 (start_decl_1): Clarify error message.
3318 (hack_incomplete_vars): Remove.
3319 (maybe_register_incomplete_var): New function.
3320 (complete_vars): Likewise.
3321
3322 2002-04-06 Jason Merrill <jason@redhat.com>
3323
3324 PR c++/4934
3325 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
3326 set before checking it.
3327
3328 PR c++/525
3329 * init.c (build_member_call): Use build_scoped_ref.
3330 (resolve_offset_ref): Likewise.
3331 * call.c (build_scoped_method_call): Likewise.
3332 * tree.c (maybe_dummy_object): Kludge around current_class_type being
3333 wrong.
3334 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
3335 * cp-tree.h: Adjust.
3336
3337 * init.c (push_base_cleanups): Just use build_scoped_method_call.
3338
3339 PR c++/6179
3340 * method.c (implicitly_declare_fn): Pass unqualified type to
3341 synthesize_exception_spec.
3342
3343 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
3344
3345 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
3346 * cvt.c: Update comment.
3347 * init.c (expand_cleanup_for_base): Update.
3348 * semantics.c (finish_parenthesized_expr): Update.
3349 * typeck.c (cp_truthvalue_conversion): Update.
3350
3351 2002-04-04 Jason Merrill <jason@redhat.com>
3352
3353 * semantics.c (finish_eh_cleanup): New fn.
3354 * cp-tree.h: Add prototype.
3355 * init.c (perform_member_init, expand_cleanup_for_base): Use
3356 finish_eh_cleanup.
3357 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
3358 * cp-tree.h: Remove references.
3359 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
3360 * dump.c (cp_dump_tree): Likewise.
3361 * pt.c (tsubst_expr): Likewise.
3362 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
3363 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
3364 * tree.c (cp_statement_code_p): Likewise.
3365
3366 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
3367
3368 PR c++/5636
3369 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
3370 cleanup for nrv.
3371
3372 PR c++/5104
3373 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
3374 specifiers.
3375 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
3376
3377 2002-04-03 Richard Henderson <rth@redhat.com>
3378
3379 * cp-lang.c (cxx_warn_unused_global_decl): New.
3380 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
3381
3382 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
3383
3384 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
3385 * tree.c (init_tree): Don't set hook.
3386
3387 2002-04-03 Roger Sayle <roger@eyesopen.com>
3388
3389 PR c++/5998:
3390 * decl.c (duplicate_decls): Don't mess with assembler names when
3391 redeclaring builtin functions as static.
3392
3393 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
3394
3395 * call.c (build_addr_func): Update.
3396 * class.c (resolve_address_of_overloaded_function): Update.
3397 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
3398 * cp-tree.h (cxx_mark_addressable): New.
3399 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
3400 * decl2.c (build_cleanup): Update.
3401 * except.c (build_throw): Update.
3402 * init.c (resolve_offset_ref): Update.
3403 * pt.c (convert_nontype_argument): Update.
3404 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
3405 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
3406 unary_complex_lvalue): Update.
3407 (mark_addressable): Rename.
3408
3409 2002-04-01 Roger Sayle <roger@eyesopen.com>
3410
3411 PR c++/5998:
3412 * decl.c (duplicate_decls): Overwrite the RTL when (and only
3413 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
3414 but follow the SET_DECL_RTL idiom used elsewhere in the function.
3415
3416 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
3417
3418 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3419 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
3420 * decl.c (grokdeclarator): Update.
3421 * mangle.c (write_integer_cst): Update.
3422 * typeck.c (build_binary_op): Update.
3423
3424 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
3425
3426 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
3427 * lex.c (cxx_init): Don't set hook.
3428
3429 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
3430
3431 * Make-lang.in (error.o): Update.
3432 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
3433 * cp-tree.h (struct diagnostic_context): Predeclare.
3434 (cxx_print_error_function): New.
3435 * error.c: Include langhooks-def.h.
3436 (lang_print_error_function): Rename. Update.
3437 (init_error): Don't set hook.
3438
3439 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
3440
3441 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
3442 Redefine.
3443 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
3444 * decl.c (finish_enum): Similarly.
3445 * error.c (dump_type): Similarly.
3446 * lex.c (cxx_init): Similarly.
3447 * mangle.c (write_builtin_type): Similarly.
3448 * typeck.c (comptypes): Similarly.
3449
3450 2002-03-28 Roger Sayle <roger@eyesopen.com>
3451
3452 PR c++/5998:
3453 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
3454 in the g++ front-end.
3455 (duplicate_decl): Allow redefinition of anticipated built-ins.
3456 Fix inlining problem by over-writing the old DECL_RTL.
3457 (lookup_namespace_name): Fail to find an identifier in the
3458 specified namespace if its still anticipated.
3459 (builtin_function_1): New function split out from builtin_function
3460 to create a builtin in the current namespace with given context.
3461 (builtin_function): Call builtin_function_1 to define the
3462 appropriate builtins in both the std and global namespaces.
3463 (select_decl): Don't test for anticipated decls here.
3464 (unqualified_namespace_lookup): Instead ignore them whilst
3465 searching through scopes and namespaces.
3466 * decl2.c (do_nonmember_using_decl): If a using declaration
3467 specifies an anticipated built-in function, mark it as no longer
3468 anticipated in that scope.
3469 (ambiguous_decl): Avoid resolving to an anticipated decl.
3470 * lex.c (do_scoped_id): Fail to find an identifier in the global
3471 namespace if its still anticipated.
3472
3473 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
3474
3475 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
3476 * cp-tree.h (cp_make_lang_type): Rename.
3477 * lex.c (cp_make_lang_type): Rename.
3478 (make_aggr_type): Update.
3479 * tree.c (init_tree): Don't set make_lang_type_fn.
3480
3481 2002-03-29 Jakub Jelinek <jakub@redhat.com>
3482
3483 PR c++/6073
3484 * class.c (finish_struct_1): Update static field's DECL_MODE even
3485 if its type is a variant of t.
3486
3487 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
3488
3489 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
3490 * cp-tree.h (cxx_insert_default_attributes): New.
3491 * decl.c (insert_default_attributes): Rename.
3492
3493 2002-03-27 Mark Mitchell <mark@codesourcery.com>
3494
3495 PR c++/4884
3496 * call.c (build_op_delete_call): Allow for the fact the placement
3497 may be a COMPOUND_EXPR.
3498
3499 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
3500
3501 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
3502 * cp-tree.h (init_cplus_expand): Remove.
3503 (cxx_expand_expr): New.
3504 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
3505 fix prototype.
3506 (init_cplus_expand): Remove.
3507 * lex.c (cxx_init): Don't call init_cplus_expand.
3508
3509 2002-03-26 Mark Mitchell <mark@codesourcery.com>
3510
3511 PR c++/4884.
3512 * init.c (build_new_1): Allow for the fact the result of
3513 build_function_call may be a COMPOUND_EXPR.
3514
3515 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
3516
3517 PR c++/5682
3518 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
3519 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
3520 (dfs_skip_nonprimary_vbases_markedp): Remove.
3521 * search.c (get_shared_vbase_if_not_primary): Remove.
3522 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
3523 (dfs_skip_nonprimary_vbases_markedp): Remove.
3524 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
3525 (dfs_marked_real_bases_queue_p): Likewise.
3526
3527 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
3528
3529 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
3530 * cp-tree.h (cxx_mark_tree): New.
3531 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
3532
3533 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
3534
3535 * cp-tree.h (cxx_maybe_build_cleanup): New.
3536 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
3537 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
3538 * tree.c (build_target_expr): Update.
3539 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
3540
3541 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
3542
3543 * decl2.c (cxx_decode_option): Handle -E.
3544 * lang-specs.h (default_compilers): Preprocess with cc1plus.
3545 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
3546
3547 2002-03-23 Jakub Jelinek <jakub@redhat.com>
3548
3549 PR c++/6037
3550 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
3551
3552 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
3553
3554 * error.c (dump_type): Be careful about implicit typenames.
3555
3556 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
3557
3558 PR C++/3656
3559 * semantics.c (finish_base_specifier): Handle erronous base
3560 classes.
3561
3562 2002-03-22 Zack Weinberg <zack@codesourcery.com>
3563
3564 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
3565 REAL_IS_NOT_DOUBLE.
3566
3567 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
3568
3569 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
3570 an index into the vtable_entry array regardless of
3571 TARGET_PTRMEMFUNC_VBIT_LOCATION.
3572
3573 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
3574
3575 * tree.c (cp_cannot_inline_tree_fn): Same.
3576
3577 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
3578
3579 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
3580 insert_block, getdecls, global_bindings_p): New.
3581
3582 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
3583
3584 PR c++/4361
3585 * mangle.c (struct globals) Add internal_mangling_p member.
3586 (write_template_param): Do internal mangling, if needed.
3587 (mangle_conv_op_name_for_type): Request internal mangling.
3588
3589 2002-03-20 Jason Merrill <jason@redhat.com>
3590
3591 PR c++/2136
3592 * init.c (build_delete): Check access for a member op delete here.
3593 * decl2.c (delete_sanity): Not here.
3594
3595 2002-03-19 Jason Merrill <jason@redhat.com>
3596
3597 PR c++/5118
3598 * class.c (get_vfield_name): Use the constructor_name.
3599
3600 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
3601
3602 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
3603 * cp-tree.h (lang_printable_name): Rename.
3604 * error.c (lang_decl_name): Use new hook.
3605 * lex.c (cxx_init): Remove old hook.
3606 * pt.c (tsubst_decl): Use new hook.
3607 * tree.c (lang_printable_name): Rename.
3608
3609 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
3610
3611 PR c++/3882
3612 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
3613 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
3614 only after recording the declaration.
3615
3616 2002-03-18 Jason Merrill <jason@redhat.com>
3617
3618 PR c++/2039
3619 * init.c (resolve_offset_ref): Hand off to build_component_ref.
3620
3621 PR c++/4222, c++/5995
3622 * call.c (build_over_call): Fix empty class logic.
3623
3624 PR c++/3870
3625 * cp-tree.h (struct saved_scope): Add last_parms field.
3626 * decl.c (maybe_push_to_top_level): Save last_function_parms.
3627 (pop_from_top_level): Restore it.
3628
3629 PR c++/4377
3630 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
3631 NON_LVALUE_EXPRs.
3632
3633 PR c++/4003
3634 * pt.c (tsubst_friend_function): Use decl_namespace_context.
3635
3636 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
3637 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
3638 type with a nontrivial destructor.
3639
3640 2002-03-17 Jason Merrill <jason@redhat.com>
3641
3642 PR c++/4460
3643 * class.c (build_base_path): Virtual base layout is fixed in
3644 in-charge [cd]tors.
3645
3646 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
3647
3648 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
3649 * parse.y (yyparse): Remove macro.
3650
3651 2002-03-17 Jason Merrill <jason@redhat.com>
3652
3653 PR c++/5757
3654 * init.c (build_new_1): Pass the right pointer to op delete.
3655
3656 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
3657
3658 PR c++/4361
3659 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
3660 conversion operators go.
3661 (struct lang_decl_flags): Add template_conv_p and unused
3662 bitfields.
3663 (DECL_TEMPLATE_CONV_FN_P): New macro.
3664 * call.c (build_user_type_conversion_1): Don't check second type
3665 conversion of overload set first.
3666 * class.c (add_method): Make sure templated conversion operators
3667 all end up on slot 2.
3668 * lex.c (do_identifier): A conversion operator token might be
3669 satisfied by a templated conversion operator.
3670 * pt.c (check_explicit_specialization): Use
3671 CLASSTYPE_FIRST_CONVERSION_SLOT.
3672 (template_parm_this_level_p): New function.
3673 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
3674 * search.c (lookup_fnfields_1): Template conversions will be on
3675 the first slot.
3676 * typeck.c (build_component_ref): Preserve the type of an
3677 conversion operator name on the overload type.
3678 (build_x_function_call): Retrieve the conversion operator name.
3679
3680 2002-03-15 Richard Henderson <rth@redhat.com>
3681
3682 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
3683
3684 2002-03-15 Mark Mitchell <mark@codesourcery.com>
3685
3686 * cp-tree.h (CLEANUP_DECL): Remove.
3687 (CLEANUP_EXPR): Likewise.
3688 * decl.c (destroy_local_var): Simplify.
3689 (maybe_build_cleanup): Tidy.
3690 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
3691 * semantics.c (cp_expand_stmt): Likewise.
3692 * cp/tree.c (cp_statement_code_p): Likewise.
3693
3694 2002-03-15 Jason Merrill <jason@redhat.com>
3695
3696 PR c++/5857
3697 * decl.c (duplicate_decls): Use merge_types instead of common_type.
3698 * typeck.c (common_type): Just hand off to
3699 type_after_usual_arithmetic_conversions and
3700 composite_pointer_type.
3701 (merge_types): New fn.
3702 (commonparms): Use it instead of common_type.
3703 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
3704 (composite_pointer_type): Also handle attributes.
3705 * cp-tree.h: Declare merge_types.
3706
3707 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
3708 variables.
3709 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
3710
3711 2002-03-14 Richard Henderson <rth@redhat.com>
3712
3713 * decl.c: Include c-pragma.h.
3714 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
3715 * Make-lang.in: Update dependencies.
3716
3717 2002-03-14 Jakub Jelinek <jakub@redhat.com>
3718
3719 PR c++/5908
3720 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
3721 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
3722
3723 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
3724
3725 * mangle.c (write_builtin_type): Handle 128-bit integers even if
3726 they are not a standard integer type.
3727
3728 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
3729
3730 * cp-tree.h (init_init_processing): Remove declaration.
3731 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
3732 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
3733
3734 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3735
3736 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
3737 Define.
3738 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
3739 tree_code_length.
3740 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
3741 cplus_tree_code_name): Delete.
3742 (cxx_init): Don't call add_c_tree_codes, instead set
3743 lang_unsafe_for_reeval. Don't try to copy into the various
3744 tree_code arrays.
3745
3746 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
3747
3748 PR c++/5659
3749 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
3750 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
3751 definitions.
3752
3753 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
3754
3755 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
3756 DR209 is now not a defect.
3757 * cp-tree.h (skip_type_access_control): Remove.
3758 * decl.c (grokdeclarator): Do type access control for friend
3759 declarations.
3760 * semantics.c (decl_type_access_control): Don't reset
3761 current_type_lookups.
3762 (save_type_access_control): Always save the lookups.
3763 (skip_type_access_control): Remove.
3764 (finish_class_definition): Don't change type_lookups.
3765
3766 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
3767
3768 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
3769 It is incorrect.
3770 * typeck.c (build_static_cast): Compare non-qualified types
3771 with pointer to member conversions.
3772
3773 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
3774 Daniel Berlin <dan@dberlin.org>
3775
3776 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
3777 (cxx_get_alias_set): Use it.
3778
3779 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3780
3781 * cp-tree.h (stabilize_expr): Prototype.
3782
3783 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
3784
3785 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
3786 conditional return void.
3787
3788 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
3789
3790 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
3791 * cp-tree.h (cxx_unsave): New.
3792 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
3793 (init_tree): Update.
3794
3795 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3796
3797 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
3798 explicit sizeof/sizeof.
3799 * decl2.c (cxx_decode_option): Likewise.
3800 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
3801
3802 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
3803
3804 PR c++/775
3805 * decl.c (lookup_tag): Only reject enum/class mismatch, not
3806 class/union mismatch.
3807 * parse.y (check_class_key): New function.
3808 (structsp): Call it.
3809
3810 2002-03-01 Michael Matz <matz@suse.de>
3811
3812 * typeck.c (cp_pointer_int_sum): Complete inner type which is
3813 used later by size_in_bytes().
3814
3815 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
3816
3817 * cp-tree.h: Require __GNUC__ to be #defined.
3818 (build_init): Add missing prototype.
3819
3820 2002-03-01 Jason Merrill <jason@redhat.com>
3821
3822 * except.c: Don't include decl.h or obstack.h. Do include
3823 tree-inline.h.
3824 (build_throw): Destroy temporaries from the thrown
3825 expression before calling __cxa_throw. Construct a thrown
3826 temporary directly into the exception object.
3827 (stabilize_throw_expr): New function.
3828 (wrap_cleanups_r): New function.
3829 * tree.c (stabilize_expr): New function.
3830 * init.c (build_init): New function.
3831 * Make-lang.in (cp/except.o): Adjust .h deps.
3832
3833 2002-02-28 Jason Merrill <jason@redhat.com>
3834
3835 * search.c (lookup_base_r): Don't clear is_non_public just because
3836 we found a friendly scope.
3837
3838 * decl.c (finish_function): Only warn about missing return
3839 statement with -Wreturn-type.
3840
3841 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
3842
3843 * class.c (build_clone): Update.
3844 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
3845 * cp-tree.h (cxx_dup_lang_specific_decl): New.
3846 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
3847 (copy_decl): Update.
3848 * method.c (make_thunk): Update.
3849
3850 2002-02-27 Zack Weinberg <zack@codesourcery.com>
3851
3852 * decl2.c: Delete traditional-mode-related code copied from
3853 the C front end but not used, or used only to permit the
3854 compiler to link.
3855
3856 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
3857
3858 PR c++/4093
3859 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
3860 to void.
3861
3862 2002-02-22 Jakub Jelinek <jakub@redhat.com>
3863
3864 PR other/5746
3865 * semantics.c (finish_switch_cond): Don't call get_unwidened
3866 if error_mark_node.
3867
3868 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
3869
3870 PR c++/2645, DR 295
3871 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
3872 tf_keep_type_decl.
3873 (make_typename_type): Use tsubst_flags_t.
3874 * decl.c (make_typename_type): Adjust. Return non-artificial
3875 TYPE_DECLs, if required.
3876 (grokdeclarator): Simplify CVR qualification handling. Allow bad
3877 qualifiers on typedef types.
3878 * decl2.c (handle_class_head): Adjust make_typename_type call.
3879 * parse.y (nested_name_specifier): Likewise.
3880 (typename_sub0): Likewise.
3881 (typename_sub1): Likewise.
3882 * pt.c (convert_template_argument): Adjust make_typename_type
3883 return value.
3884 (tsubst): Adjust cp_build_qualified_type_real calls.
3885 (check_cv_quals_for_unify): Cope with allowing bad qualifications
3886 on template type parms.
3887 (instantiate_decl): Recheck substitutions to give warnings on bad
3888 qualifications.
3889 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
3890
3891 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
3892
3893 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
3894
3895 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
3896 unless DECL_ALWAYS_INLINE.
3897
3898 2002-02-20 Jakub Jelinek <jakub@redhat.com>
3899
3900 * typeck.c (cp_pointer_int_sum): Renamed from
3901 pointer_int_sum, call pointer_int_sum.
3902
3903 2002-02-20 Jakub Jelinek <jakub@redhat.com>
3904
3905 * decl.c (duplicate_decls): Return 0 if issued error about
3906 redeclaration.
3907
3908 2002-02-19 Jason Merrill <jason@redhat.com>
3909
3910 ABI change: Mangle `void (A::*)() const' as
3911 M1AKFvvE, not MK1AFvvE.
3912 * mangle.c (write_function_type): Write cv-quals for member
3913 function type here.
3914 (write_pointer_to_member_type): Not here.
3915
3916 2002-02-18 Jason Merrill <jason@redhat.com>
3917
3918 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
3919 (do_decl_instantiation): Likewise.
3920
3921 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
3922
3923 PR c++/5685
3924 * decl.c (duplicate_decls): Make warning unconditional
3925 if duplicate default argument declarations are present.
3926
3927 2002-02-17 Jakub Jelinek <jakub@redhat.com>
3928
3929 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
3930 shortening.
3931
3932 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
3933
3934 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
3935 remove incorrect comment. Move #if 0'd code to common path. Use
3936 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
3937
3938 2002-02-13 Jason Merrill <jason@redhat.com>
3939
3940 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
3941 (finish_function): Don't warn if current_function_returns_null.
3942
3943 * typeck2.c (digest_init): Do handle values of vector type.
3944
3945 * typeck2.c (digest_init, process_init_constructor): Treat vectors
3946 like arrays.
3947
3948 2002-02-11 Jason Merrill <jason@redhat.com>
3949
3950 * parse.y (reserved_declspecs): Don't handle attributes.
3951 (reserved_typespecquals): Handle them here.
3952 * Make-lang.in (parse.c): Adjust expected conflicts.
3953
3954 2002-02-08 Jakub Jelinek <jakub@redhat.com>
3955
3956 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
3957 instead of compstmt.
3958 (compstmt_or_stmtexpr): Renamed from compstmt.
3959 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
3960
3961 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
3962
3963 Rename instantiate_type_flags to tsubst_flags_t & expand use.
3964 * cp-tree.h (instantiate_type_flags): Rename to ...
3965 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
3966 add tf_warning flag.
3967 (instantiate_type): Adjust prototype.
3968 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
3969 do_type_instantiation, cp_build_qualified_type_real): Likewise.
3970 cp_build_qualified_type: Adjust.
3971 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
3972 tf_*.
3973 * call.c (standard_conversion): Rename itf_* to tf_*.
3974 (reference_binding): Likewise.
3975 (convert_like_real): Likewise.
3976 * cvt.c (cp_convert_to_pointer): Likewise.
3977 (convert_to_reference): Likewise.
3978 * decl.c (lookup_namespace_name): Use tf_* flags.
3979 (make_typename_type): Likewise.
3980 (grokdeclarator): Likewise.
3981 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
3982 (coerce_template_template_parms, convert_template_argument,
3983 coerce_template_parms, maybe_get_template_decl_from_type_decl,
3984 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
3985 instantiate_class_template, tsubst_template_arg_vector,
3986 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
3987 tsubst_decl, tsubst_arg_types, tsubst_function_type,
3988 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
3989 instantiate_template, fn_type_unification,
3990 resolve_overloaded_unification, verify_class_unification,
3991 unify, get_bindings_real, do_type_instantiation,
3992 regenerate_decl_from_template, instantiate_decl,
3993 tsubst_initializer_list, tsubst_enum,
3994 get_mostly_instantiated_function_type,
3995 invalid_nontype_parm_type_p): Likewise.
3996 * tree.c (cp_build_qualified_type_real): Likewise.
3997 * typeck.c (build_binary_op): Rename itf_* to tf_*.
3998 (build_ptrmemfunc): Likewise.
3999 (convert_for_assignment): Likewise.
4000
4001 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
4002
4003 PR c++/109
4004 * decl.c (grokdeclarator): Allow friend declarations from
4005 dependent types.
4006 * decl2.c (handle_class_head): Don't push into template parm contexts.
4007 * pt.c (push_template_decl_real): Template parm contexts are never
4008 being defined.
4009
4010 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
4011
4012 * class.c: Include target.h.
4013 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
4014 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
4015 bit-field layout.
4016 * Make-lang.in: Adjust deps.
4017
4018 2002-02-05 Jason Merrill <jason@redhat.com>
4019
4020 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
4021
4022 2002-02-04 Jakub Jelinek <jakub@redhat.com>
4023
4024 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
4025 (finish_switch_cond): Set SWITCH_TYPE.
4026
4027 2002-02-04 Richard Henderson <rth@redhat.com>
4028
4029 * method.c (use_thunk): Always initialize the block tree. Reindent.
4030 * semantics.c (expand_body): Emit thunks after function, not before.
4031
4032 2002-02-04 Jason Merrill <jason@redhat.com>
4033
4034 * decl.c (start_function): Call cplus_decl_attributes immediately
4035 after grokdeclarator.
4036
4037 * decl.c (start_function): Combine DECL_RESULT handling code.
4038
4039 2002-02-03 Jason Merrill <jason@redhat.com>
4040
4041 * xref.c: Remove.
4042 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
4043 (cp/xref.o): Remove dependencies.
4044 * class.c (finish_struct_1, check_methods): Don't call xref fns.
4045 (finish_struct_1): Likewise.
4046 * friend.c (make_friend_class): Likewise.
4047 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
4048 * spew.c (read_process_identifier): Likewise.
4049
4050 2002-02-01 Jason Merrill <jason@redhat.com>
4051
4052 PR c++/4872
4053 * decl.c (finish_function): Warn about a non-void function with
4054 no return statement and no abnormal exit.
4055 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
4056 (current_function_returns_abnormally): New macro.
4057 * call.c (build_call): Set it.
4058
4059 * typeck.c (build_component_ref): Always complain about offsetof
4060 constructs on non-PODs. Only make it an error for members of
4061 virtual bases.
4062
4063 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
4064 (dump_function_decl): Always dump parms.
4065
4066 * decl2.c (finish_static_data_member_decl): Complain about a local
4067 class with a static data member.
4068
4069 PR c++/4286
4070 * search.c (lookup_field_1): Don't xref a static data member
4071 just because we looked it up.
4072
4073 2002-01-31 Jason Merrill <jason@redhat.com>
4074
4075 * Make-lang.in (parse.c): Handle .output file.
4076
4077 PR c++/3395
4078 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
4079 not TREE_TYPE.
4080 * semantics.c (finish_class_definition): Adjust.
4081
4082 Allow attributes in parms and casts.
4083 * parse.y (named_parm): Don't strip attrs.
4084 (declmods): Remove 'attributes' production.
4085 (nonempty_cv_qualifiers): Accept attributes.
4086 (ATTRIBUTE): Give precedence.
4087 * decl.c (groktypename): Handle attributes.
4088 (grokparms): Likewise.
4089
4090 2002-01-29 Jakub Jelinek <jakub@redhat.com>
4091
4092 * decl2.c (cxx_decode_option): Pass 0 as last argument to
4093 cpp_handle_option.
4094 * lang-specs.h: Use cpp_unique_options instead of cpp_options
4095 when used together with cc1_options.
4096
4097 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
4098
4099 PR c++/5132
4100 * typeck2.c (digest_init): Make sure non-array core type is
4101 instantiated.
4102 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
4103 constructor, rather than build a new one.
4104 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
4105 PURPOSE of constructor elts.
4106
4107 2002-01-23 Zack Weinberg <zack@codesourcery.com>
4108
4109 * Make-lang.in (parse.c): Adjust expected number of
4110 shift-reduce conflicts.
4111 (decl.o): Depend on diagnostic.h.
4112 * decl.c: Include diagnostic.h.
4113 (grokdeclarator): Check for null pointer.
4114 (finish_function): Don't abort when
4115 current_binding_level->parm_flag != 1, if errors have
4116 occurred; throw away the statement tree and extra binding
4117 levels, and continue.
4118 * lex.c (note_list_got_semicolon): Check for null pointer.
4119 * method.c (hack_identifier): Just return error_mark_node if
4120 value is error_mark_node.
4121 * parse.y (primary: TYPEID(type_id)): No need to use
4122 TYPE_MAIN_VARIANT here.
4123 (handler_seq): Accept an empty list of catch clauses and
4124 generate a fake handler block to avoid later crashes.
4125 (ansi_raise_identifier): Accept the error token too.
4126 * semantics.c (begin_class_definition,
4127 finish_class_definition): Check for error_mark_node.
4128
4129 2002-01-23 Zack Weinberg <zack@codesourcery.com>
4130
4131 * typeck2.c (friendly_abort): Delete definition.
4132 * cp-tree.h (friendly_abort): Don't prototype.
4133 (my_friendly_assert): Use fancy_abort.
4134
4135 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
4136
4137 * cp-tree.h (my_friendly_abort): Remove.
4138
4139 2002-01-23 Jakub Jelinek <jakub@redhat.com>
4140
4141 * spew.c (pending_inlines, pending_inlines_tail,
4142 processing_these_inlines): Make static.
4143 (mark_pending_inlines): Remove static.
4144 (begin_parsing_inclass_inline): If in function, save pi
4145 for GC to cp_function_chain->unparsed_inlines instead.
4146 (process_next_inline): Likewise.
4147 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
4148 (mark_pending_inlines): Add prototype.
4149 * decl.c (spew_debug): Remove unused extern.
4150 (mark_lang_function): Call mark_pending_inlines.
4151
4152 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
4153
4154 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
4155 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
4156 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
4157 Change my_fancy_abort() to abort().
4158
4159 2002-01-23 Jason Merrill <jason@redhat.com>
4160
4161 PR c++/5453
4162 * class.c (fixed_type_or_null): Fix thinko.
4163
4164 PR c++/3331
4165 * init.c (resolve_offset_ref): Use build_indirect_ref.
4166
4167 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
4168
4169 2002-01-22 Jason Merrill <jason@redhat.com>
4170
4171 * parse.y (function_body): Suppress the block for the outermost
4172 curly braces.
4173 * decl.c (pushdecl): Don't try to skip it.
4174 (begin_function_body): Keep the block we create, not the next one.
4175 * init.c (emit_base_init): Don't mess with keep_next_level.
4176
4177 * class.c (build_base_path): Tweak formatting.
4178
4179 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
4180
4181 Fix regression introduced with patch for c++/775
4182 * parse.y (class_head_defn): Check for template specializations
4183 with a different class-key.
4184
4185 2002-01-17 Jason Merrill <jason@redhat.com>
4186
4187 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
4188 (begin_function_body): Call them and keep_next_level.
4189 * init.c (emit_base_init): Call keep_next_level.
4190 * semantics.c (setup_vtbl_ptr): Lose.
4191 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
4192 (vtbls_set_up_p): Lose.
4193 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
4194 * method.c (do_build_copy_constructor): Likewise.
4195 (synthesize_method): Call finish_mem_initializers.
4196 * parse.y (nodecls): Likewise.
4197
4198 * error.c (dump_type_suffix): Print the exception specs before
4199 recursing.
4200 (dump_function_decl): Here, too.
4201
4202 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
4203
4204 2002-01-10 Ira Ruben <ira@apple.com>
4205
4206 PR c++/907
4207 * decl.c (start_method): Handle attrlist.
4208
4209 2002-01-10 Jakub Jelinek <jakub@redhat.com>
4210
4211 * decl2.c (max_tinst_depth): Increase default limit to 500.
4212
4213 2002-01-10 Graham Stott <grahams@redhat.com>
4214
4215 * spew.c (YYCHAR): Uppercase macro parameter and add
4216 parenthesis.
4217 (YYCODE): Likewise.
4218 (NAME): Uppercase macro parameter.
4219
4220 2002-01-09 Graham Stott <grahams@redhat.com>
4221
4222 * decl.h (grokdeclarator): Wrap long line.
4223
4224 * semantics.c (FINISH_COND): Uppercase macro paramaters and
4225 add parenthesis.
4226
4227 2002-01-08 Graham Stott <grahams@redhat.com>
4228
4229 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
4230 (PALLOC): Uppercase macro parameter and whitespace.
4231 (SALLOC): Uppercase macro parameter.
4232 (SFREE): Uppercase macros parameter, add parenthese and
4233 whitespace.
4234 (STREQL): Uppercase macro parameter and whitespace.
4235 (STRNEQ): Likewise.
4236 (STRLSS): Likewise.
4237 (STRLEQ): Likewise.
4238 (STRGTR): Likewise.
4239 (STRGEQ): Likewise.
4240
4241 * call.c (convert_like): Add parenthesis and wrap.
4242 (convert_like_with_context): Likewise.
4243 (ICS_RANK): Whitespace.
4244 (NEED_TEMPORARY_P): Remove parenthesis.
4245
4246 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
4247 whitespace.
4248 (VTT_MARKED_BINFO_P): Likewise.
4249
4250 * decl.c (BINDING_LEVEL): Add parenthesis.
4251 (DEF_OPERATOR): Likewise.
4252
4253 * mangle.c (MANGLE_TRACE): Add parenthesis.
4254 (MANGLE_TRACE_TREE): Likewise.
4255 (write_signed_number): Likewise.
4256 (write_unsigned_number): Likewise.
4257
4258 * pt.c (ccat): Uppercase macro parameter.
4259 (cat): Likewise
4260
4261 * search.c (SET_BINFO_ACCESS): Add parenthesis.
4262
4263 2002-01-07 Jason Merrill <jason@redhat.com>
4264
4265 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
4266 to pedwarn.
4267
4268 PR c++/3536
4269 * method.c (make_thunk): If !flag_weak, give the thunk the
4270 function's linkage.
4271 (use_thunk): Here, too.
4272
4273 2002-01-07 Graham Stott <grahams@redhat.com>
4274
4275 * error.c: Update copyright date.
4276 (print_scope_operator): Add parenthesis.
4277 (print_left_paren): Likewise.
4278 (print_right_paren): Likewise.
4279 (print_left_bracket): Likewise.
4280 (print_right_bracket): Likewise.
4281 (print_template_argument_list_start): Likewise.
4282 (print_template_argument_list_end): Likewise.
4283 (print_non_consecutive_character): Likewise.
4284 (print_tree_identifier): Likewise.
4285 (print_identifier): Likewise.
4286 (NEXT_CODE): Uppercase macro parameter.
4287 (ident_fndecl): Delete unused.
4288 (GLOBAL_THING): Likewise.
4289
4290 2002-01-06 Graham Stott <grahams@redhat.com>
4291
4292 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
4293 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
4294 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
4295 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
4296 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
4297 (C_IS_RESERVED_WORD): Uppercase macro parameter.
4298 (C_RID_YYCODE) Likewise.
4299 (ptrmem_cst): Use rtx.
4300 (LOCAL_BINDING_P): Add whitespace.
4301 (INHERITED_VALUE_BINDING_P): Likewise.
4302 (BINDING_SCOPE): Wrap long line.
4303 (BINDING_HAS_LEVEL_P): Remove parenthesis.
4304 (BINDING_VALUE): Wrap long line.
4305 (BINDING_TYPE): Whitespace.
4306 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
4307 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
4308 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
4309 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
4310 (same_type_p): Uppercase macro parameters.
4311 (same_type_ignoring_top_level_qualifiers_p): Likewise.
4312 (OVL_FUNCTION): Wrap long line.
4313 (OVL_CHAIN): Whitespace.
4314 (OVL_CURRENT): Add parenthesis and whitespace.
4315 (OVL_NEXT): Whitespace.
4316 (OVL_USED): Likewise.
4317 (IDENTIFIER_TYPE_VALUE): Likewise.
4318 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
4319 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
4320 (LANG_ID_FIELD): Whitespace.
4321 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
4322 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
4323 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
4324 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
4325 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
4326 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
4327 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
4328 (IDENTIFIER_VIRTUAL_P): Likewise.
4329 (IDENTIFIER_OPNAME_P): Likewise.
4330 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
4331 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
4332 (C_SET_EXP_ORIGINAL_CODE): Likewise.
4333 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
4334 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
4335 (IS_AGGR_TYPE): Uppercase macro parameter.
4336 (CLASS_TYPE_P): Likewise.
4337 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
4338 (IS_AGGR_TYPE_2): Whitespace.
4339 (TAGGED_TYPE_P): Uppercase macro parameter.
4340 (TYPE_BUILT_IN): Whitespace.
4341 (TYPE_FOR_JAVA): Likewise.
4342 (FUNCTION_ARG_CHAIN): Remove parenthesis.
4343 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
4344 (FUNCTION_FIRST_USER_PARAM): Likewise.
4345 (PROMOTES_TO_AGGR_TYPE): Whitespace.
4346 (DERIVED_FROM_P): Add parenthesis and wrap.
4347 (UNIQUELY_DERIVED_FROM_P): Likewise.
4348 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
4349 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
4350 (CLASSTYPE_USE_TEMPLATE): Whitespace.
4351 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
4352 (TYPE_GETS_DELETE): Add parenthesis.
4353 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
4354 (TYPE_HAS_ASSIGN_REF): Likewise,
4355 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
4356 (TYPE_HAS_INIT_REF): Likewise.
4357 (TYPE_HAS_CONST_INIT_REF): Likewise.
4358 (TYPE_BEING_DEFINED): Likewise.
4359 (TYPE_LANG_SPECIFIC): Likewise.
4360 (CLASSTYPE_RTTI): Likewise.
4361 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
4362 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
4363 (TYPE_OVERLOADS_ARROW): Likewise.
4364 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
4365 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
4366 (CLASSTYPE_METHOD_VEC): Likewise.
4367 (CLASSTYPE_MARKED_N): Likewise.
4368 (CLASSTYPE_MARKED): Likewise.
4369 (CLASSTYPE_MARKED2): Likewise.
4370 (CLASSTYPE_MARKED3): Likewise.
4371 (CLASSTYPE_MARKED4): Likewise.
4372 (CLASSTYPE_MARKED5): Likewise.
4373 (CLASSTYPE_MARKED6): Likewise.
4374 (SET_CLASSTYPE_MARKED): Whitespace.
4375 (CLEAR_CLASSTYPE_MARKED): Likewise.
4376 (SET_CLASSTYPE_MARKED2): Likewise.
4377 (CLEAR_CLASSTYPE_MARKED2): Likewise.
4378 (SET_CLASSTYPE_MARKED3): Likewise.
4379 (CLEAR_CLASSTYPE_MARKED3): Likewise.
4380 (SET_CLASSTYPE_MARKED4): Likewise.
4381 (CLEAR_CLASSTYPE_MARKED4): Likewise.
4382 (SET_CLASSTYPE_MARKED5): Likewise.
4383 (CLEAR_CLASSTYPE_MARKED5): Likewise.
4384 (SET_CLASSTYPE_MARKED6): Likewise.
4385 (CLEAR_CLASSTYPE_MARKED6): Likewise.
4386 (CLASSTYPE_TAGS): Likewise.
4387 (CLASSTYPE_VSIZE): Likewise.
4388 (CLASSTYPE_VBASECLASSES): Likewise.
4389 (CANONICAL_BINFO): Add parenthesis.
4390 (CLASSTYPE_SIZE(NODE): Likewise.
4391 (CLASSTYPE_SIZE_UNIT): Likewise.
4392 (CLASSTYPE_ALIGN(NODE): Likewise.
4393 (CLASSTYPE_USER_ALIGN): Likewise.
4394 (TYPE_JAVA_INTERFACE): Likewise.
4395 (CLASSTYPE_PURE_VIRTUALS): Likewise.
4396 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
4397 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
4398 (CLASSTYPE_HAS_MUTABLE): Likewise.
4399 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
4400 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
4401 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
4402 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
4403 (CLASSTYPE_INTERFACE_ONLY): Likewise.
4404 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
4405 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
4406 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
4407 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
4408 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
4409 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
4410 (BINFO_UNSHARED_MARKED): Whitespace.
4411 (BINFO_MARKED): Whitespace and wrap.
4412 (SET_BINFO_MARKED): Likewise.
4413 (CLEAR_BINFO_MARKED): Likewise.
4414 (BINFO_VTABLE_PATH_MARKED): Likewise.
4415 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
4416 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
4417 (BINFO_SUBVTT_INDEX): Remove parenthesis.
4418 (BINFO_VPTR_INDEX): Likewise.
4419 (BINFO_PRIMARY_BASE_OF): Likewise,
4420 (CLASSTYPE_VFIELDS): Whitespace.
4421 (VF_DERIVED_VALUE): Wrap long line.
4422 (NAMESPACE_LEVEL): Whitespace.
4423 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
4424 (DEFARG_POINTER): Whitespace.
4425 (DECL_NEEDED_P): Remove parenthesis.
4426 (DECL_LANGUAGE): Whitespace.
4427 (SET_DECL_LANGUAGE): Add parenthesis.
4428 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
4429 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
4430 (DECL_IN_AGGR_P): Whitespace.
4431 (DECL_FRIEND_P): Likewise.
4432 (DECL_BEFRIENDING_CLASSES): Likewise.
4433 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
4434 (DECL_NONCONVERTING_P): Whitespace.
4435 (DECL_PURE_VIRTUAL_P): Likewise.
4436 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
4437 (DECL_PENDING_INLINE_INFO): Whitespace.
4438 (DECL_SORTED_FIELDS): Likewise.
4439 (DECL_DEFERRED_FN): Likewise.
4440 (DECL_TEMPLATE_INFO): Likewise.
4441 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
4442 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
4443 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
4444 (TMPL_ARGS_LEVEL): Likewise.
4445 (SET_TMPL_ARGS_LEVEL): Likewise.
4446 (INNERMOST_TEMPLATE_PARMS): Whitespace.
4447 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
4448 (INTEGRAL_CODE_P(CODE): Add parenthesis.
4449 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
4450 (TYPE_HAS_CONSTRUCTOR): Whitespace.
4451 (TREE_HAS_CONSTRUCTOR): Likewise.
4452 (TYPE_HAS_DESTRUCTOR): Likewise.
4453 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
4454 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
4455 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
4456 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
4457 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
4458 (TYPE_PTRMEMFUNC_P): Likewise.
4459 (TYPE_PTRMEMFUNC_FLAG): Likewise.
4460 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
4461 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
4462 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
4463 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
4464 (DECL_ACCESS): Whitespace.
4465 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
4466 (DECL_GLOBAL_DTOR_P): Likewise.
4467 (GLOBAL_INIT_PRIORITY): Likewise.
4468 (DECL_TEMPLATE_PARMS): Likewise.
4469 (DECL_TEMPLATE_RESULT): Likewise.
4470 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
4471 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
4472 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
4473 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
4474 (PRIMARY_TEMPLATE_P): Add parenthesis.
4475 (DECL_USE_TEMPLATE): Whitespace.
4476 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
4477 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
4478 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
4479 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
4480 (CALL_DECLARATOR_PARMS): Remove parenthesis.
4481 (CALL_DECLARATOR_QUALS): Likewise.
4482 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
4483 (TEMP_NAME_P): Wrap.
4484 (VFIELD_NAME_P): Likewise.
4485 (B_SET): Uppercase macro parameters and add parenthesis.
4486 (B_CLR): Likewise.
4487 (B_TST): Likewise.
4488 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
4489 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
4490 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
4491 (same_or_base_type_p): Likewise.
4492 (cp_deprecated): Likewise.
4493
4494 2002-01-05 Richard Henderson <rth@redhat.com>
4495
4496 * semantics.c (expand_body): Revert last change.
4497
4498 2002-01-04 Jason Merrill <jason@redhat.com>
4499
4500 PR c++/4122
4501 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
4502 lost primary.
4503
4504 * class.c (build_vtbl_initializer): Check for a lost primary
4505 before calculating the vtable entry to throw away.
4506
4507 2002-01-02 Jason Merrill <jason@redhat.com>
4508
4509 * semantics.c (expand_body): Call outlining_inline_function when
4510 emitting an inline function out of line.
4511
4512 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
4513
4514 PR c++/5116, c++/764 reversion
4515 * call.c (build_new_op): Revert the instantiations. They are
4516 incorrect.
4517
4518 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
4519
4520 PR c++/5089
4521 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
4522
4523 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
4524
4525 PR c++/3716
4526 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
4527 (tsubst, case POINTER_TYPE): Handle pmfs here.
4528 (tsubst, case OFFSET_TYPE): Check it is not an offset to
4529 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
4530
4531 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
4532
4533 PR c++/35
4534 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
4535 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
4536 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
4537 PARM_DECL.
4538 (tsubst_template_parms): Break up loop statements.
4539 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
4540 parm PARM_DECLs don't get promoted.
4541
4542 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
4543
4544 PR c++/5123
4545 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
4546 (build_x_function_call): Cope with a COMPONENT_REF containing a
4547 TEMPLATE_ID_EXPR.
4548
4549 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
4550
4551 PR c++/5213
4552 * pt.c (convert_template_argument): Be more careful determining
4553 when RECORD_TYPE templates are or are not templates.
4554
4555 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
4556
4557 PR c++/775
4558 * cp-tree.h (handle_class_head): Adjust prototype.
4559 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
4560 parameters. Use for all class heads.
4561 * parse.y (named_class_head_sans_basetype, named_class_head,
4562 named_complex_class_head_sans_basetype,
4563 named_class_head_sans_basetype_defn,
4564 unnamed_class_head): Remove.
4565 (class_head, class_head_apparent_template): Recognize class heads
4566 (class_head_decl, class_head_defn): New reductions. Process class
4567 heads.
4568 (structsp): Adjust class definition and class declaration
4569 reductions.
4570 (maybe_base_class_list): Give diagnostic on empty list.
4571
4572 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
4573
4574 PR c++/4379
4575 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
4576 single non-static member.
4577 (unary_complex_lvalue): If it cannot be a pointer to member, don't
4578 make it so. Check it is not pointer to reference.
4579
4580 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
4581
4582 PR c++/5132
4583 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
4584 are processing a template decl.
4585
4586 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
4587
4588 PR c++/5116, c++/764
4589 * call.c (build_new_op): Make sure template class operands are
4590 instantiated. Simplify arglist construction.
4591
4592 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
4593
4594 * call.c (build_user_type_conversion_1): Use my_friendly_assert
4595 rather than if ... abort.
4596 * cvt.c (convert_to_reference): Likewise.
4597 * semantics.c (setup_vtbl_ptr): Likewise.
4598 * pt.c (lookup_template_class): Comment typo.
4599
4600 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
4601
4602 PR c++/5125
4603 * pt.c (push_template_decl_real): Make sure DECL has
4604 DECL_LANG_SPECIFIC.
4605
4606 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
4607
4608 PR c++/335
4609 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
4610 for non-reference fields.
4611 * typeck.c (require_complete_type): Use resolve_offset_ref).
4612
4613 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
4614
4615 PR c++/196
4616 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
4617
4618 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
4619
4620 PR c++/160
4621 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
4622 up. Don't stabilize_references when initializing a reference.
4623
4624 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4625
4626 * decl2.c (lang_f_options): Const-ify.
4627
4628 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
4629
4630 * config-lang.in (diff_excludes): Remove.
4631
4632 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
4633
4634 PR c++/90
4635 * typeck.c (build_function_call_real): Use original function
4636 expression for errors.
4637
4638 2001-12-18 Jason Merrill <jason@redhat.com>
4639
4640 PR c++/3242
4641 * class.c (add_method): Do compare 'this' quals when trying to match a
4642 used function. Don't defer to another used function.
4643
4644 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
4645
4646 * pt.c (instantiate_clone): Remove, fold into ...
4647 (instantiate_template): ... here. Simplify by removing mutual
4648 recursion.
4649 * typeck2.c (build_m_component_ref): Don't cv qualify the function
4650 pointed to by a pointer to function.
4651 * class.c (delete_duplicate_fields_1): Typo.
4652
4653 2001-12-18 Jason Merrill <jason@redhat.com>
4654
4655 C++ ABI change: destroy value arguments in caller.
4656 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
4657 create an extra binding level for the parameters.
4658 * decl.c (store_parm_decls): Don't do parameter cleanups.
4659
4660 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
4661
4662 * call.c (build_new_method_call): Use '%#V'.
4663 * error.c (cv_to_string): Use V parameter to determine padding.
4664
4665 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
4666
4667 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
4668 spellings in messages.
4669
4670 2001-12-17 Zack Weinberg <zack@codesourcery.com>
4671
4672 * cp-tree.h: Delete #defines for cp_error, cp_warning,
4673 cp_pedwarn, and cp_compiler_error.
4674 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
4675 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
4676 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
4677 typeck2.c: Change calls to the above macros to use their
4678 language-independent equivalents: error, warning, pedwarn, and
4679 internal_error respectively.
4680
4681 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
4682
4683 * decl2.c (finish_file): Remove back_end_hook.
4684
4685 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
4686
4687 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
4688 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
4689 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
4690
4691 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
4692
4693 * lang-options.h: Use American spelling in messages.
4694
4695 2001-12-13 Jason Merrill <jason@redhat.com>
4696
4697 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
4698
4699 Use cleanups to run base and member destructors.
4700 * init.c (push_base_cleanups): New function, split out from...
4701 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
4702 * decl.c (finish_destructor_body): Move vbase destruction code to
4703 push_base_cleanups.
4704 (begin_function_body, finish_function_body): New fns.
4705 (finish_function): Move [cd]tor handling and call_poplevel to
4706 finish_function_body.
4707 (pushdecl): Skip the new level.
4708 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
4709 (setup_vtbl_ptr): Call push_base_cleanups.
4710 * method.c (synthesize_method): Call {begin,end}_function_body.
4711 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
4712 * cp-tree.h: Declare new fns.
4713 * parse.y (function_body, .begin_function_body): New nonterminals.
4714 (fndef, pending_inline, function_try_block): Use function_body.
4715 (ctor_initializer_opt, function_try_block): No longer has a value.
4716 (base_init): Remove .set_base_init token.
4717 (.set_base_init, compstmt_or_error): Remove.
4718 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
4719
4720 * optimize.c (maybe_clone_body): Fix parameter updating.
4721
4722 2001-12-12 Jason Merrill <jason@redhat.com>
4723
4724 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
4725 * semantics.c (genrtl_start_function): Don't pass
4726 parms_have_cleanups or push an extra binding level.
4727 (genrtl_finish_function): Lose cleanup_label cruft.
4728
4729 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
4730 (ctor_label): Remove.
4731 * semantics.c (finish_return_stmt): Lose ctor_label support.
4732 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
4733 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
4734 dtor_label.
4735
4736 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
4737 check for [cd]tors.
4738 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
4739
4740 * decl.c (finish_function): Check VMS_TARGET, not VMS.
4741
4742 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
4743 (end_cleanup_fn): And poplevel.
4744
4745 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
4746 if we're in a template.
4747
4748 2001-12-12 Jakub Jelinek <jakub@redhat.com>
4749
4750 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
4751 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
4752 THIS_NAME_P): Delete.
4753 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
4754 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
4755 with internal naming scheme.
4756 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
4757
4758 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
4759
4760 * decl.c (grokdeclarator): Deprecated implicit typename use.
4761
4762 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
4763
4764 PR g++/51
4765 * parse.y (frob_specs): Indicate it is a language linkage which
4766 contained the extern.
4767 * decl.c (grokdeclarator): Allow extern language linkage with
4768 other specifiers.
4769
4770 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
4771
4772 PR g++/72
4773 * decl.c (add_binding): Don't reject duplicate typedefs involving
4774 template parameters.
4775
4776 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
4777
4778 * parse.y, semantics.c: Similarly.
4779
4780 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
4781
4782 PR g++/87
4783 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
4784 (copy_args_p): Rename to ...
4785 (copy_fn_p): ... here.
4786 (grok_special_member_properties): New function.
4787 (grok_op_properties): Lose VIRTUALP parameter.
4788 (copy_assignment_arg_p): Remove.
4789 * call.c (build_over_call): Use copy_fn_p.
4790 * decl.c (grokfndecl): Reformat. Adjust call to
4791 grok_op_properties.
4792 (copy_args_p): Rename to ...
4793 (copy_fn_p): ... here. Reject template functions. Check for pass
4794 by value.
4795 (grok_special_member_properties): Remember special functions.
4796 (grok_ctor_properties): Don't remember them here, just check.
4797 (grok_op_properties): Likewise.
4798 (start_method): Call grok_special_member_properties.
4799 * decl2.c (grokfield): Likewise.
4800 (copy_assignment_arg_p): Remove.
4801 (grok_function_init): Don't remember abstract assignment here.
4802 * pt.c (instantiate_class_template): Call
4803 grok_special_member_properties.
4804 (tsubst_decl): Adjust grok_op_properties call.
4805
4806 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
4807
4808 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
4809 RID_TYPES_COMPATIBLE_P.
4810
4811 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
4812
4813 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
4814 call to build_aggr_init.
4815 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
4816
4817 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
4818
4819 * parse.y: Replace uses of the string non-terminal with STRING.
4820 Don't perform string concatentaion here.
4821 (string): Remove non-terminal.
4822 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
4823
4824 2001-12-05 Jason Merrill <jason@redhat.com>
4825
4826 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
4827 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
4828 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
4829 * pt.c (push_tinst_level): No longer static.
4830 * cp-tree.h: Declare them.
4831
4832 * init.c (resolve_offset_ref): Don't check access for the base
4833 conversion to access a FIELD_DECL.
4834
4835 * cp-tree.h (TYPE_REFFN_P): New macro.
4836 * decl.c (bad_specifiers): Check it, too.
4837
4838 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
4839 on the __*_type_info type if we haven't seen a definition.
4840
4841 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
4842
4843 * decl.c: Include c-common.h.
4844 (shadow_warning): Move to c-common.c.
4845
4846 Wed Dec 5 17:00:49 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4847
4848 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
4849
4850 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
4851
4852 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
4853
4854 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
4855
4856 PR g++/164
4857 * init.c (sort_base_init): Allow binfos to be directly specified.
4858 * method.c (do_build_copy_constructor): Explicitly convert to the
4859 base instance.
4860 (do_build_assign_ref): Likewise.
4861
4862 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
4863
4864 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
4865 declaration and initialization.
4866
4867 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
4868
4869 * typeck2.c: Remove leading capital from diagnostic messages, as
4870 per GNU coding standards.
4871
4872 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
4873
4874 PR c++/3394
4875 * decl.c (xref_basetypes): Handle attributes between
4876 'class' and name.
4877
4878 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
4879
4880 PR g++/3381
4881 * parse.y (named_complex_class_head_sans_basetype): Add new
4882 reduction.
4883 * Make-lang.in (parse.c): Adjust expected conflict count.
4884
4885 2001-12-03 Jason Merrill <jason@redhat.com>
4886
4887 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
4888 immediate binfos for our virtual bases.
4889
4890 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
4891
4892 * call.c (build_java_interface_fn_ref): Similarly.
4893 * except.c (is_admissible_throw_operand): Similarly.
4894 * init.c (build_java_class_ref): Similarly.
4895 * xref.c (open_xref_file): Similarly.
4896
4897 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
4898
4899 * class.c (finish_struct): Remove trailing periods from messages.
4900 * decl.c (check_tag_decl): Similarly.
4901 * lex.c (cxx_set_yydebug): Similarly.
4902 * typeck2.c (friendly_abort): Similarly.
4903
4904 2001-11-29 Mark Mitchell <mark@codesourcery.com>
4905
4906 PR c++/3048
4907 * cp-tree.h (ovl_member): Remove.
4908 * decl2.c (merge_functions): Handle extern "C" functions
4909 specially.
4910 * tree.c (ovl_member): Remove.
4911
4912 2001-11-29 Mark Mitchell <mark@codesourcery.com>
4913
4914 PR c++/4842
4915 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
4916 FUNCTION_DECL, as input.
4917 (mark_overriders): Remove.
4918 (warn_hidden): Rework for the new ABI.
4919
4920 2001-11-29 Mark Mitchell <mark@codesourcery.com>
4921
4922 PR c++/3471
4923 * call.c (convert_like_real): Do not build additional temporaries
4924 for rvalues of class type.
4925
4926 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
4927
4928 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
4929 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
4930 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
4931 (DERIVED_FROM_P): Likewise.
4932 (enum base_access): Renumber, add ba_quiet bit mask.
4933 (get_binfo): Remove.
4934 (get_base_distance): Remove.
4935 (binfo_value): Remove.
4936 (ACCESSIBLY_DERIVED_FROM_P): Remove.
4937 * call.c (standard_conversion): Use lookup_base.
4938 * class.c (strictly_overrides): Likewise.
4939 (layout_virtual_bases): Likewise.
4940 (warn_about_ambiguous_direct_bases): Likewise.
4941 (is_base_of_enclosing_class): Likewise.
4942 (add_vcall_offset_vtbl_entries_1): Likewise.
4943 * cvt.c (build_up_reference): Adjust comment.
4944 * init.c (build_member_call): Reformat.
4945 * search.c (get_binfo): Remove.
4946 (get_base_distance_recursive): Remove.
4947 (get_base_distance): Remove.
4948 (lookup_base_r): Tweak.
4949 (lookup_base): Add ba_quiet control. Complete the types here.
4950 (covariant_return_p): Use lookup_base.
4951 * tree.c (binfo_value): Remove.
4952 (maybe_dummy_object): Use lookup_base.
4953 * typeck.c (build_static_cast): Use lookup_base.
4954 (get_delta_difference): Likewise.
4955 * typeck2.c (binfo_or_else): Use lookup_base.
4956 (build_scoped_ref): Add back error_mark_check.
4957 (build_m_component_ref): Use lookup_base.
4958
4959 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
4960
4961 * Make-lang.in (c++.generated-manpages): New dummy target.
4962
4963 Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4964
4965 * Make-lang.in (cp-lang.o): Depends on c-common.h.
4966 * cp-lang.c (c-common.h): Include.
4967 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
4968 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
4969 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
4970
4971 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
4972
4973 * decl2.c (c_language): Move to c-common.c.
4974 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
4975 functions.
4976 (cxx_init): Update.
4977
4978 2001-11-26 Jason Merrill <jason@redhat.com>
4979
4980 * call.c (joust): Remove COND_EXPR hack.
4981
4982 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
4983
4984 * search.c (lookup_base_r): Declare bk in variable declaration
4985 space.
4986
4987 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
4988
4989 PR g++/3145
4990 * class.c (build_vbase_pointer): Remove.
4991 (build_vbase_path): Remove.
4992 (build_base_path): New function.
4993 * cp-tree.h (base_access, base_kind): New enumerations.
4994 (build_base_path): Declare.
4995 (convert_pointer_to_real): Remove.
4996 (convert_pointer_to): Remove.
4997 (lookup_base): Declare.
4998 (convert_pointer_to_vbase): Remove.
4999 * call.c (build_scoped_method_call): Use lookup_base &
5000 build_base_path instead of convert_pointer_to_real,
5001 get_base_distance & get_binfo.
5002 (build_over_call): Likewise.
5003 * cvt.c (cp_convert_to_pointer): Likewise.
5004 (convert_to_pointer_force): Likewise.
5005 (build_up_reference): Likewise.
5006 (convert_pointer_to_real): Remove.
5007 (convert_pointer_to): Remove.
5008 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
5009 instead of convert_pointer_to_vbase & build_vbase_path.
5010 (emit_base_init): Use build_base_path instead of
5011 convert_pointer_to_real.
5012 (expand_virtual_init): Lose unrequired conversions.
5013 (resolve_offset_ref): Use lookup_base and build_base_path
5014 instead of convert_pointer_to.
5015 * rtti.c (build_dynamic_cast_1): Use lookup_base &
5016 build_base_path instead of get_base_distance & build_vbase_path.
5017 * search.c (get_vbase_1): Remove.
5018 (get_vbase): Remove.
5019 (convert_pointer_to_vbase): Remove.
5020 (lookup_base_r): New function.
5021 (lookup_base): New function.
5022 * typeck.c (require_complete_type): Use lookup_base &
5023 build_base_path instead of convert_pointer_to.
5024 (build_component_ref): Likewise.
5025 (build_x_function_call): Likewise.
5026 (get_member_function_from_ptrfunc): Likewise.
5027 (build_component_addr): Likewise.
5028 * typeck2.c (build_scoped_ref): Likewise.
5029
5030 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5031
5032 * cp-tree.h (CP_TYPE_QUALS): Removed.
5033 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
5034 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
5035 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
5036 * dump.c (cp_dump_tree): Use void* dump_info argument to match
5037 lang-hooks prototype.
5038 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
5039 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
5040 CP_TYPE_QUALS changed to cp_type_quals.
5041 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
5042 (CXX_C_OBJS): Remove c-dump.o.
5043
5044 2001-11-21 Mark Mitchell <mark@codesourcery.com>
5045
5046 PR c++/3637
5047 * pt.c (lookup_template_class): Ensure that all specializations
5048 are registered on the list corresponding to the most general
5049 template.
5050
5051 2001-11-20 Mark Mitchell <mark@codesourcery.com>
5052
5053 * call.c (non_reference): Add documentation.
5054 (convert_class_to_reference): Do not strip reference types
5055 from conversion operators.
5056 (maybe_handle_ref_bind): Simplify.
5057 (compare_ics): Correct handling of references.
5058
5059 2001-11-19 John Wilkinson <johnw@research.att.com>
5060
5061 * dump.c (dump_op): New function.
5062 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
5063 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
5064 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
5065
5066 2001-11-19 Mark Mitchell <mark@codesourcery.com>
5067
5068 PR4629
5069 * semantics.c (finish_sizeof): Make sure that expression created
5070 while processing a template do not have a type.
5071 (finish_alignof): Likewise.
5072 * typeck.c (c_sizeof): Likewise.
5073 (expr_sizeof): Likewise.
5074
5075 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
5076
5077 * lex.c (cxx_finish): Call c_common_finish.
5078 (finish_parse): Remove.
5079
5080 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5081
5082 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
5083 when displaying error message about missing array bounds.
5084
5085 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5086
5087 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
5088 CONST_CAST_EXPR.
5089 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
5090
5091 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
5092
5093 * cp-tree.h (print_class_statistics): Restore.
5094
5095 2001-11-15 Jason Merrill <jason@redhat.com>
5096
5097 * method.c (use_thunk): Don't emit debugging information for thunks.
5098
5099 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
5100 * decl.c (make_typename_type): Handle getting a class template.
5101 * search.c (lookup_field_r): A class template is good enough for
5102 want_type.
5103
5104 * call.c (convert_like_real): Only use cp_convert for the bad part.
5105 (standard_conversion): Also allow bad int->enum.
5106 * typeck.c (ptr_reasonably_similar): Also allow functions to
5107 interconvert. Pointers to same-size integers are reasonably
5108 similar.
5109
5110 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
5111 give it void type.
5112
5113 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
5114
5115 PR g++/3154
5116 * init.c (sort_base_init): Remove unreachable code.
5117 (expand_member_init): Adjust comment to reflect reality. Simplify
5118 and remove unreachable code.
5119
5120 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
5121
5122 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
5123 (cxx_init): Update prototype.
5124 * decl.c (init_decl_processing): Rename. Move null node init
5125 to its creation time.
5126 * lex.c (cxx_init_options): Update.
5127 (cxx_init): Combine with old init_parse; also call
5128 cxx_init_decl_processing.
5129
5130 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
5131
5132 * decl.c (check_initializer): Try to complete the type of an
5133 array element before checking whether it's complete. Don't
5134 complain about arrays with complete element types but an
5135 unknown size.
5136 (cp_finish_decl): Build the hierarchical constructor before
5137 calling maybe_deduce_size_from_array_init.
5138
5139 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
5140
5141 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
5142
5143 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
5144
5145 PR g++/4206
5146 * parse.y (already_scoped_stmt): Remove.
5147 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
5148
5149 2001-11-12 H.J. Lu <hjl@gnu.org>
5150
5151 * cvt.c (ocp_convert): Don't warn the address of a weak
5152 function is always `true'.
5153
5154 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
5155
5156 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
5157 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
5158 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
5159 * cp-tree.h (print_class_statistics): Remove.
5160 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
5161 cxx_print_identifier, cxx_set_yydebug): New.
5162 * lex.c (set_yydebug): Rename c_set_yydebug.
5163 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
5164 lang_print_xnode): Rename.
5165 * tree.c (print_lang_statistics): Rename.
5166
5167 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5168
5169 * class.c (dump_array): Fix format specifier warning.
5170
5171 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
5172
5173 * cp-lang.c (LANG_HOOKS_NAME): Override.
5174 (struct lang_hooks): Constify.
5175 * lex.c (cxx_init_options): Update.
5176 (lang_identify): Remove.
5177 * parse.y (language_string): Remove.
5178
5179 2001-11-08 Andreas Franck <afranck@gmx.de>
5180
5181 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
5182 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
5183 suggested by autoconf.
5184 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
5185 (c++.install-common): Use the transformed target alias names.
5186
5187 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
5188
5189 * Make-lang.in: Update.
5190 * cp-lang.c: Include langhooks-def.h.
5191
5192 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5193
5194 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
5195
5196 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5197
5198 * lex.c (copy_lang_type): Add static prototype.
5199
5200 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5201
5202 * pt.c (unify): Handle SCOPE_REF.
5203
5204 2001-11-01 Jakub Jelinek <jakub@redhat.com>
5205
5206 * tree.c (cp_copy_res_decl_for_inlining): Adjust
5207 DECL_ABSTRACT_ORIGIN for the return variable.
5208
5209 2001-10-31 Zack Weinberg <zack@codesourcery.com>
5210
5211 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
5212
5213 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
5214
5215 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
5216 semantics.c, spew.c: Fix spelling errors.
5217
5218 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5219
5220 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
5221
5222 2001-10-25 Zack Weinberg <zack@codesourcery.com>
5223
5224 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
5225 pop_everything.
5226
5227 Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5228
5229 * cp-lang.c (cxx_get_alias_set): New function.
5230 Point LANG_HOOKS_GET_ALIAS_SET to it.
5231
5232 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5233
5234 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
5235 * cp-tree.h (make_unbound_class_template): Prototype new function.
5236 * decl.c (make_unbound_class_template): New function.
5237 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
5238 * error.c (dump_type): Likewise.
5239 * mangle.c (write_type): Likewise.
5240 * parse.y (template_parm): Likewise.
5241 (template_argument): Use make_unbound_class_template.
5242 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
5243 (tsubst): Likewise.
5244 (tsubst_copy): Likewise.
5245 (unify): Likewise.
5246 * tree.c (walk_tree): Likewise.
5247 * typeck.c (comptypes): Likewise.
5248
5249 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5250
5251 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
5252 extra calls into fewer ones.
5253
5254 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
5255
5256 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
5257 Warn when merging inline with attribute noinline.
5258 (start_decl, start_function): Warn if inline and attribute
5259 noinline appear in the same declaration.
5260
5261 2001-10-16 H.J. Lu <hjl@gnu.org>
5262
5263 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
5264 for tree checking disabled.
5265
5266 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
5267
5268 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
5269 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
5270
5271 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
5272
5273 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
5274 (unify): Only handle MINUS_EXPR specially if the above flag is set
5275 and the subtracted constant is 1. Clear the flag on recursive calls.
5276 Set it when unifying the maximum value in an INTEGER_TYPE's range.
5277
5278 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
5279
5280 * decl.c (bad_specifiers): Don't allow exception specifications
5281 on any typedefs.
5282
5283 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
5284
5285 * cp/lex.c (init_cp_pragma): Similarly.
5286
5287 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5288
5289 * pt.c (lookup_template_class): Build complete template arguments
5290 for BOUND_TEMPLATE_TEMPLATE_PARM.
5291
5292 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5293
5294 * cp-tree.h (TYPE_BINFO): Update comment.
5295 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
5296 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
5297 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
5298 (copy_type): Prototype new function.
5299 * lex.c (copy_lang_decl): Gather tree node statistics.
5300 (copy_lang_type): New function.
5301 (copy_type): Likewise.
5302 (cp_make_lang_type): Create lang_type for
5303 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
5304 and BOUND_TEMPLATE_TEMPLATE_PARM.
5305 * pt.c (tsubst): Use copy_type instead of copy_node.
5306 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
5307
5308 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5309
5310 * pt.c (determine_specialization): Ignore functions without
5311 DECL_TEMPLATE_INFO.
5312
5313 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
5314
5315 PR g++/4476
5316 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
5317
5318 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
5319
5320 * typeck2.c (store_init_value): Don't re-digest a bracketed
5321 initializer.
5322
5323 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
5324 ANON_AGGR_TYPE_P.
5325
5326 2001-10-11 Richard Henderson <rth@redhat.com>
5327
5328 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
5329 of an asm statement.
5330 (build_vtbl_ref_1): Split out from build_vtbl_ref.
5331 (build_vfn_ref): Use it to handle vtable descriptors before
5332 calling build_vtable_entry_ref.
5333 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
5334
5335 2001-10-10 Richard Henderson <rth@redhat.com>
5336
5337 * parse.y (asm_operand): Allow named operands.
5338 * semantics.c (finish_asm_stmt): Tweek for changed location
5339 of the operand constraint.
5340
5341 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
5342
5343 * call.c (standard_conversion): Add bad conversion between
5344 integers and pointers.
5345 (convert_like_real): Don't use convert_for_initialization for bad
5346 conversions; complain here and use cp_convert.
5347 (build_over_call): Don't handle bad conversions specially.
5348 (perform_implicit_conversion): Allow bad conversions.
5349 (can_convert_arg_bad): New fn.
5350 * cp-tree.h: Declare it.
5351 * typeck.c (convert_for_assignment): Use it.
5352 (ptr_reasonably_similar): Any target type is similar to void.
5353
5354 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
5355
5356 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
5357 (cp/cp-lang.o): New rule.
5358 * cp-tree.h: Declare hooks.
5359 * tree.c: Make hooks non-static.
5360 (init_tree): Don't initialize hooks here.
5361 * lex.c: Likewise. Move definition of lang_hooks to...
5362 * cp-lang.c: ... new file.
5363
5364 2001-10-08 Richard Henderson <rth@redhat.com>
5365
5366 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
5367 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
5368
5369 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5370
5371 * class.c (build_vtable_entry_ref): Const-ify.
5372 * decl.c (predefined_identifier,
5373 initialize_predefined_identifiers): Likewise.
5374 * init.c (build_new_1): Likewise.
5375 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
5376 Likewise.
5377
5378 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
5379
5380 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
5381 (INSNS_PER_STMT): Likewise.
5382 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
5383 (copy_body, initialize_inlined_parameters): Likewise.
5384 (declare_return_variable, inlinable_function_p): Likewise.
5385 (expand_call_inline, expand_calls_inline): Likewise.
5386 (optimize_inline_calls, clone_body): Likewise.
5387 * tree.c (walk_tree): Moved to ../tree-inline.c.
5388 (walk_tree_without_duplicates): Likewise.
5389 (copy_tree_r, remap_save_expr): Likewise.
5390
5391 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
5392
5393 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
5394 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
5395 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
5396 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
5397 (flag_inline_trees): Moved declaration to ../tree-inline.h.
5398 (walk_tree): Moved declaration to ../tree-inline.h.
5399 (walk_tree_without_duplicates, copy_tree_r): Likewise.
5400 (remap_save_expr): Likewise.
5401 * decl.c: Include tree-inline.h.
5402 (lang_mark_tree): Don't mark inlined_fns.
5403 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
5404 * optimize.c: Include tree-inline.h.
5405 (optimize_inline_calls): Move declaration to ../tree.h, as
5406 non-static.
5407 (remap_decl): Use language-independent constructs and hooks.
5408 (remap_block, copy_body_r, declare_return_variable): Likewise.
5409 (inlinable_function_p): Likewise. Don't test for
5410 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
5411 no longer language-specific.
5412 (optimize_inline_calls): Likewise. Make it non-static. Moved
5413 call of dump_function to...
5414 (optimize_function): Here...
5415 (clone_body): New function, extracted from...
5416 (maybe_clone_body): ... here. Build decl_map locally and pass
5417 it on to clone_body.
5418 * pt.c, semantics.c: Include tree-inline.h.
5419 * tree.c: Likewise.
5420 (cp_walk_subtrees): New language-specific hook for tree inlining.
5421 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
5422 cp_is_overload_p, cp_auto_var_in_fn_p,
5423 cp_copy_res_decl_for_inlining): Likewise.
5424 (walk_tree): Move language-specific constructs into...
5425 (cp_walk_subtrees): this new function.
5426 (copy_tree_r): Use language-independent constructs and hooks.
5427 (init_tree): Initialize tree inlining hooks.
5428 (remap_save_expr): Adjust prototype so that the declaration
5429 does not require the definition of splay_tree.
5430
5431 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
5432
5433 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
5434 to build the declaration instead of the declaration itself.
5435
5436 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
5437
5438 * decl2.c (cxx_decode_option): Add 'else'.
5439
5440 * spew.c (end_input): No longer static.
5441 * cp-tree.h: Declare it.
5442 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
5443
5444 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
5445
5446 * call.c (build_over_call), typeck.c (build_function_call_real):
5447 Pass type attributes to check_function_format rather than name or
5448 assembler name. Don't require there to be a name or assembler
5449 name to check formats.
5450
5451 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
5452
5453 * decl.c (init_decl_processing): Don't call
5454 init_function_format_info. Initialize lang_attribute_table
5455 earlier.
5456 (builtin_function): Call decl_attributes.
5457 (insert_default_attributes): New.
5458
5459 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
5460
5461 * decl.c (grokdeclarator): Copy array typedef handling from C
5462 frontend.
5463
5464 * decl.c (grokdeclarator): Copy too-large array handling from C
5465 frontend.
5466
5467 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
5468
5469 * config-lang.in (target_libs): Added target-gperf, so that we
5470 don't try to build it if C++ is disabled.
5471
5472 2001-09-23 Zack Weinberg <zack@codesourcery.com>
5473
5474 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
5475 (cp/errfn.o): Delete rule.
5476 (cp/error.o): Depend on flags.h.
5477 * errfn.c: Delete file.
5478 * cp-tree.h: Declare warn_deprecated. Remove definitions of
5479 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
5480 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
5481 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
5482 internal_error respectively. Make cp_deprecated into a macro.
5483 Don't define cp_printer typedef or declare cp_printers.
5484 * error.c: Include flags.h.
5485 Delete: struct tree_formatting_info, print_function_argument_list,
5486 print_declaration, print_expression, print_function_declaration,
5487 print_function_parameter, print_type_id, print_cv_qualifier_seq,
5488 print_type_specifier_seq, print_simple_type_specifier,
5489 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
5490 print_parameter_declaration_clause, print_exception_specification,
5491 print_nested_name_specifier, and definition of cp_printers.
5492 (locate_error): New function.
5493 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
5494 rewritten in terms of locate_error and diagnostic.c.
5495 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
5496 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
5497 (init_error): Adjust to match.
5498
5499 Sat Sep 22 09:15:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5500
5501 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
5502
5503 2001-09-21 Richard Henderson <rth@redhat.com>
5504
5505 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
5506 (build_vtbl_initializer): Likewise.
5507 (build_vfn_ref): New.
5508 * cp-tree.h: Declare it.
5509 * call.c (build_over_call): Use it.
5510 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
5511 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
5512
5513 Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com>
5514
5515 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
5516
5517 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
5518
5519 Table-driven attributes.
5520 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
5521 * decl2.c (cplus_decl_attributes): Only take one attributes
5522 parameter.
5523 * cp-tree.c (cplus_decl_attributes): Update prototype.
5524 * class.c (finish_struct), decl.c (start_decl, start_function),
5525 decl2.c (grokfield), friend.c (do_friend), parse.y
5526 (parse_bitfield): Update calls to cplus_decl_attributes.
5527 * decl.c (grokdeclarator): Take a pointer to a single ordinary
5528 attribute list.
5529 * decl.h (grokdeclarator): Update prototype.
5530 * decl2.c (grokfield): Take a single ordinary attribute list.
5531 * friend.c (do_friend): Likewise.
5532 * decl.c (shadow_tag, groktypename, start_decl,
5533 start_handler_parms, grokdeclarator, grokparms, start_function,
5534 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
5535 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
5536 (process_template_parm, do_decl_instantiation): Pass single
5537 ordinary attribute lists around.
5538 * decl.c (grokdeclarator): Correct handling of nested attributes.
5539 Revert the patch
5540 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
5541 * decl.c (grokdeclarator): Embedded attrs bind to the right,
5542 not the left.
5543 .
5544 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
5545 (cp_attribute_table): Declare.
5546 * decl.c (valid_lang_attribute): Don't define.
5547 (lang_attribute_table): Define.
5548 (init_decl_processing): Initialize lang_attribute_table instead of
5549 valid_lang_attribute.
5550 * tree.c (cp_valid_lang_attribute): Remove.
5551 (handle_java_interface_attribute, handle_com_interface_attribute,
5552 handle_init_priority_attribute): New functions.
5553 (cp_attribute_table): New array.
5554 * decl2.c (import_export_class): Don't use
5555 targetm.valid_type_attribute.
5556
5557 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
5558
5559 * Make-lang.in (cp/error.o): Depend on real.h
5560 * error.c: #include "real.h"
5561
5562 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5563
5564 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
5565 xmalloc/strcpy/strcat.
5566
5567 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5568
5569 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
5570 Const-ification.
5571 * pt.c (tsubst_decl): Likewise.
5572
5573 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5574
5575 * decl2.c (lang_f_options): Const-ification.
5576 * lex.c (cplus_tree_code_name): Likewise.
5577 * spew.c (yyerror): Likewise.
5578
5579 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
5580
5581 PR c++/3986
5582 * class.c (force_canonical_binfo_r): Check & move an indirect
5583 primary base first.
5584 (force_canonical_binfo): Check that it's not already
5585 canonical.
5586 (mark_primary_virtual_base): Remove BINFO parameter.
5587 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
5588
5589 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
5590
5591 Remove TYPE_NONCOPIED_PARTS.
5592 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
5593 CLASSTYPE_PURE_VIRTUALS.
5594 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
5595 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
5596 (layout_class_type): Don't call fixup_inline_methods here ...
5597 (finish_struct_1): ... call it here.
5598
5599 2001-09-04 Mark Mitchell <mark@codesourcery.com>
5600
5601 * decl.c (duplicate_decls): Remove code deadling with
5602 DECL_SAVED_INSNS.
5603 * decl2.c (finish_file): Likewise.
5604 * pt.c (instantiate_decl): Likewise.
5605 * semantics.c (expand_body): Don't defer local functions if
5606 they wouldn't be deferred for some other reason. Don't
5607 generate RTL for functions that will not be emitted.
5608 (genrtl_start_function): Remove code deadling with
5609 DECL_SAVED_INSNS.
5610 (genrtl_finish_function): Likewise.
5611
5612 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
5613
5614 PR c++/4203
5615 * call.c (build_over_call): Do not optimize any empty base
5616 construction.
5617
5618 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5619
5620 * error.c (dump_template_decl): Output template parameters
5621 together with their specifiers.
5622 Output `class' prefix for template template parameter.
5623 (dump_decl): Fix formatting.
5624
5625 2001-08-30 Kurt Garloff <garloff@suse.de>
5626
5627 * optimize.c (inlinable_function_p): Allow only smaller single
5628 functions. Halve inline limit after reaching recursive limit.
5629
5630 2001-08-30 Joern Rennecke <amylaar@redhat.com>
5631 Jason Merrill <jason_merrill@redhat.com>
5632
5633 * class.c (build_vtable_entry_ref): Subtract in char*, not
5634 ptrdiff_t.
5635
5636 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
5637
5638 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
5639 (build_cplus_array_type): Use cp_build_qualified_type, not
5640 TYPE_MAIN_VARIANT, to get an unqualified version.
5641
5642 * decl2.c (grok_alignof): Lose.
5643 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
5644 * typeck.c (c_alignof): Lose.
5645 * semantics.c (finish_sizeof, finish_alignof): New.
5646 * parse.y: Use them.
5647 * cp-tree.h: Declare them.
5648
5649 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
5650
5651 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
5652 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
5653 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
5654
5655 2001-08-19 Jakub Jelinek <jakub@redhat.com>
5656
5657 * typeck2.c (add_exception_specifier): Only require complete type if
5658 not in processing template declaration.
5659
5660 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5661
5662 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
5663 GNU_xref_start_scope and GNU_xref_end_scope.
5664
5665 * tree.c (TYPE_HASH): Moved to ../tree.h.
5666
5667 2001-08-16 Mark Mitchell <mark@codesourcery.com>
5668
5669 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
5670 on COMPOUND_EXPRs.
5671
5672 2001-08-14 Richard Henderson <rth@redhat.com>
5673
5674 * class.c, cp-tree.h (build_vfn_ref): Remove.
5675 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
5676
5677 2001-08-13 Mark Mitchell <mark@codesourcery.com>
5678
5679 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
5680 empty class assignment as having side-effects to avoid
5681 spurious warnings.
5682
5683 2001-08-13 Zack Weinberg <zackw@panix.com>
5684
5685 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
5686 * except.c: Include libfuncs.h.
5687
5688 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
5689
5690 * decl.c (grokdeclarator): Clarify diagnostic message.
5691
5692 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5693
5694 * decl2.c (do_nonmember_using_decl): Replace using directive
5695 with using declaration in the error message.
5696
5697 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5698
5699 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
5700 criterion to avoid rebuilding expression tree instead of
5701 processing_template_decl.
5702
5703 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
5704
5705 Support named return value optimization for inlines, too.
5706 * decl.c (finish_function): Nullify returns here.
5707 * semantics.c (genrtl_start_function): Not here.
5708 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
5709 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
5710 Also nullify the CLEANUP_STMT for the nrv.
5711 * cp-tree.h: Declare it.
5712 * optimize.c (declare_return_variable): Replace the nrv with the
5713 return variable.
5714 * typeck.c (check_return_expr): Be more flexible on alignment check.
5715 Ignore cv-quals when checking for a matching type.
5716
5717 2001-08-09 Richard Henderson <rth@redhat.com>
5718
5719 * decl2.c (finish_objects): Use target hooks instead of
5720 assemble_constructor and assemble_destructor.
5721
5722 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
5723
5724 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
5725
5726 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
5727
5728 PR c++/3820
5729 Stop using TYPE_NONCOPIED_PARTS.
5730 * call.c (build_over_call): Be careful when copy constructing
5731 or assigning to an empty class.
5732 * class.c (check_bases_and_members): It has a
5733 COMPLEX_ASSIGN_REF if it has a vptr.
5734 (layout_class_type): Don't add empty class padding to
5735 TYPE_NONCOPIED_PARTS.
5736 (finish_struct_1): Don't add the VFIELD either.
5737 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
5738 initialization.
5739
5740 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
5741
5742 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
5743
5744 2001-08-06 Richard Henderson <rth@redhat.com>
5745
5746 * decl2.c (finish_objects): Pass a symbol_ref and priority to
5747 assemble_{constructor,destructor}. Remove priority handling.
5748
5749 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
5750
5751 Don't allow template-id in using-declaration.
5752 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
5753 (do_class_using_decl): Likewise.
5754
5755 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
5756
5757 * cp/spew.c (read_token): No need to pop buffers.
5758
5759 2001-08-02 Stan Shebs <shebs@apple.com>
5760
5761 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
5762 (fnaddr_from_vtable_entry): Remove decl.
5763 * method.c (use_thunk): Update comment.
5764
5765 2001-08-01 Andrew Cagney <ac131313@redhat.com>
5766
5767 * repo.c (get_base_filename): Change return value to const char
5768 pointer.
5769
5770 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
5771
5772 Kill -fhonor-std.
5773 * NEWS: Document.
5774 * cp-tree.h (flag_honor_std): Remove.
5775 (CPTI_FAKE_STD): Remove.
5776 (std_node): Remove comment about it being NULL.
5777 (fake_std_node): Remove.
5778 * decl.c (in_fake_std): Remove.
5779 (walk_namespaces_r): Remove fake_std_node check.
5780 (push_namespace): Remove in_fake_std code.
5781 (pop_namespace): Likewise.
5782 (lookup_name_real): Remove fake_std_node check.
5783 (init_decl_processing): Always create std_node. Always add
5784 std:: things there.
5785 (builtin_function): Always put non '_' fns in std.
5786 * decl2.c (flag_honor_std): Remove.
5787 (lang_f_options): Remove honor-std.
5788 (unsupported_options): Add honor-std.
5789 (set_decl_namespace): Remove fake_std_node check.
5790 (validate_nonmember_using_decl): Likewise.
5791 (do_using_directive): Likewise.
5792 (handle_class_head): Likewise.
5793 * dump.c (cp_dump_tree): Likewise.
5794 * except.c (init_exception_processing): Adjust.
5795 * init.c (build_member_call): Remove fake_std_node check.
5796 (build_offset_ref): Likewise.
5797 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
5798 * rtti.c (init_rtti_processing): Adjust.
5799
5800 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
5801
5802 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
5803 operand while calling cp_tree_equal.
5804
5805 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
5806
5807 The 3.0 ABI no longer has vbase pointer fields.
5808 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
5809 FORMAT_VBASE_NAME): Remove.
5810 * method.c (do_build_copy_constructor): Adjust.
5811 (do_build_assign_ref): Adjust.
5812 * search.c (lookup_field_r): Adjust.
5813 * typeck.c (build_component_ref): Adjust.
5814
5815 The 3.0 ABI always has a vtable pointer at the start of every
5816 polymorphic class.
5817 * rtti.c (build_headof_sub): Remove.
5818 (build_headof): Adjust.
5819 (get_tinfo_decl_dynamic): No need to check flag_rtti
5820 here. Adjust.
5821 (create_real_tinfo_var): Explain why we need a hidden name.
5822
5823 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
5824
5825 PR c++/3631
5826 * class.c (update_vtable_entry_for_fn): The fixed adjustment
5827 of a virtual thunk should be from declaring base.
5828
5829 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
5830
5831 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
5832 the shared virtual base, so preserving inheritance graph order.
5833
5834 2001-07-30 Andreas Jaeger <aj@suse.de>
5835
5836 * decl2.c: Remove unused var global_temp_name_counter.
5837
5838 2001-07-28 Richard Henderson <rth@redhat.com>
5839
5840 * method.c (pending_inlines): Remove.
5841
5842 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
5843
5844 * class.c (mark_primary_virtual_base): Don't adjust base
5845 offsets here.
5846 (dfs_unshared_virtual_bases): Adjust them here.
5847 (mark_primary_bases): Explain why we adjust at the end.
5848
5849 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
5850
5851 * class.c (finish_struct_1): When copying the primary base's
5852 VFIELD, make sure we find it is at offset zero.
5853
5854 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5855
5856 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
5857 tsubst_expr for default template arguments.
5858
5859 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
5860
5861 PR c++/3621
5862 * spew.c (yylex): Only copy the token's lineno, if it is
5863 nonzero.
5864
5865 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
5866
5867 PR c++/3624
5868 * call.c (resolve_args): Simplify, call
5869 convert_from_reference.
5870 (build_new_op): Resolve and convert from reference ARG1
5871 earlier. Adjust ARG2 & ARG3 resolve and conversion.
5872
5873 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
5874
5875 * decl.c (last_function_parm_tags): Remove.
5876 (current_function_parm_tags): Remove.
5877 (init_decl_processing): Adjust.
5878 (start_function): Adjust.
5879 (store_parm_decls): Adjust.
5880
5881 PR c++/3152
5882 * decl.c (grokdeclarator): Detect when a function typedef is
5883 declaring a function, and create last_function_parms correctly.
5884
5885 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
5886
5887 * call.c (joust): Only prefer a non-builtin candidate to a builtin
5888 one if they have the same signature.
5889
5890 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
5891 it rather than toplevel_bindings_p. Give it a mangled name if static.
5892 (convert_to_reference): Adjust.
5893 * decl2.c (get_temp_name): Lose.
5894 * mangle.c (mangle_ref_init_variable): New fn.
5895 (mangle_guard_variable): Strip the ref-init header.
5896 * cp-tree.h: Adjust.
5897 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
5898 initializer.
5899 (grok_reference_init): Always use DECL_INITIAL.
5900
5901 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
5902
5903 PR c++/3416
5904 * call.c (build_conditional_expr): Recheck args after
5905 conversions.
5906 * cp-tree.h (build_conditional_expr): Move to correct file.
5907 * typeck.c (decay_conversion): Diagnose any unknown types
5908 reaching here.
5909 (build_binary_op): Don't do initial decay or default
5910 conversions on overloaded functions.
5911 (build_static_cast): Don't do a decay conversion here.
5912
5913 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
5914
5915 PR c++/3543
5916 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
5917 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
5918
5919 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
5920
5921 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
5922 (create_vtbl_ptr): ... here.
5923
5924 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
5925
5926 * class.c (build_vbase_offset_vbtl_entries): Look for
5927 non-primary base of which we are a sub vtable.
5928
5929 2001-07-24 Phil Edwards <pme@sources.redhat.com>
5930
5931 * semantics.c (finish_this_expr): Remove unused code.
5932
5933 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
5934
5935 Simplify rtti, now we've only one ABI.
5936 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
5937 CPTI_TINFO_VAR_ID.
5938 (tinfo_decl_id, tinfo_var_id): Remove.
5939 (get_typeid_1): Remove.
5940 * rtti.c
5941 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
5942 (typeid_ok_p): New function.
5943 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
5944 (get_tinfo_decl): Remove old abi documentation.
5945 (tinfo_from_decl): Remove.
5946 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
5947 (get_typeid_1): Remove.
5948 (get_base_offset): Remove.
5949 (synthesize_tinfo_var): Absorb get_base_offset.
5950 (create_real_tinfo_var): Don't use tinfo_decl_id.
5951
5952 2001-07-23 Graham Stott <grahams@redhat.com>
5953
5954 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
5955 variable has_two_argument_delete_p.
5956
5957 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
5958
5959 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
5960 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
5961 (CPTI_INDEX_IDENTIFIER): Remove.
5962 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
5963 (delta2_identifier): Remove.
5964 (index_identifier): Remove.
5965 (pfn_or_delta2_identifier): Remove.
5966 (flag_vtable_thunks): Remove.
5967 (VTABLE_DELTA2_NAME): Remove.
5968 (VTABLE_INDEX_NAME): Remove.
5969 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
5970 (vfunc_ptr_type_node): Adjust.
5971 (VTABLE_NAME_PREFIX): Adjust.
5972 (build_vfn_ref): Lose first parameter.
5973 (fixup_all_virtual_upcast_offsets): Remove.
5974 * decl.c (initialize_predefined_identifiers): Remove
5975 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
5976 (init_decl_processing): Remove no-vtable-thunk code.
5977 * decl2.c (flag_vtable_thunks): Remove.
5978 (mark_vtable_entries): Remove no-vtable-thunk code.
5979 * error.c (dump_decl): Remove no-vtable-thunk code.
5980 (dump_expr): Adjust ptr to member function code.
5981 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
5982 code.
5983 * rtti.c (build_headof): Remove no-vtable-thunk code.
5984 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
5985 * search.c (get_base_distance): Remove expand_upcast_fixups case.
5986 (virtual_context) Remove.
5987 (expand_upcast_fixups): Remove.
5988 (fixup_virtual_upcast_offsets): Remove.
5989 (fixup_all_virtual_upcast_offsets): Remove.
5990 * typeck.c (get_member_function_from_ptrfunc): Remove
5991 no-vtable-thunk code.
5992 * call.c (build_over_call): Adjust call to build_vfn_ref.
5993 * class.c (build_vfn_ref): Lose first parameter. Remove
5994 no-vtable-thunk code.
5995 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
5996 (build_vtable_entry): Remove no-vtable-thunk code.
5997
5998 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
5999
6000 Remove old-abi remnants. Remove comments about old abi
6001 behavior. Remove references to 'new-abi' in comments.
6002 * cp-tree.h: Adjust comments.
6003 (vbase_offsets_in_vtable_p): Delete.
6004 (vcall_offsets_in_vtable_p): Delete.
6005 (vptrs_present_everywhere_p): Delete.
6006 (all_overridden_vfuns_in_vtables_p): Delete.
6007 (merge_primary_and_secondary_vtables_p): Delete.
6008 (TYPE_CONTAINS_VPTR_P): Adjust.
6009 (VTT_NAME_PREFIX): Remove.
6010 (CTOR_VTBL_NAME_PREFIX): Remove.
6011 (init_vbase_pointers): Remove.
6012 * class.c: Adjust coments.
6013 (build_vbase_pointer_fields): Delete.
6014 (build_vbase_pointer): Remove old-abi code.
6015 (build_secondary_vtable): Likewise.
6016 (modify_all_vtables): Likewise.
6017 (create_vtable_ptr): Likewise.
6018 (layout_class_type): Likewise.
6019 (finish_struct_1): Likewise.
6020 (finish_vtbls): Likewise.
6021 (dfs_finish_vtbls): Delete.
6022 (build_vbase_offset_vtbl_entries): Remove old-abi code.
6023 * cvt.c: Adjust comments.
6024 * decl.c: Adjust comments.
6025 * decl2.c: Adjust comments.
6026 * init.c: Adjust comments.
6027 (construct_virtual_bases): Remove old-abi code.
6028 * lang-specs.h: Remove -fno-new-abi.
6029 * mangle.c: Adjust comments.
6030 * rtti.c: Adjust comments.
6031 (get_base_offset): Remove old-abi-code.
6032 * search.c: Adjust comments.
6033 (dfs_init_vbase_pointers): Remove.
6034 (dfs_vtable_path_unmark): Remove.
6035 (init_vbase_pointers): Remove.
6036 * semantics.c: Adjust comments.
6037 (emit_associated_thunks): Remove old-abi code.
6038 * typeck.c: Adjust comments.
6039
6040 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
6041
6042 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
6043 params.h.
6044
6045 2001-07-19 Mark Mitchell <mark@codesourcery.com>
6046
6047 * class.c (finish_struct_anon): Forbid nested classes.
6048
6049 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
6050
6051 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
6052 * optimize.c: Include debug.h.
6053 (maybe_clone_body): Use debug hook.
6054 * semantics.c: Include debug.h.
6055 (expand_body): Use debug hook.
6056
6057 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
6058
6059 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
6060
6061 2001-07-18 Mark Mitchell <mark@codesourcery.com>
6062
6063 * class.c (type_requires_array_cookie): New function.
6064 (check_methods): Don't try to figure out whether the type needs a
6065 cookie here.
6066 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
6067 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
6068 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
6069 * pt.c (instantiate_class_template): Don't set
6070 TYPE_VEC_DELETE_TAKES_SIZE.
6071 * NEWS: Document ABI changes from GCC 3.0.
6072
6073 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
6074 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
6075
6076 * NEWS (Changes in GCC 3.0): Fix typo.
6077
6078 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
6079
6080 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
6081 which attributes are to be attached, and a flags argument. Update
6082 call to decl_attributes.
6083 (grokfield): Update call to decl_attributes.
6084 * class.c (finish_struct): Update call to cplus_decl_attributes.
6085 * cp-tree.h (cplus_decl_attributes): Update prototype.
6086 * decl.c (start_decl, grokdeclarator, start_function): Update
6087 calls to decl_attributes and cplus_decl_attributes.
6088 * friend.c (do_friend): Update call to cplus_decl_attributes.
6089 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
6090
6091 2001-07-12 Mark Mitchell <mark@codesourcery.com>
6092
6093 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
6094 for `register' variables with an asm-specification.
6095
6096 2001-07-11 Mark Mitchell <mark@codesourcery.com>
6097
6098 * semantics.c (finish_asm_stmt): Mark the output operands
6099 to an asm addressable, if necessary.
6100
6101 2001-07-11 Ben Elliston <bje@redhat.com>
6102
6103 * Revert this change -- there is a subtle bug.
6104
6105 PR c++/80
6106 * decl.c (finish_enum): New "attributes" argument; pass it to
6107 cplus_decl_attributes. Use a narrower type if the enum is packed.
6108 * cp-tree.h (finish_enum): Adjust prototype.
6109 * parse.y (enum_head): New non-terminal.
6110 (structsp): Use it. Enums now may be preceded or followed by
6111 optional attributes -- pass their chained tree to finish_enum().
6112 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
6113
6114 2001-07-10 Mark Mitchell <mark@codesourcery.com>
6115
6116 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
6117 variables.
6118
6119 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
6120
6121 * semantics.c (cp_expand_stmt): Fix for null
6122 current_function_return_value.
6123
6124 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
6125
6126 * call.c (build_op_delete_call): Initialize fn.
6127 (convert_like_real): Delete conditional.
6128 (joust): Initialize *w and *l.
6129 * class.c: Add prototype for binfo_ctor_vtable.
6130 (get_primary_binfo): Initialize result.
6131 * init.c (build_java_class_ref): Initialize name.
6132
6133 2001-07-09 Erik Rozendaal <dlr@acm.org>
6134
6135 * typeck.c (unary_complex_lvalue): Do not duplicate the
6136 argument to modify, pre-, or post-increment when used as an
6137 lvalue and when the argument has side-effects.
6138
6139 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
6140
6141 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
6142 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
6143 cplus_decl_attributes even if attrs is NULL.
6144 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
6145
6146 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
6147
6148 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
6149 calls to decl_attributes.
6150
6151 2001-07-06 Ira Ruben <ira@apple.com>
6152
6153 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
6154 be DECL_TEMPLATE_RESULT.
6155
6156 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6157
6158 * cp-tree.h (copy_template_template_parm): Rename to ...
6159 (bind_template_template_parm): ... here.
6160 * tree.c (copy_template_template_parm): Rename to ...
6161 (bind_template_template_parm): ... here. Remove the case when
6162 NEWARGS is NULL_TREE.
6163 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
6164 BOUND_TEMPLATE_TEMPLATE_PARM.
6165 * pt.c (lookup_template_class): Adjust.
6166
6167 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
6168
6169 * cvt.c (convert_lvalue): New fn.
6170 * cp-tree.h: Declare it.
6171 * method.c (do_build_assign_ref): Use it.
6172 (do_build_copy_constructor): Convert parm to base types
6173 before calling base constructors.
6174
6175 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
6176 DECL_USER_ALIGN. Check flag_elide_constructors instead of
6177 optimize.
6178 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
6179
6180 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
6181
6182 * optimize.c (optimize_inline_calls): New function, broken out
6183 of ...
6184 (optimize_function): ... here. Call it. Don't inline if it is
6185 a thunk.
6186 (dump_function): Print name of dump flag causing this dump.
6187 * semantics.c (expand_body): Move thunk inline check to
6188 optimize_function.
6189
6190 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
6191
6192 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
6193 (comptypes): Use target.comp_type_attributes.
6194
6195 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
6196
6197 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
6198
6199 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
6200
6201 * error.c (lang_print_error_function): Add a `diagnostic_context *'
6202 parameter. Tweak.
6203
6204 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
6205
6206 * decl2.c (import_export_class): Update.
6207
6208 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
6209
6210 * error.c (init_error): Adjust settings.
6211
6212 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
6213
6214 * error.c (init_error): Adjust settings.
6215
6216 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
6217
6218 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
6219 return pointers to data members by reference rather than by value.
6220
6221 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
6222
6223 Implement the Named Return Value optimization.
6224 * cp-tree.h (struct cp_language_function): Add x_return_value.
6225 (current_function_return_value): Now a macro.
6226 * decl.c: Don't define it.
6227 (define_label, finish_case_label): Don't clear it.
6228 (init_decl_processing): Don't register it with GC.
6229 * semantics.c (genrtl_finish_function): Don't check it for
6230 no_return_label. Copy the RTL from the return value to
6231 current_function_return_value and walk, calling...
6232 (nullify_returns_r): ...this new fn.
6233 * typeck.c (check_return_expr): Set current_function_return_value.
6234
6235 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
6236
6237 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
6238 sharing a ctor vtable with. Merge code for cases 1 and 2.
6239 (binfo_ctor_vtable): New fn.
6240 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
6241
6242 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
6243
6244 * class.c (dfs_find_final_overrider): Fix logic.
6245
6246 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
6247 virtual thunk instead of non-virtual.
6248 (get_matching_virtual): Uncomment.
6249
6250 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
6251 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
6252 PARM, not ARG.
6253
6254 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
6255
6256 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
6257 we've not emerged from the hierarchy of RTTI_BINFO on reaching
6258 a non-virtual base.
6259
6260 2001-06-13 Mark Mitchell <mark@codesourcery.com>
6261
6262 * NEWS: Update release number.
6263
6264 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
6265
6266 PR c++/3130, c++/3131, c++/3132
6267 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
6268 * class.c (force_canonical_binfo_r): Move
6269 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
6270 virtual bases unless they're primary and what they're primary
6271 too has been moved.
6272 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
6273 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
6274 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
6275 derived binfo.
6276 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
6277 (layout_nonempty_base_or_field): Add most derived type
6278 parameter. Adjust.
6279 (layout_empty_base): Likewise.
6280 (build_base_field): Likewise.
6281 (build_base_fields): Likewise.
6282 (propagate_binfo_offsets): Add most derived type
6283 parameter. Skip non canonical virtual bases too.
6284 (dfs_set_offset_for_unshared_vbases): Don't skip primary
6285 bases. Do skip canonical bases.
6286 (layout_virtual_bases): Adjust.
6287 (layout_class_type): Adjust.
6288 (dfs_get_primary_binfo): Build list of virtual primary base
6289 candidates.
6290 (get_primary_binfo): Check that the shared virtual primary
6291 base candidate was found first.
6292 (accumulate_vtbl_inits): Don't do anything for non-vptr
6293 containing binfos. For case 1 primary virtual bases, keep
6294 checking that we've not emerged from the hierarchy of RTTI_BINFO.
6295
6296 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
6297
6298 PR c++/3089
6299 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
6300 hierarchy looking for primary bases for a ctor
6301 vtable. Recursively call oneself, if we meet our primary via
6302 this route and haven't met it yet via inheritance graph order.
6303
6304 2001-06-11 Mark Mitchell <mark@codesourcery.com>
6305
6306 * lang-options.h: Emit documentation for -fno-honor-std, not
6307 -fhonor-std.
6308
6309 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
6310
6311 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
6312 Don't clobber delta.
6313 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
6314
6315 2001-06-10 Mark Mitchell <mark@codesourcery.com>
6316 Gabriel Dos Reis <gdr@codesourcery.com>
6317
6318 * Make-lang.in (cp/call.o): Depend on diagnostic.h
6319 (cp/typeck.o): Depend on diagnostic.h
6320 (cp/typeck2.o): Depend on diagnostic.h
6321 (cp/repo.o): Depend on dignostic.h
6322 * typeck.c: #include diagnostic.h
6323 (convert_for_initialization): Remove extern declaration for
6324 warningcount and errorcount.
6325
6326 * call.c: #include diagnostic.h
6327 (convert_like_real): Remove extern declaration for warnincount and
6328 errorcount.
6329
6330 * repo.c: #include diagnostic.h
6331 * typeck2.c: #include diagnostic.h
6332
6333 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
6334
6335 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
6336 in previous change.
6337
6338 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
6339
6340 PR c++/2929
6341 * friend.c (do_friend): Use push_decl_namespace for classes at
6342 namespace scope.
6343
6344 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
6345 Jason Merrill <jason_merrill@redhat.com>
6346
6347 PR c++/3061
6348 * class.c (build_secondary_vtable): Use assert, rather than an error
6349 message.
6350 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
6351 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
6352 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
6353 Don't set BINFO_VTABLE for a primary virtual base.
6354
6355 2001-06-07 Mark Mitchell <mark@codesourcery.com>
6356
6357 * decl.c (duplicate_decls): Update source position information
6358 when a template function is defined.
6359
6360 2001-06-07 Phil Edwards <pme@sources.redhat.com>
6361
6362 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
6363
6364 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
6365
6366 PR c++/2914
6367 * decl.c (pushtag): Don't push into a complete type's scope.
6368
6369 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
6370
6371 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
6372 (struct lang_decl_flags): Lose generate_with_vtable_p.
6373 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
6374 * class.c (copy_virtuals): Adjust.
6375 * decl2.c (mark_vtable_entries): Adjust.
6376 * method.c (make_thunk, build_vtable_entry): Adjust.
6377 * class.c (update_vtable_entry_for_fn): Only look as far as the
6378 first defining class.
6379 (build_vtbl_initializer): Put nothing in the slot for a function only
6380 defined in a lost primary virtual base.
6381 (add_vcall_offset_vtbl_entries_1): Use the same code for
6382 the lost primary case and the normal case.
6383 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
6384 (get_vfield_offset, get_derived_offset): Lose.
6385 (dfs_find_final_overrider): Use look_for_overrides_here.
6386 (get_matching_virtual): New fn.
6387 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
6388 not BV_VCALL_INDEX.
6389 * search.c (look_for_overrides_here): Split out from...
6390 (look_for_overrides_r): Here.
6391
6392 * class.c (find_final_overrider): Return error_mark_node on error.
6393
6394 * decl2.c (key_method): #if 0 accidental change.
6395
6396 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
6397
6398 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
6399 (build_over_call): Likewise.
6400 * decl.c (grokparms): Likewise.
6401 * pt.c (tsubst_decl): Likewise.
6402 * typeck.c (convert_arguments): Likewise.
6403
6404 2001-06-05 Mark Mitchell <mark@codesourcery.com>
6405
6406 * semantics.c (begin_class_definition): Robustify.
6407
6408 * pt.c (instantiate_decl): Tell the repository code about the
6409 clones, not the cloned functions.
6410 * repo.c (repo_template_used): Explicitly instantiate the cloned
6411 function, not the clones.
6412
6413 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
6414
6415 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
6416 ICS_BAD_FLAG on created conversion.
6417 (compare_ics): Break out rank.
6418
6419 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
6420
6421 * decl.c (xref_tag): Remove extraneous %s on dependent name
6422 lookup warning.
6423
6424 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
6425
6426 * class.c (layout_vtable_decl): Fix off by one error on
6427 build_index_type.
6428 (build_vtt): Likewise.
6429 (build_ctor_vtbl_group): Likewise.
6430
6431 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
6432
6433 * class.c (maybe_indent_hierarchy): New function.
6434 (dump_class_hierarchy_r): Add flags. Dump extra binfo
6435 information, if enabled. Use maybe_indent_hierarchy. Adjust
6436 output format.
6437 (dump_class_hierarchy): Adjust prototype. Adjust output format.
6438 (dump_array, dump_vtable, dump_vtt): New functions.
6439 (finish_struct_1): Adjust hierarchy dumping.
6440 (initialize_vtable): Call dump_vtable.
6441 (build_vtt): Call dump_vtt.
6442 (build_ctor_vtbl_group): Call dump_vtable.
6443 * decl2.c (flag_dump_class_layout): Remove.
6444 (cxx_decode_option): Remove dump translation unit
6445 and dump class hierarchy check. Call dump_switch_p.
6446 (finish_file): Adjust dumping.
6447 (dump.c): Only dump base classes if not TDF_SLIM.
6448 Only dump namespace members if not TDF_SLIM.
6449 * optimize.c (dump_function): New function.
6450 (optimize_function): Call dump_function.
6451 * semantics.c (expand_body): Use dump_enabled_p.
6452
6453 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
6454
6455 PR g++/2936
6456 Part missed from first commit
6457 * decl2.c (finish_anon_union): Copy context.
6458
6459 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
6460
6461 PR g++/2936
6462 * optimize.c (remap_decl): Remap anonymous aggregate members too.
6463
6464 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
6465
6466 PR g++/2823
6467 * semantics.c (expand_body): Don't optimize thunks.
6468
6469 2001-05-25 Sam TH <sam@uchicago.edu>
6470
6471 * cp-tree.h lex.h: Fix header include guards.
6472
6473 2001-05-25 Mark Mitchell <mark@codesourcery.com>
6474
6475 * decl.c (init_decl_processing): Tweak.
6476
6477 2001-05-24 Mark Mitchell <mark@codesourcery.com>
6478
6479 * decl.c (duplicate_decls): Tidy.
6480 (init_decl_processing): Always set flag_no_builtin.
6481
6482 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
6483
6484 PR c++/2184
6485 * decl2.c (do_local_using_decl): Push the decls, even in a
6486 template.
6487
6488 2001-05-22 Mark Mitchell <mark@codesourcery.com>
6489
6490 * optimize.c (initialize_inlined_parameters): Don't set
6491 TREE_READONLY for a VAR_DECL taking the place of an inlined
6492 PARM_DECL.
6493
6494 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
6495
6496 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
6497 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
6498 attribute.
6499
6500 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
6501
6502 * parse.y: Refer to compound literals as such, not as
6503 constructor-expressions.
6504
6505 2001-05-21 Mark Mitchell <mark@codesourcery.com>
6506
6507 * call.c (build_op_delete_call): Ignore exception-specifications
6508 when looking for matching delete operators.
6509 * init.c (build_new_1): Compute whether or not the allocation
6510 function used is a placement allocation function or not, and
6511 communicate this information to build_op_delete_call.
6512
6513 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
6514
6515 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
6516 (build_vtbl_ref): Adjust.
6517 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
6518 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
6519 Re-add vtable-gc.
6520 (unsupported_options): Correspondingly.
6521
6522 * decl2.c (maybe_make_one_only): Check flag_weak, not
6523 supports_one_only().
6524
6525 * cp-tree.def (START_CATCH_STMT): Lose.
6526 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
6527 * tree.c (cp_statement_code_p): Don't case it.
6528 * semantics.c (cp_expand_stmt): Likewise.
6529 * cp-tree.h (START_CATCH_TYPE): Lose.
6530 (HANDLER_TYPE): New.
6531 * except.c (expand_start_catch_block): Don't start any blocks.
6532 Return the type.
6533 (expand_end_catch_block): Don't end any blocks.
6534 * parse.y (handler): Don't pass anything from finish_handler_parms
6535 to finish_handler.
6536 * pt.c (tsubst_expr): Likewise.
6537 * semantics.c (begin_handler): Call note_level_for_catch here.
6538 (finish_handler_parms): Don't return anything.
6539 (genrtl_catch_block, begin_catch_block): Lose.
6540 (genrtl_handler): Call expand_start_catch here.
6541
6542 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
6543
6544 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
6545 (get_vtable_decl, build_vtt): Not here.
6546
6547 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
6548
6549 PR c++/2781
6550 * optimize.c (update_cloned_parm): Copy addressability and other
6551 flags.
6552
6553 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6554
6555 * pt.c (determine_specialization): Ignore artificial functions.
6556
6557 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
6558
6559 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
6560 (C_RID_CODE): Remove.
6561 * lex.c (cxx_init_options): Call set_identifier_size. Update.
6562 (init_parse): Don't do it here.
6563
6564 2001-05-18 Diego Novillo <dnovillo@redhat.com>
6565
6566 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
6567 function declaration to avoid stripping the symbol's attributes.
6568
6569 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
6570
6571 * decl.c (pushdecl): Adjust error string.
6572 (xref_tag): Adjust friend class injection warning. Remove the
6573 inherited name from the class shadowed scope.
6574
6575 2001-05-17 Mark Mitchell <mark@codesourcery.com>
6576
6577 * except.c (cp_protect_cleanup_actions): New function.
6578 (init_exception_processing): Don't set protect_cleanup_actions
6579 here. Do set lang_protect_cleanup_actions.
6580
6581 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
6582
6583 * spew.c (read_token): Call yyerror on all unexpected tokens.
6584
6585 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
6586
6587 * init.c (member_init_ok_or_else): Take a tree rather than
6588 string for name.
6589 (expand_member_init): Adjust.
6590
6591 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
6592
6593 * decl.c (duplicate_decls): Suppress warning about duplicate
6594 decls if the first decl is a friend.
6595
6596 2001-05-12 Zack Weinberg <zackw@stanford.edu>
6597
6598 * except.c (choose_personality_routine): Export. Add
6599 explanatory comment. Take an enum languages, not a boolean.
6600 (initialize_handler_parm): Adjust to match.
6601 * cp-tree.h: Prototype choose_personality_routine.
6602 * lex.c (handle_pragma_java_exceptions): New function.
6603 (init_cp_pragma): Register #pragma GCC java_exceptions.
6604
6605 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
6606
6607 * method.c (build_mangled_C99_name): Remove unused prototype.
6608
6609 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
6610
6611 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
6612 * typeck.c (get_member_function_from_ptrfunc,
6613 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
6614 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
6615
6616 Reverted Geoff Keating's 2001-05-03's patch.
6617
6618 2001-05-11 Ira Ruben <ira@apple.com>
6619
6620 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
6621
6622 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
6623
6624 * cp-tree.h (finish_label_expr, lookup_label): Delete.
6625 * parse.y: Update for '&&'; don't issue warning here.
6626 * semantics.c (finish_label_expr): Delete.
6627
6628 2001-05-07 Mark Mitchell <mark@codesourcery.com>
6629
6630 * splay-tree.h (splay_tree_max): New function.
6631 (splay_tree_min): Likewise.
6632
6633 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
6634
6635 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
6636 (pfn_vflag_identifier): Define.
6637 Update comment about layout of pointer functions.
6638 (build_ptrmemfunc1): Update prototype.
6639 (expand_ptrmemfunc_cst): Update prototype.
6640 * decl.c (initialize_predefined_identifiers): Initialize
6641 pfn_vflag_identifier.
6642 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
6643 an extra field to the type.
6644 * expr.c (cplus_expand_constant): Pass 'flag' between
6645 expand_ptrmemfunc_cst and build_ptrmemfunc1.
6646 * typeck.c (get_member_function_from_ptrfunc): When
6647 FUNCTION_BOUNDARY < 16, look at additional field to determine
6648 if a pointer-to-member is a real pointer or a vtable offset.
6649 (build_ptrmemfunc1): Add new parameter to contain extra field.
6650 (build_ptrmemfunc): Pass the extra field around.
6651 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
6652 (pfn_from_ptrmemfunc): Ignore the extra field.
6653
6654 2001-05-03 Mark Mitchell <mark@codesourcery.com>
6655
6656 * cp-tree.h (flag_inline_trees): Update documentation.
6657 * decl.c (init_decl_processing): Adjust handling of
6658 flag_inline_functions and flag_inline_trees to support -O3.
6659 (grokfndecl): Set DECL_INLINE on all functions if that's what
6660 the user requested.
6661 (save_function_data): Clear DECL_INLINE in
6662 current_function_cannot_inline is non-NULL.
6663 * decl2.c (flag_inline_trees): Update documentation.
6664
6665 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
6666
6667 * dump.c (cp_dump_tree, USING_STMT case): New case.
6668 * tree.c (cp_statement_code_p): Add USING_STMT.
6669 * decl2.c (do_using_directive): Add the using directive statement.
6670
6671 * tree.c (walk_tree): Reformat an if block.
6672
6673 2001-05-02 Mark Mitchell <mark@codesourcery.com>
6674
6675 * decl.c (compute_array_index_type): Don't try to do anything with
6676 the indices when processing a template.
6677
6678 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6679
6680 * call.c: NULL_PTR -> NULL.
6681 * class.c: Likewise.
6682 * cvt.c: Likewise.
6683 * decl.c: Likewise.
6684 * decl2.c: Likewise.
6685 * except.c: Likewise.
6686 * init.c: Likewise.
6687 * rtti.c: Likewise.
6688 * search.c: Likewise.
6689 * tree.c: Likewise.
6690 * typeck.c: Likewise.
6691 * typeck2.c: Likewise.
6692
6693 2001-05-02 Mark Mitchell <mark@codesourcery.com>
6694
6695 * decl2.c (do_using_directive): Revert previous patch.
6696
6697 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
6698
6699 * cp-tree.def (USING_STMT): New statement node.
6700 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
6701 * decl2.c (do_using_directive): Add USING_STMT to statement
6702 tree. Don't emit errors when processing template decl.
6703 * pt.c (tsubst_expr, USING_STMT case): New case.
6704 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
6705
6706 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
6707
6708 * call.c (build_new_op): Convert args from reference here.
6709 (build_conditional_expr): Don't convert here.
6710
6711 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
6712
6713 * spew.c (last_token_id): New static variable.
6714 (read_token): Set it here.
6715 (yyerror): Use it here.
6716
6717 2001-04-30 Richard Henderson <rth@redhat.com>
6718
6719 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
6720 * decl.c: Likewise.
6721
6722 2001-04-30 Mark Mitchell <mark@codesourcery.com>
6723
6724 * gxxint.texi: Remove.
6725 * Make-lang.in: Remove all traces of gxxint.texi.
6726
6727 Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
6728
6729 * decl2.c (start_static_initialization_or_destruction): Correct
6730 logic to handle the -fno-use-cxa-atexit case.
6731
6732 2001-04-30 Mark Mitchell <mark@codesourcery.com>
6733
6734 * optimize.c (update_cloned_parm): New function.
6735 (maybe_clone_body): Use it. Update the `this' parameter too.
6736
6737 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
6738
6739 * decl2.c (unsupported_options): Add new-abi.
6740 * lang-options.h: Remove no longer supported options.
6741
6742 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
6743
6744 * except.c (can_convert_eh): Don't check template parms,
6745 typename types etc.
6746
6747 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
6748
6749 * optimize.c (maybe_clone_body): Copy parameter names and locations.
6750
6751 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
6752
6753 * cp-tree.h (adjust_clone_args): Prototype new function.
6754 * class.c (adjust_clone_args): New function.
6755 * decl.c (start_function): Call it for in charge ctors.
6756
6757 2001-04-26 Mark Mitchell <mark@codesourcery.com>
6758
6759 * method.c (use_thunk): Make sure that thunks really are emitted
6760 when requested.
6761
6762 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
6763
6764 * mangle.c (write_chars): New macro.
6765 (hwint_to_ascii): New function
6766 (write_number): Use it.
6767 (write_integer_cst): Deal with really big numbers.
6768
6769 2001-04-25 Mark Mitchell <mark@codesourcery.com>
6770
6771 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
6772 the clone.
6773
6774 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
6775
6776 * decl.c (grokdeclarator): Set context of namespace scope
6777 TYPE_DECLS.
6778
6779 2001-04-24 Zack Weinberg <zackw@stanford.edu>
6780
6781 * cp/optimize.c: Include hashtab.h.
6782 (struct inline_data): Add tree_pruner.
6783 (expand_call_inline, expand_calls_inline): Use it when calling
6784 walk_tree.
6785 (optimize_function): Initialize and free tree_pruner.
6786
6787 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
6788
6789 Lazy __FUNCTION__ generation.
6790 * cp-tree.def (FUNCTION_NAME): Remove.
6791 * cp-tree.h (function_name_declared_p): Remove.
6792 (cp_fname_init): Prototype.
6793 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
6794 don't call declare_function_name. Call start_fname_decls.
6795 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
6796 clobber the line number.
6797 (cp_fname_init): New function.
6798 (start_function): Call start_fname_decls.
6799 (finish_function): Call finish_fname_decls.
6800 * lex.c (reswords): Add slots for __FUNCTION__ et al.
6801 (rid_to_yy): Add mappings for __FUNCTION__ et al.
6802 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
6803 * parse.y (VAR_FUNC_NAME): New token.
6804 (primary): Add VAR_FUNC_NAME.
6805 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
6806 generation.
6807 (tsubst, FUNCTION_NAME case): Remove.
6808 (tsubst_copy, FUNCTION_NAME case): Remove.
6809 (tsubst_expr, DECL_STMT case): Be careful with a
6810 DECL_PRETTY_FUNCTION_P.
6811 (instantiate_decl): Remove function_name_declared_p.
6812 * semantics.c (begin_compound_statement): Don't call
6813 declare_function_name here.
6814 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
6815 (finish_translation_unit): Call finish_fname_decls.
6816 (expand_body): Remove function_name_declared_p.
6817 * typeck2.c (digest_init): Allow any ERROR_MARK.
6818
6819 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
6820
6821 * pt.c (tsubst_decl): Use VOID_TYPE_P.
6822 * semantics.c: Fix some typos.
6823
6824 2001-04-23 Phil Edwards <pme@sources.redhat.com>
6825
6826 * cp/decl2.c (flag_honor_std): Always initialize to 1.
6827
6828 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6829
6830 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
6831
6832 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
6833
6834 * except.c (build_throw): Wrap the initialization of the exception
6835 object in a MUST_NOT_THROW_EXPR.
6836 (do_free_exception): #if 0.
6837
6838 2001-04-20 Mark Mitchell <mark@codesourcery.com>
6839
6840 * cp-tree.h (finish_enum): Change prototype.
6841 * decl.c (finish_enum): Reorganize.
6842 * parse.y (structsp): Adjust calls to finish_enum.
6843
6844 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
6845
6846 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
6847 't' case.
6848
6849 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
6850
6851 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
6852 (layout_empty_base): Return at end flag.
6853 (build_base_field): Likewise.
6854 (build_base_fields): Likewise.
6855 (layout_virtual_bases): Don't add 1 to eoc value.
6856 (end_of_class): Use full size for empty bases.
6857 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
6858 empty bases. Don't add 1 to eoc value. Only add trailing padding
6859 if we're an empty class with no empty bases.
6860 (dump_class_hierarchy): Dump size and alignment.
6861
6862 2001-04-20 Jakub Jelinek <jakub@redhat.com>
6863
6864 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
6865 ICS_BAD_FLAG.
6866
6867 2001-04-20 Jakub Jelinek <jakub@redhat.com>
6868
6869 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
6870 is found, look first if name does not match the structure name.
6871
6872 2001-04-19 Mark Mitchell <mark@codesourcery.com>
6873
6874 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
6875 set.
6876 (SET_DECL_LANGUAGE): New macro.
6877 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
6878 (pushdecl): Likewise.
6879 (build_library_fn_1): Likewise.
6880 (build_cp_library_fn): Likewise.
6881 (grokfndecl): Likewise.
6882 (grokvardecl): Mark `extern "C"' variables as having C linkage.
6883 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
6884 * lex.c (retrofit_lang_decl): Likewise.
6885 * mangle.c (mangle_decl_string): Don't mangle the names of
6886 variables declared with C language linkage.
6887 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
6888
6889 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
6890
6891 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
6892 flag_access_control from uninitialized storage.
6893
6894 2001-04-15 Mark Mitchell <mark@codesourcery.com>
6895
6896 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
6897 * mangle.c (write_pointer_to_member_type): Fix mangling of
6898 pointers to cv-qualified member function types.
6899
6900 * init.c (build_delete): Create a SAVE_EXPR for the address if
6901 we're going to use it more than once.
6902
6903 2001-04-13 Mark Mitchell <mark@codesourcery.com>
6904
6905 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
6906 (expand_ptremfunc_cst): Change prototype.
6907 (delta2_from_ptrmemfunc): Remove.
6908 * expr.c (cplus_expand_constant): Adjust call to
6909 expand_ptrmemfunc_cst.
6910 * typeck.c (build_ptrmemfunc1): Simplify.
6911 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
6912 results in a constant.
6913 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
6914 (delta2_from_ptrmemfunc): Remove.
6915 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
6916
6917 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
6918
6919 * cp-tree.h (decl_namespace_list): New macro.
6920 (struct saved_scope): Add decl_ns_list.
6921 * decl.c (mark_saved_scope): Mark it.
6922 * decl2.c: Lose static decl_namespace_list.
6923 (init_decl2): Don't save it.
6924
6925 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6926
6927 * cp-tree.h (warn_return_type, yylex): Delete redundant
6928 declarations.
6929
6930 * decl.c (current_class_depth, global_namespace): Likewise.
6931
6932 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
6933
6934 * repo.c (flag_use_repository): Likewise.
6935
6936 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6937
6938 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
6939 set_block, pushdecl, getdecls, gettags, init_decl_processing,
6940 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
6941 lvalue_or_else, print_lang_statistics, comp_target_types,
6942 unsigned_type, signed_type, signed_or_unsigned_type,
6943 build_function_call, mark_addressable, incomplete_type_error):
6944 Delete redundant declarations.
6945
6946 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
6947
6948 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
6949 (TYPE_ANONYMOUS_P): New macro.
6950 (TAGGED_TYPE_P): New macro.
6951 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
6952 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
6953 * tree.c (no_linkage_helper): Likewise.
6954 * semantics.c (begin_class_definition): Likewise.
6955 * pt.c (convert_template_argument): Likewise.
6956 * lex.c (check_for_missing_semicolon): Likewise.
6957
6958 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
6959
6960 * class.c (dfs_unshared_virtual_bases): New function.
6961 (mark_primary_bases): Call it.
6962 (check_bases): Ignore virtual bases when determining
6963 nearly-emptiness.
6964
6965 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
6966
6967 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
6968
6969 2001-04-11 Mark Mitchell <mark@codesourcery.com>
6970
6971 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
6972 cloned function to the clone.
6973
6974 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6975
6976 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
6977
6978 * semantics.c: Include expr.h.
6979
6980 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
6981
6982 * method.c (implicitly_declare_fn): Commonize code for copy ctor
6983 and assignment op. Set TREE_USED for parameter.
6984
6985 2001-04-10 Mark Mitchell <mark@codesourcery.com>
6986
6987 * class.c (find_final_overrider_data): Add `candidates'.
6988 (dfs_find_final_overrider): Don't issue error messages
6989 prematurely.
6990 (find_final_overrider): Issue error messages here.
6991 (build_base_field): Don't warn about amgibuous direct bases here.
6992 (warn_about_ambiguous_direct_bases): New function.
6993 (layout_class_type): Use it.
6994
6995 2001-04-10 Richard Henderson <rth@redhat.com>
6996
6997 * typeck.c (build_array_ref): Push the array reference inside
6998 COMPOUND_EXPR and COND_EXPR.
6999
7000 2001-04-05 Mark Mitchell <mark@codesourcery.com>
7001
7002 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
7003 * decl.c (duplicate_decls): Adjust accordingly.
7004 (maybe_commonize_var): Likewise.
7005 (grokfndecl): Likewise.
7006 (start_function): Likewise.
7007 (start_method): Likewise.
7008 * decl2.c (key_method): Likewise.
7009 (import_export_decl): Likewise.
7010 * method.c (implicitly_declare_fn): Likewise.
7011 * optimize.c (maybe_clone_body): Likewise.
7012
7013 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
7014
7015 * lang-specs.h: Add __DEPRECATED.
7016
7017 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
7018
7019 * search.c (get_dynamic_cast_base_type): When building a new
7020 constant, set its type to ssizetype.
7021
7022 2001-04-04 Jakub Jelinek <jakub@redhat.com>
7023
7024 * optimize.c (expand_call_inline): Only add newly inlined statements
7025 into inlined_stmts.
7026
7027 2001-04-03 Mark Mitchell <mark@codesourcery.com>
7028
7029 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
7030 (OPERATOR_FORMAT): Likewise.
7031 (OPERATOR_TYPENAME_FORMAT): Likewise.
7032 * operators.def: Remove old name-mangling information.
7033 * decl.c (grok_op_properties): Adjust accordingly.
7034 * lex.c (init_operators): Likewise.
7035 * rtti.c (get_tinfo_decl): Issue error messages about types that
7036 have variable size.
7037
7038 2001-04-03 Mark Mitchell <mark@codesourcery.com>
7039
7040 * decl2.c (import_export_decl): Don't call import_export_class
7041 when processing an inline member function.
7042 * semantics.c (expand_body): Call import_export_decl before
7043 emitting inline functions.
7044
7045 2001-03-28 Richard Henderson <rth@redhat.com>
7046
7047 IA-64 ABI Exception Handling:
7048 * cp-tree.def (EH_SPEC_BLOCK): New.
7049 (MUST_NOT_THROW_EXPR): New.
7050 * cp-tree.h: Update changed function declarations.
7051 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
7052 (CPTI_CALL_UNEXPECTED): New.
7053 (struct cp_language_function): Rename x_eh_spec_try_block
7054 to x_eh_spec_block.
7055 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
7056 * decl.c (current_binding_level): If no current function
7057 bindings, revert to scope_chain.
7058 (initialize_predefined_identifiers): Remove __cp_push_exception.
7059 (store_parm_decls): Use begin_eh_spec_block.
7060 (finish_function): Use finish_eh_spec_block.
7061 (mark_lang_function): Update for name changes.
7062 * decl2.c (finish_file): No mark_all_runtime_matches.
7063 * dump.c (cp_dump_tree): Handle new tree codes.
7064 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
7065 * except.c (catch_language_init, catch_language): Remove.
7066 (init_exception_processing): Don't set language code.
7067 Initialize call_unexpected_node, protect_cleanup_actions,
7068 eh_personality_libfunc, lang_eh_runtime_type.
7069 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
7070 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
7071 (prepare_eh_type): Split out type canonicalizations ...
7072 (build_eh_type_type): ... from here.
7073 (build_eh_type_type_ref): Remove.
7074 (mark_all_runtime_matches): Remove.
7075 (build_exc_ptr): New.
7076 (do_begin_catch, do_end_catch): New.
7077 (do_pop_exception): Remove.
7078 (build_terminate_handler): Remove.
7079 (choose_personality_routine): Split out language choice from ...
7080 (initialize_handler_parm): ... here.
7081 Use MUST_NOT_THROW_EXPR.
7082 (expand_start_catch_block): Use do_begin_catch. Simplify Java
7083 exception object handling.
7084 (expand_start_eh_spec, expand_end_eh_spec): Remove.
7085 (expand_exception_blocks, alloc_eh_object): Remove.
7086 (begin_eh_spec_block, finish_eh_spec_block): New.
7087 (do_allocate_exception, do_free_exception): New.
7088 (expand_throw): Merge into ...
7089 (build_throw): ... here. Update for abi.
7090 * expr.c (cplus_expand_expr): No expand_internal_throw.
7091 Handle MUST_NOT_THROW_EXPR.
7092 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
7093 * semantics.c (*) Update for except.h name changes.
7094 (genrtl_try_block): No protect_with_terminate.
7095 (genrtl_eh_spec_block): New.
7096 (genrtl_handler): Don't emit the goto here.
7097 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
7098 (genrtl_finish_function): Don't expand_exception_blocks.
7099 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
7100
7101 2001-03-28 Richard Henderson <rth@redhat.com>
7102
7103 * decl.c (struct named_label_list): Rename eh_region to
7104 in_try_scope, add in_catch_scope.
7105 (struct binding_level): Rename eh_region to is_try_scope,
7106 add is_catch_scope.
7107 (note_level_for_try): Rename from note_level_for_eh.
7108 (note_level_for_catch): New.
7109 (poplevel): Copy both is_try_scope and is_catch_scope to
7110 the named_label_list struct.
7111 (check_previous_goto_1): Don't check for catch block via
7112 DECL_ARTIFICIAL; use in_try_scope instead.
7113 (check_goto): Likewise.
7114 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
7115 * except.c (expand_start_catch_block): Call note_level_for_catch.
7116 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
7117
7118 2001-03-27 Richard Henderson <rth@redhat.com>
7119
7120 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
7121 exceptions_via_longjmp.
7122
7123 2001-03-27 Phil Edwards <pme@sources.redhat.com>
7124
7125 * pt.c (check_default_tmpl_args): Make error messages clearer.
7126
7127 2001-03-26 Phil Edwards <pme@sources.redhat.com>
7128
7129 * error.c: Also undefine 'A' macro used for cp_printers definition.
7130
7131 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7132
7133 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
7134
7135 2001-03-26 Mike Yang <yang@research.att.com>
7136 Mark Mitchell <mark@codesourcery.com>
7137
7138 * dump.c (dump_access): New function.
7139 (cp_dump_tree): Use it. Dump basetype information for class
7140 types.
7141
7142 2001-03-26 Mark Mitchell <mark@codesourcery.com>
7143
7144 * Makefile.in (optimize.o): Depend on params.h.
7145 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
7146 (init_decl_processing): Set flag_no_inline when doing
7147 inlining-on-trees.
7148 * optimize.c: Include params.h.
7149 (struct inline_data): Improve documentation of FNS. Add
7150 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
7151 (INSNS_PER_STMT): New macro.
7152 (remap_block): Use CLONING_P.
7153 (inlinable_function_p): Don't inline big functions.
7154 (expand_call_inline): Keep track of how much inlining we've done.
7155 (optimize_function): Set FIRST_INLINED_FN.
7156 (maybe_clone_body): Set CLONING_P.
7157 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
7158 tree nodes.
7159 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
7160 rest_of_compilation. Clear DECL_RTL for local variables
7161 afterwards.
7162 (clear_decl_rtl): New function.
7163
7164 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
7165
7166 Implement DR 209
7167 * cp-tree.h (skip_type_access_control,
7168 reset_type_access_control): Prototype.
7169 * decl.c (grokdeclarator): Access of friends is not checked.
7170 * parse.y (component_decl_list): Reset type access control.
7171 * semantics.c (decl_type_access_control): Clear
7172 current_type_lookups.
7173 (save_type_access_control): Don't save if not deferring.
7174 (skip_type_access_control, reset_type_access_control): New
7175 functions.
7176 (begin_class_definition): Do type access control for basetypes.
7177 Start deferred access control.
7178 (finish_class_definition): Resume immediate access control if
7179 this is a local class.
7180
7181 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7182
7183 * class.c (add_method): Use memcpy/memmove, not bcopy.
7184
7185 * decl.c (duplicate_decls): Likewise.
7186
7187 2001-03-23 Jakub Jelinek <jakub@redhat.com>
7188
7189 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
7190 not `_'.
7191
7192 2001-03-23 Jakub Jelinek <jakub@redhat.com>
7193
7194 * decl.c (local_names): Define.
7195 (push_local_name): New.
7196 (grok_reference_init): Return init if initializing static reference
7197 variable with non-constant instead of emitting it.
7198 Move expand_static_init call to cp_finish_decl.
7199 (layout_var_decl): Call push_local_name.
7200 (maybe_commonize_var): Allow inlining functions even if they have
7201 static local variables, use comdat_linkage for them if flag_weak.
7202 (check_initializer): Call obscure_complex_init if
7203 grok_reference_init returned nonzero.
7204 (save_function_data): Clear x_local_names.
7205 (pop_cp_function_context): Free x_local_names.
7206 (mark_inlined_fns): Remove.
7207 (mark_lang_function): Mark x_local_names.
7208 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
7209 Mark inlined_fns as tree, remove call to mark_inlined_fns.
7210 * class.c (alter_access): Ensure DECL_ACCESS is never set if
7211 DECL_DISCRIMINATOR_P.
7212 * cp-tree.h (cp_language_function): Add x_local_names.
7213 (lang_decl_flags): Add discriminator into u2.
7214 (lang_decl_inlined_fns): Remove.
7215 (lang_decl): inlined_fns is now a TREE_VEC.
7216 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
7217 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
7218 TREE_VEC, not a custom structure.
7219 (optimize_function): Likewise.
7220 * mangle.c (discriminator_for_local_entity): Discriminate among
7221 VAR_DECL local entities.
7222 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
7223 is not valid.
7224
7225 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
7226
7227 Add support for Java interface method calls.
7228 * cp-tree.h (struct lang_type): Add java_interface flag.
7229 (TYPE_JAVA_INTERFACE): New macro.
7230 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
7231 by setting TYPE_JAVA_INTERFACE.
7232 * call.c (java_iface_lookup_fn): New static.
7233 (build_over_call): If calling a method declared in a
7234 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
7235 expression which resolves the function address.
7236 (build_java_interface_fn_ref): New function.
7237
7238 2001-03-22 Richard Henderson <rth@redhat.com>
7239
7240 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
7241 * except.c: Don't include it.
7242
7243 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
7244 based on an idea from Joe Buck <jbuck@synopsys.com>
7245
7246 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
7247 New nonterminals.
7248 (data_def, component_decl): Add reductions to bad_decl.
7249
7250 2001-03-22 Jakub Jelinek <jakub@redhat.com>
7251
7252 * method.c (do_build_assign_ref): Don't use build_modify_expr for
7253 anonymous aggregates, since they don't have assignment operator
7254 method.
7255 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
7256 assignment operators for anonymous structure fields.
7257
7258 2001-03-21 Jason Merrill <jason@redhat.com>
7259
7260 * pt.c (instantiate_decl): Abort if we see a member constant
7261 instantiation that doesn't already have its initializer.
7262 Downgrade explicit instantiation without definition to pedwarn.
7263
7264 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
7265 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
7266 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
7267
7268 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
7269 (pending_vtables): Remove.
7270 * decl2.c (pending_vtables): Remove.
7271 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
7272 CLASSTYPE_VTABLE_NEEDS_WRITING.
7273 (import_export_class): Likewise.
7274 (init_decl2): Don't mark pending_vtables.
7275 * lex.c (handle_pragma_vtable): Just sorry.
7276 * pt.c (instantiate_class_template): Don't mess with
7277 CLASSTYPE_VTABLE_NEEDS_WRITING.
7278 (mark_class_instantiated): Likewise.
7279 * ptree.c (print_lang_type): Don't print it.
7280 * semantics.c (begin_class_definition): Don't set it.
7281
7282 * pt.c (template_tail): Replace with last_pending_template.
7283 (maybe_templates, maybe_template_tail): Remove.
7284 (add_pending_template): Adjust.
7285 (instantiate_pending_templates): Adjust.
7286
7287 * cp-tree.h (struct saved_scope): Remove lang_stack field.
7288 (current_lang_stack): Remove.
7289 * decl.c (maybe_push_to_top_level): Don't initialize it.
7290 (duplicate_decls): Use current_lang_depth.
7291 (xref_basetypes): Likewise.
7292 * class.c (current_lang_depth): New fn.
7293 (push_lang_context): Use more varray functionality.
7294 (pop_lang_context): Likewise.
7295
7296 * error.c (GLOBAL_THING): Always use '__'.
7297
7298 2001-03-21 Mark Mitchell <mark@codesourcery.com>
7299
7300 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
7301
7302 * mangle.c (mangle_decl_string): Mangle the names of overloaded
7303 operators, even when they have `extern "C"' linkage.
7304
7305 2001-03-19 Mark Mitchell <mark@codesourcery.com>
7306
7307 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
7308 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
7309 where it's not necessary.
7310 (add_method): Remove optimization involving comparison of
7311 DECL_ASSEMBLER_NAME.
7312 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
7313 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
7314 where it's not necessary.
7315 (check_methods): Likewise.
7316 (build_clone): Likewise.
7317 (built_vtt): Likewise.
7318 * cp-tree.h (DECL_NEEDED_P): Likewise.
7319 * decl.c (pushtag): Likewise.
7320 (duplicate_decls): Likewise.
7321 (pushdecl): Likewise.
7322 (builtin_function): Likewise.
7323 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
7324 (build_cp_library_fn): Likewise.
7325 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
7326 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
7327 where it's not necessary.
7328 (make_rtl_for_nonlocal_decl): Likewise.
7329 (cp_finish_decl): Likewise.
7330 (grokfndecl): Likewise.
7331 (grokvardecl): Likewise.
7332 (grokdeclarator): Likewise.
7333 (start_function): Likewise.
7334 (cp_missing_return_ok_p): Likewise.
7335 * decl2.c (grokclassfn): Likewise.
7336 (check_classfn): Likewise.
7337 (finish_static_data_member_decl): Likewise.
7338 (grokfield): Likewise.
7339 * error.c (GLOBAL_IORD_P): Remove.
7340 (dump_global_iord): Improve output.
7341 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
7342 * except.c (nothrow_libfn_p): Summarily reject any function not in
7343 namespace-scope.
7344 * init.c (build_java_class_ref): Don't explicitly set
7345 DECL_ASSEMBLER_NAME after calling mangle_decl.
7346 * mangle.c (mangle_decl_string): Handle extern "C" functions.
7347 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
7348 * method.c (set_mangled_name_for_decl): Don't explicitly set
7349 DECL_ASSEMBLER_NAME after calling mangle_decl.
7350 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
7351 IDENTIFIER_GLOBAL_VALUE for the thunk.
7352 * pt.c (set_mangled_name_for_template_decl): Remove.
7353 (check_explicit_specialization): Don't use it.
7354 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
7355 (tsubst_friend_function): Likewise.
7356 (tsubst_decl): Likewise.
7357 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
7358 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
7359 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
7360 where it's not necessary.
7361 (tinfo_base_init): Likewise.
7362 (create_real_tinfo_var): Likewise.
7363 * search.c (looup_field_1): Likewise.
7364 * semantics.c (finish_named_return_value): Likewise.
7365 * tree.c (init_tree): Set lang_set_decl_assembler_name.
7366
7367 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
7368
7369 Correct semantics restrictions checking in throw-expression.
7370 * except.c (is_admissible_throw_operand): New function.
7371 (build_throw): Use it.
7372
7373 2001-03-14 Mark Mitchell <mark@codesourcery.com>
7374
7375 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
7376 and its ilk.
7377
7378 2001-03-14 Mark Mitchell <mark@codesourcery.com>
7379
7380 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
7381 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
7382 * decl.c (duplicate_decls): Likewise.
7383 (builtin_function): Likewise.
7384 (build_library_fn): Likewise.
7385 (build_cp_library_fn): Likewise.
7386 (check_initializer): Likewise.
7387 (cp_finish_decl): Likewise.
7388 * decl2.c (grokfield): Likewise.
7389 (grok_function_init): Remove #if 0'd code.
7390 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
7391 * friend.c (do_friend): Likewise.
7392 * init.c (get_temp_regvar): Likewise.
7393 * method.c (make_thunk): Likewise.
7394 * pt.c (tsubst_friend_function): Likewise.
7395 (tsubst_decl): Likewise.
7396 (regenerate_decl_from_template): Likewise.
7397 * semantics.c (genrtl_named_return_value): Likewise.
7398 (expand_body): Likewise.
7399 (genrtl_finish_function): Likewise.
7400 * tree.c (cp_tree_equal): Likewise.
7401
7402 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
7403
7404 * call.c (convert_like_real): Add extra semantics to INNER
7405 parameter. Don't convert to temporary if a user conversion
7406 gives us an lvalue that we're about to bind to a reference.
7407 Set INNER to indicate pending reference binding on recursive
7408 calls.
7409
7410 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
7411
7412 * cp/lex.c: Delete duplicate pending_lang_change.
7413
7414 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
7415
7416 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
7417 Similarly.
7418 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
7419 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
7420
7421 2001-03-09 Zack Weinberg <zackw@stanford.edu>
7422
7423 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
7424
7425 2001-03-08 Stan Shebs <shebs@apple.com>
7426
7427 * cp-tree.h (set_identifier_local_value): Remove unused decl.
7428
7429 2001-03-06 Zack Weinberg <zackw@stanford.edu>
7430
7431 * spew.c: Remove references to CPP_OSTRING.
7432
7433 2001-03-06 Andrew Haley <aph@redhat.com>
7434
7435 * typeck.c (convert_arguments): Check that we have an fndecl.
7436
7437 2001-03-05 Andrew Haley <aph@redhat.com>
7438
7439 * typeck.c (convert_arguments): Don't do ellipsis conversion for
7440 __built_in_constant_p.
7441
7442 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
7443
7444 * typeck.c (build_static_cast): Allow enum to enum conversions
7445 as per DR 128.
7446
7447 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
7448
7449 * class.c (check_field_decls): Pointers to member do not a
7450 non-pod struct make, as per DR 148.
7451
7452 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
7453
7454 * call.c (joust): cp_pedwarn when using gnu extension concerning
7455 worst conversion sequences.
7456
7457 2001-03-01 Zack Weinberg <zackw@stanford.edu>
7458
7459 * decl.c: Replace all uses of 'boolean' with 'bool'.
7460
7461 2001-03-01 Zack Weinberg <zackw@stanford.edu>
7462
7463 * lang-specs.h: Add zero initializer for cpp_spec field to
7464 all array elements that need one. Don't put an #ifdef inside
7465 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
7466 use it.
7467
7468 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
7469
7470 Implement using decls inside template functions.
7471 * decl2.c (validate_nonmember_using_decl): Don't special case
7472 fake_std_node in the global namespace. Don't reject early when
7473 processing a template.
7474 (do_local_using_decl): Add to statement tree. Don't do further
7475 processing when building a template.
7476 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
7477
7478 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
7479
7480 * decl2.c (do_nonmember_using_decl): Don't complain if we find
7481 same function. Do complain about ambiguating extern "C"
7482 declarations.
7483
7484 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
7485
7486 Remove floating point and complex type template constant parms.
7487 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
7488 COMPLEX_TYPE extensions.
7489 (invalid_nontype_parm_type_p): Likewise.
7490
7491 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
7492
7493 * except.c (call_eh_info): Revert "match_function"'s type.
7494
7495 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
7496
7497 Fix ctor vtable vcall offsets.
7498 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
7499 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
7500 (get_matching_base): Remove.
7501 (get_original_base): New function.
7502 (build_vtbl_initializer): Initialize vid.rtti_binfo.
7503 Use a virtual thunk for a ctor vtable with an index
7504 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
7505 primary base within a constructor vtable. Only set
7506 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
7507 when primary base has been lost.
7508 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
7509
7510 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
7511
7512 * call.c (joust): Ensure more_specialized()'s argument length
7513 parameter has correct value for constructors.
7514
7515 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
7516
7517 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
7518
7519 * decl.c (mark_inlined_fns): Prototype.
7520
7521 2001-02-22 Mark Mitchell <mark@codesourcery.com>
7522
7523 * spew.c (yylex): Correct handling of friends.
7524
7525 2001-02-22 Mark Mitchell <mark@codesourcery.com>
7526
7527 * mangle.c (write_encoding): Pass write_function_type the
7528 FUNCTION_DECL for the function being encoded.
7529 (write_function_type): Pass it along to write_bare_function_type.
7530 (write_bare_function_type): Pass it along to write_method_parms.
7531 (write_method_parms): Don't mangle the compiler-generated
7532 parameters to a constructor or destructor.
7533
7534 2001-02-22 Andreas Jaeger <aj@suse.de>
7535
7536 * optimize.c: Include toplev.h for
7537 note_deferral_of_defined_inline_function prototype.
7538
7539 2001-02-22 Jakub Jelinek <jakub@redhat.com>
7540
7541 * cp-tree.h (struct lang_decl_inlined_fns): New.
7542 (struct lang_decls): Add inlined_fns.
7543 (DECL_INLINED_FNS): New macro.
7544 * optimize.c (struct inline_data): Add inlined_fns.
7545 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
7546 (inlinable_function_p): Likewise, fix typo in comment,
7547 function is not inlinable if it already inlined function currently
7548 being optimized.
7549 (expand_call_inline): Add fn to inlined_fns if necessary.
7550 (optimize_function): Initialize inlined_fns.
7551 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
7552 * decl.c (mark_inlined_fns): New function.
7553 (lang_mark_tree): Call it.
7554
7555 2001-02-21 Jason Merrill <jason@redhat.com>
7556
7557 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
7558 (DECL_UNINLINABLE): Move to middle-end.
7559
7560 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
7561 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
7562 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
7563 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
7564 parms and outer BLOCK. note_deferral_of_defined_inline_function.
7565
7566 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
7567 second parm of op=.
7568
7569 2001-02-19 Mark Mitchell <mark@codesourcery.com>
7570
7571 * decl2.c (set_decl_namespace): Allow explicit instantiations in
7572 any namespace.
7573
7574 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7575
7576 * optimize.c (expand_call_inline): Don't walk subtrees of type
7577 nodes.
7578
7579 2001-02-18 Mark Mitchell <mark@codesourcery.com>
7580
7581 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
7582 for a destructor.
7583
7584 2001-02-18 Jason Merrill <jason@redhat.com>
7585
7586 Do put the VTT parameter in DECL_ARGUMENTS.
7587 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
7588 (current_vtt_parm): New macro.
7589 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
7590 (DECL_HAS_VTT_PARM_P): New macro.
7591 (DECL_VTT_PARM): Remove.
7592 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
7593 * decl.c (duplicate_decls): Only copy the operator code if
7594 appropriate.
7595 (start_function): Set current_vtt_parm.
7596 (lang_mark_tree): Don't mark vtt_parm.
7597 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
7598 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
7599 * class.c (build_clone): Maybe remove the VTT parm.
7600 * optimize.c (maybe_clone_body): Set up the VTT parm.
7601 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
7602 * call.c (build_over_call): Just allow the VTT arg.
7603 * method.c (make_thunk): Don't set DECL_VTT_PARM.
7604 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
7605 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
7606 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
7607 * error.c (dump_function_decl): Likewise.
7608 * call.c (build_user_type_conversion_1, convert_like_real): Abort
7609 if we try to call a constructor with in-charge or VTT parms.
7610 * method.c (skip_artificial_parms_for): New fn.
7611 * call.c (add_function_candidate, build_over_call): Call it.
7612 * call.c (build_new_method_call): Use current_vtt_parm.
7613 * init.c (expand_virtual_init): Likewise.
7614 * class.c (same_signature_p): No longer static.
7615 * cp-tree.h: Declare it.
7616 * search.c (look_for_overrides_r): Use it.
7617
7618 2001-02-17 Mark Mitchell <mark@codesourcery.com>
7619
7620 * cp-tree.h (new_abi_rtti_p): Remove.
7621 (name_mangling_version): Likewise.
7622 (flag_do_squangling): Likewise.
7623 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
7624 * decl.c (grokfndecl): Likewise.
7625 * decl2.c (name_mangling_version): Remove.
7626 (flag_do_squangling): Likewise.
7627 (lang_f_options): Remove `squangle'.
7628 (unsupported_options): Add `squangle'.
7629 (cxx_decode_option): Issue a warning about uses of
7630 -fname-mangling-version.
7631 (finish_file): Remove old ABI support.
7632 * pt.c (check_explicit_specialization): Likewise.
7633 (tsubst_decl): Likewise.
7634 * rtti.c (init_rtti_processing): Likewise.
7635 (build_headof): Likewise.
7636 (get_tinfo_decl_dynamic): Likewise.
7637 (tinfo_from_decl): Likewise.
7638 (build_dynamic_cast_1): Likewise.
7639 (synthesize_tinfo_var): Likewise.
7640 * init.c (build_new): Allow enumeration types for the array-bounds
7641 in a direct-new-declarator.
7642
7643 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
7644
7645 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
7646 TREE_PROTECTED from the template being specialized.
7647
7648 2001-02-17 Jason Merrill <jason@redhat.com>
7649
7650 * decl2.c (build_artificial_parm): Set TREE_READONLY.
7651
7652 * decl.c (bad_specifiers): Allow throw specs on things with
7653 pointer-to-function or -member-function type.
7654 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
7655 a pmf.
7656
7657 2001-02-17 Mark Mitchell <mark@codesourcery.com>
7658
7659 * call.c (check_dtor_name): Handle template names correctly.
7660
7661 2001-02-16 Jason Merrill <jason@redhat.com>
7662
7663 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
7664 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
7665 * optimize.c (maybe_clone_body): Don't substitute it.
7666 * call.c (build_new_method_call): Check in_chrg instead.
7667 * init.c (expand_virtual_init): Likewise.
7668
7669 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
7670
7671 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
7672 class-type introduces at least a type-name.
7673
7674 2001-02-16 Jakub Jelinek <jakub@redhat.com>
7675
7676 * call.c (convert_like_real): Create a temporary for non-lvalue.
7677
7678 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
7679
7680 * cp-tree.h: Fix typos in comments.
7681
7682 2001-02-16 Jason Merrill <jason@redhat.com>
7683
7684 * optimize.c (remap_block): If we're compiling a clone, pass the
7685 new block to insert_block.
7686
7687 2001-02-16 Mark Mitchell <mark@codesourcery.com>
7688
7689 * semantics.c (finish_asm_stmt): Robustify.
7690
7691 2001-02-15 Mark Mitchell <mark@codesourcery.com>
7692
7693 * pt.c (push_template_decl_real): Don't remangle the name of a
7694 class template.
7695
7696 2001-02-15 Jim Meyering <meyering@lucent.com>
7697
7698 * Make-lang.in (c++.install-common): Depend on installdirs.
7699 (c++.install-info): Likewise.
7700 (c++.install-man): Likewise.
7701
7702 2001-02-15 Mark Mitchell <mark@codesourcery.com>
7703
7704 * typeck2.c (build_m_component_ref): Robustify.
7705
7706 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
7707
7708 * friend.c (do_friend): Don't take the nested [template] class
7709 into account when deciding whether to warn about the friend
7710 function not referring to a template function.
7711
7712 2001-02-14 Jakub Jelinek <jakub@redhat.com>
7713
7714 * typeck.c (build_unary_op): Clarify error message.
7715
7716 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
7717
7718 * parse.y (component_constructor_declarator): allow optional
7719 parentheses around constructor class name.
7720
7721 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
7722
7723 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
7724 section.
7725 * init.c (emit_base_init): Remove incorrect comment about
7726 virtual bases.
7727 * method.c (make_thunk): Fix comment alignment.
7728
7729 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
7730
7731 Kill remnants of this is variable.
7732 * cp-tree.h (flag_this_is_variable): Remove.
7733 * decl2.c (flag_this_is_variable): Remove.
7734 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
7735 (build_vbase_path): The path is non-static, even in a cdtor.
7736 (resolves_to_fixed_type_p): Add additional return value.
7737 * search.c (init_vbase_pointers): Adjust.
7738 * tree.c (lvalue_p_1): Adjust.
7739 * typeck.c (mark_addressable): Adjust.
7740
7741 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
7742
7743 * pt.c (unify): Don't check cv quals of array types.
7744
7745 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
7746
7747 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
7748 check whether we already have the type.
7749
7750 2001-02-13 Mark Mitchell <mark@codesourcery.com>
7751
7752 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
7753 * call.c (build_op_delete_call): Simplify to remove duplicate
7754 code.
7755 * class.c (clone_function_decl): Don't build the deleting variant
7756 of a non-virtual destructor.
7757 * decl.c (finish_destructor_body): Don't call delete if this is a
7758 non-virtual destructor.
7759 * init.c (build_delete): Explicitly call `operator delete' when
7760 deleting an object with a non-virtual destructor.
7761
7762 2001-02-13 Jason Merrill <jason@redhat.com>
7763
7764 * lang-specs.h: Add more __EXCEPTIONS.
7765
7766 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
7767
7768 * typeck2.c (process_init_constructor): Check
7769 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
7770
7771 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
7772
7773 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
7774 Remove spurious information in comment. Allow further
7775 adjustments of REFERENCE_TYPE args.
7776
7777 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
7778
7779 * errfn.c (cp_deprecated): Tweak diagnostic text.
7780 * parse.y (new_initializer): Deprecate initializer lists
7781 extension.
7782
7783 2001-02-12 Mark Mitchell <mark@codesourcery.com>
7784
7785 Remove old ABI support.
7786
7787 2001-02-11 Mark Mitchell <mark@codesourcery.com>
7788
7789 * decl2.c (flag_vtable_thunks): Always set it to 1.
7790 (flag_new_abi): Likewise.
7791 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
7792
7793 * Makefile.in (g++spec.o): Fix typo.
7794
7795 2001-02-09 Jason Merrill <jason@redhat.com>
7796
7797 * lang-specs.h: Restore definition of __EXCEPTIONS.
7798
7799 2001-02-08 Jason Merrill <jason@redhat.com>
7800
7801 * search.c (shared_member_p): New function.
7802 (lookup_field_r): Use it.
7803 * cp-tree.h (SHARED_MEMBER_P): Remove.
7804
7805 * method.c (process_overload_item): Handle template-dependent array
7806 bounds.
7807 * pt.c (type_unification_real): If we end up with undeduced nontype
7808 parms, try again.
7809
7810 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
7811 types.
7812
7813 * typeck2.c (friendly_abort): Don't say anything if we have
7814 earlier errors or sorries.
7815
7816 * decl.c (check_tag_decl): Notice attempts to redefine bool and
7817 wchar_t. Ignore if in_system_header.
7818
7819 * decl.c (maybe_push_cleanup_level): New fn...
7820 (start_decl_1): ...split out from here.
7821 * cvt.c (build_up_reference): Use it.
7822 * cp-tree.h: Declare it.
7823
7824 2001-02-07 Mark Mitchell <mark@codesourcery.com>
7825
7826 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
7827 spec.
7828
7829 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
7830
7831 * pt.c (lookup_template_class): Make sure it's a primary
7832 template or template_template_parm when called from the parser.
7833 (instantiate_template_class): Add assertion.
7834
7835 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
7836
7837 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
7838 from error_mark_node.
7839
7840 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
7841
7842 Fix specification and implementation bugs in V3 ABI
7843 construction vtables.
7844 * cp-tree.h (flag_dump_class_layout): New flag.
7845 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
7846 (BINFO_LOST_PRIMARY_P): New flag.
7847 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
7848 (BINFO_PRIMARY_MARKED_P): Rename to ...
7849 (BINFO_PRIMARY_P): ... here.
7850 (binfo_via_virtual): New prototype.
7851 * decl2.c (flag_dump_class_layout): New flag.
7852 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
7853 use `=' as a file name separator.
7854 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
7855 bases.
7856 (build_vtbl_address): If this is a virtual primary base, then
7857 get the vtbl of what it is ultimately primary for.
7858 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
7859 for BINFO_PRIMARY_P.
7860 (dfs_skip_nonprimary_vbases_markedp): Likewise.
7861 (get_shared_vbase_if_not_primary): Likewise.
7862 (dfs_get_pure_virtuals): Likewise.
7863 (expand_upcast_fixups): Likewise.
7864 (fixup_virtual_upcast_offsets): Likewise.
7865 (dfs_find_vbase_instance): Likewise.
7866 (find_vbase_instance): Likewise.
7867 (binfo_from_vbase): Adjust comment to reflect reality.
7868 (binfo_via_virtual): New function.
7869 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
7870 for binfo walking during VTT construction.
7871 (dfs_mark_primary_bases): Remove.
7872 (force_canonical_binfo_r): New function.
7873 (force_canonical_binfo): New function.
7874 (mark_primary_virtual_base): New function.
7875 (mark_primary_bases): Walk in inheritance graph order, use
7876 mark_primary_virtual_base.
7877 (determine_primary_base): Use some more intermediate variables.
7878 (dfs_find_final_overrider): Don't check for overriding along a
7879 virtual path.
7880 (dfs_modify_vtables): Walk into primary virtual bases too.
7881 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
7882 (build_base_fields): Likewise.
7883 (dfs_set_offset_for_unshared_vbases): Likewise.
7884 (layout_virtual_bases): Likewise.
7885 (end_of_class): Likewise.
7886 (finish_struct_1): Call dump_class_hierarchy, if requested.
7887 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
7888 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
7889 (dump_class_hierarchy): Add file parameter. Append to file, if
7890 required.
7891 (finish_vtbls): Adjust accumulate_vtbl_inits call.
7892 Use canonical base for virtual bases.
7893 (build_vtt): Add more comments. Adjust build_vtt_inits call.
7894 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
7895 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
7896 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
7897 virtual VTTs.
7898 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
7899 from DATA. We want virtual primary bases and all bases via virtual.
7900 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
7901 virtual base when not a construction vtable.
7902 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
7903 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
7904 Use canonical bases when processing virtual bases.
7905 (accumulate_vtbl_inits): We're interested in any base via a
7906 virtual path.
7907 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
7908 within a construction vtable, determine what is being overridden.
7909 (build_vtbl_initializer): Add more comments
7910 (add_vcall_offset_vtbl_entries_1): Adjust comment.
7911 (build_rtti_vtbl_entries): Check if the base has lost its
7912 primary.
7913
7914 2001-02-05 Mark Mitchell <mark@codesourcery.com>
7915
7916 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
7917
7918 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7919
7920 * decl.c (pushdecl): Call abort instead of fatal.
7921 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
7922 * init.c (build_new_1): Likewise.
7923 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
7924 * decl.c (build_typename_type): hash_table_init now returns void.
7925 decl.c (init_decl_processing): Make an error non-fatal.
7926
7927 2001-02-04 Mark Mitchell <mark@codesourcery.com>
7928
7929 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
7930 Document.
7931 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
7932 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
7933 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
7934 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
7935 * decl.c (maybe_commonize_var): Use the new name-mangling where
7936 appropriate.
7937 * decl2.c (comdat_linkage): Enhance comments. Make all
7938 compiler-generated things static, if COMDAT is not available.
7939 (get_tinfo_decl): Do not make typeinfo objects that belong in the
7940 library COMDAT.
7941 (tinfo_base_init): Use the correct mangled name for typeinfo
7942 strings, and push them into the global scope.
7943 (typeinfo_in_lib_p): New function.
7944 (synthesize_tinfo_var): Use it.
7945 (create_real_tinfo_var): Likewise.
7946
7947 2001-02-03 Jakub Jelinek <jakub@redhat.com>
7948
7949 * decl.c (push_class_binding): Use context_for_name_lookup instead
7950 of CP_DECL_CONTEXT.
7951 * search.c (context_for_name_lookup): Remove static. Check for NULL
7952 context in the loop.
7953 * cp-tree.h (context_for_name_lookup): Add prototype.
7954
7955 2001-02-02 Jakub Jelinek <jakub@redhat.com>
7956
7957 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
7958 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
7959 Remove.
7960 * call.c (convert_class_to_reference, build_user_type_conversion_1,
7961 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
7962
7963 2001-02-02 Mark Mitchell <mark@codesourcery.com>
7964
7965 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
7966 of macros used when compiling g++spec.c.
7967 * g++spec.c (lang_specific_driver): Link with the shared
7968 libgcc by default.
7969
7970 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
7971
7972 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
7973 make_reference_declarator, make_call_declarator), method.c
7974 (implicitly_declare_fn), parse.y (namespace_using_decl,
7975 notype_unqualified_id, expr_or_declarator, new_type_id,
7976 after_type_declarator, direct_after_type_declarator,
7977 notype_declarator, complex_notype_declarator,
7978 complex_direct_notype_declarator, qualified_id,
7979 notype_qualified_id, overqualified_id, direct_new_declarator,
7980 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
7981 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
7982 instead of build_parse_node.
7983
7984 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7985
7986 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
7987 (minus_one_node): Moved to top level gcc directory. Renamed
7988 to integer_minus_one_node.
7989
7990 * init.c (init_init_processing): Don't set minus_one_node.
7991 (build_vec_init): Use integer_minus_one_node.
7992
7993 * rtti.c (get_tinfo_decl_dynamic): Likewise.
7994
7995 2001-01-28 Jakub Jelinek <jakub@redhat.com>
7996
7997 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
7998 identical and they would be replaced with constant, remove
7999 MODIFY_EXPR from the tree.
8000
8001 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8002
8003 * Make-lang.in: Remove all dependencies on defaults.h.
8004 * call.c: Don't include defaults.h.
8005 * decl.c: Likewise.
8006 * decl2.c: Likewise.
8007 * except.c: Likewise.
8008 * pt.c: Likewise.
8009 * rtti.c: Likewise.
8010 * tree.c: Likewise.
8011 * typeck.c: Likewise.
8012
8013 2001-01-25 Jakub Jelinek <jakub@redhat.com>
8014
8015 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
8016 operators even in "C" linkage.
8017 * method.c (set_mangled_name_for_decl): Likewise.
8018 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
8019 overloaded operators in "C" linkage.
8020
8021 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
8022
8023 * pt.c (tsubst_decl): Remove IN_DECL parameter.
8024 (tsubst_arg_types): Check parameter is not void.
8025 (tsubst): Adjust tsubst_decl call.
8026
8027 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
8028
8029 * call.c (add_builtin_candidate): Quote std properly, from
8030 previous change.
8031
8032 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8033
8034 * pt.c (check_explicit_specialization): Clone constructors and
8035 destructors.
8036
8037 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
8038
8039 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
8040 indicates anything special about template depth. Make sure we
8041 only count the user visible template classes.
8042
8043 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
8044
8045 * call.c (build_conv): Typo in comment.
8046 (add_builtin_candidate): Add more explanation.
8047 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
8048 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
8049 when we have enumeral types.
8050 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
8051 candidates for relops and eqops.
8052 (joust): Simplify control flow. Allow a non-template user
8053 function to hide a builtin.
8054
8055 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
8056
8057 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
8058 (more_specialized): Add deduction parameter.
8059 * call.c (joust): Adjust more_specialized call.
8060 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
8061 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
8062 (get_bindings_order): Remove.
8063 (get_bindings_real): Add DEDUCE parameter.
8064 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
8065 REFERENCE_TYPE jig for DEDUCE_ORDER.
8066 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
8067 maybe_adjust_types_for_deduction.
8068 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
8069 directly.
8070 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
8071 (check_cv_quals_for_unify): Use new unify qualifier flags.
8072 (unify): Clear new unify qualifier flags.
8073 (get_bindings_real): Add DEDUCE parameter.
8074 (get_bindings): Adjust call to get_bindings_real.
8075 (get_bindings_overload): Likewise.
8076 (most_specialized_instantiation): Adjust call to
8077 more_specialized.
8078
8079 2001-01-19 Jason Merrill <jason@redhat.com>
8080
8081 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
8082
8083 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
8084 -fnew-abi.
8085
8086 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
8087
8088 * decl2.c (arg_assoc_class): Fix double iteration logic.
8089
8090 2001-01-19 Jason Merrill <jason@redhat.com>
8091
8092 * init.c (build_delete): Always call convert_force to strip cv-quals.
8093
8094 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
8095 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
8096 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
8097
8098 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
8099
8100 * search.c (get_vbase_1): Count only virtual bases.
8101
8102 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
8103
8104 * class.c (duplicate_tag_error): Robustify flag clearing.
8105
8106 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
8107
8108 * cp-tree.h (lookup_template_class): Add complain parm.
8109 * decl.c (lookup_namespace_name): Adjust call to
8110 lookup_template_class.
8111 (make_typename_type): Likewise.
8112 * semantics.c (finish_template_type): Likewise.
8113 * pt.c (lookup_template_class): Add complain parm. Adjust.
8114 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
8115 (tsubst): Likewise.
8116
8117 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
8118
8119 * pt.c (copy_default_args_to_explicit_spec): Preserve
8120 object's CV quals. Reorganize.
8121
8122 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
8123
8124 * typeck.c (build_modify_expr): Say `initialization' for
8125 INIT_EXPRs.
8126 * init.c (build_default_init): Convert to enumeral type, if
8127 needed.
8128
8129 2001-01-18 Jakub Jelinek <jakub@redhat.com>
8130
8131 * parse.y (nomods_initdcl0): Properly set things up for
8132 initdcl0_innards.
8133
8134 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
8135
8136 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
8137 (type_unification_real): Set it.
8138 (unify): Use it.
8139
8140 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
8141
8142 * decl.c (finish_destructor_body): Convert to vbase pointer here.
8143
8144 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
8145
8146 * semantics.c (begin_class_definition): Check we're not inside a
8147 template parm list.
8148
8149 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
8150
8151 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
8152 BASELINK_P.
8153
8154 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8155
8156 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
8157 * call.c (build_over_call): Add comment.
8158
8159 2001-01-16 Daniel Berlin <dberlin@redhat.com>
8160
8161 * cvt.c (ocp_convert): Handle vector type conversion
8162 * typeck2.c (digest_init): Handle vector type initializations
8163
8164 2001-01-16 Phil Edwards <pme@sources.redhat.com>
8165
8166 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
8167 was given.
8168
8169 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
8170
8171 * pt.c (check_nontype_parm): Rename to ...
8172 (invalid_nontype_parm_type_p): ... here.
8173 (process_template_parm): Adjust.
8174 (convert_template_argument): Adjust.
8175
8176 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
8177
8178 * pt.c (check_nontype_parm): New function.
8179 (process_template_parm): Use it.
8180 (convert_template_argument): Use it.
8181 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
8182 member.
8183
8184 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
8185
8186 * tree.c: Add defaults.h
8187 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
8188 * Make-lang.in (cp/tree.o): Add defaults.h.
8189
8190 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
8191
8192 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
8193
8194 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
8195
8196 * g++.1: Change to be ".so man1/gcc.1".
8197
8198 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
8199
8200 * Make-lang.in (c++.info, c++.install-info): Build and install g++
8201 internals info.
8202 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
8203 ($(srcdir)/cp/g++int.info): New target.
8204 * gxxint.texi: Add info directory entry. Use @@ in email address.
8205 * .cvsignore: Update.
8206
8207 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
8208
8209 * typeck.c (build_c_cast): Do template processing earlier.
8210 Always pedwarn on array casts.
8211
8212 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
8213
8214 * friend.c (make_friend_class): Make sure a templated class is
8215 actually a template.
8216
8217 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
8218
8219 * decl2.c (get_guard): Set linkage from guarded decl.
8220
8221 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
8222
8223 * call.c (convert_default_arg): Check for unprocessed
8224 DEFAULT_ARG.
8225 * cp-tree.h (replace_defarg): Move to spew.c.
8226 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
8227 spew.c, which is where they really are.
8228 (done_pending_defargs): Declare.
8229 (unprocessed_defarg_fn): Declare.
8230 * decl.c (replace_defarg): Move to spew.c
8231 * parse.y (structsp): Call done_pending_defargs.
8232 * spew.c (defarg_fns): Rearrange list structure.
8233 (defarg_fnsdone): New static variable.
8234 (defarg_depfns): New static variable.
8235 (init_spew): Adjust.
8236 (add_defarg_fn): Store the type in TREE_TYPE.
8237 (do_pending_defargs): Detect and deal with ordering constraints
8238 and circularity.
8239 (done_pending_defargs): New function.
8240 (unprocessed_defarg_fn): New function.
8241 (replace_defarg): Moved from decl.c. Robustify. Don't save
8242 if circularity detected.
8243
8244 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
8245
8246 * pt.c (unify): Check array has a domain, before checking
8247 whether it is variable sized.
8248
8249 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
8250
8251 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
8252 parameters with pointers to arrays of unknown bound.
8253
8254 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
8255
8256 * parse.y (template_parm_header, template_spec_header): New
8257 reductions. Split out from ...
8258 (template_header): ... here. Use them.
8259 (template_template_parm): Use template_parm_header.
8260 * semantics.c (finish_template_template_parm): Add assert.
8261
8262 2001-01-10 Mark Mitchell <mark@codesourcery.com>
8263
8264 * mangle.c (write_builtin_type): Fix thinko.
8265
8266 * pt.c (copy_default_args_to_explicit_spec_1): New function.
8267 (copy_default_args_to_explicit_spec): Likewise.
8268 (check_explicit_specialization): Use it.
8269
8270 * class.c (finish_struct_1): Remove last argument in call to
8271 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
8272 * decl.c (builtin_function): Likewise.
8273 (build_cp_library_fn): Likewise.
8274 (check_initializer): Likewise.
8275 (make_rtl_for_nonlocal_decl): Likewise.
8276 (cp_finish_decl): Likewise.
8277 (start_function): Likewise.
8278 * decl2.c (finish_anon_union): Likewise.
8279 * friend.c (do_friend): Likewise.
8280 * init.c (build_java_class_ref): Likewise.
8281 * method.c (make_thunk): Likewise.
8282 * pt.c (tsubst_friend_function): Likewise.
8283 * semantics.c (expand_body): Likewise.
8284
8285 2001-01-10 Mark Mitchell <mark@codesourcery.com>
8286
8287 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
8288 looking at DECL_CLONED_FUNCTION for non-functions.
8289
8290 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
8291
8292 * error.c (dump_template_parameter): Use parm to determine how
8293 to print default value.
8294
8295 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
8296
8297 * class.c (duplicate_tag_error): Clear more flags.
8298
8299 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
8300
8301 * call.c (build_new_method_call): Use binfo_for_vbase.
8302
8303 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
8304
8305 * cp-tree.h (flag_cond_mismatch): Don't declare.
8306 * decl2.c (flag_cond_mismatch): Don't define.
8307 (lang_f_options): Remove cond-mismatch.
8308 (unsupported_options): Add cond-mismatch.
8309
8310 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
8311
8312 * class.c (handle_using_decl): Reject using of constructor name
8313 of sourcing class. Allow injecting of a method with same name as
8314 nested class. Fixup error messages.
8315
8316 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
8317
8318 * decl2.c (lang_decode_option): Handle -Wformat=2.
8319
8320 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
8321
8322 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
8323 initialized_in_class.
8324 (DECL_DEFINED_IN_CLASS_P): Rename to ...
8325 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
8326 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
8327 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
8328 * pt.c (check_default_tmpl_args): Adjust for
8329 DECL_INITIALIZED_IN_CLASS_P.
8330 (instantiate_class_template): Likewise.
8331 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
8332
8333 * class.c (finish_struct): Constify saved_filename.
8334
8335 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
8336
8337 * class.c (duplicate_tag_error): Adjust diagnostic.
8338 (finish_struct): Locally set location to start of struct.
8339 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
8340
8341 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
8342
8343 * decl.c (struct binding_level): Adjust class_shadowed comments
8344 to reflect reality.
8345 (push_class_level_binding): Adjust comments to reflect reality.
8346 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
8347 Don't set TREE_VALUE on the class_shadowed list.
8348
8349 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8350
8351 * decl2.c (acceptable_java_type): Allow references too.
8352 * init.c (build_java_class_ref): When using the new ABI, search
8353 `class$' and have it mangled with `mangle_decl.'
8354 * mangle.c (write_java_integer_type_codes): New function.
8355 (write_builtin_type): Detect and mangle Java integer and real
8356 types.
8357
8358 2001-01-07 Mark Mitchell <mark@codesourcery.com>
8359
8360 * decl2.c (grokfield): Don't accept `asm' specifiers for
8361 non-static data members.
8362
8363 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8364
8365 * expr.c (cplus_expand_expr): Don't reset `target'.
8366
8367 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
8368
8369 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
8370
8371 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
8372
8373 * parse.y (template_datadef): Check for error_mark_node.
8374
8375 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
8376
8377 * cp-tree.def (DEFAULT_ARG): Make `x' class.
8378
8379 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
8380
8381 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
8382 (record_builtin_type): Make non-static.
8383 (flag_short_double): Don't declare.
8384 (init_decl_processing): Remove the creation of many tree nodes now
8385 in c_common_nodes_and_builtins.
8386 (build_void_list_node): New function.
8387 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
8388 * cp-tree.h (flag_short_wchar): Don't declare.
8389
8390 2001-01-04 Mark Mitchell <mark@codesourcery.com>
8391
8392 * call.c (build_conv): Don't use build1 for USER_CONV.
8393 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
8394
8395 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
8396
8397 * lex.c (lang_init): Call c_common_lang_init.
8398
8399 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
8400
8401 * search.c (lookup_fnfields_here): Remove.
8402 (look_for_overrides_r): Use lookup_fnfields_1.
8403 Ignore functions from using declarations.
8404
8405 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
8406
8407 Implement exceptions specifiers for implicit member functions.
8408 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
8409 * method.c (synthesize_exception_spec): New function.
8410 (locate_dtor, locate_ctor, locate_copy): New functions.
8411 (implicitly_declare_fn): Generate the exception spec too.
8412 * search.c (check_final_overrider): Check artificial functions
8413 too.
8414 * typeck2.c (merge_exception_specifiers): New function.
8415
8416 2001-01-03 Jason Merrill <jason@redhat.com>
8417
8418 * init.c (build_default_init): New fn.
8419 (perform_member_init): Split out from here.
8420 (build_new_1): Use it. Simplify initialization logic.
8421 (build_vec_init): Take an array, rather than a pointer and maxindex.
8422 Speed up simple initializations. Don't clean up if we're assigning.
8423 * cp-tree.h: Adjust.
8424 * decl2.c (do_static_initialization): Remove TREE_VEC case.
8425 * parse.y (new_initializer): Return void_zero_node for ().
8426 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
8427 * typeck2.c (digest_init): Only complain about user-written
8428 CONSTRUCTORs.
8429
8430 2000-12-22 Mike Stump <mrs@wrs.com>
8431
8432 * decl2.c: (max_tinst_depth): Increase to 50.
8433
8434 2001-01-02 Mark Mitchell <mark@codesourcery.com>
8435
8436 * class.c (invalidate_class_lookup_cache): Zero the
8437 previous_class_values.
8438 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
8439 TREE_INT_CST_HIGH.
8440 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
8441 * decl.c (free_bindings): New variable.
8442 (push_binding): Don't create a new binding if we have one on the
8443 free list.
8444 (pop_binding): Put old bindings on the free list.
8445 (init_decl_processing): Use size_int, not build_int_2.
8446 Register free_bindings as a GC root.
8447 (cp_make_fname_decl): Use size_int, not build_int_2.
8448 (push_inline_template_parms_recursive): Likewise.
8449 (end_template_parm_list): Likewise.
8450 (for_each_template_parm): Do not use walk_tree_without_duplicates.
8451 (tsubst_template_parms): Use size_int, not build_int_2.
8452 (tsubst): Likewise.
8453 * rtti.c (get_vmi_pseudo_type_info): Likewise.
8454
8455 2001-01-02 Richard Henderson <rth@redhat.com>
8456
8457 * parse.y (asm): Set ASM_INPUT_P.
8458
8459 2001-01-02 Jason Merrill <jason@redhat.com>
8460
8461 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
8462 for v3 ABI.
8463
8464 * typeck.c (cp_truthvalue_conversion): New fn.
8465 * cvt.c (ocp_convert): Use it.
8466
8467 * cp-tree.h: Lose c-common.c decls.
8468
8469 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
8470 * cvt.c (convert_to_void): Use type_unknown_p.
8471
8472 * typeck.c (strip_all_pointer_quals): Also strip quals from
8473 pointer-to-member types.
8474
8475 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
8476 parse.y as C.
8477
8478 * call.c (build_new_method_call): Do evaluate the object parameter
8479 when accessing a static member.
8480 * typeck.c (build_component_ref): Likewise.
8481
8482 2001-01-02 Andreas Jaeger <aj@suse.de>
8483
8484 * decl.c (cp_missing_noreturn_ok_p): New.
8485 (init_decl_processing): Set lang_missing_noreturn_ok_p.
8486
8487 2000-12-29 Jakub Jelinek <jakub@redhat.com>
8488
8489 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
8490
8491 2000-12-29 Mark Mitchell <mark@codesourcery.com>
8492
8493 * class.c (pushclass): Remove #if 0'd code.
8494 * cp-tree.h (overload_template_name): Remove.
8495 * decl.c (store_bindings): Simplify.
8496 (pop_from_top_level): Likewise.
8497 * pt.c (overload_template_name): Remove.
8498 (instantiate_decl): Don't call push_to_top_level if it's not
8499 needed.
8500
8501 2000-12-28 Mark Mitchell <mark@codesourcery.com>
8502
8503 * pt.c (register_local_specialization): Don't return a value.
8504 (lookup_template_class): Use move-to-front heuristic when looking
8505 up template instantiations.
8506 (instantiate_decl): Only push_to_top_level when we're actually
8507 going to instantiate the template.
8508
8509 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
8510
8511 * search.c (binfo_for_vtable): Return least derived class, not
8512 most. Handle secondary vtables.
8513
8514 2000-12-22 Jason Merrill <jason@redhat.com>
8515
8516 * pt.c (more_specialized): Don't optimize len==0.
8517 (fn_type_unification): If we're adding the return type, increase len.
8518
8519 * typeck.c (build_binary_op): Fix pmf comparison logic.
8520
8521 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
8522 DECL_STATIC_FUNCTION_P.
8523
8524 * semantics.c (genrtl_finish_function): Don't try to jump to
8525 return_label unless it exists.
8526
8527 In partial ordering for a call, ignore parms for which we don't have
8528 a real argument.
8529 * call.c (joust): Pass len to more_specialized.
8530 (add_template_candidate_real): Strip 'this', pass len.
8531 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
8532 (get_bindings_order): New fn. Pass len down.
8533 (get_bindings_real): Strip 'this', pass len.
8534 (fn_type_unification): Likewise.
8535 (type_unification_real): Succeed after checking 'len' args.
8536 (most_specialized_instantiation): Lose explicit_args parm.
8537 * class.c (resolve_address_of_overloaded_function): Strip 'this',
8538 pass len.
8539
8540 2000-12-21 Jason Merrill <jason@redhat.com>
8541
8542 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
8543 DECL_TEMPLATE_RESULT.
8544
8545 * search.c (lookup_field_r): Call lookup_fnfields_1, not
8546 lookup_fnfields_here.
8547
8548 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
8549
8550 * call.c (build_object_call): Also allow conversions that return
8551 reference to pointer to function.
8552 (add_conv_candidate): Handle totype being ref to ptr to fn.
8553 (build_field_call): Also allow members of type reference to function.
8554 Lose support for calling pointer to METHOD_TYPE fields.
8555
8556 * error.c (dump_expr): Handle *_CAST_EXPR.
8557
8558 * typeck2.c (build_scoped_ref): Always convert to the naming class.
8559
8560 * tree.c (break_out_cleanups): Lose.
8561 * cp-tree.h: Remove prototype.
8562 * typeck.c (build_component_ref): Don't break_out_cleanups.
8563 (build_compound_expr): Likewise.
8564 * semantics.c (finish_expr_stmt): Likewise.
8565
8566 2000-12-20 Richard Henderson <rth@redhat.com>
8567
8568 * cp-tree.h: Update declarations.
8569 * decl.c (finish_case_label): Return the new stmt node.
8570 * semantics.c (finish_goto_stmt): Likewise.
8571 (finish_expr_stmt, finish_return_stmt): Likewise.
8572 (finish_break_stmt, finish_continue_stmt): Likewise.
8573 (finish_asm_stmt): Likewise.
8574 * parse.y (already_scoped_stmt): Set STMT_LINENO.
8575 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
8576 (simple_if, simple_stmt): Return the new stmt node.
8577 (save_lineno): New.
8578
8579 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
8580
8581 * cp-tree.h: Don't declare warn_long_long.
8582
8583 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8584
8585 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
8586 IS_AGGR_TYPE.
8587
8588 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8589
8590 * pt.c (unify): Handle when both ARG and PARM are
8591 BOUND_TEMPLATE_TEMPLATE_PARM.
8592
8593 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8594
8595 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
8596 DECL_TEMPLATE_PARM_P.
8597
8598 2000-12-15 Jason Merrill <jason@redhat.com>
8599
8600 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
8601
8602 * init.c (build_new_1): Don't strip quals from type.
8603
8604 * decl.c (pushdecl): Don't check for linkage on a non-decl.
8605
8606 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
8607
8608 * call.c (build_new_function_call): Lose space before paren in
8609 error message.
8610 (build_new_method_call): Likewise.
8611
8612 * typeck2.c (build_m_component_ref): Propagate quals from datum.
8613
8614 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8615
8616 * pt.c (check_explicit_specialization): Propagate default
8617 function arguments to explicit specializations.
8618
8619 2000-12-13 DJ Delorie <dj@redhat.com>
8620
8621 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
8622 and <? operators.
8623
8624 2000-12-08 Jason Merrill <jason@redhat.com>
8625
8626 * error.c (dump_function_name): Don't let the user see __comp_ctor.
8627
8628 Clean up copy-initialization in overloading code.
8629 * call.c (build_user_type_conversion_1): Die if we are asked to
8630 convert to the same or a base type.
8631 (implicit_conversion): Avoid doing so. Lose reference binding code.
8632 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
8633 direct-initialization. Also do direct-init part of copy-init.
8634 (build_user_type_conversion): Don't provide context to convert_like.
8635 * cvt.c (ocp_convert): build_user_type_conversion will now provide
8636 the constructor call for copy-init.
8637
8638 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
8639 instantiation of a member template.
8640 (do_decl_instantiation): Not here.
8641
8642 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
8643
8644 * class.c (check_field_decls): Don't special case anonymous
8645 fields in error messages.
8646 (note_name_declared_in_class): Use %D on diagnostic.
8647
8648 * tree.c (pod_type_p): Use strip_array_types.
8649 (cp_valid_lang_attribute): Likewise.
8650 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
8651 multiple evaluations.
8652 (cp_has_mutable_p): Use strip_array_types.
8653
8654 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
8655
8656 * cp-tree.h (sufficient_parms_p): Declare new function.
8657 * call.c (sufficient_parms_p): New function, broken out of ...
8658 (add_function_candidate): ... here. Use it.
8659 (add_conv_candidate): Use it.
8660 * decl.c (grok_ctor_properties): Use it.
8661
8662 2000-12-07 Jakub Jelinek <jakub@redhat.com>
8663
8664 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
8665
8666 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
8667
8668 * decl2.c (lang_decode_option): Handle -Wformat-security.
8669
8670 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8671
8672 * pt.c (verify_class_unification): New function.
8673 (get_class_bindings): Use it.
8674 (try_class_unification): Tidy.
8675 (unify): Handle when argument of a template-id is not
8676 template parameter dependent.
8677 (template_args_equal): Handle when TREE_CODE's do not match.
8678
8679 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
8680
8681 * lang-specs.h (c++): When invoking the stand-alone preprocessor
8682 for -save-temps, pass all relevant -Defines to it, and then don't
8683 pass them to cc1plus.
8684
8685 2000-12-05 Will Cohen <wcohen@redhat.com>
8686
8687 * decl.c (finish_case_label): Cleared
8688 more_cleanups_ok in surrounding function scopes.
8689 (define_label): Likewise.
8690
8691 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
8692
8693 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
8694 (get_matching_virtual): Remove.
8695 (look_for_overrides): Declare new function.
8696 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
8697 DECL_VINDEX here.
8698 * class.c (check_for_override): Move base class iteration code
8699 to look_for_overrides.
8700 * search.c (next_baselink): Remove.
8701 (get_virtuals_named_this): Remove.
8702 (get_virtual_destructor): Remove.
8703 (tree_has_any_destructors_p): Remove.
8704 (struct gvnt_info): Remove.
8705 (check_final_overrider): Remove `virtual' from error messages.
8706 (get_matching_virtuals): Remove. Move functionality to ...
8707 (look_for_overrides): ... here, and ...
8708 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
8709 to be overriding.
8710
8711 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
8712
8713 * typeck.c (get_delta_difference): If via a virtual base,
8714 return zero.
8715 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
8716 adjustment.
8717
8718 2000-12-04 Richard Henderson <rth@redhat.com>
8719
8720 * error.c (dump_tree): Use output_add_string not OB_PUTS.
8721
8722 2000-12-04 Jason Merrill <jason@redhat.com>
8723
8724 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
8725 (write_builtin_type): Pass intSI_type_node and the like through
8726 type_for_mode.
8727 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
8728 Pass intSI_type_node and the like through type_for_mode.
8729 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
8730 * pt.c (tsubst, unify): Likewise.
8731 * tree.c (walk_tree): Likewise.
8732 * error.c (dump_type): Likewise.
8733 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
8734
8735 * Make-lang.in: Tweak top comment for emacs.
8736 (cp/TAGS): Restore.
8737
8738 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
8739
8740 * class.c (clone_function_decl): Robustify.
8741
8742 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
8743
8744 * decl.c (store_bindings): Only search in the non modified
8745 old_bindings for duplicates.
8746
8747 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
8748
8749 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
8750 TYPE_POLYMORPHIC_P.
8751
8752 * typeck.c (build_static_cast): Remove unused variable.
8753
8754 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8755
8756 * pt.c: Fix typo in comment.
8757
8758 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
8759
8760 * decl2.c (warn_format): Remove definition.
8761 (lang_decode_option): Handle -Wformat-nonliteral,
8762 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
8763
8764 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
8765
8766 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
8767 (init_decl_processing): Don't create string_type_node,
8768 const_string_type_node, wint_type_node, intmax_type_node,
8769 uintmax_type_node, default_function_type, ptrdiff_type_node and
8770 unsigned_ptrdiff_type_node. Adjust position of call to
8771 c_common_nodes_and_builtins.
8772 (identifier_global_value): New function.
8773
8774 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
8775
8776 * call.c (standard_conversion): Reject pointer to member
8777 conversions from ambiguous, inaccessible or virtual bases.
8778 * typeck.c (build_static_cast): Don't check pointers to members
8779 specially.
8780
8781 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
8782
8783 * method.c (do_build_copy_constructor): Preserve cv
8784 qualifications when accessing source object members.
8785 (do_build_assign_ref): Likewise. Remove separate diagnostics for
8786 unnamed fields.
8787
8788 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
8789
8790 * method.c (do_build_assign_ref): Construct appropriately
8791 CV-qualified base reference. Don't allow const casts in base
8792 conversion.
8793
8794 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
8795
8796 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
8797 incomplete return type.
8798
8799 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
8800
8801 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
8802 * semantics.c (finish_base_specifier): Accept a _TYPE not a
8803 _DECL.
8804
8805 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
8806
8807 * spew.c (yyerror): Cope if yylval.ttype is NULL.
8808
8809 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
8810
8811 * decl.c (grokdeclarator): Diagnose undefined template contexts.
8812
8813 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
8814
8815 * decl.c (grokdeclarator): Do type access control on friend
8816 class.
8817
8818 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
8819
8820 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
8821 bison parser ickiness.
8822 * pt.c (tsubst_friend_function): Enter namespace scope when
8823 tsubsting the function name.
8824 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
8825
8826 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
8827
8828 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
8829 * cvt.c (cp_convert_to_pointer): Add force parameter.
8830 Allow conversions via virtual base if forced.
8831 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
8832 (ocp_convert): Likewise.
8833 * search.c (binfo_from_vbase): Return the virtual base's binfo.
8834 * typeck.c (get_delta_difference): Adjust handling of virtual
8835 bases.
8836
8837 2000-11-26 Mark Mitchell <mark@codesourcery.com>
8838
8839 * tree.c (struct list_hash): Remove.
8840 (list_hash_table): Make it be an htab.
8841 (struct list_proxy): New type.
8842 (list_hash_eq): New function.
8843 (list_hash_pieces): Renamed from ...
8844 (list_hash): ... this.
8845 (list_hash_lookup): Remove.
8846 (list_hash_add): Remove.
8847 (hash_tree_cons): Use the generic hashtable.
8848 (mark_list_hash): Remove.
8849 (init_tree): Create the hashtable.
8850
8851 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
8852
8853 * method.c (build_mangled_C9x_name): Rename to
8854 build_mangled_C99_name. Change C9X references in comments to
8855 refer to C99.
8856
8857 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
8858
8859 * parse.y (unary_expr): Move VA_ARG from here ...
8860 (primary): ... to here.
8861
8862 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
8863
8864 * semantics.c (finish_id_expr): If type is error_mark, return
8865 error_mark.
8866
8867 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
8868
8869 * pt.c (lookup_template_class): Simplify loop exit constructs.
8870 Cope when there is no partial instantiation of a template
8871 template member.
8872
8873 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
8874
8875 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
8876
8877 2000-11-22 Mark Mitchell <mark@codesourcery.com>
8878
8879 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
8880 prefix.
8881
8882 * pt.c (do_decl_instantiate): Explicitly clone constructors and
8883 destructors that haven't already been cloned.
8884
8885 2000-11-20 Richard Henderson <rth@redhat.com>
8886
8887 * parse.y (yyparse_1): Rename the parser entry point.
8888
8889 2000-11-20 Alex Samuel <samuel@codesourcery.com>
8890
8891 * mangle.c (write_name): Use <unscoped-name> for names directly in
8892 function scope.
8893 (write_unscoped_name): Accept names directly in function scope.
8894
8895 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
8896
8897 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
8898 * parse.y (extdef): Add EXPORT reduction.
8899 * spew.c (yylex): Don't skip export here.
8900
8901 2000-11-19 Mark Mitchell <mark@codesourcery.com>
8902
8903 * decl.c (init_decl_processing): Correct name of pure virtual
8904 function under the new ABI.
8905 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
8906 (throw_bad_typeid): Likewise for bad typeid function.
8907
8908 2000-11-18 Mark Mitchell <mark@codesourcery.com>
8909
8910 * decl.c (grokparms): Don't even function types of `void' type,
8911 either.
8912 * mangle.c (write_type): Don't crash when confronted with the
8913 error_mark_node.
8914
8915 * decl.c (grokparms): Don't create parameters of `void' type.
8916
8917 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
8918
8919 * lex.c (mark_impl_file_chain): Delete.
8920 (init_parse): Remove call to ggc_add_string_root. No need to
8921 ggc_strdup a string constant. Do not add impl_file_chain to GC
8922 roots.
8923 (handle_pragma_implementation): No need to ggc_strdup main_filename.
8924
8925 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
8926
8927 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
8928
8929 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
8930
8931 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
8932 * decl.c (grokdeclarator): Don't reject void parms here.
8933 (require_complete_types_for_parms): Simplify, use
8934 complete_type_or_else.
8935 (grokparms): Remove bitrot. Remove funcdef parm.
8936 Deal with ellipsis parm lists here.
8937 * semantics.c (finish_parmlist): Don't append void_list_node
8938 here. Set PARMLIST_ELLIPSIS_P.
8939
8940 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
8941
8942 * typeck2.c (incomplete_type_error): Reorganize to avoid
8943 excessive diagnostics.
8944
8945 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
8946
8947 * lex.c (struct impl_files, internal_filename): Constify a char *.
8948
8949 2000-11-16 Mark Mitchell <mark@codesourcery.com>
8950
8951 * mangle.c (write_special_name_constructor): Don't generate
8952 assembler junk when confronted with an old-style constructor.
8953 (write_special_name_destructor): Likewise.
8954 (mangle_decl_string): Do it here instead.
8955
8956 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
8957
8958 * call.c (op_error): Make error messages clearer.
8959
8960 2000-11-15 Mark Mitchell <mark@codesourcery.com>
8961
8962 * decl.c (wrapup_globals_for_namespace): Don't mark things
8963 TREE_ASM_WRITTEN when they're not.
8964
8965 2000-11-15 Jason Merrill <jason@redhat.com>
8966
8967 * typeck2.c (friendly_abort): Uncount the error before handing
8968 off to fancy_abort.
8969
8970 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
8971
8972 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
8973
8974 2000-11-14 Mark Mitchell <mark@codesourcery.com>
8975
8976 * class.c (build_vtbl_initializer): Fix typo in comment.
8977 * typeck.c (expr_sizeof): Don't crash on errors.
8978
8979 2000-11-14 Jim Wilson <wilson@redhat.com>
8980
8981 * lang-specs.h: Add %2 after %(cc1_options).
8982
8983 2000-11-14 Richard Henderson <rth@redhat.com>
8984
8985 * typeck.c (c_sizeof): Be strict about casting result value
8986 back to c_size_type_node.
8987 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
8988
8989 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
8990
8991 * typeck.c (build_unary_op): Use boolean_increment from
8992 c-common.c, moving the relevant code there.
8993
8994 2000-11-11 Jason Merrill <jason@redhat.com>
8995
8996 * typeck.c (mark_addressable): Don't call put_var_into_stack.
8997
8998 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
8999 in inlines.
9000
9001 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9002
9003 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
9004 * lex.c (copy_lang_decl): Likewise.
9005
9006 2000-11-09 Mark Mitchell <mark@codesourcery.com>
9007
9008 * dump.c (cp_dump_tree): Don't dump function bodies here.
9009
9010 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
9011 (dump.o): Update dependency list.
9012 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
9013 (flag_dump_translation_unit): Likewise.
9014 (CP_TYPE_QUALS): Adjust definition.
9015 (DECL_C_BIT_FIELD): Remove.
9016 (SET_DECL_C_BIT_FIELD): Likewise.
9017 (CLEAR_DECL_C_BIT_FIELD): Likewise.
9018 (add_maybe_template): Likewise.
9019 (strip_array_types): Likewise.
9020 (dump_node_to_file): Likewise.
9021 (cp_dump_tree): New function.
9022 * decl.c (init_decl_processing): Set lang_dump_tree.
9023 * decl2.c (flag_dump_translation_unit): Remove.
9024 * dump.c: Move most of it to ../c-dump.c.
9025 (cp_dump_tree): New function.
9026 * pt.c (add_maybe_template): Remove.
9027 * typeck.c (strip_array_types): Likewise.
9028
9029 2000-11-07 Eric Christopher <echristo@redhat.com>
9030
9031 * decl.c (init_decl_processing): Change definition of
9032 __wchar_t to wchar_t. Remove artificial declaration of
9033 wchar_t.
9034 * lex.c: Change instances of __wchar_t to wchar_t.
9035
9036 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
9037
9038 * lex.c (do_identifier): Don't lookup_name for operators.
9039 * parse.y (operator): Save looking_for_typename.
9040 (unoperator): Restore it.
9041 * spew.c (frob_opname): Use nth_token for lookahead.
9042
9043 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
9044
9045 * decl.c (grok_op_properties): Always use coerce_new_type and
9046 coerce_delete_type.
9047 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
9048 exception specification. Tidy up.
9049 (coerce_delete_type): Preserve exception specification. Tidy up.
9050
9051 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
9052
9053 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
9054 (push_binding_level), error.c (cp_tree_printer), pt.c
9055 (process_partial_specialization, tsubst_template_arg_vector),
9056 search.c (lookup_member): Use memset () instead of bzero ().
9057
9058 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
9059
9060 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
9061
9062 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
9063
9064 * Make-lang.in (c++.distdir): Remove.
9065
9066 2000-11-04 Mark Mitchell <mark@codesourcery.com>
9067
9068 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
9069 declarations from different namespaces to be combined.
9070
9071 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
9072
9073 * decl.c: Include tm_p.h.
9074
9075 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
9076
9077 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
9078
9079 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
9080
9081 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
9082 (build_overload_value), repo.c (open_repo_file), xref.c
9083 (open_xref_file): Use strchr () and strrchr () instead of index ()
9084 and rindex ().
9085
9086 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
9087
9088 * call.c (build_over_call): Call fold on the CALL_EXPR.
9089
9090 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
9091
9092 * error.c (dump_template_decl): Separate template hearders with
9093 space not comma.
9094
9095 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
9096
9097 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
9098 TS_* flags with corresponding TFF_*. Adjust prototypes of
9099 functions (which used to take a tree_string_flags) to take an int.
9100
9101 * cp-tree.h (enum tree_string_flags): Remove
9102 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
9103 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
9104 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
9105 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
9106 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
9107 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
9108 (type_as_string, decl_as_string, expr_as_string,
9109 context_as_string): Adjust prototype.
9110
9111 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
9112 instead of TS_PLAIN.
9113
9114 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
9115 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
9116 plain `0'.
9117
9118 2000-10-30 Mark Mitchell <mark@codesourcery.com>
9119
9120 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
9121 (linkage_kind): New enumeration.
9122 (decl_linkage): New function.
9123 * decl2.c (comdat_linkage): Extend comment.
9124 * error.c (dump_function_decl): Print the arguments used to
9125 instantiate a template, even when not printing the type of the
9126 function.
9127 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
9128 not TREE_PUBLIC, to test for external linkage.
9129 * tree.c (decl_linkage): New function.
9130
9131 2000-10-28 Mark Mitchell <mark@codesourcery.com>
9132
9133 * pt.c (instantiate_decl): Always instantiate static data members
9134 initialized in-class.
9135
9136 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
9137
9138 * Make-lang.in: Move all build rules here from Makefile.in,
9139 adapt to new context. Wrap all rules that change the current
9140 directory in parentheses. Expunge all references to $(P).
9141 When one command depends on another and they're run all at
9142 once, use && to separate them, not ;. Add OUTPUT_OPTION to
9143 all object-file generation rules. Delete obsolete variables.
9144
9145 * Makefile.in: Delete.
9146 * config-lang.in: Delete outputs= line.
9147
9148 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
9149
9150 * error.c (dump_function_decl): Print no space between
9151 `ptr-operator' the `type-specifier' of the return type.
9152 (dump_type_prefix): Make sure we put space at the appropriate
9153 place.
9154
9155 2000-10-23 Jason Merrill <jason@redhat.com>
9156
9157 * call.c (equal_functions): Also call decls_match for extern "C" fns.
9158
9159 2000-10-22 Jason Merrill <jason@redhat.com>
9160
9161 * call.c (build_conditional_expr): Use ocp_convert to force
9162 rvalue conversion.
9163
9164 2000-10-22 Mark Mitchell <mark@codesourcery.com>
9165
9166 * call.c (standard_conversion): Use RVALUE_CONVs for all
9167 expressions that satisfy lvalue_p, not just those that satisfy
9168 real_lvalue_p.
9169
9170 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
9171
9172 * typeck.c (c_sizeof): Return an expression of `size_t' type,
9173 not one with TYPE_IS_SIZETYPE set.
9174 (dubious_conversion_warnings): Remove special-case code.
9175
9176 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
9177
9178 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
9179 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
9180 (dump_type_prefix): Print vector-of-int as 'int vector'.
9181 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
9182 * tree.c (walk_tree): Handle VECTOR_TYPE.
9183
9184 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
9185
9186 2000-10-21 Jason Merrill <jason@redhat.com>
9187
9188 * parse.y (operator): Set got_object from got_scope.
9189 Set looking_for_typename.
9190 * decl.c (lookup_name_real): Clear val after setting from_obj.
9191 Reorganize diagnostic.
9192
9193 2000-10-20 Jason Merrill <jason@redhat.com>
9194
9195 * tree.c (walk_tree): Don't walk into default args.
9196
9197 * error.c (dump_expr): Use host_integerp.
9198
9199 2000-10-20 David Edelsohn <edelsohn@gnu.org>
9200
9201 * typeck2.c (abstract_virtuals_error): Use "because" instead of
9202 "since" in error message.
9203
9204 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9205
9206 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
9207
9208 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
9209
9210 * decl.c (revert_static_member_fn): Fixed typo.
9211
9212 2000-10-19 Mark Mitchell <mark@codesourcery.com>
9213
9214 * class.c (subobject_offset_fn): New type.
9215 (dfs_record_base_offsets): Remove.
9216 (record_base_offsets): Likewise.
9217 (dfs_search_base_offsets): Likewise.
9218 (record_subobject_offset): New function.
9219 (check_subobject_offset): Likewise.
9220 (walk_subobject_offsets): Likewise.
9221 (record_subobject_offsets): Likewise.
9222 (layout_conflict_p): Reimplement.
9223 (layout_nonempty_base_or_field): Correct handling of type
9224 conflicts during layout.
9225 (layout_empty_base): Likewise.
9226 (build_base_field): Adjust to handle new representation of empty
9227 base offset table.
9228 (build_base_fields): Likewise.
9229 (layout_virtual_bases): Likewise.
9230 (splay_tree_compare_integer_csts): New function.
9231 (layout_class_type): Use a splay_tree, rather than a varray, to
9232 represent the offsets of empty bases.
9233
9234 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
9235 * decl.c (select_decl): Don't return declarations that are
9236 DECL_ANTICIPATED.
9237
9238 2000-10-18 Mark Mitchell <mark@codesourcery.com>
9239
9240 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
9241 (fake_std_node): New macro.
9242 * decl.c (in_std): Rename to ...
9243 (in_fake_std): ... this.
9244 (flag_no_builtin): Remove.
9245 (flag_no_nonansi_builtin): Likewise.
9246 (walk_namespaces_r): Use fake_std_node.
9247 (push_namespace): Use std_identifier.
9248 (pop_namespace): Use in_fake_std.
9249 (lookup_name_real): Use fake_std_node.
9250 (init_decl_processing): When -fhonor-std, create the `std'
9251 namespace. Don't create a dummy fake_std_node in that case.
9252 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
9253 (builtin_function): Put builtins whose names don't begin
9254 with `_' in the std namespace.
9255 * decl2.c (flag_no_builtin): Remove.
9256 (flag_no_nonansi_builtin): Likewise.
9257 (set_decl_namespace): Use fake_std_node.
9258 (validate_nonmember_using_decl): Likewise.
9259 (do_using_directive): Likewise.
9260 (handle_class_head): Likewise.
9261 * dump.c (dequeue_and_dump): Likewise.
9262 * except.c (init_exception_processing): Use std_identifier.
9263 * init.c (build_member_call): Use fake_std_node.
9264 * rtti.c (init_rtti_processing): Use std_identifier.
9265
9266 2000-10-17 Mark Mitchell <mark@codesourcery.com>
9267
9268 * cp-tree.h (back_end_hook): Remove declaration.
9269 * decl2.c (back_end_hook): Remove definition.
9270
9271 * dump.c (dequeue_and_dump): Dump TREE_USED.
9272
9273 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
9274
9275 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
9276
9277 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
9278
9279 * decl.c (WINT_TYPE): Define.
9280 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
9281 c_size_type_node, signed_size_type_node and wint_type_node.
9282
9283 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
9284
9285 * decl2.c (warn_missing_format_attribute): New variable.
9286 (lang_decode_option): Decode -Wmissing-format-attribute.
9287
9288 2000-10-16 Mark Mitchell <mark@codesourcery.com>
9289
9290 * typeck.c (qualify_type): Remove.
9291 (composite_pointer_type): Fix handling of conversions to `cv void*'.
9292
9293 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9294
9295 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
9296
9297 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9298
9299 * Makefile.in (parse.c, parse.h): Create atomically.
9300
9301 2000-10-12 Mark Mitchell <mark@codesourcery.com>
9302
9303 * class.c (current_obstack): Remove.
9304 * decl.c (ggc_p): Remove.
9305 (start_decl): Don't use decl_tree_cons.
9306 (grokdeclarator): Don't use build_decl_list.
9307 (start_function): Don't use decl_tree_cons.
9308 (finish_function): Don't mess with obstacks.
9309 * decl2.c (grok_x_components): Don't use build_decl_list.
9310 * lex.c (make_call_declarator): Don't call decl_tree_cons.
9311 (implicitly_declare_fn): Don't call build_decl_list.
9312 * parse.y (frob_specs): Don't call build_decl_list or
9313 decl_tree_cons.
9314 (expr_or_declarator_intern): Don't call decl_tree_cons.
9315 (primary): Don't call build_decl_list.
9316 (fcast_or_absdcl): Likewise.
9317 (typed_declspecs): Don't call decl_tree_cons.
9318 (reserved_declspecs): Don't call build_decl_list.
9319 (declmods): Likewise.
9320 (reserved_typespecquals): Likewise.
9321 (aggr): Likewise.
9322 (new_type_id): Likewise.
9323 (cv_qualifiers): Likewise.
9324 (after_type_declarator_intern): Likewise.
9325 (notype_declarator_intern): Likewise.
9326 (absdcl_intern): Likewise.
9327 (named_parm): Likewise.
9328 * pt.c (most_specialized_class): Likewise.
9329 * repo.c (temporary_obstack): Make it a structure, not a pointer.
9330 (init_repo): Initialize it.
9331 * search.c (current_obstack): Remove.
9332 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
9333
9334 2000-10-09 Richard Henderson <rth@cygnus.com>
9335
9336 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
9337 (c++ language support bits for libgcc): Remove.
9338 (c++.clean): Remove cplib2.txt cleanup.
9339 * config-lang.in (headers, lib2funcs): Remove.
9340
9341 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
9342 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
9343 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
9344 * inc/new.h, inc/typeinfo: Remove files.
9345
9346 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
9347
9348 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
9349 defined.
9350 (init_decl_processing): Initialize intmax_type_node and
9351 uintmax_type_node.
9352
9353 2000-10-06 Richard Henderson <rth@cygnus.com>
9354
9355 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
9356 (original_result_rtx): Remove.
9357 * decl.c (save_function_data): Don't clear x_result_rtx.
9358 (mark_lang_function): Don't mark it either.
9359 * expr.c (fixup_result_decl): Remove.
9360 * semantics.c (genrtl_named_return_value): Frob the return decl
9361 before calling emit_local_var.
9362 (genrtl_finish_function): Don't call fixup_result_decl.
9363 Always emit the jump to return_label.
9364
9365 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
9366
9367 * pt.c (lookup_template_class): Set current access for enum.
9368 (tsubst_enum): Set file & line for enum decl.
9369
9370 * spew.c (yylex): Remove unused variable.
9371
9372 2000-10-05 Richard Henderson <rth@cygnus.com>
9373
9374 * semantics.c (genrtl_finish_function): Don't init or check
9375 can_reach_end; remove noreturn and return value checks.
9376
9377 2000-10-05 Tom Tromey <tromey@cygnus.com>
9378
9379 * init.c (build_java_class_ref): Use `build_static_name' with a
9380 suffix, not a prefix, to build the class object's name.
9381
9382 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
9383
9384 * cp-tree.h (access_kind): Fix comment typo.
9385 * decl2.c (grokfield): Fix diagnostic typo.
9386 * semantics.c (finish_template_type): Fix comment typo.
9387 (finish_qualified_object_call_expr): Likewise.
9388
9389 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
9390
9391 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
9392 tsubsting fails.
9393
9394 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
9395
9396 * spew.c (frob_id): New static function.
9397 (frob_opname): Use it.
9398 (yylex): Use it.
9399
9400 2000-10-01 Mark Mitchell <mark@codesourcery.com>
9401
9402 * decl.c (lang_mark_false_label_stack): Remove.
9403 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
9404
9405 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
9406
9407 * gxxint.texi: Use @email for formatting email addresses.
9408
9409 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
9410
9411 * error.c: Remove direct obstack manipulation. Replace with
9412 output_buffer-based formatting. Adjust calls to removed macros.
9413 (obstack_chunk_alloc, obstack_chunk_free): Remove.
9414 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
9415 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
9416
9417 2000-09-24 Mark Mitchell <mark@codesourcery.com>
9418
9419 * ir.texi: Move to ../c-tree.texi.
9420
9421 2000-09-20 Jason Merrill <jason@redhat.com>
9422
9423 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
9424
9425 2000-09-21 Andreas Jaeger <aj@suse.de>
9426
9427 * errfn.c: Move declaration of cp_printer and cp_printers to ...
9428 * cp-tree.h: ... here.
9429
9430 * error.c: Remove declaration of cp_printer.
9431
9432 2000-09-20 Mark Mitchell <mark@codesourcery.com>
9433
9434 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
9435
9436 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
9437
9438 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
9439 users.
9440
9441 2000-09-18 Mark Mitchell <mark@codesourcery.com>
9442
9443 * decl.c (start_function): Robustify.
9444
9445 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9446
9447 * cp-tree.h (check_function_format): Accept a `status' parameter.
9448
9449 * call.c, typeck.c: Updates calls to `check_function_format'.
9450
9451 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
9452
9453 * decl2.c (handle_class_head): Always push some scope even
9454 in the error case.
9455
9456 2000-09-16 Mark Mitchell <mark@codesourcery.com>
9457
9458 * cp-tree.h (struct cp_language_function): Remove
9459 x_scope_stmt_stack and name_declared.
9460 (current_scope_stmt_stack): Remove.
9461 (function_name_declared_p): New macro.
9462 (struct lang_decl_flags): Use c_lang_decl as a base class.
9463 (context): Remove.
9464 (struct lang_decl): Replace saved_tree with context.
9465 (DECL_FRIEND_CONTEXT): Adjust accordingly.
9466 (SET_DECL_FRIEND_CONTEXT): Likewise.
9467 (DECL_VIRTUAL_CONTEXT): Likewise.
9468 (DECL_SAVED_TREE): Remove.
9469 (C_DECLARED_LABEL_FLAG): Likewise.
9470 (cplus_expand_expr_stmt): Don't declare.
9471 (add_decl_stmt): Likewise.
9472 (add_scope_stmt): Likewise.
9473 * decl.c (mark_stmt_tree): Remove.
9474 (case_compare): Likewise.
9475 (finish_case_label): Use c_add_case_label.
9476 (init_decl_processing): Set more language-specific hooks.
9477 (build_enumerator): Fix typo in comment.
9478 (cplus_expand_expr_stmt): Remove.
9479 (mark_lang_function): Use mark_c_language_function.
9480 (lang_mark_tree): Use c_mark_lang_decl.
9481 * decl2.c: Change order of inclusion.
9482 * except.c: Likewise.
9483 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
9484 back on c_expand_expr.
9485 * friend.c: Include expr.h.
9486 * init.c: Change order of inclusion.
9487 * Makefile.in: Update dependencies.
9488 * lex.h (free_lang_decl_chain): Remove.
9489 * optimize.c (maybe_clone_body): Use function_name_declared_p.
9490 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
9491 it doesn't exist.
9492 (instantiate_decl): Use function_name_declared_p.
9493 * semantics.c (lang_expand_expr_stmt): Remove.
9494 (set_current_function_name_declared): Likewise.
9495 (current_function_name_declared): Likewise.
9496 (begin_compound_stmt): Use function_name_declared_p.
9497 (add_decl_stmt): Remove.
9498 (setup_vtbl_ptr): Use function_name_declared_p.
9499 (add_scope_stmt): Remove.
9500 (current_scope_stmt_stack): New function.
9501 (cp_expand_stmt): Don't handle SCOPE_STMTs.
9502 (expand_body): Use function_name_declared_p.
9503 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
9504 * typeck.c: Change order of includes.
9505 (convert_sequence): Remove.
9506
9507 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
9508
9509 * lex.c (reswords): Add _Complex.
9510
9511 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9512
9513 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
9514
9515 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
9516
9517 * init.c (begin_init_stmts): Don't use // comments.
9518
9519 2000-09-12 Jason Merrill <jason@redhat.com>
9520
9521 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
9522 all non-extern arrays.
9523
9524 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
9525 typenames, too. Downgrade complaint to pedwarn.
9526 (xref_tag): Warn about surprising behavior of 'friend struct T'.
9527 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
9528 'class This::Inherited'.
9529
9530 2000-09-12 Mark Mitchell <mark@codesourcery.com>
9531
9532 * decl.c (finish_case_label): Given the LABEL_DECL a
9533 DECL_CONTEXT.
9534
9535 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
9536
9537 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
9538 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
9539 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
9540 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
9541 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
9542 New macros.
9543 (sorry_for_unsupported_tree, print_scope_operator,
9544 print_left_paren, print_right_paren, print_left_bracket,
9545 print_right_bracket, print_whitespace): Likewise.
9546 (aggr_variety): Rename to class_key_or_enum.
9547 (print_type): Rename to print_type_id.
9548 (print_type_specifier_seq, print_simple_type_specifier,
9549 print_elaborated_type_specifier,
9550 print_rest_of_abstract_declarator,
9551 print_parameter_declaration_clause, print_exception_specification,
9552 print_nested_name_specifier, print_template_id,
9553 typedef_original_name, print_template_argument_list_start,
9554 print_template_argument_list_end): New functions.
9555
9556 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
9557
9558 * ir.texi: Add more documentation.
9559
9560 2000-09-11 Mark Mitchell <mark@codesourcery.com>
9561
9562 * cp-tree.h (struct saved_scope): Remove x_function_parms.
9563 (current_function_parms): Don't define.
9564 (struct cp_language_function): Remove parms_stored.
9565 (current_function_just_assigned_this): Don't define.
9566 (current_function_parms_stored): Likewise.
9567 (static_ctors): Declare.
9568 (static_dtors): Likewise.
9569 (SF_EXPAND): Don't define.
9570 (expand_start_early_try_stmts): Remove declaration.
9571 (store_parm_decls): Likewise.
9572 * decl.c (static_ctors): Don't declare.
9573 (static_dtors): Likewise.
9574 (struct binding_level): Remove this_block.
9575 (poplevel): Remove dead code.
9576 (set_block): Likewise.
9577 (mark_binding_level): Don't mark this_block.
9578 (mark_saved_scope): Don't mark x_function_parms.
9579 (init_decl_processing): Don't add current_function_parms as a GC
9580 root.
9581 (check_function_type): Change prototype.
9582 (start_function): Remove RTL-generation code.
9583 (expand_start_early_try_stmts): Remove.
9584 (store_parm_decls): Give it internal linkage. Remove
9585 RTL-generation code.
9586 (finish_function): Remove RTL-generation code.
9587 * decl2.c (static_ctors): Fix formatting.
9588 (static_dtors): Likewise.
9589 * method.c (use_thunk): Don't call store_parm_decls.
9590 (synthesize_method): Likewise.
9591 * optimize.c (maybe_clone_body): Likewise.
9592 * parse.y (fn.def2): Likewise.
9593 (.set_base_init): Likewise.
9594 (nodecls): Likewise.
9595 * pt.c (instantiate_decl): Likewise.
9596 * rtti.c (synthesize_tinfo_fn): Likewise.
9597 * semantics.c (genrtl_try_block): Simplify.
9598 (expand_body): Use genrtl_start_function and
9599 genrtl_finish_function.
9600 (genrtl_start_function): New function.
9601 (genrtl_finish_function): Likewise.
9602
9603 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
9604
9605 * error.c (cp_tree_printer, case 'P'): Append break.
9606
9607 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
9608
9609 * cp-tree.h (frob_opname): Declare.
9610 * parse.y (saved_scopes): New static variable.
9611 (cp_parse_init): Adjust.
9612 (do_id): If lastiddecl is NULL, do do_identifier.
9613 (operator): Save scope information.
9614 (unoperator): New reduction. Restore scope information.
9615 (operator_name): Append unoperator. Call frob_opname.
9616 * spew.c (frob_opname): Define.
9617
9618 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
9619
9620 * decl.c, rtti.c: Include defaults.h if not already included.
9621 Don't define the *_TYPE_SIZE macros.
9622
9623 2000-09-09 Mark Mitchell <mark@codesourcery.com>
9624
9625 * cp-tree.h (push_switch): Change prototype.
9626 (check_cp_case_value): Remove declaration.
9627 (decl_constant_value): Likewise.
9628 * decl.c (struct cp_switch): Add switch_stmt and cases.
9629 (case_compare): New function.
9630 (push_switch): Set switch_stmt. Initialize cases.
9631 (pop_switch): Clean up cases.
9632 (define_case_label): Rename to ...
9633 (finish_case_label): ... this. Do semantic analysis for case
9634 labels here.
9635 (start_function): Correct comment.
9636 * decl2.c (check_cp_case_value): Remove.
9637 * expr.c (do_case): Remove.
9638 * pt.c (tsubst_expr): Adjust call to finish_case_label.
9639 * semantics.c (genrtl_do_poplevel): Remove declaration.
9640 (RECHAIN_STMTS): Remove.
9641 (finish_break_stmt): Use build_break_stmt.
9642 (finish_continue_stmt): Use build_continue_stmt.
9643 (finish_switch_cond): Adjust condition here, rater than in
9644 c_expand_start_case.
9645 (finish_case_label): Remove.
9646 * typeck.c (c_expand_return): Remove.
9647 (c_expand_start_case): Likewise.
9648
9649 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
9650
9651 * ir.texi: Document type nodes.
9652
9653 2000-09-06 Mark Mitchell <mark@codesourcery.com>
9654
9655 * cp-tree.h (init_cp_semantics): Declare.
9656 (genrtl_try_block): Don't declare.
9657 (genrtl_handler): Likewise.
9658 (genrtl_catch_block): Likewise.
9659 (genrtl_ctor_stmt): Likewise.
9660 (genrtl_subobject): Likewise.
9661 (genrtl_do_poplevel): Likewise.
9662 (genrtl_named_return_value): Likewise.
9663 * lex.c (init_parse): Call init_cp_semantics.
9664 * semantics.c (genrtl_try_block): Give it internal linkage.
9665 (genrtl_handler): Likewise.
9666 (genrtl_catch_block): Likewise.
9667 (genrtl_ctor_stmt): Likewise.
9668 (genrtl_subobject): Likewise.
9669 (genrtl_do_poplevel): Likewise.
9670 (genrtl_named_return_value): Likewise.
9671 (lang_expand_stmt): Rename to ...
9672 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
9673 (init_cp_semantics): Define.
9674
9675 * decl.c (initialize_local_var): Remove RTL-generating code.
9676 * semantics.c (genrtl_try_block): Fix formatting.
9677
9678 Move statement-tree facilities from C++ to C front-end.
9679 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
9680 (void_zero_node): Remove.
9681 (stmt_tree): Likewise.
9682 (scope_chain): Adjust.
9683 (language_function): Rename to cp_language_function.
9684 (cp_function_chain): Adjust.
9685 (current_stmt_tree): Remove.
9686 (last_tree): Likewise.
9687 (last_expr_type): Likewise.
9688 (struct lang_decl): Adjust.
9689 (STMT_IS_FULL_EXPR_P): Remove.
9690 (add_tree): Remove.
9691 (begin_stmt_tree): Likewise.
9692 (finish_stmt_tree): Likewise.
9693 (walk_tree_fn): Likewise.
9694 (walk_stmt_tree): Likewise.
9695 * class.c (finish_struct): Replace use of add_tree with add_stmt.
9696 * decl.c (mark_stmt_tree): Adjust type.
9697 (init_decl_processing): Don't build void_zero_node.
9698 (initialize_local_var): Adjust usage of current_stmt_tree.
9699 (finish_enum): Use add_stmt, not add_tree.
9700 (save_function_data): Adjust use of language_function.
9701 (finish_constructor_body): Use add_stmt, not add_tree.
9702 (finish_destructor_body): Likewise.
9703 (push_cp_function_context): Adjust use of language_function.
9704 (pop_cp_function_context): Likewise.
9705 (mark_lang_function): Likewise.
9706 (mark_cp_function_context): Likewise.
9707 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
9708 (build_vec_init): Likewise.
9709 * semantics.c (SET_LAST_STMT): Remove.
9710 (RECHAIN_STMTS): Don't use it.
9711 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
9712 (current_stmt_tree): Define.
9713 (add_tree): Remove.
9714 (finish_goto_stmt): Use add_stmt, not add_tree.
9715 (finish_expr_stmt): Likewise.
9716 (begin_if_stmt): Likewise.
9717 (finish_then_clause): Likewise.
9718 (begin_while_stmt): Likewise.
9719 (begin_do_stmt): Likewise.
9720 (finish_return_stmt): Likewise.
9721 (begin_for_stmt): Likewise.
9722 (finish_break_stmt): Likewise.
9723 (finish_continue_stmt): Likewise.
9724 (begin_switch_stmt): Likewise.
9725 (finish_case_label): Likewise.
9726 (begin_try_block): Likewise.
9727 (begin_function_try_block): Likewise.
9728 (begin_handler): Likewise.
9729 (begin_catch_block): Likewise.
9730 (begin_compound_stmt): Likewise.
9731 (begin_asm_stmt): Likewise.
9732 (finish_asm_stmt): Likewise.
9733 (finish_label_stmt): Likewise.
9734 (add_decl_stmt): Likewise.
9735 (finish_subobject): Likewise.
9736 (finish_decl_cleanup): Likewise.
9737 (finish_named_return_value): Likewise.
9738 (setup_vtbl_ptr): Likewise.
9739 (add_scope_stmt): Likewise.
9740 (finish_stmt_expr): Likewise.
9741 (prune_unused_decls): Remove.
9742 (begin_stmt_tree): Likewise.
9743 (finish_stmt_tree): Likewise.
9744 (prep_stmt): Adjust use of current_stmt_tree.
9745 (lang_expand_stmt): Likewise.
9746 * tree.c (statement_code_p): Remove.
9747 (cp_statement_code_p): New function.
9748 (walk_stmt_tree): Remove.
9749 (init_tree): Set lang_statement_code_p.
9750
9751 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
9752
9753 Integrated preprocessor.
9754
9755 * Make-lang.in, Makefile.in: Remove all references to input.c,
9756 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
9757 * gxx.gperf, hash.h, input.c: Delete.
9758 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
9759 initialized properly.
9760
9761 * class.c (fixup_pending_inline): Take a tree, not a
9762 struct pending_inline *. All callers changed.
9763 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
9764 RID_PROTECTED entries in ridpointers[] array here.
9765 * decl.c (duplicate_decls): Do not refer to struct
9766 pending_inline.
9767 (record_builtin_type, init_decl_processing): Use RID_MAX not
9768 CP_RID_MAX.
9769 (grokdeclarator): Use C_IS_RESERVED_WORD.
9770 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
9771 cpplib.
9772 (grok_x_components): Do not inspect pending_inlines chain.
9773
9774 * cp-tree.h (struct lang_identifier): Add rid_code entry.
9775 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
9776 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
9777 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
9778 TIME_IDENTIFIER_FILEINFO): Kill.
9779 Update prototypes.
9780 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
9781 single 32-bit word.
9782 * parse.y: Call do_pending_inlines unconditionally.
9783 reinit_parse_for_method is now snarf_method. fn.defpen is no
9784 longer necessary. Remove unnecessary <itype> annotation on
9785 SCOPE. Do not refer to end_of_file or struct pending_inline.
9786 * semantics.c (begin_inline_definitions): Call
9787 do_pending_inlines unconditionally.
9788
9789 * lex.c: Remove all code now shared with C front end.
9790 Initialize cpplib properly if USE_CPPLIB. Put reserved words
9791 into the get_identifier table. Rewrite pragma handling to
9792 work with the registry. Move code to save tokens for later
9793 processing to spew.c.
9794
9795 * spew.c: Rewrite everything in terms of token streams instead
9796 of text. Move routines here from lex.c / input.c as
9797 appropriate. GC-mark trees hanging off the pending inlines
9798 chain.
9799
9800 2000-09-06 Mark Mitchell <mark@codesourcery.com>
9801
9802 * NEWS: Mention that the named return value extension has been
9803 deprecated.
9804 * cp-tree.h (original_result_rtx): Define.
9805 (TREE_REFERENCE_EXPR): Remove.
9806 (DECL_VPARENT): Likewise.
9807 (pushdecl_nonclass_level): Likewise.
9808 (store_return_init): Likewise.
9809 (reinit_lang_specific): Likewise.
9810 (genrtl_named_return_value): Change prototype.
9811 * decl.c (original_result_rtx): Remove.
9812 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
9813 Do not generate RTL for local variables here.
9814 (store_return_init): Remove.
9815 * semantics.c (genrtl_named_return_value): Simplify. Fold in
9816 store_return_init.
9817 (finish_named_return_value): Adjust accordingly. Warn that this
9818 extension is deprecated.
9819 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
9820
9821 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
9822
9823 * pt.c (type_unification_real): Replace switch with if.
9824 (unify): Tsubst non-type parms before comparing.
9825
9826 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
9827
9828 * error.c (dump_typename): New function, broken out of ...
9829 (dump_type): ... here. Use it.
9830 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
9831
9832 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
9833
9834 * init.c (build_offset_ref): Deal with namespace scoped
9835 TEMPLATE_ID_EXPRs.
9836
9837 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
9838
9839 * class.c (resolve_address_of_overloaded_function): Add
9840 explanation message.
9841 * decl.c (define_case_label): Reformat explanation.
9842 * decl2.c (finish_static_data_member_decl): Likewise.
9843 (grokfield): Likewise.
9844 * friend.c (do_friend): Likewise.
9845
9846 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
9847
9848 * tree.c (walk_tree): Expose tail recursion.
9849 (walk_stmt_tree): New function.
9850 * cp-tree.h: Prototype walk_stmt_tree.
9851 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
9852 the BLOCKs directly. If a BLOCK has no variables after
9853 pruning, discard it.
9854 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
9855 restore the line number.
9856
9857 2000-09-05 Mark Mitchell <mark@codesourcery.com>
9858
9859 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
9860 (pt.o): Remove dependency on HTAB_H.
9861 * cp-tree.h: Include hashtab.h.
9862 (walk_tree): Change prototype.
9863 (walk_tree_without_duplicates): New function.
9864 * decl.c (check_default_argument): Use it.
9865 * optimize.c (remap_decl): Adjust calls to walk_tree.
9866 (copy_body): Likewise.
9867 (expand_calls_inline): Likewise.
9868 (calls_setjmp_p): Use walk_tree_without_duplicates.
9869 * pt.c: Don't include hashtab.h.
9870 (for_each_template_parm): Use walk_tree_without_duplicates.
9871 * semantics.c (finish-stmt_tree): Likewise.
9872 (expand_body): Likewise.
9873 * tree.c (walk_tree): Add additional parameter.
9874 (walk_tree_without_duplicates): New function.
9875 (count_trees): Use it.
9876 (verify_stmt_tree): Adjust call to walk_tree.
9877 (find_tree): Use walk_tree_without_duplicates.
9878 (no_linkage_check): Likewise.
9879 (break_out_target_exprs): Adjust call to walk_tree.
9880 (cp_unsave): Likewise.
9881
9882 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9883
9884 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
9885 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
9886 * cp-tree.h (TYPE_BINFO): Adjust comment.
9887 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
9888 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
9889 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
9890 (TYPE_TEMPLATE_INFO): Likewise.
9891 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
9892 * class.c (push_nested_class): Likewise.
9893 * decl.c (lookup_name_real): Likewise.
9894 (grokdeclarator): Likewise.
9895 (grok_op_properties): Likewise.
9896 (xref_tag): Likewise.
9897 (xref_basetypes): Likewise.
9898 * decl2.c (constructor_name_full): Likewise.
9899 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
9900 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
9901 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
9902 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9903 (dump_type_suffix): Likewise.
9904 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
9905 instead.
9906 (get_aggr_from_typedef): Likewise.
9907 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
9908 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9909 (write_template_parm): Likewise.
9910 (write_template_template_parm): Check tree code instead of
9911 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9912 * method.c (build_overload_nested_name): Add
9913 BOUND_TEMPLATE_TEMPLATE_PARM.
9914 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
9915 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9916 * pt.c (convert_template_argument): Check tree code instead of
9917 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9918 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
9919 (for_each_template_parm): Adjust comment.
9920 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
9921 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9922 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
9923 template_args_equal to compare template template parameter cases.
9924 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9925 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
9926 instead.
9927 * tree.c (copy_template_template_parm): Decide whether to create
9928 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
9929 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9930 (copy_tree_r): Likewise.
9931 * typeck.c (comptypes): Likewise. Check tree code instead of
9932 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9933
9934 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
9935
9936 * decl.c (finish_function): Move the code for handling functions
9937 marked with the constructor and destructor attributes inside the
9938 expand_p block.
9939
9940 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
9941
9942 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
9943
9944 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
9945
9946 * pt.c (lookup_template_class): Remove abort.
9947 * tree.c (get_type_decl): Allow error_mark_node.
9948
9949 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
9950
9951 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
9952 TEMPLATE_ID_EXPRs.
9953
9954 2000-09-03 Mark Mitchell <mark@codesourcery.com>
9955
9956 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
9957 new ABI mangling.
9958
9959 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
9960
9961 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
9962 union tag mismatch error reporting.
9963
9964 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
9965
9966 * call.c (build_scoped_method_call): Check it is not a namespace.
9967
9968 2000-08-30 Jason Merrill <jason@redhat.com>
9969
9970 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
9971
9972 * tree.c (bot_manip): Check TREE_CONSTANT rather than
9973 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
9974 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
9975
9976 * decl.c (start_function): Always call make_function_rtl.
9977
9978 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
9979
9980 * semantics.c (prune_unused_decls): New function.
9981 (finish_stmt_tree): Call it via walk_tree.
9982
9983 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
9984
9985 * class.c (build_secondary_vtable): Constify a char *.
9986 * decl.c (init_decl_processing): Initialize function_id_node,
9987 pretty_function_id_node, and func_id_node.
9988 * input.c (struct input_source): Constify 'str'.
9989 (feed_input): Constify first argument.
9990 * mangle.c (write_identifier): Constify argument.
9991 * pt.c (mangle_class_name_for_template): Constify argument.
9992
9993 2000-08-29 Mark Mitchell <mark@codesourcery.com>
9994
9995 * typeck.c (mark_addressable): Remove code that pokes around in
9996 RTL.
9997
9998 2000-08-28 Jason Merrill <jason@redhat.com>
9999
10000 * lex.c (file_name_nondirectory): Move to toplev.c.
10001
10002 * cp-tree.h (LOCAL_CLASS_P): New macro.
10003 * class.c (finish_struct_1): Use it.
10004
10005 2000-08-27 Alex Samuel <samuel@codesourcery.com>
10006
10007 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
10008 (write_encoding): Pass another argument to write_name.
10009 (write_name): Add ignore_local_scope parameter. Fix handling of
10010 local names.
10011 (write_nested_name): Use write_unqualified_name.
10012 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
10013 (write_template_prefix): Use write_unqualified_name.
10014 (write_component): Remove.
10015 (write_local_name): Add parameter. Use direct local entity to
10016 discriminator calculation.
10017 (write_class_enum_type): Pass another argument to write_name.
10018 (write_template_template_arg): Likewise.
10019 (make_guard_variable): Likewise.
10020
10021 2000-08-27 Jason Merrill <jason@redhat.com>
10022
10023 * decl.c (pushdecl): Matching decls for local externs are found in
10024 the current level. Propagate linkage information from previous
10025 declarations.
10026
10027 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
10028
10029 * ir.texi (Expressions): Fix typo.
10030
10031 2000-08-25 Greg McGary <greg@mcgary.org>
10032
10033 * tree.c (init_tree): Use ARRAY_SIZE.
10034
10035 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
10036
10037 * error.c (cp_tree_printer): Rework.
10038
10039 2000-08-25 Mark Mitchell <mark@codesourcery.com>
10040
10041 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
10042 dyn-string.o.
10043 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
10044 (cp-demangle.o): Remove target.
10045 (dyn-string.o): Likewise.
10046
10047 * decl.c (grokfndecl): Require that `main' return an `int'.
10048 * mangle.c (write_encoding): Don't mangle return types for
10049 conversion functions.
10050
10051 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
10052
10053 * error.c (tree_formatting_info): New data type.
10054 (tree_being_formatted): New macro.
10055 (tree_formatting_flags): Likewise.
10056 (put_whitespace): Likewise.
10057 (print_tree_identifier): Likewise.
10058 (print_identifier): Likewise.
10059 (cp_tree_printer, print_function_argument_list, print_declaration,
10060 print_expression, print_function_declaration,
10061 print_function_parameter, print_type, print_cv_qualifier): New
10062 functions.
10063 (init_error): Initialize lang_printer.
10064
10065 2000-08-24 Jason Merrill <jason@redhat.com>
10066
10067 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
10068 adjustment necessary.
10069
10070 2000-08-24 Greg McGary <greg@mcgary.org>
10071
10072 * cp-tree.h (MAIN_NAME_P): Remove macro.
10073
10074 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
10075
10076 * error.c (print_instantiation_context): Don't forget to flush the
10077 buffer.
10078
10079 2000-08-23 Jason Merrill <jason@redhat.com>
10080
10081 * typeck.c (build_ptrmemfunc): Save the input pmf.
10082
10083 * method.c (process_modifiers): Use same_type_p.
10084
10085 2000-08-23 Mark Mitchell <mark@codesourcery.com>
10086
10087 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
10088 * mangle.c (write_function_type): Change prototype.
10089 (write_encoding): Don't mangle return types for
10090 constructors or destructors.
10091 (write_type): Adjust call to write_function_type.
10092 * pt.c (instantiate_template): Instantiate alternate entry points
10093 when instantiating the main function.
10094
10095 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
10096
10097 * error.c (cp_print_error_function): Don't use embedded '\n' in
10098 output_printf.
10099
10100 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
10101
10102 * decl.c (init_decl_processing): Remove bogus initialization.
10103 * error.c (lang_print_error_function): Restore here.
10104 (init_error): Initialize print_error_function.
10105
10106 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10107
10108 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
10109
10110 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
10111
10112 * Makefile.in (error.o): Depends on diagnostic.h
10113
10114 * cp-tree.h (problematic_instantiation_changed,
10115 record_last_problematic_instantiation, current_instantiation,
10116 print_instantiation_context): Declare.
10117 (maybe_print_template_context): Remove.
10118
10119 * decl.c (init_decl_processing): Set print_error_function to NULL.
10120 (lang_print_error_function): Remove, since we're using a new
10121 machinery.
10122
10123 * error.c: #include diagnostic.h
10124 (function_category): New function.
10125 (cp_diagnostic_starter): Likewise.
10126 (cp_diagnostic_finalizer): Likewise.
10127 (cp_print_error_function): Likewise.
10128 (maybe_print_instantiation_context): Likewise.
10129 (print_instantiation_full_context): Likewise.
10130 (print_instantiation_partial_context): Likewise.
10131 (print_instantiation_context): Define.
10132 (init_error): Initialize diagnostic pager and finalizer.
10133
10134 * pt.c (problematic_instantiation_changed): Define.
10135 (record_last_problematic_instantiation): Likewise.
10136 (current_instantiation): Likewise.
10137 (maybe_print_template_context): Remove.
10138 (print_template_context): Likewise.
10139 (current_tinst_level): Make static to reflect Brendan Kehoe's
10140 change of 1995-04-13.
10141 (push_tinst_level): Call print_instantiation_context.
10142
10143 2000-08-21 Nix <nix@esperi.demon.co.uk>
10144
10145 * lang-specs.h: Do not process -o or run the assembler if
10146 -fsyntax-only.
10147
10148 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
10149
10150 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
10151 variables.
10152 * decl2.c (lang_decode_option): Disable gettext attributes for
10153 -ansi.
10154
10155 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
10156
10157 * lex.c (lang_init_options): Default diagnostic message maximum
10158 length to 80, when line-wrapping.
10159
10160 2000-08-20 Mark Mitchell <mark@codesourcery.com>
10161
10162 * class.c (build_vtbl_initializer): Clear the entire
10163 vtbl_init_data. Start keeping track of the functions for which we
10164 have created vcall offsets here.
10165 (dfs_build_vcall_offset_vtbl_entries): Remove.
10166 (build_vcall_offset_vtbl_entries): Reimplement.
10167 (add_vcall_offset_vtbl_entries_r): New function.
10168 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
10169 computing when vcall offsets are necessary.
10170
10171 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
10172
10173 * decl.c (member_function_or_else): Use cp_error ... %T.
10174 (grokdeclarator): Likewise.
10175 (start_method): Likewise.
10176 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
10177
10178 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
10179
10180 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
10181 TYPE_DECLs.
10182
10183 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
10184
10185 * cp-tree.h (PTRMEM_OK_P): New macro.
10186 (itf_ptrmem_ok): New enumeration value.
10187 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
10188 argument. Diagnose implicit pointer to member.
10189 (instantiate_type): Don't diagnose implicit pointer to member
10190 here. Pass itf_ptrmem_ok if ok. Adjust calls to
10191 resolve_address_of_overloaded_function.
10192 * init.c (build_offset_ref): Set PTRMEM_OK_P.
10193 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
10194 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
10195 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
10196 (build_unary_op): Deal with single non-static member in
10197 microsoft-land.
10198
10199 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
10200
10201 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
10202
10203 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
10204
10205 * cp-tree.h (enum_name_string): Remove prototype.
10206 (report_case_error): Remove prototype.
10207 * cp/typeck2.c (enum_name_string): Remove.
10208 (report_case_error): Remove.
10209 * error.c (dump_expr): Deal with enum values directly.
10210 Correctly negate integer constant.
10211
10212 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
10213
10214 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
10215 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
10216 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
10217 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
10218 (__cxa_vec_new): Use __cxa_vec_new2.
10219 (__cxa_vec_delete): Use __cxa_vec_delete2.
10220
10221 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
10222
10223 * vec.cc (__cxa_vec_new): Set "C" linkage.
10224 (__cxa_vec_ctor): Likewise.
10225 (__cxa_vec_cctor): Likewise.
10226 (__cxa_vec_dtor): Likewise.
10227 (__cxa_vec_delete): Likewise.
10228 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
10229 (__cxa_vec_ctor): Likewise.
10230 (__cxa_vec_cctor): Likewise.
10231 (__cxa_vec_dtor): Likewise.
10232 (__cxa_vec_delete): Likewise.
10233
10234 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
10235
10236 * class.c (instantiate_type): Reinstate local variable
10237 deleted in previous change.
10238
10239 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
10240 itf_no_attributes.
10241
10242 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
10243
10244 * cp-tree.h (instantiate_type_flags): New enumeration.
10245 (instantiate_type): Change parameter.
10246 * class.c (instantiate_type): Adjust prototype. Adjust.
10247 * call.c (standard_conversion): Adjust instantiate_type call.
10248 (reference_binding): Likewise.
10249 (build_op_delete_call): Likewise.
10250 (convert_like_real): Likewise.
10251 * cvt.c (cp_convert_to_pointer): Likewise.
10252 (convert_to_reference): Likewise.
10253 * pt.c (convert_nontype_argument): Likewise.
10254 * typeck.c (build_binary_op): Likewise.
10255 (build_ptrmemfunc): Likewise.
10256 (convert_for_assignment): Likewise.
10257
10258 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
10259
10260 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
10261 (current_aggr): Define.
10262 * decl.c (grokdeclarator): Make sure a friend class is an
10263 elaborated type specifier.
10264 * parse.y (current_aggr): Remove static definition.
10265 (cp_parse_init): Adjust.
10266 (structsp): Clear and restore current_aggr.
10267 (component_decl_list): Clear current_aggr.
10268
10269 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
10270 aggregate tag on the typename's context.
10271
10272 * pt.c (tsubst_friend_class): Return error_mark_node, if
10273 parms becomes NULL.
10274 (instantiate_class_template): Ignore error_mark_node friend types.
10275
10276 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
10277
10278 * cvt.c (warn_ref_binding): New static function, broken out of ...
10279 (convert_to_reference): ... here. Use it.
10280
10281 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10282
10283 * parse.y (template_arg): Add rule for template qualified with
10284 global scope.
10285
10286 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10287
10288 * decl2.c (add_function): Reorganize.
10289 (arg_assoc): Do not consider function template decls.
10290
10291 2000-08-11 Jason Merrill <jason@redhat.com>
10292
10293 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
10294 looking inside.
10295
10296 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
10297
10298 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
10299 (lookup_nested_tag): Likewise.
10300
10301 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
10302 can be produced.
10303
10304 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
10305
10306 * parse.y (named_complex_class_head_sans_basetype): Remove
10307 always true if.
10308
10309 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
10310
10311 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
10312 explicit TEMPLATE_ID_EXPR args.
10313 (build_expr_from_tree, case CALL_EXPR): Likewise.
10314
10315 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
10316
10317 * decl.c (check_tag_decl): Diagnose typename's which don't
10318 declare anything.
10319
10320 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
10321
10322 * init.c (build_aggr_init): Reject bogus array initializers
10323 early.
10324
10325 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
10326
10327 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
10328 runtime.
10329 * cp/tinfo.cc (__dynamic_cast): Likewise.
10330 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
10331
10332 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
10333
10334 * cvt.c (convert_to_pointer_force): Fix error message when
10335 attempting to cast from ambiguous base.
10336
10337 2000-08-08 Jason Merrill <jason@redhat.com>
10338
10339 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
10340 (tsubst_template_arg_vector): Likewise.
10341
10342 * decl2.c (build_anon_union_vars): Choose the largest field; don't
10343 assume that one will be as large as the union.
10344
10345 2000-08-07 Kazu Hirata <kazu@hxi.com>
10346
10347 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
10348 * decl.c (pop_labels): Likewise.
10349
10350 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
10351
10352 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
10353 specifications.
10354 (__pointer_to_member_type_info): Likewise.
10355 (__base_class_info): Likewise.
10356 (__class_type_info): Likewise.
10357 (__si_class_type_info): Likewise.
10358 (__vmi_class_type_info): Likewise.
10359 * tinfo.cc (__si_class_type_info::__do_find_public_src):
10360 Changed member names to match specifications.
10361 (__vmi_class_type_info::__do_find_public_src): Likewise.
10362 (__si_class_type_info::__do_dyncast): Likewise.
10363 (__vmi_class_type_info::__do_dyncast): Likewise.
10364 (__si_class_type_info::__do_upcast): Likewise.
10365 (__vmi_class_type_info::__do_upcast): Likewise.
10366 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
10367 (__pbase_type_info::__pointer_catch): Likewise.
10368 (__pointer_type_info::__pointer_catch): Likewise.
10369 (__pointer_to_member_type_info::__pointer_catch): Likewise.
10370
10371 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
10372
10373 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
10374 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
10375 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
10376
10377 2000-08-04 Mark Mitchell <mark@codesourcery.com>
10378
10379 * cp-tree.h (add_method): Change prototype.
10380 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
10381 Don't double the size of the method vector in the error case.
10382 (handle_using_decl): Adjust call to add_method.
10383 (add_implicitly_declared_members): Likewise.
10384 (clone_function_decl): Likewise.
10385 * decl2.c (check_classfn): Likewise.
10386 * semantics.c (finish_member_declaration): Likewise.
10387
10388 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
10389
10390 * decl.c (flag_isoc94): New variable.
10391
10392 2000-08-02 Jason Merrill <jason@redhat.com>
10393
10394 * pt.c (do_type_instantiation): Add complain parm; don't complain
10395 if called recursively.
10396 * cp-tree.h, parse.y: Adjust.
10397
10398 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
10399
10400 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
10401 -Wno-strict-prototypes.
10402
10403 * g++spec.c: Adjust type of second argument to
10404 lang_specific_driver, and update code as necessary.
10405
10406 * cp-tree.h: Don't prototype min_precision here.
10407 (my_friendly_assert): Cast expression to void.
10408 * semantics.c (do_poplevel): Initialize scope_stmts.
10409
10410 2000-08-02 Mark Mitchell <mark@codesourcery.com>
10411
10412 * cp-tree.h (DECL_NEEDED_P): Tweak.
10413
10414 2000-07-28 Jason Merrill <jason@redhat.com>
10415
10416 * lang-specs.h: Use %i in rule for .ii files.
10417
10418 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
10419
10420 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
10421
10422 2000-07-30 Mark Mitchell <mark@codesourcery.com>
10423
10424 Allow indirect primary bases.
10425 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
10426 primary_base.
10427 (CLASSTYPE_VFIELD_PARENT): Remove.
10428 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
10429 (BINFO_PRIMARY_BINFO): Remove.
10430 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
10431 (BINFO_VBASE_PRIMARY_P): Likewise.
10432 (BINFO_PRIMARY_BASE_OF): New macro.
10433 (BINFO_INDIRECT_PRIMARY_P): Likewise.
10434 (get_primary_binfo): New function.
10435 * decl.c (lang_mark_tree): Make lang_type::primary_base.
10436 * class.c (vcall_offset_data_s): Rename to ...
10437 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
10438 and add ctor_vtbl_p.
10439 (get_derived_offset): Use get_primary_binfo.
10440 (dfs_mark_primary_bases): Adjust handling of virtual primary
10441 bases.
10442 (mark_primary_bases): Likewise.
10443 (set_primary_base): Take a binfo, not an integer, as a
10444 representation of the primary base.
10445 (indirect_primary_base_p): Remove.
10446 (determine_primary_base): Adjust for indirect primary bases.
10447 (dfs_find_final_overrider): Fix typo in coment.
10448 (update_vtable_entry_for_fn): Use get_primary_binfo.
10449 (layout_nonempty_base_or_field): Tweak.
10450 (build_base_fields): Adjust for new primary base semantics.
10451 (dfs_propagate_binfo_offsets): Remove.
10452 (propagate_binfo_offsets): Rewrite.
10453 (dfs_set_offset_for_shared_vbases): Remove.
10454 (layout_virtual_bases): Don't use it.
10455 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
10456 ABI.
10457 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
10458 CLASSTYPE_VFIELD_PARENT.
10459 (dfs_get_primary_binfo): New function.
10460 (get_primary_binfo): Likewise.
10461 (dump_class_hierarchy_r): Tweak printing of primary bases.
10462 (build_vtbl_initializer): Fix typo in comments. Use
10463 vtbl_init_data.
10464 (build_vcall_and_vbase_vtbl_entries): Likewise.
10465 (build_vbaes_offset_vtbl_entries): Likewise.
10466 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
10467 BV_VCALL_INDEX to handle indirect primary bases.
10468 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
10469 (build_rtti_vtbl_entries): Likewise.
10470 * search.c (get_shared_vbase_if_not_primary): Tweak.
10471 (find_vbase_instance): Likewise.
10472 (binfo_for_vtable): Simplify.
10473 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
10474 (make_binfo): Make it have 11 entries.
10475
10476 2000-07-30 Alex Samuel <samuel@codesourcery.com>
10477
10478 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
10479 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
10480 ascertaining primaryness.
10481 (G): Remove template_args.
10482 (decl_is_template_id): New function.
10483 (write_encoding): Use decl_is_template_id.
10484 (write_name): Likewise. Handle type_decls. Get main variant of
10485 type decls.
10486 (write_nested_name): Likewise.
10487 (write_prefix): Likewise.
10488 (write_template_prefix): Likewise.
10489 (write_special_name_constructor): Remove defunct production from
10490 comment.
10491 (write_bare_function_type): Remove comment about absent parameter.
10492 (write_template_template_arg): Add missing grammar production to
10493 comment.
10494
10495 2000-07-27 Jason Merrill <jason@redhat.com>
10496
10497 * decl.c (duplicate_decls): If common_type produces a non-typedef
10498 type for a typedef, just use the old type.
10499
10500 2000-07-27 Mark Mitchell <mark@codesourcery.com>
10501
10502 * cp-tree.h (function_depth): Declare.
10503 (verify_stmt_tree): Likewise.
10504 (find_tree): Likewise.
10505 * decl.c (function_depth): Give it external linkage.
10506 * optimize.c (optimize_function): Increment and decrement it.
10507 * tree.c (verify_stmt_tree_r): New function.
10508 (verify_stmt_tree): Likewise.
10509 (find_tree_r): Likewise.
10510 (find_tree): Likewise.
10511
10512 2000-07-27 Jason Merrill <jason@redhat.com>
10513
10514 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
10515 TYPE_PTRMEMFUNC_P.
10516 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
10517
10518 2000-07-26 Mark Mitchell <mark@codesourcery.com>
10519
10520 * decl.c (start_cleanup_fn): Mark the function as `inline'.
10521 * decl2.c (get_guard): Call cp_finish_decl, not
10522 rest_of_decl_compilation, for local guards.
10523 * lex.c (do_identifier): Remove unused variable.
10524
10525 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
10526
10527 * parse.y: Add missing ';'.
10528
10529 2000-07-26 Mark Mitchell <mark@codesourcery.com>
10530
10531 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
10532 of `extern "C++"'.
10533
10534 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
10535
10536 Kill strict_prototype. Backwards compatibility only for
10537 non NO_IMPLICIT_EXTERN_C systems.
10538 * cp-tree.h (flag_strict_prototype): Remove.
10539 (strict_prototype): Remove.
10540 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
10541 * decl.c (maybe_push_to_top_level): Adjust.
10542 (pop_from_top_level): Adjust.
10543 (decls_match): Only allow sloppy parm matching for ancient
10544 system headers.
10545 (init_decl_processing): Adjust.
10546 (grokdeclarator): Adjust.
10547 * decl2.c (flag_strict_prototype): Remove.
10548 (strict_prototype): Remove.
10549 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
10550 (lang_f_options): Remove "strict-prototype".
10551 (unsupported-options): Add "strict-prototype".
10552 * lex.c (do_identifier): Adjust.
10553 (do_scoped_id): Adjust.
10554 * parse.y (empty_parms): Adjust.
10555 * class.c (push_lang_context): Adjust.
10556 (pop_lang_context): Adjust.
10557 * typeck.c (comp_target_parms): Adjust.
10558
10559 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
10560
10561 * decl.c (poplevel): Deal with anonymous variables at for scope.
10562 (maybe_inject_for_scope_var): Likewise.
10563
10564 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
10565
10566 * decl.c: Remove all signal handling code, now done in toplev.c.
10567
10568 2000-07-23 Mark Mitchell <mark@codesourcery.com>
10569
10570 * decl.c (make_rtl_for_nonlocal_decl): Rework.
10571
10572 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
10573 correctly.
10574
10575 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
10576
10577 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
10578 Define my_friendly_assert and my_friendly_abort as macros
10579 which may call friendly_abort. Prototype friendly abort, not
10580 my_friendly_abort or my_friendly_assert.
10581 * decl.c (signal_catch): Report the signal caught in the error
10582 message. Call fatal directly.
10583 * typeck2.c (ack, my_friendly_assert): Delete.
10584 (my_friendly_abort): Rename to friendly_abort. Expect file,
10585 line, and function parameters. Report the abort code, then
10586 call fancy_abort. Do not mask an abort if errors have
10587 already occurred.
10588
10589 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
10590
10591 * typeck.c (comp_target_parms): Remove obsolete parameter.
10592 (comp_target_types): Adjust.
10593
10594 2000-07-17 Jason Merrill <jason@redhat.com>
10595
10596 * typeck.c (mark_addressable): Never set TREE_USED.
10597 * call.c (build_call): Don't abort on calls to library functions
10598 that have been declared normally.
10599
10600 * typeck.c (build_binary_op): Fix grammar in warning.
10601
10602 * exception.cc (__eh_free): Fix prototype.
10603
10604 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
10605
10606 * decl.c (pushdecl): Handle seeing an OVERLOAD in
10607 IDENTIFIER_NAMESPACE_VALUE.
10608
10609 2000-07-16 Mark Mitchell <mark@codesourcery.com>
10610
10611 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
10612 * method.c (use_thunk): Correct handling of vcall offsets.
10613
10614 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
10615
10616 * .cvsignore: parse.h and parse.c have no cp- prefix.
10617
10618 2000-07-13 Mark Mitchell <mark@codesourcery.com>
10619
10620 * .cvsignore: New file.
10621
10622 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
10623
10624 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
10625
10626 2000-07-12 Mark Mitchell <mark@codesourcery.com>
10627
10628 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
10629 * parse.c: Remove.
10630 * parse.h: Likewise.
10631
10632 2000-07-11 Mark Mitchell <mark@codesourcery.com>
10633
10634 * class.c (layout_class_type): Add pointers to virtual bases after
10635 base classes under the old ABI.
10636
10637 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
10638
10639 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
10640 (finish_continue_stmt): Likewise.
10641 (begin_for_stmt): Remove call to note_level_for_for.
10642 (finish_goto_stmt): Change call from build_min_nt
10643 to build_stmt.
10644 (finish_expr_stmt): Likewise.
10645 (begin_if_stmt): Likewise.
10646 (begin_while_stmt): Likewise.
10647 (finish_while_stmt): Likewise.
10648 (finish_return_stmt): Likewise.
10649 (begin_for_stmt): Likewise.
10650 (finish_for_stmt): Likewise.
10651 (finish_break_stmt): Likewise.
10652 (begin_switch_stmt): Likewise.
10653 (finish_case_label): Likewise.
10654 (genrtl_try_block): Likewise.
10655 (begin_try_block): Likewise.
10656 (begin_handler): Likewise.
10657 (begin_compound_stmt): Likewise.
10658 (finish_asm_stmt): Likewise.
10659 (finish_label_stmt): Likewise.
10660 (add_decl_stmt): Likewise.
10661 (finish_subobject): Likewise.
10662 (finish_decl_cleanup): Likewise.
10663 (finish_named_return_value): Likewise.
10664 (setup_vtbl_ptr): Likewise.
10665 (add_scope_stmt): Likewise.
10666 * decl.c (finish_constructor_body): Likewise.
10667 (finish_destructor_body): Likewise.
10668 * optimize.c (copy_body_r): Likewise.
10669 (initialize_inlined_parameters): Likewise.
10670 (declare_return_variable): Likewise.
10671 (expand_call_inline): Likewise.
10672
10673 2000-07-10 Jakub Jelinek <jakub@redhat.com>
10674
10675 * semantics.c (expand_body): Sync interface information
10676 at the end of function body expansion.
10677
10678 2000-07-09 Jason Merrill <jason@redhat.com>
10679
10680 * init.c (build_new_1): Bail early if the call to new fails.
10681
10682 * decl.c (compute_array_index_type): Check specifically for
10683 an INTEGER_CST, not just TREE_CONSTANT.
10684
10685 * decl.c (duplicate_decls): Don't call duplicate_decls on
10686 the DECL_TEMPLATE_RESULT.
10687 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
10688 codes.
10689
10690 * error.c (dump_template_bindings): Don't crash if we had an
10691 invalid argument list.
10692
10693 * typeck.c (c_expand_start_case): Do narrowing here.
10694 * semantics.c (finish_switch_cond): Not here.
10695
10696 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
10697
10698 * parse.y (asm_clobbers): Do string concatenation.
10699
10700 2000-07-09 Mark Mitchell <mark@codesourcery.com>
10701
10702 * decl.c (pushtag): Don't put local classes in template functions
10703 on the local_classes list.
10704
10705 2000-07-04 Scott Snyder <snyder@fnal.gov>
10706
10707 * decl2.c (get_guard): Add missing return for old ABI local
10708 variable case.
10709
10710 2000-07-09 Mark Mitchell <mark@codesourcery.com>
10711
10712 * cp-tree.h (char_type_p): New function.
10713 * decl.c (init_decl_processing): Don't initialize
10714 signed_wchar_type_node or unsigned_wchar_type_node.
10715 (complete_array_type): Handle brace-enclosed string-constants.
10716 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
10717 * tree.c (char_type_p): New function.
10718 * typeck2.c (digest_init): Use char_type_p.
10719
10720 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
10721
10722 * pt.c (tsubst): Don't layout type, if it's error_mark.
10723
10724 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
10725
10726 * pt.c (instantiate_pending_templates): Reset template level.
10727
10728 2000-07-05 Jason Merrill <jason@redhat.com>
10729
10730 * call.c (joust): Don't complain about `operator char *()' beating
10731 `operator const char *() const'.
10732
10733 2000-07-04 scott snyder <snyder@fnal.gov>
10734 Jason Merrill <jason@redhat.com>
10735
10736 * repo.c (repo_get_id): Handle the case where a class with virtual
10737 bases has a null TYPE_BINFO_VTABLE.
10738
10739 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
10740 Jason Merrill <jason@redhat.com>
10741
10742 * parse.y (member_init): Just pass in the type.
10743 * init.c (expand_member_init): Handle getting a type.
10744
10745 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10746 Jason Merrill <jason@redhat.com>
10747
10748 * decl.c (finish_function): Warn if a function has no return
10749 statement.
10750 Suggested by Andrew Koenig.
10751 * typeck.c (check_return_expr): Do set current_function_returns_value
10752 if we got an error_mark_node.
10753
10754 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
10755
10756 * decl2.c (push_decl_namespace): Push the original namespace.
10757
10758 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
10759
10760 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
10761 * semantics.c (begin_class_definition): Clear it.
10762
10763 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
10764
10765 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
10766 (genrtl_expr_stmt): Likewise.
10767 (genrtl_decl_stmt): Likewise.
10768 (genrtl_if_stmt): Likewise.
10769 (genrtl_while_stmt): Likewise.
10770 (genrtl_do_stmt): Likewise.
10771 (genrtl_return_stmt): Likewise.
10772 (genrtl_for_stmt): Likewise.
10773 (genrtl_break_stmt): Likewise.
10774 (genrtl_continue_stmt): Likewise.
10775 (genrtl_scope_stmt): Likewise.
10776 (genrtl_switch_stmt): Likewise.
10777 (genrtl_case_label): Likewise.
10778 (genrtl_begin_compound_stmt): Likewise.
10779 (genrtl_finish_compound_stmt): Likewise.
10780 (genrtl_compound_stmt): Likewise.
10781 (genrtl_asm_stmt): Likewise.
10782
10783 * init.c (begin_init_stmts): Remove call to
10784 genrtl_begin_compound_stmt.
10785 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
10786
10787 * semantics.c (lang_expand_stmt): Changed call to
10788 genrtl_compound_stmt to ignore return value.
10789
10790 2000-07-02 Mark Mitchell <mark@codesourcery.com>
10791
10792 * mangle.c (canonicalize_for_substitution): Return the canonical
10793 variant of a type.
10794
10795 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
10796 TYPE_DECL.
10797 * typeck.c (commonparms): Remove obstack manipulations.
10798
10799 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
10800
10801 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
10802
10803 * Makefile.in (OBJS): Added ../c-semantics.o.
10804 (OBJDEPS): Likewise.
10805
10806 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
10807 ../c-common.h.
10808 (struct stmt_tree): Added comment.
10809 (current_function_name_declared): Removed.
10810 (stmts_are_full_exprs_p): Likewise.
10811 (genrtl_do_pushlevel): Likewise.
10812 (genrtl_clear_out_block): Likewise.
10813 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
10814 (DECL_ANON_UNION_ELEMS): Likewise.
10815 (emit_local_var): Likewise.
10816 (make_rtl_for_local_static): Likewise.
10817 (do_case): Likewise.
10818 (expand_stmt): Likewise.
10819 (genrtl_decl_cleanup): Likewise.
10820 (c_expand_asm_operands): Likewise.
10821 (c_expand_return): Likewise.
10822 (c_expand_start_case): Likewise.
10823
10824 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
10825 (emit_local_var): Likewise.
10826 (initialize_local_var): Change reference to
10827 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
10828 Change reference to stmts_are_full_exprs_p to
10829 current_stmt_tree->stmts_are_full_exprs_p.
10830 (push_cp_function_context): Likewise.
10831
10832 * expect.c (expand_throw): Change reference to
10833 stmts_are_full_exprs_p.
10834
10835 * init.c (build_aggr_init): Change reference to
10836 stmts_are_full_exprs_p.
10837 (build_vec_init): Likewise.
10838
10839 * optimize.c (maybe_clone_body): Change reference to
10840 current_function_name_declared to
10841 cp_function_chain->name_declared.
10842
10843 * pt.c (instantiate_decl): Change reference to
10844 current_function_name_declared to
10845 cp_function_chain->name_declared.
10846
10847 * semantics.c (expand_cond): Moved declaration to c-common.h.
10848 (genrtl_do_pushlevel): Moved to c-semantics.c.
10849 (genrtl_clear_out_block): Likewise.
10850 (genrtl_goto_stmt): Likewise.
10851 (genrtl_expr_stmt): Likewise.
10852 (genrtl_decl_stmt): Likewise.
10853 (gerntl_if_stmt): Likewise.
10854 (genrtl_while_stmt): Likewise.
10855 (genrtl_do_stmt): Likewise.
10856 (genrtl_return_stmt): Likewise.
10857 (genrtl_for_stmt): Likewise.
10858 (genrtl_break_stmt): Likewise.
10859 (genrtl_continue_stmt): Likewise.
10860 (genrtl_scope_stmt): Likewise.
10861 (genrtl_switch_stmt): Likewise.
10862 (genrtl_case_label): Likewise.
10863 (genrtl_begin_compound_stmt): Likewise.
10864 (genrtl_finish_compound_stmt): Likewise.
10865 (genrtl_compound_stmt): Likewise.
10866 (genrtl_asm_stmt): Likewise.
10867 (genrtl_decl_cleanup): Likewise.
10868 (expand_cond): Likewise.
10869 (expand_stmt): Renamed to ...
10870 (lang_expand_stmt): ... this.
10871 (lang_expand_expr_stmt): Initialize.
10872 (set_current_function_name_declared): Likewise.
10873 (stmts_are_full_exprs_p): Likewise.
10874 (current_function_name_declared): Likewise.
10875 (anon_aggr_type_p): Likewise.
10876 (do_poplevel): Change reference to
10877 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
10878 Change reference to stmts_are_full_exprs_p to
10879 current_stmt_tree->stmts_are_full_exprs_p.
10880 (add_tree): Likewise.
10881 (finish_expr_stmt): Likewise.
10882 (prep_stmt): Likewise.
10883 (lang_expand_stmt): Likewise.
10884 (begin_compound_stmt): Change reference to
10885 current_function_name_declared to
10886 cp_function_chain->name_declared and call to
10887 current_function_name_declared().
10888 (setup_vtbl_ptr): Likewise.
10889 (genrtl_do_poplevel): Removed.
10890
10891 2000-06-30 Jason Merrill <jason@redhat.com>
10892
10893 * init.c (init_init_processing): Go back to aligning like
10894 double_type_node for old ABI.
10895 (get_cookie_size): Make cookie larger if we get a type that needs
10896 more alignment.
10897 (build_vec_delete): Call it.
10898
10899 * typeck.c (qualify_type_recursive): New fn.
10900 (composite_pointer_type): Use it.
10901 (build_binary_op): Use composite_pointer_type.
10902
10903 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
10904 Jason Merrill <jason@redhat.com>
10905
10906 * typeck.c (check_return_expr): Don't complain about returning
10907 NULL from operator new if -fcheck-new.
10908 * cp-tree.h: Declare flag_check_new here.
10909 * init.c: Not here.
10910
10911 2000-06-28 Alex Samuel <samuel@codesourcery.com>
10912
10913 * mangle.c (find_substitution): Use same_type_p.
10914 (write_encoding): Don't check for substitutions.
10915
10916 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
10917
10918 * parse.y (expr_no_comma_rangle): New non-terminal.
10919 (template_parm): Use it for default parameter case.
10920 (template_arg): Use it.
10921 (expr_no_commas): Remove commented out undefined extensions.
10922 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
10923 * parse.h, parse.c: Rebuilt.
10924
10925 2000-06-30 Mark Mitchell <mark@codesourcery.com>
10926
10927 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
10928 (finish_asm_stmt): Do it here, instead.
10929
10930 * cp-tree.h (ridpointers): Don't declare.
10931 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
10932 (record_builtin_java_type): Likewise.
10933 (init_decl_processing): Likewise.
10934 * lex.c: Move inclusion of lex.h.
10935 (ridpointers): Don't define.
10936 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
10937 RID_MAX.
10938 * lex.h (enum rid): Rename to ...
10939 (enum cp_rid): ... this.
10940 (ridpointers): Don't declare.
10941 * parse.y: Move inclusion of lex.h.
10942 * parse.c: Regenerated.
10943 * spew.c: Move inclusion of lex.h.
10944
10945 * cp-tree.h (struct language_function): Remove temp_name_counter.
10946 (temp_name_counter): Remove.
10947 (get_temp_name): Change prototype.
10948 (get_guard): New function.
10949 (get_guard_cond): Likewise.
10950 (set_guard): Likewise.
10951 * cvt.c (build_up_reference): Adjust call to get_temp_name.
10952 * decl.c (expand_static_init): Use get_guard and friends to
10953 implement guard variables.
10954 * decl2.c (get_temp_name): Assume that the variables created are
10955 always static.
10956 (get_sentry): Rename to ...
10957 (get_guard): ... this. Implement new ABI guard variables.
10958 (get_guard_bits): New function.
10959 (get_guard_cond): Likewise.
10960 (set_guard): Likewise.
10961 (start_static_initialization_or_destruction): Use them.
10962 (do_static_initialization): Replace sentry with guard throughout.
10963 (do_static_destruction): Likewise.
10964 * init.c (create_temporary_var): Add comment.
10965
10966 2000-06-28 Alex Samuel <samuel@codesourcery.com>
10967
10968 * mangle.c (find_substitution): Use same_type_p.
10969 (write_encoding): Don't check for substitutions.
10970
10971 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
10972
10973 * parse.y (expr_no_comma_rangle): New non-terminal.
10974 (template_parm): Use it for default parameter case.
10975 (template_arg): Use it.
10976 (expr_no_commas): Remove commented out undefined extensions.
10977 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
10978 * parse.h, parse.c: Rebuilt.
10979
10980 2000-06-29 Mark Mitchell <mark@codesourcery.com>
10981
10982 * cp-tree.h (flag_const_strings): Remove.
10983 (warn_parentheses): Likewise.
10984 (warn_format): Likewise.
10985 (common_type): Likewise.
10986 (default_conversion): Likewise.
10987 (build_binary_op): Likewise.
10988 (cp_build_binary_op): New macro.
10989 * call.c (build_new_op): Use cp_build_binary_op instead of
10990 build_binary_op.
10991 * class.c (build_vtable_entry_ref): Likewise.
10992 * decl.c (expand_static_init): Likewise.
10993 (compute_array_index_type): Likewise.
10994 (build_enumerator): Likewise.
10995 * decl2.c (delete_sanity): Likewise.
10996 (start_static_initialization_or_destruction): Likewise.
10997 * error.c (dump_type_suffix): Likewise.
10998 * init.c (resolve_offset_ref): Likewise.
10999 (build_new): Likewise.
11000 (build_new_1): Likewise.
11001 (build_vec_delete_1): Likewise.
11002 (build_vec_init): Likewise.
11003 (build_delete): Likewise.
11004 * rtti.c (synthesize_tinfo_fn): Likewise.
11005 (synthesize_tinfo_var): Likewise.
11006 * search.c (expand_upcast_fixups): Likewise.
11007 (fixup_all_virtual_upcast_offsets): Likewise.
11008 * typeck.c (build_array_ref): Likewise.
11009 (get_member_function_from_ptrfunc): Likewise.
11010 (build_binary_op): Add parameter.
11011 (pointer_int_sum): Use cp_build_binary_op.
11012 (pointer_diff): Likewise.
11013 (build_modify_expr): Likewise.
11014 (get_delta_difference): Likewise.
11015 (build_ptrmemfunc): Likewise.
11016
11017 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
11018
11019 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
11020 * decl.c (create_implicit_typedef): Adjust.
11021 * decl2.c (build_artificial_parm): Adjust.
11022 * method.c (implicitly_declare_fn): Adjust.
11023 * pt.c (push_inline_template_parms_recursive): Adjust.
11024 (process_template_parm): Adjust.
11025 (overloaded_template_name): Adjust.
11026 * semantics.c (finish_template_template_parm): Adjust.
11027
11028 2000-06-28 Mark Mitchell <mark@codesourcery.com>
11029
11030 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
11031 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
11032 where to emit thunks.
11033 (build_vtt): Adjust call to build_vtt_inits.
11034 (build_vtt_inits): Add parameter to indicate whether or not
11035 sub-VTTs for virtual bases should be included. Adjust handling of
11036 construction vtables.
11037 (get_matching_base): New function.
11038 (dfs_build_vtt_inits): Rename to ...
11039 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
11040 construction vtables.
11041 (dfs_fixup_binfo_vtbls): Likewise.
11042 (build_ctor_vtbl_groups): Build construction vtables for virtual
11043 bases, too.
11044 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
11045 to build construction vtbls.
11046 (dfs_accumulate_vtbl_inits): Adjust handling of
11047 construction vtables.
11048
11049 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
11050 types correctly.
11051
11052 2000-06-27 Mark Mitchell <mark@codesourcery.com>
11053
11054 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
11055
11056 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
11057
11058 * search.c (hides): Remove.
11059 (is_subobject_of_p): Add most_derived parameter. Use
11060 CANONICAL_BINFO.
11061 (lookup_field_queue_p): Adjust.
11062 (lookup_field_r): Adjust.
11063
11064 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
11065
11066 * decl2.c (handle_class_head): Bash typedefs to the type's main
11067 decl.
11068
11069 2000-06-25 Mark Mitchell <mark@codesourcery.com>
11070
11071 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
11072 (begin_global_stmt_expr): ... this.
11073 (genrtl_finish_stmt_expr): Rename to ...
11074 (finish_global_stmt_expr): ... this.
11075 * init.c (begin_init_stmts): Adjust calls.
11076 (finish_init_stmts): Likewise.
11077 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
11078 (begin_global_stmt_expr): ... this.
11079 (genrtl_finish_stmt_expr): Rename to ...
11080 (finish_global_stmt_expr): ... this.
11081
11082 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11083
11084 * search.c (lookup_member): Fix typo in comment.
11085
11086 2000-06-24 Jason Merrill <jason@redhat.com>
11087
11088 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
11089 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
11090
11091 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11092
11093 * parse.y (complex_direct_notype_declarator): Support global_scope.
11094 * Makefile.in: Adjust conflict count.
11095
11096 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11097
11098 * parse.y (template_arg): Convert TEMPLATE_DECL
11099 that is a template template parameter to
11100 TEMPLATE_TEMPLATE_PARM here.
11101
11102 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
11103 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
11104 (copy_template_template_parm): Adjust prototype.
11105 * decl.c (grokdeclarator): Remove dead code.
11106 * pt.c (process_template_parm): Tidy.
11107 (lookup_template_class): Construct nodes in
11108 copy_template_template_parm.
11109 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
11110 lookup_template_class. Use TYPE_TI_TEMPLATE.
11111 * tree.c (copy_template_template_parm): Add NEWARGS
11112 parameter.
11113 (mapcar): Adjust call to copy_template_template_parm.
11114 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
11115 * method.c (build_template_template_parm_names): Change error
11116 code to avoid compilation warning.
11117
11118 * gxxint.texi: Document template template parameter
11119 name mangling.
11120
11121 2000-06-21 Alex Samuel <samuel@codesourcery.com>
11122
11123 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
11124 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
11125 (cp-demangle.o): New rule.
11126 (dyn-string.o): Likewise.
11127 * inc/cxxabi.h (__cxa_demangle): New declaration.
11128
11129 2000-06-22 Mark Mitchell <mark@codesourcery.com>
11130
11131 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
11132 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
11133 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
11134 a tree, not an int.
11135 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
11136 (make_thunk): Change prototype.
11137 (emit_thunk): Rename to use_thunk.
11138 (mangle_thunk): Change prototype.
11139 * class.c (get_derived_offset): Simplify.
11140 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
11141 BV_GENERATE_THUNK_WITH_VTABLE_P.
11142 (build_primary_vtable): Simplify.
11143 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
11144 (dfs_find_base): Remove.
11145 (update_vtable_entry_for_fn): Correct bug in finding the base
11146 where a virtual function was first declared. Figure out whether
11147 or not to emit a vcall-thunk with the vtables in which it appears.
11148 Correct logic for deciding whether to use an ordinary thunk, or a
11149 vcall thunk.
11150 (finish_struct_1): Remove unnecssary code.
11151 (build_vtbl_initializer): Use ssize_int for the running counter of
11152 negative indices.
11153 (build_vtbl_initializer): Only use vcall thunks where necessary.
11154 Mark thunks as needing to be emitted with their vtables, or not.
11155 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
11156 indices. Use size_binop.
11157 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
11158 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
11159 size_binop.
11160 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
11161 (build_vtable_entry): Mark thunks as needing to be emitted with
11162 their vtables, or not.
11163 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
11164 * decl2.c (mark_vtable_entries): Use use_thunk instead of
11165 emit_thunk.
11166 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
11167 information.
11168 * error.c (dump_expr): Use BV_FN.
11169 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
11170 not an int.
11171 * method.c (make_thunk): Likewise.
11172 (emit_thunk): Rename to use_thunk. Allow callers to decide
11173 whether or not to actually emit the thunk. Adjust for changes in
11174 representation of vcall offsets.
11175 * search.c (dfs_get_pure_virtuals): Use BV_FN.
11176 * semantics.c (emit_associated_thunks): New function.
11177 (expand_body): Use it.
11178 * ir.texi: Adjust decriptions of thunks.
11179
11180 2000-06-22 Jason Merrill <jason@redhat.com>
11181
11182 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
11183 (tsubst_friend_function): Copy it here.
11184
11185 * decl.c (grok_op_properties): Fix typo.
11186
11187 * decl2.c (delete_sanity): Clarify warning, avoid failure on
11188 deleting void*.
11189
11190 * pt.c (check_explicit_specialization): Clarify error.
11191
11192 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
11193 an old OVERLOAD when we're declaring a non-function.
11194 (pushdecl, destroy_local_var): Check for error_mark_node.
11195 (warn_extern_redeclared_static): Also bail early if
11196 we're a CONST_DECL.
11197 (push_overloaded_decl): Ignore an old error_mark_node.
11198
11199 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
11200
11201 * call.c (build_x_va_arg): Check if in a template decl.
11202 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
11203
11204 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
11205
11206 * class.c (push_lang_context): TYPE_NAME gets you to the Java
11207 types DECLs.
11208 * decl.c (check_goto): Computed gotos assumed OK.
11209
11210 2000-06-20 Jason Merrill <jason@redhat.com>
11211
11212 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
11213 for which we don't need to look for instantiations.
11214
11215 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
11216
11217 * parse.y (program): Always call finish_translation_unit.
11218 * parse.c, parse.h: Rebuilt.
11219
11220 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
11221
11222 * method.c: Don't include hard-reg-set.h.
11223
11224 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
11225
11226 * rtti.c (get_base_offset): Cope when vbase field is in a base.
11227
11228 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
11229
11230 * call.c (build_conditional_expr): Use VOID_TYPE_P.
11231 * cvt.c (cp_convert_to_pointer): Likewise.
11232 (convert_to_void): Likewise.
11233 * error.c (dump_expr): Likewise.
11234 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
11235 * init.c (build_delete): Likewise.
11236 * method.c (emit_thunk): Likewise.
11237 * optmize.c (declare_return_variable): Likewise.
11238 * rtti.c (get_tinfo_decl_dynamic): Likewise.
11239 (get_typeid): Likewise.
11240 (build_dynamic_cast_1): Likewise.
11241 * typeck.c (composite_pointer_type): Likewise.
11242 (common_type): Likewise.
11243 (build_indirect_ref): Likewise.
11244 (build_binary_op): Likewise.
11245 (build_x_compound_expr): Likewise.
11246 (check_return_expr): Likewise.
11247 * typeck2.c (add_exception_specifier): Likewise.
11248
11249 * mangle.c (write_method_parms): Use direct comparison for end
11250 of parmlist.
11251
11252 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
11253
11254 * cp-tree.h (genrtl_try_block): Declare function.
11255 (genrtl_handler): Likewise.
11256 (genrtl_catch_block): Likewise.
11257 (genrtl_ctor_stmt): Likewise.
11258 (genrtl_subobject): Likewise.
11259 (genrtl_decl_cleanup): Likewise.
11260 (genrtl_do_poplevel): Likewise.
11261 (genrtl_do_pushlevel): Likewise.
11262 (genrtl_clear_out_block): Likewise.
11263 (genrtl_goto_stmt): Likewise.
11264 (genrtl_expr_stmt): Likewise.
11265 (genrtl_decl_stmt): Likewise.
11266 (genrtl_if_stmt): Likewise.
11267 (genrtl_while_stmt): Likewise.
11268 (genrtl_do_stmt): Likewise.
11269 (genrtl_return_stmt): Likewise.
11270 (genrtl_for_stmt): Likewise.
11271 (genrtl_break_stmt): Likewise.
11272 (genrtl_continue_stmt): Likewise.
11273 (genrtl_scope_stmt): Likewise.
11274 (genrtl_switch_stmt): Likewise.
11275 (genrtl_case_label): Likewise.
11276 (genrtl_begin_compound_stmt): Likewise.
11277 (genrtl_finish_compound_stmt): Likewise.
11278 (genrtl_compound_stmt): Likewise.
11279 (genrtl_asm_stmt): Likewise.
11280 (genrtl_named_return_value): Likewise.
11281 (genrtl_begin_stmt_expr): Likewise.
11282 (genrtl_finish_stmt_expr): Likewise.
11283 (finish_for_stmt): Removed first argument.
11284 (finish_switch_stmt): Likewise.
11285
11286 * semantics.c (genrtl_try_block): Define function.
11287 (genrtl_handler): Likewise.
11288 (genrtl_catch_block): Likewise.
11289 (genrtl_ctor_stmt): Likewise.
11290 (genrtl_subobject): Likewise.
11291 (genrtl_decl_cleanup): Likewise.
11292 (genrtl_do_poplevel): Likewise.
11293 (genrtl_do_pushlevel): Likewise.
11294 (genrtl_clear_out_block): Likewise.
11295 (genrtl_goto_stmt): Likewise.
11296 (genrtl_expr_stmt): Likewise.
11297 (genrtl_decl_stmt): Likewise.
11298 (genrtl_if_stmt): Likewise.
11299 (genrtl_while_stmt): Likewise.
11300 (genrtl_do_stmt): Likewise.
11301 (genrtl_return_stmt): Likewise.
11302 (genrtl_for_stmt): Likewise.
11303 (genrtl_break_stmt): Likewise.
11304 (genrtl_continue_stmt): Likewise.
11305 (genrtl_scope_stmt): Likewise.
11306 (genrtl_switch_stmt): Likewise.
11307 (genrtl_case_label): Likewise.
11308 (genrtl_begin_compound_stmt): Likewise.
11309 (genrtl_finish_compound_stmt): Likewise.
11310 (genrtl_compound_stmt): Likewise.
11311 (genrtl_asm_stmt): Likewise.
11312 (genrtl_named_return_value): Likewise.
11313 (genrtl_begin_stmt_expr): Likewise.
11314 (genrtl_finish_stmt_expr): Likewise.
11315 (finish_for_stmt): Removed first argument and generate rtl
11316 specific code.
11317 (finish_switch_stmt): Likewise.
11318 (do_poplevel): Removed generate rtl specific code.
11319 (do_pushlevel): Likewise.
11320 (add_tree): Likewise.
11321 (finish_goto_stmt): Likewise.
11322 (finish_expr_stmt): Likewise.
11323 (begin_if_stmt): Likewise.
11324 (finish_if_stmt_cond): Likewise.
11325 (finish_then_clause): Likewise.
11326 (begin_else_clause): Likewise.
11327 (finish_else_clause): Likewise.
11328 (finish_if_stmt): Likewise.
11329 (clear_out_block): Likewise.
11330 (begin_while_stmt): Likewise.
11331 (finish_while_stmt_cond): Likewise.
11332 (finish_while_stmt): Likewise.
11333 (begin_do_stmt): Likewise.
11334 (finish_do_body): Likewise.
11335 (finish_do_stmt): Likewise.
11336 (finish_return_stmt): Likewise.
11337 (begin_for_stmt): Likewise.
11338 (finish_for_init_stmt): Likewise.
11339 (finish_for_cond): Likewise.
11340 (finish_for_expr): Likewise.
11341 (finish_break_stmt): Likewise.
11342 (finish_continue_stmt): Likewise.
11343 (begin_switch_stmt): Likewise.
11344 (finish_switch_cond): Likewise.
11345 (finish_case_label): Likewise.
11346 (begin_try_block): Likewise.
11347 (begin_function_try_block): Likewise.
11348 (finish_try_block): Likewise.
11349 (finish_cleanup_try_block): Likewise.
11350 (finish_cleanup): Likewise.
11351 (finish_function_try_block): Likewise.
11352 (finish_handler_sequence): Likewise.
11353 (finish_function_handler_sequence): Likewise.
11354 (begin_handler): Likewise.
11355 (finish_handler_parms): Likewise.
11356 (begin_catch_block): Likewise.
11357 (finish_handler): Likewise.
11358 (begin_compound_stmt): Likewise.
11359 (finish_compound_stmt): Likewise.
11360 (finish_asm_stmt): Likewise.
11361 (finish_label_stmt): Likewise.
11362 (finish_label_decl): Likewise.
11363 (finish_subobject): Likewise.
11364 (finish_decl_cleanup): Likewise.
11365 (finish_named_return_value): Likewise.
11366 (begin_stmt_expr): Likewise.
11367 (finish_stmt_expr): Likewise.
11368
11369 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
11370 to call genrtl_expr_stmt when appropriate.
11371
11372 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
11373 begin_compound_expr to call genrtl_begin_stmt_expr and
11374 genrtl_begin_compound_expr when appropriate.
11375 (finish_init_stmts): Changed calls to finish_compound_expr and
11376 finish_stmt_expr to call genrtl_finish_compound_expr and
11377 genrtl_finish_stmt_expr when appropriate.
11378 (expand_default_init): Changed call to finish_expr_stmt to call
11379 genrtl_expr_stmt when appropriate.
11380 (build_vec_init): Likewise.
11381
11382 * parse.y (simple_stmt): Removed first argument from call to
11383 finish_for_stmt. Removed first argument from call to
11384 finish_switch_stmt.
11385
11386 * parse.c: Regenerated.
11387
11388 * pt.c (tsubst_expr): Removed first argument from call to
11389 finish_for_stmt. Removed first argument from call to
11390 finish_switch_stmt.
11391
11392 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
11393
11394 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
11395 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
11396
11397 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
11398 (cplus_tree_code_length[]): Likewise.
11399 (cplus_tree_code_name[]): Likewise.
11400 (init_parse): Added call to add_c_tree_codes. Changed
11401 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
11402
11403 2000-06-16 Mark Mitchell <mark@codesourcery.com>
11404
11405 * cp-tree.h (finish_mem_initializers): Declare.
11406 (count_trees): Likewise.
11407 * parse.y (base_init): Use finish_mem_initializers.
11408 * semantics.c (finish_mem_initializers): New function.
11409
11410 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
11411 the number of trees.
11412 (n_trees): Remove.
11413 (count_trees): Don't use it.
11414
11415 2000-06-15 Jason Merrill <jason@redhat.com>
11416
11417 * tree.c (count_trees): New debugging function.
11418
11419 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
11420 * init.c (build_member_call): Pull out the name of a DECL.
11421
11422 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
11423 * semantics.c (expand_body): Push to TV_INTEGRATION here.
11424 * optimize.c (optimize_function): Not here.
11425 * pt.c (instantiate_decl): Push to TV_PARSE.
11426
11427 2000-06-15 Mark Mitchell <mark@codesourcery.com>
11428
11429 * cp-tree.h (struct language_function): Remove x_base_init_list
11430 and x_member_init_list.
11431 (current_base_init_list): Remove.
11432 (current_member_init_list): Likewise.
11433 (setup_vtbl_ptr): Change prototype.
11434 (emit_base_init): Likewise.
11435 (expand_member_init): Likewise.
11436 (reinit_parse_for_function): Remove.
11437 * decl.c (save_function_data): Don't clear x_base_init_list and
11438 x_member_init_list.
11439 (mark_language_function): Don't mark them.
11440 * init.c (perform_member_init): Tweak comment.
11441 (sort_member_init): Take the list of initializers as an argument.
11442 (sort_base_init): Likewise.
11443 (emit_base_init): Likewise.
11444 (expand_member_init): Return the initializer. Don't use global
11445 variables.
11446 * lex.c (reinit_parse_for_function): Remove.
11447 * method.c (build_template_parm_names): Correct substitution.
11448 (do_build_copy_constructor): Don't use current_member_init_list
11449 and current_base_init_list.
11450 (synthesize_method): Likewise.
11451 * parse.y (base_init): Split mem-initializers into
11452 base-initializers and field-initializers.
11453 (member_init_list): Build up the list here.
11454 (member_init): Return the initializer.
11455 (fn.depfn): Don't use reinit_parse_for_function.
11456 * parse.c: Regenerated.
11457 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
11458 ERROR_MARK.
11459 (tsubst_expr): Don't use current_member_init_list
11460 and current_base_init_list.
11461 (tsubst_expr_values): Rename to ...
11462 (tsubst_initializer_list): ... this. Use convert_from_reference.
11463 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
11464 and current_base_init_list.
11465 (begin_function_definition): Don't call reinit_parse_for_function.
11466
11467 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
11468
11469 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
11470 correctly.
11471
11472 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
11473
11474 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
11475
11476 * cp-tree.h (IF_COND): Move to c-common.h.
11477 (THEN_CLAUSE): Likewise.
11478 (ELSE_CLAUSE): Likewise.
11479 (WHILE_COND): Likewise.
11480 (WHILE_BODY): Likewise.
11481 (DO_COND): Likewise.
11482 (DO_BODY): Likewise.
11483 (RETURN_EXPR): Likewise.
11484 (EXPR_STMT_EXPR): Likewise.
11485 (FOR_INIT_STMT): Likewise.
11486 (FOR_COND): Likewise.
11487 (FOR_EXPR): Likewise.
11488 (FOR_BODY): Likewise.
11489 (SWITCH_COND): Likewise.
11490 (SWITCH_BODY): Likewise.
11491 (CASE_LOW): Likewise.
11492 (CASE_HIGH): Likewise.
11493 (GOTO_DESTINATION): Likewise.
11494 (COMPOUND_BODY): Likewise.
11495 (ASM_CV_QUAL): Likewise.
11496 (ASM_STRING): Likewise.
11497 (ASM_OUTPUTS): Likewise.
11498 (ASM_INPUTS): Likewise.
11499 (ASM_CLOBBERS): Likewise.
11500 (DECL_STMT_DECL): Likewise.
11501 (STMT_EXPR_STMT): Likewise.
11502 (LABEL_STMT_LABEL): Likewise.
11503 (SCOPE_BEGIN_P): Likewise.
11504 (SCOPE_END_P): Likewise.
11505 (SCOPE_STMT_BLOCK): Likewise.
11506 (SCOPE_NULLIFIED_P): Likewise.
11507 (SCOPE_NO_CLEANUPS_P): Likewise.
11508 (SCOPE_PARTIAL_P): Likewise.
11509 (ASM_VOLATILE_P): Likewise.
11510 (STMT_LINENO): Likewise.
11511 (STMT_LINENO_FOR_FN_P): Likewise.
11512
11513 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
11514 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
11515 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
11516 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
11517 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
11518
11519 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
11520
11521 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
11522 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
11523
11524 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
11525 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
11526 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
11527
11528 2000-06-14 Mark Mitchell <mark@codesourcery.com>
11529
11530 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
11531 * class.c (dfs_find_final_overrider): Set it appropriately.
11532 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
11533 avoid unneeded secondary vptrs.
11534
11535 2000-06-13 Jakub Jelinek <jakub@redhat.com>
11536
11537 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
11538 (check_bitfield_decl, check_field_decl): Likewise.
11539 (build_vtbl_or_vbase_field, build_base_field): Likewise.
11540 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
11541 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
11542 (xfer_tag, finish_enum): Likewise.
11543 * decl2.c (finish_builtin_type): Likewise.
11544 * init.c (init_init_processing): Likewise.
11545 * pt.c (instantiate_class_template): Likewise.
11546 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
11547 * cp-tree.h (struct lang_type): Add user_align member.
11548 (CLASSTYPE_USER_ALIGN): Define.
11549
11550 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
11551
11552 * Make-lang.in (c++.install-common): Install g++-cross in
11553 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
11554 $(target_alias)-g++ and $(target_alias)-c++.
11555
11556 2000-06-12 Mark Mitchell <mark@codesourcery.com>
11557
11558 * class.c (vcall_offset_data_s): Add last_init and fns.
11559 (overrides): Rename to same_signature_p.
11560 (dfs_find_final_overrider): Adjust accordingly.
11561 (mark_overriders): Likewise.
11562 (warn_hidden): Likewise.
11563 (build_vtbl_initializer): Reorganize machinery for building things
11564 at negative offsets.
11565 (build_vcall_and_vbase_vtbl_entries): Likewise.
11566 (build_vbase_offset_vtbl_entries): Likewise.
11567 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
11568 offset entries. Do not create two entries for functions with the
11569 same signature.
11570 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
11571 (build_rtti_vtbl_entries): Reorganize machinery for building things
11572 at negative offsets.
11573
11574 * optimize.c (expand_call_inline): Don't recurse into the code
11575 used to initialize the parameters more than once.
11576
11577 2000-06-11 Mark Mitchell <mark@codesourcery.com>
11578
11579 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
11580 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
11581 (find_substitution): Only use the `Sa' substitution for
11582 std::allocator, not instantiations of it.
11583 (write_template_prefix): Move comment. Only use a TREE_LIST to
11584 represent substitutions for a member template.
11585 (write_array_type): Mangle array dimensions correctly.
11586 * optimize.c (maybe_clone_body): Copy more information from the
11587 cloned function.
11588 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
11589 on the regenerated declaration.
11590
11591 2000-06-11 Chip Salzenberg <chip@valinux.com>
11592 Mark Mitchell <mark@codesourcery.com>
11593
11594 * class.c (build_vtable): Clarify comment.
11595 (build_ctor_vtbl_group): Pass the most derived type to
11596 build_vtable.
11597
11598 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11599
11600 * decl2.c (compare_options): Don't needlessly cast away const-ness.
11601
11602 2000-06-10 Mark Mitchell <mark@codesourcery.com>
11603
11604 * decl.c (add_binding): Handle duplicate declarations of external
11605 variables.
11606
11607 2000-06-09 Chip Salzenberg <chip@valinux.com>
11608 Mark Mitchell <mark@codesourcery.com>
11609
11610 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
11611 argument.
11612 (write_signed_number): New macro.
11613 (write_unsigned_number): Likewise.
11614 (write_source_name): Use them.
11615 (write_number): Handle signed and unsigned values.
11616 (write_integer_cst): Use tree_int_cst_sgn, and use
11617 write_unsigned_number or write_signed_number as appropriate.
11618 (write_discriminator): Use write_unsigned_number or
11619 write_signed_number as appropriate.
11620 (write_template_arg_literal): Likewise.
11621 (write_array_type): Use tree_low_cst.
11622 (write_template_parm): Use write_unsigned_number or
11623 write_signed_number as appropriate.
11624 (write_substitution): Adjust call to write_number.
11625 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
11626 (write_expression): Handle non-type template arguments of
11627 reference type correctly.
11628 (mangle_thunk): Use write_signed_number.
11629
11630 2000-06-09 Chip Salzenberg <chip@valinux.com>
11631
11632 * mangle.c (find_substition): Don't mangle objects with typename
11633 substitutions (e.g. "cin" as "Si").
11634
11635 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
11636
11637 * call.c (add_candidate): Use ggc_alloc_cleared.
11638 * decl.c (lookup_label): Likewise.
11639 * lex.c (retrofit_lang_decl): Likewise.
11640
11641 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
11642
11643 * semantics.c (expand_body): Push to TV_EXPAND.
11644 * optimize.c (optimize_function): Push to TV_INTEGRATION.
11645 * decl.c (start_function): Always call announce_function.
11646
11647 * tinfo2.cc: Just declare abort.
11648
11649 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
11650
11651 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
11652 whenever @ is a symbolic name.
11653
11654 2000-06-08 Jakub Jelinek <jakub@redhat.com>
11655
11656 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
11657
11658 2000-06-07 Mark Mitchell <mark@codesourcery.com>
11659
11660 * decl.c (pushdecl): Look up functions by DECL_NAME, not
11661 DECL_ASSEMBLER_NAME.
11662
11663 2000-06-06 Mark Mitchell <mark@codesourcery.com>
11664
11665 * decl2.c (c_language): Define.
11666
11667 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
11668
11669 * lex.c (lang_init_options): Tweak.
11670
11671 * decl2.c: Remove #inclusion of diagnostic.h
11672 (lang_decode_option): Move diagnostic formatting options to
11673 toplevel.
11674
11675 * lang-options.h: Remove documentation for diagnostic options.
11676
11677 * Makefile.in (lex.o): Depends upon diagnostic.h
11678
11679 2000-06-06 Mark Mitchell <mark@codesourcery.com>
11680
11681 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
11682 the same DECL_RESULT, it's not a redefinition.
11683 * pt.c (tsubst_decl): Remove code to handle illegal
11684 specializations.
11685
11686 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
11687
11688 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
11689
11690 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
11691
11692 * search.c (maybe_suppress_debug_info): Don't check
11693 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
11694
11695 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
11696 here if extern_p.
11697
11698 Remember instantiation context in deferred instantiations.
11699 * cp-tree.h (struct tinst_level): Remove.
11700 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
11701 * pt.c (current_tinst_level): Now a tree.
11702 (print_template_context, push_tinst_level, pop_tinst_level,
11703 tinst_for_decl): Adjust.
11704 (reopen_tinst_level): New fn.
11705 (init_pt): Register current_tinst_level as a root.
11706 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
11707 of the pending templates list.
11708 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
11709 * lex.c (extract_interface_info): Adjust.
11710 * decl2.c (warn_if_unknown_interface): Adjust.
11711
11712 2000-06-05 Mark Mitchell <mark@codesourcery.com>
11713
11714 * class.c (indirect_primary_base_p): New function.
11715 (determine_primary_base): Use it.
11716
11717 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
11718
11719 Update new-abi dynamic cast algorithm.
11720 * tinfo.cc (__class_type_info::__dyncast_result): Add
11721 whole_details. Adjust constructor.
11722 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
11723 Avoid unnecessary searching.
11724 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
11725
11726 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11727
11728 * decl.c (init_decl_processing): Don't call record_component_aliases.
11729 * tree.c (build_cplus_array_type_1): Likewise.
11730
11731 2000-06-04 Mark Mitchell <mark@codesourcery.com>
11732
11733 * ir.texi: Correct typo.
11734 * mangle.c (write_expression): Handle non-type template arguments
11735 with reference type.
11736 * method.c (build_overload_value): Likewise.
11737 * pt.c (convert_nontype_argument): Explicitly represent conversion
11738 to a reference with an ADDR_EXPR.
11739 (unify): Always unify arguments in left-to-right order.
11740
11741 2000-06-03 Alex Samuel <samuel@codesourcery.com>
11742 Mark Mitchell <mark@codesourcery.com>
11743
11744 * Make-lang.in (CXX_SRCS): Add mangle.c.
11745 * Makefile.in (CXX_OBJS): Add mangle.o.
11746 (mangle.o): New rule.
11747
11748 * class.c (local_classes): New variable.
11749 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
11750 (get_vtt_name): Use mangle_vtt_name for new ABI.
11751 (init_class_processing): Initialize local_classes.
11752 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
11753 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
11754 (std_identifier): New macro.
11755 (DECL_VOLATILE_MEMFUNC_P): New macro.
11756 (DECL_NAMESPACE_STD_P): Likewise.
11757 (local_classes): Declare.
11758 (get_mostly_instantiated_function_type): Declare.
11759 (init_mangle): Declare.
11760 (mangle_decl): Likewise.
11761 (mangle_type_string): Likewise.
11762 (mangle_type): Likewise.
11763 (mangle_typeinfo_for_type): Likewise.
11764 (mangle_typeinfo_string_for_type): Likewise.
11765 (mangle_vtbl_for_type): Likewise.
11766 (mangle_vtt_for_type): Likewise.
11767 (mangle_ctor_vtbl_for_type): Likewise.
11768 (mangle_thunk): Likewise.
11769 (mangle_conv_op_name_for_type): Likewise.
11770 (mangle_guard_variable): Likewise.
11771 * decl.c (pushtag): Keep track of local classes.
11772 (initialize_predefined_identifiers): Initialize std_identifier.
11773 (init_decl_processing): Use std_identifier.
11774 (start_decl): Don't treat instantiations as specializations.
11775 (grokdeclarator): Likewise.
11776 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
11777 name for fully-instantiated templates.
11778 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
11779 destructors with the new ABI.
11780 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
11781 (grokfield): Use mangle_type for new ABI.
11782 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
11783 (get_sentry): Use mangle_guard_variable for new ABI.
11784 (start_static_initialization_or_destruction): Likewise.
11785 * expr.c (extract_aggr_init): Remove.
11786 (extract_scalar_init): Likewise.
11787 (extract_init): Remove #if 0'd code.
11788 * mangle.c: New function.
11789 * method.c (build_mangled_name): Assert not flag_new_abi.
11790 (build_static_name): Likewise.
11791 (build_decl_overload_real): Likewise.
11792 (build_typename_overload): Likewise.
11793 (build_overload_with_type): Likewise.
11794 (build_overload_name): Likewise.
11795 (get_ctor_vtbl_name): Likewise.
11796 (start_squangling): Likewise.
11797 (get_id_2): Likewise.
11798 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
11799 (init_method): Call init_mangle for new ABI.
11800 (make_thunk): Call mangle_thunk for new ABI.
11801 * operators.def: Correct new ABI manglings for the `%' operator.
11802 Add `::' operator.
11803 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
11804 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
11805 (lookup_template_class): Call mangle_decl for new ABI.
11806 (get_mostly_instantiated_function_type): New function.
11807 (set_mangled_name_for_template_decl): Use it.
11808 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
11809 the new ABI. Use mangle_conv_op_name_for_type for instantiated
11810 conversion op names.
11811 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
11812 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
11813 (tinfo_base_init): Likewise. Mangle typeinfo string name with
11814 mangle_typeinfo_string_for_type.
11815
11816 2000-06-03 Mark Mitchell <mark@codesourcery.com>
11817
11818 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
11819 (INNERMOST_TEMPLATE_ARGS): New macro.
11820 (innermost_args): Remove.
11821 (get_innermost_template_args): New function.
11822 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
11823 * error.c (dump_function_decl): Be caution when using
11824 most_general_template.
11825 * method.c (build_template_parm_names): Use
11826 INNERMOST_TEMPLATE_ARGS.
11827 * pt.c (add_to_template_args): Tidy comment
11828 (get_innermost_template_args): New function.
11829 (check_explicit_specialization): Clear DECL_INITIAL for a new
11830 specialization.
11831 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
11832 Tidy.
11833 (push_template_decl): Always register specializations of the most
11834 general template.
11835 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
11836 (coerce_template_parms): Likewise.
11837 (lookup_template_class): Likewise.
11838 (innermost_args): Remove.
11839 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
11840 (tsubst_decl): Handle tricky specializations. Use
11841 get_innermost_template_args.
11842 (instantiate_template): Simplify handling of partial
11843 instantiations.
11844 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
11845 (most_general_template): Reimplement, in a more straightforward
11846 manner.
11847 (regenerate_decl_from_template): Tweak formatting. Use
11848 TMPL_ARGS_DEPTH for clarity.
11849 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
11850
11851 * dump.c (dequeue_and_dump): Dump information about thunks.
11852
11853 2000-06-01 Richard Henderson <rth@cygnus.com>
11854
11855 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
11856
11857 2000-06-01 Richard Henderson <rth@cygnus.com>
11858
11859 * decl2.c (unsupported_options): Fix typo, make const.
11860 (lang_decode_option): Fix bsearch argument order.
11861
11862 2000-06-01 Mark Mitchell <mark@codesourcery.com>
11863
11864 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
11865 on FIELD_DECLs.
11866
11867 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11868
11869 * cp-tree.h (c_get_alias_set): Deleted.
11870 * Makefile.in (decl.o): Include ../expr.h.
11871 * decl.c (expr.h): Include.
11872 (init_decl_processing): Call record_component_aliases for arrays.
11873 (grokdeclarator): Likewise.
11874 Set TREE_ADDRESSABLE for fields that aren't bitfields.
11875 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
11876
11877 2000-05-31 Mark Mitchell <mark@codesourcery.com>
11878
11879 Remove guiding declaration support.
11880 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
11881 (flag_guiding_decls): Remove.
11882 * call.c (build_user_type_conversion_1): Remove support for
11883 guiding decls.
11884 (build_new_function_call): Likewise.
11885 (build_new_op): Likewise.
11886 (build_new_method_call): Likewise.
11887 * decl.c (start_function): Likewise.
11888 * friend.c (is_friend): Likewise.
11889 (do_friend): Likewise.
11890 * decl2.c ((flag_dump_translation_unit): Make it const.
11891 (flag_guiding_decls): Remove.
11892 (unsupported_options): New variable
11893 (compare_options): New function.
11894 (lang_decode_option): Use them.
11895
11896 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
11897
11898 * method.c (mangle_expression): Adjust test for legal expression
11899 operators.
11900
11901 * pt.c (instantiate_decl): Save and restore the local
11902 specializations list.
11903
11904 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
11905
11906 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
11907
11908 2000-05-30 Mark Mitchell <mark@codesourcery.com>
11909
11910 * call.c (add_template_candidate_real): Handle member template
11911 constructors for classes with virtual bases.
11912 (build_user_type_conversion_1): Use in_charge_arg_for_name.
11913 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
11914
11915 * ir.texi: Update thunk documentation.
11916
11917 * call.c (joust): Fix handling of overloaded builtin operators.
11918
11919 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
11920
11921 * cp-tree.h (DECL_ANTICIPATED): New macro.
11922 Document new use of DECL_LANG_FLAG_7.
11923 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
11924 in the user namespace.
11925 * lex.c (do_identifier): If the identifier's declaration has
11926 DECL_ANTICIPATED on, it has not yet been declared. But do not
11927 replace it with an ordinary implicit declaration.
11928
11929 * tinfo2.cc: Include stdlib.h.
11930
11931 2000-05-29 Mark Mitchell <mark@codesourcery.com>
11932
11933 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
11934 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
11935 CLASSTYPE_ALIGN.
11936
11937 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
11938
11939 * decl2.c (lang_decode_option): Use skip_leading_substring instead
11940 of plain strncmp.
11941
11942 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
11943
11944 * operators.def (<?): Duplicated, should have been...
11945 (>?): this. Fixed.
11946
11947 2000-05-27 Alex Samuel <samuel@codesourcery.com>
11948 Mark Mitchell <mark@codesourcery.com>
11949
11950 * cp-tree.h (ansi_opname): Make it a macro.
11951 (ansi_assopname): Likewise.
11952 (struct lang_decl_flags): Add assignment_operator_p.
11953 (struct lang_decl): Add operator_code.
11954 (DECL_VTT_PARM): Adjust.
11955 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
11956 overloaded operator.
11957 (SET_OVERLOADED_OPERATOR_CODE): New macro.
11958 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
11959 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
11960 (opname_tab): Remove.
11961 (assignop_tab): Likewise.
11962 (operator_name_info_t): New type.
11963 (operator_name_info): New variable.
11964 (assignment_operator_name_info): Likewise.
11965 (build_cp_library_fn): Remove declaration.
11966 (push_cp_library_fn): Likewise.
11967 (operator_name_string): Likewise.
11968 (build_decl_overload): Likewise.
11969 * call.c (print_z_candidates): Simplify.
11970 (build_object_call): Adjust usage of ansi_opname. Use
11971 DECL_OVERLOADED_OPERATOR_P.
11972 (op_error): Adjust operator name lookup.
11973 (build_conditional_expr): Adjust usage of ansi_opname.
11974 (build_new_op): Likewise.
11975 (build_op_delete_call): Likewise.
11976 (build_over_call): Likewise.
11977 (joust): Use DECL_OVERLOADED_OPERATOR_P.
11978 * decl.c (duplicate_decls): Copy operator_code.
11979 (init_decl_processing): Adjust parameters to push_cp_library_fn.
11980 (builtin_function): Adjust parameters to build_library_fn_1.
11981 (build_library_fn_1): Accept an overloaded operator code.
11982 (build_library_fn): Pass ERROR_MARK.
11983 (build_cp_library_fn): Accept an overloaded operator code.
11984 (push_cp_library_fn): Likewise.
11985 (grokfndecl): Tweak.
11986 (grokdeclarator): Simplify code to compute names of overloaded
11987 operators. Adjust use of ansi_opname.
11988 (ambi_op_p): Work on tree_codes, not identifiers.
11989 (unary_op_p): Likewise.
11990 (grok_op_properties): Likewise.
11991 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
11992 (lang_mark_tree): Don't try to mark the operator_code.
11993 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
11994 * error.c (dump_decl): Remove special handling for operator
11995 names.
11996 (dump_function_name): Likewise.
11997 (dump_expr): Adjust name lookup of operators.
11998 (op_to_string): Simplify.
11999 (assop_to_string): Likewise.
12000 * init.c (build_new_1): Adjust use of ansi_opname.
12001 * lex.c (opname_tab): Remove.
12002 (assignop_tab): Likewise.
12003 (ansi_opname): Likewise.
12004 (ansi_assopname): Likewise.
12005 (operator_name_string): Likewise.
12006 (reinit_lang_specific): Likewise.
12007 (operator_name_info): New variable.
12008 (assignment_operator_name_info): Likewise.
12009 (init_operators): New function.
12010 (init_parse): Use it.
12011 (do_identifier): Adjust use of ansi_opname.
12012 * method.c (mangle_expression): Don't use ansi_opname for
12013 mangling.
12014 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
12015 (build_decl_overload): Remove.
12016 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
12017 (do_build_assign_ref): Adjust use of ansi_opname.
12018 (synthesize_method): Likewise.
12019 (implicitly_declare_fn): Likewise.
12020 * operators.def: New file.
12021 * parse.y (operator): Adjust use of ansi_opname.
12022 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
12023 (set_mangled_name_for_template_decl): Don't play games with
12024 current_namespace.
12025 (special_function_p): Adjust use of ansi_opname.
12026 * typeck.c (check_return_expr): Likewise.
12027 * Make-lang.in (cc1plus): Depend on operators.def.
12028 * Makefile.in (lex.o): Likewise.
12029 (decl.o): Likewise.
12030
12031 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
12032
12033 * Make-lang.in (cplib2.ready): Eradicate.
12034
12035 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12036
12037 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
12038 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
12039 (built_min, cp_tree_equal): Likewise.
12040
12041 2000-05-26 Mark Mitchell <mark@codesourcery.com>
12042
12043 * class.c (layout_nonempty_base_or_field): Replace
12044 `record_layout_info' with `record_layout_info_s'.
12045
12046 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
12047
12048 Fix goto checking.
12049 * cp-tree.h (struct language_function): x_named_labels is now
12050 a struct named_label_list*.
12051 * decl.c (struct named_label_use_list): Renamed from...
12052 (struct named_label_list): ...this. New struct.
12053 (push_binding_level): Don't set eh_region.
12054 (note_level_for_eh): New fn.
12055 (pop_label): Take label and old value directly.
12056 (pop_labels): Adjust for new named_labels format.
12057 (lookup_label): Likewise.
12058 (poplevel): Note characteristics of a binding level containing a
12059 named label. Mess with named label lists earlier.
12060 (mark_named_label_lists): New fn.
12061 (mark_lang_function): Call it.
12062 (use_label): New fn, split out from...
12063 (make_label_decl): ...here. Don't call it.
12064 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
12065 check_previous_gotos): New fns, split out from...
12066 (define_label): ...here.
12067 (check_switch_goto): New fn.
12068 (define_case_label): Call it.
12069 (check_goto): New fn.
12070 * semantics.c (finish_goto_stmt): Call it and use_label.
12071 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
12072 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
12073
12074 2000-05-26 Mark Mitchell <mark@codesourcery.com>
12075
12076 * class.c (build_vtable_entry_ref): Correct usage of
12077 get_vtbl_decl_for_binfo.
12078
12079 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
12080 * method.c (implicitly_declare_fn): Not here.
12081
12082 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
12083
12084 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
12085 (CPTI_PTMD_DESC_TYPE): ... here.
12086 (ptmd_desc_type_node): Rename to ...
12087 (ptm_desc_type_node): ... here.
12088 * decl.c: Likewise.
12089 * rtti.c (ptmd_initializer): Rename to ...
12090 (ptm_initializer): ... here.
12091 (sythesize_tinfo_var): Adjust. Deal with pointer to member
12092 function.
12093 (create_tinfo_types): Adjust.
12094
12095 2000-05-25 Mark Mitchell <mark@codesourcery.com>
12096
12097 Finish implementation of VTTs.
12098 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
12099 CPTI_VTT_PARM_IDENTIFIER.
12100 (vtt_parm_identifier): New macro.
12101 (vtt_parm_type): Likewise.
12102 (BINFO_SUBVTT_INDEX): Likewise.
12103 (BINFO_VPTR_INDEX): Likewise.
12104 (struct lang_decl): Add vtt_parm.
12105 (DECL_VTT_PARM): New macro.
12106 (DECL_USE_VTT_PARM): Likewise.
12107 (DECL_NEEDS_VTT_PARM_P): Likewise.
12108 (get_vtt_name): Declare.
12109 (build_artificial_parm): Likewise.
12110 (fixup_all_virtual_upcast_offsets): Likewise.
12111 (expand_indirect_vtbls_init): Remove.
12112 * call.c (build_new_method_call): Pass the vtt to subobject
12113 constructors and destructors.
12114 * class.c (get_vtt_name): Give it external linkage.
12115 (build_clone): Handle the magic VTT parameters for clones.
12116 (clone_function_decl): Fix typo in comment.
12117 (build_vtt): Keep track of the indices in the VTTs where various
12118 entities are stored.
12119 (build_vtt_inits): Likewise.
12120 (dfs_build_vtt_inits): Likewise.
12121 (build_ctor_vtbl_group): Tweak type of construction vtables.
12122 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
12123 primary bases, when building construction vtables.
12124 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
12125 (initialize_predefined_identifiers): Add vtt_parm_identifier.
12126 (init_decl_processing): Initialize vtt_parm_type.
12127 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
12128 (lang_mark_tree): Make vtt_parm.
12129 * decl2.c (build_artificial_parm): New function.
12130 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
12131 (grokclassfn): Use build_artificial_parm.
12132 * init.c (initialize_vtbl_ptrs): Call
12133 fixup_all_virtual_upcast_offsets directly.
12134 (perform_member_init): Use the complete subobject destructor for
12135 member cleanups.
12136 (build_vtbl_address): New function.
12137 (expand_virtual_init): Handle VTTs.
12138 * optimize (maybe_clone_body): Likewise.
12139 * search.c (fixup_all_virtual_upcast_offsets): Give it external
12140 linkage.
12141 (expand_indirect_vtbls_init): Remove.
12142 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
12143 * tree.c (make_binfo): Make them bigger.
12144
12145 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
12146
12147 * inc/cxxabi.h (__pbase_type_info): Define, based on
12148 __pointer_type_info.
12149 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
12150 (__pointer_to_member_type_info): Likewise.
12151 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
12152 (__pointer_to_member_type_info::__is_pointer_p): Remove.
12153 (__pointer_type_info::__do_catch): Rename to ...
12154 (__pbase_type_info::__do_catch): ... here. Adjust.
12155 (__pbase_type_info::__pointer_catch): Implement.
12156 (__pointer_type_info::__pointer_catch): Adjust.
12157 (__pointer_to_member_type_info::__pointer_catch): Adjust.
12158
12159 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
12160
12161 * tinfo.h (__user_type_info::contained_virtual_p): New
12162 predicate.
12163 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
12164 shaped hierarchy.
12165 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
12166 diamond shaped hierarchy. Add early out for mixed diamond and
12167 duplicate shaped hierarchy.
12168
12169 2000-05-24 Mark Mitchell <mark@codesourcery.com>
12170
12171 * cp-tree.h (build_delete): Change prototype.
12172 (build_vec_delete): Likewise.
12173 * call.c (build_scoped_method_call): Use special_function_kind
12174 values to indicate the kind of destruction to be done.
12175 (build_method_call): Likewise.
12176 * decl.c (finish_destructor_body): Likewise.
12177 (maybe_build_cleanup_1): Likewise. Rename to ...
12178 (maybe_build_cleanup): ... this.
12179 * decl2.c (delete_sanity): Use special_function_kind
12180 values to indicate the kind of destruction to be done.
12181 (build_cleanup): Likewise.
12182 * init.c (perform_member_init): Likewise.
12183 (build_vec_delete_1): Likewise.
12184 (build_dtor_call): Simplify.
12185 (build_delete): Use special_function_kind
12186 values to indicate the kind of destruction to be done.
12187 (build_vbase_delete): Likewise.
12188 (build_vec_delete): Likewise.
12189
12190 * init.c (sort_member_init): Fix typo in error message generation
12191 code.
12192
12193 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
12194
12195 * semantics.c (begin_class_definition): make the packed
12196 attribute be sensitive to the "-fpack-struct" command line flag
12197
12198 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
12199
12200 Update new-abi upcast algorithm.
12201 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
12202 prototype and meaning of return value.
12203 (__si_class_type_info::__do_upcast): Likewise.
12204 (__vmi_class_type_info::__do_upcast): Likewise.
12205 * tinfo.cc (__class_type_info::__upcast_result): Replace
12206 whole2dst with part2dst. Adjust ctor.
12207 (__class_type_info::__do_upcast): Adjust call of worker function.
12208 (__class_type_info::__do_upcast): Adjust.
12209 (__si_class_type_info::__do_upcast): Adjust. Use parent's
12210 __do_upcast.
12211 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
12212 virtual base in diamond hierarchy bug.
12213
12214 2000-05-23 Mark Mitchell <mark@codesourcery.com>
12215
12216 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
12217 and bitfield to tinfo_fn_p.
12218 (DECL_TINFO_FN_P): Adjust.
12219 (SET_DECL_TINFO_FN_P): Likewise.
12220 (DECL_MUTABLE_P): Likewise.
12221 (DECL_C_BIT_FIELD): Likewise.
12222 (SET_DECL_C_BIT_FIELD): Likewise.
12223 (CLEAR_DECL_C_BIT_FIELD): Likewise.
12224 (DECL_UNINLINABLE): Likewise.
12225 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
12226 (handle_using_decl): Remove assertion.
12227 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
12228 to build FIELD_DECLs.
12229 (build_base_field): Likewise.
12230 (layout_class_type): Likewise.
12231 * decl.c (init_decl_processing): Likewise.
12232 (build_ptrmemfunc_type): Likewise.
12233 (grokdeclarator): Likewise.
12234 * decl2.c (grok_x_components): Likewise.
12235 * except.c (call_eh_info): Likewise.
12236 * init.c (init_init_processing): Likewise.
12237 * rtti.c (expand_class_desc): Likewise.
12238 (create_pseudo_type_info): Likewise.
12239 (get_vmi_pseudo_type_info): Likewise.
12240 (create_tinfo_types): Likewise.
12241 * ptree.c (print_lang_decl): Adjust.
12242 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
12243 before checking DECL_MUTABLE_P.
12244
12245 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
12246 parameters for template functions.
12247 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
12248 destructors as well as constructors.
12249
12250 2000-05-22 Mark Mitchell <mark@codesourcery.com>
12251
12252 * class.c (build_ctor_vtbl_group): Set inits.
12253 * optimize.c (maybe_clone_body): Set DECL_INLINE and
12254 DECL_THIS_INLINE appropriately for clones.
12255
12256 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
12257 (DECL_CONV_FN_P): Simplify.
12258 (DECL_OPERATOR): Remove.
12259 (language_to_string): Declare.
12260 * decl.c (duplicate_decls): Fix typo in comment.
12261 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
12262 (grok_op_properties): Use DECL_CONV_FN_P instead of
12263 IDENTIFIER_TYPENAME_P.
12264 * dump.c (dequeue_and_dump): Dump the language linkage of
12265 declarations.
12266 * error.c (language_to_string): Give it external linkage.
12267 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
12268 (implicitly_declare_fn): Set DECL_LANGUAGE.
12269 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
12270 IDENTIFIER_TYPENAME_P.
12271 (tsubst_decl): Likewise.
12272 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
12273 * semantics.c (finish_member_declaration): Don't mark members of
12274 classes declared in an extern "C" region as extern "C".
12275
12276 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12277
12278 * decl2.c (qualified_lookup_using_namespace): Look through
12279 namespace aliases.
12280
12281 * decl.c (push_using_decl): Return the old decl on namespace level.
12282
12283 2000-05-21 Mark Mitchell <mark@codesourcery.com>
12284
12285 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
12286 (VTT_NAME_PREFIX): New macro.
12287 (CTOR_VTBL_NAME_PREFIX): Likewise.
12288 (get_ctor_vtbl_name): New function.
12289 * class.c (get_vtable_name): Simplify.
12290 (get_vtt_name): New function.
12291 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
12292 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
12293 when a virtual base becomes primary.
12294 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
12295 VTTs.
12296 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
12297 additional parameters.
12298 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
12299 (initialize_array): New function.
12300 (build_vtt): Likewise.
12301 (build_vtt_inits): Likewise.
12302 (dfs_build_vtt_inits): Likewise.
12303 (dfs_fixup_binfo_vtbls): Likewise.
12304 (build_ctor_vtbl_group): Likewise.
12305 (initialize_vtable): Use initialize_array.
12306 (accumulate_vtbl_inits): Reimplement to handle construction
12307 vtables.
12308 (dfs_accumulate_vtbl_inits): Likewise.
12309 (bulid_vtbl_initializer): Adjust parameter name.
12310 * method.c (build_typename_overload): Remove #if 0'd code.
12311 (get_ctor_vtbl_name): New function.
12312 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
12313 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
12314
12315 * cp-tree.h (struct lang_type): Remove search_slot.
12316 (CLASSTYPE_SEARCH_SLOT): Remove.
12317 (emit_base_init): Change prototype.
12318 (initialize_vtbl_ptrs): Likewise.
12319 (expand_indirect_vtbls_init): Likewise.
12320 (clear_search_slots): Remove.
12321 * decl.c (lang_mark_tree): Don't mark search_slot.
12322 * init.c (initialize_vtbl_ptrs): Simplify.
12323 (emit_base_init): Likewise.
12324 * search.c (struct vbase_info): Document decl_ptr.
12325 (convert_pointer_to_single_level): Remove.
12326 (dfs_find_vbases): Remove.
12327 (dfs_init_base_pointers): Simplify.
12328 (dfs_clear_vbase_slots): Remove.
12329 (dfs_vtable_path_unmark): New function.
12330 (init_vbase_pointers): Simplify.
12331 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
12332 (expand_indirect_vtbls_init): Simplify. Don't call
12333 mark_all_temps_used.
12334 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
12335 initialize_vtbl_ptrs.
12336
12337 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
12338
12339 * except.c: Add static prototypes.
12340
12341 2000-05-20 H.J. Lu <hjl@gnu.org>
12342
12343 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
12344
12345 2000-05-19 Mark Mitchell <mark@codesourcery.com>
12346
12347 Don't create a separate copy of virtual bases for the
12348 CLASSTYPE_VBASECLASSES list.
12349 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
12350 (BINFO_FOR_VBASE): Remove.
12351 (CANONICAL_BINFO): Adjust.
12352 (binfo_for_vbase): New function.
12353 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
12354 instead of BINFO_FOR_VBASE.
12355 (build_vbase_pointer): Likewise.
12356 (build_secondary_vtable): Likewise.
12357 (dfs_mark_primary_bases): Likewise.
12358 (mark_primary_bases): Likewise.
12359 (layout_nonempty_base_or_field): Likewise.
12360 (dfs_set_offset_for_shared_vbases): Likewise.
12361 (dfs_set_offset_for_unshared_vbases): Likewise.
12362 (layout_virtual_bases): Likewise. Adjust for changes to the
12363 CLASSTYPE_VBASECLASSES list.
12364 (dump_class_hierarchy_r): Use binfo_for_vbase
12365 instead of BINFO_FOR_VBASE.
12366 (dump_class_hierarchy): Likewise.
12367 (finish_vtbls): Likewise.
12368 (build_vtbl_initializer): Adjust for changes to the
12369 CLASSTYPE_VBASECLASSES list.
12370 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
12371 * decl.c (finish_destructor_body): Adjust for changes to the
12372 CLASSTYPE_VBASECLASSES list.
12373 * init.c (sort_base_init): Use binfo_for_vbase.
12374 (construct_virtual_bases): Adjust for changes to the
12375 CLASSTYPE_VBASECLASSES list.
12376 (expand_member_init): Use binfo_for_vbase.
12377 (build_vbase_delete): Adjust for changes to the
12378 CLASSTYPE_VBASECLASSES list.
12379 * method.c (do_build_copy_constructor): Likewise.
12380 * rtti.c (get_base_offset): Use binfo_for_vbase.
12381 (expand_class_desc): Remove #if 0'd code.
12382 * search.c (struct vbase_info): Remove vbase_types.
12383 (get_base_distance): Use binfo_for_vbase.
12384 (lookup_field_queue_p): Use CANONICAL_BINFO.
12385 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
12386 (get_pure_virtuals): Adjust for changes to the
12387 CLASSTYPE_VBASECLASSES list.
12388 (dfs_find_vbases): Use binfo_for_vbase.
12389 (dfs_init_vbase_pointers): Likewise.
12390 (init_vbase_pointers): Don't initialize vi.vbase_types.
12391 (virtual_context): Use binfo_for_vbase.
12392 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
12393 CLASSTYPE_VBASECLASSES list.
12394 (expand_indirect_vtbls_init): Simplify.
12395 (dfs_get_vbase_types): Don't replicate virtual bases.
12396 (find_vbase_instance): Use binfo_for_vbase.
12397 (binfo_for_vbase): New function.
12398 * typeck.c (get_delta_difference): Use binfo_for_vbase.
12399
12400 2000-05-17 Mark Mitchell <mark@codesourcery.com>
12401
12402 * decl2.c (finish_anon_union): Generalize error messages to handle
12403 anonymous structures.
12404 * init.c (perform_member_init): Remove `name' parameter.
12405 (build_field_list): New function.
12406 (sort_member_init): Handle anonymous union initialization order
12407 correctly. Check for multiple initializations of the same union.
12408 (emit_base_init): Don't look up fields by name here.
12409 (expand_member_init): Record the result of name lookup for future
12410 reference.
12411 * typeck.c (build_component_ref): Fix formatting.
12412
12413 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
12414
12415 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
12416 * typeck.c (build_x_compound_expr): Replace warn_unused with
12417 warn_unused_value.
12418
12419 * decl2.c (lang_decode_option): Update -Wall unused flags by
12420 calling set_Wunused.
12421
12422 2000-05-16 Mark Mitchell <mark@codesourcery.com>
12423
12424 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
12425 * init.c (dfs_vtable_path_unmark): Remove.
12426 * search.c (marked_new_vtable_p): Likewise.
12427 (unmarked_new_vtable_p): Likewise.
12428 (dfs_search_slot_nonempty_p): Likewise.
12429 (dfs_mark): Likewise.
12430 (dfs_vtable_path_unmark): Likewise.
12431 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
12432 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
12433 (dfs_init_vbase_pointers): Remove special-case new ABI code.
12434 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
12435 (init_vbase_pointers): Simplify.
12436 (expand_indirect_vtbls_init): Likewise.
12437
12438 * class.c (copy_virtuals): New function.
12439 (build_primary_table): Use it.
12440 (build_secondary_vtable): Likewise.
12441 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
12442 indicate that no vcall offset is required.
12443 (add_virtual_function): Likewise.
12444 (modify_all_vtables): Likewise.
12445 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
12446 (dfs_accumulate_vtbl_inits): Likewise.
12447 (build_vtbl_initializer): Make changes to handle construction
12448 vtables.
12449 (dfs_build_vcall_offset_vtbl_entries): Likewise.
12450 (build_rtti_vtbl_entries): Likewise.
12451 (build_vtable_entries): Handle a NULL vcall_index.
12452
12453 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
12454
12455 * decl2.c (lang_decode_option): Fix thinko.
12456
12457 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
12458
12459 * except.c (check_handlers): New fn.
12460 * cp-tree.h: Declare it.
12461 * semantics.c (finish_handler_sequence): Call it.
12462 (finish_function_handler_sequence): Likewise.
12463 (finish_handler_parms): Set TREE_TYPE on the handler.
12464 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
12465 * search.c (get_base_distance_recursive): If protect>1, ignore
12466 special access.
12467 (get_base_distance): Don't reduce watch_access.
12468
12469 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
12470
12471 * lex.c: #include diagnostic.h.
12472 (lang_init_options): Set default prefixing rules.
12473
12474 * lang-options.h: Add -fdiagnostics-show-location=.
12475
12476 * decl2.c: #include diagnostic.h.
12477 (lang_decode_option): Handle -fdiagnostics-show-location=.
12478
12479 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
12480
12481 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
12482 * vec.cc: Revert my 2000-05-07 change.
12483
12484 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
12485
12486 * class.c (check_field_decls): Complain about non-static data
12487 members with same name as class in class with constructor.
12488
12489 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
12490
12491 * decl.c (grokdeclarator): Allow non-static data members with
12492 same name as class.
12493
12494 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
12495
12496 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
12497 and pending_inline.filename. Update prototypes.
12498 * decl.c (define_label): Constify filename parameter.
12499 * decl2.c (warn_if_unknown_interface): Constify local char *.
12500 * input.c Constify input_source.filename. Don't declare
12501 input_filename or lineno. Constify filename parameter to feed_input.
12502 * lex.c (init_parse): Constify parameter and return value.
12503 (cp_pragma_interface, cp_pragma_implementation): Constify
12504 filename argument.
12505 (reinit_parse_for_method, reinit_parse_for_block,
12506 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
12507 Constify local char *.
12508 * pt.c: Don't declare lineno or input_filename.
12509 (print_template_context, tsubst_friend_function, tsubst_decl,
12510 tsubst, instantiate_decl): Constify local char *.
12511 * semantics.c (expand_body): Constify local char *.
12512 * tree.c (build_srcloc): Constify filename parameter.
12513 * typeck.c (c_expand_asm_operands): Constify filename
12514 parameter.
12515
12516 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
12517
12518 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
12519 offsetof expansion.
12520
12521 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
12522
12523 * inc/cxxabi.h: Fix typos in comment.
12524 (__base_class_info::__offset): Use a static_cast.
12525
12526 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
12527
12528 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
12529 of std::size_t and std::ptrdiff_t respectively.
12530 * tinfo.cc: Likewise.
12531 * vec.cc: Likewise.
12532
12533 2000-05-06 Richard Henderson <rth@cygnus.com>
12534
12535 * typeck.c (build_c_cast): Don't warn integer->pointer size
12536 mismatch for constants.
12537
12538 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
12539
12540 * rtti.c (ptmd_initializer): Set non-public, if class is
12541 incomplete.
12542
12543 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
12544 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
12545 __cxa_vec_delete): Likewise.
12546 * tinfo.cc (__dynamic_cast): Likewise.
12547 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
12548 __cxa_vec_delete): Likewise.
12549
12550 2000-05-04 Mark Mitchell <mark@codesourcery.com>
12551
12552 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
12553 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
12554 (lang_decl_flags): Add vcall_offset.
12555 (THUNK_VCALL_OFFSET): Use it.
12556 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
12557 * method.c (make_thunk): Create the lang_decl here, not in
12558 emit_thunk.
12559 (emit_thunk): Make generic thunks into ordinary functions once
12560 they have been fed to expand_body.
12561 * semantics.c (expand_body): Set current_function_is_thunk here.
12562
12563 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12564
12565 * class.c (update_vtable_entry_for_fn): Prototype.
12566
12567 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
12568 and `tmpl'.
12569
12570 * search.c (dfs_build_inheritance_graph_order): Prototype.
12571
12572 2000-05-04 Mark Mitchell <mark@codesourcery.com>
12573
12574 * cp-tree.h (special_function_kind): Add various kinds of
12575 destructors.
12576 (special_function_p): New function.
12577 * class.c (overrides): Don't let one kind of destructor override
12578 another.
12579 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
12580 whether or not to instantiate a template.
12581 * tree.c (special_function_p): Define.
12582
12583 2000-05-03 Mark Mitchell <mark@codesourcery.com>
12584
12585 * cp-tree.def (THUNK_DECL): Remove.
12586 * cp-tree.h (DECL_THUNK_P): New macro.
12587 (DECL_NON_THUNK_FUNCTION_P): Likewise.
12588 (DECL_EXTERN_C_FUNCTION_P): Likewise.
12589 (SET_DECL_THUNK_P): Likewise.
12590 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
12591 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
12592 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
12593 * decl.c (decls_match): Use DECL_EXTERN_C_P.
12594 (duplicate_decls): Likewise.
12595 (pushdecl): Likewise. Adjust thunk handling.
12596 (grokfndecl): Use DECL_EXTERN_C_P.
12597 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
12598 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
12599 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
12600 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
12601 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
12602 DECL_NO_STATIC_CHAIN.
12603 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
12604 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
12605 * search.c (covariant_return_p): Remove THUNK_DECL handling.
12606 * ir.texi: Update.
12607
12608 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
12609
12610 * tree.c (walk_tree): Set lineno.
12611
12612 2000-05-01 Mark Mitchell <mark@codesourcery.com>
12613
12614 * exception.cc: Update license notice.
12615 * new.cc: Likewise.
12616 * new1.cc: Likewise.
12617 * new2.cc: Likewise.
12618 * tinfo.cc: Likewise.
12619 * tinfo2.cc: Likewise.
12620 * vec.cc: Likewise.
12621 * inc/cxxabi.h: Likewise.
12622 * inc/exception: Likewise.
12623 * inc/new: Likewise.
12624 * inc/new.h: Likewise.
12625 * inc/typeinfo: Likewise.
12626
12627 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
12628
12629 * tree.c (build_target_expr_with_type): If we already have a
12630 TARGET_EXPR, just return it.
12631
12632 * optimize.c (initialize_inlined_parameters): Don't generate an
12633 EXPR_STMT if we can just use DECL_INITIAL.
12634 * decl.c (emit_local_var): Only make the initialization a
12635 full-expression if stmts_are_full_exprs_p.
12636
12637 2000-05-01 Mark Mitchell <mark@codesourcery.com>
12638
12639 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
12640 macro.
12641 * call.c (standard_conversion): Use it.
12642 (direct_reference_binding): Likewise.
12643 (build_over_call): Likewise.
12644 (is_properly_derived_from): Likewise.
12645 (compare_ics): Likewise.
12646 * class.c (resolves_to_fixed_type_p): Likewise.
12647 * optimize.c (declare_return_variable): Likewise.
12648 * pt.c (is_specialization_of): Likewise.
12649 (unify): Likewise.
12650 * typeck.c (comp_target_parms): Likeiwse.
12651 (build_static_cast): Likewise.
12652 (build_reinterpret_cast): Likewise.
12653 (build_const_cast): Likewise.
12654 (comp_ptr_ttypes_real): Likewise.
12655 (comp_ptr_ttypes_const): Likewise.
12656 * typeck2.c (process_init_constructor): Likewise.
12657
12658 2000-04-30 Scott Snyder <snyder@fnal.gov>
12659
12660 * decl.c (finish_destructor_body): Use the base destructor when
12661 destroying virtual bases.
12662
12663 2000-04-30 Mark Mitchell <mark@codesourcery.com>
12664
12665 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
12666 STMT_EXPRs.
12667 * optimize.c (struct inline_data): Add target_exprs field.
12668 (declare_return_variable): When a function returns an aggregate,
12669 use the variable declared in the TARGET_EXPR as the remapped
12670 DECL_RESULT.
12671 (expand_call_inline): Update the pending target_exprs stack.
12672 (optimize_function): Initialize the stack.
12673
12674 * decl2.c (finish_file): Fix typo in comment.
12675
12676 * method.c (emit_thunk): Don't try to return a `void' value.
12677
12678 * optimize.c (initialize_inlined_parameters): If the parameter is
12679 addressable, we need to make a new VAR_DECL, even if the
12680 initializer is constant.
12681
12682 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
12683
12684 * decl.c (grok_op_properties): Add an extra check of argtypes.
12685
12686 2000-04-27 Mark Mitchell <mark@codesourcery.com>
12687
12688 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
12689 variables.
12690 (initialize_inlined_parameters): Try to avoid creating new
12691 VAR_DECLs.
12692
12693 2000-04-27 Alex Samuel <samuel@codesourcery.com>
12694
12695 * lex.c (my_get_run_time): Remove.
12696 (init_filename_times): Use get_run_time instead of my_get_run_time.
12697 (check_newline): Likewise.
12698 (dump_time_statistics): Likewise.
12699 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
12700 of computing elapsed time explicitly.
12701
12702 2000-04-26 Mark Mitchell <mark@codesourcery.com>
12703
12704 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
12705 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
12706 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
12707 before calling decl_constant_value.
12708 * class.c (check_bitfield_decl): Likewise.
12709 * cvt.c (ocp_convert): Likewise.
12710 (convert): Likewise.
12711 * decl.c (compute_array_index_type): Likewise.
12712 (build_enumerator): Likewise.
12713 * decl2.c (check_cp_case_value): Likewise.
12714 * pt.c (convert_nontype_argument): Likewise.
12715 (tsubst): Likewise.
12716 * typeck.c (decay_conversion): Likewise.
12717 (build_compound_expr): Likewise.
12718 (build_reinterpret_cast): Likewise.
12719 (build_c_cast): Likewise.
12720 (convert_for_assignment): Likewise.
12721
12722 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
12723
12724 * decl.c (finish_function): Don't play games with DECL_INLINE.
12725
12726 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
12727
12728 * ir.texi: Correct typo.
12729
12730 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12731
12732 * decl.c (grokdeclarator): Reject VLAs as members.
12733
12734 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
12735
12736 * call.c (standard_conversion): Accept conversion between
12737 COMPLEX_TYPEs.
12738
12739 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
12740
12741 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
12742
12743 * decl2.c (finish_file): Remove double setup for accounting
12744 compile time.
12745
12746 2000-04-24 Robert Lipe <robertlipe@usa.net>
12747
12748 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
12749
12750 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
12751
12752 * new.cc (set_new_handler): Needs to be in std::.
12753
12754 2000-04-23 Mark Mitchell <mark@codesourcery.com>
12755
12756 * cp-tree.h (lang_decl): Remove pretty_function_p.
12757 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
12758 language-specific node.
12759 * decl.c (cp_make_fname_decl): Use build_decl, not
12760 build_lang_decl, to build the variables.
12761 (grokvardecl): Don't call build_lang_decl for local variables in
12762 templates.
12763 (grokdeclarator): Don't call build_lang_decl for local type
12764 declarations in templates.
12765 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
12766 zero'd memory, rather than calling memset.
12767 * pt.c: Include hashtab.h.
12768 (local_specializations): New variable.
12769 (retrieve_local_specialization): Use it.
12770 (register_local_specialization): Likewise.
12771 (tsubst_decl): Don't assume local variables have
12772 DECL_LANG_SPECIFIC.
12773 (instantiate_decl): Set up local_specializations.
12774 * Makefile.in (HTAB_H): New variable.
12775
12776 2000-04-23 Richard Henderson <rth@cygnus.com>
12777
12778 * typeck.c (c_expand_asm_operands): Restore the original
12779 contents of the output list.
12780
12781 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
12782
12783 * ir.texi: Document complex number representation.
12784
12785 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
12786
12787 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
12788 (target_incomplete_p): New function.
12789 (tinfo_base_init): Create comdat NTBS name variable.
12790 (ptr_initializer): Add non_public parameter. Calculate it.
12791 (ptmd_initializer): Likewise.
12792 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
12793 (create_real_tinfo_var): Add non_public parameter. Use it.
12794 Push proxy into global namespace.
12795 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
12796 New enumeration.
12797 * inc/typeinfo (type_info::before, type_info::operator==):
12798 Compare __name addresses.
12799
12800 * tinfo2.cc: Remove new-abi builtins comment.
12801
12802 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
12803
12804 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
12805
12806 * call.c (joust): Exit early if we get the same function, too.
12807
12808 * decl2.c (key_method): Return NULL_TREE for template classes.
12809 (import_export_class): Don't need to check for template classes.
12810
12811 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
12812
12813 * lex.c: Remove references to cccp.c.
12814
12815 2000-04-18 Mark Mitchell <mark@codesourcery.com>
12816
12817 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
12818 volatile_memfunc. Add destructor_attr. Adjust dummy.
12819 (DECL_DESTRUCTOR_P): Use destructor_attr.
12820 (DECL_CONST_MEMFUNC_P): Reimplement.
12821 (DECL_VOLATILE_MEMFUNC_P): Remove.
12822 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
12823 (overrides): Use DECL_DESTRUCTOR_P.
12824 (check_for_override): Likewise.
12825 * decl.c (start_function): Likewise.
12826 * decl2.c (grokfclassfn): Likewise.
12827 (check_classfn): Likewise.
12828 (grok_function_init): Likewise.
12829
12830 2000-04-17 Mark Mitchell <mark@codesourcery.com>
12831
12832 * decl2.c (grokfield): Issue error on illegal data member
12833 declaration.
12834
12835 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
12836
12837 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
12838
12839 2000-04-16 Mark Mitchell <mark@codesourcery.com>
12840
12841 * class.c (build_vtable_entry): Don't build thunks for type-info
12842 functions.
12843
12844 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
12845
12846 * decl.c (decls_match): Allow a redeclaration of a builtin to
12847 specify args while the builtin did not.
12848
12849 2000-04-15 Mark Mitchell <mark@codesourcery.com>
12850
12851 * cp-tree.def (THUNK_DECL): Add to documentation.
12852 * cp-tree.h (flag_huge_objects): Declare.
12853 * class.c (modify_vtable_entry): Tidy.
12854 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
12855 Calculate delta appropriately for the new ABI.
12856 (dfs_modify_vtables): Use it.
12857 (modify_all_vtables): Fix thinko in code to add overriding copies
12858 of functions to primary vtables.
12859 (build_clone): Fix typo in comment.
12860 (clone_function_decl): Correct order of destructors in vtable.
12861 (build_vbase_offset_vtbl_entries): Adjust comment.
12862 (dfs_vcall_offset_queue_p): Remove.
12863 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
12864 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
12865 (build_vtable_entry): Correct check for pure virtual functions.
12866 Don't declare flag_huge_objects.
12867 * decl.c (flag_huge_objects): Remove declaration.
12868 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
12869 Use int_size_in_bytes.
12870 (emit_thunk): Handle vcall offset thunks.
12871
12872 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12873
12874 * decl2.c (parse_time, varconst_time): Delete declarations.
12875 (finish_file): Delete LINENO declaration.
12876 START_TIME and THIS_TIME now long.
12877
12878 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
12879
12880 * class.c (build_base_field): Reformat comment.
12881
12882 * inc/cxxabi.h (stddef.h): Comment inclusion.
12883 (__base_class_info::__offset): Comment shift.
12884
12885 2000-04-12 Mark Mitchell <mark@codesourcery.com>
12886
12887 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
12888 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
12889 (cp_push_exception_identifier): New macro.
12890 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
12891 (DECL_BASE_DESTRUCTOR_P): Likewise.
12892 (DECL_DELETING_DESTRUCTOR_P): Likewise.
12893 (get_vtbl_decl_for_binfo): Fix formatting.
12894 (in_charge_arg_for_name): New macro.
12895 (maybe_build_cleanup_and_delete): Remove declaration.
12896 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
12897 (in_charge_arg_for_name): New function.
12898 (build_new_method_call): Use it. Handle cloned destructors.
12899 (build_clone): Don't make the base constructor virtual.
12900 Automatically defer generated functions.
12901 (clone_function_decl): Handle destructors, too.
12902 (clone_constructors_and_destructors): Likewise.
12903 (create_vtable_ptr): Don't create a vtable entry for a cloned
12904 function.
12905 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
12906 (initialize_predefined_identifiers): Update appropriately.
12907 (finish_destructor_body): Simplify.
12908 (maybe_build_cleanup_and_delete): Remove.
12909 * except.c (expand_throw): Handle new-ABI destructors.
12910 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
12911 (build_dtor_call): New function.
12912 (build_delete): Use it. Simplify.
12913 * optimize.c (maybe_clone_body): Handle destructors.
12914 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
12915
12916 * exception.cc (cleanup_fn): New typedef.
12917 (CALL_CLEANUP): New macro.
12918 (cp_eh_info): Use them.
12919 (__cp_push_exception): Likewise.
12920 (__cp_pop_exception): Likewise.
12921
12922 2000-04-11 Mark Mitchell <mark@codesourcery.com>
12923
12924 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
12925 (complete_dtor_identifier): New macro.
12926 (CLASSTYPE_FIRST_CONVERSION): Remove.
12927 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
12928 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
12929 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
12930 (CLASSTYPE_CONSTRUCTORS): Likewise.
12931 (CLASSTYPE_DESTRUCTORS): Likewise.
12932 (lang_decl): Add cloned_function.
12933 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
12934 (DECL_BASE_CONSTRUCTOR_P): Likewise.
12935 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
12936 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
12937 (DECL_CLONED_FUNCTION_P): Likewise.
12938 (DECL_CLONED_FUNCTION): Likewise.
12939 (clone_function_decl): Declare.
12940 (maybe_clone_body): Likewise.
12941 * call.c (build_user_type_conversion_1): Call complete object
12942 constructors in the new ABI.
12943 (build_new_method_call): Don't add in-charge parameters under the
12944 new ABI.
12945 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
12946 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
12947 CLASSTYPE_DESTRUCTOR_SLOT.
12948 (build_clone): New function.
12949 (clone_function_decl): Likewise.
12950 (clone_constructors_and_destructors): Likewise.
12951 (check_bases_and_members): Use it.
12952 * decl.c (iniitialize_predefined_identifiers): Initialize
12953 complete_dtor_identifier.
12954 (finish_function): Don't add extra code to a clone.
12955 (lang_mark_tree): Mark cloned_function.
12956 * decl2.c (mark_used): Don't bother trying to instantiate things
12957 we synthesized.
12958 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
12959 * method.c (set_mangled_name_for_decl): Don't treat clones as
12960 constructors.
12961 (synthesize_method): Sythesize cloned functions, not the clones.
12962 * optimize.c (inline_data): Update comment on ret_label.
12963 (remap_block): Don't assume DECL_INITIAL exists.
12964 (copy_body_r): Allow ret_label to be NULL.
12965 (maybe_clone_body): Define.
12966 * pt.c (tsubst_decl): Handle clones.
12967 (instantiate_clone): New function.
12968 (instantiate_template): Use it.
12969 (set_mangled_name_for_template_decl): Don't treat clones as
12970 constructors.
12971 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
12972 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
12973 * semantics.c (expand_body): Clone function bodies as necessary.
12974
12975 * optimize.c (remap_decl): Avoid sharing structure for arrays
12976 whose size is only known at run-time.
12977 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
12978
12979 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
12980 to has_in_charge_parm_p.
12981 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
12982 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
12983 (DECL_COPY_CONSTRUCTOR_P): New macro.
12984 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
12985 (build_user_type_conversion_1): Likewise.
12986 (convert_like_real): Likewise.
12987 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
12988 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
12989 (copy_args_p): Likewise.
12990 (grok_ctor_properties): Likewise.
12991 (start_function): Likewise.
12992 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
12993 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
12994 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
12995 * method.c (do_build_copy_constructor): Use
12996 DECL_HAS_IN_CHARGE_PARM_P.
12997 (synthesize_method): Likewise.
12998 * pt.c (instantiate_template): Remove goto.
12999 * tree.c (build_cplus_method_type): Remove mention of obstacks in
13000 comment.
13001
13002 * cp-tre.h (finish_function): Change prototype.
13003 * decl.c (end_cleanup_fn): Adjust caller.
13004 (finish_function): Take only one parameter.
13005 * decl2.c (finish_objects): Adjust caller.
13006 (finish_static_storage_duration_function): Likewise.
13007 * method.c (emit_thunk): Likewise.
13008 * parse.y: Likewise.
13009 * parse.c: Regenerated.
13010 * pt.c (instantiate_decl): Likewise.
13011 * rtti.c (synthesize_tinfo_fn): Likewise.
13012 * semantics.c (expand_body): Likewise.
13013
13014 * cp-tree.h (copy_decl): New function.
13015 * class.c (finish_struct_1): Use it.
13016 * lex.c (copy_decl): Define it.
13017 * pt.c (tsubst_decl): Likewise.
13018 * tree.c (copy_template_template_parm): Likewise.
13019
13020 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
13021 has_nonpublic_assign_ref.
13022 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
13023 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
13024 * class.c (finish_struct_methods): Don't set
13025 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
13026 (interface_only): Don't declare.
13027 (interface_unknown): Likewise.
13028
13029 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13030
13031 * tree.h (HAVE_TEMPLATES): Remove definition.
13032 * lang-options.h (-fthis-is-variable): Remove documentation.
13033
13034 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
13035
13036 * class.c (instantiate_type): Handle object-relative template-id.
13037
13038 * semantics.c (finish_expr_stmt): Call convert_to_void here.
13039 * decl.c (cplus_expand_expr_stmt): Not here.
13040
13041 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
13042 Initialize exprtype earlier.
13043
13044 * parse.y (fn.def1): Check for defining types in return types.
13045
13046 * decl.c (check_tag_decl): Notice extra fundamental types.
13047 Diagnose empty decls in classes, too.
13048
13049 * decl.c (grokdeclarator): Don't override an anonymous name if no
13050 declarator was given.
13051
13052 * cvt.c (convert_to_void): Call resolve_offset_ref.
13053
13054 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
13055
13056 * decl2.c (decl_namespace): Handle getting a type.
13057
13058 * typeck.c (build_c_cast): Re-enable warning for cast between
13059 pointer and integer of different size.
13060
13061 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
13062
13063 * inc/cxxabi.h (__pointer_type_info): Add restrict and
13064 incomplete flags.
13065 (__pointer_type_info::__pointer_catch): New virtual function.
13066 (__pointer_to_member_type_info): Derive from
13067 __pointer_type_info. Adjust.
13068 (__pointer_to_member_type_info::__do_catch): Remove.
13069 (__pointer_to_member_type_info::__is_pointer_p): Declare.
13070 (__pointer_to_member_type_info::__pointer_catch): Declare.
13071 * rtti.c (qualifier_flags): Add restrict flag.
13072 (ptmd_initializer): Reorder members.
13073 (create_tinfo_types): Expand comments. Reorder
13074 ptmd_desc_type_node members.
13075 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
13076 Implement.
13077 (__pointer_type_info::__do_catch): Move specific code into
13078 __pointer_catch. Call it.
13079 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
13080 specific catch checking. Fix void conversion check.
13081 (__pointer_to_member_type_info::__do_catch): Remove.
13082 (__pointer_to_member_type_info::__pointer_catch): Implement.
13083
13084 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13085
13086 * lex.c (init_parse): Remove traces of classof and headof.
13087 * decl2.c (flag_operator_names): Default to 1.
13088 (lang_decode_option): Do not set it for -ansi.
13089
13090 2000-04-09 Mark Mitchell <mark@codesourcery.com>
13091
13092 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
13093 (DECL_MAIN_VARIANT): Remove.
13094 * decl.c (duplicate_decls): Don't set it.
13095 (start_function): Likewise.
13096 (lang_mark_tree): Don't mark it.
13097 * decl2.c (defer_fn): Don't use it.
13098 * lex.c (retrofit_lang_decl): Don't set it.
13099 * pt.c (tsubst_decl): Likewise.
13100 * ptree.c (print_lang_decl): Don't print it.
13101 * typeck.c (mark_addressable): Don't use it.
13102
13103 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
13104
13105 * vec.cc: Include <new> and <exception>.
13106 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
13107 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
13108 terminate.
13109 (__cxa_vec_delete): Catch dtor exceptions.
13110
13111 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
13112
13113 Prepend __ to implementation defined names.
13114 * inc/typeinfo (type_info): Rename _name to __name.
13115 (type_info::type_info): Rename parameter.
13116 (type_info::operator==, type_info::operator!=,
13117 type_info::before): Likewise.
13118 (type_info::is_pointer_p, type_info::is_function_p,
13119 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
13120 parameters.
13121 * inc/cxxabi.h
13122 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
13123 (__pointer_type_info::__pointer_type_info): Likewise.
13124 (__pointer_type_info::is_pointer_p,
13125 __pointer_type_info::do_catch): Prepend __. Rename parameters.
13126 (__array_type_info::__array_type_info): Rename parameters.
13127 (__function_type_info::__function_type_info): Likewise.
13128 (__function_type_info::is_function_p): Prepend __.
13129 (__enum_type_info::__enum_type_info): Rename parameters.
13130 (__pointer_to_member_type_info::__pointer_to_member_type_info):
13131 Likewise.
13132 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
13133 parameters.
13134 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
13135 (__class_type_info::__class_type_info): Rename parameters.
13136 (__class_type_info::sub_kind): Prepend __. Adjust member names.
13137 (__class_type_info::upcast_result,
13138 __class_type_info::dyncast_result): Prepend __. Move definition
13139 into tinfo.cc.
13140 (__class_type_info::do_upcast, __class_type_info::do_catch,
13141 __class_type_info::find_public_src,
13142 __class_type_info::do_dyncast,
13143 __class_type_info::do_find_public_src): Prepend __. Rename
13144 parameters.
13145 (__si_class_type_info::__si_class_type_info): Rename parameters.
13146 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
13147 __si_class_type_info::do_find_public_src): Prepent __. Rename
13148 parameters.
13149 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
13150 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
13151 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
13152 parameters.
13153 (__dynamic_cast): Rename parameters.
13154 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
13155 type_info::do_catch, type_info::do_upcast): Prepend __.
13156 (contained_p, public_p, virtual_p, contained_public_p,
13157 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
13158 (__class_type_info::do_catch,
13159 __class_type_info::do_upcast): Prepend __. Adjust.
13160 (__class_type_info::__upcast_result,
13161 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
13162 Adjust.
13163 (__class_type_info::find_public_src): Prepend __. Adjust.
13164 (__class_type_info::do_find_public_src,
13165 __si_class_type_info::do_find_public_src,
13166 __vmi_class_type_info::do_find_public_src): Likewise.
13167 (__class_type_info::do_dyncast,
13168 __si_class_type_info::do_dyncast,
13169 __vmi_class_type_info::do_dyncast): Likewise.
13170 (__class_type_info::do_upcast,
13171 __si_class_type_info::do_upcast,
13172 __vmi_class_type_info::do_upcast): Likewise.
13173 (__dynamic_cast): Adjust.
13174 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
13175 (__function_type_info::is_function_p): Likewise.
13176 (__pointer_type_info::do_catch): Likewise. Adjust.
13177 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
13178 (__throw_type_match_rtti_2): Adjust.
13179 (__is_pointer): Adjust.
13180
13181 2000-04-08 Mark Mitchell <mark@codesourcery.com>
13182
13183 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
13184 (complete_ctor_identifier): New macro.
13185 (special_function_kind): Add sfk_copy_constructor and
13186 sfk_assignment_operator.
13187 (LOOKUP_HAS_IN_CHARGE): Remove.
13188 (cons_up_default_function): Rename to ...
13189 (implicitly_declare_fn): ... this.
13190 * call.c (build_new_method_call): Add in-charge parameters for
13191 constructors here.
13192 * class.c (add_implicitly_declared_members): Change parameter name
13193 from cant_have_assignment to cant_have_const_assignment.
13194 Replace calls to cons_up_default_function to implicitly_declare_fn.
13195 * cvt.c (ocp_convert): Use complete_ctor_identifier.
13196 * decl.c (initialize_predefined_identifiers): Initialize it.
13197 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
13198 complex expression.
13199 * init.c (expand_default_init): Don't calculate the in-charge
13200 parameter here.
13201 (build_new_1): Likewise.
13202 * lex.c (cons_up_default_function): Move to method.c.
13203 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
13204 (implicitly_declare_fn): New function.
13205 * typeck.c (build_static_cast): Use complete_ctor_identifier.
13206 (build_modify_expr): Likewise.
13207 * typeck2.c (build_functional_cast): Likewise.
13208
13209 Under the new ABI, constructors don't return `this'.
13210 * cp-tree.h (warn_reorder): Declare.
13211 (special_function_kind): New enum.
13212 (global_base_init_list): Remove declaration.
13213 (emit_base_init): Don't return a value.
13214 (check_base_init): Don't declare.
13215 (is_aggr_typedef): Likewise.
13216 * decl.c (check_special_function_return_type): New function.
13217 (return_types): Remove.
13218 (grokdeclarator): Use check_special_function_return_type.
13219 (start_function): Don't initialize ctor_label under the new ABI.
13220 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
13221 * init.c (begin_init_stmts): Move to top of file.
13222 (finish_init_stmts): Likewise.
13223 (warn_reorder): Don't declare.
13224 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
13225 value.
13226 (check_base_init): Remove.
13227 (is_aggr_typedef): Likewise.
13228 (build_new_1): Don't use the return value of a constructor.
13229 * semantics.c (setup_vtbl_ptr): Don't use the return value
13230 of emit_base_init.
13231 * typeck.c (check_return_expr): Don't magically convert return
13232 statements into `return this' in constructors under the new ABI.
13233
13234 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
13235 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
13236 (base_ctor_identifier): New macro.
13237 (base_dtor_identifier): Likewise.
13238 (deleting_dtor_identifier): Likewise.
13239 * decl.c: Don't include obstack.h.
13240 (obstack_chunk_alloc): Don't define.
13241 (obstack_chunk_free): Likewise.
13242 (struct predefined_identifier): New type.
13243 (initialize_predefined_identifiers): New function.
13244 (init_decl_processing): Use it.
13245 (debug_temp_inits): Remove.
13246 (start_method): Don't call preserve_data.
13247 (hack_incomplete_structures): Update comment.
13248 * init.c (init_init_processing): Don't initialize
13249 nelts_identifier.
13250 (build_offset_rf): Remove dead code.
13251 (build_delete): Use CLASSTYPE_N_BASECLASSES.
13252 * search.c (init_search_processing): Don't initialize
13253 vptr_identifier.
13254
13255 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13256
13257 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
13258 some sign_compare warnings.
13259
13260 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
13261
13262 Rename abi::__vmi_class_type_info members.
13263 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
13264 base_list, detail_masks members to vmi_flags, vmi_base_count,
13265 vmi_bases and vmi_flags_masks respectively.
13266 (__vmi_class_type_info::vmi_flags_masks): Rename
13267 details_unknown_mask to flags_unknown_mask.
13268 * tinfo.cc (__class_type_info::do_upcast): Adjust.
13269 (__vmi_class_type_info::do_find_public_src): Adjust.
13270 (__vmi_class_type_info::do_dyncast): Adjust.
13271 (__vmi_class_type_info::do_upcast): Adjust.
13272
13273 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
13274
13275 * tinfo.cc (convert_to_base): New function.
13276 (get_vbase_offset): Remove. Move into convert_to_base.
13277 (__vmi_class_type_info::do_find_public_src): Adjust.
13278 (__vmi_class_type_info::do_dyncast): Adjust.
13279 (__vmi_class_type_info::do_upcast): Adjust.
13280
13281 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
13282
13283 * tinfo.cc (operator=): Use __builtin_strcmp.
13284 * tinfo2.cc (before): Likewise.
13285
13286 2000-04-06 Mark Mitchell <mark@codesourcery.com>
13287
13288 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
13289 (DECL_SAVED_INLINE): Rename to ...
13290 (DECL_DEFERRED_FN): ... this.
13291 (in_function_p): Remove declaration.
13292 (mark_inline_for_output): Rename to ...
13293 (defer_fn): ... this.
13294 * decl.c (finish_function): Adjust call to mark_inline_for_output.
13295 (in_function_p): Remove definition.
13296 * decl2.c (saved_inlines): Rename to ...
13297 (deferred_fns): ... this.
13298 (saved_inlines_used): Rename to ...
13299 (deferred_fns_used): ... this.
13300 (mark_inline_for_output): Rename to ...
13301 (defer_fn): ... this.
13302 (finish_file): Adjust accordingly.
13303 (init_decl2): Likewise.
13304 * lex.c (cons_up_default_function): Likewise.
13305 * pt.c (mark_decl_instantiated): Likewise.
13306 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
13307 circumstances.
13308 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
13309 * semantics.c (expand_body): Defer more functions.
13310
13311 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
13312
13313 * vec.cc: New file.
13314 * Make-lang.in (CXX_LIB2FUNCS): Add it.
13315 (vec.o): Build it.
13316 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13317 __cxa_vec_delete): Declare.
13318
13319 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
13320
13321 * rtti.c (dfs_class_hint_mark): New static function.
13322 (dfs_class_hint_unmark): New static function.
13323 (class_hint_flags): Use them.
13324
13325 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
13326
13327 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
13328
13329 2000-04-05 Mark Mitchell <mark@codesourcery.com>
13330
13331 * cp-tree.h (instantiate_decl): Change prototype.
13332 * decl2.c (mark_used): Adjust call.
13333 * optimize.c (inlinable_function_p): Adjust handling of templates.
13334 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
13335 (do_type_instantiation): Likewise.
13336 (instantiate_decl): Defer more templates.
13337 (instantiate_pending_templates): Adjust logic to handle inline
13338 friend functions.
13339
13340 * Makefile.in (GGC_H): New variable. Use it throughout in place
13341 of ggc.h.
13342
13343 * call.c: Don't include obstack.h. Include ggc.h.
13344 (obstack_chunk_alloc): Don't define.
13345 (obstack_chunk_free): Likewise.
13346 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
13347 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
13348 (pop_switch): Free it.
13349
13350 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
13351
13352 * dump.c (dequeue_and_dump): Don't try to print the bit_position
13353 if we don't have a DECL_FIELD_OFFSET.
13354
13355 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
13356
13357 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
13358 special_function_p.
13359
13360 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13361
13362 * cfns.gperf (hash, libc_name_p): Prototype.
13363
13364 * rtti.c (build_dynamic_cast_1): Constification.
13365
13366 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
13367
13368 * semantics.c (deferred_type_access_control): Prototype.
13369
13370 2000-04-04 Mark Mitchell <mark@codesourcery.com>
13371
13372 Correct many new ABI issues regarding vbase and vcall offset
13373 layout.
13374 * cp-tree.h (BINFO_VTABLE): Document.
13375 (struct lang_type): Tweak formatting.
13376 (BINFO_PRIMARY_BINFO): Add to documentation.
13377 (CLASSTYPE_VSIZE): Fix typo in comment.
13378 (CLASSTYPE_VBASECLASSES): Update documentation.
13379 (BINFO_VBASE_MARKED): Remove.
13380 (SET_BINFO_VBASE_MARKED): Likewise.
13381 (CLEAR_BINFO_VBASE_MARKED): Likewise.
13382 (BINFO_FIELDS_MARKED): Remove.
13383 (SET_BINFO_FIELDS_MARKED): Likewise.
13384 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
13385 (enum access_kind): New enumeration.
13386 (num_extra_vtbl_entries): Remove declaration.
13387 (size_extra_vtbl_entries): Likewise.
13388 (get_vtbl_decl_for_binfo): New function.
13389 (dfs_vbase_unmark): Remove declaration.
13390 (mark_primary_bases): Likewise.
13391 * class.c (SAME_FN): Remove.
13392 (struct vcall_offset_data_s): Move definition.
13393 (build_vbase_pointer): Use `build', not `build_binary_op', to
13394 access the vbase pointer under the new ABI.
13395 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
13396 (build_primary_vtable): Likewise.
13397 (dfs_mark_primary_bases): Move here from search.c.
13398 (mark_primary_bases): Likewise.
13399 (determine_primary_bases): Under the new ABI, don't make a base
13400 class a primary base just because we don't yet have any virtual
13401 functions.
13402 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
13403 (num_vfun_entries): Remove.
13404 (dfs_count_virtuals): Likewise.
13405 (num_extra_vtbl_entries): Likewise.
13406 (size_extra_vtbl_entries): Likewise.
13407 (layout_virtual_bases): Iterate in inheritance graph order under
13408 the new ABI.
13409 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
13410 indicate that a vfield is present.
13411 (init_class_processing): Initialize access_public_node, etc., from
13412 ak_public, etc.
13413 (get_vtbl_decl_for_binfo): New function.
13414 (dump_class_hierarchy_r): Likewise.
13415 (dump_class_hierarchy): Use it.
13416 (finish_vtbls): Build the vtbls in inheritance graph order.
13417 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
13418 (initialize_vtable): Use get_vtbl_decl_for_binfo.
13419 (accumulate_vtbl_inits): Add comments explaining why a pre-order
13420 walk is required.
13421 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
13422 where the vptr points, even for primary vtables.
13423 (build_vtbl_initializer): Adjust handling of vbase and vcall
13424 offsets.
13425 (build_vcall_and_vbase_vtable_entries): New function.
13426 (dfs_build_vbase_offset_vtbl_entries): Remove.
13427 (build_vbase_offset_vtbl_entries): Reimplement.
13428 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
13429 were already handled in a primary base class vtable.
13430 (build_vcall_offset_vtbl_entries): Adjust.
13431 (build_rtti_vtbl_entries): Adjust.
13432 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
13433 * init.c (expand_virtual_init): Simplify.
13434 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
13435 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
13436 * search.c (BINFO_ACCESS): New macro.
13437 (SET_BINFO_ACCESS): Likewise.
13438 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
13439 (access_in_type): Likewise.
13440 (dfs_accessible_p): Likewise.
13441 (protected_accessible_p): Likewise.
13442 (lookup_fnfields_1): Adjust documentation.
13443 (dfs_mark_primary_bases): Move to class.c
13444 (mark_primary_bases): Likewise.
13445 (dfs_vbase_unmark): Remove.
13446 (virtual_context): Use BINFO_FOR_VBASE.
13447 (dfs_get_vbase_types): Simplify.
13448 (dfs_build_inheritance_graph_order): New function.
13449 (get_vbase_types): Use it.
13450 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
13451
13452 * tinfo.cc (get_vbase_offset): New function.
13453 (__vmi_class_type_info::do_find_public_src): Use it.
13454 (__vmi_class_type_info::do_dyncast): Likewise.
13455 (__vmi_class_type_info::do_upcast): Likewise.
13456
13457 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
13458
13459 * lang-specs.h: Pass -fno-show-column to the preprocessor.
13460
13461 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
13462
13463 * rtti.c (class_hint_flags): Rename flags.
13464 (class_initializer): Remove flags.
13465 (synthesize_tinfo_var): Combine offset and flags. Add flags
13466 for __vmi_class_type_info.
13467 (create_tinfo_types): Remove flags from __class_type_info and
13468 __si_class_type_info. Merge flags and offset from
13469 base_class_type_info.
13470 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
13471 (__base_class_info::is_virtual_p): Adjust.
13472 (__base_class_info::is_public_p): Adjust.
13473 (__base_class_info::offset): New accessor.
13474 (__class_type_info::details): Remove member.
13475 (__class_type_info::__class_type_info): Lose details.
13476 (__class_type_info::detail_masks): Remove.
13477 (__si_class_type_info::__si_class_type_info): Lose details.
13478 (__vmi_class_type_info::details): New member.
13479 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
13480 (__vmi_class_type_info::detail_masks): New member.
13481 * tinfo.cc (__class_type_info::do_upcast): Initialize result
13482 with unknown_details_mask.
13483 (__vmi_class_type_info::do_find_public_src): Adjust
13484 (__vmi_class_type_info::do_dyncast): Adjust.
13485 (__vmi_class_type_info::do_upcast): Set result details, if
13486 needed. Adjust.
13487 (__dynamic_cast): Temporarily #if out optimization.
13488
13489 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
13490
13491 * rtti.c (get_tinfo_decl): Mark used.
13492 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
13493 mark as dealt with, if we output it.
13494
13495 2000-03-28 Mark Mitchell <mark@codesourcery.com>
13496
13497 * class.c: Reorganize to put virtual function table initialization
13498 machinery at the end of the file.
13499
13500 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
13501
13502 * class.c (finish_struct): Use bitsize_zero_node.
13503 * pt.c (instantiate_class_template): Likewise.
13504
13505 2000-03-28 Mark Mitchell <mark@codesourcery.com>
13506
13507 Put RTTI entries at negative offsets in new ABI.
13508 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
13509 vbase offset at index -3, not -1.
13510 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
13511 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
13512 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
13513 (build_rtti_vtbl_entries): New function.
13514 (set_rtti_entry): Remove.
13515 (build_primary_vtable): Don't use it.
13516 (build_secondary_vtable): Likewise.
13517 (start_vtable): Remove.
13518 (first_vfun_index): New function.
13519 (set_vindex): Likewise.
13520 (add_virtual_function): Don't call start_vtable. Do call
13521 set_vindex.
13522 (set_primary_base): Rename parameter.
13523 (determine_primary_base): Likewise.
13524 (num_vfun_entries): Don't use skip_rtti_stuff.
13525 (num_extra_vtbl_entries): Include RTTI information.
13526 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
13527 (skip_rtti_stuff): Remove.
13528 (dfs_modify_vtables): Don't use it.
13529 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
13530 (layout_nonempty_base_or_field): Update size handling.
13531 (create_vtable_ptr): Tweak.
13532 (layout_class_type): Adjust parameter names.
13533 (finish_struct_1): Simplify.
13534 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
13535 (skip_rtti_stuff): Remove.
13536 (first_vfun_index): New function.
13537 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
13538 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
13539 (marked_vtable_pathp): Declare.
13540 (unmarked_vtable_pathp): Likewise.
13541 * error.c (dump_expr): Use first_vfun_index to calculate vtable
13542 offsets.
13543 * rtti.c (build_headof): Look for RTTI at negative offsets.
13544 (get_tinfo_decl_dynamic): Likewise.
13545 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
13546 here.
13547 (create_pseudo_type_info): Do it here instead. Adjust so that
13548 vptr points at first virtual function.
13549 * search.c (marked_vtable_pathp): Make it global.
13550 (unmarked_vtable_pathp): Likewise.
13551 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
13552 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
13553 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
13554 (get_pure_virtuals): Likewise.
13555 (expand_upcast_fixups): Likewise.
13556 * tree.c (debug_binfo): Likewise.
13557 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
13558 negative offset.
13559
13560 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13561
13562 * class.c (check_field_decl): Fix typo.
13563 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
13564 (check_methods): Likewise.
13565 (check_field_decls): Likewise.
13566 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
13567 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
13568 Use DECL_RESULT_FLD, not DECL_RESULT.
13569 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
13570 * lex.c (identifier_type): Likewise.
13571 * pt.c (determine_specialization, lookup_template_class): Likewise.
13572 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
13573 (resolve_overloaded_unification, more_specialized): Likewise.
13574 * semantics.c (finish_member_declaration): Likewise.
13575 * typeck.c (build_x_function_call): Likewise.
13576
13577 2000-03-26 Mark Mitchell <mark@codesourcery.com>
13578
13579 * class.c (layout_empty_base): Handle empty bases with non-byte
13580 alignment.
13581 (build_base_field): Likewise.
13582 (layout_virtual_bases): Likewise.
13583
13584 * class.c (finish_struct_1): Fix typo in this change:
13585
13586 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13587
13588 2000-03-25 Mark Mitchell <mark@codesourcery.com>
13589
13590 * decl.c (grokdeclarator): Count partial specializations when
13591 keeping track of how many template classes have been seen.
13592
13593 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
13594
13595 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13596
13597 * class.c (build_vbase_pointer_fields): layout_field now place_field.
13598 (get_vfield_offset): Use byte_position.
13599 (set_rtti_entry): Set OFFSET to ssizetype zero.
13600 (get_binfo_offset_as_int): Deleted.
13601 (dfs_record_base_offsets): Use tree_low_cst.
13602 (dfs_search_base_offsets): Likewise.
13603 (layout_nonempty_base_or_field): Reflect changes in RLI format
13604 and call byte_position.
13605 (layout_empty_base): Convert offset to ssizetype.
13606 (build_base_field): use rli_size_unit_so_far.
13607 (dfs_propagate_binfo_offsets): Do computation in proper type.
13608 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
13609 (layout_class_type): Reflect changes in RLI names and fields.
13610 (finish_struct_1): Set DECL_FIELD_OFFSET.
13611 * dump.c (dequeue_and_dump): Call bit_position.
13612 * expr.c (cplus_expand_constant): Use byte_position.
13613 * rtti.c (expand_class_desc): Use bitsize_one_node.
13614 * typeck.c (build_component_addr): Use byte_position and don't
13615 special case for zero offset.
13616
13617 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
13618
13619 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
13620
13621 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
13622 tinfo object.
13623 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
13624 vtable.
13625
13626 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13627
13628 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
13629 DECL_P macros.
13630 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
13631 make_typename_type, check_initializer, cp_finish_decl,
13632 xref_tag): Likewise.
13633 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
13634 decl_namespace, arg_assoc_template_arg, arg_assoc,
13635 validate_nonmember_using_decl, do_class_using_decl): Likewise.
13636 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
13637 args_to_string): Likewise.
13638 * friend.c (is_friend): Likewise.
13639 * lex.c (note_got_semicolon, note_list_got_semicolon,
13640 is_global): Likewise.
13641 * method.c (build_overload_nested_name, build_overload_value,
13642 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
13643 * parse.y (typename_sub, typename_sub1): Likewise.
13644 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
13645 process_partial_specialization, convert_template_argument,
13646 template_args_equal, add_pending_template, lookup_template_class,
13647 for_each_template_parm_r, maybe_fold_nontype_arg,
13648 tsubst, instantiate_template, type_unification_real, unify,
13649 instantiate_pending_templates, set_mangled_name_for_template_decl):
13650 Likewise.
13651 * repo.c (repo_get_id, repo_template_used): Likewise.
13652 * search.c (lookup_field_1): Likewise.
13653 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
13654 * xref.c (classname): Likewise.
13655
13656 2000-03-22 Mark Mitchell <mark@codesourcery.com>
13657
13658 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
13659 (CANONICAL_BINFO): New macro.
13660 (BINFO_NEW_VTABLE_MARKED): Use it.
13661 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
13662 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
13663 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
13664 not TREE_TYPE.
13665 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13666 (build_secondary_vtable): Likewise.
13667 (dfs_finish_vtbls): Likewise.
13668 (dfs_accumulate_vtbl_inits): Likewise.
13669 (accumulate_vtbl_inits): New function.
13670 (finish_vtbls): Make sure that virtual bases come after
13671 non-virtual bases in the vtable group.
13672 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
13673 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13674 * search.c (struct vbase_info): Move definition.
13675 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13676 (unmarked_new_vtable_p): Likewise.
13677 (dfs_mark_vtable_path): Remove.
13678 (dfs_mark_new_vtable): Remove.
13679 (dfs_unmark_new_vtable): Likewise.
13680 (dfs_clear_search_slot): Likewise.
13681 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
13682 (dfs_clear_vbase_slots): Likewise.
13683 (init_vbase_pointers): LIkewise.
13684
13685 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
13686
13687 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
13688 SIZETYPE to a non-SIZETYPE.
13689
13690 2000-03-21 Mark Mitchell <mark@codesourcery.com>
13691
13692 * class.c (layout_virtual_bases): Adjust names in conditionally
13693 compiled code.
13694
13695 * class.c (record_base_offsets): New function.
13696 (layout_conflict_p): Likewise.
13697 (layout_nonempty_base_or_field): Use it.
13698 (layout_empty_base): New function.
13699 (build_base_field): Use it.
13700 (build_base_fields): Update comment.
13701 (layout_virtual_bases): Fold in a little code form
13702 layout_basetypes. Use layout_empty_base.
13703 (layout_basetypes): Remove.
13704 (end_of_class): New function.
13705 (layout_class_type): Use it. Adjust.
13706
13707 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
13708 (fntype_p): Remove.
13709 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
13710 comment.
13711 (dfs_skip_nonprimary_vbases_markedp): Likewise.
13712 * typeck.c (fntype_p): Remove.
13713
13714 * cp-tree.h (TI_SPEC_INFO): Remove.
13715 (CLASSTYPE_TI_SPEC_INFO): Likewise.
13716 * pt.c (process_partial_specialization): Likewise.
13717
13718 * class.c (build_base_field): Fix thinko in computation of binfo
13719 offsets.
13720
13721 * tree.c (mark_local_for_remap_p): Mark variables declared in
13722 TARGET_EXPRs as well.
13723
13724 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
13725
13726 * typeck.c (require_complete_type, complete_type,
13727 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
13728 build_array_ref, convert_arguments, pointer_diff,
13729 build_x_unary_op, build_unary_op, build_c_cast,
13730 build_modify_expr): Use COMPLETE_TYPE_P etc.
13731 * call.c (is_complete, convert_like_real,
13732 build_new_method_call): Likewise.
13733 * class.c (build_vbase_pointer_fields, check_bases,
13734 build_base_field, finish_struct_1, pushclass): Likewise.
13735 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
13736 * decl.c (maybe_process_template_type_declaration, pushtag,
13737 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
13738 layout_var_decl, check_initializer, cp_finish_decl,
13739 grokdeclarator, require_complete_types_for_parms,
13740 grok_op_properties, xref_tag, xref_basetypes,
13741 check_function_type): Likewise.
13742 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
13743 * friend.c (do_friend): Likewise.
13744 * init.c (build_offset_ref): Likewise.
13745 * parse.y (structsp): Likewise.
13746 * pt.c (maybe_process_partial_specialization,
13747 tsubst_friend_function, instantiate_class_template, tsubst,
13748 do_type_instantiation, instantiate_pending_templates): Likewise.
13749 * repo.c (repo_get_id): Likewise.
13750 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
13751 synthesize_tinfo_var, emit_support_tinfos): Likewise.
13752 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
13753 * semantics.c (begin_class_definition): Likewise.
13754 * tree.c (build_cplus_method_type): Likewise.
13755 * typeck2.c (digest_init, build_functional_cast,
13756 add_exception_specifier): Likewise.
13757 * parse.h, parse.c: Regenerated.
13758
13759 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
13760
13761 * inc/cxxabi.h: New header file. Define new-abi entry points.
13762 (__pointer_type_info::target): Rename member to ...
13763 (__pointer_type_info::type): ... here.
13764 (__base_class_info::type): Rename member to ...
13765 (__base_class_info::base): ... here.
13766 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
13767 * cp-tree.h (CPTI_ABI): New global tree enumeration.
13768 (abi_node): New global tree node.
13769 * decl.c (abi_node): Document.
13770 (init_decl_processing): Initialize abi_node.
13771 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
13772 (get_vmi_pseudo_type_info): Likewise.
13773 (create_tinfo_types): Likewise.
13774 (emit_support_tinfos): Likewise.
13775 * tinfo.h (cxxabi.h): Include for new-abi.
13776 Move rtti class definitions to new header file.
13777 * tinfo.cc (abi): Use the namespace.
13778 (std): Move new abi rtti classes from here ...
13779 (__cxxabiv1): ... to here.
13780 * tinfo2.cc (cxxabi.h): Include for new-abi.
13781 Move rtti class definitions to new header file.
13782 (std): Move new abi rtti classes from here ...
13783 (__cxxabiv1): ... to here.
13784 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
13785 namespace.
13786
13787 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
13788 Jason Merrill <jason@casey.cygnus.com>
13789
13790 * method.c (build_overload_int): Use host_integerp.
13791
13792 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13793
13794 * init.c (build_offset_ref): Handle the case of a templated member
13795 function.
13796
13797 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13798
13799 * except.c (expand_exception_blocks): Clear catch_clauses_last.
13800
13801 2000-03-18 Mark Mitchell <mark@codesourcery.com>
13802
13803 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
13804 * class.c (check_bitfield_decl): Turn illegal bitfields into
13805 non-bitfields.
13806 (dfs_propagate_binfo_offsets): Adjust for new size_binop
13807 semantics.
13808 (dfs_offset_for_unshared_vbases): Likewise.
13809 * cvt.c (cp_convert_to_pointer): Convert NULL to a
13810 pointer-to-member correctly under the new ABI.
13811 * expr.c (cplus_expand_constant): Don't use cp_convert when
13812 turning an offset into a pointer-to-member.
13813 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
13814 when dereferencing them under the new ABI.
13815 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
13816 of pointers-to-members under the new ABI.
13817
13818 * class.c (check_bitfield_decl): Remove restriction on really long
13819 bitfields.
13820 (layout_class_type): Implement new ABI handling of bitfields
13821 longer than their types.
13822
13823 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13824
13825 * parse.y (extdefs): Call ggc_collect.
13826 * parse.c: Regenerated.
13827
13828 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
13829
13830 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
13831 (note_name_declared_in_class): Use OVL_CURRENT to get at a
13832 potential overload.
13833
13834 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13835
13836 * class.c (build_vbase_path): Use integer_zerop.
13837 (build_vtable_entry): Use tree_low_cst.
13838 (get_vfield_offset): Use bit_position.
13839 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
13840 Use tree_low_cst.
13841 (check_bitfield_decl): Set DECL_SIZE using convert.
13842 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
13843 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
13844 Use tree_low_cst.
13845 (finish_struct_1): Use bit_position.
13846 (dump_class_hierarchy): Use tree_low_cst.
13847 * cp-tree.h (min_precision): Add declaration.
13848 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
13849 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
13850 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
13851 * expr.c (cplus_expand_constant): Use bit_position.
13852 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
13853 * rtti.c (get_base_offset): Use bit_position.
13854 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
13855 host_integerp, and tree_low_cst.
13856 (pointer_int_sum): Use integer_zerop.
13857 (build_component_addr): Use bit_position.
13858
13859 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
13860
13861 * typeck.c (require_complete_type): Don't assume size_zero_node.
13862 (complete_type_or_else): Likewise.
13863
13864 2000-03-16 Steven Grady <grady@digitaldeck.com>
13865 Jason Merrill <jason@casey.cygnus.com>
13866
13867 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
13868
13869 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
13870
13871 * decl2.c (grokfield): Bail out if type is error_mark_node.
13872
13873 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
13874
13875 * tinfo2.cc (__ptr_to_member_data): Rename to ...
13876 (__pointer_to_member_data): ... here. Adjust.
13877 * rtti.c (create_tinfo_types): Adjust.
13878
13879 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
13880
13881 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
13882 * decl.c (ref_desc_type_node): Undocument.
13883 * rtti.c (ptr_ref_initializer): Rename to ...
13884 (ptr_initializer): ... here. Adjust comments.
13885 (ptmd_initializer): Fix comment thinko.
13886 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
13887 (create_tinfo_types): Remove ref_desc_type_node init.
13888 * tinfo2.cc (__reference_type_info): Remove.
13889
13890 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
13891
13892 * decl.c (cp_finish_decl): Remove obsolete comment.
13893
13894 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
13895
13896 2000-03-14 Mark Mitchell <mark@codesourcery.com>
13897
13898 * cp-tree.h: Tweak documentation.
13899 * class.c (build_vbase_pointer_fields): Layout the fields, too.
13900 (avoid_overlap): Remove.
13901 (get_binfo_offset_as_int): New function.
13902 (dfs_serach_base_offsets): Likewise.
13903 (layout_nonempty_base_or_field): Likewise.
13904 (build_base_field): Layout fields here. Avoid placing two objects
13905 of the same type at the same address, under the new ABI.
13906 (build_base_fields): Adjust accordingly.
13907 (create_vtable_ptr): Return the new field, but don't attach it to
13908 TYPE_FIELDS.
13909 (remove_base_field): Remove.
13910 (remove_base_fields): Remove.
13911 (layout_basetypes): Adjust accordingly.
13912 (layout_class_type): Call layout_field for each field, rather than
13913 just making a wholesale call to layout_type.
13914
13915 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
13916
13917 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
13918
13919 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
13920
13921 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
13922
13923 * except.c (dtor_nothrow): New fn.
13924 (do_pop_exception): Use it. Take type parm.
13925 (push_eh_cleanup): Take type parm.
13926 (expand_start_catch_block): Pass it.
13927 (build_eh_type_type_ref): Accept null type.
13928
13929 2000-03-12 Mark Mitchell <mark@codesourcery.com>
13930
13931 * cp-tree.h (revert_static_member_fn): Change prototype.
13932 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
13933 (grok_op_properties): Likewise.
13934 (start_function): Likewise.
13935 (revert_static_member_fn): Simplify.
13936 * pt.c (check_explicit_specialization): Adjust call to
13937 revert_static_member_fn.
13938
13939 2000-03-11 Mark Mitchell <mark@codesourcery.com>
13940
13941 * cp-tree.h (scope_kind): New type.
13942 (tmpl_spec_kind): Likewise.
13943 (declare_pseudo_global_level): Remove.
13944 (pseudo_global_level_p): Rename to template_parm_scope_p.
13945 (pushlevel): Remove declaration.
13946 (begin_scope): New function.
13947 (finish_scope): Likewise.
13948 (current_tmpl_spec_kind): Likewise.
13949 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
13950 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
13951 Add template_spec_p.
13952 (toplevel_bindings_p): Adjust.
13953 (declare_pseudo_global_level): Remove.
13954 (pseudo_global_level_p): Rename to template_parm_scope_p.
13955 (current_tmpl_spec_kind): New function.
13956 (begin_scope): Likewise.
13957 (finish_scope): Likewise.
13958 (maybe_push_to_top_level): Adjust.
13959 (maybe_process_template_type_declaration): Likewise.
13960 (pushtag): Likewise.
13961 (pushdecl_nonclass_level): Likewise.
13962 (lookup_tag): Likewise.
13963 (grokfndecl): Handle member template specializations. Share
13964 constructor and non-constructor code.
13965 * decl2.c (check_classfn): Handle member template specializations.
13966 * pt.c (begin_template_parm_list): Use begin_scope.
13967 (begin_specialization): Likewise.
13968 (end_specialization): Likewise.
13969 (check_explicit_specialization): Use current_tmpl_spec_kind.
13970 Handle member template specializations.
13971 (end_template_decl): Use finish_scope. Remove call to
13972 get_pending_sizes.
13973 (push_template_decl_real): Remove bogus error message.
13974 (tsubst_decl): Fix typo in code contained in comment.
13975 (instantiate_template): Handle member template specializations.
13976 (most_general_template): Likewise.
13977
13978 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
13979
13980 * lex.c (whitespace_cr): Compress consecutive calls to warning().
13981 (do_identifier): Ditto for error().
13982
13983 * pt.c (convert_nontype_argument): Ditto for cp_error().
13984 (convert_template_argument): Ditto for cp_pedwarn().
13985
13986 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
13987
13988 * exception.cc (__check_null_eh_spec): New fn.
13989 * except.c (expand_end_eh_spec): Call it if the spec is throw().
13990
13991 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
13992
13993 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
13994 * except.c (expand_end_eh_spec): Add the return type.
13995 * rtti.c (throw_bad_cast): Add the parmtypes.
13996 (throw_bad_typeid): Likewise.
13997
13998 * semantics.c (expand_stmt): Only leave out rtl for unused
13999 artificials, and set DECL_IGNORED_P on them as well.
14000 * decl.c (wrapup_globals_for_namespace): Likewise.
14001
14002 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
14003
14004 * decl.c (maybe_commonize_var): Skip all artificial decls.
14005 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
14006
14007 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
14008
14009 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
14010 * cp-tree.h: Declare flag_enforce_eh_specs.
14011 * decl.c (store_parm_decls, finish_function): Check it.
14012
14013 C library functions don't throw.
14014 * Makefile.in (cfns.h): New target.
14015 (except.o): Depend on it.
14016 * Make-lang.in (cc1plus): Depend on cfns.gperf.
14017 * cfns.gperf: New file.
14018 * cfns.h: Generated.
14019 * except.c: Include it.
14020 (nothrow_libfn_p): New fn.
14021 * decl.c (grokfndecl): Use it.
14022 * cp-tree.h: Declare it.
14023
14024 * decl.c (push_overloaded_decl_1, auto_function,
14025 define_function): Lose.
14026 (build_library_fn_1): New static fn.
14027 (builtin_function): Use it.
14028 (get_atexit_node): Use build_library_fn_ptr.
14029 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
14030 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
14031 push_void_library_fn, push_throw_library_fn): New fns.
14032 * cp-tree.h: Declare them.
14033 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
14034 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
14035 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
14036 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
14037 * rtti.c (build_runtime_decl): Lose.
14038 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
14039 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
14040 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
14041
14042 * call.c (build_call): Remove result_type parm.
14043 Call mark_used on unused artificial fns.
14044 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
14045
14046 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
14047
14048 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
14049 appropriate.
14050 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
14051 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
14052 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
14053 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
14054 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
14055 expand_generic_desc): Likewise.
14056
14057 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
14058
14059 * exception.cc (__cp_pop_exception): Cleanup the original object.
14060
14061 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
14062
14063 * decl.c (grok_op_properties): Merge conversion to void warning
14064 with other silly op warnings.
14065
14066 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
14067
14068 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
14069 array CONSTRUCTOR elements. Don't use expr_tree_cons.
14070
14071 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
14072
14073 * decl.c (cp_make_fname_decl): New function.
14074 (wrapup_globals_for_namespace): Don't emit unused static vars.
14075 (init_decl_processing): Remove comment about use of
14076 array_domain_type. Set make_fname_decl.
14077 (cp_finish_decl): Remove __FUNCTION__ nadgering.
14078 * semantics.c (begin_compound_stmt): Remove
14079 current_function_name_declared flagging.
14080 (expand_stmt): Don't emit unused local statics.
14081 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
14082 specially.
14083
14084 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
14085
14086 * typeck.c (convert_for_assignment): Don't look at array
14087 initializer.
14088 * call.c (convert_like_real): Likewise.
14089
14090 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
14091
14092 Add initial support for '\uNNNN' specifier.
14093 * lex.c (read_ucs): New fn.
14094 (readescape, skip_white_space): Call it.
14095 (is_extended_char, is_extended_char_1): New fns.
14096 (utf8_extend_token): New fn, #if 0'd out.
14097 (real_yylex): Treat extended chars like letters.
14098
14099 * search.c (note_debug_info_needed): Walk the bases even if we
14100 weren't deferring the type itself.
14101
14102 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14103
14104 * decl2.c (finish_objects): Constify a char*.
14105
14106 * method.c (emit_thunk): Likewise.
14107
14108 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
14109
14110 * typeck.c (dubious_conversion_warnings): Look through
14111 REFERENCE_TYPE.
14112
14113 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14114
14115 * class.c (dfs_modify_vtables): I is now unsigned.
14116 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
14117 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
14118 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
14119 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14120 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
14121 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
14122 Call integer_all_onesp.
14123 * typeck2.c (process_init_constructor): Use compare_tree_int.
14124
14125 * lang-specs.h (as): Don't call if -syntax-only.
14126
14127 2000-03-06 Mark Mitchell <mark@codesourcery.com>
14128
14129 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
14130 RTL_EXPR_HAS_NO_SCOPE after all.
14131
14132 2000-03-05 Mark Mitchell <mark@codesourcery.com>
14133
14134 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
14135 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
14136 RTL_EXPR_HAS_NO_SCOPE.
14137
14138 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
14139 later.
14140
14141 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
14142
14143 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
14144
14145 * call.c (convert_like): Macrofy.
14146 (convert_like_with_context): New macro.
14147 (convert_like_real): Renamed from convert_like. Add calling
14148 context parameters, for diagnostics. Add recursive flag. Call
14149 dubious_conversion_warnings for outer conversion.
14150 (build_user_type_conversion): Use convert_like_with_context.
14151 (build_over_call): Likewise. Don't warn about dubious
14152 conversions here. Adjust convert_default_arg calls.
14153 (convert_default_arg): Add context parameters for diagnostics.
14154 Pass through to convert_like_with_context.
14155 * cp-tree.h (convert_default_arg): Add context parameters.
14156 (dubious_conversion_warnings): Prototype new function.
14157 * typeck.c (convert_arguments): Adjust convert_default_arg call.
14158 (dubious_conversion_warnings): New function, broken
14159 out of convert_for_assignment.
14160 (convert_for_assignment): Adjust.
14161
14162 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
14163
14164 * decl2.c (key_method): Break out from...
14165 (import_export_vtable, import_export_class): ...here.
14166
14167 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
14168 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
14169
14170 * search.c (note_debug_info_needed, dfs_debug_mark,
14171 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
14172 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
14173
14174 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
14175
14176 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
14177 typos.
14178
14179 2000-03-02 Mark Mitchell <mark@codesourcery.com>
14180
14181 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
14182 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
14183 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
14184 (lang_type): Split gets_new into has_new and has_array_new.
14185 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14186 (TYPE_GETS_NEW): Split into ...
14187 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
14188 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
14189 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
14190 (build_op_new_call): Don't declare.
14191 (build_new_1): Likewise.
14192 * call.c (build_op_new_call): Remove.
14193 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
14194 instead of TYPE_NEEDS_DESTRUCTOR.
14195 (finish_struct_bits): Likewise.
14196 (add_implicitly_declared_members): Likewise.
14197 (check_field_decl): Likewise.
14198 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
14199 correctly under the new ABI.
14200 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
14201 instead of TYPE_NEEDS_DESTRUCTOR.
14202 (initialize_local_var): Likewise.
14203 (destroy_local_var): Likewise.
14204 (cp_finish_decl): Likewise.
14205 (register_dtor_fn): Likewise.
14206 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
14207 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
14208 TYPE_VEC_DELETE_TAKES_SIZE here.
14209 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
14210 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
14211 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14212 (finish_destructor_body): Likewise.
14213 (maybe_build_cleanup_1): Likewise.
14214 * decl2.c (do_static_destruction): Likewise.
14215 * init.c (build_new_1): Make it static.
14216 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14217 (expand_cleanup_for_base): Likewise.
14218 (get_cookie_size): New function.
14219 (build_new_1): Handle array-new cookies correctly under the new
14220 ABI.
14221 (build_vec_delete_1): Likewise.
14222 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14223 (build_delete): Likewise.
14224 (build_vec_delete): Handle array-new cookies correctly under the new
14225 ABI.
14226 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14227 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
14228 TYPE_HAS_ARRAY_NEW_OPERATOR.
14229 * ptree.c (print_lang_type): Check them.
14230 * search.c (context_for_name_lookup): Fix typo in comment.
14231 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
14232 * tree.c (break_out_cleanups): Likewise.
14233 (build_cplus_array_test_1): Likewise.
14234 (cp_build_qualified_type_real): Likewise.
14235 * typeck.c (complete_type): Likewise.
14236
14237 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
14238 the command-line, not the end.
14239
14240 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
14241
14242 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
14243
14244 2000-03-02 Tom Tromey <tromey@cygnus.com>
14245
14246 * cp-tree.h (build_java_class_ref): Declare.
14247 * init.c (build_java_class_ref): No longer static.
14248 * except.c (expand_throw): Generate a Java-style `throw' if the
14249 thrown object is a "Java" object.
14250 (initialize_handler_parm): Generate a Java-style lookup of
14251 exception info if the caught object is a "Java" object.
14252 (catch_language, catch_language_init): New globals.
14253 (decl_is_java_type): New function.
14254 (expand_start_catch_block): Don't call push_eh_info() or
14255 push_eh_cleanup() when handling a Java-style "catch". Pass Java
14256 class reference to build_catch_block.
14257
14258 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14259
14260 * typeck.c (comptypes): Treat sizetype like its language equivalent.
14261
14262 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
14263
14264 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
14265 to merge reference/pointer code and fix incorrect warnings.
14266
14267 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
14268
14269 * search.c (protected_accessible_p): Use context_for_name_lookup.
14270
14271 * init.c (construct_virtual_bases): Fix thinko.
14272 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
14273
14274 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
14275
14276 * decl.c (current_function_decl): Move to toplev.c.
14277
14278 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
14279
14280 * pt.c (fn_type_unification): Unify return type, whenever
14281 provided.
14282 (get_bindings_real): Only pass return type when necessary.
14283 Remove explicit return type check.
14284 * class.c (resolve_address_of_overloaded_function): Pass desired
14285 return type to fn_type_unification.
14286
14287 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14288
14289 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
14290 DECL_FIELD_SIZE.
14291 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
14292 DECL_FIELD_SIZE.
14293 * rtti.c (expand_class_desc): Likewise.
14294 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
14295 (THUNK_VCALL_OFFSET): Likewise.
14296 (THUNK_DELTA): Reflect changes in ../tree.h.
14297
14298 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
14299
14300 * search.c (protected_accessible_p): Also allow the access if
14301 the member is public in DERIVED. Lose TYPE parm.
14302 (friend_accessible_p): Lose TYPE parm.
14303 (accessible_p): Adjust.
14304
14305 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14306
14307 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
14308 on things that are not sizes; ssize_binop deleted.
14309 Call size_diffop when appropriate.
14310 (dfs_build_vcall_offset_vtbl_entries): Likewise.
14311 (build_primary_vtable, build_secondary_vtable): Likewise.
14312 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
14313 Variable I is HOST_WIDE_INT.
14314 (get_vfield_offset): Pass proper types to size_binop.
14315 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
14316 (finish_struct_1): Likewise.
14317 (skip_rtti_stuff): Arg N is now pointer to signed.
14318 (layout_class_type): Use size_zero_node.
14319 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
14320 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
14321 * decl.c (complete_arry_type): Pass proper types to size_binop.
14322 (xref_basetypes): BINFO_OFFSET is sizetype.
14323 * error.c (dump_expr): Don't use size_binop non-sizes.
14324 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
14325 * init.c (construct_virtual_bases): Fix type error.
14326 (build_vec_delete_1): Pass proper type to size_binop and don't
14327 fold result.
14328 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
14329 * rtti.c (get_base_offset): Pass proper type to size_binop.
14330 * search.c (dfs_find_vbases): Fix type error.
14331 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
14332 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
14333 * tree.c (debug_binfo): Variable N is signed.
14334 Use HOST_WIDE_INT_PRINT_DEC.
14335 * typeck.c (comptypes): sizetype is same as equivalent integer type.
14336 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
14337 size_one_node and size_zero_node.
14338 (c_alignof): Use size_one_node.
14339 (build_component_addr): Pass proper types to size_binop.
14340 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
14341
14342 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
14343
14344 Implement class scope using-declarations for functions.
14345 * class.c (handle_using_decl): Call add_method for used functions.
14346 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
14347 (add_method): Used functions are hidden by local functions.
14348 (check_bases_and_members): Handle using-decls before finalizing
14349 CLASSTYPE_METHOD_VEC.
14350 * call.c (add_function_candidate): Add ctype parm; if nonzero,
14351 override the type of 'this' accordingly.
14352 (add_template_candidate, add_template_candidate_real): Add ctype parm.
14353 (convert_class_to_reference, build_user_type_conversion_1,
14354 build_new_function_call, build_object_call, build_new_op,
14355 build_new_method_call): Pass ctype parm.
14356
14357 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
14358 the baselink.
14359 * call.c (convert_class_to_reference, build_user_type_conversion_1,
14360 build_new_function_call, build_object_call, build_new_op,
14361 build_new_method_call, build_op_delete_call): Don't get basetype_path
14362 from a baselink.
14363 * typeck.c (build_component_ref): Likewise.
14364 * init.c (build_offset_ref): Likewise.
14365 (resolve_offset_ref): Don't call enforce_access.
14366 Call build_scoped_ref.
14367 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
14368 would cause an error or if -pedantic.
14369 * class.c (alter_access): Lose binfo parm.
14370
14371 2000-02-26 Mark Mitchell <mark@codesourcery.com>
14372
14373 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
14374 types.
14375
14376 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
14377
14378 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
14379 pseudo_type_info creation into the std namespace
14380
14381 2000-02-26 Mark Mitchell <mark@codesourcery.com>
14382
14383 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
14384 (import_export_class): Remove declaration.
14385 * decl2.c (import_export_class): Make it static.
14386 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
14387 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
14388 EXPR_WITH_FILE_LOCATION.
14389 * lex.c (check_newline): Tweak filename/lineno setting.
14390 * semantics.c (begin_while_stmt): Fix typo in comment.
14391
14392 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14393
14394 * lang-options.h (-fmessage-length=): Add missing option.
14395
14396 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
14397
14398 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
14399
14400 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
14401
14402 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
14403
14404 * optimize.c (expand_call_inline): Emit the return label before
14405 evaluating the return value.
14406
14407 2000-02-24 Mark Mitchell <mark@codesourcery.com>
14408
14409 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
14410 than duplicating functionality here.
14411 * optimize.c: Include input.h.
14412 (expand_call_inline): Use push_srcloc and pop_srcloc.
14413 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
14414 * parse.c: Regenerated.
14415 * Makefile.in (lex.o): Depend on input.h.
14416 (optimize.o): Likewise.
14417
14418 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
14419
14420 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
14421 function type, rather than ICE.
14422
14423 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
14424
14425 * decl.c (grokdeclarator): Call decl_type_access_control.
14426 * parse.y (parse_end_decl): Don't call decl_type_access_control if
14427 decl is null.
14428
14429 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
14430
14431 * decl.c (decls_match): Remove obsolete static member nadgering.
14432
14433 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14434
14435 * decl.c (grokdeclarator): Change ANSI to ISO.
14436 * lex.c (consume_string, readescape, do_identifier): Likewise.
14437 (parse_float, real_yylex): Likewise.
14438 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
14439 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
14440 new_type_id, maybe_label_decls, simple_stmt,
14441 for.init.statement): Likewise.
14442 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
14443 * semantics.c (finish_named_return_value): Likewise.
14444 * parse.c: Regenerate.
14445
14446 2000-02-21 Mark Mitchell <mark@codesourcery.com>
14447
14448 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
14449 (CPTI_CLASS_STAR_TYPE): Remove.
14450 (vtable_index_type): Likewise.
14451 (class_star_type_node): Remove.
14452 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
14453 (build_binary_op_nodefault): Remove.
14454 * call.c (build_new_op): Use build_binary_op instead of
14455 build_binary_op_nodefault.
14456 * decl.c (init_decl_processing): Remove class_star_type_node
14457 initialization. Make delta_type_node ptrdiff_type_node under the
14458 new ABI. Initialize vtable_index_type.
14459 (build_ptrmemfunc_type): Build different structures for the new
14460 ABI.
14461 (build_enumerator): Use build_binary_op instead of
14462 build_binary_op_nodefault.
14463 * method.c (build_overload_value): Mangle pointers-to-members
14464 appropriately under the new ABI.
14465 * typeck.c (build_array_ref): Use build_binary_op instead of
14466 build_binary_op_nodefault.
14467 (get_member_function_from_ptrfunc): Adjust for the new ABI.
14468 (build_binary_op_nodefault): Rename to ...
14469 (build_binary_op): ... this. Remove old version. Adjust for
14470 pointer-to-member comparisons under the new ABI.
14471 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
14472 (build_ptrmemfunc): Adjust for the new ABI.
14473 (expand_ptrmemfunc_cst): Likewise.
14474 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
14475 (pfn_from_ptrmemfunc): Adjust for the new ABI.
14476
14477 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
14478
14479 * call.c (build_object_call): Compress consecutive calls to
14480 cp_error.
14481 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
14482 (build_op_delete_call): Adjust message formatting.
14483
14484 * class.c (check_bases): Compress consecutive calls to
14485 cp_pedwarn.
14486 (finish_struct_anon): Say 'ISO C++'.
14487
14488 * decl.c (start_decl): Same here.
14489 (grok_reference_init): Likewise.
14490 (grokfndecl): Correct message formatting.
14491 (grokfndecl): Improve diagnostic.
14492 (check_static_variable_definition): Likewise. Say 'ISO C++'
14493 (compute_array_index_type): Say 'ISO C++'
14494 (create_array_type_for_decl): Compress consecutive calls to
14495 cp_error.
14496 (grokdeclarator): Say 'ISO C++'
14497 (grok_op_properties): Likewise.
14498
14499 * decl2.c (delete_sanity): Clairify diagnostic.
14500 (check_member_template): Same here.
14501 (grok_function_init): Use consistent terminology.
14502
14503 * expr.c (do_case): Say 'ISO C++'
14504
14505 * friend.c (do_friend): Compress consecutive calls to warning.
14506
14507 2000-02-20 Mark Mitchell <mark@codesourcery.com>
14508
14509 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
14510 * class.c (build_secondary_vtable): Reorganize. Don't create a
14511 new vtable under the new ABI.
14512 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
14513 computing the size.
14514 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
14515 the initializing elements.
14516 (initialize_vtable): New function.
14517 (dfs_finish_vtbls): Use it.
14518 (dfs_accumulate_vtbl_inits): New function.
14519 (finish_vtbls): Merge primary and secondary vtables under the new
14520 ABI.
14521 (finish_struct_1): Remove redundant call to layout_vtable_decl.
14522 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
14523 aren't VAR_DECLs.
14524
14525 * class.c (build_vtable): New function, split out from ...
14526 (get_vtable_decl): ... here, and ...
14527 (build_secondary_vtable): ... here.
14528
14529 * pt.c (tsubst_decl): Fix formatting.
14530
14531 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14532
14533 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
14534 (avoid_overlap, build_base_field): Likewise.
14535 (build_base_field, build_base_fields, is_empty_class):
14536 Test DECL_SIZE with integer_zero.
14537 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
14538 * cp-tree.h (struct lang_type): New field size_unit.
14539 (CLASSTYPE_SIZE_UNIT): New macro.
14540 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
14541 (cp_finish_decl): Delete -Wlarger-than processing.
14542 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
14543 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
14544 * tree.c (make_binfo): binfo vector is one entry longer.
14545 (walk_tree): Walk DECL_SIZE_UNIT.
14546
14547 2000-02-19 Mark Mitchell <mark@codesourcery.com>
14548
14549 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
14550 comment.
14551 (build_vtable_entry): Don't assume all vtable entries are
14552 functions.
14553 (build_vtbl_initializer): Adjust accordingly.
14554 (get_vtable_decl): Fix formatting.
14555
14556 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
14557
14558 * semantics.c (deferred_type_access_control): Walk the entire
14559 type_lookups list.
14560 (save_type_access_control): Rename from
14561 initial_deferred_type_access_control. Just remember the value.
14562 (decl_type_access_control): New fn.
14563 (begin_function_definition): Use deferred_type_access_control, after
14564 we've started the function. Set type_lookups to error_mark_node.
14565 * parse.y (frob_specs, fn.def1): Adjust.
14566 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
14567 (parse_end_decl, parse_bitfield0, parse_method): New fns.
14568 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
14569 (after_type_component_declarator0): Likewise.
14570 (after_type_component_declarator): Likewise.
14571 (notype_component_declarator): Likewise.
14572 * cp-tree.h: Adjust.
14573
14574 * decl.c (redeclaration_error_message): Allow redeclaration of
14575 namespace-scope decls.
14576
14577 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
14578
14579 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
14580
14581 2000-02-17 Mark Mitchell <mark@codesourcery.com>
14582
14583 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
14584 * decl2.c (grokclassfn): Likewise.
14585
14586 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
14587
14588 * decl2.c (lang_decode_option): Don't set default message length
14589 here.
14590 * lex.c (lang_init_options): Set it here.
14591
14592 2000-02-16 Mark Mitchell <mark@codesourcery.com>
14593
14594 Make DECL_CONTEXT mean the class in which a member function was
14595 declared, even for a virtual function.
14596 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
14597 (DECL_FRIEND_CONTEXT): New macro.
14598 (DECL_REAL_CONTEXT): Remove.
14599 (SET_DECL_FRIEND_CONTEXT): Likewise.
14600 (DECL_VIRTUAL_CONTEXT): Adjust.
14601 (DECL_CLASS_SCOPE_P): Use TYPE_P.
14602 (add_friends): Remove.
14603 (hack_decl_function_context): Likewise.
14604 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
14605 CP_DECL_CONTEXT.
14606 (build_over_call): Fix indentation. Use DECL_CONTEXT
14607 instead of DECL_CLASS_CONTEXT.
14608 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
14609 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
14610 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14611 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
14612 (build_base_field): Likewise.
14613 (finish_struct_1): Likewise.
14614 (build_self_reference): Likewise.
14615 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
14616 DECL_REAL_CONTEXT.
14617 (pushtag): Use decl_function_context, not
14618 hack_decl_function_context.
14619 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
14620 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
14621 (pushdecl): Remove bogus code.
14622 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
14623 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
14624 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14625 Use decl_function_context, nothack_decl_function_context.
14626 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
14627 (grokdeclarator): Likewise. Use decl_function_context, not
14628 hack_decl_function_context.
14629 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
14630 (start_function): Use DECL_FRIEND_CONTEXT, not
14631 DECL_CLASS_CONTEXT. Use decl_function_context, not
14632 hack_decl_function_context.
14633 (finish_function): Use decl_function_context, not
14634 hack_decl_function_context.
14635 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
14636 DECL_CLASS_CONTEXT.
14637 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
14638 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
14639 (grokfield): Likewise.
14640 (finish_builtin_type): Likewise.
14641 (finish_vtable_vardec): Use decl_function_context, not
14642 hack_decl_function_context.
14643 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14644 (start_static_initialization_or_destruction): Likewise.
14645 (finish_static_initialization_or_destruction): Likewise.
14646 (mark_used): Adjust logic for deciding when to synthesize methods.
14647 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
14648 DECL_REAL_CONTEXT.
14649 * error.c (dump_function_decl): Use DECL_CONTEXT, not
14650 DECL_CLASS_CONTEXT.
14651 * friend.c (is_friend): Likewise.
14652 (add_friends): Remove.
14653 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
14654 * lex.c (begin_definition_of_inclass_inline): Use
14655 decl_function_context, not hack_decl_function_context.
14656 (process_next_inline): Likewise.
14657 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
14658 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
14659 DECL_CLASSS_CONTEXT.
14660 (hack_identifier): Likewise.
14661 (synthesize_method): Use decl_function_context, not
14662 hack_decl_function_context.
14663 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
14664 DECL_REAL_CONTEXT.
14665 (is_member_template): Use decl_function_context, not
14666 hack_decl_function_context. Use DECL_CONTEXT, not
14667 DECL_CLASS_CONTEXT.
14668 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
14669 DECL_CLASS_CONTEXT.
14670 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
14671 DECL_REAL_CONTEXT.
14672 (push_template_decl_real): Likewise.
14673 (instantiate_class_template): Don't call add_friends.
14674 (tsubst_default_argument): Use DECL_CONTEXT, not
14675 DECL_REAL_CONTEXT.
14676 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
14677 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14678 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
14679 DECL_CLASS_CONTEXT.
14680 * repo.c (repo_inline_used): Likewise.
14681 * search.c (current_scope): Adjust for new _CONTEXT macros.
14682 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
14683 DECL_REAL_CONTEXT.
14684 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
14685 (lookup_fnfields_here):Likewise.
14686 (check_final_overrider): Likewise.
14687 (init_vbase_pointers): Likewise.
14688 (virtual_context): Likewise.
14689 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
14690 (expand_body): Use decl_function_context, not
14691 hack_decl_function_context.
14692 * tree.c (hack_decl_function_context): Remove.
14693 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
14694 DECL_CLASS_CONTEXT.
14695 * typeck2.c (error_not_base_type): Likewise.
14696
14697 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
14698
14699 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
14700
14701 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14702
14703 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
14704
14705 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
14706
14707 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
14708
14709 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
14710
14711 * decl2.c (lang_decode_option): Enable automatic line wrapping.
14712
14713 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
14714
14715 * parse.y (frob_specs): Split out...
14716 (parse_decl): From here.
14717 (fn.def2): Call initial_deferred_type_access_control.
14718 (after_type_component_declarator0): Call frob_specs.
14719 (notype_component_declarator0): Likewise.
14720 * search.c (friend_accessible_p): Nested classes are friends of their
14721 enclosing classes.
14722
14723 2000-02-10 Mark Mitchell <mark@codesourcery.com>
14724
14725 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
14726 used to create an implicit temporary.
14727
14728 * class.c (dfs_modify_vtables): Tweak calculation of functions to
14729 override.
14730
14731 2000-02-08 Nathan Sidwell <nathan@acm.org>
14732
14733 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
14734 strip array element qualifiers too.
14735
14736 2000-02-07 Mark Mitchell <mark@codesourcery.com>
14737
14738 * decl.c (store_parm_decls): Don't build cleanups for parameters
14739 while processing_template_decl.
14740
14741 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
14742
14743 * cp-tree.h (struct saved_scope): Add incomplete field.
14744 (namespace_scope_incomplete): New macro.
14745 * decl.c (pushdecl): Use it.
14746 (hack_incomplete_structures): Use it. See through artificial
14747 binding levels.
14748 (mark_saved_scope): Mark it.
14749
14750 Implement access control for nested types.
14751 * search.c (type_access_control): New fn.
14752 (accessible_p): Now we do perform access control for types.
14753 * semantics.c (deferred_type_access_control): New fn.
14754 (initial_deferred_type_access_control): New fn.
14755 (begin_function_definition): Call it. Add lookups parm.
14756 * decl.c (struct binding_level): Add this_class field.
14757 (pushlevel_class): Set it.
14758 (mark_binding_level): Mark it.
14759 (lookup_name_real): Use it. Call type_access_control.
14760 (mark_saved_scope): Mark lookups field.
14761 * cp-tree.h (flagged_type_tree): Add lookups field.
14762 (struct saved_scope): Add lookups field.
14763 (type_lookups): New macro.
14764 * parse.y (declmods): Now <ftype>.
14765 (parse_decl): Add lookups parm. Call
14766 initial_deferred_type_access_control.
14767 (lang_extdef): Clear type_lookups.
14768 (typed_declspecs, declmods, typespec): Set lookups field.
14769 (initdcl): Call deferred_type_access_control.
14770 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
14771 component_decl_1, named_parm): Adjust.
14772 * friend.c (is_friend): Nested classes are friends of their
14773 enclosing classes.
14774
14775 * class.c (currently_open_derived_class): New fn.
14776 * method.c (hack_identifier): Use it.
14777
14778 * lex.c (do_identifier): Remove obsolete code.
14779
14780 * parse.y (typed_typespecs): Propagate new_type_flag properly.
14781
14782 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
14783
14784 * tinfo.h: Remove apostrophes from C++ comment (xgettext
14785 thinks this file is plain C).
14786
14787 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14788
14789 * Makefile.in (call.o): Depend on $(EXPR_H).
14790
14791 * call.c: Include "expr.h".
14792
14793 * class.c (dump_class_hierarchy): Add prototype.
14794
14795 * search.c (dfs_get_pure_virtuals): Likewise.
14796
14797 2000-02-1 Ulrich Drepper <drepper@redhat.com>
14798
14799 * parse.y (simple_stmt): Allow :: token in asm parameter list.
14800 * parse.c: Rebuilt.
14801
14802 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
14803
14804 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
14805 Store it in DECL_FCONTEXT.
14806 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
14807
14808 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
14809
14810 * tinfo.h (old abi): #include "tconfig.h".
14811 * tinfo.cc (convert_to_base): Move into old abi section.
14812
14813 2000-01-31 Mark Mitchell <mark@codesourcery.com>
14814
14815 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
14816 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
14817 (BINFO_PRIMARY_BINFO): New macro.
14818 (BF_DELTA): Rename to ...
14819 (BV_DELTA): ... this.
14820 (BF_VCALL_INDEX): Rename to ...
14821 (BV_VCALL_INDEX): ... this.
14822 (BF_FN): Rename to ...
14823 (BV_FN): ... this.
14824 * class.c (build_vbase_path): Adjust for changes to reverse_path.
14825 (set_rtti_entry): Rename BF_ macros to BV_ variants.
14826 (modify_vtable_entry): Simplify.
14827 (add_virtual_function): Rename BF_ macros to BV_ variants.
14828 (build_vtable_initializer): Likewise.
14829 (get_class_offset_1): Remove.
14830 (dfs_get_class_offset): Likewise.
14831 (get_class_offset): Likewise.
14832 (dfs_find_final_overrider): New function.
14833 (find_final_overrider): Likewise.
14834 (modify_one_vtable): Remove.
14835 (dfs_find_base): New function.
14836 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
14837 find_final_overrider.
14838 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
14839 virtuals.
14840 (dfs_fixup_vtable_deltas): Remove.
14841 (override_one_vtable): Remove.
14842 (merge_overrides): Likewise.
14843 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
14844 unreal chilren of virtual bases.
14845 (finish_struct_1): Don't use merge_overrides. Don't use
14846 dfs_fixup_vtable_deltas.
14847 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
14848 BINFOs.
14849
14850 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
14851 Jason Merrill <jason@yorick.cygnus.com>
14852
14853 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
14854
14855 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
14856
14857 * exception.cc (__throw_bad_typeid): Add missing std::.
14858
14859 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14860
14861 * cp-tree.h (make_thunk): PROTO -> PARAMS.
14862
14863 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
14864
14865 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
14866
14867 Runtime support for new-abi rtti.
14868 * inc/typeinfo (type_info::operator!=): Define in class.
14869 (type_info::before, type_info::name, type_info::operator==,
14870 type_info::operator!=): Define new ABI implementations.
14871 (type_info::is_pointer_p, type_info::is_function_p): Declare
14872 new virtual functions.
14873 (type_info::do_catch, type_info::do_upcast): Likewise.
14874
14875 * tinfo.h (__base_class_info): Define new class.
14876 (__class_type_info): Likewise.
14877 (__si_class_type_info): Likewise.
14878 (__vmi_class_type_info): Likewise.
14879 (__dynamic_cast): Prototype.
14880
14881 * tinfo.cc: Conditionalize old and new rtti mechanisms.
14882 (type_info::is_pointer_p): Define new function.
14883 (type_info::is_function_p): Likewise.
14884 (type_info::do_catch): Likewise.
14885 (type_info::do_upcast): Likewise.
14886 (vtable_prefix): New structure for vtable access.
14887 (adjust_pointer): Define new template function.
14888 (contained_p, public_p, virtual_p, contained_public_p,
14889 contained_nonpublic_p, contained_nonvirtual_p): Define new
14890 functions.
14891 (nonvirtual_base_type): New local variable.
14892 (__class_type_info::~__class_type_info): Define.
14893 (__si_class_type_info::~__si_class_type_info): Likewise.
14894 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
14895 (__class_type_info::do_catch): Define new function.
14896 (__class_type_info::do_upcast): Likewise.
14897 (__class_type_info::find_public_src): Likewise.
14898 (__class_type_info::do_find_public_src): Likewise.
14899 (__si_class_type_info::do_find_public_src): Likewise.
14900 (__vmi_class_type_info::do_find_public_src): Likewise.
14901 (__class_type_info::do_dyncast): Likewise.
14902 (__si_class_type_info::do_dyncast): Likewise.
14903 (__vmi_class_type_info::do_dyncast): Likewise.
14904 (__class_type_info::do_upcast): Likewise.
14905 (__si_class_type_info::do_upcast): Likewise.
14906 (__vmi_class_type_info::do_upcast): Likewise.
14907 (__dynamic_cast): Likewise.
14908
14909 * tinfo2.cc (__fundamental_type_info): Define new class.
14910 (__pointer_type_info): Likewise.
14911 (__reference_type_info): Likewise.
14912 (__array_type_info): Likewise.
14913 (__function_type_info): Likewise.
14914 (__enum_type_info): Likewise.
14915 (__ptr_to_member_type_info): Likewise.
14916 (__fundamental_type_info::~__fundamental_type_info): Define.
14917 (__pointer_type_info::~__pointer_type_info): Likewise.
14918 (__reference_type_info::~__reference_type_info): Likewise.
14919 (__array_type_info::~__array_type_info): Likewise.
14920 (__function_type_info::~__function_type_info): Likewise.
14921 (__enum_type_info::~__enum_type_info): Likewise.
14922 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
14923 (__pointer_type_info::do_catch): Define new function.
14924 (__ptr_to_member_type_info::do_catch): Define new function.
14925
14926 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
14927 (__is_pointer): Likewise.
14928
14929 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
14930
14931 2000-01-30 Mark Mitchell <mark@codesourcery.com>
14932
14933 * cp/class.c (build_vtable): Rename to build_primary_vtable.
14934 (prepare_fresh_vtable): Rename to build_secondary_vtable.
14935 (make_new_vtable): New function.
14936 (modify_vtable_entry): Handle generation of new vtables correctly.
14937 (modify_one_vtable): Remove unused parameter.
14938 (dfs_fixup_vtable_deltas): Likewise.
14939 (override_one_vtable): Use build_secondary_vtable.
14940 (finish_struct_1): Use build_primary_vtable and
14941 build_secondary_vtable.
14942
14943 2000-01-28 Ulrich Drepper <drepper@redhat.com>
14944
14945 * cp/decl.c: Adjust variable names, comments, help strings.
14946
14947 2000-01-29 Nathan Sidwell <nathan@acm.org>
14948
14949 * new2.cc (operator delete[]): Use operator delete, don't assume
14950 implementation.
14951
14952 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
14953
14954 * class.c (build_vtbl_initializer): Add argument to
14955 build_vtable_entry call.
14956
14957 2000-01-27 Mark Mitchell <mark@codesourcery.com>
14958
14959 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
14960 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
14961 (BF_DELTA): New macro.
14962 (BF_VCALL_INDEX): Likewise.
14963 (BF_FN): Likewise.
14964 (THUNK_VCALL_OFFSET): Likewise.
14965 (make_thunk): Change prototype.
14966 * class.c (build_vtable_entry): Integrate
14967 build_vtable_entry_for_fn. Handle vcall indices.
14968 (build_vtable_entry_for_fn): Remove.
14969 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
14970 BF_VCALL_INDEX, BF_FN.
14971 (modify_vtable_entry): Integrate common code from
14972 modify_one_vtable and dfs_fixup_vtable_deltas.
14973 (add_virtual_function): Set BF_VCALL_INDEX.
14974 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
14975 and BF_FN.
14976 (modify_one_vtable): Simplify.
14977 (dfs_fixup_vtable_deltas): Likewise.
14978 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
14979 * method.c (make_thunk): Handle vcall indices.
14980
14981 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
14982
14983 Compiler side new abi rtti (not enabled).
14984 * cp-tree.h (new_abi_rtti_p): New macro.
14985 (emit_support_tinfos): Prototype new function.
14986 (tinfo_decl_p): Likewise.
14987 (emit_tinfo_decl): Likwise.
14988 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
14989 macros.
14990 (doing_runtime): New local static.
14991 (init_rtti_processing): Add new-abi initializer.
14992 (get_tinfo_decl): Add new-abi logic.
14993 (tinfo_from_decl): Likewise.
14994 (build_dynamic_cast_1): Likewise.
14995 (qualifier_flags): New static function.
14996 (tinfo_base_init): Likewise.
14997 (generic_initializer): Likewise.
14998 (ptr_ref_initializer): Likewise.
14999 (ptmd_initializer): Likewise.
15000 (class_hint_flags): Likewise.
15001 (class_initializer): Likewise.
15002 (synthesize_tinfo_var): Likewise.
15003 (create_real_tinfo_var): Likewise.
15004 (create_pseudo_type_info): Likewise.
15005 (get_vmi_pseudo_type_info): Likewise.
15006 (create_tinfo_types): Likewise.
15007 (emit_support_tinfos): New global function.
15008 (tinfo_decl_p): New global predicate.
15009 (emit_tinfo_decl): New global function.
15010 * class.c (set_rtti_entry): Generalize for old and new rtti.
15011 (build_vtbl_initializer): Likewise.
15012 * decl2.c (finish_file): Likewise.
15013
15014 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
15015
15016 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
15017 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
15018
15019 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
15020
15021 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
15022 for scopes.
15023
15024 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
15025
15026 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
15027
15028 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
15029
15030 * optimize.c (calls_setjmp_r): Supply new argument
15031 to special_function_p.
15032
15033 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15034
15035 * call.c: PROTO -> PARAMS.
15036 * class.c: Likewise.
15037 * cp-tree.h: Likewise.
15038 * cvt.c: Likewise.
15039 * decl.c: Likewise.
15040 * decl.h: Likewise.
15041 * decl2.c: Likewise.
15042 * dump.c: Likewise.
15043 * errfn.c: Likewise.
15044 * error.c: Likewise.
15045 * except.c: Likewise.
15046 * expr.c: Likewise.
15047 * init.c: Likewise.
15048 * input.c: Likewise.
15049 * lex.c: Likewise.
15050 * lex.h: Likewise.
15051 * method.c: Likewise.
15052 * optimize.c: Likewise.
15053 * parse.y: Likewise.
15054 * pt.c: Likewise.
15055 * repo.c: Likewise.
15056 * rtti.c: Likewise.
15057 * search.c: Likewise.
15058 * semantics.c: Likewise.
15059 * spew.c: Likewise.
15060 * tree.c: Likewise.
15061 * typeck.c: Likewise.
15062 * typeck2.c: Likewise.
15063 * xref.c: Likewise.
15064
15065 2000-01-25 Richard Henderson <rth@cygnus.com>
15066
15067 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
15068
15069 2000-01-25 Mark Mitchell <mark@codesourcery.com>
15070
15071 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
15072 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
15073 (struct vcall_offset_data_s): New type.
15074 (dfs_vcall_offset_queue_p): New function.
15075 (dfs_build_vcall_offset_vtbl_entries): Likewise.
15076 (build_vcall_offset_vtbl_entries): Likewise.
15077 (layout_vtable_decl): Likewise.
15078 (num_vfun_entries): Likewise.
15079 (num_extra_vtbl_entries): Add the entries for vcall offsets.
15080 (build_vtbl_initializer): Likewise.
15081 (dfs_finish_vtabls): Use layout_vtable_decl.
15082 (modify_one_vtables): Always duplicate vtables under the new ABI.
15083 (finish_struct_1): Use layout_vtable_decl.
15084
15085 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15086
15087 * decl.c (member_function_or_else): Change third arg from a format
15088 specifier to an `enum overload_flags'. Callers changed.
15089
15090 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
15091
15092 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
15093 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
15094 build_const_cast, get_delta_difference, check_return_expr): Avoid
15095 ANSI string concatenation usage.
15096
15097 2000-01-24 Mark Mitchell <mark@codesourcery.com>
15098
15099 * class.c (layout_class_type): Put the fields required to make a
15100 class non-empty at the end, not the beginning, of the TYPE_FIELDs
15101 list.
15102
15103 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
15104
15105 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
15106 template.
15107
15108 * decl2.c (mark_used): Do instantiate inlines that have been
15109 explicitly instantiated.
15110
15111 2000-01-24 Richard Henderson <rth@cygnus.com>
15112
15113 * call.c (build_over_call): Use expand_tree_builtin.
15114 * typeck.c (build_function_call_real): Likewise.
15115 (build_binary_op_nodefault): Handle unordered compares.
15116
15117 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
15118
15119 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
15120 cp_tree_index values.
15121 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
15122 New global node #defines for them.
15123 * rtti.c (call_void_fn): Replace with ...
15124 (build_runtime_decl): ... new static function.
15125 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
15126 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
15127 (build_dynamic_cast_1): Always produce correctly typed result.
15128 Explicitly produce type_info addresses. Use dynamic_cast_node.
15129 * exception.cc (__throw_bad_cast): Return `void *'.
15130 (__throw_bad_typeid): Return `const type_info &'.
15131
15132 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
15133
15134 * cp-tree.h (get_vtable_decl): Prototype new function.
15135 * class.c (get_vtable_decl): New function. Broken out from ...
15136 (build_vtable): ... here. Use it.
15137 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
15138 by get_vtable_decl.
15139
15140 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
15141
15142 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
15143 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
15144 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
15145 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
15146 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
15147 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
15148 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
15149 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
15150 (CPTI_TINFO_VAR_ID): New enumeration.
15151 (__tp_desc_type_node, __access_mode_type_node,
15152 __bltn_desc_type_node, __user_desc_type_node,
15153 __class_desc_type_node, __ptr_desc_type_node,
15154 __attr_desc_type_node, __func_desc_type_node,
15155 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
15156 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
15157 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
15158 enum_desc_type_node, class_desc_type_node,
15159 si_class_desc_type_node, vmi_class_desc_type_node,
15160 ptmd_desc_type_node, base_desc_type_node): New #defines.
15161 (tinfo_fn_id, tinfo_fn_type): Rename to ...
15162 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
15163 (tinfo_var_id): New enumeration.
15164 (DECL_TINFO_FN_P): Augment comment.
15165 * decl.c (cp_global_trees): Adjust documentation.
15166 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
15167 tinfo_decl_type and tinfo_var_id.
15168 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
15169 (build_typeid): Remove unused variable.
15170 (get_tinfo_var): Use tinfo_var_id.
15171 (tinfo_name): New static function.
15172 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
15173 (tinfo_from_decl): Likewise.
15174 (get_base_offset): New static function, broken out of
15175 expand_class_desc.
15176 (expand_si_desc): Use tinfo_name.
15177 (expand_class_desc): Likewise. Lose local static variable.
15178 Use base_desc_type_node. Use get_base_offset.
15179 (expand_ptr_desc): Use tinfo_name.
15180 (expand_attr_desc): Likewise.
15181 (expand_generic_desc): Likewise.
15182
15183 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
15184 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
15185
15186 2000-01-23 Mark Mitchell <mark@codesourcery.com>
15187
15188 * cp-tree.h (__eprintf): Remove declaration.
15189 * tree.c (__eprintf): Remove definition.
15190
15191 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
15192 Mark Mitchell <mark@codesourcery.com>
15193
15194 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
15195 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
15196
15197 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
15198
15199 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
15200
15201 2000-01-23 Mark Mitchell <mark@codesourcery.com>
15202
15203 * cp-tree.h (register_dtor_fn): New function.
15204 * decl.c (destroy_local_static): Rename to ...
15205 (register_dtor_fn): ... this. Give it external linkage.
15206 (expand_static_init): Use it.
15207 * decl2.c (do_static_initialization): Likewise, if using
15208 __cxa_atexit.
15209 (do_static_destruction): Check that __cxa_atexit is not in use.
15210 (finish_file): Don't call do_static_destruction if using
15211 __cxa_atexit.
15212
15213 * typeck.c (convert_arguments): Restore two-message error
15214 reporting.
15215
15216 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
15217
15218 Remap dynamic cast hint values to be consistent across ABIs.
15219 * search.c (dynamic_cast_base_recurse): Remap generated value.
15220 (get_dynamic_cast_base_type): Adjust documentation.
15221 * tinfo.h (__user_type_info::dyncast): Likewise.
15222 (__user_type_info::find_public_subobj): Remap BOFF meaning.
15223 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
15224 (__class_type_info::do_dyncast): Likewise.
15225 (__class_type_info::do_find_public_subobj): Likewise.
15226 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
15227
15228 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
15229
15230 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
15231
15232 * typeck2.c (incomplete_type_error): Restore previous
15233 cp_error and cp_error_at call sequence.
15234
15235 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
15236
15237 * class.c (dump_class_hierarchy): Make format agree with argument;
15238 cast pointer to unsigned long and print with %lx.
15239
15240 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
15241
15242 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
15243
15244 * typeck.c (composite_pointer_type, common_type,
15245 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
15246 build_function_call_real, convert_arguments,
15247 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
15248 build_unary_op, mark_addressable, build_compound_expr,
15249 build_static_cast, build_reinterpret_cast, build_const_cast,
15250 build_c_cast, build_modify_expr, get_delta_difference,
15251 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
15252 'ISO C++'. Fusion consecutive calls to diagnostic message routines
15253 into a single one.
15254 * typeck2.c (readonly_error, abstract_virtuals_error,
15255 process_init_constructor, check_for_new_type): Likewise.
15256
15257 2000-01-19 Mark Mitchell <mark@codesourcery.com>
15258
15259 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
15260 VAR_DECLs.
15261
15262 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
15263
15264 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
15265 (build_x_typeid): Likewise.
15266 (get_tinfo_fn): Likewise.
15267 (get_tinfo_fn_unused): Rename to ...
15268 (get_tinfo_decl): ... here.
15269 * rtti.c (build_headof): Replace logic error with assertion.
15270 (get_tinfo_fn_dynamic): Rename to ...
15271 (get_tinfo_decl_dynamic): ... here. Make static. Use
15272 complete_type_or_else.
15273 (build_x_typeid): Move into ...
15274 (build_typeid): ... here. Adjust call to
15275 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
15276 throw_bad_typeid expression.
15277 (get_tinfo_fn_unused): Rename to ...
15278 (get_tinfo_decl): ... here. Adjust comment.
15279 (get_tinfo_fn): Delete.
15280 (tinfo_from_decl): New static function.
15281 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
15282 (get_typeid): Use complete_type_or_else.
15283 (build_dynamic_cast_1): Adjust calls to
15284 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
15285 * parse.y (primary): Adjust call to build_typeid.
15286 * except.c (build_eh_type_type_ref): Adjust call to
15287 get_tinfo_decl. Mark as used.
15288 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
15289 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
15290 * parse.c: Regenerated.
15291
15292 2000-01-17 Mark Mitchell <mark@codesourcery.com>
15293
15294 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
15295 calling convention.
15296 (resolves_to_fixed_type_p): Document calling convention.
15297 * rtti.c (build_x_typeid): Initialize NONNULL.
15298
15299 * cp-tree.h (build_shared_int_cst): New function.
15300 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
15301 * class.c (modify_vtable_entry): Likewise.
15302 (add_virtual_function): Split out code to generated shared
15303 INTEGER_CSTs to build_share_int_cst.
15304 (modify_all_vtables): Handle all the overridden functions here.
15305 Add overridden functions from non-primary virtual bases to the
15306 primary vtable.
15307 (finish_struct_1): Adjust call to modify_all_vtables. Add
15308 overridden functions from non-primary bases to the vtable.
15309 * tree.c (build_shared_int_cst): New function.
15310
15311 * cp-tree.h (scratchalloc): Remove.
15312 (build_scratch_list): Likewise.
15313 * call.c (convert_class_to_reference): Replace build_scratch_list
15314 and build_expr_list with build_tree_list.
15315 (add_candidate): Replace scratchalloc with expralloc. Note memory
15316 leak.
15317 (build_user_type_conversion_1): Replace build_scratch_list
15318 and build_expr_list with build_tree_list.
15319 (build_new_op): Likewise.
15320 (build_op_delete_call): Likewise.
15321 (convert_like): Likewise.
15322 * cvt.c (ocp_convert): Likewise.
15323 * decl.c (start_decl): Likewise.
15324 (start_function): Likewise.
15325 (finish_destructor_body): Likewise.
15326 (maybe_build_cleanup_1): Likewise.
15327 * decl2.c (reparse_decl_as_expr): Likewise.
15328 * init.c (perform_member_init): Likewise.
15329 (expand_cleanup_for_base): Likewise.
15330 (build_builtin_delete_call): Likewise.
15331 (build_new_1): Likewise.
15332 (build_delete): Likewise.
15333 * method.c (do_build_assign_ref): Likewise.
15334 * parse.y (already_scoped_stmt): Likewise.
15335 (nontrivial_exprlist): Likewise.
15336 (net_initializer): Likewise.
15337 (initlist): Likewise.
15338 * parse.c: Regenerated.
15339 * rtti.c (build_x_typeid): Likewise.
15340 (build_dynamic_cast_1): Likewise.
15341 * typeck.c (build_x_compound_expr): Likewise.
15342 (build_static_cast): Likewise.
15343 (build_modify_expr): Likewise.
15344
15345 * cp-tree.h (DECL_VINDEX): Add documentation.
15346 * class.c (build_vtable_entry): Likewise.
15347 (start_vtable): Add comment.
15348 (add_virtual_function): Replace pending_hard_virtuals with
15349 overridden_virtuals and pending_virtuals with new_virtuals.
15350 Replace redundant assignments with assertions.
15351 (check_for_override): Add comment.
15352 (check_bases_and_members): Replace pending_hard_virtuals with
15353 overridden_virtuals and pending_virtuals with new_virtuals.
15354 (create_vtbl_ptr): Likewise.
15355 (layout_class_type): Likewise.
15356 (finish_struct_1): Likewise. Add comments.
15357
15358 2000-01-16 Mark Mitchell <mark@codesourcery.com>
15359
15360 * class.c (finish_struct_1): Replace redundant code with
15361 assertions.
15362
15363 * cp-tree.h (flag_new_abi): Move.
15364 (flag_use_cxa_atexit): Likewise.
15365 (flag_honor_std): Likewise.
15366 (flag_rtti): Likewise.
15367 (vbase_offsets_in_vtable_p): Define.
15368 (vptrs_present_everywhere_p): Likewise.
15369 (TYPE_CONTAINS_VPTR_P): Likewise.
15370 (dfs_walk_real): Declare.
15371 * class.c (build_vbase_pointer_fields): Check
15372 vbase_offsets_in_vtable_p.
15373 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
15374 BINFO_VPTR_FIELD.
15375 (build_vbase_offset_vtbl_entries): Simplify.
15376 (build_vbase_offset_vtbl_entries): Adjust.
15377 (build_vbase_pointer): Add ability to look up vbase offsets in
15378 vtable.
15379 (start_vtable): New function.
15380 (add_virtual_function): Use it.
15381 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
15382 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
15383 (build_vtbl_initializer): Take the type of the complete object as
15384 input. Use it to correctly calculate vbase offsets.
15385 (dfs_finish_vtbls): Pass the complete type to
15386 build_vtbl_initializer.
15387 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
15388 (create_vtable_ptr): Create a vtable even if there are no
15389 new virtual functions, under the new ABI.
15390 (finish_struct_1): Likewise.
15391 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
15392 * decl.c (exapnd_static_init): Remove call to
15393 preserve_initializer.
15394 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
15395 vtables.
15396 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
15397 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
15398 (construct_virtual_bases): Don't initialize virtual base pointers
15399 under the new ABI.
15400 (build_aggr_init): Clean up comment.
15401 (expand_aggr_init_1): Likewise.
15402 * rtti.c (expand_class_desc): Store the virtual function table
15403 index where the vbase offset lives in the offset field.
15404 * search.c (dfs_walk_real): Make it global.
15405 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
15406 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
15407
15408 * tinfo.h (USItype): Make it signed under the new ABI.
15409 * tinfo.cc (convert_to_base): New function. Encapsulate base
15410 conversion logic here.
15411 (__class_type_info::do_upcast): Use it.
15412 (__class_type_info::do_dyncast): Likewise.
15413 (__class_type_info::do_find_public_subobj): Likewise.
15414
15415 * init.c (construct_virtual_bases): Don't look up the addresses of
15416 virtual bases at run-time.
15417
15418 * class.c (build_vbase_pointer): Relocate.
15419 (build_vbase_pointer_fields): Likewise.
15420 (dfs_build_vbase_offset_vtbl_entries): Likewise.
15421 (build_vbase_offset_vtbl_entries): Likewise.
15422
15423 * decl.c (init_decl_processing): Complain if -fnew-abi
15424 -fno-vtable-thunks is used.
15425
15426 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
15427 flag_new_abi.
15428
15429 2000-01-15 Mark Mitchell <mark@codesourcery.com>
15430
15431 * cp-tree.h (num_extra_vtbl_entries): New function.
15432 (size_extra_vtbl_entries): Likewise.
15433 (dfs_vtable_path_unmark): Likewise.
15434 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
15435 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
15436 * class.c (num_extra_vtbl_entries): New function.
15437 (size_extra_vtbl_entries): Likewise.
15438 (dfs_build_vbase_offset_vtbl_entries): New function.
15439 (build_vbase_offset_vtbl_entries): Likewise.
15440 (build_vtbl_initializer): Use it.
15441 (finish_struct_1): Adjust vtable sizes (using
15442 num_extra_vtbl_entries).
15443 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
15444 THUNK_DECL is non-NULL before expanding it.
15445 * init.c (expand_virtual_init): Adjust the vtable pointer by
15446 size_extra_vtbl_entries before storing it.
15447 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
15448 Handle TREE_LIST parameters here, not in the dfs_* functions.
15449 (dfs_unmarked_real_bases_queue_p): Adjust.
15450 (dfs_marked_real_bases_queue_p): Likewise.
15451 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
15452 (dfs_vtable_path_marked_real_bases_queue_p): New function.
15453 (dfs_vtable_path_unmark): Likewise.
15454
15455 2000-01-14 Mark Mitchell <mark@codesourcery.com>
15456
15457 * optimize.c (copy_body_r): Clear the operand three of a
15458 TARGET_EXPR when copying it.
15459
15460 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15461
15462 * method.c (build_decl_overload_real): Check whether we are in ::
15463 before returning __builtin_new/delete.
15464
15465 2000-01-13 Mark Mitchell <mark@codesourcery.com>
15466
15467 * pt.c (tsubst_friend_function): Improve comment.
15468 (instantiate_decl): Avoid crashing when a "nested" function is
15469 instantiated from the top level.
15470
15471 * dump.c (dqeueue_and_dump): Dump
15472 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
15473
15474 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15475
15476 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
15477
15478 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
15479
15480 * g++spec.c (lang_specific_driver): Add -fnew-abi if
15481 ENABLE_NEW_GXX_ABI defined.
15482 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
15483 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
15484 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
15485
15486 2000-01-12 Mark Mitchell <mark@codesourcery.com>
15487
15488 * decl.c (start_cleanup_fn): Call pushdecl.
15489
15490 * call.c (convert_class_to_reference): Fix typos.
15491 (build_conditional_expr): Handle errors gracefully.
15492 * class.c (push_nested_class): Likewise.
15493 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
15494 (DECL_THIS_EXTERN): Use it.
15495 (DECL_THIS_STATIC): Likewise.
15496 * cvt.c (convert_to_void): Handle errors gracefully.
15497 (build_expr_type_conversion): Likewise.
15498 * decl.c (maybe_push_decl): Likewise.
15499 (start_decl_1): Likewise.
15500 (require_complete_types_for_parms): Likewise.
15501 * parse.y (structsp): Likewise.
15502 (base_class): Likewise.
15503 * parse.c: Regenerated.
15504 * pt.c (finish_member_template_decl): Likewise.
15505 * typeck.c (decay_conversion): Likewise.
15506
15507 * cp-tree.h (dfs_skip_vbases): New function.
15508 (find_vbase_instance): Likewise.
15509 * class.c (determine_primary_base): Allow a nearly empty base to
15510 serve as a primary base class under the new ABI.
15511 (get_class_offset_1): Rename to ...
15512 (dfs_get_class_offset): ... this. Simplify. Don't issue error
15513 messages here.
15514 (get_class_offset): Use it. Issue error messages here.
15515 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
15516 find the right copies of virtual bases.
15517 (fixup_vtable_deltas1): Rename to ...
15518 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
15519 bases as primary bases.
15520 (fixup_vtable_deltas): Remove.
15521 (override_one_vtable): Handle virtual bases as primary bases.
15522 (merge_overrides): Likewise.
15523 (finish_struct_1): Likewise.
15524 (dump_class_hierarchy): Dump primary-ness of bases as well.
15525 * search.c (mark_primary_bases): Use a pre-order traversal to
15526 handle primary virtual bases.
15527 (dfs_skip_vbases): New fiunction.
15528 (expand_upcast_fixups): Adjust to handle primary virtual bases.
15529 (fixup_virtual_upcast_offsets): Likewise.
15530 (fixup_all_virtual_upcast_offsets): Likewise.
15531 (dfs_find_vbase_instances): New function.
15532 (find_vbase_instance): Likewise.
15533
15534 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
15535
15536 * lex.c (DIR_SEPARATOR): Delete macro.
15537
15538 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
15539
15540 * decl2.c (lang_decode_option): Handle automatic line wrapping
15541 option.
15542
15543 2000-01-11 Mark Mitchell <mark@codesourcery.com>
15544
15545 * friend.c (do_friend): Don't resolve scopes when processing
15546 template declarations, even if the qualifying scope doesn't
15547 involve template parameters.
15548
15549 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
15550
15551 * class.c (dfs_modify_vtables_queue_p): Remove.
15552 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
15553 and dfs_marked_real_bases_queue_p instead of
15554 dfs_modify_vtables_queue_p.
15555
15556 * class.c (build_vbase_path): Simplify.
15557 (dfs_propagate_binfo_offsets): New function.
15558 (propagate_binfo_offsets): Use it.
15559 (remove_base_field): Simplify.
15560 (dfs_set_offset_for_vbases): Remove.
15561 (dfs_set_offset_for_shared_vbases): New function.
15562 (dfs_set_offset_for_unshared_vbases): Likewise.
15563 (layout_virtual_bases): Use them.
15564 (layout_basetypes): Don't call propagate_binfo_offsets.
15565 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
15566 for the vbases.
15567
15568 * class.c (build_base_field): New function, split out from ...
15569 (build_base_fields): ... here. Use it. Allocate primary bases
15570 first, under the new ABI.
15571 (get_vtable_entry): Remove.
15572 (remove_base_field): New function, split out from ...
15573 (remove_base_fields): ... here. Adjust since primary bases come
15574 first under the new ABI.
15575
15576 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
15577 (initialize_vtbl_ptrs): New function.
15578 (expand_indirect_vtbls_init): Change prototype.
15579 (convert_pointer_to_vbase): Declare.
15580 * init.c (expand_direct_vtbls_init): Remove.
15581 (dfs_initialize_vtbl_ptrs): New function.
15582 (initialize_vtbl_ptrs): Likewise.
15583 (emit_base_init): Use initialize_vtbl_ptrs.
15584 * search.c (convert_pointer_to_vbase): Make it global.
15585 (expand_indirect_vtbls_init): Remove vtable initialization code.
15586 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
15587
15588 * class.c (dfs_finish_vtbls): New function.
15589 (finish_vtbls): Use it.
15590 (dump_class_hierarchy): New function.
15591
15592 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
15593 (BINFO_VBASE_PRIMARY_P): New macro.
15594 (BINFO_VIRTUALS): Add to documentation.
15595 (SET_BINFO_PRIMARY_MARKED_P): Remove.
15596 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
15597 (dfs_mark_primary_bases_queue_p): Likewise.
15598 (dfs_unmarked_real_bases_queue_p): New function.
15599 (dfs_marked_real_bases_queue_p): Likewise.
15600 * search.c (dfs_mark_primary_bases): Adjust.
15601 (mark_primary_bases): Likewise.
15602 (get_shared_vbase_if_not_primary): New function.
15603 (dfs_unmarked_real_bases_queue_p): Likewise.
15604 (dfs_marked_real_bases_queue_p): Likewise.
15605 (dfs_get_pure_virtuals): Simplify.
15606 (get_pure_virtuals): Likewise.
15607
15608 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15609
15610 * lex.c: Include tm_p.h.
15611
15612 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
15613
15614 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
15615
15616 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
15617
15618 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
15619 * pt.c (instantiate_decl): Defer comdat templates that might not be
15620 needed.
15621
15622 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
15623 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
15624 (finish_file): Likewise.
15625
15626 * decl2.c (import_export_class): Undo 12/14 change.
15627
15628 * error.c (dump_decl): operator new, not operatornew.
15629
15630 * class.c (field_decl_cmp): A nontype is "greater" than a type.
15631 * search.c (lookup_field_1): Look for the last field with the
15632 desired name.
15633
15634 2000-01-05 Nathan Sidwell <nathan@acm.org>
15635
15636 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
15637 FUNCTION_DECL.
15638
15639 2000-01-05 Nathan Sidwell <nathan@acm.org>
15640
15641 * typeck.c (build_static_cast): Don't strip target qualifiers
15642 when casting from a class.
15643
15644 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15645
15646 * class.c (warn_hidden): Initialize variable `fndecl'.
15647
15648 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
15649
15650 * decl.c (flag_isoc9x): New variable to be able to use code in
15651 c-common.c. For now always zero.
15652
15653 2000-01-03 Mark Mitchell <mark@codesourcery.com>
15654
15655 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
15656 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
15657 or unshare_base_binfos for virtual bases here.
15658 * search.c (dfs_get_vbase_types): Do it here.
15659 (get_vbase_types): Adjust.
15660
15661 2000-01-02 Mark Mitchell <mark@codesourcery.com>
15662
15663 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
15664 (BINFO_PRIMARY_MARKED_P): Use flag 5.
15665 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
15666 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
15667 (unmark_primary_bases): Remove declaration.
15668 (unmarkedp): Declare.
15669 (dfs_vbase_unmark): Likewise.
15670 * class.c (determine_primary_base): Return immediately if there
15671 are no base classes. Call mark_primary_bases here.
15672 (modify_all_direct_vtables): Remove.
15673 (modify_all_indirect_vtables): Remove.
15674 (dfs_modify_vtables_queue_p): New function.
15675 (dfs_modify_vtables): New function.
15676 (modify_all_vtables): Use them.
15677 (build_base_fields): Build FIELD_DECLs for primary virtual base
15678 classes.
15679 (create_vtable_ptr): Don't call determine_primary_base here.
15680 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
15681 (dfs_set_offset_for_vbases): ... this.
15682 (layout_virtual_bases): Use it.
15683 (layout_class_type): Call determine_primary_base here.
15684 * search.c (unmarkedp): Make it global.
15685 (shared_marked_p): Simplify.
15686 (shared_unmarked_p): Likewise.
15687 (dfs_primary_bases_queue_p): Remove.
15688 (dfs_unmark_primary_bases): Likewise.
15689 (unmark_primary_bases): Likewise.
15690 (mark_primary_bases): Simplify.
15691 (get_pure_virtuals): Don't call mark_primary_bases here.
15692 (dfs_vbase_unmark): New function.
15693 (get_vbase_types): Simplify.
15694
15695 * class.c (struct base_info): Remove.
15696 (determine_primary_base): Take has_virtual_p rather than a
15697 base_info as input. Don't calculate max_has_virtual.
15698 (finish_struct_bits): Remove max_has_virtual argument.
15699 (create_vtable_ptr): Remove max_has_virtual_p argument.
15700 (layout_virtual_bases): Remove max argument.
15701 (layout_basetypes): Likewise.
15702 (layout_class_type): Remove max_has_virtual_p argument.
15703 (finish_struct_1): Remove max_has_virtual.
15704
15705 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
15706 (layout_basetypes): Remove.
15707 * class.c (propagate_binfo_offsets): Moved here from tree.c.
15708 Update to handle primary virtual bases.
15709 (remove_base_fields): New function, split out from
15710 layout_basetypes.
15711 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
15712 (layout_virtual_bases): New function, split out from
15713 layout_basetypes. Update to handle primary virtual bases.
15714 (layout_basetypes): Moved here from tree.c. Use
15715 remove_base_fields and layout_virtual_bases.
15716 * search.c (dfs_mark_primary_bases_queue_p): New function.
15717 (mark_primary_bases): Use it.
15718 * tree.c (CEIL): Remove.
15719 (propagate_binfo_offsets): Remove.
15720 (layout_basetypes): Remove.
15721
15722 2000-01-01 Mark Mitchell <mark@codesourcery.com>
15723
15724 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
15725 (BINFO_PRIMARY_MARKED_P): New macro.
15726 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
15727 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
15728 (mark_primary_bases): New function.
15729 (unmark_primary_bases): Likewise.
15730 * search.c (get_abstract_virtuals_1): Remove.
15731 (dfs_mark_primary_bases): New function.
15732 (mark_primary_bases): Likewise.
15733 (dfs_unmark_primary_bases): Likewise.
15734 (unmark_primary_bases): Likewise.
15735 (dfs_get_pure_virtuals): Likewise.
15736
15737 2000-01-01 Mark Mitchell <mark@codesourcery.com>
15738
15739 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
15740 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
15741 (modify_one_vtable): Adjust.
15742 (fixup_vtable_deltas1): Likewise.
15743 (override_one_vtable): Likewise.
15744 * search.c (get_abstract_virtuals_1): Likewise.
15745 (get_pure_virtuals): Likewise.
15746 (expand_upcast_fixups): Likewise.
15747 * tree.c (debug_binfo): Likewise.
15748
15749 * class.c (build_vtable): Don't return a value. Don't rebuild
15750 vtables for bases that have already been handled.
15751 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
15752 already been handled.
15753 (modify_one_vtable): Adjust accordingly.
15754 (fixup_vtable_deltas1): Likewise.
15755 (finish_struct_1): Likewise.
15756
15757 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15758
15759 * call.c (build_new_method_call): Also check destructors.